Manual control: rename SOURCE_RC_STICK_GESTURE to SOURCE_MANUAL_CONTROL_GESTURE

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2024-09-03 18:20:04 +02:00
parent 556a302a09
commit d967cdbb48
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+3 -3
View File
@@ -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);
}
}
}