Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r95d7d8e230da1c04c2fed2be5a43afd273d95846 -ra1a0187daedaf2c12e6f9eccfbf9e423d952e029 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 95d7d8e230da1c04c2fed2be5a43afd273d95846) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision a1a0187daedaf2c12e6f9eccfbf9e423d952e029) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file DGInterface.c * * @author (last) Dara Navaei -* @date (last) 19-Sep-2023 +* @date (last) 15-Jul-2024 * * @author (original) Sean * @date (original) 08-Apr-2020 @@ -995,6 +995,7 @@ void cmdStartDGFlush( void ) { BOOL start = TRUE; + dgCmdResp[ DG_CMD_START_FLUSH ].commandID = DG_CMD_NONE; sendDGStartFlushModeCommand( start ); @@ -1011,25 +1012,26 @@ void cmdStopDGFlush( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_FLUSH ].commandID = DG_CMD_NONE; sendDGStartFlushModeCommand( start ); } /*********************************************************************//** * @brief - * The cmdStartDGHeatDisinfect function sends a start heat disinfect - * command message to the DG. + * The cmdStartDGHeatDisinfectActiveCool function sends a start heat disinfect + * with active cool command message to the DG. * @details Inputs: none * @details Outputs: start heat disinfect mode command sent to DG. * @return none *************************************************************************/ -void cmdStartDGHeatDisinfect( void ) +void cmdStartDGHeatDisinfectActiveCool( void ) { BOOL start = TRUE; - dgCmdResp[ DG_CMD_START_HEAT_DISINFECT ].commandID = DG_CMD_NONE; - sendDGStartHeatDisinfectModeCommand( start ); + dgCmdResp[ DG_CMD_START_HEAT_DISINFECT_ACTIVE_COOL ].commandID = DG_CMD_NONE; + sendDGStartHeatDisinfectActiveCoolModeCommand( start ); } /*********************************************************************//** @@ -1043,13 +1045,30 @@ void cmdStopDGHeatDisinfect( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_HEAT_DISINFECT ].commandID = DG_CMD_NONE; - sendDGStartHeatDisinfectModeCommand( start ); + sendDGStartHeatDisinfectActiveCoolModeCommand( start ); } /*********************************************************************//** * @brief + * The cmdStartDGHeatDisinfectPassiveCool function sends a start + * heat disinfect with passive cool command message to DG. + * @details Inputs: none + * @details Outputs: start heat disinfect with passive cool mode command sent to DG. + * @return none + *************************************************************************/ +void cmdStartDGHeatDisinfectPassiveCool( void ) +{ + BOOL start = TRUE; + + dgCmdResp[ DG_CMD_START_HEAT_DISINFECT_PASSIVE_COOL ].commandID = DG_CMD_NONE; + sendDGStartHeatDisinfectPassiveCoolModeCommand( start ); +} + +/*********************************************************************//** + * @brief * The cmdStartDGChemicalDisinfect function sends a start chemical disinfect * command message to the DG. * @details Inputs: none @@ -1059,6 +1078,7 @@ void cmdStartDGChemicalDisinfect( void ) { BOOL start = TRUE; + dgCmdResp[ DG_CMD_START_CHEM_DISINFECT ].commandID = DG_CMD_NONE; sendDGStartChemicalDisinfectModeCommand( start ); } @@ -1074,6 +1094,7 @@ void cmdStopDGChemicalDisinfect( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_CHEM_DISINFECT ].commandID = DG_CMD_NONE; sendDGStartChemicalDisinfectModeCommand( start ); } @@ -1089,6 +1110,7 @@ void cmdStartDGChemicalFlushDisinfect( void ) { BOOL start = TRUE; + dgCmdResp[ DG_CMD_START_CHEM_DISINFECT_FLUSH ].commandID = DG_CMD_NONE; sendDGStartStopChemicalDisinfectFlushModeCommand( start ); } @@ -1104,12 +1126,29 @@ void cmdStopDGChemFlushDisinfect( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_CHEM_DISINFECT_FLUSH ].commandID = DG_CMD_NONE; sendDGStartStopChemicalDisinfectFlushModeCommand( start ); } /*********************************************************************//** * @brief + * The cmdStartDGActiveCool function sends a start active cool command + * message to the DG. + * @details Inputs: none + * @details Outputs: start active cool mode command sent to DG. + * @return none + *************************************************************************/ +void cmdStartDGActiveCool( void ) +{ + BOOL start = TRUE; + + dgCmdResp[ DG_CMD_START_ACTIVE_COOL ].commandID = DG_CMD_NONE; + sendDGStopActiveCoolModeCommand( start ); +} + +/*********************************************************************//** + * @brief * The cmdStopDGActiveCool function sends a stop active cool command * message to the DG. * @details Inputs: none @@ -1118,8 +1157,10 @@ *************************************************************************/ void cmdStopDGActiveCool( void ) { + BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_ACTIVE_COOL ].commandID = DG_CMD_NONE; - sendDGStopActiveCoolModeCommand(); + sendDGStopActiveCoolModeCommand( start ); } /*********************************************************************//** @@ -1263,9 +1304,7 @@ BOOL isTempBelowTrigger = (BOOL)( isTDITempBelowLowSafety || isTDiTempBelowDialysateTarget ); BOOL isTempAboveTrigger = (BOOL)( isTDiTempAboveLowSafety || isTDiTempAboveDialysateTarget ); -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_DIALYSATE_TEMP_CHECK ) != SW_CONFIG_ENABLE_VALUE ) -#endif + if ( getTargetDialInFlowRate() > 0 ) { // check clear condition first if ( TRUE == isAlarmActive( ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_SAFETY_TEMP ) ) @@ -1286,6 +1325,12 @@ } checkPersistentAlarm(ALARM_ID_HD_DIALYSATE_TEMP_BELOW_TARGET_TEMP, isTempBelowTrigger, dgDialysateTemp, dgTrimmerTempSet ); } + else + { + checkPersistentAlarm(ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_SAFETY_TEMP, FALSE, dgDialysateTemp, dgTrimmerTempSet ); + checkPersistentAlarm(ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_TARGET_TEMP, FALSE, dgDialysateTemp, dgTrimmerTempSet ); + checkPersistentAlarm(ALARM_ID_HD_DIALYSATE_TEMP_BELOW_TARGET_TEMP, FALSE, dgDialysateTemp, dgTrimmerTempSet ); + } } // ********** private functions **********