Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r640525dbad258a32c5dfecdc29268b432f72fb43 -r9a6e9998ef5fe9111c87e1bf948975a654d695ef --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 640525dbad258a32c5dfecdc29268b432f72fb43) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 9a6e9998ef5fe9111c87e1bf948975a654d695ef) @@ -7,8 +7,8 @@ * * @file DGInterface.c * -* @author (last) Dara Navaei -* @date (last) 19-Sep-2023 +* @author (last) Sean Nash +* @date (last) 29-Nov-2023 * * @author (original) Sean * @date (original) 08-Apr-2020 @@ -25,7 +25,7 @@ #include "ModeInitPOST.h" #include "ModeTreatment.h" #include "ModeTreatmentParams.h" -#include "OperationModes.h" +#include "OperationModes.h" #include "PersistentAlarm.h" #include "SystemComm.h" #include "SystemCommMessages.h" @@ -57,12 +57,12 @@ // ********** private data ********** -// DG status -static DG_OP_MODE_T dgCurrentOpMode; ///< Current DG operation mode. +// DG status +static DG_OP_MODE_T dgCurrentOpMode; ///< Current DG operation mode. static U32 dgSubMode; ///< Current state (sub-mode) of current DG operation mode. -static BOOL dgStartCommandSent; ///< Flag indicates command to start DG has been sent. -static BOOL dgStarted; ///< Flag indicates whether we have commanded the DG to start or stop. -static BOOL dgTrimmerHeaterOn; ///< Flag indicates whether we have commanded the DG to start or stop the trimmer heater. +static BOOL dgStartCommandSent; ///< Flag indicates command to start DG has been sent. +static BOOL dgStarted; ///< Flag indicates whether we have commanded the DG to start or stop. +static BOOL dgTrimmerHeaterOn; ///< Flag indicates whether we have commanded the DG to start or stop the trimmer heater. // DG sensor data static F32 dgDialysateTemp; ///< Dialysate temperature reported by the DG. @@ -127,8 +127,8 @@ U32 i, j; // NOTE: the active reservoir is set to reservoir 1 since DG will send active reservoir 1 as active on power up - dgStarted = FALSE; - dgTrimmerHeaterOn = FALSE; + dgStarted = FALSE; + dgTrimmerHeaterOn = FALSE; dgTrimmerTempSet = 0.0F; dgTrimmerTempCheckTimerCtr = 0; dgActiveReservoirSet = DG_RESERVOIR_2; @@ -508,14 +508,14 @@ /*********************************************************************//** * @brief - * The getDialysateTemperature function gets the latest dialysate temperature. - * @details Inputs: dgDialysateTemp + * The getDGDisinfectsStates function returns the DG disinfects readings. + * @details Inputs: none * @details Outputs: none - * @return the latest dialysate temperature + * @return the current DG disinfects readings *************************************************************************/ -F32 getDialysateTemperature( void ) +DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ) { - return dgDialysateTemp; + return disinfectsStatus; } /*********************************************************************//** @@ -559,14 +559,14 @@ /*********************************************************************//** * @brief - * The getDGDisinfectsStates function returns the DG disinfects readings. - * @details Inputs: disinfectsStatus + * The getDialysateTemperature function returns the DG dialysate temperature. + * @details Inputs: dgDialysateTemp * @details Outputs: none - * @return the current DG disinfects readings + * @return the latest dialysate temperature *************************************************************************/ -DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ) +F32 getDialysateTemperature( void ) { - return disinfectsStatus; + return dgDialysateTemp; } /*********************************************************************//** @@ -1045,6 +1045,7 @@ void cmdStartDGFlush( void ) { BOOL start = TRUE; + dgCmdResp[ DG_CMD_START_FLUSH ].commandID = DG_CMD_NONE; sendDGStartFlushModeCommand( start ); @@ -1061,6 +1062,7 @@ void cmdStopDGFlush( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_FLUSH ].commandID = DG_CMD_NONE; sendDGStartFlushModeCommand( start ); @@ -1077,6 +1079,7 @@ void cmdStartDGHeatDisinfect( void ) { BOOL start = TRUE; + dgCmdResp[ DG_CMD_START_HEAT_DISINFECT ].commandID = DG_CMD_NONE; sendDGStartHeatDisinfectModeCommand( start ); @@ -1093,6 +1096,7 @@ void cmdStopDGHeatDisinfect( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_HEAT_DISINFECT ].commandID = DG_CMD_NONE; sendDGStartHeatDisinfectModeCommand( start ); @@ -1109,6 +1113,7 @@ void cmdStartDGChemicalDisinfect( void ) { BOOL start = TRUE; + dgCmdResp[ DG_CMD_START_CHEM_DISINFECT ].commandID = DG_CMD_NONE; sendDGStartChemicalDisinfectModeCommand( start ); } @@ -1124,6 +1129,7 @@ void cmdStopDGChemicalDisinfect( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_CHEM_DISINFECT ].commandID = DG_CMD_NONE; sendDGStartChemicalDisinfectModeCommand( start ); } @@ -1139,6 +1145,7 @@ void cmdStartDGChemicalFlushDisinfect( void ) { BOOL start = TRUE; + dgCmdResp[ DG_CMD_START_CHEM_DISINFECT_FLUSH ].commandID = DG_CMD_NONE; sendDGStartStopChemicalDisinfectFlushModeCommand( start ); } @@ -1154,6 +1161,7 @@ void cmdStopDGChemFlushDisinfect( void ) { BOOL start = FALSE; + dgCmdResp[ DG_CMD_STOP_CHEM_DISINFECT_FLUSH ].commandID = DG_CMD_NONE; sendDGStartStopChemicalDisinfectFlushModeCommand( start ); } Index: firmware/App/Controllers/DGInterface.h =================================================================== diff -u -r640525dbad258a32c5dfecdc29268b432f72fb43 -r9a6e9998ef5fe9111c87e1bf948975a654d695ef --- firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 640525dbad258a32c5dfecdc29268b432f72fb43) +++ firmware/App/Controllers/DGInterface.h (.../DGInterface.h) (revision 9a6e9998ef5fe9111c87e1bf948975a654d695ef) @@ -137,6 +137,7 @@ F32 getHeatDisinfectTemperatureSensorValue( void ); BOOL getTrimmerHeaterCommandedOn( void ); DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ); +F32 getDialysateTemperature( void ); DG_MIXING_RATIOS_T getDGMixingRatios( void ); void getHDVersionDGServiceAndUsageData( DG_SERVICE_AND_USAGE_DATA_T* data ); void resetTdiTempCounters (void);