Rpm.parse constructor
Rpm.parse(
- ByteData data_
Implementation
factory Rpm.parse(ByteData data_) {
if (data_.lengthInBytes < Rpm.mavlinkEncodedLength) {
var len = Rpm.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var rpm1 = data_.getFloat32(0, Endian.little);
var rpm2 = data_.getFloat32(4, Endian.little);
return Rpm(rpm1: rpm1, rpm2: rpm2);
}