comparison Discovery/Src/logbook.c @ 427:b1091e183d52 ImprovmentNVM_2

Activated ringbuffer for settings: In previous versions the settings have always been writte to the ring start address causing additional ~200ms for sector erase. The settings are now continously written (~8ms). At shutdown the settings are written to ring start for compability reasons. In case of a reset the SW will scan the ringbuffer for the latest available block and restore it.
author ideenmodellierer
date Sun, 16 Feb 2020 22:04:52 +0100
parents 514e6269256f
children ee1434824c3f
comparison
equal deleted inserted replaced
426:514e6269256f 427:b1091e183d52
1185 pSettings->personalDiveCount++; 1185 pSettings->personalDiveCount++;
1186 if(pSettings->logbookOffset) 1186 if(pSettings->logbookOffset)
1187 { 1187 {
1188 pSettings->logbookOffset++; 1188 pSettings->logbookOffset++;
1189 } 1189 }
1190 ext_flash_write_settings(); 1190 ext_flash_write_settings(0);
1191 ext_flash_disable_protection_for_logbook(); 1191 ext_flash_disable_protection_for_logbook();
1192 1192
1193 ext_flash_CloseSector(); /* this is just a repair function which invalidates a not used sector in case a log maintenance was called before dive */ 1193 ext_flash_CloseSector(); /* this is just a repair function which invalidates a not used sector in case a log maintenance was called before dive */
1194 bDiveMode = 3; 1194 bDiveMode = 3;
1195 } 1195 }