Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r45a4cb0693621b5dc1cf7b1ae237d916856b6c41 -r3efd50bef6d3618b9fed1727aa2bc234ededee2a --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 45a4cb0693621b5dc1cf7b1ae237d916856b6c41) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 3efd50bef6d3618b9fed1727aa2bc234ededee2a) @@ -71,7 +71,7 @@ #define TRIMMER_HEATER_CONTROL_INTERVAL_COUNT ( ( 30 * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ) ///< Trimmer heater control interval count. #define TRIMMER_HEATER_MIN_DIALYSATE_FLOWRATE_LPM 0.00F ///< Trimmer heater minimum dialysate flow rate in L/min. -#define DELTA_TEMPERATURE_TIME_COSNTANT_C 8.6F ///< Delta temperature calculated from time constant. +#define DELTA_TEMPERATURE_TIME_CONSTANT_C 8.6F ///< Delta temperature calculated from time constant. #define PRIMARY_HEATER_DUTY_CYCLE_PER_TEMPERATURE_C 0.015F ///< Primary heaters duty cycle per temperature in C. #define DATA_PUBLISH_COUNTER_START_COUNT 70 ///< Data publish counter start count. #define MIN_RO_HEATER_FLOWRATE_LPM 0.2F ///< Minimum target RO heater flow rate in L/min. @@ -91,7 +91,7 @@ BOOL startHeaterSignal; ///< Heater start indication flag. BOOL isHeaterOn; ///< Heater on/off status flag. OVERRIDE_F32_T dutyCycle; ///< Heater duty cycle. - F32 targetFlowLPM; ///< Heater target flow in L/min. + F32 targetFlowLPM; ///< Heater target flow in L/min to calculate the duty cycle. F32 nomTargetFlowLPM; ///< Heater nominal target flow in L/min. BOOL hasTargetTempChanged; ///< Heater target temperature change flag indicator. F32 heaterEstGain; ///< Heater estimation gain during the run. @@ -526,13 +526,13 @@ if ( DG_MODE_FILL == opMode ) { // If the previous average fill flow rate is 0, use the nominal target RO flow from the RO pump - targetFlowLPM = ( getAvgFillFlowRateLPM() - 0.0F > NEARLY_ZERO ? getAvgFillFlowRateLPM() : getTargetROPumpFlowRateLPM() ); + targetFlowLPM = ( getAvgFillFlowRateLPM() > NEARLY_ZERO ? getAvgFillFlowRateLPM() : getTargetROPumpFlowRateLPM() ); dutyCycle = calculatePrimaryHeaterDutyCycle( targetTemperature, inletTemperature, targetFlowLPM, TRUE ); state = HEATER_EXEC_STATE_PRIMARY_CONTROL_TO_TARGET; } else if ( ( DG_MODE_GENE == opMode ) || ( DG_MODE_DRAI == opMode ) ) { - targetTemperature += DELTA_TEMPERATURE_TIME_COSNTANT_C; + targetTemperature += DELTA_TEMPERATURE_TIME_CONSTANT_C; targetFlowLPM = getTargetROPumpFlowRateLPM(); dutyCycle = calculatePrimaryHeaterDutyCycle( targetTemperature, inletTemperature, targetFlowLPM, FALSE ); state = HEATER_EXEC_STATE_PRIMARY_CONTROL_TO_TARGET; @@ -783,7 +783,7 @@ * @details Inputs: none * @details Outputs: none * @param targetTemperature target temperature of the heater - * @oaram currentTemperature current inlet temperature of the heater + * @param currentTemperature current inlet temperature of the heater * @param flow current flow * @return calculated duty cycle *************************************************************************/ @@ -808,7 +808,7 @@ * @details Inputs: none * @details Outputs: none * @param targetTemperature target temperature of the heater - * @oaram currentTemperature current inlet temperature of the heater + * @param currentTemperature current inlet temperature of the heater * @param flow current flow * @param check efficiency flag to indicate whether to consider heater's * efficiency