Configurable Thermistor (#13888)

This commit is contained in:
doggyfan
2019-05-07 00:51:06 +01:00
committed by Scott Lahteine
parent 172abc305b
commit 23a8707ef1
183 changed files with 4575 additions and 151 deletions

View File

@ -243,6 +243,13 @@ typedef struct SettingsDataStruct {
//
PID_t bedPID; // M304 PID / M303 E-1 U
//
// User-defined Thermistors
//
#if HAS_USER_THERMISTORS
user_thermistor_t user_thermistor[USER_THERMISTORS]; // M305 P0 R4700 T100000 B3950
#endif
//
// HAS_LCD_CONTRAST
//
@ -800,6 +807,16 @@ void MarlinSettings::postprocess() {
#endif
}
//
// User-defined Thermistors
//
#if HAS_USER_THERMISTORS
{
_FIELD_TEST(user_thermistor);
EEPROM_WRITE(thermalManager.user_thermistor);
}
#endif
//
// LCD Contrast
//
@ -1579,6 +1596,16 @@ void MarlinSettings::postprocess() {
#endif
}
//
// User-defined Thermistors
//
#if HAS_USER_THERMISTORS
{
_FIELD_TEST(user_thermistor);
EEPROM_READ(thermalManager.user_thermistor);
}
#endif
//
// LCD Contrast
//
@ -2386,6 +2413,14 @@ void MarlinSettings::reset() {
thermalManager.temp_bed.pid.Kd = scalePID_d(DEFAULT_bedKd);
#endif
//
// User-Defined Thermistors
//
#if HAS_USER_THERMISTORS
thermalManager.reset_user_thermistors();
#endif
//
// LCD Contrast
//
@ -2951,6 +2986,12 @@ void MarlinSettings::reset() {
#endif // PIDTEMP || PIDTEMPBED
#if HAS_USER_THERMISTORS
CONFIG_ECHO_HEADING("User thermistors:");
for (uint8_t i = 0; i < USER_THERMISTORS; i++)
thermalManager.log_user_thermistor(i, true);
#endif
#if HAS_LCD_CONTRAST
CONFIG_ECHO_HEADING("LCD Contrast:");
CONFIG_ECHO_START();