Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -rb9fd6bfd063774f1295a1a84de74a257d7b29640 -r62b13b446d1826f58f423435aff88f490063c6f0 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision b9fd6bfd063774f1295a1a84de74a257d7b29640) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 62b13b446d1826f58f423435aff88f490063c6f0) @@ -846,15 +846,19 @@ { BOOL result = FALSE; - if ( RINSEBACK_STOP_STATE == rinsebackState ) // TODO - must not be done w/ treatment + if ( TRUE == isTreatmentCompleted() ) { - result = TRUE; - recircRequested = TRUE; + *rejReason = REQUEST_REJECT_REASON_TREATMENT_IS_COMPLETED; } - else + else if ( RINSEBACK_STOP_STATE != rinsebackState ) { *rejReason = REQUEST_REJECT_REASON_ACTION_DISABLED_IN_CURRENT_STATE; } + else + { + result = TRUE; + recircRequested = TRUE; + } return result; } @@ -873,15 +877,19 @@ { BOOL result = FALSE; - if ( ( RINSEBACK_STOP_INIT_STATE == rinsebackState ) || ( RINSEBACK_STOP_STATE == rinsebackState ) ) // TODO - must not be done w/ treatment + if ( TRUE == isTreatmentCompleted() ) { - result = TRUE; - backToTreatmentRequested = TRUE; + *rejReason = REQUEST_REJECT_REASON_TREATMENT_IS_COMPLETED; } - else + else if ( ( RINSEBACK_STOP_INIT_STATE != rinsebackState ) && ( RINSEBACK_STOP_STATE != rinsebackState ) ) { *rejReason = REQUEST_REJECT_REASON_ACTION_DISABLED_IN_CURRENT_STATE; } + else + { + result = TRUE; + backToTreatmentRequested = TRUE; + } return result; } @@ -900,14 +908,14 @@ { BOOL result = FALSE; - if ( ( RINSEBACK_STOP_INIT_STATE == rinsebackState ) || ( RINSEBACK_STOP_STATE == rinsebackState ) ) + if ( ( RINSEBACK_STOP_INIT_STATE != rinsebackState ) && ( RINSEBACK_STOP_STATE != rinsebackState ) ) { - result = TRUE; - endTreatmentRequested = TRUE; + *rejReason = REQUEST_REJECT_REASON_ACTION_DISABLED_IN_CURRENT_STATE; } else { - *rejReason = REQUEST_REJECT_REASON_ACTION_DISABLED_IN_CURRENT_STATE; + result = TRUE; + endTreatmentRequested = TRUE; } return result;