RadioStatus.parse constructor
RadioStatus.parse(
- ByteData data_
Implementation
factory RadioStatus.parse(ByteData data_) {
if (data_.lengthInBytes < RadioStatus.mavlinkEncodedLength) {
var len = RadioStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var rxerrors = data_.getUint16(0, Endian.little);
var fixed = data_.getUint16(2, Endian.little);
var rssi = data_.getUint8(4);
var remrssi = data_.getUint8(5);
var txbuf = data_.getUint8(6);
var noise = data_.getUint8(7);
var remnoise = data_.getUint8(8);
return RadioStatus(
rxerrors: rxerrors,
fixed: fixed,
rssi: rssi,
remrssi: remrssi,
txbuf: txbuf,
noise: noise,
remnoise: remnoise);
}