LULZBOT_TOUCH_UI fixes. Fix some warnings. (#15276)

This commit is contained in:
Marcio Teixeira 2019-09-16 15:49:46 -06:00 committed by Scott Lahteine
parent 847e4ced11
commit 7a569ad4d0
16 changed files with 92 additions and 41 deletions

View File

@ -63,7 +63,7 @@
// Macros for bit masks // Macros for bit masks
#undef _BV #undef _BV
#define _BV(n) (1<<(n)) #define _BV(n) (1<<(n))
#define TEST(n,b) !!((n)&_BV(b)) #define TEST(n,b) (!!((n)&_BV(b)))
#define SET_BIT_TO(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0) #define SET_BIT_TO(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0)
#ifndef SBI #ifndef SBI

View File

@ -500,6 +500,8 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
#if HAS_BUZZER #if HAS_BUZZER
filament_change_beep(max_beep_count, true); filament_change_beep(max_beep_count, true);
#else
UNUSED(max_beep_count);
#endif #endif
// Start the heater idle timers // Start the heater idle timers

View File

@ -612,6 +612,8 @@ void ST7920_Lite_Status_Screen::draw_feedrate_percentage(const uint16_t percenta
begin_data(); begin_data();
write_number(percentage, 3); write_number(percentage, 3);
write_byte('%'); write_byte('%');
#else
UNUSED(percentage);
#endif #endif
} }

View File

@ -28,6 +28,11 @@ typedef struct {
uint32_t rgb; uint32_t rgb;
} btn_colors; } btn_colors;
// Disable TOUCH_UI_FIT_TEXT on a case-by-case basis
namespace FTDI {
constexpr uint16_t OPT_NOFIT = OPT_NOTICKS;
}
/**************************** Enhanced Command Processor **************************/ /**************************** Enhanced Command Processor **************************/
/* The CommandProcessor class wraps the CommandFifo with several features to make /* The CommandProcessor class wraps the CommandFifo with several features to make
@ -305,7 +310,7 @@ class CommandProcessor : public CLCD::CommandFifo {
int8_t apply_fit_text(int16_t w, int16_t h, T text) { int8_t apply_fit_text(int16_t w, int16_t h, T text) {
using namespace FTDI; using namespace FTDI;
int8_t font = _font; int8_t font = _font;
for (;;) { for (;font >= 26;) {
#ifdef TOUCH_UI_USE_UTF8 #ifdef TOUCH_UI_USE_UTF8
const int16_t width = get_utf8_text_width(text, font_size_t::from_romfont(font)); const int16_t width = get_utf8_text_width(text, font_size_t::from_romfont(font));
const int16_t height = font_size_t::from_romfont(font).get_height(); const int16_t height = font_size_t::from_romfont(font).get_height();
@ -314,7 +319,7 @@ class CommandProcessor : public CLCD::CommandFifo {
const int16_t width = fm.get_text_width(text); const int16_t width = fm.get_text_width(text);
const int16_t height = fm.height; const int16_t height = fm.height;
#endif #endif
if ((width < w && height < h) || font == 26) break; if (width < w && height < h) break;
font--; font--;
} }
return font; return font;
@ -327,12 +332,23 @@ class CommandProcessor : public CLCD::CommandFifo {
return *this; return *this;
} }
template<typename T>
uint16_t text_width(T text) {
using namespace FTDI;
#ifdef TOUCH_UI_USE_UTF8
return get_utf8_text_width(text, font_size_t::from_romfont(_font));
#else
CLCD::FontMetrics fm(_font);
return fm.get_text_width(text);
#endif
}
template<typename T> template<typename T>
CommandProcessor& text(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_CENTER) { CommandProcessor& text(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_CENTER) {
using namespace FTDI; using namespace FTDI;
apply_text_alignment(x, y, w, h, options); apply_text_alignment(x, y, w, h, options);
#ifdef TOUCH_UI_FIT_TEXT #ifdef TOUCH_UI_FIT_TEXT
const int8_t font = apply_fit_text(w, h, text); const int8_t font = (options & OPT_NOFIT) ? _font : apply_fit_text(w, h, text);
#else #else
const int8_t font = _font; const int8_t font = _font;
#endif #endif
@ -367,7 +383,7 @@ class CommandProcessor : public CLCD::CommandFifo {
bool styleModified = false; bool styleModified = false;
if (_btn_style_callback) styleModified = _btn_style_callback(*this, _tag, _style, options, false); if (_btn_style_callback) styleModified = _btn_style_callback(*this, _tag, _style, options, false);
#ifdef TOUCH_UI_FIT_TEXT #ifdef TOUCH_UI_FIT_TEXT
const int8_t font = apply_fit_text(w, h, text); const int8_t font = (options & OPT_NOFIT) ? _font : apply_fit_text(w, h, text);
#else #else
const int8_t font = _font; const int8_t font = _font;
#endif #endif
@ -375,6 +391,14 @@ class CommandProcessor : public CLCD::CommandFifo {
#ifdef TOUCH_UI_USE_UTF8 #ifdef TOUCH_UI_USE_UTF8
apply_text_alignment(x, y, w, h, OPT_CENTER); apply_text_alignment(x, y, w, h, OPT_CENTER);
CLCD::CommandFifo::str(F("")); CLCD::CommandFifo::str(F(""));
if (!(options & FTDI::OPT_FLAT)) {
// Reproduce the black "shadow" the FTDI adds to the button label
CLCD::CommandFifo::cmd(SAVE_CONTEXT());
CLCD::CommandFifo::cmd(COLOR_RGB(0x00000));
draw_utf8_text(*this, x-1, y-1, text, font_size_t::from_romfont(font), OPT_CENTER);
CLCD::CommandFifo::cmd(RESTORE_CONTEXT());
}
// Draw the button label
draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(font), OPT_CENTER); draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(font), OPT_CENTER);
#else #else
CLCD::CommandFifo::str(text); CLCD::CommandFifo::str(text);

View File

@ -142,7 +142,7 @@
uint16_t FTDI::get_utf8_text_width(progmem_str pstr, font_size_t fs) { uint16_t FTDI::get_utf8_text_width(progmem_str pstr, font_size_t fs) {
char str[strlen_P((const char*)pstr) + 1]; char str[strlen_P((const char*)pstr) + 1];
strcpy_P(str, (const char*)pstr); strcpy_P(str, (const char*)pstr);
return get_utf8_text_width((const char*) pstr, fs); return get_utf8_text_width(str, fs);
} }
/** /**

View File

@ -32,6 +32,7 @@ using namespace Theme;
void BaseScreen::onEntry() { void BaseScreen::onEntry() {
CommandProcessor cmd; CommandProcessor cmd;
cmd.set_button_style_callback(buttonStyleCallback); cmd.set_button_style_callback(buttonStyleCallback);
reset_menu_timeout();
UIScreen::onEntry(); UIScreen::onEntry();
} }
@ -62,9 +63,11 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
void BaseScreen::onIdle() { void BaseScreen::onIdle() {
#ifdef LCD_TIMEOUT_TO_STATUS #ifdef LCD_TIMEOUT_TO_STATUS
const uint32_t elapsed = millis() - last_interaction; if ((millis() - last_interaction) > LCD_TIMEOUT_TO_STATUS) {
if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS)) {
reset_menu_timeout(); reset_menu_timeout();
#ifdef UI_FRAMEWORK_DEBUG
SERIAL_ECHO_MSG("Returning to status due to menu timeout");
#endif
GOTO_SCREEN(StatusScreen); GOTO_SCREEN(StatusScreen);
} }
#endif #endif

View File

@ -55,23 +55,23 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
#else #else
.enabled(0) .enabled(0)
#endif #endif
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(BUMP_SENSE)) .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(HOME_SENSE))
.tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(ENDSTOPS)) .tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(ENDSTOPS))
#if HOTENDS > 1 #if HOTENDS > 1
.enabled(1) .enabled(1)
#else #else
.enabled(0) .enabled(0)
#endif #endif
.tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(NOZZLE_OFFSETS)) .tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(TOOL_OFFSETS))
.tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(STEPS_PER_MM)) .tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(STEPS_PER_MM))
.tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(MAX_VELOCITY)) .tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(VELOCITY))
.tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(MAX_ACCELERATION)) .tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(ACCELERATION))
#if ENABLED(JUNCTION_DEVIATION) #if ENABLED(JUNCTION_DEVIATION)
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JUNCTION_DEVIATION)) .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JUNCTION_DEVIATION))
#else #else
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(MAX_JERK)) .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JERK))
#endif #endif
#if ENABLED(BACKLASH_GCODE) #if ENABLED(BACKLASH_GCODE)
.enabled(1) .enabled(1)
@ -86,7 +86,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
#endif #endif
.tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(LINEAR_ADVANCE)) .tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(LINEAR_ADVANCE))
.tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS)) .tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS))
.tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(RESTORE_FAILSAFE)) .tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(RESTORE_DEFAULTS))
.colors(action_btn) .colors(action_btn)
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXTF(BACK)); .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXTF(BACK));
#undef GRID_COLS #undef GRID_COLS

View File

@ -113,8 +113,8 @@ bool BioPrintingDialogBox::onTouchEnd(uint8_t tag) {
} }
void BioPrintingDialogBox::setStatusMessage(progmem_str message) { void BioPrintingDialogBox::setStatusMessage(progmem_str message) {
char buff[strlen_P((const char * const)message)+1]; char buff[strlen_P((const char*)message)+1];
strcpy_P(buff, (const char * const) message); strcpy_P(buff, (const char*) message);
setStatusMessage(buff); setStatusMessage(buff);
} }

View File

@ -82,6 +82,10 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
.icon (x + 2, y + 2, h, v, Bed_Heat_Icon_Info, icon_scale * 2) .icon (x + 2, y + 2, h, v, Bed_Heat_Icon_Info, icon_scale * 2)
.cmd(COLOR_RGB(bg_text_enabled)) .cmd(COLOR_RGB(bg_text_enabled))
.icon (x, y, h, v, Bed_Heat_Icon_Info, icon_scale * 2); .icon (x, y, h, v, Bed_Heat_Icon_Info, icon_scale * 2);
#ifdef TOUCH_UI_USE_UTF8
load_utf8_bitmaps(cmd); // Restore font bitmap handles
#endif
} }
if (what & FOREGROUND) { if (what & FOREGROUND) {
@ -91,12 +95,12 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
.cmd(COLOR_RGB(bg_text_enabled)); .cmd(COLOR_RGB(bg_text_enabled));
if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) { if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) {
sprintf_P(bed_str, F("%3d%S"), ROUND(getTargetTemp_celsius(BED), GET_TEXT(UNITS_C))); sprintf_P(bed_str, PSTR("%3d%S"), ROUND(getTargetTemp_celsius(BED)), GET_TEXT(UNITS_C));
ui.bounds(POLY(target_temp), x, y, h, v); ui.bounds(POLY(target_temp), x, y, h, v);
cmd.text(x, y, h, v, bed_str); cmd.text(x, y, h, v, bed_str);
} }
sprintf_P(bed_str, F("%3d%S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C)); sprintf_P(bed_str, PSTR("%3d%S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C));
ui.bounds(POLY(actual_temp), x, y, h, v); ui.bounds(POLY(actual_temp), x, y, h, v);
cmd.text(x, y, h, v, bed_str); cmd.text(x, y, h, v, bed_str);
} }
@ -197,17 +201,9 @@ void StatusScreen::draw_overlay_icons(draw_mode_t what) {
ui.button_stroke(stroke_rgb, 28); ui.button_stroke(stroke_rgb, 28);
ui.button_shadow(shadow_rgb, shadow_depth); ui.button_shadow(shadow_rgb, shadow_depth);
if (!jog_xy) { if (!jog_xy) ui.button(12, POLY(padlock));
ui.button(12, POLY(padlock)); if (!e_homed) ui.button(13, POLY(home_e));
} if (!z_homed) ui.button(14, POLY(home_z));
if (!e_homed) {
ui.button(13, POLY(home_e));
}
if (!z_homed) {
ui.button(14, POLY(home_z));
}
} }
} }
@ -228,19 +224,24 @@ void StatusScreen::draw_buttons(draw_mode_t) {
isPrintingFromMedia() ? isPrintingFromMedia() ?
GET_TEXTF(PRINTING) : GET_TEXTF(PRINTING) :
#ifdef LULZBOT_MANUAL_USB_STARTUP #ifdef LULZBOT_MANUAL_USB_STARTUP
(Sd2Card::ready() ? GET_TEXTF(MEDIA) : GET_TEXTF(ENABLE_MEDIA)) (Sd2Card::ready() ? GET_TEXTF(MEDIA) : GET_TEXTF(ENABLE_MEDIA))
#else #else
GET_TEXTF(MEDIA) GET_TEXTF(MEDIA)
#endif #endif
); );
cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), F("Menu")); cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), GET_TEXTF(MENU));
} }
void StatusScreen::onStartup() { void StatusScreen::loadBitmaps() {
// Load the bitmaps for the status screen // Load the bitmaps for the status screen
constexpr uint32_t base = ftdi_memory_map::RAM_G; constexpr uint32_t base = ftdi_memory_map::RAM_G;
CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon)); CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon));
// Load fonts for internationalization
#ifdef TOUCH_UI_USE_UTF8
load_utf8_data(base + UTF8_FONT_OFFSET);
#endif
} }
void StatusScreen::onRedraw(draw_mode_t what) { void StatusScreen::onRedraw(draw_mode_t what) {

View File

@ -80,4 +80,8 @@ bool DialogBoxBaseClass::onTouchEnd(uint8_t tag) {
} }
} }
void DialogBoxBaseClass::onIdle() {
reset_menu_timeout();
}
#endif // LULZBOT_TOUCH_UI #endif // LULZBOT_TOUCH_UI

View File

@ -108,7 +108,8 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) {
#if HAS_SOFTWARE_ENDSTOPS #if HAS_SOFTWARE_ENDSTOPS
#undef EDGE_R #undef EDGE_R
#define EDGE_R 30 #define EDGE_R 30
cmd.font(font_small) cmd.cmd(COLOR_RGB(bg_text_enabled))
.font(font_small)
.text (BTN_POS(1,5), BTN_SIZE(3,1), GET_TEXTF(SOFT_ENDSTOPS), OPT_RIGHTX | OPT_CENTERY) .text (BTN_POS(1,5), BTN_SIZE(3,1), GET_TEXTF(SOFT_ENDSTOPS), OPT_RIGHTX | OPT_CENTERY)
.colors(ui_toggle) .colors(ui_toggle)
.tag(2).toggle2(BTN_POS(4,5), BTN_SIZE(3,1), GET_TEXTF(NO), GET_TEXTF(YES), getSoftEndstopState()); .tag(2).toggle2(BTN_POS(4,5), BTN_SIZE(3,1), GET_TEXTF(NO), GET_TEXTF(YES), getSoftEndstopState());

View File

@ -91,7 +91,11 @@ void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir,
cmd.cmd(MACRO(0)); cmd.cmd(MACRO(0));
} }
#endif #endif
cmd.text (BTN_POS(1,header_h+line), BTN_SIZE(6,1), filename, OPT_CENTERY); cmd.text (BTN_POS(1,header_h+line), BTN_SIZE(6,1), filename, OPT_CENTERY
#if ENABLED(SCROLL_LONG_FILENAMES)
| OPT_NOFIT
#endif
);
if (is_dir) { if (is_dir) {
cmd.text(BTN_POS(1,header_h+line), BTN_SIZE(6,1), F("> "), OPT_CENTERY | OPT_RIGHTX); cmd.text(BTN_POS(1,header_h+line), BTN_SIZE(6,1), F("> "), OPT_CENTERY | OPT_RIGHTX);
} }
@ -234,8 +238,8 @@ bool FilesScreen::onTouchEnd(uint8_t tag) {
if (FTDI::ftdi_chip >= 810) { if (FTDI::ftdi_chip >= 810) {
const char *longFilename = getSelectedLongFilename(); const char *longFilename = getSelectedLongFilename();
if (longFilename[0]) { if (longFilename[0]) {
CLCD::FontMetrics fm(font_medium); CommandProcessor cmd;
uint16_t text_width = fm.get_text_width(longFilename); uint16_t text_width = cmd.font(font_medium).text_width(longFilename);
screen_data.FilesScreen.scroll_pos = 0; screen_data.FilesScreen.scroll_pos = 0;
if (text_width > display_width) if (text_width > display_width)
screen_data.FilesScreen.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R; screen_data.FilesScreen.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;

View File

@ -148,6 +148,7 @@ class DialogBoxBaseClass : public BaseScreen {
static void onRedraw(draw_mode_t) {}; static void onRedraw(draw_mode_t) {};
public: public:
static bool onTouchEnd(uint8_t tag); static bool onTouchEnd(uint8_t tag);
static void onIdle();
}; };
class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen<ALERT_BOX_CACHE,ALERT_BOX_DL_SIZE> { class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen<ALERT_BOX_CACHE,ALERT_BOX_DL_SIZE> {
@ -243,12 +244,12 @@ class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,
static void draw_fine_motion(draw_mode_t what); static void draw_fine_motion(draw_mode_t what);
static void draw_buttons(draw_mode_t what); static void draw_buttons(draw_mode_t what);
public: public:
static void loadBitmaps();
static void unlockMotors(); static void unlockMotors();
static void setStatusMessage(const char *); static void setStatusMessage(const char *);
static void setStatusMessage(progmem_str); static void setStatusMessage(progmem_str);
static void onStartup();
static void onRedraw(draw_mode_t); static void onRedraw(draw_mode_t);
static bool onTouchStart(uint8_t tag); static bool onTouchStart(uint8_t tag);

View File

@ -57,6 +57,7 @@ void SpinnerDialogBox::enqueueAndWait_P(const progmem_str message, const progmem
} }
void SpinnerDialogBox::onIdle() { void SpinnerDialogBox::onIdle() {
reset_menu_timeout();
if (screen_data.SpinnerDialogBox.auto_hide && !commandsInQueue()) { if (screen_data.SpinnerDialogBox.auto_hide && !commandsInQueue()) {
screen_data.SpinnerDialogBox.auto_hide = false; screen_data.SpinnerDialogBox.auto_hide = false;
hide(); hide();

View File

@ -181,6 +181,10 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
.cmd(BITMAP_LAYOUT(Fan_Icon_Info)) .cmd(BITMAP_LAYOUT(Fan_Icon_Info))
.cmd(BITMAP_SIZE (Fan_Icon_Info)) .cmd(BITMAP_SIZE (Fan_Icon_Info))
.icon (BTN_POS(5,2), BTN_SIZE(1,1), Fan_Icon_Info, icon_scale); .icon (BTN_POS(5,2), BTN_SIZE(1,1), Fan_Icon_Info, icon_scale);
#ifdef TOUCH_UI_USE_UTF8
load_utf8_bitmaps(cmd); // Restore font bitmap handles
#endif
} }
if (what & FOREGROUND) { if (what & FOREGROUND) {
@ -342,9 +346,6 @@ void StatusScreen::setStatusMessage(const char* message) {
.cmd(CLEAR(true,true,true)); .cmd(CLEAR(true,true,true));
draw_temperature(BACKGROUND); draw_temperature(BACKGROUND);
#ifdef TOUCH_UI_USE_UTF8
load_utf8_bitmaps(cmd);
#endif
draw_progress(BACKGROUND); draw_progress(BACKGROUND);
draw_axis_position(BACKGROUND); draw_axis_position(BACKGROUND);
draw_status_message(BACKGROUND, message); draw_status_message(BACKGROUND, message);

View File

@ -170,6 +170,8 @@ namespace ExtUI {
void enableHeater(const extruder_t extruder) { void enableHeater(const extruder_t extruder) {
#if HOTENDS && HEATER_IDLE_HANDLER #if HOTENDS && HEATER_IDLE_HANDLER
thermalManager.reset_heater_idle_timer(extruder - E0); thermalManager.reset_heater_idle_timer(extruder - E0);
#else
UNUSED(extruder);
#endif #endif
} }
@ -190,6 +192,8 @@ namespace ExtUI {
#endif #endif
break; break;
} }
#else
UNUSED(heater);
#endif #endif
} }
@ -197,6 +201,8 @@ namespace ExtUI {
return false return false
#if HOTENDS && HEATER_IDLE_HANDLER #if HOTENDS && HEATER_IDLE_HANDLER
|| thermalManager.hotend_idle[extruder - E0].timed_out || thermalManager.hotend_idle[extruder - E0].timed_out
#else
; UNUSED(extruder)
#endif #endif
; ;
} }
@ -218,6 +224,7 @@ namespace ExtUI {
#endif #endif
} }
#else #else
UNUSED(heater);
return false; return false;
#endif #endif
} }