Bläddra i källkod

Fixed alteration of config in ram that prevent appropriate save of positions once the maximum has been reached

tags/v1.2.0
Bertrand Lemasle 7 år sedan
förälder
incheckning
12aa8fbae9
1 ändrade filer med 4 tillägg och 2 borttagningar
  1. +4
    -2
      GpsTracker/Positions.cpp

+ 4
- 2
GpsTracker/Positions.cpp Visa fil

@@ -139,9 +139,11 @@ namespace positions {

uint16_t count(uint16_t fromIndex) {
config_t *config = &config::main::value;
if (config->lastEntry < config->firstEntry) { config->lastEntry += details::maxEntryIndex; }
uint16_t lastEntry = config->lastEntry;

return config->lastEntry - fromIndex;
if (lastEntry < config->firstEntry) { lastEntry += details::maxEntryIndex; }

return lastEntry - fromIndex;
}

void prepareBackup() {


Laddar…
Avbryt
Spara