🐛 Use setTargetHotend in menus (#22247)

This commit is contained in:
Katelyn Schiesser 2021-06-27 22:30:11 -07:00 committed by Scott Lahteine
parent 2b37a71eba
commit 6ea6556d09
2 changed files with 15 additions and 11 deletions

View File

@ -140,6 +140,7 @@ typedef union {
uint8_t uint8; uint8_t uint8;
uint16_t uint16; uint16_t uint16;
uint32_t uint32; uint32_t uint32;
celsius_t celsius;
} chimera_t; } chimera_t;
extern chimera_t editable; extern chimera_t editable;

View File

@ -169,10 +169,13 @@ void menu_temperature() {
// Nozzle [1-5]: // Nozzle [1-5]:
// //
#if HOTENDS == 1 #if HOTENDS == 1
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); }); editable.celsius = thermalManager.temp_hotend[0].target;
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &editable.celsius, 0, thermalManager.hotend_max_target(0), []{ thermalManager.setTargetHotend(editable.celsius, 0); });
#elif HAS_MULTI_HOTEND #elif HAS_MULTI_HOTEND
HOTEND_LOOP() HOTEND_LOOP() {
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); }); editable.celsius = thermalManager.temp_hotend[e].target;
EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &editable.celsius, 0, thermalManager.hotend_max_target(e), []{ thermalManager.setTargetHotend(editable.celsius, MenuItemBase::itemIndex); });
}
#endif #endif
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP) #if ENABLED(SINGLENOZZLE_STANDBY_TEMP)