Skip to content

Commit

Permalink
really use the nominal_throttle var instead of the define, warn if IN…
Browse files Browse the repository at this point in the history
…V_M is still defined
  • Loading branch information
flixr committed Apr 10, 2012
1 parent 2b4525f commit f8f9438
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sw/airborne/firmwares/rotorcraft/guidance/guidance_v.c
Expand Up @@ -48,6 +48,10 @@
#warning "ALL control gains are now positive!!!"
#endif

#if defined GUIDANCE_V_INV_M
#warning "GUIDANCE_V_INV_M has been removed. If you don't want to use adaptive hover, please define GUIDANCE_V_NOMINAL_HOVER_THROTTLE"
#endif

#define GUIDANCE_V_GAIN_SCALER 48

uint8_t guidance_v_mode;
Expand Down Expand Up @@ -271,7 +275,7 @@ __attribute__ ((always_inline)) static inline void run_hover_loop(bool_t in_flig

/* our nominal command : (g + zdd)*m */
#ifdef GUIDANCE_V_NOMINAL_HOVER_THROTTLE
const int32_t inv_m = BFP_OF_REAL(9.81/GUIDANCE_V_NOMINAL_HOVER_THROTTLE, FF_CMD_FRAC);
const int32_t inv_m = BFP_OF_REAL(9.81/guidance_v_nominal_throttle, FF_CMD_FRAC);
#else
const int32_t inv_m = gv_adapt_X>>(GV_ADAPT_X_FRAC - FF_CMD_FRAC);
#endif
Expand Down

0 comments on commit f8f9438

Please sign in to comment.