diff Discovery/Src/base.c @ 1037:2af07aa38531 GasConsumption

Merge with external development branches: Some features have been prepared for integration: Profiles, DMA UART on Firmware part, Bluetooth discovery and messges logging for development phase. All these new function are deactivated by compile switch and may be activated using the configuration.h for testing purpose.
author Ideenmodellierer
date Mon, 15 Sep 2025 21:12:44 +0200
parents 3d9552e4997c 5865f0aeb438
children 7efc8baa3ffa
line wrap: on
line diff
--- a/Discovery/Src/base.c	Sun Sep 07 20:44:35 2025 +0200
+++ b/Discovery/Src/base.c	Mon Sep 15 21:12:44 2025 +0200
@@ -237,12 +237,17 @@
 #include "t7.h"
 #include "t3.h"
 #include "tMenuEditSetpoint.h"
+#include "cv_heartbeat.h"
+#include "tInfoLogger.h"
 
 #ifdef DEMOMODE
 #include "demo.h"
 static void TIM_DEMO_init(void);
 #endif
 
+#ifdef ENABLE_USART_RADIO
+#include "demo.h"
+#endif
 
 //#include "lodepng.h"
 //#include <stdlib.h> // for malloc and free
@@ -501,6 +506,7 @@
             resetToFirmwareUpdate();
 
         tCCR_control();
+
         if( tComm_control() )// will stop while loop if tComm Mode started until exit from UART
         {
             createDiveSettings();
@@ -526,12 +532,22 @@
         {
         	TriggerButtonAction();
         }
+#ifdef ENABLE_PULSE_SENSOR_BT
+        cv_heartbeat_HandleData();
+#endif
+
+#ifdef ENABLE_USART_RADIO
+        demo_HandleData();
+#endif
         if(DoHousekeeping)
         {
            	DoHousekeeping = housekeepingFrame();
         }
         if(DoDisplayRefresh)							/* set every 100ms by timer interrupt */
         {
+#ifdef ENABLE_PULSE_SENSOR_BT
+        	cv_heartbeat_Control();
+#endif
 	        DoDisplayRefresh = 0;
 
 	        updateSetpointStateUsed();
@@ -727,6 +743,15 @@
 {
 	SStateList status;
 	get_globalStateList(&status);
+
+#ifdef ENABLE_LOGGER_WINDOW
+	if((status.base != 0) && (get_globalState() != StILOGGER) && (InfoLogger_isUpdated()))
+	{
+		openInfo_Logger();
+		get_globalStateList(&status);
+	}
+#endif
+
 	switch(status.base)
 	{
 	case BaseHome:
@@ -919,6 +944,8 @@
 								break;
 							case InfoPagePreDive: 	sendActionToInfoPreDive(action);
 								break;
+							case InfoPageLogger: 	exitInfo();
+								break;
 							default:				sendActionToInfo(action);
 								break;
 						}