Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r2fff37fa585181917705645494549b5fd4a4d522 -r8b0c842f94e3c94cecf62f0f913e429def8e5efa --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 2fff37fa585181917705645494549b5fd4a4d522) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 8b0c842f94e3c94cecf62f0f913e429def8e5efa) @@ -24,7 +24,6 @@ #include "DGDefs.h" #include "Heaters.h" #include "OperationModes.h" -#include "PersistentAlarm.h" #include "PIControllers.h" #include "ROPump.h" #include "SafetyShutdown.h" @@ -177,10 +176,6 @@ // Initialize the PI controller for the trimmer heater initializePIController( PI_CONTROLLER_ID_TRIMMER_HEATER, HEATERS_MIN_DUTY_CYCLE, TRIMMER_HEATER_P_COEFFICIENT, TRIMMER_HEATER_I_COEFFICIENT, HEATERS_MIN_DUTY_CYCLE, TRIMMER_HEATER_MAX_DUTY_CYCLE ); - - // Initialize the persistent alarm for heaters' internal temperature out of range - initPersistentAlarm( ALARM_ID_DG_PRIMARY_HEATERS_INTERNAL_TEMP_OUT_OF_RANGE, 0, HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_TIMEOUT_MS ); - initPersistentAlarm( ALARM_ID_DG_TRIMMER_HEATER_INTERNAL_TEMP_OUT_OF_RANGE, 0, HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_TIMEOUT_MS ); } /*********************************************************************//** @@ -336,20 +331,43 @@ F32 trimmerHeaterInternalTemp = getTemperatureValue( TEMPSENSORS_TRIMMER_HEATER_INTERNAL ); // Check if the primary heaters' internal temperature is above the limit - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_DG_PRIMARY_HEATERS_INTERNAL_TEMP_OUT_OF_RANGE, - primaryHeatersInternalTemp > HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_C ) ) + if ( primaryHeatersInternalTemp > HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_C ) { - activateSafetyShutdown(); SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_PRIMARY_HEATERS_INTERNAL_TEMP_OUT_OF_RANGE, primaryHeatersInternalTemp ); + + // If it is above the range for the first time, stop the primary heaters + // and set the variables + if ( FALSE == isPrimaryHeatersTempOutOfRange ) + { + stopPrimaryHeater(); + isPrimaryHeatersTempOutOfRange = TRUE; + primaryHeatersInternalTempOutTimer = getMSTimerCount(); + } + // If the primary heaters internal temperature was out for more than the define period, activate the safety shutdown + else if ( TRUE == didTimeout( primaryHeatersInternalTempOutTimer, HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_TIMEOUT_MS ) ) + { + activateSafetyShutdown(); + } } // Check if the trimmer heater internal temperature is above the limit - - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_DG_PRIMARY_HEATERS_INTERNAL_TEMP_OUT_OF_RANGE, - primaryHeatersInternalTemp > HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_C ) ) + if ( trimmerHeaterInternalTemp > HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_C ) { - activateSafetyShutdown(); SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_TRIMMER_HEATER_INTERNAL_TEMP_OUT_OF_RANGE, trimmerHeaterInternalTemp ); + + // If it is above the range for the first time, stop the trimmer heater + // and set the variables + if ( FALSE == isTrimmerHeaterTempOutOfRange ) + { + stopTrimmerHeater(); + isTrimmerHeaterTempOutOfRange = TRUE; + trimmerHeaterInternalTempOutTimer = getMSTimerCount(); + } + // If the trimmer heater internal temperature was out for more than the define period, activate the safety shutdown + else if ( TRUE == didTimeout( trimmerHeaterInternalTempOutTimer, HEATERS_MAX_ALLOWED_INTERNAL_TEMPERATURE_TIMEOUT_MS ) ) + { + activateSafetyShutdown(); + } } #endif Index: firmware/App/Modes/ModeChemicalDisinfect.h =================================================================== diff -u -r3f7d30b23906496854054949d4491f3bae6ef3c4 -r8b0c842f94e3c94cecf62f0f913e429def8e5efa --- firmware/App/Modes/ModeChemicalDisinfect.h (.../ModeChemicalDisinfect.h) (revision 3f7d30b23906496854054949d4491f3bae6ef3c4) +++ firmware/App/Modes/ModeChemicalDisinfect.h (.../ModeChemicalDisinfect.h) (revision 8b0c842f94e3c94cecf62f0f913e429def8e5efa) @@ -31,20 +31,6 @@ // ********** public definitions ********** -/// Chemical disinfect data -typedef struct -{ - U32 chemDisinfectState; ///< Chemical disinfect state. - U32 overallElapsedTime; ///< Overall elapsed time in chemical disinfect mode. - U32 stateElapsedTime; ///< Current chemical disinfect elapsed time. - U32 cancellationMode; ///< Chemical disinfect cancellation mode. - F32 R1FillLevel; ///< Reservoir 1 level upon starting the chemical disinfect. - F32 R2FillLevel; ///< Reservoir 2 level upon starting the chemical disinfect. - U32 postDisinfectTargetRinseCount; ///< Target post disinfect rinse count. - U32 postDisinfectCurrentRinseCount; ///< Current post disinfect rinse count. - U32 chemDisinfectUIState; ///< Chemical disinfect UI state. -} MODE_CHEMICAL_DISINFECT_DATA_T; - /// Chemical disinfect UI data typedef struct { Index: firmware/App/Modes/ModeFlush.h =================================================================== diff -u -rd7926685f2fe3086bab183166119f0965a192a69 -r8b0c842f94e3c94cecf62f0f913e429def8e5efa --- firmware/App/Modes/ModeFlush.h (.../ModeFlush.h) (revision d7926685f2fe3086bab183166119f0965a192a69) +++ firmware/App/Modes/ModeFlush.h (.../ModeFlush.h) (revision 8b0c842f94e3c94cecf62f0f913e429def8e5efa) @@ -31,15 +31,6 @@ // ********** public definitions ********** -/// Flush mode data publish struct -typedef struct -{ - U32 flushState; ///< Flush state. - U32 overallElapsedTime; ///< Overall elapsed time in flush mode. - U32 stateElapsedTime; ///< Current flush elapsed time. - F32 drainLineVolume; ///< Drain line volume. -} MODE_FLUSH_DATA_T; - // ********** public function prototypes ********** void initFlushMode( void ); // initialize this module Index: firmware/App/Services/AlarmMgmtSWFaults.h =================================================================== diff -u -r5a36a768d11cc597a36b894c1fb3a5e5590130f1 -r8b0c842f94e3c94cecf62f0f913e429def8e5efa --- firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 5a36a768d11cc597a36b894c1fb3a5e5590130f1) +++ firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 8b0c842f94e3c94cecf62f0f913e429def8e5efa) @@ -124,6 +124,7 @@ SW_FAULT_ID_INVALID_VOLTAGE_MONITOR_STATE, SW_FAULT_ID_INVALID_MONITORED_VOLTAGE_ID, SW_FAULT_ID_INVALID_LOAD_CELL_ID, // 95 + SW_FAULT_ID_DG_CHEM_DISINFECT_INVALID_EXEC_STATE, NUM_OF_SW_FAULT_IDS } SW_FAULT_ID_T;