Index: firmware/App/Modes/Prime.c =================================================================== diff -u -r1d07de4e970f54f2ae1786ef546cf5567df9ba8e -r3b7059f9225a021c5c55a3cb7874bafc2ae1eb48 --- firmware/App/Modes/Prime.c (.../Prime.c) (revision 1d07de4e970f54f2ae1786ef546cf5567df9ba8e) +++ 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" @@ -421,11 +422,7 @@ { U32 const elapsedPrimeTimeInSecs = calcTimeSince( primeStartTime ) / MS_PER_SECOND; - if ( elapsedPrimeTimeInSecs > MAX_PRIME_TIME ) - { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_PRIME_OUT_OF_TIME, elapsedPrimeTimeInSecs, MAX_PRIME_TIME ); - } - + // timeout alarm that used to trigger when max prime time elapsed was removed. if ( ++primeStatusBroadcastTimerCounter >= PRIME_DATA_PUB_INTERVAL ) { PRIMING_DATA_PAYLOAD_T primeData; @@ -1001,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;