SerialUdbExtraF16.parse constructor

SerialUdbExtraF16.parse(
  1. ByteData data_
)

Implementation

factory SerialUdbExtraF16.parse(ByteData data_) {
  if (data_.lengthInBytes < SerialUdbExtraF16.mavlinkEncodedLength) {
    var len = SerialUdbExtraF16.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var sueIdLeadPilot = MavlinkMessage.asUint8List(data_, 0, 40);
  var sueIdDiyDronesUrl = MavlinkMessage.asUint8List(data_, 40, 70);

  return SerialUdbExtraF16(
      sueIdLeadPilot: sueIdLeadPilot, sueIdDiyDronesUrl: sueIdDiyDronesUrl);
}