diff Discovery/Src/data_exchange_main.c @ 899:2225c467f1e9 Evo_2_23

Added data path and visualization for position data: The GNSS data exchange is now initialized and triggered on a cyclic basis (once a second). RTE verion has been increased because of interface change. For now only the position data is shown in a T7 surface views. The functionality may be switched on/off using the compile switch ENABLE_GNSS.
author Ideenmodellierer
date Mon, 30 Sep 2024 21:56:05 +0200
parents c3dd461ca3f9
children 46a21ff3f5ab
line wrap: on
line diff
--- a/Discovery/Src/data_exchange_main.c	Thu Sep 26 18:40:41 2024 +0200
+++ b/Discovery/Src/data_exchange_main.c	Mon Sep 30 21:56:05 2024 +0200
@@ -479,16 +479,16 @@
 	if(decoLock == DECO_CALC_running)
         return;
 
-		if(decoLock == DECO_CALC_init_as_is_start_of_dive)
-		{
+	if(decoLock == DECO_CALC_init_as_is_start_of_dive)
+	{
 	    vpm_init(&stateUsedWrite->vpm,  stateUsedWrite->diveSettings.vpm_conservatism, 0, 0);
 	    buehlmann_init();
 	    timer_init();
 	    resetEvents(stateUsedWrite);
 	    stateUsedWrite->diveSettings.internal__pressure_first_stop_ambient_bar_as_upper_limit_for_gf_low_otherwise_zero = 0;
-		}
+	}
 
-		if(decoLock == DECO_CALC_FINSHED_Buehlmann)
+	if(decoLock == DECO_CALC_FINSHED_Buehlmann)
     {
 
     }
@@ -530,6 +530,7 @@
     //Copy Inputdata from stateReal to stateDeco
     memcpy(&stateDeco.lifeData,&stateUsedWrite->lifeData,sizeof(SLifeData));
     memcpy(&stateDeco.diveSettings,&stateUsedWrite->diveSettings,sizeof(SDiveSettings));
+    memcpy(&stateDeco.decolistVPM,&stateUsedWrite->decolistVPM,sizeof(SDecoinfo));
 
     stateDeco.vpm.deco_zone_reached = stateUsedWrite->vpm.deco_zone_reached;
     // memcpy(&stateDeco.vpm,&pStateUsed->vpm,sizeof(SVpm));
@@ -540,7 +541,7 @@
         stateDeco.vpm.adjusted_critical_radius_he[i] = stateUsedWrite->vpm.adjusted_critical_radius_he[i];
         stateDeco.vpm.adjusted_critical_radius_n2[i] = stateUsedWrite->vpm.adjusted_critical_radius_n2[i];
     }
-		decoLock = DECO_CALC_ready;
+	decoLock = DECO_CALC_ready;
 }
 
 
@@ -1006,6 +1007,9 @@
 	
 		pStateReal->lifeData.dateBinaryFormat = dataIn.data[dataIn.boolTimeData].localtime_rtc_dr;
 		pStateReal->lifeData.timeBinaryFormat = dataIn.data[dataIn.boolTimeData].localtime_rtc_tr;
+
+		pStateReal->lifeData.gnssPosition.Latitude = dataIn.data[0].fLat;
+		pStateReal->lifeData.gnssPosition.Longitude = dataIn.data[0].fLon;
 	}
 
 	if(pStateReal->data_old__lost_connection_to_slave == 0)