Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r1440a4a2be8d12edebd405a20807882e5d32d619 -re608f0a2bda2ad8df59a604a511cbd2a1c323dc3 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 1440a4a2be8d12edebd405a20807882e5d32d619) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision e608f0a2bda2ad8df59a604a511cbd2a1c323dc3) @@ -217,6 +217,18 @@ /*********************************************************************//** * @brief + * The isHeaterOn function returns the heater status whether it is on or off + * @details Inputs: none + * @details Outputs: heaterStatus + * @return heater on/off status + *************************************************************************/ +BOOL isHeaterOn( DG_HEATERS_T heater ) +{ + return heatersStatus[ heater ].isHeaterOn; +} + +/*********************************************************************//** + * @brief * The startPrimaryHeater function starts the primary heaters. It resets * the primary heaters state and sets the main primary heater duty cycle. * @details Inputs: primaryHeaterTargetTemperature @@ -588,7 +600,7 @@ { HEATERS_STATE_T state = HEATER_EXEC_STATE_CONTROL_TO_DISINFECT_TARGET; F32 currentTemperature = getTemperatureValue( TEMPSENSORS_OUTLET_PRIMARY_HEATER ); - F32 targetTemperature = heatersStatus[ DG_PRIMARY_HEATER ].targetTemp; + F32 targetTemperature = heatersStatus[ heater ].targetTemp; if ( currentTemperature < targetTemperature ) {