Преглед на файлове

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 години
родител
ревизия
12aa8fbae9
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. +4
    -2
      GpsTracker/Positions.cpp

+ 4
- 2
GpsTracker/Positions.cpp Целия файл

@@ -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() {


Зареждане…
Отказ
Запис