ScaledPressure3.parse constructor
ScaledPressure3.parse(
- ByteData data_
Implementation
factory ScaledPressure3.parse(ByteData data_) {
if (data_.lengthInBytes < ScaledPressure3.mavlinkEncodedLength) {
var len = ScaledPressure3.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 pressAbs = data_.getFloat32(4, Endian.little);
var pressDiff = data_.getFloat32(8, Endian.little);
var temperature = data_.getInt16(12, Endian.little);
var temperaturePressDiff = data_.getInt16(14, Endian.little);
return ScaledPressure3(
timeBootMs: timeBootMs,
pressAbs: pressAbs,
pressDiff: pressDiff,
temperature: temperature,
temperaturePressDiff: temperaturePressDiff);
}