diff Small_CPU/Src/scheduler.c @ 786:19ab6f3ed52a

Cleanup sensor data interface: In a very early implementation of the multiplexer the address of the mux was 0 followed by the sensors. As a resul the ID of the channels was shifted by one. To avoid confusion and because the mux address is meanwhile changed to the last address, it makes sense to return to the indexing where only the three visible sensor slots are used as reference (0,1,2).
author Ideenmodellierer
date Sun, 04 Jun 2023 21:54:24 +0200
parents e40790a67165
children bb37d4f3e50e
line wrap: on
line diff
--- a/Small_CPU/Src/scheduler.c	Wed May 31 08:44:07 2023 +0200
+++ b/Small_CPU/Src/scheduler.c	Sun Jun 04 21:54:24 2023 +0200
@@ -1735,7 +1735,7 @@
 		value = getExternalInterfaceChannel(channel);
 		global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].extADC_voltage[channel] = value;
 	}
-	global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].externalInterface_SensorID = externalInterface_GetSensorData(0, (uint8_t*)&global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_data);
+	global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].externalInterface_SensorID = externalInterface_GetSensorData(0xFF, (uint8_t*)&global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_data);
 	memcpy(global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_map,externalInterface_GetSensorMapPointer(1),EXT_INTERFACE_SENSOR_CNT);
 	global.dataSendToMaster.boolADCO2Data |= boolADCBuffer;
 }