SerialUdbExtraF13.parse constructor

SerialUdbExtraF13.parse(
  1. ByteData data_
)

Implementation

factory SerialUdbExtraF13.parse(ByteData data_) {
  if (data_.lengthInBytes < SerialUdbExtraF13.mavlinkEncodedLength) {
    var len = SerialUdbExtraF13.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var sueLatOrigin = data_.getInt32(0, Endian.little);
  var sueLonOrigin = data_.getInt32(4, Endian.little);
  var sueAltOrigin = data_.getInt32(8, Endian.little);
  var sueWeekNo = data_.getInt16(12, Endian.little);

  return SerialUdbExtraF13(
      sueLatOrigin: sueLatOrigin,
      sueLonOrigin: sueLonOrigin,
      sueAltOrigin: sueAltOrigin,
      sueWeekNo: sueWeekNo);
}