IcarousKinematicBands.parse constructor
IcarousKinematicBands.parse(
- ByteData data_
Implementation
factory IcarousKinematicBands.parse(ByteData data_) {
if (data_.lengthInBytes < IcarousKinematicBands.mavlinkEncodedLength) {
var len =
IcarousKinematicBands.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var min1 = data_.getFloat32(0, Endian.little);
var max1 = data_.getFloat32(4, Endian.little);
var min2 = data_.getFloat32(8, Endian.little);
var max2 = data_.getFloat32(12, Endian.little);
var min3 = data_.getFloat32(16, Endian.little);
var max3 = data_.getFloat32(20, Endian.little);
var min4 = data_.getFloat32(24, Endian.little);
var max4 = data_.getFloat32(28, Endian.little);
var min5 = data_.getFloat32(32, Endian.little);
var max5 = data_.getFloat32(36, Endian.little);
var numbands = data_.getInt8(40);
var type1 = data_.getUint8(41);
var type2 = data_.getUint8(42);
var type3 = data_.getUint8(43);
var type4 = data_.getUint8(44);
var type5 = data_.getUint8(45);
return IcarousKinematicBands(
min1: min1,
max1: max1,
min2: min2,
max2: max2,
min3: min3,
max3: max3,
min4: min4,
max4: max4,
min5: min5,
max5: max5,
numbands: numbands,
type1: type1,
type2: type2,
type3: type3,
type4: type4,
type5: type5);
}