Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -ra2ebc68ef586c213fd6e5e56c61e4b1e8cbb749c -rdc883aab56e769b2dec294e084f1378a178ba089 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision a2ebc68ef586c213fd6e5e56c61e4b1e8cbb749c) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision dc883aab56e769b2dec294e084f1378a178ba089) @@ -29,6 +29,7 @@ #include "TaskGeneral.h" #include "Timers.h" #include "Utilities.h" +#include "Valves.h" /** * @addtogroup ROPump @@ -48,6 +49,10 @@ #define ROP_FLOW_TO_PWM_SLOPE_PERM_FLUSH 117.63F ///< Slope of flow to PWM line equation for permeate flush. #define ROP_FLOW_TO_PWM_INTERCEPT_PERM_FLUSH -648.05F ///< Intercept of flow to PWM line equation for permeate flush. +#define ROP_FLOW_TO_PWM_SLOPE_NO_RECOVERY 000.00F ///< Slope of flow to PWM line equation for permeate flush. +#define ROP_FLOW_TO_PWM_INTERCEPT_NO_RECOVERY 000.00F ///< Intercept of flow to PWM line equation for permeate flush. +#define ROP_FLOW_TO_PWM_SLOPE_MED_RECOVERY 000.00F ///< Slope of flow to PWM line equation for permeate flush. +#define ROP_FLOW_TO_PWM_INTERCEPT_MED_RECOVERY 000.00F ///< Intercept of flow to PWM line equation for permeate flush. #define ROP_FLOW_TO_PWM_SLOPE_MAX_RECOVER 155.31F ///< Slope of flow to PWM line equation for max RO recovery. #define ROP_FLOW_TO_PWM_INTERCEPT_MAX_RECOVER -699.99F ///< Intercept of flow to PWM line equation for max RO recovery. #define ROP_PRESSURE_TO_PWM_SLOPE 0.5F ///< Slope of pressure to PWM line equation. Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r290cac3c0557c978647cef2972800dfe137dd662 -rdc883aab56e769b2dec294e084f1378a178ba089 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 290cac3c0557c978647cef2972800dfe137dd662) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision dc883aab56e769b2dec294e084f1378a178ba089) @@ -62,6 +62,7 @@ static U32 valveStateMismatchTimerCounter; ///< Initialize valve state mismatch timer. static U32 pendingValveStateChanges[ DD_NUM_OF_VALVES ]; ///< Delayed (pending) valve state changes. static U32 pendingValveStateChangeCountDowns[ DD_NUM_OF_VALVES ]; ///< Delayed (pending) valve state change count down timers (in task intervals). +static RECOVERY_STATE_T recoveryState; ///< IOFP valve recovery setting. static OVERRIDE_U32_T valveStates[ DD_NUM_OF_VALVES ]; ///< Currently commanded valves states. static OVERRIDE_U32_T valveSensedStates[ DD_NUM_OF_VALVES ]; ///< Valve sensed states override. @@ -97,6 +98,7 @@ fpValveStatesPublishInterval.ovData = VALVES_STATE_PUB_INTERVAL; fpValveStatesPublishInterval.ovInitData = 0; fpValveStatesPublishInterval.override = OVERRIDE_RESET; + recoveryState = MAX_RECOVERY; // Initialize commanded valve states for ( i = 0; i < DD_NUM_OF_VALVES; i++ ) @@ -535,7 +537,6 @@ { // TODO define hdInstitutionalRecord and get the NVData when it's ready // RECOVERY_STATE_T recoveryState = (RECOVERY_STATE_T)hdInstitutionalRecord.recoveryConfig; - RECOVERY_STATE_T recoveryState = MAX_RECOVERY; // Set all P33, P34 and P37 valves per recovery configuration switch( recoveryState ) @@ -566,6 +567,18 @@ /*********************************************************************//** * @brief + * The getRecoveryState function gets the current valve recovery state. + * @details \b Inputs: recoveryState + * @details \b Outputs: recoveryState + * @return the current valve recovery state. + *************************************************************************/ +RECOVERY_STATE_T getRecoveryState( void ) +{ + return recoveryState; +} + +/*********************************************************************//** + * @brief * The publishValvesStates function publishes DD valves states at the set interval. * @details \b Inputs: valvesStatesPublicationTimerCounter * @details \b Outputs: valvesStatesPublicationTimerCounter Index: firmware/App/Controllers/Valves.h =================================================================== diff -u -r23e8d8f0b87d4b5da99eae0182b13bf0b5f4e9e9 -rdc883aab56e769b2dec294e084f1378a178ba089 --- firmware/App/Controllers/Valves.h (.../Valves.h) (revision 23e8d8f0b87d4b5da99eae0182b13bf0b5f4e9e9) +++ firmware/App/Controllers/Valves.h (.../Valves.h) (revision dc883aab56e769b2dec294e084f1378a178ba089) @@ -87,6 +87,7 @@ VALVE_STATE_NAMES_T getValveStateName( DD_VALVES_T valveID ); void setHydValvesStatetoClosedState( void ); void setRecoveryValvesConfig( void ); +RECOVERY_STATE_T getRecoveryState( void ); BOOL testValvesStatesPublishIntervalOverride( MESSAGE_T *message ); BOOL testValveStateOverride( MESSAGE_T *message ); Index: firmware/App/Modes/FPModes/ModePreGenPermeate.c =================================================================== diff -u -rb569bc796c56acd5d94d468386f5f42c350cad65 -rdc883aab56e769b2dec294e084f1378a178ba089 --- firmware/App/Modes/FPModes/ModePreGenPermeate.c (.../ModePreGenPermeate.c) (revision b569bc796c56acd5d94d468386f5f42c350cad65) +++ firmware/App/Modes/FPModes/ModePreGenPermeate.c (.../ModePreGenPermeate.c) (revision dc883aab56e769b2dec294e084f1378a178ba089) @@ -202,7 +202,6 @@ { setBoostPumpTargetPressure( VERIFY_WATER_BOOST_PUMP_TGT_PSI ); } - //TODO change target flow to 750 + rinse pump rate setROPumpTargetFlowRateMLPM( VERIFY_WATER_RO_PUMP_TGT_FLOW_ML, TRUE ); verifyWaterTimer = getMSTimerCount(); break; Index: firmware/App/Modes/FPModes/StateFlushPermeate.c =================================================================== diff -u -r973f790125e70115662d979f5f5631bb9df081f0 -rdc883aab56e769b2dec294e084f1378a178ba089 --- firmware/App/Modes/FPModes/StateFlushPermeate.c (.../StateFlushPermeate.c) (revision 973f790125e70115662d979f5f5631bb9df081f0) +++ firmware/App/Modes/FPModes/StateFlushPermeate.c (.../StateFlushPermeate.c) (revision dc883aab56e769b2dec294e084f1378a178ba089) @@ -263,7 +263,6 @@ { setBoostPumpTargetPressure( PERMEATE_FLUSH_BOOST_PUMP_TGT_PSI ); } - //TODO update target macro after changing it to 750 + rinse pump rate setROPumpTargetFlowRateMLPM( PERMEATE_FLUSH_RO_PUMP_TGT_ML, TRUE ); permeateFlushTimer = getMSTimerCount(); permeateFlushAlarmTimer = getMSTimerCount();