mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 15:17:35 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user