commander: set home position on takeoff

instead of when arming and on takeoff.

It is set on the first takeoff or if there was a disarm event between the
last and the current takeoff.
This commit is contained in:
Beat Küng
2020-04-08 14:59:26 +02:00
committed by Julian Oes
parent 80f0892de5
commit 6b0a2649c0
2 changed files with 11 additions and 8 deletions
+1
View File
@@ -365,6 +365,7 @@ private:
bool _was_armed{false};
bool _failsafe_old{false}; ///< check which state machines for changes, clear "changed" flag
bool _have_taken_off_since_arming{false};
bool _should_set_home_on_takeoff{true};
bool _flight_termination_printed{false};
main_state_t _main_state_pre_offboard{commander_state_s::MAIN_STATE_MANUAL};