Index: firmware/App/Controllers/MixingControl.c =================================================================== diff -u -r9862626891d641c84626e9b11373e523f5ef4208 -r3cafed12c435f95be8ae38a8e5a5cf20ec6b706f --- firmware/App/Controllers/MixingControl.c (.../MixingControl.c) (revision 9862626891d641c84626e9b11373e523f5ef4208) +++ firmware/App/Controllers/MixingControl.c (.../MixingControl.c) (revision 3cafed12c435f95be8ae38a8e5a5cf20ec6b706f) @@ -130,8 +130,8 @@ #define TOTAL_CONDUCTIVITY ( ACID_CONDUCTIVITY_POST + BICARB_CONDUCTIVITY_POST ) ///< Theoretical Dialysate conductivity -#define FLOW_SETTING_FOR_STATIC_CONTROL_INTERVAL_UPDATE 100.0F -#define STATIC_CONTROL_INTERVAL ( 2 * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) +#define FLOW_SETTING_FOR_STATIC_CONTROL_INTERVAL_UPDATE 100.0F ///< Flowrate at which static update is applied for bicarb and dialysate +#define STATIC_CONTROL_INTERVAL ( 2 * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which dialysate and bicarb mix is controlled (for qd <= 100 mL/min) /// Enumeration of dialysate Mixing id. typedef enum DialysateMixingID { @@ -450,8 +450,8 @@ balChamberSwitchingFreq = tdDialysateFlowRate / 30.0; balChamberSwitchingPeriod = ( SEC_PER_MIN ) / (U32)balChamberSwitchingFreq; - // For acid control period, we are using 3 cycles of balancing chamber switching period (for ex: At Qd = 600, switching period = 3sec, so acid control interval = 3*3 = 9sec - // For bicarb control period, we are using 5 cycles of balancing chamber switching period (for ex: At Qd = 600, switching period = 3sec, so bicarb control interval = 3*5 = 15sec + // For bicarb control period, we are using 3 cycles of balancing chamber switching period (for ex: At Qd = 600, switching period = 3sec, so acid control interval = 3*3 = 9sec + // For acid control period, we are using 5 cycles of balancing chamber switching period (for ex: At Qd = 600, switching period = 3sec, so bicarb control interval = 3*5 = 15sec if ( ( balChamberSwitchingPeriod > 0 ) && ( tdDialysateFlowRate <= FLOW_SETTING_FOR_STATIC_CONTROL_INTERVAL_UPDATE ) ) { Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -r5075786897d42d24a93ae5485936b5d50c307f65 -r3cafed12c435f95be8ae38a8e5a5cf20ec6b706f --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 5075786897d42d24a93ae5485936b5d50c307f65) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 3cafed12c435f95be8ae38a8e5a5cf20ec6b706f) @@ -72,7 +72,7 @@ //Testing #define DELAY_BC_SWITCHING_AT_START_UP ( 10 * MS_PER_SECOND ) ///< Provide a balancing chamber switching start up delay to stabilize pump speed etc., -#define MAX_UF_RATE 150 +#define MAX_UF_RATE 150 ///< Rate at which D76 pump runs in Prime fluid discard state /// Payload record structure for Gen dialysate execution state set request typedef struct @@ -491,8 +491,7 @@ break; case DD_GEND_PRIME_FLUID_DISCARD_STATE: - // Deactivate Balancing Chamber Switching - //requestBalChamberSwitching( FALSE ); + // Turn off fresh & spent pumps signalDialysatePumpHardStop( D12_PUMP ); signalDialysatePumpHardStop( D48_PUMP ); @@ -846,7 +845,6 @@ isDialDeliveryInProgress.data = FALSE; state = DD_GEND_PRIME_FLUID_DISCARD_STATE; } - } return state; @@ -983,7 +981,7 @@ * The handleGenDPrimeFluidDiscardState function performs discarding the * priming fluid from disposable tube set. Runs the ultrafiltration pump (D76) * to discard the priming fluid. - * @details \b Inputs: none + * @details \b Inputs: getprimeFluidDiscardStatus * @details \b Outputs: none * @return next gen dialysate mode state *************************************************************************/ Index: firmware/App/Services/TDInterface.c =================================================================== diff -u -r5075786897d42d24a93ae5485936b5d50c307f65 -r3cafed12c435f95be8ae38a8e5a5cf20ec6b706f --- firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision 5075786897d42d24a93ae5485936b5d50c307f65) +++ firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision 3cafed12c435f95be8ae38a8e5a5cf20ec6b706f) @@ -125,6 +125,8 @@ tdSubMode = 0U; tdDialyzerBypass = FALSE; tdOpModeDataFreshFlag = FALSE; + chamberHValveOpen = FALSE; + primeFluidDiscardStart = FALSE; // Initialize treatment parameters from TD tdDialysateFlowrate.data = 0.0F;