CommandIntStamped.parse constructor
CommandIntStamped.parse(
- ByteData data_
Implementation
factory CommandIntStamped.parse(ByteData data_) {
if (data_.lengthInBytes < CommandIntStamped.mavlinkEncodedLength) {
var len = CommandIntStamped.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var vehicleTimestamp = data_.getUint64(0, Endian.little);
var utcTime = data_.getUint32(8, Endian.little);
var param1 = data_.getFloat32(12, Endian.little);
var param2 = data_.getFloat32(16, Endian.little);
var param3 = data_.getFloat32(20, Endian.little);
var param4 = data_.getFloat32(24, Endian.little);
var x = data_.getInt32(28, Endian.little);
var y = data_.getInt32(32, Endian.little);
var z = data_.getFloat32(36, Endian.little);
var command = data_.getUint16(40, Endian.little);
var targetSystem = data_.getUint8(42);
var targetComponent = data_.getUint8(43);
var frame = data_.getUint8(44);
var current = data_.getUint8(45);
var autocontinue = data_.getUint8(46);
return CommandIntStamped(
vehicleTimestamp: vehicleTimestamp,
utcTime: utcTime,
param1: param1,
param2: param2,
param3: param3,
param4: param4,
x: x,
y: y,
z: z,
command: command,
targetSystem: targetSystem,
targetComponent: targetComponent,
frame: frame,
current: current,
autocontinue: autocontinue);
}