Navigator: make weather vane work in all auto modes, not just mission (#13761)

- rename of flag in position sp: from allow_weather_vane to disable_weather_vane
 - flag now doesn't have to be set for all auto modes, meaning that weather vane is also active outside of mission
 - flag is set before front transition to align with wp, and unset after alignment is over

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2019-12-28 12:13:15 -05:00
committed by Daniel Agar
parent 89e1f478ac
commit 574b482fdb
3 changed files with 7 additions and 7 deletions
@@ -238,7 +238,7 @@ bool FlightTaskAuto::_evaluateTriplets()
if (_ext_yaw_handler != nullptr) {
// activation/deactivation of weather vane is based on parameter WV_EN and setting of navigator (allow_weather_vane)
(_param_wv_en.get() && _sub_triplet_setpoint.get().current.allow_weather_vane) ? _ext_yaw_handler->activate() :
(_param_wv_en.get() && !_sub_triplet_setpoint.get().current.disable_weather_vane) ? _ext_yaw_handler->activate() :
_ext_yaw_handler->deactivate();
}