ParamSet.parse constructor
ParamSet.parse(
- ByteData data_
Implementation
factory ParamSet.parse(ByteData data_) {
if (data_.lengthInBytes < ParamSet.mavlinkEncodedLength) {
var len = ParamSet.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var paramValue = data_.getFloat32(0, Endian.little);
var targetSystem = data_.getUint8(4);
var targetComponent = data_.getUint8(5);
var paramId = MavlinkMessage.asInt8List(data_, 6, 16);
var paramType = data_.getUint8(22);
return ParamSet(
paramValue: paramValue,
targetSystem: targetSystem,
targetComponent: targetComponent,
paramId: paramId,
paramType: paramType);
}