Index: firmware/App/Modes/ModeFault.c =================================================================== diff -u -r24b2fe72608344e67ef37234085d15ad5e4fcc37 -r8b22e495cc6058d348058ce34dc799448f32808a --- firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision 24b2fe72608344e67ef37234085d15ad5e4fcc37) +++ firmware/App/Modes/ModeFault.c (.../ModeFault.c) (revision 8b22e495cc6058d348058ce34dc799448f32808a) @@ -62,13 +62,19 @@ U32 transitionToFaultMode( void ) { HD_OP_MODE_T previousOpMode = getPreviousOperationMode(); + DG_OP_MODE_T dgOperationMode = getDGOpMode(); // Set user alarm recovery actions allowed in this mode setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_END_TREATMENT, FALSE ); // Stop trimmer heater cmdStopDGTrimmerHeater(); + // If DG filling, abort it + if ( DG_MODE_FILL == dgOperationMode ) + { + cmdStopDGFill(); + } // Publish POST failure status to UI if fault triggered in Init/POST mode if ( MODE_INIT == previousOpMode ) { @@ -94,6 +100,7 @@ U32 execFaultMode( void ) { BOOL stop = isStopButtonPressed(); + DG_OP_MODE_T dgOperationMode = getDGOpMode(); #ifndef EMC_TEST_BUILD // Ensure all pumps are stopped @@ -108,6 +115,12 @@ setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); + + // If DG not stopped, stop it + if ( DG_MODE_GENE == dgOperationMode ) + { + cmdStopDG(); + } #else // TODO - EMC test code - remove later static U32 toggle = 0; Index: firmware/App/Modes/ModePostTreat.c =================================================================== diff -u -rd7e01dce5b2ebb1ea02832a9ced81550a919b67b -r8b22e495cc6058d348058ce34dc799448f32808a --- firmware/App/Modes/ModePostTreat.c (.../ModePostTreat.c) (revision d7e01dce5b2ebb1ea02832a9ced81550a919b67b) +++ firmware/App/Modes/ModePostTreat.c (.../ModePostTreat.c) (revision 8b22e495cc6058d348058ce34dc799448f32808a) @@ -468,21 +468,16 @@ activateAlarmNoData( ALARM_ID_CARTRIDGE_REMOVAL_FAILURE ); } - if ( TRUE == isSyringeDetected() ) - { + if ( TRUE == isSyringeDetected() ) + { #ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP ) != SW_CONFIG_ENABLE_VALUE ) + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP ) != SW_CONFIG_ENABLE_VALUE ) #endif - { - activateAlarmNoData( ALARM_ID_HD_SYRINGE_DETECTED ); - } - } - // Wait for cartridge and syringe to be removed and for DG to finish any drains/fills. - if ( ( TRUE == isCartridgeRemoved ) && ( FALSE == isSyringeDetected() ) ) { - cmdStopDG(); - requestNewOperationMode( MODE_STAN ); + activateAlarmNoData( ALARM_ID_HD_SYRINGE_DETECTED ); } + } + // Wait for cartridge and syringe to be removed and for DG to finish any drains/fills. if ( ( TRUE == isCartridgeRemoved ) && ( FALSE == isSyringeDetected() ) ) {