SerialUdbExtraF6.parse constructor
SerialUdbExtraF6.parse(
- ByteData data_
Implementation
factory SerialUdbExtraF6.parse(ByteData data_) {
if (data_.lengthInBytes < SerialUdbExtraF6.mavlinkEncodedLength) {
var len = SerialUdbExtraF6.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var suePitchgain = data_.getFloat32(0, Endian.little);
var suePitchkd = data_.getFloat32(4, Endian.little);
var sueRudderElevMix = data_.getFloat32(8, Endian.little);
var sueRollElevMix = data_.getFloat32(12, Endian.little);
var sueElevatorBoost = data_.getFloat32(16, Endian.little);
return SerialUdbExtraF6(
suePitchgain: suePitchgain,
suePitchkd: suePitchkd,
sueRudderElevMix: sueRudderElevMix,
sueRollElevMix: sueRollElevMix,
sueElevatorBoost: sueElevatorBoost);
}