Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -r6f1f269cd7d91f41c51797d17a85a7ea249e21f3 -rdf0a0b9ce1414b00b381e516714f9089d8e4ae21 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 6f1f269cd7d91f41c51797d17a85a7ea249e21f3) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision df0a0b9ce1414b00b381e516714f9089d8e4ae21) @@ -409,12 +409,12 @@ F32 pressureInlet = getMeasuredDGPressure( PRESSURE_SENSOR_RO_PUMP_INLET ); BOOL isPumpRunning = ( pressureInlet + MAX_PRESSURE_TARGET_TOLERANCE ) < actualPressure; - checkPersistentAlarm( ALARM_ID_RO_PUMP_OFF_FAULT, isPumpRunning, pressureInlet, ( pressureInlet + MAX_PRESSURE_TARGET_TOLERANCE ) ); + //checkPersistentAlarm( ALARM_ID_RO_PUMP_OFF_FAULT, isPumpRunning, pressureInlet, ( pressureInlet + MAX_PRESSURE_TARGET_TOLERANCE ) ); // Check if it has timed out - if ( isAlarmActive( ALARM_ID_RO_PUMP_OFF_FAULT ) ) + //if ( isAlarmActive( ALARM_ID_RO_PUMP_OFF_FAULT ) ) { - activateSafetyShutdown(); + //activateSafetyShutdown(); } } @@ -482,6 +482,31 @@ /*********************************************************************//** * @brief + * The execROPumpSelfTest function executes the RO pump's self-test. + * @details Inputs: none + * @details Outputs: none + * @return PressuresSelfTestResult (SELF_TEST_STATUS_T) + *************************************************************************/ +SELF_TEST_STATUS_T execROPumpSelfTest( void ) +{ + SELF_TEST_STATUS_T result = SELF_TEST_STATUS_IN_PROGRESS; + + BOOL calStatus = processCalibrationData(); + + if ( TRUE == calStatus ) + { + result = SELF_TEST_STATUS_PASSED; + } + else + { + result = SELF_TEST_STATUS_FAILED; + } + + return result; +} + +/*********************************************************************//** + * @brief * The isROPumpRunning function returns the on/off status of RO pump. * @details Inputs: isROPumpOn * @details Outputs: none @@ -825,15 +850,13 @@ #endif status = FALSE; } - else - { - // The calibration data was valid, update the local copy - flowSensorsCalRecord.flowSensors[ sensor ].fourthOrderCoeff = calData.flowSensors[ sensor ].fourthOrderCoeff; - flowSensorsCalRecord.flowSensors[ sensor ].thirdOrderCoeff = calData.flowSensors[ sensor ].thirdOrderCoeff; - flowSensorsCalRecord.flowSensors[ sensor ].secondOrderCoeff = calData.flowSensors[ sensor ].secondOrderCoeff; - flowSensorsCalRecord.flowSensors[ sensor ].gain = calData.flowSensors[ sensor ].gain; - flowSensorsCalRecord.flowSensors[ sensor ].offset = calData.flowSensors[ sensor ].offset; - } + + // The calibration data was valid, update the local copy + flowSensorsCalRecord.flowSensors[ sensor ].fourthOrderCoeff = calData.flowSensors[ sensor ].fourthOrderCoeff; + flowSensorsCalRecord.flowSensors[ sensor ].thirdOrderCoeff = calData.flowSensors[ sensor ].thirdOrderCoeff; + flowSensorsCalRecord.flowSensors[ sensor ].secondOrderCoeff = calData.flowSensors[ sensor ].secondOrderCoeff; + flowSensorsCalRecord.flowSensors[ sensor ].gain = calData.flowSensors[ sensor ].gain; + flowSensorsCalRecord.flowSensors[ sensor ].offset = calData.flowSensors[ sensor ].offset; } return status;