SetVelocityLimits.parse constructor
SetVelocityLimits.parse(
- ByteData data_
Implementation
factory SetVelocityLimits.parse(ByteData data_) {
if (data_.lengthInBytes < SetVelocityLimits.mavlinkEncodedLength) {
var len = SetVelocityLimits.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var horizontalSpeedLimit = data_.getFloat32(0, Endian.little);
var verticalSpeedLimit = data_.getFloat32(4, Endian.little);
var yawRateLimit = data_.getFloat32(8, Endian.little);
var targetSystem = data_.getUint8(12);
var targetComponent = data_.getUint8(13);
return SetVelocityLimits(
horizontalSpeedLimit: horizontalSpeedLimit,
verticalSpeedLimit: verticalSpeedLimit,
yawRateLimit: yawRateLimit,
targetSystem: targetSystem,
targetComponent: targetComponent);
}