QshotStatus.parse constructor
QshotStatus.parse(
- ByteData data_
Implementation
factory QshotStatus.parse(ByteData data_) {
if (data_.lengthInBytes < QshotStatus.mavlinkEncodedLength) {
var len = QshotStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var mode = data_.getUint16(0, Endian.little);
var shotState = data_.getUint16(2, Endian.little);
return QshotStatus(mode: mode, shotState: shotState);
}