comparison Discovery/Src/base.c @ 447:adc4ccbebbb5 minor_improvments

Added compile switch var firmware variant which does trust the memory log => does not check the log consistency at startu (used for test purpose)
author ideenmodellierer
date Mon, 23 Mar 2020 21:10:02 +0100
parents f1257a32f2d4
children 19cff811616d
comparison
equal deleted inserted replaced
446:f1257a32f2d4 447:adc4ccbebbb5
433 tCCR_init(); 433 tCCR_init();
434 434
435 GFX_logoAutoOff(); 435 GFX_logoAutoOff();
436 EXTILine_Buttons_Config(); 436 EXTILine_Buttons_Config();
437 437
438 #ifdef TRUST_LOG_CONSISTENCY
439 if(!ext_dive_log_consistent()) /* only repair log if an invalid entry was detected */
440 {
441 ext_flash_repair_dive_log();
442 }
443
444 #else /* always check and repair log */
438 ext_flash_repair_dive_log(); 445 ext_flash_repair_dive_log();
439 //ext_flash_repair_SPECIAL_dive_numbers_starting_count_with(1); 446 //ext_flash_repair_SPECIAL_dive_numbers_starting_count_with(1);
440 447 #endif
441 totalDiveCounterFound = logbook_lastDive_diveNumber(); 448 totalDiveCounterFound = logbook_lastDive_diveNumber();
442 if( settingsGetPointer()->totalDiveCounter < totalDiveCounterFound ) 449 if( settingsGetPointer()->totalDiveCounter < totalDiveCounterFound )
443 settingsGetPointer()->totalDiveCounter = totalDiveCounterFound; 450 settingsGetPointer()->totalDiveCounter = totalDiveCounterFound;
444 451
445 if( settingsGetPointer()->debugModeOnStart ) 452 if( settingsGetPointer()->debugModeOnStart )