GimbalManagerStatus.parse constructor
GimbalManagerStatus.parse(
- ByteData data_
Implementation
factory GimbalManagerStatus.parse(ByteData data_) {
if (data_.lengthInBytes < GimbalManagerStatus.mavlinkEncodedLength) {
var len = GimbalManagerStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var timeBootMs = data_.getUint32(0, Endian.little);
var flags = data_.getUint32(4, Endian.little);
var gimbalDeviceId = data_.getUint8(8);
var primaryControlSysid = data_.getUint8(9);
var primaryControlCompid = data_.getUint8(10);
var secondaryControlSysid = data_.getUint8(11);
var secondaryControlCompid = data_.getUint8(12);
return GimbalManagerStatus(
timeBootMs: timeBootMs,
flags: flags,
gimbalDeviceId: gimbalDeviceId,
primaryControlSysid: primaryControlSysid,
primaryControlCompid: primaryControlCompid,
secondaryControlSysid: secondaryControlSysid,
secondaryControlCompid: secondaryControlCompid);
}