SerialUdbExtraF15.parse constructor

SerialUdbExtraF15.parse(
  1. ByteData data_
)

Implementation

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

  return SerialUdbExtraF15(
      sueIdVehicleModelName: sueIdVehicleModelName,
      sueIdVehicleRegistration: sueIdVehicleRegistration);
}