fix commander: set _was_landed before _land_detector topic update

Before _was_landed was set to the same value as the current
_land_detector.landed, thus outside of the update condition,
_was_landed && !_land_detector.landed could never be true.

This affects setting the home position, which is now set upon arming AND
upon takeoff.
This commit is contained in:
Beat Küng
2020-04-08 14:59:26 +02:00
committed by Julian Oes
parent aa6f9280e1
commit 80f0892de5
2 changed files with 3 additions and 5 deletions
-1
View File
@@ -362,7 +362,6 @@ private:
bool _status_changed{true};
bool _arm_tune_played{false};
bool _was_landed{true};
bool _was_falling{false};
bool _was_armed{false};
bool _failsafe_old{false}; ///< check which state machines for changes, clear "changed" flag
bool _have_taken_off_since_arming{false};