logging
This commit is contained in:
parent
013ccc67b0
commit
dcbd0b6234
@ -61,12 +61,10 @@ void patrixLoop() {
|
|||||||
heaterPWM = 0;
|
heaterPWM = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *emergencyStr = "HEATING";
|
const char *emergencyStr = "";
|
||||||
if (heaterPWM > 0 && temperatureCurrent > temperatureTarget + temperatureOver) {
|
if (heaterPWM > 0 && temperatureCurrent > temperatureTarget + temperatureOver) {
|
||||||
heaterPWM = 0;
|
heaterPWM = 0;
|
||||||
emergencyStr = "[EMERGENCY CUTOFF]";
|
emergencyStr = "[EMERGENCY CUTOFF]";
|
||||||
} else if (heaterPWM == 0) {
|
|
||||||
emergencyStr = "---";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
analogWrite(CONTROL_GPIO, (int) round(heaterPWM));
|
analogWrite(CONTROL_GPIO, (int) round(heaterPWM));
|
||||||
@ -77,13 +75,15 @@ void patrixLoop() {
|
|||||||
lastDebug = now;
|
lastDebug = now;
|
||||||
int heaterPercent = (int) round(100.0 * heaterPWM / CONTROL_PWM_MAX);
|
int heaterPercent = (int) round(100.0 * heaterPWM / CONTROL_PWM_MAX);
|
||||||
debug(
|
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,
|
proportional == 0 ? NAN : proportional,
|
||||||
integral == 0 ? NAN : integral,
|
integral == 0 ? NAN : integral,
|
||||||
derivative == 0 ? NAN : derivative,
|
derivative == 0 ? NAN : derivative,
|
||||||
|
|
||||||
temperatureTarget,
|
temperatureTarget,
|
||||||
temperatureCurrent,
|
|
||||||
heaterPercent,
|
heaterPercent,
|
||||||
|
temperatureCurrent,
|
||||||
|
|
||||||
emergencyStr
|
emergencyStr
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user