AslctrlData.parse constructor
AslctrlData.parse(
- ByteData data_
Implementation
factory AslctrlData.parse(ByteData data_) {
if (data_.lengthInBytes < AslctrlData.mavlinkEncodedLength) {
var len = AslctrlData.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var timestamp = data_.getUint64(0, Endian.little);
var h = data_.getFloat32(8, Endian.little);
var href = data_.getFloat32(12, Endian.little);
var hrefT = data_.getFloat32(16, Endian.little);
var pitchangle = data_.getFloat32(20, Endian.little);
var pitchangleref = data_.getFloat32(24, Endian.little);
var q = data_.getFloat32(28, Endian.little);
var qref = data_.getFloat32(32, Endian.little);
var uelev = data_.getFloat32(36, Endian.little);
var uthrot = data_.getFloat32(40, Endian.little);
var uthrot2 = data_.getFloat32(44, Endian.little);
var nz = data_.getFloat32(48, Endian.little);
var airspeedref = data_.getFloat32(52, Endian.little);
var yawangle = data_.getFloat32(56, Endian.little);
var yawangleref = data_.getFloat32(60, Endian.little);
var rollangle = data_.getFloat32(64, Endian.little);
var rollangleref = data_.getFloat32(68, Endian.little);
var p = data_.getFloat32(72, Endian.little);
var pref = data_.getFloat32(76, Endian.little);
var r = data_.getFloat32(80, Endian.little);
var rref = data_.getFloat32(84, Endian.little);
var uail = data_.getFloat32(88, Endian.little);
var urud = data_.getFloat32(92, Endian.little);
var aslctrlMode = data_.getUint8(96);
var spoilersengaged = data_.getUint8(97);
return AslctrlData(
timestamp: timestamp,
h: h,
href: href,
hrefT: hrefT,
pitchangle: pitchangle,
pitchangleref: pitchangleref,
q: q,
qref: qref,
uelev: uelev,
uthrot: uthrot,
uthrot2: uthrot2,
nz: nz,
airspeedref: airspeedref,
yawangle: yawangle,
yawangleref: yawangleref,
rollangle: rollangle,
rollangleref: rollangleref,
p: p,
pref: pref,
r: r,
rref: rref,
uail: uail,
urud: urud,
aslctrlMode: aslctrlMode,
spoilersengaged: spoilersengaged);
}