fixed optimal recovery condition

This commit is contained in:
Andreas Antener
2016-08-10 22:47:26 +02:00
parent 853a5b77fd
commit 5eaf104318
@@ -2022,7 +2022,7 @@ MulticopterPositionControl::task_main()
/* control roll and pitch directly if no aiding velocity controller is active
* and only if optimal recovery is not used */
if (!_control_mode.flag_control_velocity_enabled
&& !_params.opt_recover > 0) {
&& _params.opt_recover <= 0) {
math::Matrix<3, 3> R_sp;
_att_sp.roll_body = _manual.y * _params.man_roll_max;
_att_sp.pitch_body = -_manual.x * _params.man_pitch_max;