diff --git a/msg/ActionRequest.msg b/msg/ActionRequest.msg index 888814e0cc..4493708a86 100644 --- a/msg/ActionRequest.msg +++ b/msg/ActionRequest.msg @@ -11,7 +11,7 @@ uint8 ACTION_VTOL_TRANSITION_TO_MULTICOPTER = 6 uint8 ACTION_VTOL_TRANSITION_TO_FIXEDWING = 7 uint8 source # how the request was triggered -uint8 SOURCE_RC_STICK_GESTURE = 0 +uint8 SOURCE_MANUAL_CONTROL_GESTURE = 0 uint8 SOURCE_RC_SWITCH = 1 uint8 SOURCE_RC_BUTTON = 2 uint8 SOURCE_RC_MODE_SLOT = 3 diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 6b898d158d..5f69ee5ff5 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -1629,7 +1629,7 @@ void Commander::executeActionRequest(const action_request_s &action_request) // Silently ignore RC actions during RC calibration if (_vehicle_status.rc_calibration_in_progress - && (action_request.source == action_request_s::SOURCE_RC_STICK_GESTURE + && (action_request.source == action_request_s::SOURCE_MANUAL_CONTROL_GESTURE || action_request.source == action_request_s::SOURCE_RC_SWITCH || action_request.source == action_request_s::SOURCE_RC_BUTTON || action_request.source == action_request_s::SOURCE_RC_MODE_SLOT)) { @@ -1637,7 +1637,7 @@ void Commander::executeActionRequest(const action_request_s &action_request) } switch (action_request.source) { - case action_request_s::SOURCE_RC_STICK_GESTURE: arm_disarm_reason = arm_disarm_reason_t::rc_stick; break; + case action_request_s::SOURCE_MANUAL_CONTROL_GESTURE: arm_disarm_reason = arm_disarm_reason_t::rc_stick; break; case action_request_s::SOURCE_RC_SWITCH: arm_disarm_reason = arm_disarm_reason_t::rc_switch; break; diff --git a/src/modules/manual_control/ManualControl.cpp b/src/modules/manual_control/ManualControl.cpp index 7633a9d163..ecc932fd5c 100644 --- a/src/modules/manual_control/ManualControl.cpp +++ b/src/modules/manual_control/ManualControl.cpp @@ -356,7 +356,7 @@ void ManualControl::processStickArming(const manual_control_setpoint_s &input) _stick_arm_hysteresis.set_state_and_update(left_stick_lower_right && right_stick_centered, input.timestamp); if (_param_man_arm_gesture.get() && !previous_stick_arm_hysteresis && _stick_arm_hysteresis.get_state()) { - sendActionRequest(action_request_s::ACTION_ARM, action_request_s::SOURCE_RC_STICK_GESTURE); + sendActionRequest(action_request_s::ACTION_ARM, action_request_s::SOURCE_MANUAL_CONTROL_GESTURE); } // Disarm gesture @@ -366,7 +366,7 @@ void ManualControl::processStickArming(const manual_control_setpoint_s &input) _stick_disarm_hysteresis.set_state_and_update(left_stick_lower_left && right_stick_centered, input.timestamp); if (_param_man_arm_gesture.get() && !previous_stick_disarm_hysteresis && _stick_disarm_hysteresis.get_state()) { - sendActionRequest(action_request_s::ACTION_DISARM, action_request_s::SOURCE_RC_STICK_GESTURE); + sendActionRequest(action_request_s::ACTION_DISARM, action_request_s::SOURCE_MANUAL_CONTROL_GESTURE); } // Kill gesture @@ -377,7 +377,7 @@ void ManualControl::processStickArming(const manual_control_setpoint_s &input) _stick_kill_hysteresis.set_state_and_update(left_stick_lower_left && right_stick_lower_right, input.timestamp); if (!previous_stick_kill_hysteresis && _stick_kill_hysteresis.get_state()) { - sendActionRequest(action_request_s::ACTION_KILL, action_request_s::SOURCE_RC_STICK_GESTURE); + sendActionRequest(action_request_s::ACTION_KILL, action_request_s::SOURCE_MANUAL_CONTROL_GESTURE); } } }