comparison Discovery/Src/logbook.c @ 955:9b29995d6619 Evo_2_23 tip

GNSS backup position: In the previous implementation a position had to be provided by the module in order to be stored in the log. This may cause a wrong position entry (default) in the log, for example if signal is lost while preparing for the dive in the water. To avoid this the last received position will be used for ~2 hours => Diver may take the dive side position before starting with the dive preparation. The last known position will be display in the GNSS position search window as well.
author Ideenmodellierer
date Wed, 01 Jan 2025 20:37:17 +0100
parents 6d8ae8fbccf5
children
comparison
equal deleted inserted replaced
954:4e4fbd73e329 955:9b29995d6619
1361 ext_flash_CloseSector(); /* this is just a repair function which invalidates a not used sector in case a log maintenance was called before dive */ 1361 ext_flash_CloseSector(); /* this is just a repair function which invalidates a not used sector in case a log maintenance was called before dive */
1362 bDiveMode = 3; 1362 bDiveMode = 3;
1363 1363
1364 #if defined ENABLE_GNSS_SUPPORT || defined ENABLE_GPIO_V2 1364 #if defined ENABLE_GNSS_SUPPORT || defined ENABLE_GPIO_V2
1365 pStateReal->events.gnssPositionUpdate = 1; 1365 pStateReal->events.gnssPositionUpdate = 1;
1366 pStateReal->events.info_gnssPosition = pStateReal->lifeData.gnssData.coord; 1366
1367 if((pStateReal->events.info_gnssPosition.fLat == 0.0) && (pStateReal->events.info_gnssPosition.fLon == 0.0)) /* no pos => define dummy */ 1367 if(pStateReal->lifeData.gnssData.alive & GNSS_ALIVE_BACKUP_POS)
1368 {
1369 pStateReal->events.info_gnssPosition = pStateReal->lifeData.gnssData.coord;
1370 }
1371 else /* no pos => define dummy */
1368 { 1372 {
1369 pStateReal->events.info_gnssPosition.fLon = 47.77; 1373 pStateReal->events.info_gnssPosition.fLon = 47.77;
1370 pStateReal->events.info_gnssPosition.fLat = 8.99; 1374 pStateReal->events.info_gnssPosition.fLat = 8.99;
1371 } 1375 }
1372 #endif 1376 #endif