Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r208ceefa8e8b1cc30feb93be771ced6d313e6995 -rdbf9c245d46c7536c72d277da24f7b44d7a84118 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 208ceefa8e8b1cc30feb93be771ced6d313e6995) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision dbf9c245d46c7536c72d277da24f7b44d7a84118) @@ -614,16 +614,20 @@ *************************************************************************/ static VALVE_STATE_T handleValveStateHomingNotStarted( VALVE_T valve ) { - VALVE_STATE_T state = VALVE_STATE_HOMING_NOT_STARTED; + VALVE_STATE_T state = VALVE_STATE_HOMING_NOT_STARTED; + OPN_CLS_STATE_T frontDoor = getSwitchStatus( FRONT_DOOR ); - // TODO connect this flag to the doors driver later - // For now it is assumed the door is closed - BOOL isDoorClosed = TRUE; +#ifndef _RELEASE_ + if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_SWITCHES_MONITOR ) ) + { + frontDoor = STATE_CLOSED; + } +#endif // If homing has been requested or POST is completed and the door has been close for the specified - // Period of time, start the homing - if ( valveSelfTestState == VALVE_SELF_TEST_COMPLETE && ( valvesStatus[ valve ].hasHomingBeenRequested || isDoorClosed ) - && ( ! valvesStatus[ valve ].hasHomingFailed ) ) + // Period of time, start the homing process + if ( ( VALVE_SELF_TEST_COMPLETE == valveSelfTestState ) && ( ( TRUE == valvesStatus[ valve ].hasHomingBeenRequested ) || ( STATE_CLOSED == frontDoor ) ) + && ( FALSE == valvesStatus[ valve ].hasHomingFailed ) ) { // Get ready for the energized state valvesStatus[ valve ].homingEdgeDetectionCounter = 0;