OsdParamConfigReply.parse constructor

OsdParamConfigReply.parse(
  1. ByteData data_
)

Implementation

factory OsdParamConfigReply.parse(ByteData data_) {
  if (data_.lengthInBytes < OsdParamConfigReply.mavlinkEncodedLength) {
    var len = OsdParamConfigReply.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 result = data_.getUint8(4);

  return OsdParamConfigReply(requestId: requestId, result: result);
}