Index: firmware/App/Controllers/TemperatureSensors.c =================================================================== diff -u -rc230be1bd4296324bf5dfc288c212eb7c2ce5d2d -r14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055 --- firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision c230be1bd4296324bf5dfc288c212eb7c2ce5d2d) +++ firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055) @@ -121,7 +121,6 @@ U32 alarmStartTime; ///< Alarm start time U08 sensorErrorBitStatus; ///< Temperature sensor error bit status BOOL fpgaErrorStatus; ///< Temperature sensor FPGA error status - BOOL adcErrorStatus; ///< Temperature sensor ADC error status S32 baroTempSnsrDiff; ///< Barometric sensor temperature difference } TEMP_SENSOR_T; @@ -184,12 +183,6 @@ static const U32 TWO_TO_POWER_OF_8 = ( 1 << 8 ); ///< 2^8. static const U32 TWO_TO_POWER_OF_23 = ( 1 << 23 ); ///< 2^23. -// The count cannot be within 0.1V of the rail on both sides therefore: -// Maximum ADC count -> (2^24) * ( 3.0V - 0.1V ) / 3V -// Minimum ADC count -> (2^24) * ( 0.1V - 0.0V ) / 3V -static const U32 TEMP_SENSORS_MAX_ADC_COUNT = ( BITS_24_FULL_SCALE * ( 3.0F - 0.1F ) ) / 3.0F; ///< Temperature sensors max allowed ADC count. -static const U32 TEMP_SESNORS_MIN_ADC_COUNT = ( BITS_24_FULL_SCALE * ( 0.1F - 0.0F ) ) / 3.0F; ///< Temperature sensors min allowed ADC count. - // ********** private function prototypes ********** static TEMPSENSORS_EXEC_STATES_T handleExecStart( void ); @@ -333,7 +326,6 @@ initPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_OUT_OF_RANGE, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS ); // Persistent alarm for the temperature sensors range check - initPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSORS_ADC_FAULT, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS ); initPersistentAlarm( ALARM_ID_DG_DIALYSATE_TEMPERATURE_SENSORS_OUT_OF_RANGE, 0, DIALYSATE_TEMP_SNSRS_OUT_OF_RANGE_TIMEOUT_MS ); // Initialize the FPGA persistent alarms @@ -771,10 +763,8 @@ *************************************************************************/ static void processADCRead( U32 sensorIndex, S32 adc ) { - U08 i; F32 temperature; F32 avgADCReads; - BOOL isADCNotValid = FALSE; U32 index = tempSensors[ sensorIndex ].adcNextIndex; S32 indexValue = tempSensors[ sensorIndex ].rawADCReads [ index ]; @@ -784,23 +774,6 @@ tempSensors[ sensorIndex ].adcRunningSum = tempSensors[ sensorIndex ].adcRunningSum - indexValue + adc; avgADCReads = tempSensors[ sensorIndex ].adcRunningSum >> SHIFT_BITS_BY_2_FOR_AVERAGING; // Calculate the average - // Check if the average ADC is within the accepted range - tempSensors[ sensorIndex ].adcErrorStatus = ( ( (U32)avgADCReads < TEMP_SESNORS_MIN_ADC_COUNT ) || - ( (U32)avgADCReads > TEMP_SENSORS_MAX_ADC_COUNT ) ? TRUE : FALSE ); - - for ( i = 0; i < NUM_OF_TEMPERATURE_SENSORS; i++ ) - { - // Loop through the temperature sensors and check the ADC range except the heater's temperature sensors. They are only - // used to display the temperature inside the heaters - if ( ( i != TEMPSENSORS_PRIMARY_HEATER_THERMO_COUPLE ) && ( i != TEMPSENSORS_TRIMMER_HEATER_THERMO_COUPLE ) && - ( i != TEMPSENSORS_PRIMARY_HEATER_COLD_JUNCTION ) && ( i != TEMPSENSORS_TRIMMER_HEATER_COLD_JUNCTION ) ) - { - isADCNotValid |= tempSensors[ sensorIndex ].adcErrorStatus; - } - } - - checkPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSORS_ADC_FAULT, isADCNotValid, sensorIndex, avgADCReads ); - // Different sensors have different ADC to temperature conversion methods switch( sensorIndex ) { @@ -1047,17 +1020,9 @@ case TEMPSENSORS_OUTLET_REDUNDANT: case TEMPSENSORS_INLET_DIALYSATE: case TEMPSENSORS_FPGA_BOARD_SENSOR: - case TEMPSENSORS_LOAD_CELL_A1_B1: - case TEMPSENSORS_LOAD_CELL_A2_B2: - case TEMPSENSORS_INTERNAL_TRO_RTD: - case TEMPSENSORS_INTERNAL_TDI_RTD: - case TEMPSENSORS_INTERNAL_THD_RTD: - case TEMPSENSORS_INTERNAL_COND_TEMP_SENSOR: case TEMPSENSORS_BAROMETRIC_TEMP_SENSOR: - // All the temperature sensors are monitored except the heaters' temperature sensors. - // The heaters' temperature sensors are only broadcast for information + // All other temperature sensors are only broadcast for logging/dialin purposes. temperature = getTemperatureValue( sensorId ); - // Check both temperature and to be in range if ( ( ( temperature < TEMP_SENSORS_MIN_ALLOWED_DEGREE_C ) || ( temperature > tempSensors[ sensorId ].maxAllowedTemp ) ) && ( getCurrentOperationMode() != DG_MODE_INIT ) )