Index: firmware/App/Controllers/TemperatureSensors.c =================================================================== diff -u -ra12e1212c1cf49011ed8d65beaf9416ca18ffe98 -r1a4ffea6557b4e2b1041c9792f3f43dc04da314c --- firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision a12e1212c1cf49011ed8d65beaf9416ca18ffe98) +++ firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 1a4ffea6557b4e2b1041c9792f3f43dc04da314c) @@ -120,7 +120,6 @@ OVERRIDE_F32_T temperatureValues; ///< Temperature values with override F32 maxAllowedTemp; ///< Maximum allowed temperature of the sensor U32 alarmStartTime; ///< Alarm start time - U08 sensorErrorBitStatus; ///< Temperature sensor error bit status BOOL fpgaErrorStatus; ///< Temperature sensor FPGA error status S32 baroTempSnsrDiff; ///< Barometric sensor temperature difference } TEMP_SENSOR_T; @@ -685,58 +684,10 @@ *************************************************************************/ static void processTempSnsrsADCRead( U32 sensorIndex, U32 adc ) { - // Some of the temperature sensors have an MSB bit that is used as an error flag. This flag will be a TRUE by default. - BOOL isErrorBitNotValid = FALSE; - S32 convertedADC = (S32)( adc & MASK_OFF_U32_MSB ); + S32 convertedADC = (S32)( adc & MASK_OFF_U32_MSB ); - switch( sensorIndex ) - { - case TEMPSENSORS_LOAD_CELL_A1_B1: - case TEMPSENSORS_LOAD_CELL_A2_B2: - case TEMPSENSORS_CONDUCTIVITY_SENSOR_1: - case TEMPSENSORS_CONDUCTIVITY_SENSOR_2: - case TEMPSENSORS_OUTLET_PRIMARY_HEATER: - case TEMPSENSORS_INLET_PRIMARY_HEATER: - case TEMPSENSORS_INTERNAL_COND_TEMP_SENSOR: - case TEMPSENSORS_OUTLET_REDUNDANT: - case TEMPSENSORS_INTERNAL_TRO_RTD: - case TEMPSENSORS_INLET_DIALYSATE: - case TEMPSENSORS_INTERNAL_TDI_RTD: - case TEMPSENSORS_HEAT_DISINFECT: - case TEMPSENSORS_INTERNAL_THD_RTD: - { - U08 i; - - // Shift bits by 31 to right to check the error bit status - tempSensors[ sensorIndex ].sensorErrorBitStatus = adc >> SHIFT_BITS_BY_31; - - for ( i = 0; i < NUM_OF_TEMPERATURE_SENSORS; i++ ) - { - // If that bit is a 1, there is either CRC error or Status error that are ored on top of each other - // NOTE: only a few sensors have the error bit available but for simplicity, all the sensors are looped. - // This variable is zeroed in the init function and the sensors that do not use this bit are never checked (and set) to - // any other values so those sensors will never trigger this fault. - // If any of the sensors have this bit to be 1, set the error occurred be 1 - if ( tempSensors[ i ].sensorErrorBitStatus > 0 ) - { - isErrorBitNotValid = TRUE; - } - } - } - break; - - default: - // Do nothing. FPGA board temperature sensor does not have error flag bit - // If a wrong temperature sensor name is picked, the function that converts - // ADC counts to temperature raises an alarm. - break; - } - - if ( FALSE == isErrorBitNotValid ) - { - // Make sure the error bit is not true before - processADCRead( sensorIndex, convertedADC ); - } + // Make sure the error bit is not true before + processADCRead( sensorIndex, convertedADC ); } /*********************************************************************//**