VelocityLimits.parse constructor
VelocityLimits.parse(
- ByteData data_
Implementation
factory VelocityLimits.parse(ByteData data_) {
if (data_.lengthInBytes < VelocityLimits.mavlinkEncodedLength) {
var len = VelocityLimits.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);
return VelocityLimits(
horizontalSpeedLimit: horizontalSpeedLimit,
verticalSpeedLimit: verticalSpeedLimit,
yawRateLimit: yawRateLimit);
}