Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -r0a1d4f769464407084d39843244af74911bbdfa5 -ra7014f4b673da08de179efcdf68ac8c854fe5757 --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 0a1d4f769464407084d39843244af74911bbdfa5) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision a7014f4b673da08de179efcdf68ac8c854fe5757) @@ -61,7 +61,6 @@ #define ZERO_DIAL_FLOW_RATE 0.0F ///< Zero dialysate flow rate #define SPENT_CHAMBER_FILL_MAX_COUNT 12 ///< Total number of spent chamber fill allowed. #define BICARB_CHAMBER_FILL_TIMEOUT ( 1 * MS_PER_SECOND ) ///< Bicarb chamber fill timeout. - #define PUMP_SPEED_SLOPE_FACTOR_DIENER_2000 1.24F ///< D48 Diener 2000 pump speed slope (y = 1.24x + 30). #define PUMP_SPEED_INTERCEPT_FACTOR_DIENER_2000 30.0F ///< D48 Diener 2000 pump speed intercept. #define PUMP_SPEED_SLOPE_FACTOR_DIENER_1000 2.869F ///< D48 Diener 1000 pump speed slope (y = 2.869x + 25.956). @@ -100,6 +99,7 @@ static U32 d48PumpSpeed; ///< Initial D48 pump speed based on the Qd. static U32 scFillWaitStart; ///< totalSpentChamberFill count latched when level first went HIGH. static BOOL scFillWaitActive ; ///< TRUE while waiting out the confirm cycles after level HIGH. + // ********** private function prototypes ********** static void setModeGenDStateTransition( DD_GEND_MODE_STATE_T state ); @@ -771,7 +771,7 @@ if ( getTestConfigStatus( TEST_CONFIG_DD_ENABLE_SPENT_CHAMBER_H_FILL ) == TRUE ) { - if ( ( TRUE == pendingSpentChamberFill ) ) + if ( TRUE == pendingSpentChamberFill ) { // Deactivate Balancing Chamber Switching requestBalChamberSwitching( FALSE ); @@ -893,6 +893,7 @@ isDialDeliveryInProgress.data = FALSE; state = DD_GEND_DIALYSATE_BYPASS_STATE; scFillWaitActive = FALSE; + totalSpentChamberFill = 0; //Trigger alarm if count exceeded if ( totalSpentChamberFill >= SPENT_CHAMBER_FILL_MAX_COUNT )