# HG changeset patch # User ideenmodellierer # Date 1584994202 -3600 # Node ID adc4ccbebbb5e0bca8f02cb748ca14b1cf927445 # Parent f1257a32f2d492411a1e3487c8c85c039a0adf77 Added compile switch var firmware variant which does trust the memory log => does not check the log consistency at startu (used for test purpose) diff -r f1257a32f2d4 -r adc4ccbebbb5 Discovery/Src/base.c --- a/Discovery/Src/base.c Thu Mar 05 22:31:50 2020 +0100 +++ b/Discovery/Src/base.c Mon Mar 23 21:10:02 2020 +0100 @@ -435,9 +435,16 @@ GFX_logoAutoOff(); EXTILine_Buttons_Config(); +#ifdef TRUST_LOG_CONSISTENCY + if(!ext_dive_log_consistent()) /* only repair log if an invalid entry was detected */ + { + ext_flash_repair_dive_log(); + } + +#else /* always check and repair log */ ext_flash_repair_dive_log(); //ext_flash_repair_SPECIAL_dive_numbers_starting_count_with(1); - +#endif totalDiveCounterFound = logbook_lastDive_diveNumber(); if( settingsGetPointer()->totalDiveCounter < totalDiveCounterFound ) settingsGetPointer()->totalDiveCounter = totalDiveCounterFound;