Index: firmware/App/Controllers/TemperatureSensors.c =================================================================== diff -u -r406da4d5010b1ecab9035033121aeafad15b931d -r71db355692903b473167d000322a2dd3d138a2c5 --- firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 406da4d5010b1ecab9035033121aeafad15b931d) +++ firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 71db355692903b473167d000322a2dd3d138a2c5) @@ -619,11 +619,11 @@ // Calculate the average F32 const avgADCReads = tempSensors[ sensorIndex ].adcRunningSum >> SHIFT_BITS_BY_5_FOR_AVERAGING; - F32 const temperature = getADC2TempConversion ( avgADCReads, - (U32)tempSensors [ sensorIndex ].gain, - (U32)tempSensors [ sensorIndex ].refResistance, - (U32)tempSensors [ sensorIndex ].zeroDegreeResistance, - tempSensors [ sensorIndex ].conversionCoef ); + F32 const temperature = getADC2TempConversion( avgADCReads, + (U32)tempSensors [ sensorIndex ].gain, + (U32)tempSensors [ sensorIndex ].refResistance, + (U32)tempSensors [ sensorIndex ].zeroDegreeResistance, + tempSensors [ sensorIndex ].conversionCoef ); tempSensors[ sensorIndex ].temperatureValues.data = temperature; } @@ -684,17 +684,17 @@ { S32 const tpiConvertedADC = ( (S32)getFPGATPiTemp() & MASK_OFF_U32_MSB ); F32 const tpiTemperature = getADC2TempConversion( tpiConvertedADC, - (U32) tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].gain, - (U32) tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].refResistance, - (U32) tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].zeroDegreeResistance, - tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].conversionCoef ); + (U32) tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].gain, + (U32) tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].refResistance, + (U32) tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].zeroDegreeResistance, + tempSensors[ TEMPSENSORS_INLET_PRIMARY_HEATER ].conversionCoef ); S32 const tpoConvertedADC = ( (S32)getFPGATPoTemp() & MASK_OFF_U32_MSB ); F32 const tpoTemperature = getADC2TempConversion( tpoConvertedADC, - (U32) tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].gain, - (U32) tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].refResistance, - (U32) tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].zeroDegreeResistance, - tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].conversionCoef ); + (U32) tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].gain, + (U32) tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].refResistance, + (U32) tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].zeroDegreeResistance, + tempSensors[ TEMPSENSORS_OUTLET_PRIMARY_HEATER ].conversionCoef ); F32 const tempDiff = fabs(tpiTemperature - tpoTemperature); if ( tempDiff > MAX_ALLOWED_TEMP_DELTA_BETWEEN_SENSORS ) @@ -740,9 +740,8 @@ /************************************************************************* * @brief * The handleExecGetADCValues function reads the ADC values from FPGA and - * at the specified time intervals, checks the temperature range of the - * inlet water and calls other functions to calculate the internal temperature - * of the heaters + * at the specified time intervals and calls other functions to calculate + * the internal temperature of the heaters * @details * Inputs : none * Outputs : internalHeatersConversionTimer, elapsedTime, temperatureValues