diff Discovery/Src/data_exchange_main.c @ 734:190e5814b2f5

Removed interface selection from sensor menu: By implementing the automatic sensor detection the need for the manual selection has become obsulete. By removing the selection button space became available to insert the sensor information button which shows detailed data of DigO2 sensor.
author Ideenmodellierer
date Sun, 15 Jan 2023 21:51:54 +0100
parents 5143e927219f
children df0d43da1614
line wrap: on
line diff
--- a/Discovery/Src/data_exchange_main.c	Sun Jan 15 21:48:34 2023 +0100
+++ b/Discovery/Src/data_exchange_main.c	Sun Jan 15 21:51:54 2023 +0100
@@ -980,17 +980,20 @@
 					}
 				}
 			}
-			pStateReal->lifeData.extIf_sensor_Id = dataIn.data[(dataIn.boolADCO2Data && DATA_BUFFER_ADC)].externalInterface_SensorID;
-			if(pStateReal->lifeData.extIf_sensor_Id != 0)
-			{
-				memcpy(pStateReal->lifeData.extIf_sensor_data, dataIn.data[(dataIn.boolADCO2Data && DATA_BUFFER_ADC)].sensor_data, 32);
-			}
-			memcpy(pStateReal->lifeData.extIf_sensor_map, dataIn.data[(dataIn.boolADCO2Data && DATA_BUFFER_ADC)].sensor_map, EXT_INTERFACE_SENSOR_CNT);
 		}
 	}
 
 	if(pStateReal->data_old__lost_connection_to_slave == 0)
 	{
+
+		pStateReal->lifeData.extIf_sensor_Id = dataIn.data[(dataIn.boolADCO2Data && DATA_BUFFER_ADC)].externalInterface_SensorID;
+		if(pStateReal->lifeData.extIf_sensor_Id != 0)
+		{
+			memcpy(pStateReal->lifeData.extIf_sensor_data, dataIn.data[(dataIn.boolADCO2Data && DATA_BUFFER_ADC)].sensor_data, 32);
+		}
+		memcpy(pStateReal->lifeData.extIf_sensor_map, dataIn.data[(dataIn.boolADCO2Data && DATA_BUFFER_ADC)].sensor_map, EXT_INTERFACE_SENSOR_CNT);
+
+
 		meter = getSampleDepth(&dataIn, pStateReal);
 
 		pStateReal->pressure_uTick_old = pStateReal->pressure_uTick_new;