Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r4b358e1af8512dd9a0e948ef7c534b6af393b611 -r316f8773970f94c9b1996a03f2235050afb514da --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 4b358e1af8512dd9a0e948ef7c534b6af393b611) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 316f8773970f94c9b1996a03f2235050afb514da) @@ -44,9 +44,11 @@ // ********** private definitions ********** #define MAX_TREATMENT_TIME_MINUTES ( 8 * MIN_PER_HOUR ) ///< Maximum treatment time (in minutes). +#ifndef ALLOW_1_MIN_TREATMENT_DURATION #define MIN_TREATMENT_TIME_MINUTES ( 1 * MIN_PER_HOUR ) ///< Minimum treatment time (in minutes). -#define MAX_UF_RATE_ML_MIN ( (F32)2500 / (F32)MIN_PER_HOUR ) ///< Maximum ultrafiltration rate (in mL/min). -#define MAX_UF_VOLUME_ML ( 8 * ML_PER_LITER ) ///< Maximum ultrafiltration volume (in mL). +#else +#define MIN_TREATMENT_TIME_MINUTES ( 1 ) ///< Minimum treatment time (in minutes). +#endif #define MAX_DIALYSATE_VOLUME_ML ( 150 * ML_PER_LITER ) ///< Maximum dialysate volume (in mL). #define USER_CONFIRM_CHANGE_TIMEOUT_MS ( 60 * MS_PER_SECOND ) ///< Require user to confirm UF volume change within this time. @@ -125,7 +127,7 @@ bloodIsPrimed = FALSE; treatmentCompleted = FALSE; - rinsebackDone = TRUE; + rinsebackDone = FALSE; treatmentTimeMS = 0; lastTreatmentTimeStamp = 0; @@ -625,6 +627,7 @@ // Otherwise execute state machine for treatment stop sub-mode else { + execTreatmentReservoirMgmt(); execTreatmentStop(); }