Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -rf760ffc4b10556e5186e9ceb90294262063440ca -rd0f8958c30ff294da7e5088b89226f0ac30f3a36 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision f760ffc4b10556e5186e9ceb90294262063440ca) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision d0f8958c30ff294da7e5088b89226f0ac30f3a36) @@ -17,6 +17,7 @@ #include // To check for NaN +#include "Battery.h" #include "DialInFlow.h" #include "Dialysis.h" #include "DGDefs.h" @@ -223,23 +224,26 @@ *************************************************************************/ void execDGInterfaceMonitor( void ) { - // Trigger alarm if not receiving new load cell data message in timely manner - checkDGDataFreshness( ALARM_ID_HD_NEW_LOAD_CELL_DATA_MESSAGE_NOT_RECEIVE, &dgLoadCellDataFreshFlag ); + if ( isACPowerLost() != TRUE ) + { + // Trigger alarm if not receiving new load cell data message in timely manner + checkDGDataFreshness( ALARM_ID_HD_NEW_LOAD_CELL_DATA_MESSAGE_NOT_RECEIVE, &dgLoadCellDataFreshFlag ); - // Trigger alarm if not receiving new dialysate temperature data message in timely manner - checkDGDataFreshness( ALARM_ID_HD_NEW_DIALYSATE_TEMPERATURE_DATA_MESSAGE_NOT_RECEIVE, &dgDialysateTemperatureDataFreshFlag ); + // Trigger alarm if not receiving new dialysate temperature data message in timely manner + checkDGDataFreshness( ALARM_ID_HD_NEW_DIALYSATE_TEMPERATURE_DATA_MESSAGE_NOT_RECEIVE, &dgDialysateTemperatureDataFreshFlag ); - // Trigger alarm if not receiving new reservoirs data message in timely manner - checkDGDataFreshness( ALARM_ID_HD_NEW_RESERVOIRS_DATA_MESSAGE_NOT_RECEIVE, &dgReservoirsDataFreshFlag ); + // Trigger alarm if not receiving new reservoirs data message in timely manner + checkDGDataFreshness( ALARM_ID_HD_NEW_RESERVOIRS_DATA_MESSAGE_NOT_RECEIVE, &dgReservoirsDataFreshFlag ); - // Trigger alarm if not receiving new DG op mode message in timely manner - checkDGDataFreshness( ALARM_ID_HD_NEW_DG_OPERATION_MODE_MESSAGE_NOT_RECEIVE, &dgOpModeDataFreshFlag ); + // Trigger alarm if not receiving new DG op mode message in timely manner + checkDGDataFreshness( ALARM_ID_HD_NEW_DG_OPERATION_MODE_MESSAGE_NOT_RECEIVE, &dgOpModeDataFreshFlag ); - // Check to see if DG has restarted - checkDGRestart(); + // Check to see if DG has restarted + checkDGRestart(); - // Check the status of the trimmer heater - checkDGTrimmerHeaterStatus(); + // Check the status of the trimmer heater + checkDGTrimmerHeaterStatus(); + } } /*********************************************************************//** @@ -1157,18 +1161,21 @@ U32 trimmerState = dgHeatersData.trimmerHeaterState; DG_OP_MODE_T dgOp = getDGOpMode(); - if ( ( DG_MODE_GENE == dgOp ) || ( DG_MODE_FILL == dgOp ) || ( DG_MODE_DRAI == dgOp ) ) + if ( isACPowerLost() != TRUE ) { - // In heat disinfect and chemical disinfect, the trimmer heater is controlled by the DG itself so no commands from HD should be sent - // regarding the trimmer heater. - if ( ( TRUE == dgTrimmerHeaterOn ) && ( HEATER_EXEC_STATE_OFF == trimmerState ) ) + if ( ( DG_MODE_GENE == dgOp ) || ( DG_MODE_FILL == dgOp ) || ( DG_MODE_DRAI == dgOp ) ) { - cmdStartDGTrimmerHeater(); + // In heat disinfect and chemical disinfect, the trimmer heater is controlled by the DG itself so no commands from HD should be sent + // regarding the trimmer heater. + if ( ( TRUE == dgTrimmerHeaterOn ) && ( HEATER_EXEC_STATE_OFF == trimmerState ) ) + { + cmdStartDGTrimmerHeater(); + } + else if ( ( FALSE == dgTrimmerHeaterOn ) && ( trimmerState != HEATER_EXEC_STATE_OFF ) ) + { + cmdStopDGTrimmerHeater(); + } } - else if ( ( FALSE == dgTrimmerHeaterOn ) && ( trimmerState != HEATER_EXEC_STATE_OFF ) ) - { - cmdStopDGTrimmerHeater(); - } } }