Skip to content

Commit e3d98dd

Browse files
slowbrothinkyhead
authored andcommitted
🐛 Use setTargetHotend in menus (#22247)
1 parent 1f6768a commit e3d98dd

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Marlin/src/lcd/menu/menu.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,15 @@ class MenuItem_confirm : public MenuItemBase {
132132

133133
// The Menu Edit shadow value
134134
typedef union {
135-
bool state;
136-
float decimal;
137-
int8_t int8;
138-
int16_t int16;
139-
int32_t int32;
140-
uint8_t uint8;
141-
uint16_t uint16;
142-
uint32_t uint32;
135+
bool state;
136+
float decimal;
137+
int8_t int8;
138+
int16_t int16;
139+
int32_t int32;
140+
uint8_t uint8;
141+
uint16_t uint16;
142+
uint32_t uint32;
143+
celsius_t celsius;
143144
} chimera_t;
144145
extern chimera_t editable;
145146

Marlin/src/lcd/menu/menu_temperature.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ void menu_temperature() {
169169
// Nozzle [1-5]:
170170
//
171171
#if HOTENDS == 1
172-
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); });
172+
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.setTargetHotend(thermalManager.temp_hotend[0].target, 0); });
173173
#elif HAS_MULTI_HOTEND
174174
HOTEND_LOOP()
175-
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.hotend_max_target(e), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); });
175+
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.hotend_max_target(e), []{ int8_t e = MenuItemBase::itemIndex; thermalManager.setTargetHotend(thermalManager.temp_hotend[e].target, e); });
176176
#endif
177177

178178
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)

0 commit comments

Comments
 (0)