AvssDroneOperationMode.parse constructor
AvssDroneOperationMode.parse(
- ByteData data_
Implementation
factory AvssDroneOperationMode.parse(ByteData data_) {
if (data_.lengthInBytes < AvssDroneOperationMode.mavlinkEncodedLength) {
var len =
AvssDroneOperationMode.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 m300OperationMode = data_.getUint8(4);
var horseflyOperationMode = data_.getUint8(5);
return AvssDroneOperationMode(
timeBootMs: timeBootMs,
m300OperationMode: m300OperationMode,
horseflyOperationMode: horseflyOperationMode);
}