MissionItemInt.parse constructor
MissionItemInt.parse(
- ByteData data_
Implementation
factory MissionItemInt.parse(ByteData data_) {
if (data_.lengthInBytes < MissionItemInt.mavlinkEncodedLength) {
var len = MissionItemInt.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var param1 = data_.getFloat32(0, Endian.little);
var param2 = data_.getFloat32(4, Endian.little);
var param3 = data_.getFloat32(8, Endian.little);
var param4 = data_.getFloat32(12, Endian.little);
var x = data_.getInt32(16, Endian.little);
var y = data_.getInt32(20, Endian.little);
var z = data_.getFloat32(24, Endian.little);
var seq = data_.getUint16(28, Endian.little);
var command = data_.getUint16(30, Endian.little);
var targetSystem = data_.getUint8(32);
var targetComponent = data_.getUint8(33);
var frame = data_.getUint8(34);
var current = data_.getUint8(35);
var autocontinue = data_.getUint8(36);
var missionType = data_.getUint8(37);
return MissionItemInt(
param1: param1,
param2: param2,
param3: param3,
param4: param4,
x: x,
y: y,
z: z,
seq: seq,
command: command,
targetSystem: targetSystem,
targetComponent: targetComponent,
frame: frame,
current: current,
autocontinue: autocontinue,
missionType: missionType);
}