comparison Discovery/Src/logbook.c @ 1058:3c73180fde1d Icon_Integration tip

Added log entry for surface GF: The surface GF has been added to the logbook data. A function records the GF which is present while entering close to surface condition for later storage. This is needed to avoid that an already decreased GF (after dive mode exit time) GF is stored. The surface GF is shown at logbook page1 and is available in the header data for external logbook services.
author Ideenmodellierer
date Sat, 10 Jan 2026 19:53:01 +0100
parents 158100a84ebd
children
comparison
equal deleted inserted replaced
1057:24c1e3367a2e 1058:3c73180fde1d
267 if(pInfo->diveSettings.deco_type.ub.standard == GF_MODE) 267 if(pInfo->diveSettings.deco_type.ub.standard == GF_MODE)
268 { 268 {
269 gheader.decoModel = 1; 269 gheader.decoModel = 1;
270 gheader.gfLow_or_Vpm_conservatism = pInfo->diveSettings.gf_low; 270 gheader.gfLow_or_Vpm_conservatism = pInfo->diveSettings.gf_low;
271 gheader.gfHigh = pInfo->diveSettings.gf_high; 271 gheader.gfHigh = pInfo->diveSettings.gf_high;
272 gheader.gfAtEnd = 0x0FF;
272 } 273 }
273 else 274 else
274 { 275 {
275 gheader.decoModel = 2; 276 gheader.decoModel = 2;
276 gheader.gfLow_or_Vpm_conservatism = pInfo->diveSettings.vpm_conservatism; 277 gheader.gfLow_or_Vpm_conservatism = pInfo->diveSettings.vpm_conservatism;
1466 } 1467 }
1467 else 1468 else
1468 { 1469 {
1469 gheader.batteryCharge = 0.0; 1470 gheader.batteryCharge = 0.0;
1470 } 1471 }
1472 if(pStateReal->diveSettings.deco_type.ub.standard == GF_MODE)
1473 {
1474 gheader.gfAtEnd = pStateReal->lifeData.gf_surf_log;
1475 }
1476 else
1477 {
1478 gheader.gfAtEnd = 0;
1479 }
1471 logbook_EndDive(); 1480 logbook_EndDive();
1472 bDiveMode = 0; 1481 bDiveMode = 0;
1473 } else 1482 } else
1474 { 1483 {
1475 ext_flash_enable_protection(); 1484 ext_flash_enable_protection();