added define NO_RC_THRUST_LIMIT to switch off the default behaviour of limiting max throttle with RC

This commit is contained in:
Felix Ruess
2011-11-28 20:38:55 +01:00
parent 7bfcf559d0
commit 87905f83d7
@@ -192,8 +192,10 @@ void guidance_v_run(bool_t in_flight) {
#endif
gv_update_ref_from_zd_sp(guidance_v_zd_sp);
run_hover_loop(in_flight);
#if !NO_RC_THRUST_LIMIT
// saturate max authority with RC stick
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
#endif
break;
case GUIDANCE_V_MODE_HOVER:
@@ -203,8 +205,10 @@ void guidance_v_run(bool_t in_flight) {
#endif
gv_update_ref_from_z_sp(guidance_v_z_sp);
run_hover_loop(in_flight);
#if !NO_RC_THRUST_LIMIT
// saturate max authority with RC stick
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
#endif
break;
case GUIDANCE_V_MODE_NAV:
@@ -224,11 +228,13 @@ void guidance_v_run(bool_t in_flight) {
guidance_v_z_sp = -nav_flight_altitude; // For display only
guidance_v_delta_t = nav_throttle;
}
#if !NO_RC_THRUST_LIMIT
/* use rc limitation if available */
if (radio_control.status == RC_OK)
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
else
stabilization_cmd[COMMAND_THRUST] = guidance_v_delta_t;
#endif
break;
}
default: