mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 23:20:34 +08:00
Switch manual_control_setpoint.z scaling from [0,1] to [-1,1]
To be consistent with all other axes of stick input and avoid future rescaling confusion. Note: for the MAVLink message 69 MANUAL_CONTROL it's using the full range according to the message specs now [-1000,1000].
This commit is contained in:
@@ -2714,8 +2714,8 @@ void Commander::manualControlCheck()
|
||||
|
||||
if (manual_control_updated && manual_control_setpoint.valid) {
|
||||
|
||||
_is_throttle_above_center = (manual_control_setpoint.z > 0.6f);
|
||||
_is_throttle_low = (manual_control_setpoint.z < 0.1f);
|
||||
_is_throttle_above_center = (manual_control_setpoint.z > 0.2f);
|
||||
_is_throttle_low = (manual_control_setpoint.z < -0.8f);
|
||||
|
||||
if (_arm_state_machine.isArmed()) {
|
||||
// Abort autonomous mode and switch to position mode if sticks are moved significantly
|
||||
|
||||
Reference in New Issue
Block a user