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
2022-11-28 19:25:55 +01:00
parent 5579e319ff
commit 83246c84cf
13 changed files with 38 additions and 52 deletions
@@ -93,7 +93,7 @@ AirshipAttitudeControl::publish_actuator_controls()
_actuator_controls.control[0] = 0.0f;
_actuator_controls.control[1] = _manual_control_setpoint.x;
_actuator_controls.control[2] = _manual_control_setpoint.r;
_actuator_controls.control[3] = _manual_control_setpoint.z;
_actuator_controls.control[3] = (_manual_control_setpoint.z + 1.f) * .5f;
}
// note: _actuator_controls.timestamp_sample is set in AirshipAttitudeControl::Run()