mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 09:53:33 +08:00
ICE: allow throttle setpoint to be set to NAN to stop motor without disarming
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -55,6 +55,7 @@ public:
|
||||
internal_combustion_engine_control_s internal_combustion_engine_control;
|
||||
|
||||
// map [0, 1] to [-1, 1] which is the interface for non-motor PWM channels
|
||||
// NAN is mapped to disarmed
|
||||
if (_internal_combustion_engine_control_sub.update(&internal_combustion_engine_control)) {
|
||||
_data[0] = internal_combustion_engine_control.ignition_on * 2.f - 1.f;
|
||||
_data[1] = internal_combustion_engine_control.throttle_control * 2.f - 1.f;
|
||||
|
||||
Reference in New Issue
Block a user