vtol_att_control: reset transition timer states when starting a transition

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2022-12-16 11:36:00 +03:00
committed by Roman Bapst
parent 84c5ce3a53
commit ffdf186598
4 changed files with 17 additions and 7 deletions
+2 -2
View File
@@ -94,8 +94,8 @@ void Standard::update_vtol_state()
} else if (_vtol_mode == vtol_mode::FW_MODE) {
// Regular backtransition
resetTransitionTimer();
_vtol_mode = vtol_mode::TRANSITION_TO_MC;
_transition_start_timestamp = hrt_absolute_time();
_reverse_output = _param_vt_b_rev_out.get();
} else if (_vtol_mode == vtol_mode::TRANSITION_TO_FW) {
@@ -131,8 +131,8 @@ void Standard::update_vtol_state()
// start transition to fw mode
/* NOTE: The failsafe transition to fixed-wing was removed because it can result in an
* unsafe flying state. */
resetTransitionTimer();
_vtol_mode = vtol_mode::TRANSITION_TO_FW;
_transition_start_timestamp = hrt_absolute_time();
} else if (_vtol_mode == vtol_mode::FW_MODE) {
// in fw mode