logging
This commit is contained in:
parent
013ccc67b0
commit
dcbd0b6234
@ -61,12 +61,10 @@ void patrixLoop() {
|
||||
heaterPWM = 0;
|
||||
}
|
||||
|
||||
const char *emergencyStr = "HEATING";
|
||||
const char *emergencyStr = "";
|
||||
if (heaterPWM > 0 && temperatureCurrent > temperatureTarget + temperatureOver) {
|
||||
heaterPWM = 0;
|
||||
emergencyStr = "[EMERGENCY CUTOFF]";
|
||||
} else if (heaterPWM == 0) {
|
||||
emergencyStr = "---";
|
||||
}
|
||||
|
||||
analogWrite(CONTROL_GPIO, (int) round(heaterPWM));
|
||||
@ -77,13 +75,15 @@ void patrixLoop() {
|
||||
lastDebug = now;
|
||||
int heaterPercent = (int) round(100.0 * heaterPWM / CONTROL_PWM_MAX);
|
||||
debug(
|
||||
"p: %.12f | i: %.12f | d: %.12f | dst: %4.1f^C | cur: %5.2f^C | heat: %3d%% | %s",
|
||||
"p: %f | i: %f | d: %f | t: %4.1f | %3d%% | %5.2f %s",
|
||||
proportional == 0 ? NAN : proportional,
|
||||
integral == 0 ? NAN : integral,
|
||||
derivative == 0 ? NAN : derivative,
|
||||
|
||||
temperatureTarget,
|
||||
temperatureCurrent,
|
||||
heaterPercent,
|
||||
temperatureCurrent,
|
||||
|
||||
emergencyStr
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user