ParamExtAck.parse constructor

ParamExtAck.parse(
  1. ByteData data_
)

Implementation

factory ParamExtAck.parse(ByteData data_) {
  if (data_.lengthInBytes < ParamExtAck.mavlinkEncodedLength) {
    var len = ParamExtAck.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var paramId = MavlinkMessage.asInt8List(data_, 0, 16);
  var paramValue = MavlinkMessage.asInt8List(data_, 16, 128);
  var paramType = data_.getUint8(144);
  var paramResult = data_.getUint8(145);

  return ParamExtAck(
      paramId: paramId,
      paramValue: paramValue,
      paramType: paramType,
      paramResult: paramResult);
}