From c6bcce6bca29c3cbb3dfc56a35cf8157ca73559e Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:55:25 +1200 Subject: [PATCH 1/5] update menu info --- Marlin/src/inc/Conditionals_LCD.h | 6 + Marlin/src/lcd/menu/menu_info.cpp | 189 ++++++++++++++++++------------ Marlin/src/lcd/thermistornames.h | 4 + 3 files changed, 121 insertions(+), 78 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 573cfb0d3c75..55ceacb073bb 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1912,3 +1912,9 @@ #if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE) #define SPI_FLASH_BACKUP 1 #endif + +/** + * HAS_THERMISTOR + */ +#define HAS_THERMISTOR TEMP_SENSOR_0 | TEMP_SENSOR_1 | TEMP_SENSOR_2 | TEMP_SENSOR_3 | TEMP_SENSOR_4 | TEMP_SENSOR_5 | TEMP_SENSOR_6 | TEMP_SENSOR_7 \ + | TEMP_SENSOR_BED | TEMP_SENSOR_PROBE | TEMP_SENSOR_CHAMBER | TEMP_SENSOR_COOLER | TEMP_SENSOR_BOARD | TEMP_SENSOR_SOC | TEMP_SENSOR_REDUNDANT diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 9015a9fe6d80..4043fbb79d38 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -95,96 +95,129 @@ // // About Printer > Thermistors // -void menu_info_thermistors() { - if (ui.use_click()) return ui.go_back(); +#if HAS_THERMISTOR + void menu_info_thermistors() { + if (ui.use_click()) return ui.go_back(); - START_SCREEN(); + START_SCREEN(); - #define THERM_ITEMS(LBL,HTR,WAT) \ - STATIC_ITEM_F(F(LBL ": " THERMISTOR_NAME), SS_INVERT); \ - PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HTR##_MINTEMP), SS_FULL); \ - PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HTR##_MAXTEMP), SS_FULL); \ - STATIC_ITEM(TERN(WAT, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL) \ - - #if HAS_EXTRUDERS - #define THERMISTOR_ID TEMP_SENSOR_0 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E0, HEATER_0, WATCH_HOTENDS); - #endif + #define THERM_ITEMS(LBL) \ + STATIC_ITEM_F(F(LBL ": " THERMISTOR_NAME), SS_INVERT); - #if TEMP_SENSOR_1 != 0 - #define THERMISTOR_ID TEMP_SENSOR_1 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E1, HEATER_1, WATCH_HOTENDS); - #endif + #define THERM_ITEMS_FULL(LBL,HTR,WAT) \ + THERM_ITEMS(LBL) \ + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HTR##_MINTEMP), SS_FULL); \ + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HTR##_MAXTEMP), SS_FULL); \ + STATIC_ITEM(TERN(WAT, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL) \ - #if TEMP_SENSOR_2 != 0 - #define THERMISTOR_ID TEMP_SENSOR_2 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E2, HEATER_2, WATCH_HOTENDS); - #endif + #if TEMP_SENSOR_0 != 0 + #define THERMISTOR_ID TEMP_SENSOR_0 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E0, HEATER_0, WATCH_HOTENDS); + #endif - #if TEMP_SENSOR_3 != 0 - #define THERMISTOR_ID TEMP_SENSOR_3 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E3, HEATER_3, WATCH_HOTENDS); - #endif + #if TEMP_SENSOR_1 != 0 + #define THERMISTOR_ID TEMP_SENSOR_1 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E1, HEATER_1, WATCH_HOTENDS); + #endif - #if TEMP_SENSOR_4 != 0 - #define THERMISTOR_ID TEMP_SENSOR_4 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E4, HEATER_4, WATCH_HOTENDS); - #endif + #if TEMP_SENSOR_2 != 0 + #define THERMISTOR_ID TEMP_SENSOR_2 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E2, HEATER_2, WATCH_HOTENDS); + #endif - #if TEMP_SENSOR_5 != 0 - #define THERMISTOR_ID TEMP_SENSOR_5 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E5, HEATER_5, WATCH_HOTENDS); - #endif + #if TEMP_SENSOR_3 != 0 + #define THERMISTOR_ID TEMP_SENSOR_3 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E3, HEATER_3, WATCH_HOTENDS); + #endif - #if TEMP_SENSOR_6 != 0 - #define THERMISTOR_ID TEMP_SENSOR_6 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E6, HEATER_6, WATCH_HOTENDS); - #endif + #if TEMP_SENSOR_4 != 0 + #define THERMISTOR_ID TEMP_SENSOR_4 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E4, HEATER_4, WATCH_HOTENDS); + #endif - #if TEMP_SENSOR_7 != 0 - #define THERMISTOR_ID TEMP_SENSOR_7 - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS(STR_E7, HEATER_7, WATCH_HOTENDS); - #endif + #if TEMP_SENSOR_5 != 0 + #define THERMISTOR_ID TEMP_SENSOR_5 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E5, HEATER_5, WATCH_HOTENDS); + #endif - #if HAS_HEATED_BED - #define THERMISTOR_ID TEMP_SENSOR_BED - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS("BED", BED, WATCH_BED); - #endif + #if TEMP_SENSOR_6 != 0 + #define THERMISTOR_ID TEMP_SENSOR_6 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E6, HEATER_6, WATCH_HOTENDS); + #endif - #if HAS_HEATED_CHAMBER - #define THERMISTOR_ID TEMP_SENSOR_CHAMBER - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS("CHAM", CHAMBER, WATCH_CHAMBER); - #endif + #if TEMP_SENSOR_7 != 0 + #define THERMISTOR_ID TEMP_SENSOR_7 + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL(STR_E7, HEATER_7, WATCH_HOTENDS); + #endif - #if HAS_COOLER - #define THERMISTOR_ID TEMP_SENSOR_COOLER - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS("COOL", COOLER, WATCH_COOLER); - #endif + #if HAS_HEATED_BED + #define THERMISTOR_ID TEMP_SENSOR_BED + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL("BED", BED, WATCH_BED); + #endif - END_SCREEN(); -} + #if HAS_HEATED_CHAMBER + #define THERMISTOR_ID TEMP_SENSOR_CHAMBER + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL("CHAM", CHAMBER, WATCH_CHAMBER); + #endif + + #if HAS_COOLER + #define THERMISTOR_ID TEMP_SENSOR_COOLER + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS_FULL("COOL", COOLER, WATCH_COOLER); + #endif + + #if TEMP_SENSOR_PROBE != 0 + #define THERMISTOR_ID TEMP_SENSOR_PROBE + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS("PROBE"); + #endif + + #if TEMP_SENSOR_BOARD != 0 + #define THERMISTOR_ID TEMP_SENSOR_BOARD + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS("BOARD"); + #endif + + #if TEMP_SENSOR_SOC != 0 + #define THERMISTOR_ID TEMP_SENSOR_SOC + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS("SOC"); + #endif + + #if TEMP_SENSOR_REDUNDANT != 0 + #define THERMISTOR_ID TEMP_SENSOR_REDUNDANT + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS("REDUNDANT"); + #endif + + END_SCREEN(); + } +#endif // HAS_THERMISTOR // // About Printer > Board Info @@ -256,7 +289,7 @@ void menu_info() { #else SUBMENU(MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info > SUBMENU(MSG_INFO_BOARD_MENU, menu_info_board); // Board Info > - #if HAS_EXTRUDERS + #if HAS_THERMISTOR SUBMENU(MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors > #endif #endif diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index 0454b48fcec0..f21ad026eb6a 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -171,4 +171,8 @@ #elif THERMISTOR_ID == 1000 #define THERMISTOR_NAME "Custom" +// SOC thermistor` +#elif THERMISTOR_ID == 100 + #define THERMISTOR_NAME "SOC" + #endif // THERMISTOR_ID From df27c9be55d5a32faf27cb5b50947ce0a7e96807 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:05:37 +1200 Subject: [PATCH 2/5] use HAS_TEMP_SENSOR --- Marlin/src/inc/Conditionals_LCD.h | 6 ------ Marlin/src/lcd/menu/menu_info.cpp | 13 +++---------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 55ceacb073bb..573cfb0d3c75 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1912,9 +1912,3 @@ #if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE) #define SPI_FLASH_BACKUP 1 #endif - -/** - * HAS_THERMISTOR - */ -#define HAS_THERMISTOR TEMP_SENSOR_0 | TEMP_SENSOR_1 | TEMP_SENSOR_2 | TEMP_SENSOR_3 | TEMP_SENSOR_4 | TEMP_SENSOR_5 | TEMP_SENSOR_6 | TEMP_SENSOR_7 \ - | TEMP_SENSOR_BED | TEMP_SENSOR_PROBE | TEMP_SENSOR_CHAMBER | TEMP_SENSOR_COOLER | TEMP_SENSOR_BOARD | TEMP_SENSOR_SOC | TEMP_SENSOR_REDUNDANT diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 4043fbb79d38..f6f21a0d97fc 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -95,7 +95,7 @@ // // About Printer > Thermistors // -#if HAS_THERMISTOR +#if HAS_TEMP_SENSOR void menu_info_thermistors() { if (ui.use_click()) return ui.go_back(); @@ -208,16 +208,9 @@ THERM_ITEMS("SOC"); #endif - #if TEMP_SENSOR_REDUNDANT != 0 - #define THERMISTOR_ID TEMP_SENSOR_REDUNDANT - #include "../thermistornames.h" - #undef THERMISTOR_ID - THERM_ITEMS("REDUNDANT"); - #endif - END_SCREEN(); } -#endif // HAS_THERMISTOR +#endif // HAS_TEMP_SENSOR // // About Printer > Board Info @@ -289,7 +282,7 @@ void menu_info() { #else SUBMENU(MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info > SUBMENU(MSG_INFO_BOARD_MENU, menu_info_board); // Board Info > - #if HAS_THERMISTOR + #if HAS_TEMP_SENSOR SUBMENU(MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors > #endif #endif From ccfbb23574fad84d71a895b766567bdb2f38d70d Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:16:24 +1200 Subject: [PATCH 3/5] add TEMP_SENSOR_REDUNDANT --- Marlin/src/lcd/menu/menu_info.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index f6f21a0d97fc..a450f5172d28 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -208,6 +208,13 @@ THERM_ITEMS("SOC"); #endif + #if TEMP_SENSOR_REDUNDANT != 0 + #define THERMISTOR_ID TEMP_SENSOR_REDUNDANT + #include "../thermistornames.h" + #undef THERMISTOR_ID + THERM_ITEMS("REDUNDANT"); + #endif + END_SCREEN(); } #endif // HAS_TEMP_SENSOR From 0c2cd15efd145e112c12ab8d269fe60a5f7baf65 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Jul 2024 16:41:43 -0500 Subject: [PATCH 4/5] less renaming --- Marlin/src/lcd/menu/menu_info.cpp | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index a450f5172d28..c8a2d6ed786a 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -101,11 +101,11 @@ START_SCREEN(); - #define THERM_ITEMS(LBL) \ + #define THERM_ITEM_NAME(LBL) \ STATIC_ITEM_F(F(LBL ": " THERMISTOR_NAME), SS_INVERT); - #define THERM_ITEMS_FULL(LBL,HTR,WAT) \ - THERM_ITEMS(LBL) \ + #define THERM_ITEMS(LBL,HTR,WAT) \ + THERM_ITEM_NAME(LBL) \ PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HTR##_MINTEMP), SS_FULL); \ PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HTR##_MAXTEMP), SS_FULL); \ STATIC_ITEM(TERN(WAT, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL) \ @@ -114,105 +114,105 @@ #define THERMISTOR_ID TEMP_SENSOR_0 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E0, HEATER_0, WATCH_HOTENDS); + THERM_ITEMS(STR_E0, HEATER_0, WATCH_HOTENDS); #endif #if TEMP_SENSOR_1 != 0 #define THERMISTOR_ID TEMP_SENSOR_1 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E1, HEATER_1, WATCH_HOTENDS); + THERM_ITEMS(STR_E1, HEATER_1, WATCH_HOTENDS); #endif #if TEMP_SENSOR_2 != 0 #define THERMISTOR_ID TEMP_SENSOR_2 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E2, HEATER_2, WATCH_HOTENDS); + THERM_ITEMS(STR_E2, HEATER_2, WATCH_HOTENDS); #endif #if TEMP_SENSOR_3 != 0 #define THERMISTOR_ID TEMP_SENSOR_3 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E3, HEATER_3, WATCH_HOTENDS); + THERM_ITEMS(STR_E3, HEATER_3, WATCH_HOTENDS); #endif #if TEMP_SENSOR_4 != 0 #define THERMISTOR_ID TEMP_SENSOR_4 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E4, HEATER_4, WATCH_HOTENDS); + THERM_ITEMS(STR_E4, HEATER_4, WATCH_HOTENDS); #endif #if TEMP_SENSOR_5 != 0 #define THERMISTOR_ID TEMP_SENSOR_5 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E5, HEATER_5, WATCH_HOTENDS); + THERM_ITEMS(STR_E5, HEATER_5, WATCH_HOTENDS); #endif #if TEMP_SENSOR_6 != 0 #define THERMISTOR_ID TEMP_SENSOR_6 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E6, HEATER_6, WATCH_HOTENDS); + THERM_ITEMS(STR_E6, HEATER_6, WATCH_HOTENDS); #endif #if TEMP_SENSOR_7 != 0 #define THERMISTOR_ID TEMP_SENSOR_7 #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL(STR_E7, HEATER_7, WATCH_HOTENDS); + THERM_ITEMS(STR_E7, HEATER_7, WATCH_HOTENDS); #endif #if HAS_HEATED_BED #define THERMISTOR_ID TEMP_SENSOR_BED #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL("BED", BED, WATCH_BED); + THERM_ITEMS("BED", BED, WATCH_BED); #endif #if HAS_HEATED_CHAMBER #define THERMISTOR_ID TEMP_SENSOR_CHAMBER #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL("CHAM", CHAMBER, WATCH_CHAMBER); + THERM_ITEMS("CHAM", CHAMBER, WATCH_CHAMBER); #endif #if HAS_COOLER #define THERMISTOR_ID TEMP_SENSOR_COOLER #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS_FULL("COOL", COOLER, WATCH_COOLER); + THERM_ITEMS("COOL", COOLER, WATCH_COOLER); #endif #if TEMP_SENSOR_PROBE != 0 #define THERMISTOR_ID TEMP_SENSOR_PROBE #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS("PROBE"); + THERM_ITEM_NAME("PROBE"); #endif #if TEMP_SENSOR_BOARD != 0 #define THERMISTOR_ID TEMP_SENSOR_BOARD #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS("BOARD"); + THERM_ITEM_NAME("BOARD"); #endif #if TEMP_SENSOR_SOC != 0 #define THERMISTOR_ID TEMP_SENSOR_SOC #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS("SOC"); + THERM_ITEM_NAME("SOC"); #endif #if TEMP_SENSOR_REDUNDANT != 0 #define THERMISTOR_ID TEMP_SENSOR_REDUNDANT #include "../thermistornames.h" #undef THERMISTOR_ID - THERM_ITEMS("REDUNDANT"); + THERM_ITEM_NAME("REDUNDANT"); #endif END_SCREEN(); From d4311fb3d8408dcf4b3bc9336018c858e5384b43 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 23 Jul 2024 16:44:34 -0500 Subject: [PATCH 5/5] less undef --- Marlin/src/lcd/menu/menu_info.cpp | 15 --------------- Marlin/src/lcd/thermistornames.h | 2 ++ 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index c8a2d6ed786a..4aa45e43f7e0 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -113,105 +113,90 @@ #if TEMP_SENSOR_0 != 0 #define THERMISTOR_ID TEMP_SENSOR_0 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E0, HEATER_0, WATCH_HOTENDS); #endif #if TEMP_SENSOR_1 != 0 #define THERMISTOR_ID TEMP_SENSOR_1 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E1, HEATER_1, WATCH_HOTENDS); #endif #if TEMP_SENSOR_2 != 0 #define THERMISTOR_ID TEMP_SENSOR_2 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E2, HEATER_2, WATCH_HOTENDS); #endif #if TEMP_SENSOR_3 != 0 #define THERMISTOR_ID TEMP_SENSOR_3 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E3, HEATER_3, WATCH_HOTENDS); #endif #if TEMP_SENSOR_4 != 0 #define THERMISTOR_ID TEMP_SENSOR_4 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E4, HEATER_4, WATCH_HOTENDS); #endif #if TEMP_SENSOR_5 != 0 #define THERMISTOR_ID TEMP_SENSOR_5 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E5, HEATER_5, WATCH_HOTENDS); #endif #if TEMP_SENSOR_6 != 0 #define THERMISTOR_ID TEMP_SENSOR_6 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E6, HEATER_6, WATCH_HOTENDS); #endif #if TEMP_SENSOR_7 != 0 #define THERMISTOR_ID TEMP_SENSOR_7 #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS(STR_E7, HEATER_7, WATCH_HOTENDS); #endif #if HAS_HEATED_BED #define THERMISTOR_ID TEMP_SENSOR_BED #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS("BED", BED, WATCH_BED); #endif #if HAS_HEATED_CHAMBER #define THERMISTOR_ID TEMP_SENSOR_CHAMBER #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS("CHAM", CHAMBER, WATCH_CHAMBER); #endif #if HAS_COOLER #define THERMISTOR_ID TEMP_SENSOR_COOLER #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEMS("COOL", COOLER, WATCH_COOLER); #endif #if TEMP_SENSOR_PROBE != 0 #define THERMISTOR_ID TEMP_SENSOR_PROBE #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEM_NAME("PROBE"); #endif #if TEMP_SENSOR_BOARD != 0 #define THERMISTOR_ID TEMP_SENSOR_BOARD #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEM_NAME("BOARD"); #endif #if TEMP_SENSOR_SOC != 0 #define THERMISTOR_ID TEMP_SENSOR_SOC #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEM_NAME("SOC"); #endif #if TEMP_SENSOR_REDUNDANT != 0 #define THERMISTOR_ID TEMP_SENSOR_REDUNDANT #include "../thermistornames.h" - #undef THERMISTOR_ID THERM_ITEM_NAME("REDUNDANT"); #endif diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index f21ad026eb6a..dd27a9abdda9 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -176,3 +176,5 @@ #define THERMISTOR_NAME "SOC" #endif // THERMISTOR_ID + +#undef THERMISTOR_ID