manual_control_setpoint: change stick axes naming

In review it was requested to have a different name for
manual_control_setpoint.z because of the adjusted range.

I started to investigate what naming is most intuitive and found
that most people recognize the stick axes as roll, pitch, yaw, throttle.
It comes at no surprise because other autopilots
and APIs seem to share this convention.

While changing the code I realized that even within the code base
the axes are usually assigned to a variable with that name or
have comments next to the assignment clarifying the axes
using these names.
This commit is contained in:
Matthias Grob
2022-06-27 18:16:05 +02:00
parent 83246c84cf
commit 331cb21dee
20 changed files with 118 additions and 133 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.2f);
_is_throttle_low = (manual_control_setpoint.z < -0.8f);
_is_throttle_above_center = (manual_control_setpoint.throttle > 0.2f);
_is_throttle_low = (manual_control_setpoint.throttle < -0.8f);
if (_arm_state_machine.isArmed()) {
// Abort autonomous mode and switch to position mode if sticks are moved significantly