comparison Small_CPU/Src/scheduler.c @ 731:2a801cfe23ab

Improvment sensor Autodetection: The sensor type optical has been introduce to enable the OSTC to completly switch of the external interface (voltage + ADC operation) The optical interface is handled via firmware. In addition some states have been added to reset the external power supply and to provide the ADC more time to do its conversation.
author Ideenmodellierer
date Sun, 15 Jan 2023 21:43:33 +0100
parents d646a0f724a7
children e23fe82cbf8c
comparison
equal deleted inserted replaced
730:9c65d226f4f6 731:2a801cfe23ab
1734 { 1734 {
1735 value = getExternalInterfaceChannel(channel); 1735 value = getExternalInterfaceChannel(channel);
1736 global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].extADC_voltage[channel] = value; 1736 global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].extADC_voltage[channel] = value;
1737 } 1737 }
1738 global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].externalInterface_SensorID = externalInterface_GetSensorData((uint8_t*)&global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_data); 1738 global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].externalInterface_SensorID = externalInterface_GetSensorData((uint8_t*)&global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_data);
1739 memcpy(global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_map,externalInterface_GetSensorMapPointer(),EXT_INTERFACE_SENSOR_CNT); 1739 memcpy(global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_map,externalInterface_GetSensorMapPointer(1),EXT_INTERFACE_SENSOR_CNT);
1740 global.dataSendToMaster.boolADCO2Data |= boolADCBuffer; 1740 global.dataSendToMaster.boolADCO2Data |= boolADCBuffer;
1741 } 1741 }
1742 1742
1743 void copyExtCO2data() 1743 void copyExtCO2data()
1744 { 1744 {