Skip to content

Commit

Permalink
Plane: set nav_controller stale on mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub committed Nov 21, 2023
1 parent 1e53d5d commit 786d06f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ArduPlane/mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ bool Mode::enter()
plane.adsb.set_is_auto_mode(does_auto_navigation());
#endif

// set the nav controller stale AFTER _enter() so that we can check if we're currently in a loiter during the mode change
plane.nav_controller->set_data_is_stale();

// reset steering integrator on mode change
plane.steerController.reset_I();

Expand Down

0 comments on commit 786d06f

Please sign in to comment.