Index: firmware/App/Modes/ModeDrain.c =================================================================== diff -u -r1a5efe97f5f39594b45797fded52cafce92afe80 -rcea079b61dbd17b2ddaec99b1124248147d14e72 --- firmware/App/Modes/ModeDrain.c (.../ModeDrain.c) (revision 1a5efe97f5f39594b45797fded52cafce92afe80) +++ firmware/App/Modes/ModeDrain.c (.../ModeDrain.c) (revision cea079b61dbd17b2ddaec99b1124248147d14e72) @@ -17,6 +17,7 @@ #include "ConductivitySensors.h" #include "DrainPump.h" +#include "Heaters.h" #include "ModeDrain.h" #include "OperationModes.h" #include "Pressures.h" @@ -49,8 +50,6 @@ static DG_DRAIN_STATE_T drainState; ///< Currently active drain state. static U32 drainEmptyTareTimerCtr; ///< Timer counter for delay between drain complete and load cell tare. -static U32 tempTrans = 0; - // ********** private function prototypes ********** static DG_DRAIN_STATE_T handleDrainState( void ); @@ -157,27 +156,8 @@ static DG_DRAIN_STATE_T handleDrainState( void ) { DG_DRAIN_STATE_T result = DG_DRAIN_STATE_DRAIN; - - // TODO test code remove DG_RESERVOIR_ID_T inactiveReservoir = getInactiveReservoir(); - if ( ++tempTrans == 20 ) - { - if ( DG_RESERVOIR_2 == inactiveReservoir ) - { - setValveState( VRD2, VALVE_STATE_OPEN ); - } - else if ( DG_RESERVOIR_1 == inactiveReservoir ) - { - setValveState( VRD1, VALVE_STATE_OPEN ); - } - } - else if ( tempTrans == 40 ) - { - setDrainPumpTargetRPM( TARGET_DRAIN_PUMP_RPM ); - } - // TODO test code remove - // if we have reached our target drain to volume (by weight) or cannot drain anymore, we are done draining - go back to re-circ mode if ( TRUE == hasTargetDrainVolumeBeenReached( inactiveReservoir, DRAIN_WEIGHT_UNCHANGE_TIMEOUT ) ) {