OpenDroneIdArmStatus.parse constructor

OpenDroneIdArmStatus.parse(
  1. ByteData data_
)

Implementation

factory OpenDroneIdArmStatus.parse(ByteData data_) {
  if (data_.lengthInBytes < OpenDroneIdArmStatus.mavlinkEncodedLength) {
    var len = OpenDroneIdArmStatus.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var status = data_.getUint8(0);
  var error = MavlinkMessage.asInt8List(data_, 1, 50);

  return OpenDroneIdArmStatus(status: status, error: error);
}