Index: firmware/App/Modes/ModeGenIdle.c =================================================================== diff -u -r22176ce95e49213c48454f34ddf5d29b8109f2cb -r98a1a2a624373a1d140daed0136522ab6e635237 --- firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision 22176ce95e49213c48454f34ddf5d29b8109f2cb) +++ firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision 98a1a2a624373a1d140daed0136522ab6e635237) @@ -20,6 +20,7 @@ #include "ConductivitySensors.h" #include "DrainPump.h" #include "FPGA.h" +#include "CPLD.h" #include "HDDefs.h" #include "Heaters.h" #include "ModeFill.h" @@ -60,10 +61,9 @@ static U32 hdLostCommStartTime_ms; ///< Lost communication with HD start time in ms. static U32 targetFillVolumeML; ///< Save the target fill volume before calling startFillCmd(). static BOOL handleBadFillFlag; ///< Internal signal flag to handle bad fill. -static HD_OP_MODE_T hdMode = MODE_STAN; ///< HD operations mode. -static OVERRIDE_U32_T badFillSubstatesPublishInterval = { BAD_FILL_SUBSTATES_PUB_INTERVAL, ///< Interval (in ms) at which to publish bad fill sub-states to CAN bus. +static OVERRIDE_U32_T badFillSubstatesPublishInterval = { BAD_FILL_SUBSTATES_PUB_INTERVAL, BAD_FILL_SUBSTATES_PUB_INTERVAL, - 0, 0 }; + 0, 0 }; ///< Interval (in ms) at which to publish bad fill sub-states to CAN bus. // ********** private function prototypes ********** @@ -88,8 +88,8 @@ *************************************************************************/ void initGenIdleMode( void ) { - genIdleState = DG_GEN_IDLE_MODE_STATE_START; - hdLostCommStartTime_ms = 0; + genIdleState = DG_GEN_IDLE_MODE_STATE_START; + hdLostCommStartTime_ms = 0; } /*********************************************************************//** @@ -104,12 +104,6 @@ // Re-initialize each time we transition to generation idle mode initGenIdleMode(); - // TODO should we write to RAM that disinfect has been voided all the time during the treatment? - if ( MODE_TREA == hdMode ) - { - setDisinfectStatus( FALSE ); - } - // Set initial actuator states setValveState( VSP, VALVE_STATE_CLOSED ); setValveState( VPI, VALVE_STATE_OPEN ); @@ -135,6 +129,8 @@ setHeaterTargetTemperature( DG_PRIMARY_HEATER, getPrimaryHeaterTargetTemperature() ); startHeater( DG_PRIMARY_HEATER ); + setCPLDCleanLEDColor( CPLD_CLEAN_LED_OFF ); + return genIdleState; } @@ -169,18 +165,6 @@ /*********************************************************************//** * @brief - * The setHDOperationMode function sets HD operation mode value. - * @details Inputs: none - * @details Outputs: hdMode - * @return none - *************************************************************************/ -void setHDOperationMode( U32 mode ) -{ - hdMode = (HD_OP_MODE_T)mode; -} - -/*********************************************************************//** - * @brief * The setBadAvgConductivityDetectedFlag function sets a flag to indicate * that bad average conductivity is detected. * @details Inputs: none @@ -190,6 +174,7 @@ void setBadAvgConductivityDetectedFlag( BOOL badAvgConducitivyflag ) { handleBadFillFlag = badAvgConducitivyflag; + badFillState = DG_HANDLE_BAD_FILL_STATE_START; // Reset bad fill state too so we start at beginning } /*********************************************************************//**