heater.c: remove some unneccessary #ifdef DEBUG.
These are redundant, the wrapped if() will be optimized away for non-debug builds. The same strategy is used in many other places.
This commit is contained in:
parent
5b5032f87f
commit
41e208a21f
5
heater.c
5
heater.c
|
|
@ -343,10 +343,8 @@ void heater_tick(heater_t h, temp_type_t type, uint16_t current_temp, uint16_t t
|
|||
else
|
||||
pid_output = pid_output_intermed & 0xFF;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (DEBUG_PID && (debug_flags & DEBUG_PID))
|
||||
sersendf_P(PSTR("T{E:%d, P:%d * %ld = %ld / I:%d * %ld = %ld / D:%d * %ld = %ld # O: %ld = %u}\n"), t_error, heater_p, heaters_pid[h].p_factor, (int32_t) heater_p * heaters_pid[h].p_factor / PID_SCALE, heaters_runtime[h].heater_i, heaters_pid[h].i_factor, (int32_t) heaters_runtime[h].heater_i * heaters_pid[h].i_factor / PID_SCALE, heater_d, heaters_pid[h].d_factor, (int32_t) heater_d * heaters_pid[h].d_factor / PID_SCALE, pid_output_intermed, pid_output);
|
||||
#endif
|
||||
#else
|
||||
if (current_temp >= target_temp + (TEMP_HYSTERESIS))
|
||||
pid_output = BANG_BANG_OFF;
|
||||
|
|
@ -428,10 +426,9 @@ void heater_set(heater_t index, uint8_t value) {
|
|||
|
||||
if (heaters[index].heater_pwm) {
|
||||
*(heaters[index].heater_pwm) = value;
|
||||
#ifdef DEBUG
|
||||
|
||||
if (DEBUG_PID && (debug_flags & DEBUG_PID))
|
||||
sersendf_P(PSTR("PWM{%u = %u}\n"), index, *heaters[index].heater_pwm);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if (value >= HEATER_THRESHOLD)
|
||||
|
|
|
|||
Loading…
Reference in New Issue