diff --git a/Marlin/Makefile b/Marlin/Makefile index 59ffa0003f..b0ada2616b 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -92,6 +92,9 @@ U8GLIB ?= 1 # this defines whether to include the Trinamic TMCStepper library TMC ?= 1 +# this defines whether to include the AdaFruit NeoPixel library +NEOPIXEL ?= 0 + ############ # Try to automatically determine whether RELOC_WORKAROUND is needed based # on GCC versions: diff --git a/Marlin/src/HAL/HAL_DUE/usb/compiler.h b/Marlin/src/HAL/HAL_DUE/usb/compiler.h index 7719c129c3..33df080e2f 100644 --- a/Marlin/src/HAL/HAL_DUE/usb/compiler.h +++ b/Marlin/src/HAL/HAL_DUE/usb/compiler.h @@ -444,8 +444,8 @@ typedef struct #define ENABLE 1 #ifndef __cplusplus #ifndef __bool_true_false_are_defined -#define false 0 -#define true 1 +#define false (1==0) +#define true (1==1) #endif #endif #ifndef PASS diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index d7fc9910ce..1e1199c5bc 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -720,7 +720,6 @@ void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr SERIAL_ERROR_MSG(MSG_ERR_KILLED); #if HAS_DISPLAY - extern const char NUL_STR[]; ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR); #else UNUSED(lcd_error); diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index aca149abdc..42129edce8 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -100,9 +100,6 @@ void GcodeSuite::M0_M1() { #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), PSTR("Continue")); #endif - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onUserConfirmRequired_P(PSTR("M0/1 Break Called")); - #endif if (ms > 0) { ms += millis(); // wait until this time for a click diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/flash_storage.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/archim2-flash/media_file_reader.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/compat.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/compat.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/config.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/config.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/LICENSE.txt b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/LICENSE.txt similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/LICENSE.txt rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/LICENSE.txt diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/README.md b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/README.md similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/README.md rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/README.md diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/boards.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/boards.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/constants.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/constants.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/display_list.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/display_list.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/ftdi_basic.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/ftdi_basic.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/ftdi_basic.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/ftdi_basic.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft800.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft800.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft800.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft800.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft810.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft810.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/registers_ft810.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft810.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/resolutions.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/resolutions.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/spi.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/bitmap_info.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/bitmap_info.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/bitmap_info.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/bitmap_info.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h similarity index 99% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h index a6c1f5c918..b045ca203a 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/command_processor.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h @@ -132,7 +132,7 @@ class CommandProcessor : public CLCD::CommandFifo { inline CommandProcessor& font (int16_t font) {_font = font; return *this;} - inline CommandProcessor& enabled (bool enabled) { + inline CommandProcessor& enabled (bool enabled=false) { if (enabled) _style &= ~STYLE_DISABLED; else diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/dl_cache.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/event_loop.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/ftdi_extended.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/ftdi_extended.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/grid_layout.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/grid_layout.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/polygon.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/polygon.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/rgb_t.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/rgb_t.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/rgb_t.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/rgb_t.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/screen_types.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_list.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_list.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/sound_player.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/text_box.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/tiny_timer.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/README.txt b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/README.txt similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/README.txt rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/README.txt diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_size_t.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_size_t.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_size_t.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/font_size_t.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/standard_char_set.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/standard_char_set.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/standard_char_set.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/standard_char_set.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/unicode.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/unicode.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/unicode.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/unicode.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/western_char_set.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/western_char_set.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/western_char_set.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/western_char_set.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/bitmap2cpp.py b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/bitmap2cpp.py old mode 100755 new mode 100644 similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/bitmap2cpp.py rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/bitmap2cpp.py diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/circular_progress.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h similarity index 88% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/circular_progress.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h index 412da5b361..da6a2bc325 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/circular_progress.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h @@ -23,10 +23,11 @@ /* This function draws a circular progress "ring" */ -void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, uint8_t percent, uint32_t bgcolor, uint32_t fgcolor, float rim = 0.3) { +void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor) { using namespace FTDI; - const float a = float(percent)/100.0*2.0*PI; + const float rim = 0.3; + const float a = percent/100.0*2.0*PI; const float a1 = min(PI/2, a); const float a2 = min(PI/2, a-a1); const float a3 = min(PI/2, a-a1-a2); @@ -90,11 +91,15 @@ void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, u cmd.cmd(RESTORE_CONTEXT()); // Draw the text - char str[5]; - sprintf(str,"%d\%%",percent); cmd.cmd(SAVE_CONTEXT()); cmd.cmd(COLOR_RGB(fgcolor)); - cmd.text(x,y,w,h,str, OPT_CENTERX | OPT_CENTERY); + cmd.text(x,y,w,h,text, OPT_CENTERX | OPT_CENTERY); cmd.cmd(RESTORE_CONTEXT()); } + +void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, uint32_t bgcolor, uint32_t fgcolor) { + char str[5]; + sprintf(str,"%d\%%",int(percent)); + draw_circular_progress(cmd, x, y, w, h, percent, str, bgcolor, fgcolor); +} diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/poly_ui.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/poly_ui.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/svg2cpp.py b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/svg2cpp.py old mode 100755 new mode 100644 similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/svg2cpp.py rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/svg2cpp.py diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/ftdi_eve_lib.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/ftdi_eve_lib.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/ftdi_eve_lib.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/ftdi_eve_lib.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/language/language.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/language/language.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/language/language.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/language/language.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/language/language.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/language/language.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/language/language.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/language/language.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/language/language_en.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/language/language_en.h similarity index 97% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/language/language_en.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/language/language_en.h index 5bbbdef2d9..e59e1d9468 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/language/language_en.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/language/language_en.h @@ -70,7 +70,8 @@ namespace Language_en { PROGMEM Language_Str MSG_PRINT_FINISHED = u8"Print finished"; PROGMEM Language_Str MSG_PRINT_ERROR = u8"Print error"; PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_1 = u8"Color Touch Panel"; - PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_2 = u8"Portions " COPYRIGHT_SIGN " 2019 Aleph Objects, Inc."; + PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_2 = u8"Portions " COPYRIGHT_SIGN " 2019 Aleph Objects, Inc.\n" + "Portions " COPYRIGHT_SIGN " 2019 Cocoa Press"; PROGMEM Language_Str MSG_FIRMWARE_FOR_TOOLHEAD = u8"Firmware for toolhead:\n%s\n\n"; PROGMEM Language_Str MSG_RUNOUT_1 = u8"Runout 1"; PROGMEM Language_Str MSG_RUNOUT_2 = u8"Runout 2"; @@ -157,5 +158,7 @@ namespace Language_en { #ifdef TOUCH_UI_COCOA_PRESS PROGMEM Language_Str MSG_ZONE_1 = u8"Zone 1:"; PROGMEM Language_Str MSG_ZONE_2 = u8"Zone 2:"; + PROGMEM Language_Str MSG_ZONE_3 = u8"Zone 3:"; + PROGMEM Language_Str MSG_PREHEAT_FINISHED = u8"Preheat finished"; #endif }; // namespace Language_en diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/marlin_events.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/marlin_events.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/marlin_events.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/marlin_events.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/pin_mappings.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/pin_mappings.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/pin_mappings.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/pin_mappings.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/about_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/about_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/advanced_settings_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp similarity index 74% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/advanced_settings_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp index 777199746b..b2fc2790a0 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp @@ -42,44 +42,49 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { cmd.colors(normal_btn) .font(Theme::font_medium) #ifdef TOUCH_UI_PORTRAIT - #define GRID_ROWS 9 + #define GRID_ROWS 10 #define GRID_COLS 2 - #if HAS_BED_PROBE - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_BED_PROBE + 1 + #endif + ) .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) - .enabled(1) + .enabled( + #if HAS_CASE_LIGHT + 1 + #endif + ) + .tag(16).button( BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT)) .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM)) - #if HAS_TRINAMIC - .enabled(1) - #else - .enabled(0) - #endif - .tag(13).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) - #if HAS_TRINAMIC - .enabled(1) - #else - .enabled(0) - #endif - .tag(14).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS)) - #if HOTENDS > 1 - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_TRINAMIC + 1 + #endif + ) + .tag(13).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) + .enabled( + #if HAS_TRINAMIC + 1 + #endif + ) + .tag(14).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_TMC_HOMING_THRS)) + .enabled( + #if HOTENDS > 1 + 1 + #endif + ) .tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) - #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + 1 + #endif + ) .tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT)) - .tag(12).button( BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) + .tag(12).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .tag(15).button( BTN_POS(2,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU)) - .tag(9) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS)) - .tag(10).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_FAILSAFE)) + .tag(9) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS)) + .tag(10).button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_FAILSAFE)) .tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY)) .tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION)) #if DISABLED(CLASSIC_JERK) @@ -87,51 +92,57 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #else .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK)) #endif - #if ENABLED(BACKLASH_GCODE) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(BACKLASH_GCODE) + 1 + #endif + ) .tag(8).button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH)) .colors(action_btn) - .tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1) .button( BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); #undef GRID_COLS #undef GRID_ROWS #else #define GRID_ROWS 6 #define GRID_COLS 3 - #if HAS_BED_PROBE - .enabled(1) - #else - .enabled(0) - #endif - .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,2), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) + .enabled( + #if HAS_BED_PROBE + 1 + #endif + ) + .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) + .enabled( + #if HAS_CASE_LIGHT + 1 + #endif + ) + .tag(16).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT)) .enabled(1) .tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM)) - #if HAS_TRINAMIC - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_TRINAMIC + 1 + #endif + ) .tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) - #if HAS_TRINAMIC - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_TRINAMIC + 1 + #endif + ) .tag(14).button( BTN_POS(3,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS)) - #if ENABLED(BACKLASH_GCODE) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(BACKLASH_GCODE) + 1 + #endif + ) .tag(8).button( BTN_POS(3,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH)) - #if HOTENDS > 1 - .enabled(1) - #else - .enabled(0) - #endif - .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) + .enabled( + #if HOTENDS > 1 + 1 + #endif + ) + .tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) .tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY)) .tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION)) @@ -140,7 +151,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #else .tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK)) #endif - .tag(11).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT)) + .tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT)) .tag(15).button( BTN_POS(3,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU)) .tag(9) .button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS)) .tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_FAILSAFE)) @@ -183,6 +194,9 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break; #endif case 15: GOTO_SCREEN(DisplayTuningScreen); break; + #if HAS_CASE_LIGHT + case 16: GOTO_SCREEN(CaseLightScreen); break; + #endif default: return false; } return true; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/alert_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/alert_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/backlash_compensation_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp similarity index 84% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/backlash_compensation_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp index 481d5dfd1e..0d6b97d46a 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/backlash_compensation_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp @@ -38,11 +38,13 @@ void BacklashCompensationScreen::onRedraw(draw_mode_t what) { w.color(y_axis).adjuster(4, GET_TEXT_F(MSG_AXIS_Y), getAxisBacklash_mm(Y)); w.color(z_axis).adjuster(6, GET_TEXT_F(MSG_AXIS_Z), getAxisBacklash_mm(Z)); #if ENABLED(CALIBRATION_GCODE) - w.button(12, GET_TEXT_F(MSG_MEASURE_AUTOMATICALLY)); + w.button(12, GET_TEXT_F(MSG_MEASURE_AUTOMATICALLY)); + #endif + #ifdef BACKLASH_SMOOTHING_MM + w.color(other).adjuster(8, GET_TEXT_F(MSG_BACKLASH_SMOOTHING), getBacklashSmoothing_mm()); #endif - w.color(other).adjuster(8, GET_TEXT_F(MSG_SMOOTHING), getBacklashSmoothing_mm()); w.precision(0).units(GET_TEXT_F(MSG_UNITS_PERCENT)) - .adjuster(10, GET_TEXT_F(MSG_CORRECTION), getBacklashCorrection_percent()); + .adjuster(10, GET_TEXT_F(MSG_BACKLASH_CORRECTION), getBacklashCorrection_percent()); w.precision(2).increments(); } @@ -55,12 +57,14 @@ bool BacklashCompensationScreen::onTouchHeld(uint8_t tag) { case 5: UI_INCREMENT(AxisBacklash_mm, Y); break; case 6: UI_DECREMENT(AxisBacklash_mm, Z); break; case 7: UI_INCREMENT(AxisBacklash_mm, Z); break; - case 8: UI_DECREMENT(BacklashSmoothing_mm); break; - case 9: UI_INCREMENT(BacklashSmoothing_mm); break; + #ifdef BACKLASH_SMOOTHING_MM + case 8: UI_DECREMENT(BacklashSmoothing_mm); break; + case 9: UI_INCREMENT(BacklashSmoothing_mm); break; + #endif case 10: UI_DECREMENT_BY(BacklashCorrection_percent, increment*100); break; case 11: UI_INCREMENT_BY(BacklashCorrection_percent, increment*100); break; #if ENABLED(CALIBRATION_GCODE) - case 12: GOTO_SCREEN(ConfirmAutoCalibrationDialogBox); return true; + case 12: GOTO_SCREEN(ConfirmAutoCalibrationDialogBox); return true; #endif default: return false; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_numeric_adjustment_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_numeric_adjustment_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/base_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_advanced_settings.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp similarity index 91% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_advanced_settings.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp index 7e6d22761e..c2cbf70ae2 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_advanced_settings.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp @@ -44,24 +44,24 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #define GRID_COLS 2 .tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU)) - #if HAS_TRINAMIC - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_TRINAMIC + 1 + #endif + ) .tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT)) - #if HAS_TRINAMIC - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_TRINAMIC + 1 + #endif + ) .tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS)) .tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) - #if HOTENDS > 1 - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HOTENDS > 1 + 1 + #endif + ) .tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU)) @@ -73,17 +73,17 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #else .tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK)) #endif - #if ENABLED(BACKLASH_GCODE) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(BACKLASH_GCODE) + 1 + #endif + ) .tag(11) .button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH)) - #if ENABLED(LIN_ADVANCE) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(LIN_ADVANCE) + 1 + #endif + ) .tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_LINEAR_ADVANCE)) .tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS)) .tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_FAILSAFE)) diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_e.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_e.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_xyz.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_confirm_home_xyz.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_main_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_main_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui_landscape.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_landscape.h similarity index 85% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui_landscape.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_landscape.h index 0b8f5ba570..1c7c02093d 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui_landscape.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_landscape.h @@ -40,16 +40,20 @@ const PROGMEM uint16_t syringe[] = {0xB8AD, 0x6BB1, 0xB8AD, 0x6E0C, 0xBE02, 0x6E const PROGMEM uint16_t syringe_outline[] = {0xB396, 0x110A, 0xB396, 0x1818, 0xB995, 0x1818, 0xB995, 0x22AD, 0xB396, 0x22AD, 0xB396, 0x7ADA, 0xB995, 0x7E61, 0xB995, 0x88F5, 0xBB95, 0x88F5, 0xBB95, 0xA8B4, 0xBD94, 0xAC3B, 0xBD94, 0x88F5, 0xBF94, 0x88F5, 0xBF94, 0x7E61, 0xC593, 0x7ADA, 0xC593, 0x22AD, 0xBF94, 0x22AD, 0xBF94, 0x1818, 0xC593, 0x1818, 0xC593, 0x110A, 0xB396, 0x110A}; const PROGMEM uint16_t padlock[] = {0x3FE3, 0x2A04, 0x3D34, 0x2AF9, 0x3AFF, 0x2D93, 0x397D, 0x316D, 0x38E8, 0x3626, 0x38E8, 0x3A14, 0x39B3, 0x3C8F, 0x3B50, 0x3C8F, 0x3C1C, 0x3A14, 0x3C1C, 0x363C, 0x3C6B, 0x33A9, 0x3D3A, 0x3193, 0x3E6C, 0x302D, 0x3FE3, 0x2FAA, 0x415A, 0x302D, 0x428C, 0x3192, 0x435B, 0x33A8, 0x43AB, 0x363C, 0x43AB, 0x4492, 0x38C3, 0x4492, 0x3741, 0x45AC, 0x36A1, 0x4856, 0x36A1, 0x5C41, 0x3741, 0x5EEC, 0x38C3, 0x6005, 0x4703, 0x6005, 0x4886, 0x5EEC, 0x4925, 0x5C41, 0x4925, 0x4856, 0x4886, 0x45AC, 0x4703, 0x4492, 0x46DE, 0x362B, 0x4649, 0x316D, 0x44C7, 0x2D92, 0x4292, 0x2AF9}; const PROGMEM uint16_t home_z[] = {0x80BB, 0x2B43, 0x712C, 0x46B9, 0x750F, 0x46B9, 0x750F, 0x622F, 0x7CD7, 0x622F, 0x7CD7, 0x5474, 0x849F, 0x5474, 0x849F, 0x622F, 0x8C67, 0x622F, 0x8C67, 0x46B9, 0x904B, 0x46B9, 0x8A48, 0x3C1D, 0x8A48, 0x2ECD, 0x8664, 0x2ECD, 0x8664, 0x3540}; -const PROGMEM uint16_t usb_btn[] = {0x0558, 0xC0D6, 0x44A4, 0xC0D6, 0x44A4, 0xF431, 0x0558, 0xF431, 0x0558, 0xC0D6}; -const PROGMEM uint16_t menu_btn[] = {0x4B18, 0xC0D6, 0x8A64, 0xC0D6, 0x8A64, 0xF431, 0x4B18, 0xF431, 0x4B18, 0xC0D6}; +const PROGMEM uint16_t usb_btn[] = {0x0558, 0xC0D6, 0x3BDB, 0xC0D6, 0x3BDB, 0xF431, 0x0558, 0xF431, 0x0558, 0xC0D6}; +const PROGMEM uint16_t menu_btn[] = {0x416B, 0xC0D6, 0x77EE, 0xC0D6, 0x77EE, 0xF431, 0x416B, 0xF431, 0x416B, 0xC0D6}; const PROGMEM uint16_t e_pos[] = {0xE04E, 0x5E7B, 0xE94C, 0x5E7B, 0xE94C, 0x7E74, 0xEDCB, 0x7E74, 0xE4CD, 0x8E70, 0xDBCF, 0x7E74, 0xE04E, 0x7E74, 0xE04E, 0x5E7B}; const PROGMEM uint16_t e_neg[] = {0xE04E, 0x4E7F, 0xE94C, 0x4E7F, 0xE94C, 0x2E87, 0xEDCB, 0x2E87, 0xE4CD, 0x1E8A, 0xDBCF, 0x2E87, 0xE04E, 0x2E87, 0xE04E, 0x4E7F}; const PROGMEM uint16_t home_e[] = {0xD705, 0x3885, 0xC775, 0x53FB, 0xCB59, 0x53FB, 0xCB59, 0x6F71, 0xD321, 0x6F71, 0xD321, 0x61B6, 0xDAE9, 0x61B6, 0xDAE9, 0x6F71, 0xE2B1, 0x6F71, 0xE2B1, 0x53FB, 0xE695, 0x53FB, 0xE092, 0x495F, 0xE092, 0x3C0E, 0xDCAE, 0x3C0E, 0xDCAE, 0x4281}; const PROGMEM uint16_t fine_label[] = {0x0D92, 0x9444, 0x5211, 0x9444, 0x5211, 0xA9EA, 0x0D92, 0xA9EA}; const PROGMEM uint16_t fine_toggle[] = {0x56E7, 0x9444, 0x8007, 0x9444, 0x8007, 0xA9EA, 0x56E7, 0xA9EA}; -const PROGMEM uint16_t zone2_temp[] = {0xC620, 0xD35A, 0xFD0E, 0xD35A, 0xFD0E, 0xF075, 0xC620, 0xF075}; -const PROGMEM uint16_t zone1_temp[] = {0x8E04, 0xD35A, 0xC4F3, 0xD35A, 0xC4F3, 0xF075, 0x8E04, 0xF075}; -const PROGMEM uint16_t zone2_label[] = {0xC620, 0xB4AD, 0xFD0A, 0xB4AD, 0xFD0A, 0xD1C8, 0xC620, 0xD1C8}; -const PROGMEM uint16_t zone1_label[] = {0x8E04, 0xB4AD, 0xC4F3, 0xB4AD, 0xC4F3, 0xD1C8, 0x8E04, 0xD1C8}; +const PROGMEM uint16_t h1_temp[] = {0x9C2B, 0xDD3B, 0xBBDE, 0xDD3B, 0xBBDE, 0xFA57, 0x9C2B, 0xFA57}; +const PROGMEM uint16_t h1_label[] = {0x9C2B, 0xBE8F, 0xBBDC, 0xBE8F, 0xBBDC, 0xDBAA, 0x9C2B, 0xDBAA}; +const PROGMEM uint16_t h0_temp[] = {0x7BD0, 0xDD3B, 0x9B83, 0xDD3B, 0x9B83, 0xFA57, 0x7BD0, 0xFA57}; +const PROGMEM uint16_t h0_label[] = {0x7BD0, 0xBE8F, 0x9B83, 0xBE8F, 0x9B83, 0xDBAA, 0x7BD0, 0xDBAA}; +const PROGMEM uint16_t h2_temp[] = {0xBC86, 0xDD3B, 0xDC39, 0xDD3B, 0xDC39, 0xFA57, 0xBC86, 0xFA57}; +const PROGMEM uint16_t h2_label[] = {0xBC86, 0xBE8F, 0xDC37, 0xBE8F, 0xDC37, 0xDBAA, 0xBC86, 0xDBAA}; +const PROGMEM uint16_t h3_temp[] = {0xDCE2, 0xDD0D, 0xFC95, 0xDD0D, 0xFC95, 0xFA28, 0xDCE2, 0xFA28}; +const PROGMEM uint16_t h3_label[] = {0xDCE2, 0xBE60, 0xFC92, 0xBE60, 0xFC92, 0xDB7C, 0xDCE2, 0xDB7C}; const PROGMEM uint16_t actual_temp[] = {0xCDF6, 0xD037, 0xF7CA, 0xD037, 0xF7CA, 0xF424, 0xCDF6, 0xF424}; const PROGMEM uint16_t bed_icon[] = {0xCDF6, 0xA5CC, 0xF7CA, 0xA5CC, 0xF7CA, 0xC9B9, 0xCDF6, 0xC9B9}; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui_portrait.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_portrait.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printer_ui_portrait.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_portrait.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printing_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_printing_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp similarity index 89% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp index 3b19caba06..ec7f2bcffb 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_status_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp @@ -23,7 +23,7 @@ #include "../config.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && (ENABLED(TOUCH_UI_LULZBOT_BIO) || ENABLED(TOUCH_UI_COCOA_PRESS)) +#if ENABLED(TOUCH_UI_FTDI_EVE) && ANY(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) #include "screens.h" @@ -95,20 +95,29 @@ void StatusScreen::draw_temperature(draw_mode_t what) { .icon (x + 2, y + 2, h, v, Bed_Heat_Icon_Info, icon_scale * 2) .cmd(COLOR_RGB(bg_text_enabled)) .icon (x, y, h, v, Bed_Heat_Icon_Info, icon_scale * 2); - #endif - - #if ENABLED(TOUCH_UI_COCOA_PRESS) + #elif ENABLED(TOUCH_UI_COCOA_PRESS) && DISABLED(TOUCH_UI_PORTRAIT) // The CocoaPress shows the temperature for two // heating zones, but has no bed temperature cmd.cmd(COLOR_RGB(bg_text_enabled)); cmd.font(font_medium); - ui.bounds(POLY(zone1_label), x, y, h, v); + ui.bounds(POLY(h0_label), x, y, h, v); cmd.text(x, y, h, v, GET_TEXT_F(MSG_ZONE_1)); - ui.bounds(POLY(zone2_label), x, y, h, v); + ui.bounds(POLY(h1_label), x, y, h, v); cmd.text(x, y, h, v, GET_TEXT_F(MSG_ZONE_2)); + + ui.bounds(POLY(h2_label), x, y, h, v); + cmd.text(x, y, h, v, GET_TEXT_F(MSG_ZONE_3)); + + ui.bounds(POLY(h3_label), x, y, h, v); + cmd.text(x, y, h, v, GET_TEXT_F(MSG_CHAMBER)); + #else + UNUSED(x); + UNUSED(y); + UNUSED(h); + UNUSED(v); #endif #ifdef TOUCH_UI_USE_UTF8 @@ -143,9 +152,8 @@ void StatusScreen::draw_temperature(draw_mode_t what) { ui.bounds(POLY(bed_temp), x, y, h, v); cmd.text(x, y, h, v, str); #endif - #endif - #if ENABLED(TOUCH_UI_COCOA_PRESS) + #elif ENABLED(TOUCH_UI_COCOA_PRESS) && DISABLED(TOUCH_UI_PORTRAIT) // The CocoaPress shows the temperature for two // heating zones, but has no bed temperature @@ -156,7 +164,7 @@ void StatusScreen::draw_temperature(draw_mode_t what) { else format_temp_and_idle(str, getActualTemp_celsius(E0)); - ui.bounds(POLY(zone1_temp), x, y, h, v); + ui.bounds(POLY(h0_temp), x, y, h, v); cmd.text(x, y, h, v, str); if (!isHeaterIdle(E1) && getTargetTemp_celsius(E1) > 0) @@ -164,8 +172,26 @@ void StatusScreen::draw_temperature(draw_mode_t what) { else format_temp_and_idle(str, getActualTemp_celsius(E1)); - ui.bounds(POLY(zone2_temp), x, y, h, v); + ui.bounds(POLY(h1_temp), x, y, h, v); cmd.text(x, y, h, v, str); + + if (!isHeaterIdle(E2) && getTargetTemp_celsius(E2) > 0) + format_temp_and_temp(str, getActualTemp_celsius(E2), getTargetTemp_celsius(E2)); + else + format_temp_and_idle(str, getActualTemp_celsius(E2)); + + ui.bounds(POLY(h2_temp), x, y, h, v); + cmd.text(x, y, h, v, str); + + if (!isHeaterIdle(CHAMBER) && getTargetTemp_celsius(CHAMBER) > 0) + format_temp_and_temp(str, getActualTemp_celsius(CHAMBER), getTargetTemp_celsius(CHAMBER)); + else + format_temp_and_idle(str, getActualTemp_celsius(CHAMBER)); + + ui.bounds(POLY(h3_temp), x, y, h, v); + cmd.text(x, y, h, v, str); + #else + UNUSED(str); #endif } } @@ -238,7 +264,9 @@ void StatusScreen::draw_arrows(draw_mode_t what) { } if ((what & BACKGROUND) || e_homed) { - ui.button(7, POLY(e_neg)); + #if DISABLED(TOUCH_UI_COCOA_PRESS) + ui.button(7, POLY(e_neg)); + #endif ui.button(8, POLY(e_pos)); } } diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_tune_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp similarity index 96% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_tune_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp index 3c9561ebd5..27312c733f 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/bio_tune_menu.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp @@ -50,11 +50,11 @@ void TuneMenu::onRedraw(draw_mode_t what) { .font(font_medium) .enabled( isPrinting()).tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_SPEED)) .tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_BED_TEMPERATURE)) - #if ENABLED(BABYSTEPPING) - .enabled(true) - #else - .enabled(false) - #endif + .enabled( + #if ENABLED(BABYSTEPPING) + true + #endif + ) .tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_NUDGE_NOZZLE)) .enabled(!isPrinting()).tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME)) .enabled(!isPrinting()).tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RAISE_PLUNGER)) diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp new file mode 100644 index 0000000000..b82149c859 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp @@ -0,0 +1,62 @@ +/************************* + * case_light_screen.cpp * + *************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if BOTH(TOUCH_UI_FTDI_EVE, CASE_LIGHT_ENABLE) + +#include "screens.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +void CaseLightScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.heading( GET_TEXT_F(MSG_CASE_LIGHT)); + w.toggle( 2, GET_TEXT_F(MSG_LEDS), getCaseLightState()); + #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) + w.precision(0).units(GET_TEXT_F(MSG_UNITS_PERCENT)) + .adjuster(10, GET_TEXT_F(MSG_CASE_LIGHT_BRIGHTNESS), getCaseLightBrightness_percent()); + w.precision(0).increments(); + #endif +} + +bool CaseLightScreen::onTouchHeld(uint8_t tag) { + using namespace ExtUI; + #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) + const float increment = getIncrement(); + #endif + switch (tag) { + case 2: setCaseLightState(!getCaseLightState()); break; + #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) + case 10: UI_DECREMENT(CaseLightBrightness_percent); break; + case 11: UI_INCREMENT(CaseLightBrightness_percent); break; + #endif + default: + return false; + } + + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/change_filament_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp similarity index 99% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/change_filament_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp index b58c4f9354..2d1e0d6627 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/change_filament_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp @@ -195,11 +195,14 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) { const bool tog8 = screen_data.ChangeFilamentScreen.repeat_tag == 8; - #ifdef TOUCH_UI_PORTRAIT - cmd.font(font_large); - #else - cmd.font(font_small); - #endif + cmd.font( + #ifdef TOUCH_UI_PORTRAIT + font_large + #else + font_small + #endif + ); + { char str[30]; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_abort_print_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_abort_print_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_auto_calibration_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_auto_calibration_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_erase_flash_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_erase_flash_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_start_print_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_start_print_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_user_request_alert_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/confirm_user_request_alert_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/default_acceleration_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/default_acceleration_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/developer_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/developer_menu.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/developer_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/developer_menu.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/dialog_box_base_class.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/dialog_box_base_class.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/display_tuning_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/display_tuning_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp similarity index 96% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp index 5ea11a5ef9..9901bbf45b 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/endstop_state_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp @@ -52,13 +52,15 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { #define PIN_ENABLED(X,Y,LABEL,PIN,INV) cmd.enabled(1).colors(READ(PIN##_PIN) != INV ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL); #define PIN_DISABLED(X,Y,LABEL,PIN) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL); - #ifdef TOUCH_UI_PORTRAIT - cmd.font(font_large) - #else - cmd.font(font_medium) - #endif - .text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) - .font(font_tiny); + cmd.font( + #ifdef TOUCH_UI_PORTRAIT + font_large + #else + font_medium + #endif + ) + .text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) + .font(font_tiny); #if PIN_EXISTS(X_MAX) PIN_ENABLED (1, 2, PSTR(MSG_X_MAX), X_MAX, X_MAX_ENDSTOP_INVERTING) #else diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/feedrate_percent_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/feedrate_percent_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp similarity index 88% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp index 2c0ccfe7e3..3972a14ef9 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_menu.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp @@ -46,17 +46,17 @@ void FilamentMenu::onRedraw(draw_mode_t what) { #define GRID_COLS 2 .text ( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_FILAMENT)) .font(font_medium).colors(normal_btn) - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + 1 + #endif + ) .tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_RUNOUT_SENSOR)) - #if ENABLED(LIN_ADVANCE) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(LIN_ADVANCE) + 1 + #endif + ) .tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_LINEAR_ADVANCE)) .colors(action_btn) .tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); @@ -67,17 +67,17 @@ void FilamentMenu::onRedraw(draw_mode_t what) { #define GRID_COLS 3 .text ( BTN_POS(1,1), BTN_SIZE(3,1), GET_TEXT_F(MSG_FILAMENT)) .font(font_medium).colors(normal_btn) - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + 1 + #endif + ) .tag(2).button( BTN_POS(1,2), BTN_SIZE(3,1), GET_TEXT_F(MSG_RUNOUT_SENSOR)) - #if ENABLED(LIN_ADVANCE) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(LIN_ADVANCE) + 1 + #endif + ) .tag(3).button( BTN_POS(1,3), BTN_SIZE(3,1), GET_TEXT_F(MSG_LINEAR_ADVANCE)) .colors(action_btn) .tag(1) .button( BTN_POS(1,6), BTN_SIZE(3,1), GET_TEXT_F(MSG_BACK)); diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_runout_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp similarity index 96% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_runout_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp index d0153285c7..9830123abb 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/filament_runout_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp @@ -41,7 +41,7 @@ void FilamentRunoutScreen::onRedraw(draw_mode_t what) { w.units(GET_TEXT_F(MSG_UNITS_MM)); w.precision(0); w.color(e_axis); - w.adjuster( 10, NUL_STR, getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled()); + w.adjuster( 10, progmem_str(NUL_STR), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled()); w.increments(); #endif } diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/files_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/files_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_settings_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_settings_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_sounds_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/interface_sounds_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/jerk_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/jerk_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/jerk_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/jerk_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/junction_deviation_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/junction_deviation_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/kill_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/kill_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/kill_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/kill_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/language_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/language_menu.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/language_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/language_menu.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/linear_advance_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/linear_advance_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/lock_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/lock_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/lock_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/lock_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp similarity index 75% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp index cae7c313e6..58a545937c 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp @@ -45,27 +45,27 @@ void MainMenu::onRedraw(draw_mode_t what) { #define GRID_ROWS 8 #define GRID_COLS 2 .tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_AUTO_HOME)) - #if ENABLED(NOZZLE_CLEAN_FEATURE) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(NOZZLE_CLEAN_FEATURE) + 1 + #endif + ) .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_CLEAN_NOZZLE)) .tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_MOVE_AXIS)) .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS)) .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE)) - #if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) + 1 + #endif + ) .tag(7).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_FILAMENTCHANGE)) .tag(8).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS)) - #ifdef PRINTCOUNTER - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #ifdef PRINTCOUNTER + 1 + #endif + ) .tag(9).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_STATS_MENU)) .tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) @@ -76,27 +76,35 @@ void MainMenu::onRedraw(draw_mode_t what) { #define GRID_ROWS 5 #define GRID_COLS 2 .tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_AUTO_HOME)) - #if ENABLED(NOZZLE_CLEAN_FEATURE) - .enabled(1) + #if ENABLED(TOUCH_UI_COCOA_PRESS) + .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_PREHEAT_1)) #else - .enabled(0) + .enabled( + #if ENABLED(NOZZLE_CLEAN_FEATURE) + 1 + #endif + ) + .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_CLEAN_NOZZLE)) #endif - .tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_CLEAN_NOZZLE)) .tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_MOVE_AXIS)) .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS)) .tag(6).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_TEMPERATURE)) - #if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) - .enabled(1) + #if ENABLED(TOUCH_UI_COCOA_PRESS) + .tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT)) #else - .enabled(0) + .enabled( + #if DISABLED(TOUCH_UI_LULZBOT_BIO) + 1 + #endif + ) + .tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENTCHANGE)) #endif - .tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENTCHANGE)) .tag(8).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS)) - #ifdef PRINTCOUNTER - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #ifdef PRINTCOUNTER + 1 + #endif + ) .tag(9).button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_INFO_STATS_MENU)) .tag(10).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) @@ -111,15 +119,21 @@ bool MainMenu::onTouchEnd(uint8_t tag) { using namespace ExtUI; switch (tag) { - case 1: GOTO_PREVIOUS(); break; + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: SpinnerDialogBox::enqueueAndWait_P(F("G28")); break; - #if ENABLED(NOZZLE_CLEAN_FEATURE) - case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break; + #if ENABLED(TOUCH_UI_COCOA_PRESS) + case 3: GOTO_SCREEN(PreheatTimerScreen); break; + #elif ENABLED(NOZZLE_CLEAN_FEATURE) + case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break; #endif case 4: GOTO_SCREEN(MoveAxisScreen); break; case 5: injectCommands_P(PSTR("M84")); break; case 6: GOTO_SCREEN(TemperatureScreen); break; + #if ENABLED(TOUCH_UI_COCOA_PRESS) + case 7: GOTO_SCREEN(CaseLightScreen); break; + #else case 7: GOTO_SCREEN(ChangeFilamentScreen); break; + #endif case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; #if ENABLED(PRINTCOUNTER) case 9: GOTO_SCREEN(StatisticsScreen); break; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_acceleration_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/max_acceleration_screen.cpp similarity index 88% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_acceleration_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/max_acceleration_screen.cpp index 2857201cbe..8f7af4b81e 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_acceleration_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/max_acceleration_screen.cpp @@ -39,15 +39,16 @@ void MaxAccelerationScreen::onRedraw(draw_mode_t what) { w.color(y_axis) .adjuster( 4, GET_TEXT_F(MSG_AMAX_Y), getAxisMaxAcceleration_mm_s2(Y) ); w.color(z_axis) .adjuster( 6, GET_TEXT_F(MSG_AMAX_Z), getAxisMaxAcceleration_mm_s2(Z) ); #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS) - w.color(e_axis).adjuster( 8, GET_TEXT_F(MSG_AMAX_E0), getAxisMaxAcceleration_mm_s2(E0) ); + w.color(e_axis).adjuster( 8, GET_TEXT_F(MSG_AMAX_E), getAxisMaxAcceleration_mm_s2(E0) ); #elif EXTRUDERS > 1 - w.color(e_axis).adjuster( 8, GET_TEXT_F(MSG_AMAX_E0), getAxisMaxAcceleration_mm_s2(E0) ); - w.color(e_axis).adjuster(10, GET_TEXT_F(MSG_AMAX_E1), getAxisMaxAcceleration_mm_s2(E1) ); + w.heading(GET_TEXT_F(MSG_AMAX_E)); + w.color(e_axis).adjuster( 8, F(LCD_STR_E0), getAxisMaxAcceleration_mm_s2(E0) ); + w.color(e_axis).adjuster(10, F(LCD_STR_E1), getAxisMaxAcceleration_mm_s2(E1) ); #if EXTRUDERS > 2 - w.color(e_axis).adjuster(12, GET_TEXT_F(MSG_AMAX_E2), getAxisMaxAcceleration_mm_s2(E2) ); + w.color(e_axis).adjuster(12, F(LCD_STR_E2), getAxisMaxAcceleration_mm_s2(E2) ); #endif #if EXTRUDERS > 3 - w.color(e_axis).adjuster(14, GET_TEXT_F(MSG_AMAX_E3), getAxisMaxAcceleration_mm_s2(E3) ); + w.color(e_axis).adjuster(14, F(LCD_STR_E3), getAxisMaxAcceleration_mm_s2(E3) ); #endif #endif w.increments(); diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_velocity_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp similarity index 88% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_velocity_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp index a7d39faad9..864f6b735d 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/max_velocity_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp @@ -40,15 +40,16 @@ void MaxVelocityScreen::onRedraw(draw_mode_t what) { w.color(y_axis) .adjuster( 4, GET_TEXT_F(MSG_VMAX_Y), getAxisMaxFeedrate_mm_s(Y) ); w.color(z_axis) .adjuster( 6, GET_TEXT_F(MSG_VMAX_Z), getAxisMaxFeedrate_mm_s(Z) ); #if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS) - w.color(e_axis) .adjuster( 8, GET_TEXT_F(MSG_VMAX_E1), getAxisMaxFeedrate_mm_s(E0) ); + w.color(e_axis) .adjuster( 8, GET_TEXT_F(MSG_VMAX_E), getAxisMaxFeedrate_mm_s(E0) ); #elif EXTRUDERS > 1 - w.color(e_axis) .adjuster( 8, GET_TEXT_F(MSG_VMAX_E1), getAxisMaxFeedrate_mm_s(E0) ); - w.color(e_axis) .adjuster( 10, GET_TEXT_F(MSG_VMAX_E2), getAxisMaxFeedrate_mm_s(E1) ); + w.heading(GET_TEXT_F(MSG_VMAX_E)); + w.color(e_axis) .adjuster( 8, F(LCD_STR_E0), getAxisMaxFeedrate_mm_s(E0) ); + w.color(e_axis) .adjuster( 10, F(LCD_STR_E1), getAxisMaxFeedrate_mm_s(E1) ); #if EXTRUDERS > 2 - w.color(e_axis).adjuster( 12, GET_TEXT_F(MSG_VMAX_E3), getAxisMaxFeedrate_mm_s(E2) ); + w.color(e_axis).adjuster( 12, F(LCD_STR_E2), getAxisMaxFeedrate_mm_s(E2) ); #endif #if EXTRUDERS > 3 - w.color(e_axis).adjuster( 14, GET_TEXT_F(MSG_VMAX_E4), getAxisMaxFeedrate_mm_s(E3) ); + w.color(e_axis).adjuster( 14, F(LCD_STR_E3), getAxisMaxFeedrate_mm_s(E3) ); #endif #endif w.increments(); diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/media_player_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/media_player_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/move_axis_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/move_axis_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nozzle_offsets_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nozzle_offsets_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nudge_nozzle_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp similarity index 99% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nudge_nozzle_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp index 776993b02b..6964a468a9 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/nudge_nozzle_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp @@ -68,7 +68,7 @@ void NudgeNozzleScreen::onRedraw(draw_mode_t what) { #if HAS_BED_PROBE dtostrf(getZOffset_mm(), 4, 2, str); strcat(str, " "); - strcat_P(str, GET_TEXT(UNITS_MM)); + strcat_P(str, GET_TEXT(MSG_UNITS_MM)); w.text_field (0, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), str); #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/preheat_timer_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/preheat_timer_screen.cpp new file mode 100644 index 0000000000..0a24c30082 --- /dev/null +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/preheat_timer_screen.cpp @@ -0,0 +1,115 @@ +/**************************** + * preheat_timer_screen.cpp * + ****************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" + +#if ENABLED(TOUCH_UI_FTDI_EVE) && defined(TOUCH_UI_COCOA_PRESS) + +#include "screens.h" +#include "screen_data.h" + +#include "../ftdi_eve_lib/extras/circular_progress.h" + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#define GRID_COLS 2 +#define GRID_ROWS 5 + +void PreheatTimerScreen::draw_message(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0); + draw_text_box(cmd, BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_HEATING), OPT_CENTER, font_large); + } +} + +uint16_t PreheatTimerScreen::secondsRemaining() { + const uint32_t elapsed_sec = (millis() - screen_data.PreheatTimerScreen.start_ms) / 1000; + return (COCOA_PRESS_PREHEAT_SECONDS > elapsed_sec) ? COCOA_PRESS_PREHEAT_SECONDS - elapsed_sec : 0; +} + +void PreheatTimerScreen::draw_time_remaining(draw_mode_t what) { + if (what & FOREGROUND) { + const uint16_t elapsed_sec = secondsRemaining(); + const uint8_t min = elapsed_sec / 60, + sec = elapsed_sec % 60; + + char str[10]; + sprintf_P(str, PSTR("%02d:%02d"), min, sec); + + CommandProcessor cmd; + cmd.font(font_xlarge); + draw_circular_progress(cmd, BTN_POS(1,1), BTN_SIZE(1,5), float(secondsRemaining()) * 100 / COCOA_PRESS_PREHEAT_SECONDS, str, theme_dark, theme_darkest); + } +} + +void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) { + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(font_medium) + .tag(1).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Cancel")); + } +} + +void PreheatTimerScreen::onEntry() { + screen_data.PreheatTimerScreen.start_ms = millis(); + #ifdef COCOA_PRESS_PREHEAT_SCRIPT + injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_SCRIPT)); + #endif +} + +void PreheatTimerScreen::onRedraw(draw_mode_t what) { + draw_message(what); + draw_time_remaining(what); + draw_interaction_buttons(what); +} + +bool PreheatTimerScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + default: break; + } + return false; +} + +void PreheatTimerScreen::onIdle() { + if (secondsRemaining() == 0) { + AlertDialogBox::show(GET_TEXT_F(MSG_PREHEAT_FINISHED)); + // Remove SaveSettingsDialogBox from the stack + // so the alert box doesn't return to me. + current_screen.forget(); + } + + reset_menu_timeout(); + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + onRefresh(); + refresh_timer.start(); + } + BaseScreen::onIdle(); +} + +#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/restore_failsafe_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/restore_failsafe_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/restore_failsafe_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/restore_failsafe_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/save_settings_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/save_settings_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/save_settings_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/save_settings_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screen_data.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screen_data.h similarity index 96% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screen_data.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screen_data.h index 66673ae650..6e2cb97a98 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screen_data.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screen_data.h @@ -66,6 +66,11 @@ union screen_data_t { const char* message; } StressTestScreen; #endif +#if ENABLED(TOUCH_UI_COCOA_PRESS) + struct { + uint32_t start_ms; + } PreheatTimerScreen; +#endif #if ENABLED(BABYSTEPPING) struct { struct base_numeric_adjustment_t placeholder; diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp similarity index 95% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp index fc8bccdf1d..bc92800054 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.cpp @@ -80,6 +80,9 @@ SCREEN_TABLE { #else DECL_SCREEN(JerkScreen), #endif +#if HAS_CASE_LIGHT + DECL_SCREEN(CaseLightScreen), +#endif #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) DECL_SCREEN(FilamentMenu), #endif @@ -96,11 +99,14 @@ SCREEN_TABLE { DECL_SCREEN(LockScreen), DECL_SCREEN(FilesScreen), DECL_SCREEN(EndstopStatesScreen), -#ifdef TOUCH_UI_LULZBOT_BIO +#if ENABLED(TOUCH_UI_LULZBOT_BIO) DECL_SCREEN(BioPrintingDialogBox), DECL_SCREEN(BioConfirmHomeXYZ), DECL_SCREEN(BioConfirmHomeE), #endif +#if ENABLED(TOUCH_UI_COCOA_PRESS) + DECL_SCREEN(PreheatTimerScreen), +#endif #if ENABLED(TOUCH_UI_DEVELOPER_MENU) DECL_SCREEN(DeveloperMenu), DECL_SCREEN(ConfirmEraseFlashDialogBox), diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h similarity index 96% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h index a4fc495263..4e6d8d3e2d 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/screens.h @@ -60,6 +60,9 @@ enum { #else JERK_SCREEN_CACHE, #endif +#if HAS_CASE_LIGHT + CASE_LIGHT_SCREEN_CACHE, +#endif #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) FILAMENT_MENU_CACHE, #endif @@ -69,8 +72,11 @@ enum { #if ENABLED(FILAMENT_RUNOUT_SENSOR) FILAMENT_RUNOUT_SCREEN_CACHE, #endif -#ifdef TOUCH_UI_LULZBOT_BIO +#if ENABLED(TOUCH_UI_LULZBOT_BIO) PRINTING_SCREEN_CACHE, +#endif +#if ENABLED(TOUCH_UI_COCOA_PRESS) + PREHEAT_TIMER_SCREEN_CACHE, #endif CHANGE_FILAMENT_SCREEN_CACHE, INTERFACE_SETTINGS_SCREEN_CACHE, @@ -307,6 +313,23 @@ class StatusScreen : public BaseScreen, public CachedScreen { + private: + static uint16_t secondsRemaining(); + + static void draw_message(draw_mode_t); + static void draw_time_remaining(draw_mode_t); + static void draw_interaction_buttons(draw_mode_t); + public: + static void onRedraw(draw_mode_t); + + static void onEntry(); + static void onIdle(); + static bool onTouchEnd(uint8_t tag); + }; +#endif + class MainMenu : public BaseScreen, public CachedScreen { public: static void onRedraw(draw_mode_t); @@ -520,6 +543,14 @@ class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public Cac }; #endif +#if HAS_CASE_LIGHT + class CaseLightScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + }; +#endif + #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen { public: diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/spinner_dialog_box.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/spinner_dialog_box.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/spinner_dialog_box.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/spinner_dialog_box.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/statistics_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/statistics_screen.cpp similarity index 98% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/statistics_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/statistics_screen.cpp index b555bb1d89..e28e5d9b81 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/statistics_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/statistics_screen.cpp @@ -41,6 +41,7 @@ void StatisticsScreen::onRedraw(draw_mode_t what) { cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) .tag(0) .font(Theme::font_medium) diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_bump_sensitivity_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_bump_sensitivity_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_current_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stepper_current_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/steps_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/steps_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/steps_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/steps_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stress_test_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/stress_test_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/string_format.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/string_format.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/string_format.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/string_format.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/string_format.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/string_format.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/string_format.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/string_format.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/temperature_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp similarity index 83% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/temperature_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp index a23d489560..f969f47979 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/temperature_screen.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp @@ -32,26 +32,34 @@ using namespace ExtUI; void TemperatureScreen::onRedraw(draw_mode_t what) { widgets_t w(what); - w.precision(0).color(temp).units(GET_TEXT_F(MSG_UNITS_C)); + #if TOUCH_UI_LCD_TEMP_SCALING == 10 + w.precision(1) + #else + w.precision(0) + #endif + .color(temp).units(GET_TEXT_F(MSG_UNITS_C)); w.heading(GET_TEXT_F(MSG_TEMPERATURE)); w.button(30, GET_TEXT_F(MSG_COOLDOWN)); #ifndef NO_TOOLHEAD_HEATER_GCODE #if HOTENDS == 1 w.adjuster( 2, GET_TEXT_F(MSG_NOZZLE), getTargetTemp_celsius(E0)); #else - w.adjuster( 2, GET_TEXT_F(MSG_NOZZLE_0), getTargetTemp_celsius(E0)); - w.adjuster( 4, GET_TEXT_F(MSG_NOZZLE_1), getTargetTemp_celsius(E1)); + w.adjuster( 2, F(LCD_STR_E0), getTargetTemp_celsius(E0)); + w.adjuster( 4, F(LCD_STR_E1), getTargetTemp_celsius(E1)); #if HOTENDS > 2 - w.adjuster( 6, GET_TEXT_F(MSG_NOZZLE_2), getTargetTemp_celsius(E2)); + w.adjuster( 6, F(LCD_STR_E2), getTargetTemp_celsius(E2)); #endif #if HOTENDS > 3 - w.adjuster( 8, GET_TEXT_F(MSG_NOZZLE_3), getTargetTemp_celsius(E3)); + w.adjuster( 8, F(LCD_STR_E3), getTargetTemp_celsius(E3)); #endif #endif #endif #if HAS_HEATED_BED w.adjuster( 20, GET_TEXT_F(MSG_BED), getTargetTemp_celsius(BED)); #endif + #if HAS_HEATED_CHAMBER + w.adjuster( 22, GET_TEXT_F(MSG_CHAMBER), getTargetTemp_celsius(CHAMBER)); + #endif #if FAN_COUNT > 0 w.color(fan_speed).units(GET_TEXT_F(MSG_UNITS_PERCENT)); w.adjuster( 10, GET_TEXT_F(MSG_FAN_SPEED), getTargetFan_percent(FAN0)); @@ -64,6 +72,8 @@ bool TemperatureScreen::onTouchHeld(uint8_t tag) { switch (tag) { case 20: UI_DECREMENT(TargetTemp_celsius, BED); break; case 21: UI_INCREMENT(TargetTemp_celsius, BED); break; + case 22: UI_DECREMENT(TargetTemp_celsius, CHAMBER); break; + case 23: UI_INCREMENT(TargetTemp_celsius, CHAMBER); break; #ifndef NO_TOOLHEAD_HEATER_GCODE case 2: UI_DECREMENT(TargetTemp_celsius, E0); break; case 3: UI_INCREMENT(TargetTemp_celsius, E0); break; @@ -90,6 +100,9 @@ bool TemperatureScreen::onTouchHeld(uint8_t tag) { #if HAS_HEATED_BED setTargetTemp_celsius(0,BED); #endif + #if HAS_HEATED_CHAMBER + setTargetTemp_celsius(0,CHAMBER); + #endif #if FAN_COUNT > 0 setTargetFan_percent(0,FAN0); #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_calibration_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/touch_calibration_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_calibration_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/touch_calibration_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_registers_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/touch_registers_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/touch_registers_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/touch_registers_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp similarity index 84% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp index 14036d2550..8b4f0942fb 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp @@ -53,75 +53,75 @@ void TuneMenu::onRedraw(draw_mode_t what) { #ifdef TOUCH_UI_PORTRAIT .tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE)) .tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_FILAMENTCHANGE)) - #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + 1 + #endif + ) .tag(9).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_FILAMENT)) #if ENABLED(BABYSTEPPING) .tag(4).enabled(1) .button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_NUDGE_NOZZLE)) #else - #if HAS_BED_PROBE - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_BED_PROBE + 1 + #endif + ) .tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) #endif .tag(5).enabled(1) .button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_SPEED)) .tag(isPrintingFromMediaPaused() ? 7 : 6) - #if ENABLED(SDSUPPORT) - .enabled(isPrintingFromMedia()) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(SDSUPPORT) + isPrintingFromMedia() + #endif + ) .button( BTN_POS(1,6), BTN_SIZE(2,1), isPrintingFromMediaPaused() ? GET_TEXT_F(MSG_RESUME_PRINT) : GET_TEXT_F(MSG_PAUSE_PRINT)) - #if ENABLED(SDSUPPORT) - .enabled(isPrintingFromMedia()) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(SDSUPPORT) + isPrintingFromMedia() + #endif + ) .tag(8) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_STOP_PRINT)) .tag(1).colors(action_btn) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); #else // TOUCH_UI_PORTRAIT .tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TEMPERATURE)) .tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENTCHANGE)) - #if ENABLED(BABYSTEPPING) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(BABYSTEPPING) + isPrintingFromMedia() + #endif + ) #if ENABLED(BABYSTEPPING) .tag(4) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_NUDGE_NOZZLE)) #else - #if HAS_BED_PROBE - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if HAS_BED_PROBE + isPrintingFromMedia() + #endif + ) .tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) #endif .tag(5).enabled(1) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_PRINT_SPEED)) .tag(isPrintingFromMediaPaused() ? 7 : 6) - #if ENABLED(SDSUPPORT) - .enabled(isPrintingFromMedia()) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(SDSUPPORT) + isPrintingFromMedia() + #endif + ) .button( BTN_POS(1,3), BTN_SIZE(1,1), isPrintingFromMediaPaused() ? GET_TEXT_F(MSG_RESUME_PRINT) : GET_TEXT_F(MSG_PAUSE_PRINT)) - #if ENABLED(SDSUPPORT) - .enabled(isPrintingFromMedia()) - #else - .enabled(0) - #endif + .enabled( + #if ENABLED(SDSUPPORT) + isPrintingFromMedia() + #endif + ) .tag(8). button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_STOP_PRINT)) - #if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) - .enabled(1) - #else - .enabled(0) - #endif + .enabled( + #if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + 1 + #endif + ) .tag(9).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT)) .tag(1).colors(action_btn) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACK)); #endif diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/widget_demo_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/widget_demo_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/widget_demo_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/widget_demo_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/z_offset_screen.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/z_offset_screen.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bitmaps.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/bitmaps.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bitmaps.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/bitmaps.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/colors.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/colors.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/colors.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/colors.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/fonts.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/fonts.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/fonts.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/fonts.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/marlin_bootscreen_landscape.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h similarity index 99% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/marlin_bootscreen_landscape.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h index c82b1dde78..5e01f0471c 100644 --- a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/marlin_bootscreen_landscape.h +++ b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h @@ -30,6 +30,7 @@ constexpr float y_min = 0.000000; constexpr float y_max = 272.000000; const PROGMEM uint16_t logo_fill[] = {0x419D, 0x546F, 0x3D05, 0x5615, 0x3942, 0x5A92, 0x36B7, 0x6136, 0x35C8, 0x6950, 0x35C8, 0x96B0, 0x36B7, 0x9ECA, 0x3942, 0xA56E, 0x3D05, 0xA9EB, 0x419D, 0xAB91, 0xBE60, 0xAB91, 0xC2F8, 0xA9EB, 0xC6BB, 0xA56E, 0xC946, 0x9ECA, 0xCA35, 0x96B0, 0xCA32, 0x546C, 0x419D, 0x546F}; + const PROGMEM uint16_t logo_stroke[] = {0xADF3, 0x546C, 0x419D, 0x546F, 0x3D05, 0x5615, 0x3942, 0x5A92, 0x36B7, 0x6136, 0x35C8, 0x6950, 0x35C8, 0x96B0, 0x36B7, 0x9ECA, 0x3942, 0xA56E, 0x3D05, 0xA9EB, 0x419D, 0xAB91, 0xBE60, 0xAB91, 0xC2F8, 0xA9EB, 0xC6BB, 0xA56E, 0xC946, 0x9ECA, 0xCA35, 0x96B0, 0xCA32, 0x546C, 0xADF3, 0x546C, 0xFFFF, 0x419D, 0x5913, 0xB08C, 0x5913, 0xC794, 0x8250, 0xC794, 0x96B0, 0xC6DA, 0x9CFF, 0xC4E1, 0xA229, 0xC1F4, 0xA5A5, 0xBE60, 0xA6ED, 0x419D, 0xA6ED, 0x3E09, 0xA5A5, 0x3B1C, 0xA229, 0x3923, 0x9CFF, 0x3869, 0x96B0, 0x3869, 0x6950, 0x3923, 0x6301, 0x3B1C, 0x5DD7, 0x3E09, 0x5A5B, 0x419D, 0x5913, 0xFFFF, 0xAC7A, 0x8620, 0xAC7A, 0x9373, 0xA767, 0x9373, 0xA767, 0x75CB, 0xA1C6, 0x75CB, 0xA1C6, 0x9373, 0xA1C6, 0x9C8E, 0xA767, 0x9C8E, 0xAC7A, 0x9C8E, 0xB21C, 0x9C8E, 0xB21C, 0x9373, 0xB21C, 0x85E7, 0xB350, 0x8093, 0xB65F, 0x7E86, 0xB9D5, 0x8165, 0xBA83, 0x85E7, 0xBA83, 0x9C8E, 0xBEFE, 0x9C8E, 0xC024, 0x99E1, 0xC024, 0x8620, 0xBF7B, 0x7F22, 0xBD8F, 0x79A9, 0xBA7E, 0x7617, 0xB65F, 0x74D0, 0xB24F, 0x7622, 0xAF30, 0x79C6, 0xAD2F, 0x7F43, 0xAC7A, 0x8620, 0xAC7A, 0x8620, 0xAC7A, 0x8620, 0xFFFF, 0x8179, 0x9C8E, 0x7CE9, 0x9C8E, 0x7747, 0x9C8E, 0x7747, 0x92EC, 0x7747, 0x8949, 0x75A2, 0x81A3, 0x71A6, 0x7E73, 0x6DAB, 0x818B, 0x6C05, 0x88FC, 0x6DAF, 0x9019, 0x71C7, 0x92EC, 0x7505, 0x92EC, 0x7505, 0x9C8E, 0x7118, 0x9C8E, 0x6CD3, 0x9B06, 0x696B, 0x96D6, 0x6729, 0x909E, 0x6658, 0x88FC, 0x672D, 0x8133, 0x6980, 0x7AC7, 0x6D13, 0x766C, 0x71A6, 0x74D0, 0x7632, 0x766D, 0x79C2, 0x7AD1, 0x7C14, 0x8153, 0x7CE9, 0x8949, 0x7CE9, 0x92EC, 0x8179, 0x92EC, 0x8179, 0x8620, 0x822E, 0x7F43, 0x842E, 0x79C6, 0x874E, 0x7622, 0x8B5E, 0x74D0, 0x8F7C, 0x7617, 0x928E, 0x79A9, 0x9479, 0x7F22, 0x9523, 0x8620, 0x9523, 0x87DB, 0x8F81, 0x87DB, 0x8F81, 0x85E7, 0x8ED4, 0x8165, 0x8B5E, 0x7E86, 0x884F, 0x8093, 0x871A, 0x85E7, 0x871A, 0x92EC, 0x871A, 0x9C8F, 0x8179, 0x9C8F, 0x8179, 0x9C8E, 0x8179, 0x9C8E, 0xFFFF, 0x6515, 0x79DB, 0x644C, 0x7281, 0x6218, 0x6C86, 0x5EB2, 0x6882, 0x5A56, 0x670A, 0x55D9, 0x68E0, 0x5272, 0x6DD0, 0x4F0B, 0x68E0, 0x4A8E, 0x670A, 0x4638, 0x6882, 0x42D5, 0x6C86, 0x40A2, 0x7281, 0x3FD9, 0x79DB, 0x3FD9, 0x9AC9, 0x40E4, 0x9C8E, 0x456F, 0x9C8E, 0x456F, 0x79B5, 0x46D4, 0x735D, 0x4A8E, 0x70C0, 0x4E3E, 0x735D, 0x4FA1, 0x79B5, 0x4FA1, 0x9C8E, 0x554D, 0x9C8E, 0x554D, 0x79B5, 0x56A7, 0x735D, 0x5A56, 0x70C0, 0x5E0C, 0x735D, 0x5F74, 0x79B5, 0x5F74, 0x9C8E, 0x6515, 0x9C8E, 0x6515, 0x79DB, 0x6515, 0x79DB, 0x6515, 0x79DB, 0xFFFF, 0x9672, 0x8C4C, 0x9714, 0x9379, 0x98F5, 0x98D2, 0x9C0B, 0x9BF4, 0xA04C, 0x9C7B, 0xA04C, 0x9373, 0x9D2B, 0x920C, 0x9C1E, 0x8C4C, 0x9C1E, 0x648E, 0x9672, 0x648E, 0x9672, 0x8C4C, 0x9672, 0x8C4C, 0x9672, 0x8C4C, 0xFFFF, 0xA767, 0x7194, 0xA767, 0x6C02, 0xA692, 0x687A, 0xA496, 0x670A, 0xA291, 0x687A, 0xA1BB, 0x6C02, 0xA1BB, 0x7194, 0xA767, 0x7194, 0xA767, 0x7194, 0xA767, 0x7194}; #define LOGO_BACKGROUND logo_bg_rgb diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/marlin_bootscreen_portrait.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/marlin_bootscreen_portrait.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.cpp b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/sounds.cpp similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.cpp rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/sounds.cpp diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/sounds.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/sounds.h diff --git a/Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/theme.h b/Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/theme.h similarity index 100% rename from Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/theme.h rename to Marlin/src/lcd/extensible_ui/lib/ftdi_eve_touch_ui/theme/theme.h diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index d0676b7f88..d4c92c7d20 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -94,6 +94,10 @@ #include "../../feature/runout.h" #endif +#if ENABLED(CASE_LIGHT_ENABLE) + #include "../../feature/caselight.h" +#endif + #if ENABLED(BABYSTEPPING) #include "../../feature/babystep.h" #endif @@ -263,36 +267,42 @@ namespace ExtUI { #endif } + #ifdef TOUCH_UI_LCD_TEMP_SCALING + #define GET_TEMP_ADJUSTMENT(A) float(A)/TOUCH_UI_LCD_TEMP_SCALING + #else + #define GET_TEMP_ADJUSTMENT(A) A + #endif + float getActualTemp_celsius(const heater_t heater) { switch (heater) { #if HAS_HEATED_BED - case BED: return thermalManager.degBed(); + case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed()); #endif #if HAS_HEATED_CHAMBER - case CHAMBER: return thermalManager.degChamber(); + case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber()); #endif - default: return thermalManager.degHotend(heater - H0); + default: return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(heater - H0)); } } float getActualTemp_celsius(const extruder_t extruder) { - return thermalManager.degHotend(extruder - E0); + return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(extruder - E0)); } float getTargetTemp_celsius(const heater_t heater) { switch (heater) { #if HAS_HEATED_BED - case BED: return thermalManager.degTargetBed(); + case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed()); #endif #if HAS_HEATED_CHAMBER - case CHAMBER: return thermalManager.degTargetChamber(); + case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber()); #endif - default: return thermalManager.degTargetHotend(heater - H0); + default: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(heater - H0)); } } float getTargetTemp_celsius(const extruder_t extruder) { - return thermalManager.degTargetHotend(extruder - E0); + return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(extruder - E0)); } float getTargetFan_percent(const fan_t fan) { @@ -613,6 +623,22 @@ namespace ExtUI { #endif #endif + #if HAS_CASE_LIGHT + bool getCaseLightState() { return case_light_on; } + void setCaseLightState(const bool value) { + case_light_on = value; + update_case_light(); + } + + #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) + float getCaseLightBrightness_percent() { return ui8_to_percent(case_light_brightness); } + void setCaseLightBrightness_percent(const float value) { + case_light_brightness = map(constrain(value, 0, 100), 0, 100, 0, 255); + update_case_light(); + } + #endif + #endif + #if ENABLED(LIN_ADVANCE) float getLinearAdvance_mm_mm_s(const extruder_t extruder) { return (extruder < EXTRUDERS) ? planner.extruder_advance_K[extruder - E0] : 0; @@ -865,27 +891,38 @@ namespace ExtUI { } void setTargetTemp_celsius(float value, const heater_t heater) { + #ifdef TOUCH_UI_LCD_TEMP_SCALING + value *= TOUCH_UI_LCD_TEMP_SCALING; + #endif enableHeater(heater); + #if HAS_HEATED_CHAMBER + if (heater == CHAMBER) + thermalManager.setTargetChamber(LROUND(constrain(value, 0, CHAMBER_MAXTEMP - 10))); + else + #endif #if HAS_HEATED_BED if (heater == BED) - thermalManager.setTargetBed(constrain(value, 0, BED_MAXTEMP - 10)); + thermalManager.setTargetBed(LROUND(constrain(value, 0, BED_MAXTEMP - 10))); else #endif { #if HOTENDS static constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP); const int16_t e = heater - H0; - thermalManager.setTargetHotend(constrain(value, 0, heater_maxtemp[e] - 15), e); + thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - 15)), e); #endif } } void setTargetTemp_celsius(float value, const extruder_t extruder) { + #ifdef TOUCH_UI_LCD_TEMP_SCALING + value *= TOUCH_UI_LCD_TEMP_SCALING; + #endif #if HOTENDS constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP); const int16_t e = extruder - E0; enableHeater(extruder); - thermalManager.setTargetHotend(constrain(value, 0, heater_maxtemp[e] - 15), e); + thermalManager.setTargetHotend(LROUND(constrain(value, 0, heater_maxtemp[e] - 15)), e); #endif } diff --git a/Marlin/src/lcd/extensible_ui/ui_api.h b/Marlin/src/lcd/extensible_ui/ui_api.h index 85953d8144..8d7c98fc3c 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.h +++ b/Marlin/src/lcd/extensible_ui/ui_api.h @@ -231,6 +231,16 @@ namespace ExtUI { #endif #endif + #if ENABLED(CASE_LIGHT_ENABLE) + bool getCaseLightState(); + void setCaseLightState(const bool); + + #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) + float getCaseLightBrightness_percent(); + void setCaseLightBrightness_percent(const float); + #endif + #endif + /** * Delay and timing routines * Should be used by the EXTENSIBLE_UI to safely pause or measure time diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index e2d1f21dd0..504e937f9f 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -214,6 +214,10 @@ #define GPIO_PA18_J20_21 71 // D71 PA17 (Header J20 21) #define GPIO_PA17_J20_22 70 // D70 PA17 (Header J20 22) +// Case Light + +#define CASE_LIGHT_PIN GPIO_PB1_J20_5 + // 2MB SPI Flash #define SPI_FLASH_SS 52 // D52 PB21 diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index fc3a486c37..b0ec52b45c 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -360,7 +360,11 @@ #endif // HOTENDS > 1 #endif // HOTENDS -#define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN), +#define _BED_PINS +#if PIN_EXISTS(HEATER_BED) && PIN_EXISTS(TEMP_BED) + #undef _BED_PINS + #define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN), +#endif // // Dual X, Dual Y, Multi-Z