CubepilotFirmwareUpdateResp.parse constructor
CubepilotFirmwareUpdateResp.parse(
- ByteData data_
Implementation
factory CubepilotFirmwareUpdateResp.parse(ByteData data_) {
if (data_.lengthInBytes <
CubepilotFirmwareUpdateResp.mavlinkEncodedLength) {
var len = CubepilotFirmwareUpdateResp.mavlinkEncodedLength -
data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var offset = data_.getUint32(0, Endian.little);
var targetSystem = data_.getUint8(4);
var targetComponent = data_.getUint8(5);
return CubepilotFirmwareUpdateResp(
offset: offset,
targetSystem: targetSystem,
targetComponent: targetComponent);
}