Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r2c08db070a6e09306caf461e7aceeb53097fd995 -re6f434d5316d647bdcafd12d60c9ae2cdaa1af76 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 2c08db070a6e09306caf461e7aceeb53097fd995) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision e6f434d5316d647bdcafd12d60c9ae2cdaa1af76) @@ -8,7 +8,7 @@ * @file Heaters.c * * @author (last) Dara Navaei -* @date (last) 02-Dec-2022 +* @date (last) 11-Jan-2023 * * @author (original) Dara Navaei * @date (original) 23-Apr-2020 @@ -723,7 +723,7 @@ * @brief * The setHeaterDutyCycle function sets the duty cycle of a heater. * @details Inputs: none - * @details Outputs: none + * @details Outputs: heatersStatus * @param heater: The heater Id that its duty cycle is set * @param pwm: The PWM that is set * @return none @@ -918,7 +918,7 @@ /*********************************************************************//** * @brief - * The publishTemperatureData function publishes the heaters data into + * The publishHeatersData function publishes the heaters data info * at the defined time interval. * @details Inputs: dataPublicationTimerCounter * @details Outputs: dataPublicationTimerCounter @@ -963,9 +963,9 @@ F32 trimmerVoltage = getMonitoredLineLevel( MONITORED_LINE_24V_GND_TRIM_HTR_V ); // Voltage to PWM is reverse. If PWM = 0 -> V = 24V - F32 mainPriDC = heatersStatus[ DG_PRIMARY_HEATER ].dutyCycle.data; - F32 smallPriDC = heatersStatus[ DG_PRIMARY_HEATER ].dutyCycle.data; - F32 trimmerDC = heatersStatus[ DG_TRIMMER_HEATER ].dutyCycle.data; + F32 mainPriDC = getHeaterDutyCycle( DG_PRIMARY_HEATER ); + F32 smallPriDC = getHeaterDutyCycle( DG_PRIMARY_HEATER ); + F32 trimmerDC = getHeaterDutyCycle( DG_TRIMMER_HEATER ); // The expected voltage is the inverse of the duty cycle F32 mainPriExpectedVoltage = HEATERS_MAX_OPERATING_VOLTAGE_V * ( 1.0F - mainPriDC );