diff Small_CPU/Src/baseCPU2.c @ 942:06aaccaf2e02 Evo_2_23

Power down gnss module during dive: The gnss modul will now be send to powerdown at the start of the dive. After end of dive the module returns to normal operation. For development / test purpose a new simulated dive profile has been added.
author Ideenmodellierer
date Mon, 16 Dec 2024 19:09:00 +0100
parents 4a406e873a95
children e7f87ade3037
line wrap: on
line diff
--- a/Small_CPU/Src/baseCPU2.c	Mon Dec 16 19:06:37 2024 +0100
+++ b/Small_CPU/Src/baseCPU2.c	Mon Dec 16 19:09:00 2024 +0100
@@ -275,9 +275,7 @@
 #endif
 
     uint8_t extInterfaceActive = 0;
-#if defined ENABLE_GNSS_SUPPORT || defined ENABLE_GPIO_V2
     uint32_t shutdownTick = 0;
-#endif
 
 	HAL_Init();
 	SystemClock_Config();
@@ -462,6 +460,9 @@
             global.no_fly_time_minutes = 0;
             global.lifeData.dive_time_seconds = 0;
             global.lifeData.dive_time_seconds_without_surface_time = 0;
+
+            uartGnss_ReqPowerDown(1);
+
             scheduleDiveMode();
             // done now in scheduler prior to change mode: global.seconds_since_last_dive = 1;
 
@@ -487,6 +488,8 @@
 
             backup.no_fly_time_minutes = 0;
             backup.seconds_since_last_dive = 0;
+
+            uartGnss_ReqPowerDown(0);
 			break;
 
 		case MODE_SHUTDOWN: