SerialUdbExtraF7.parse constructor

SerialUdbExtraF7.parse(
  1. ByteData data_
)

Implementation

factory SerialUdbExtraF7.parse(ByteData data_) {
  if (data_.lengthInBytes < SerialUdbExtraF7.mavlinkEncodedLength) {
    var len = SerialUdbExtraF7.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var sueYawkpRudder = data_.getFloat32(0, Endian.little);
  var sueYawkdRudder = data_.getFloat32(4, Endian.little);
  var sueRollkpRudder = data_.getFloat32(8, Endian.little);
  var sueRollkdRudder = data_.getFloat32(12, Endian.little);
  var sueRudderBoost = data_.getFloat32(16, Endian.little);
  var sueRtlPitchDown = data_.getFloat32(20, Endian.little);

  return SerialUdbExtraF7(
      sueYawkpRudder: sueYawkpRudder,
      sueYawkdRudder: sueYawkdRudder,
      sueRollkpRudder: sueRollkpRudder,
      sueRollkdRudder: sueRollkdRudder,
      sueRudderBoost: sueRudderBoost,
      sueRtlPitchDown: sueRtlPitchDown);
}