Index: firmware/App/Modes/TreatmentStop.c =================================================================== diff -u -r7c8d739514d6c314aef7e7c2d26be41c81ff1236 -rd70681aa147f2b4b888e130bd09cb81db5de25a3 --- firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision 7c8d739514d6c314aef7e7c2d26be41c81ff1236) +++ firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision d70681aa147f2b4b888e130bd09cb81db5de25a3) @@ -23,7 +23,6 @@ #include "DialOutFlow.h" #include "ModeTreatment.h" #include "OperationModes.h" -#include "Reservoirs.h" #include "SystemCommMessages.h" #include "TaskGeneral.h" #include "TreatmentStop.h" @@ -233,11 +232,6 @@ { TREATMENT_STOP_STATE_T priorSubState = currentTxStopState; - // Execute treatment stop sub-mode state machine - if ( currentTxStopState != TREATMENT_STOP_NO_RECIRC_STATE ) - { - execReservoirs(); - } switch ( currentTxStopState ) { case TREATMENT_STOP_RECIRC_STATE: Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r7c8d739514d6c314aef7e7c2d26be41c81ff1236 -rd70681aa147f2b4b888e130bd09cb81db5de25a3 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 7c8d739514d6c314aef7e7c2d26be41c81ff1236) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision d70681aa147f2b4b888e130bd09cb81db5de25a3) @@ -651,7 +651,7 @@ rsrvrCmd.reservoirID = (U32)inactiveRes; rsrvrCmd.useLastTrimmerHeaterDC = TRUE; - if( ( dilutionLevelPct >= MAX_RESERVOIR_DILUTION ) || ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML ) || ( getReservoirWeight( active ) > MAX_RESERVOIR_VOL_BEFORE_SWITCH_ML ) ) + if ( ( dilutionLevelPct >= MAX_RESERVOIR_DILUTION ) || ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML ) || ( getReservoirWeight( active ) > MAX_RESERVOIR_VOL_BEFORE_SWITCH_ML ) ) { // Signal dialysis sub-mode to capture baseline volume for next reservoir. setStartReservoirVolume( inactiveRes ); @@ -691,7 +691,6 @@ } } - return state; } @@ -736,13 +735,14 @@ { BOOL result = FALSE; if ( ( TREATMENT_STOP_STATE == getTreatmentState() ) && - ( TRUE == isAlarmActive( ALARM_ID_HD_DIALYSATE_TEMP_BELOW_TARGET_TEMP ) || - TRUE == isAlarmActive( ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_SAFETY_TEMP ) || - TRUE == isAlarmActive( ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_TARGET_TEMP ) ) ) + ( TRUE == isAlarmConditionDetected( ALARM_ID_HD_DIALYSATE_TEMP_BELOW_TARGET_TEMP ) || + TRUE == isAlarmConditionDetected( ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_SAFETY_TEMP ) || + TRUE == isAlarmConditionDetected( ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_TARGET_TEMP ) ) ) { result = TRUE; } return result; } + /**@}*/