1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 22:35:19 +03:00

fix WP MSP regression from #6612

This commit is contained in:
Jonathan Hudson 2021-06-26 12:23:46 +01:00
parent 47f2468f0e
commit 9c6bd6a95f
5 changed files with 19 additions and 19 deletions

View file

@ -2876,13 +2876,13 @@ int getWaypointCount(void)
}
#ifdef NAV_NON_VOLATILE_WAYPOINT_STORAGE
bool loadNonVolatileWaypointList(void)
bool loadNonVolatileWaypointList(bool clearIfLoaded)
{
if (ARMING_FLAG(ARMED))
return false;
// if waypoints are already loaded, just unload them.
if (posControl.waypointCount > 0) {
// if forced and waypoints are already loaded, just unload them.
if (clearIfLoaded && posControl.waypointCount > 0) {
resetWaypointList();
return false;
}