Index: firmware/App/Modes/Prime.c =================================================================== diff -u -r8e9aa2234cc1318c6465480785a0e4af75e7be48 -r3b7059f9225a021c5c55a3cb7874bafc2ae1eb48 --- firmware/App/Modes/Prime.c (.../Prime.c) (revision 8e9aa2234cc1318c6465480785a0e4af75e7be48) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision 3b7059f9225a021c5c55a3cb7874bafc2ae1eb48) @@ -24,6 +24,7 @@ #include "ModeTreatmentParams.h" #include "Prime.h" #include "SelfTests.h" +#include "Switches.h" #include "SystemCommMessages.h" #include "TaskGeneral.h" #include "Timers.h" @@ -997,7 +998,19 @@ static HD_PRE_TREATMENT_PRIME_STATE_T handlePrimePause( void ) { HD_PRE_TREATMENT_PRIME_STATE_T state = HD_PRIME_PAUSE; + BOOL doorClosed = ( STATE_CLOSED == getSwitchStatus( FRONT_DOOR ) ? TRUE : FALSE ); + BOOL latchClosed = ( STATE_CLOSED == getSwitchStatus( PUMP_TRACK_SWITCH ) ? TRUE : FALSE ); + // require front door and pump track to be closed before allowing resume + if ( ( TRUE == doorClosed ) && ( TRUE == latchClosed ) ) + { + setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, TRUE ); + } + else + { + setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, FALSE ); + } + if ( TRUE == primeResumeRequested ) { primeResumeRequested = FALSE;