diff --git a/msg/VehicleThrustSetpoint.msg b/msg/VehicleThrustSetpoint.msg index 444ee50032b..36693d55540 100644 --- a/msg/VehicleThrustSetpoint.msg +++ b/msg/VehicleThrustSetpoint.msg @@ -1,8 +1,11 @@ +# Vehicle thrust setpoint +# +# This is the thrust setpoint provided by the controller and fed into the control allocator. -uint64 timestamp # time since system start (microseconds) -uint64 timestamp_sample # timestamp of the data sample on which this message is based (microseconds) +uint64 timestamp # [us] Time since system start +uint64 timestamp_sample # [us] Timestamp of the data sample on which this message is based -float32[3] xyz # thrust setpoint along X, Y, Z body axis [-1, 1] +float32[3] xyz # [-] [@range -1, 1] Thrust setpoint along X, Y, Z body axis. If set to NAN the motors affecting this axis are stopped. # TOPICS vehicle_thrust_setpoint # TOPICS vehicle_thrust_setpoint_virtual_fw vehicle_thrust_setpoint_virtual_mc diff --git a/src/modules/land_detector/MulticopterLandDetector.cpp b/src/modules/land_detector/MulticopterLandDetector.cpp index dfccc351632..05497134236 100644 --- a/src/modules/land_detector/MulticopterLandDetector.cpp +++ b/src/modules/land_detector/MulticopterLandDetector.cpp @@ -89,7 +89,7 @@ void MulticopterLandDetector::_update_topics() vehicle_thrust_setpoint_s vehicle_thrust_setpoint; if (_vehicle_thrust_setpoint_sub.update(&vehicle_thrust_setpoint)) { - _vehicle_thrust_setpoint_throttle = -vehicle_thrust_setpoint.xyz[2]; + _vehicle_thrust_setpoint_throttle = PX4_ISFINITE(vehicle_thrust_setpoint.xyz[2]) ? -vehicle_thrust_setpoint.xyz[2] : 0.f; _vehicle_thrust_setpoint_last_update = hrt_absolute_time(); }