comparison Small_CPU/Src/scheduler.c @ 780:e40790a67165

Discovery<=>SmallCPU inferface update: The sensor data struct is extended to store the data of up to three (three visible O2 sensors). To avoid unnecessary payload on the SPI only the last update sensor data item is transfered. The sender receiver uses the sensor ID which is provided in parallel to identify the correct storage location.
author Ideenmodellierer
date Tue, 23 May 2023 21:50:19 +0200
parents aa6006975e76
children 19ab6f3ed52a
comparison
equal deleted inserted replaced
779:0b5f45448eb6 780:e40790a67165
1733 for(channel = 0; channel < MAX_ADC_CHANNEL; channel++) 1733 for(channel = 0; channel < MAX_ADC_CHANNEL; channel++)
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(0, (uint8_t*)&global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_data);
1739 memcpy(global.dataSendToMaster.data[boolADCBuffer && DATA_BUFFER_ADC].sensor_map,externalInterface_GetSensorMapPointer(1),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()