Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -rfc3ad8a7cdeed09ed70feaeb3517c885e313dfcc -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision fc3ad8a7cdeed09ed70feaeb3517c885e313dfcc) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -113,10 +113,10 @@ static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1FillStart( void ); static BAL_CHAMBER_EXEC_STATE_T handleBalChamberConcentrateControl(void); -static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1ValvesClose( void ); +static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1FillDetectComplete( void ); static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1FillEnd(void); static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2FillStart( void ); -static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2ValvesClose( void ); +static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2FillDetectComplete( void ); static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2FillEnd(void); static BAL_CHAMBER_EXEC_STATE_T handleBalChamberStateIdle( void ); static void publishBalChamberData( void ); @@ -299,8 +299,8 @@ * @brief * The scheduleFirstCycleRelaxAfterQdApply function configures how many BC * switches still use first-cycle relaxations after a Qd timing update. - * @details One full BC cycle is two switches require two - * valve-close segments under the new timing before clearing relaxations. + * @details \b Inputs: none + * @details \b Outputs: bcSwitchingBasedOnClosedPeriodCounter * @return none *************************************************************************/ static void scheduleFirstCycleRelaxAfterQdApply( void ) @@ -384,8 +384,8 @@ balChamberExecState = handleBalChamberConcentrateControl(); break; - case BAL_CHAMBER_STATE1_VALVES_CLOSE: - balChamberExecState = handleBalChamberState1ValvesClose(); + case BAL_CHAMBER_STATE1_FILL_DETECT_COMPLETE: + balChamberExecState = handleBalChamberState1FillDetectComplete(); break; case BAL_CHAMBER_STATE1_FILL_END: @@ -400,8 +400,8 @@ balChamberExecState = handleBalChamberConcentrateControl(); break; - case BAL_CHAMBER_STATE2_VALVES_CLOSE: - balChamberExecState = handleBalChamberState2ValvesClose(); + case BAL_CHAMBER_STATE2_FILL_DETECT_COMPLETE: + balChamberExecState = handleBalChamberState2FillDetectComplete(); break; case BAL_CHAMBER_STATE2_FILL_END: @@ -723,12 +723,12 @@ { // Low-Qd spent slope: baseline = spent pressure on last dosing tick (this task period) before VALVES_CLOSE. prevSpentDialPressure = spentDialPressure; - state = BAL_CHAMBER_STATE1_VALVES_CLOSE; + state = BAL_CHAMBER_STATE1_FILL_DETECT_COMPLETE; } else { prevSpentDialPressure = spentDialPressure; - state = BAL_CHAMBER_STATE2_VALVES_CLOSE; + state = BAL_CHAMBER_STATE2_FILL_DETECT_COMPLETE; } } @@ -737,15 +737,15 @@ /*********************************************************************//** * @brief - * The handleBalChamberState1ValvesClose function check for the balancing chamber + * The handleBalChamberState1FillDetectComplete function check for the balancing chamber * fill complete and close the currently opened valves. * @details \b Inputs: currentBalChamberSwitchingCounter, spent and fresh dialysate pressure * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @return next balancing chamber state. *************************************************************************/ -static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1ValvesClose( void ) +static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1FillDetectComplete( void ) { - BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE1_VALVES_CLOSE; + BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE1_FILL_DETECT_COMPLETE; BOOL isBothFillsComplete = FALSE; BOOL isFirstCycleNotDone = FALSE; BOOL isFillCompleteOrFirstCycle = FALSE; @@ -754,7 +754,7 @@ spentDialPressure = getFilteredPressure( D51_PRES ); // After the first BC cycle, fault if fill never completes at the Qd-based timeout. - if ( currentBalChamberFillCounter > balChamberFillTimeoutCount ) + if ( ( currentBalChamberFillCounter > balChamberFillTimeoutCount ) && ( TRUE != getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) ) ) { SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_BC_FILL_TIMEOUT_FAULT, currentBalChamberFillCounter, balChamberFillTimeoutCount ); @@ -827,8 +827,6 @@ * balanceChamberSwitchingOnlyOffRequested * @details \b Alarm: ALARM_ID_DD_BC_STATE1_FILL_PRESSURE_DROP_OUT_OF_RANGE * when pressure drop is not in range during balancing chamber fill in progress. - * @details \b Alarm: ALARM_ID_DD_BC_STATE1_FILL_END_PRESSURE_OUT_OF_RANGE - * when pressure is not in range during balancing chamber fill complete. * @return next balancing chamber state. *************************************************************************/ static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState1FillEnd( void ) @@ -856,14 +854,6 @@ // Move to the idle state state = BAL_CHAMBER_STATE_IDLE; } - else if ( ( TRUE != isPressureStabilizedDuringFill ) && ( TRUE != isSpentFillComplete ) ) - { - // Alarm when switching time expired, but still pressure not in range which indicates fill is not yet completed. - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE1_FILL_END_PRESSURE_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); - - // Move to the idle state - state = BAL_CHAMBER_STATE_IDLE; - } else { // Move to next state when pressure is in range. @@ -1008,15 +998,15 @@ /*********************************************************************//** * @brief - * The handleBalChamberState2ValvesClose function check for the balancing chamber + * The handleBalChamberState2FillDetectComplete function check for the balancing chamber * fill complete and close the currently opened valves. * @details \b Inputs: currentBalChamberSwitchingCounter, spent and fresh dialysate pressure * @details \b Outputs: isPressureStalbilizedDuringFill,isBalChamberFillInProgress * @return next balancing chamber state. *************************************************************************/ -static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2ValvesClose( void ) +static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2FillDetectComplete( void ) { - BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE2_VALVES_CLOSE; + BAL_CHAMBER_EXEC_STATE_T state = BAL_CHAMBER_STATE2_FILL_DETECT_COMPLETE; BOOL isBothFillsComplete = FALSE; BOOL isFirstCycleNotDone = FALSE; BOOL isFillCompleteOrFirstCycle = FALSE; @@ -1040,7 +1030,7 @@ } // After the first BC cycle, fault if fill never completes at the Qd-based timeout. - if ( currentBalChamberFillCounter > balChamberFillTimeoutCount ) + if ( ( currentBalChamberFillCounter > balChamberFillTimeoutCount ) && ( TRUE != getTestConfigStatus( TEST_CONFIG_DD_DISABLE_BC_PRESSURE_ALARMS ) ) ) { SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_BC_FILL_TIMEOUT_FAULT, currentBalChamberFillCounter, balChamberFillTimeoutCount ); @@ -1108,8 +1098,6 @@ * balanceChamberSwitchingOnlyOffRequested * @details \b Alarm: ALARM_ID_DD_BC_STATE2_FILL_PRESSURE_DROP_OUT_OF_RANGE * when pressure is not in range during balacing chamber state 2 fill in progress. - * @details \b Alarm: ALARM_ID_DD_BC_STATE2_FILL_END_PRESSURE_OUT_OF_RANGE - * when pressure is not in range during balacing chamber state 2 fill complete. * @return next balancing chamber state. *************************************************************************/ static BAL_CHAMBER_EXEC_STATE_T handleBalChamberState2FillEnd( void ) @@ -1137,14 +1125,6 @@ // Move to the idle state state = BAL_CHAMBER_STATE_IDLE; } - else if ( ( TRUE != isPressureStabilizedDuringFill ) && ( TRUE != isSpentFillComplete ) ) - { - // Alarm when switching time expired, but still pressure not in range which indicates fill is not completed. - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DD_BC_STATE2_FILL_END_PRESSURE_OUT_OF_RANGE, freshDialPressure, spentDialPressure ); - - // Move to the idle state - state = BAL_CHAMBER_STATE_IDLE; - } else { // Move to next state when pressure is in range. @@ -1560,8 +1540,7 @@ data.balChamberExecState = (U32)balChamberExecState; data.balChamberSWState = (U32)balChamberSWState; data.balChamberSWFreq = getBalChamberSwitchingFreq(); - data.balChamberSwPeriod = getD48PumpSpeedForBCFill(); - data.isBalChamberFillInProgress = isSpentFillComplete; + data.isSpentFillComplete = isSpentFillComplete; data.currentBalChamberSwitchingCounter = currentBalChamberFillCounter; data.isPressureStabilizedDuringFill = isPressureStabilizedDuringFill; data.balChamberSWOnlyState = balanceChamberSwitchingOnly; Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -ra2ea8edd918761b403cbe2c00e1bfe2fc69be5ea -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision a2ea8edd918761b403cbe2c00e1bfe2fc69be5ea) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -852,8 +852,8 @@ concentratePumps[ pumpId ].currentPumpSpeed = 0.0F; // set target rate to zero pumpTargetSpeed[ pumpId ].data = 0.0F; pumpTargetRevCnt[ pumpId ].data = 0; - measuredPumpSpeed[ pumpId ].data = 0.0F; - concentratePumps[ pumpId ].pulseWidthUS = 0.0F; + measuredPumpSpeed[ pumpId ].data = 0.0F; + concentratePumps[ pumpId ].pulseWidthUS = 0.0F; isDosingCompleted [ pumpId ] = TRUE; // Disable the motor when stopping, to take next revolution count Index: firmware/App/Controllers/RinsePump.c =================================================================== diff -u -ra70a78cad6ecddf3a5bc84e77b24ebc123b54161 -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/Controllers/RinsePump.c (.../RinsePump.c) (revision a70a78cad6ecddf3a5bc84e77b24ebc123b54161) +++ firmware/App/Controllers/RinsePump.c (.../RinsePump.c) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -7,8 +7,8 @@ * * @file RinsePump.c * -* @author (last) Vinayakam Mani -* @date (last) 14-Apr-2026 +* @author (last) Raghu Kallala +* @date (last) 19-May-2026 * * @author (original) Vinayakam Mani * @date (original) 02-Oct-2025 Index: firmware/App/DDCommon.h =================================================================== diff -u -ra79080629608d58eef1193f56db1ccb4e5bfb906 -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/DDCommon.h (.../DDCommon.h) (revision a79080629608d58eef1193f56db1ccb4e5bfb906) +++ firmware/App/DDCommon.h (.../DDCommon.h) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -39,8 +39,8 @@ //Uncomment below if barometric pressure sensor reading available //#define __BARO_PRES_SENSOR__ 1 -//Uncomment below if TD is integrated with DD -#define ENABLE_ALARM_1 +//Uncomment below to disable the communication to dialin for blood leak embedded mode +//#define __BLOOD_LEAK_EMB_MODE_RESPONSE_DISABLED__ 1 //Uncomment below once characterization/study completed //#define ENABLE_ALARM_2 @@ -63,14 +63,14 @@ // comment below to disable bicarb multi level sensor for time based chamber F fill #define CONDUCTIVE_LEVEL_SENSOR_ENABLED 1 -//Uncomment below to enable d30 heater alarm(as all units are not equipped with d30 temp sensor) -//#define ENABLE_ALARM_3 +//Uncomment below to disable d30 heater alarm(as all units are not equipped with d30 temp sensor) +//#define __D30_TEMPERATURE_DISABLED__ -//Comment below to disable the DD too-many-bad-message-CRCs alarm. -#define __BAD_MSG_CRC_ALARM_ENABLED__ 1 +//Uncomment below to disable the DD too-many-bad-message-CRCs alarm. +//#define __BAD_MSG_CRC_ALARM_DISABLED__ 1 -//Comment below to disable the conductivity sensor alarms -#define ENABLE_ALARM_4 +//Uncomment below to disable the conductivity sensor alarms +//#define __CONDUCTIVITY_SENSOR_ALARMS_DISABLED__ #include Index: firmware/App/Drivers/ConductivitySensors.c =================================================================== diff -u -ra2ea8edd918761b403cbe2c00e1bfe2fc69be5ea -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/Drivers/ConductivitySensors.c (.../ConductivitySensors.c) (revision a2ea8edd918761b403cbe2c00e1bfe2fc69be5ea) +++ firmware/App/Drivers/ConductivitySensors.c (.../ConductivitySensors.c) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -554,7 +554,7 @@ if ( ++conductivitySensorStatus[ sensorId ].interalCondErrorCount > MAX_ALLOWED_UNCHANGED_CONDUCTIVITY_READS ) { //TODO: restore once conductivity sensor are calibrated and working -#ifndef ENABLE_ALARM_4 +#ifndef __CONDUCTIVITY_SENSOR_ALARMS_DISABLED__ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, sensorId ) #endif } @@ -570,7 +570,7 @@ if ( ++conductivitySensorStatus[ sensorId ].interalTempErrorCount > MAX_ALLOWED_UNCHANGED_CONDUCTIVITY_READS ) { //TODO: restore once conductivity sensor are calibrated and working -#ifndef ENABLE_ALARM_4 +#ifndef __CONDUCTIVITY_SENSOR_ALARMS_DISABLED__ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, sensorId ) #endif } @@ -581,7 +581,7 @@ if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CONDUCTIVITY_SENSOR_ERROR ) ) { //TODO: restore once conductivity sensor are calibrated and working -#ifndef ENABLE_ALARM_4 +#ifndef __CONDUCTIVITY_SENSOR_ALARMS_DISABLED__ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, sensorId ) #endif } @@ -701,7 +701,7 @@ if ( FALSE == result ) { //TODO: restore once conductivity sensor are calibrated and working -#ifndef ENABLE_ALARM_4 +#ifndef __CONDUCTIVITY_SENSOR_ALARMS_DISABLED__ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, sensorId, ( U32 )idx ) #endif } Index: firmware/App/Modes/FPModes/ModePreGenPermeate.c =================================================================== diff -u -ra70a78cad6ecddf3a5bc84e77b24ebc123b54161 -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/Modes/FPModes/ModePreGenPermeate.c (.../ModePreGenPermeate.c) (revision a70a78cad6ecddf3a5bc84e77b24ebc123b54161) +++ firmware/App/Modes/FPModes/ModePreGenPermeate.c (.../ModePreGenPermeate.c) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -7,8 +7,8 @@ * * @file ModePreGenPermeate.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 23-Apr-2026 +* @author (last) Raghu Kallala +* @date (last) 12-May-2026 * * @author (original) Michael Garthwaite * @date (original) 08-Sep-2025 Index: firmware/App/Monitors/Level.c =================================================================== diff -u -rfc3ad8a7cdeed09ed70feaeb3517c885e313dfcc -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/Monitors/Level.c (.../Level.c) (revision fc3ad8a7cdeed09ed70feaeb3517c885e313dfcc) +++ firmware/App/Monitors/Level.c (.../Level.c) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -28,6 +28,7 @@ */ // ********** private definitions ********** + #define LEVEL_SENSOR_LIQUID 0U ///< Level sensor digital low value (0 = liquid is detected, 1 = no liquid). #define FPGA_B1_HW_LEVEL_LOW 5 ///< Floater low level status for Beta 1.0 #define FPGA_B1_HW_LEVEL_MEDIUM 4 ///< Floater medium level status for Beta 1.0 Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -r87ee9712a928c58e3fe8b456bce567df0c6a2038 -rbc22e4fbb56800101e22ac1752c2f1b67541ba02 --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision 87ee9712a928c58e3fe8b456bce567df0c6a2038) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision bc22e4fbb56800101e22ac1752c2f1b67541ba02) @@ -382,7 +382,7 @@ *************************************************************************/ void checkDialysateTemperatureSensors( void ) { -#ifdef ENABLE_ALARM_3 +#ifndef __D30_TEMPERATURE_DISABLED__ DD_OP_MODE_T op = getCurrentOperationMode(); if ( ( DD_MODE_GEND == op ) || ( DD_MODE_HEAT == op ) )