shortened rc_assisted_th to rc_assist_th in case we add a dedicated switch mapping later

This commit is contained in:
TickTock- 2014-04-29 20:51:04 -07:00
parent ef75bbf2ef
commit 6c76e8ea50
3 changed files with 13 additions and 13 deletions

View File

@ -1145,7 +1145,7 @@ int commander_thread_main(int argc, char *argv[])
/* arm/disarm by RC */
res = TRANSITION_NOT_CHANGED;
/* check if left stick is in lower left position and we are in MANUAL or AUTO_READY mode or (ASSISTED mode and landed) -> disarm
/* check if left stick is in lower left position and we are in MANUAL or AUTO_READY mode or (ASSIST mode and landed) -> disarm
* do it only for rotary wings */
if (status.is_rotary_wing &&
(status.arming_state == ARMING_STATE_ARMED || status.arming_state == ARMING_STATE_ARMED_ERROR) &&
@ -1299,7 +1299,7 @@ int commander_thread_main(int argc, char *argv[])
}
// TODO remove this hack
/* flight termination in manual mode if assisted switch is on posctrl position */
/* flight termination in manual mode if assist switch is on posctrl position */
if (!status.is_rotary_wing && parachute_enabled && armed.armed && status.main_state == MAIN_STATE_MANUAL && sp_man.posctrl_switch == SWITCH_POS_ON) {
if (TRANSITION_CHANGED == failsafe_state_transition(&status, FAILSAFE_STATE_TERMINATION)) {
tune_positive(armed.armed);
@ -1556,7 +1556,7 @@ set_main_state_rc(struct vehicle_status_s *status, struct manual_control_setpoin
// TRANSITION_DENIED is not possible here
break;
case SWITCH_POS_MIDDLE: // ASSISTED
case SWITCH_POS_MIDDLE: // ASSIST
if (sp_man->posctrl_switch == SWITCH_POS_ON) {
res = main_state_transition(status, MAIN_STATE_POSCTRL);

View File

@ -671,7 +671,7 @@ PARAM_DEFINE_INT32(RC_MAP_AUX3, 0);
PARAM_DEFINE_INT32(RC_FAILS_THR, 0);
/**
* Threshold for selecting assisted mode
* Threshold for selecting assist mode
*
* min:-1
* max:+1
@ -684,7 +684,7 @@ PARAM_DEFINE_INT32(RC_FAILS_THR, 0);
* negative : true when channel<th
*
*/
PARAM_DEFINE_FLOAT(RC_ASSISTED_TH, 0.25f);
PARAM_DEFINE_FLOAT(RC_ASSIST_TH, 0.25f);
/**
* Threshold for selecting auto mode

View File

@ -269,12 +269,12 @@ private:
int rc_map_aux5;
int32_t rc_fails_thr;
float rc_assisted_th;
float rc_assist_th;
float rc_auto_th;
float rc_posctrl_th;
float rc_return_th;
float rc_loiter_th;
bool rc_assisted_inv;
bool rc_assist_inv;
bool rc_auto_inv;
bool rc_posctrl_inv;
bool rc_return_inv;
@ -323,7 +323,7 @@ private:
param_t rc_map_aux5;
param_t rc_fails_thr;
param_t rc_assisted_th;
param_t rc_assist_th;
param_t rc_auto_th;
param_t rc_posctrl_th;
param_t rc_return_th;
@ -539,7 +539,7 @@ Sensors::Sensors() :
/* RC thresholds */
_parameter_handles.rc_fails_thr = param_find("RC_FAILS_THR");
_parameter_handles.rc_assisted_th = param_find("RC_ASSISTED_TH");
_parameter_handles.rc_assist_th = param_find("RC_ASSIST_TH");
_parameter_handles.rc_auto_th = param_find("RC_AUTO_TH");
_parameter_handles.rc_posctrl_th = param_find("RC_POSCTRL_TH");
_parameter_handles.rc_return_th = param_find("RC_RETURN_TH");
@ -700,9 +700,9 @@ Sensors::parameters_update()
param_get(_parameter_handles.rc_map_aux4, &(_parameters.rc_map_aux4));
param_get(_parameter_handles.rc_map_aux5, &(_parameters.rc_map_aux5));
param_get(_parameter_handles.rc_fails_thr, &(_parameters.rc_fails_thr));
param_get(_parameter_handles.rc_assisted_th, &(_parameters.rc_assisted_th));
_parameters.rc_assisted_inv = (_parameters.rc_assisted_th<0);
_parameters.rc_assisted_th = fabs(_parameters.rc_assisted_th);
param_get(_parameter_handles.rc_assist_th, &(_parameters.rc_assist_th));
_parameters.rc_assist_inv = (_parameters.rc_assist_th<0);
_parameters.rc_assist_th = fabs(_parameters.rc_assist_th);
param_get(_parameter_handles.rc_auto_th, &(_parameters.rc_auto_th));
_parameters.rc_auto_inv = (_parameters.rc_auto_th<0);
_parameters.rc_auto_th = fabs(_parameters.rc_auto_th);
@ -1477,7 +1477,7 @@ Sensors::rc_poll()
manual.aux5 = get_rc_value(AUX_5, -1.0, 1.0);
/* mode switches */
manual.mode_switch = get_rc_sw3pos_position(MODE, _parameters.rc_auto_th, _parameters.rc_auto_inv, _parameters.rc_assisted_th, _parameters.rc_assisted_inv);
manual.mode_switch = get_rc_sw3pos_position(MODE, _parameters.rc_auto_th, _parameters.rc_auto_inv, _parameters.rc_assist_th, _parameters.rc_assist_inv);
manual.posctrl_switch = get_rc_sw2pos_position(POSCTRL, _parameters.rc_posctrl_th, _parameters.rc_posctrl_inv);
manual.return_switch = get_rc_sw2pos_position(RETURN, _parameters.rc_return_th, _parameters.rc_return_inv);
manual.loiter_switch = get_rc_sw2pos_position(LOITER, _parameters.rc_loiter_th, _parameters.rc_loiter_inv);