mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 22:03:34 +08:00
Navigator: VTOL: disable weather vane during yaw aligning before front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Roman Bapst
parent
af0d63250c
commit
ab28f1e4f7
@@ -535,12 +535,14 @@ MulticopterPositionControl::run()
|
||||
if (_wv_controller != nullptr) {
|
||||
|
||||
// in manual mode we just want to use weathervane if position is controlled as well
|
||||
if (_wv_controller->weathervane_enabled() && (!_control_mode.flag_control_manual_enabled
|
||||
|| _control_mode.flag_control_position_enabled)) {
|
||||
_wv_controller->activate();
|
||||
// in mission, enabling wv is done in flight task
|
||||
if (_control_mode.flag_control_manual_enabled) {
|
||||
if (_control_mode.flag_control_position_enabled && _wv_controller->weathervane_enabled()) {
|
||||
_wv_controller->activate();
|
||||
|
||||
} else {
|
||||
_wv_controller->deactivate();
|
||||
} else {
|
||||
_wv_controller->deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
_wv_controller->update(matrix::Quatf(_att_sp.q_d), _states.yaw);
|
||||
|
||||
Reference in New Issue
Block a user