AsluavStatus.parse constructor
AsluavStatus.parse(
- ByteData data_
Implementation
factory AsluavStatus.parse(ByteData data_) {
if (data_.lengthInBytes < AsluavStatus.mavlinkEncodedLength) {
var len = AsluavStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var motorRpm = data_.getFloat32(0, Endian.little);
var ledStatus = data_.getUint8(4);
var satcomStatus = data_.getUint8(5);
var servoStatus = MavlinkMessage.asUint8List(data_, 6, 8);
return AsluavStatus(
motorRpm: motorRpm,
ledStatus: ledStatus,
satcomStatus: satcomStatus,
servoStatus: servoStatus);
}