Index: firmware/App/Controllers/Pressures.c =================================================================== diff -u -rc230be1bd4296324bf5dfc288c212eb7c2ce5d2d -r14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055 --- firmware/App/Controllers/Pressures.c (.../Pressures.c) (revision c230be1bd4296324bf5dfc288c212eb7c2ce5d2d) +++ firmware/App/Controllers/Pressures.c (.../Pressures.c) (revision 14ab8d8d80fb3607d37d70d4e7a09bbb8dbc3055) @@ -121,7 +121,6 @@ static PRESSURE_STATE_T handlePressuresInitState( void ); static PRESSURE_STATE_T handlePressuresContReadState( void ); static void publishPressuresData( void ); -static SELF_TEST_STATUS_T handleSelfTestADCCheck( void ); static F32 calculateBaroPressure( U32 adcSum ); static F32 getCalibrationAppliedPressure( U08 sensorId, F32 pressure ); static F32 getBaroPressurePSI( void ); @@ -319,7 +318,7 @@ break; case PRESSURE_TEST_STATE_IN_PROGRESS: - pressuresSelfTestResult = handleSelfTestADCCheck(); + // currently no POST test to run for pressure sensors, but they are range checked regularly pressuresSelfTestState = PRESSURE_TEST_STATE_COMPLETE; break; @@ -460,42 +459,6 @@ /*********************************************************************//** * @brief - * The handleSelfTestADCCheck function checks whether the ADC reads and - * report status back. If the reads are above the maximum 12bit ADC count - * or equals zero, it will throw an alarm. - * @details Inputs: ADC reading for RO pump inlet pressure sensor - * @details Outputs: Performed ADC check self-test. - * @return result (SELF_TEST_STATUS_T) - *************************************************************************/ -static SELF_TEST_STATUS_T handleSelfTestADCCheck( void ) -{ - U08 i; - U16 sensorADC; - U16 sensorsADC[ PRESSURE_SENSORS_ADC_CHECK_ARRAY_LEN ]; - SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; - - // Insert the pressure sensors ADC read into the array - sensorsADC[ 0 ] = getIntADCReading( INT_ADC_RO_PUMP_INLET_PRESSURE ); - sensorsADC[ 1 ] = getIntADCReading( INT_ADC_RO_PUMP_OUTLET_PRESSURE ); - sensorsADC[ 2 ] = getIntADCReading( INT_ADC_DRAIN_PUMP_INLET_PRESSURE ); - sensorsADC[ 3 ] = getIntADCReading( INT_ADC_DRAIN_PUMP_OUTLET_PRESSURE ); - - for ( i = 0; i < PRESSURE_SENSORS_ADC_CHECK_ARRAY_LEN; i++ ) - { - sensorADC = sensorsADC[ i ]; - - if ( ( 0 == sensorADC ) || ( sensorADC >= INT_ADC_FULL_SCALE_BITS ) ) - { - result = SELF_TEST_STATUS_FAILED; - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_PRESSURE_SENSOR_FAULT, i ); - } - } - - return result; -} - -/*********************************************************************//** - * @brief * The calculateBaroPressure function calculates the barometric pressure * @details Inputs: measuredPressureReadingsSum * @details Outputs: none