NamedValueFloat.parse constructor
NamedValueFloat.parse(
- ByteData data_
Implementation
factory NamedValueFloat.parse(ByteData data_) {
if (data_.lengthInBytes < NamedValueFloat.mavlinkEncodedLength) {
var len = NamedValueFloat.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 value = data_.getFloat32(4, Endian.little);
var name = MavlinkMessage.asInt8List(data_, 8, 10);
return NamedValueFloat(timeBootMs: timeBootMs, value: value, name: name);
}