M141 Heated Chamber, Temperature rework (#12201)

This commit is contained in:
3dlabsio
2019-03-07 00:09:39 -08:00
committed by Scott Lahteine
parent 44571775bd
commit 645ca7af7a
196 changed files with 2183 additions and 676 deletions

View File

@ -728,7 +728,7 @@ void MarlinSettings::postprocess() {
const PID_t bed_pid = { DUMMY_PID_VALUE, DUMMY_PID_VALUE, DUMMY_PID_VALUE };
EEPROM_WRITE(bed_pid);
#else
EEPROM_WRITE(thermalManager.bed_pid);
EEPROM_WRITE(thermalManager.temp_bed.pid);
#endif
}
@ -1448,7 +1448,7 @@ void MarlinSettings::postprocess() {
EEPROM_READ(pid);
#if ENABLED(PIDTEMPBED)
if (!validating && pid.Kp != DUMMY_PID_VALUE)
memcpy(&thermalManager.bed_pid, &pid, sizeof(pid));
memcpy(&thermalManager.temp_bed.pid, &pid, sizeof(pid));
#endif
}
@ -2181,9 +2181,9 @@ void MarlinSettings::reset() {
//
#if ENABLED(PIDTEMPBED)
thermalManager.bed_pid.Kp = DEFAULT_bedKp;
thermalManager.bed_pid.Ki = scalePID_i(DEFAULT_bedKi);
thermalManager.bed_pid.Kd = scalePID_d(DEFAULT_bedKd);
thermalManager.temp_bed.pid.Kp = DEFAULT_bedKp;
thermalManager.temp_bed.pid.Ki = scalePID_i(DEFAULT_bedKi);
thermalManager.temp_bed.pid.Kd = scalePID_d(DEFAULT_bedKd);
#endif
//
@ -2726,9 +2726,9 @@ void MarlinSettings::reset() {
#if ENABLED(PIDTEMPBED)
CONFIG_ECHO_START();
SERIAL_ECHOLNPAIR(
" M304 P", thermalManager.bed_pid.Kp
, " I", unscalePID_i(thermalManager.bed_pid.Ki)
, " D", unscalePID_d(thermalManager.bed_pid.Kd)
" M304 P", thermalManager.temp_bed.pid.Kp
, " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)
, " D", unscalePID_d(thermalManager.temp_bed.pid.Kd)
);
#endif