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:
Matthias Grob
2020-10-12 20:03:31 +02:00
parent 5579e319ff
commit 83246c84cf
13 changed files with 38 additions and 52 deletions
+2 -2
View File
@@ -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