WheelDistance.parse constructor
WheelDistance.parse(
- ByteData data_
Implementation
factory WheelDistance.parse(ByteData data_) {
if (data_.lengthInBytes < WheelDistance.mavlinkEncodedLength) {
var len = WheelDistance.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var timeUsec = data_.getUint64(0, Endian.little);
var distance = MavlinkMessage.asFloat64List(data_, 8, 16);
var count = data_.getUint8(136);
return WheelDistance(timeUsec: timeUsec, distance: distance, count: count);
}