OsdParamShowConfigReply.parse constructor

OsdParamShowConfigReply.parse(
  1. ByteData data_
)

Implementation

factory OsdParamShowConfigReply.parse(ByteData data_) {
  if (data_.lengthInBytes < OsdParamShowConfigReply.mavlinkEncodedLength) {
    var len =
        OsdParamShowConfigReply.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var requestId = data_.getUint32(0, Endian.little);
  var minValue = data_.getFloat32(4, Endian.little);
  var maxValue = data_.getFloat32(8, Endian.little);
  var increment = data_.getFloat32(12, Endian.little);
  var result = data_.getUint8(16);
  var paramId = MavlinkMessage.asInt8List(data_, 17, 16);
  var configType = data_.getUint8(33);

  return OsdParamShowConfigReply(
      requestId: requestId,
      minValue: minValue,
      maxValue: maxValue,
      increment: increment,
      result: result,
      paramId: paramId,
      configType: configType);
}