mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
fix NO_RC_THRUST_LIMIT
This commit is contained in:
@@ -192,7 +192,9 @@ void guidance_v_run(bool_t in_flight) {
|
|||||||
#endif
|
#endif
|
||||||
gv_update_ref_from_zd_sp(guidance_v_zd_sp);
|
gv_update_ref_from_zd_sp(guidance_v_zd_sp);
|
||||||
run_hover_loop(in_flight);
|
run_hover_loop(in_flight);
|
||||||
#if !NO_RC_THRUST_LIMIT
|
#if NO_RC_THRUST_LIMIT
|
||||||
|
stabilization_cmd[COMMAND_THRUST] = guidance_v_delta_t;
|
||||||
|
#else
|
||||||
// saturate max authority with RC stick
|
// saturate max authority with RC stick
|
||||||
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
|
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
|
||||||
#endif
|
#endif
|
||||||
@@ -205,7 +207,9 @@ void guidance_v_run(bool_t in_flight) {
|
|||||||
#endif
|
#endif
|
||||||
gv_update_ref_from_z_sp(guidance_v_z_sp);
|
gv_update_ref_from_z_sp(guidance_v_z_sp);
|
||||||
run_hover_loop(in_flight);
|
run_hover_loop(in_flight);
|
||||||
#if !NO_RC_THRUST_LIMIT
|
#if NO_RC_THRUST_LIMIT
|
||||||
|
stabilization_cmd[COMMAND_THRUST] = guidance_v_delta_t;
|
||||||
|
#else
|
||||||
// saturate max authority with RC stick
|
// saturate max authority with RC stick
|
||||||
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
|
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
|
||||||
#endif
|
#endif
|
||||||
@@ -228,7 +232,9 @@ void guidance_v_run(bool_t in_flight) {
|
|||||||
guidance_v_z_sp = -nav_flight_altitude; // For display only
|
guidance_v_z_sp = -nav_flight_altitude; // For display only
|
||||||
guidance_v_delta_t = nav_throttle;
|
guidance_v_delta_t = nav_throttle;
|
||||||
}
|
}
|
||||||
#if !NO_RC_THRUST_LIMIT
|
#if NO_RC_THRUST_LIMIT
|
||||||
|
stabilization_cmd[COMMAND_THRUST] = guidance_v_delta_t;
|
||||||
|
#else
|
||||||
/* use rc limitation if available */
|
/* use rc limitation if available */
|
||||||
if (radio_control.status == RC_OK)
|
if (radio_control.status == RC_OK)
|
||||||
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
|
stabilization_cmd[COMMAND_THRUST] = Min( guidance_v_rc_delta_t, guidance_v_delta_t);
|
||||||
|
|||||||
Reference in New Issue
Block a user