comparison Discovery/Src/logbook.c @ 1027:158100a84ebd GasConsumption

New profile feature: In the past the OSTC provide just one instance for settings. If for example a diver switched from OC to CCR configuration several settings had to be modified. To improve this and to be more flexible in adapting the OSTC to differend dive scenarions the usage of up to 4 profiles has beem introduced. The profiles are copies of the common settings but stored in a separate, previously not used, flash section => no impact to existings settings handling. For access to the profiles the existing setting flash functions are reused. To enable this a parameter war introduced which defines the target of the operation (common settings or profiles).
author Ideenmodellierer
date Sun, 07 Sep 2025 19:03:44 +0200
parents b0d3e8b84966
children
comparison
equal deleted inserted replaced
1026:5fedf7ba2392 1027:158100a84ebd
1424 pSettings->personalDiveCount++; 1424 pSettings->personalDiveCount++;
1425 if(pSettings->logbookOffset) 1425 if(pSettings->logbookOffset)
1426 { 1426 {
1427 pSettings->logbookOffset++; 1427 pSettings->logbookOffset++;
1428 } 1428 }
1429 ext_flash_write_settings(0); 1429 ext_flash_write_settings(EF_SETTINGS,0);
1430 ext_flash_disable_protection_for_logbook(); 1430 ext_flash_disable_protection_for_logbook();
1431 1431
1432 ext_flash_CloseSector(); /* this is just a repair function which invalidates a not used sector in case a log maintenance was called before dive */ 1432 ext_flash_CloseSector(); /* this is just a repair function which invalidates a not used sector in case a log maintenance was called before dive */
1433 bDiveMode = 3; 1433 bDiveMode = 3;
1434 1434