From e00407d820be5e14c3546a992e07bac7fbb0c048 Mon Sep 17 00:00:00 2001 From: tome9111991 <57866234+tome9111991@users.noreply.github.com> Date: Mon, 28 Jun 2021 19:08:37 +0200 Subject: [PATCH 001/323] =?UTF-8?q?=E2=9C=A8=20Ender-3=20V2=20Display=20fo?= =?UTF-8?q?r=20SKR=20E3=20Turbo=20(#22229)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 1e7b3f02a268..4719dd81115b 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -201,7 +201,15 @@ #define EXP1_09_PIN P0_16 #define EXP1_10_PIN P2_08 -#if HAS_WIRED_LCD +#if ENABLED(DWIN_CREALITY_LCD) + #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16, and LCD_SERIAL_PORT 1. Comment out this line to continue." + + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_04_PIN + #define BTN_ENC EXP1_06_PIN + +#elif HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY) From 93c2f9607e08443dca8ebbe19e8ca59f8de6d17a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 29 Jun 2021 00:54:53 +0000 Subject: [PATCH 002/323] [cron] Bump distribution date (2021-06-29) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 196236d71a07..fdd672ec0ed1 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-06-28" + #define STRING_DISTRIBUTION_DATE "2021-06-29" #endif /** From c15d9e5b423cc35f2737439c2a08aba9d0a09108 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Mon, 28 Jun 2021 18:43:05 -0700 Subject: [PATCH 003/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20PTC/BTC=20whole=20?= =?UTF-8?q?number=20tests=20(#22255)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 224729d35fb3..7524259f6083 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -593,24 +593,29 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #endif #ifdef PTC_SAMPLE_START - constexpr int _ptc_sample_start = PTC_SAMPLE_START; - static_assert(_test_ptc_sample_start != PTC_SAMPLE_START, "PTC_SAMPLE_START must be a whole number."); + constexpr auto _ptc_sample_start = PTC_SAMPLE_START; + constexpr decltype(_ptc_sample_start) _test_ptc_sample_start = 12.3f; + static_assert(_test_ptc_sample_start != 12.3f, "PTC_SAMPLE_START must be a whole number."); #endif #ifdef PTC_SAMPLE_RES - constexpr int _ptc_sample_res = PTC_SAMPLE_END; - static_assert(_test_ptc_sample_res != PTC_SAMPLE_END, "PTC_SAMPLE_RES must be a whole number."); + constexpr auto _ptc_sample_res = PTC_SAMPLE_RES; + constexpr decltype(_ptc_sample_res) _test_ptc_sample_res = 12.3f; + static_assert(_test_ptc_sample_res != 12.3f, "PTC_SAMPLE_RES must be a whole number."); #endif #ifdef BTC_SAMPLE_START - constexpr int _btc_sample_start = BTC_SAMPLE_START; - static_assert(_test_btc_sample_start != BTC_SAMPLE_START, "BTC_SAMPLE_START must be a whole number."); + constexpr auto _btc_sample_start = BTC_SAMPLE_START; + constexpr decltype(_btc_sample_start) _test_btc_sample_start = 12.3f; + static_assert(_test_btc_sample_start != 12.3f, "BTC_SAMPLE_START must be a whole number."); #endif #ifdef BTC_SAMPLE_RES - constexpr int _btc_sample_res = BTC_SAMPLE_END; - static_assert(_test_btc_sample_res != BTC_SAMPLE_END, "BTC_SAMPLE_RES must be a whole number."); + constexpr _btc_sample_res = BTC_SAMPLE_RES; + constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f; + static_assert(_test_btc_sample_res != 12.3f, "BTC_SAMPLE_RES must be a whole number."); #endif #ifdef BTC_PROBE_TEMP - constexpr int _btc_probe_temp = BTC_PROBE_TEMP; - static_assert(_test_btc_probe_temp != BTC_PROBE_TEMP, "BTC_PROBE_TEMP must be a whole number."); + constexpr auto _btc_probe_temp = BTC_PROBE_TEMP; + constexpr decltype(_btc_probe_temp) _test_btc_probe_temp = 12.3f; + static_assert(_test_btc_probe_temp != 12.3f, "BTC_PROBE_TEMP must be a whole number."); #endif #endif From a5b2498de9590a19aeeea4cebc46bc204195012e Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Tue, 29 Jun 2021 10:30:55 -0700 Subject: [PATCH 004/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20ExtUI=20'lcd=5Fcli?= =?UTF-8?q?cked'=20definition=20(#22257)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/marlinui.cpp | 1848 +++++++++++++++++------------------ 1 file changed, 924 insertions(+), 924 deletions(-) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 67e5adc0f0b2..6741de3e408b 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -120,1169 +120,1169 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; } #endif -#if HAS_WIRED_LCD - -#if HAS_MARLINUI_U8GLIB - #include "dogm/marlinui_DOGM.h" +#if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) + bool MarlinUI::lcd_clicked; #endif -#include "lcdprint.h" - -#include "../sd/cardreader.h" - -#include "../module/temperature.h" -#include "../module/planner.h" -#include "../module/motion.h" - -#if HAS_LCD_MENU - #include "../module/settings.h" -#endif +#if HAS_WIRED_LCD -#if ENABLED(AUTO_BED_LEVELING_UBL) - #include "../feature/bedlevel/bedlevel.h" -#endif + #if HAS_MARLINUI_U8GLIB + #include "dogm/marlinui_DOGM.h" + #endif -#if HAS_TRINAMIC_CONFIG - #include "../feature/tmc_util.h" -#endif + #include "lcdprint.h" -#if HAS_ADC_BUTTONS - #include "../module/thermistor/thermistors.h" -#endif + #include "../sd/cardreader.h" -#if HAS_POWER_MONITOR - #include "../feature/power_monitor.h" -#endif + #include "../module/temperature.h" + #include "../module/planner.h" + #include "../module/motion.h" -#if HAS_ENCODER_ACTION - volatile uint8_t MarlinUI::buttons; - #if HAS_SLOW_BUTTONS - volatile uint8_t MarlinUI::slow_buttons; + #if HAS_LCD_MENU + #include "../module/settings.h" #endif - #if HAS_TOUCH_BUTTONS - #include "touch/touch_buttons.h" - bool MarlinUI::on_edit_screen = false; + + #if ENABLED(AUTO_BED_LEVELING_UBL) + #include "../feature/bedlevel/bedlevel.h" #endif -#endif -#if SCREENS_CAN_TIME_OUT - bool MarlinUI::defer_return_to_status; - millis_t MarlinUI::return_to_status_ms = 0; -#endif + #if HAS_TRINAMIC_CONFIG + #include "../feature/tmc_util.h" + #endif -uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed + #if HAS_ADC_BUTTONS + #include "../module/thermistor/thermistors.h" + #endif -#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) - millis_t MarlinUI::next_filament_display; // = 0 -#endif + #if HAS_POWER_MONITOR + #include "../feature/power_monitor.h" + #endif -millis_t MarlinUI::next_button_update_ms; // = 0 + #if HAS_ENCODER_ACTION + volatile uint8_t MarlinUI::buttons; + #if HAS_SLOW_BUTTONS + volatile uint8_t MarlinUI::slow_buttons; + #endif + #if HAS_TOUCH_BUTTONS + #include "touch/touch_buttons.h" + bool MarlinUI::on_edit_screen = false; + #endif + #endif -#if HAS_MARLINUI_U8GLIB - bool MarlinUI::drawing_screen, MarlinUI::first_page; // = false -#endif + #if SCREENS_CAN_TIME_OUT + bool MarlinUI::defer_return_to_status; + millis_t MarlinUI::return_to_status_ms = 0; + #endif -// Encoder Handling -#if HAS_ENCODER_ACTION - uint32_t MarlinUI::encoderPosition; - volatile int8_t encoderDiff; // Updated in update_buttons, added to encoderPosition every LCD update -#endif + uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed -#if ENABLED(SDSUPPORT) + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + millis_t MarlinUI::next_filament_display; // = 0 + #endif - #include "../sd/cardreader.h" + millis_t MarlinUI::next_button_update_ms; // = 0 - #if MARLINUI_SCROLL_NAME - uint8_t MarlinUI::filename_scroll_pos, MarlinUI::filename_scroll_max; + #if HAS_MARLINUI_U8GLIB + bool MarlinUI::drawing_screen, MarlinUI::first_page; // = false #endif - const char * MarlinUI::scrolled_filename(CardReader &theCard, const uint8_t maxlen, uint8_t hash, const bool doScroll) { - const char *outstr = theCard.longest_filename(); - if (theCard.longFilename[0]) { - #if MARLINUI_SCROLL_NAME - if (doScroll) { - for (uint8_t l = FILENAME_LENGTH; l--;) - hash = ((hash << 1) | (hash >> 7)) ^ theCard.filename[l]; // rotate, xor - static uint8_t filename_scroll_hash; - if (filename_scroll_hash != hash) { // If the hash changed... - filename_scroll_hash = hash; // Save the new hash - filename_scroll_max = _MAX(0, utf8_strlen(theCard.longFilename) - maxlen); // Update the scroll limit - filename_scroll_pos = 0; // Reset scroll to the start - lcd_status_update_delay = 8; // Don't scroll right away - } - // Advance byte position corresponding to filename_scroll_pos char position - outstr += TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(outstr, filename_scroll_pos), filename_scroll_pos); - } - #else - theCard.longFilename[ - TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(theCard.longFilename, maxlen), maxlen) - ] = '\0'; // cutoff at screen edge - #endif - } - return outstr; - } - -#endif + // Encoder Handling + #if HAS_ENCODER_ACTION + uint32_t MarlinUI::encoderPosition; + volatile int8_t encoderDiff; // Updated in update_buttons, added to encoderPosition every LCD update + #endif -#if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) - bool MarlinUI::lcd_clicked; -#endif + #if ENABLED(SDSUPPORT) -#if HAS_LCD_MENU - #include "menu/menu.h" + #include "../sd/cardreader.h" - screenFunc_t MarlinUI::currentScreen; // Initialized in CTOR - bool MarlinUI::screen_changed; + #if MARLINUI_SCROLL_NAME + uint8_t MarlinUI::filename_scroll_pos, MarlinUI::filename_scroll_max; + #endif - #if ENABLED(ENCODER_RATE_MULTIPLIER) - bool MarlinUI::encoderRateMultiplierEnabled; - millis_t MarlinUI::lastEncoderMovementMillis = 0; - void MarlinUI::enable_encoder_multiplier(const bool onoff) { - encoderRateMultiplierEnabled = onoff; - lastEncoderMovementMillis = 0; + const char * MarlinUI::scrolled_filename(CardReader &theCard, const uint8_t maxlen, uint8_t hash, const bool doScroll) { + const char *outstr = theCard.longest_filename(); + if (theCard.longFilename[0]) { + #if MARLINUI_SCROLL_NAME + if (doScroll) { + for (uint8_t l = FILENAME_LENGTH; l--;) + hash = ((hash << 1) | (hash >> 7)) ^ theCard.filename[l]; // rotate, xor + static uint8_t filename_scroll_hash; + if (filename_scroll_hash != hash) { // If the hash changed... + filename_scroll_hash = hash; // Save the new hash + filename_scroll_max = _MAX(0, utf8_strlen(theCard.longFilename) - maxlen); // Update the scroll limit + filename_scroll_pos = 0; // Reset scroll to the start + lcd_status_update_delay = 8; // Don't scroll right away + } + // Advance byte position corresponding to filename_scroll_pos char position + outstr += TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(outstr, filename_scroll_pos), filename_scroll_pos); + } + #else + theCard.longFilename[ + TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(theCard.longFilename, maxlen), maxlen) + ] = '\0'; // cutoff at screen edge + #endif + } + return outstr; } - #endif - #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) - int8_t MarlinUI::encoderDirection = ENCODERBASE; #endif - #if HAS_TOUCH_BUTTONS - uint8_t MarlinUI::touch_buttons; - uint8_t MarlinUI::repeat_delay; - #endif + #if HAS_LCD_MENU + #include "menu/menu.h" - #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) + screenFunc_t MarlinUI::currentScreen; // Initialized in CTOR + bool MarlinUI::screen_changed; - bool MarlinUI::external_control; // = false + #if ENABLED(ENCODER_RATE_MULTIPLIER) + bool MarlinUI::encoderRateMultiplierEnabled; + millis_t MarlinUI::lastEncoderMovementMillis = 0; + void MarlinUI::enable_encoder_multiplier(const bool onoff) { + encoderRateMultiplierEnabled = onoff; + lastEncoderMovementMillis = 0; + } + #endif - void MarlinUI::wait_for_release() { - while (button_pressed()) safe_delay(50); - safe_delay(50); - } + #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) + int8_t MarlinUI::encoderDirection = ENCODERBASE; + #endif - #endif + #if HAS_TOUCH_BUTTONS + uint8_t MarlinUI::touch_buttons; + uint8_t MarlinUI::repeat_delay; + #endif - #if !HAS_GRAPHICAL_TFT + #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) - void _wrap_string(uint8_t &col, uint8_t &row, const char * const string, read_byte_cb_t cb_read_byte, bool wordwrap/*=false*/) { - SETCURSOR(col, row); - if (!string) return; + bool MarlinUI::external_control; // = false - auto _newline = [&col, &row]{ - col = 0; row++; // Move col to string len (plus space) - SETCURSOR(0, row); // Simulate carriage return - }; + void MarlinUI::wait_for_release() { + while (button_pressed()) safe_delay(50); + safe_delay(50); + } + + #endif - uint8_t *p = (uint8_t*)string; - wchar_t ch; - if (wordwrap) { - uint8_t *wrd = nullptr, c = 0; - // find the end of the part - for (;;) { - if (!wrd) wrd = p; // Get word start /before/ advancing - p = get_utf8_value_cb(p, cb_read_byte, &ch); - const bool eol = !ch; // zero ends the string - // End or a break between phrases? - if (eol || ch == ' ' || ch == '-' || ch == '+' || ch == '.') { - if (!c && ch == ' ') { if (wrd) wrd++; continue; } // collapse extra spaces - // Past the right and the word is not too long? - if (col + c > LCD_WIDTH && col >= (LCD_WIDTH) / 4) _newline(); // should it wrap? - c += !eol; // +1 so the space will be printed - col += c; // advance col to new position - while (c) { // character countdown - --c; // count down to zero - wrd = get_utf8_value_cb(wrd, cb_read_byte, &ch); // get characters again - lcd_put_wchar(ch); // character to the LCD + #if !HAS_GRAPHICAL_TFT + + void _wrap_string(uint8_t &col, uint8_t &row, const char * const string, read_byte_cb_t cb_read_byte, bool wordwrap/*=false*/) { + SETCURSOR(col, row); + if (!string) return; + + auto _newline = [&col, &row]{ + col = 0; row++; // Move col to string len (plus space) + SETCURSOR(0, row); // Simulate carriage return + }; + + uint8_t *p = (uint8_t*)string; + wchar_t ch; + if (wordwrap) { + uint8_t *wrd = nullptr, c = 0; + // find the end of the part + for (;;) { + if (!wrd) wrd = p; // Get word start /before/ advancing + p = get_utf8_value_cb(p, cb_read_byte, &ch); + const bool eol = !ch; // zero ends the string + // End or a break between phrases? + if (eol || ch == ' ' || ch == '-' || ch == '+' || ch == '.') { + if (!c && ch == ' ') { if (wrd) wrd++; continue; } // collapse extra spaces + // Past the right and the word is not too long? + if (col + c > LCD_WIDTH && col >= (LCD_WIDTH) / 4) _newline(); // should it wrap? + c += !eol; // +1 so the space will be printed + col += c; // advance col to new position + while (c) { // character countdown + --c; // count down to zero + wrd = get_utf8_value_cb(wrd, cb_read_byte, &ch); // get characters again + lcd_put_wchar(ch); // character to the LCD + } + if (eol) break; // all done! + wrd = nullptr; // set up for next word } - if (eol) break; // all done! - wrd = nullptr; // set up for next word + else c++; // count word characters } - else c++; // count word characters } - } - else { - for (;;) { - p = get_utf8_value_cb(p, cb_read_byte, &ch); - if (!ch) break; - lcd_put_wchar(ch); - col++; - if (col >= LCD_WIDTH) _newline(); + else { + for (;;) { + p = get_utf8_value_cb(p, cb_read_byte, &ch); + if (!ch) break; + lcd_put_wchar(ch); + col++; + if (col >= LCD_WIDTH) _newline(); + } } } - } - void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { - const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0; - uint8_t col = 0, row = 0; - if (!string && plen + slen <= LCD_WIDTH) { - col = (LCD_WIDTH - plen - slen) / 2; - row = LCD_HEIGHT > 3 ? 1 : 0; - } - wrap_string_P(col, row, pref, true); - if (string) { - if (col) { col = 0; row++; } // Move to the start of the next line - wrap_string(col, row, string); + void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { + const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0; + uint8_t col = 0, row = 0; + if (!string && plen + slen <= LCD_WIDTH) { + col = (LCD_WIDTH - plen - slen) / 2; + row = LCD_HEIGHT > 3 ? 1 : 0; + } + wrap_string_P(col, row, pref, true); + if (string) { + if (col) { col = 0; row++; } // Move to the start of the next line + wrap_string(col, row, string); + } + if (suff) wrap_string_P(col, row, suff); } - if (suff) wrap_string_P(col, row, suff); - } - #endif // !HAS_GRAPHICAL_TFT + #endif // !HAS_GRAPHICAL_TFT -#endif // HAS_LCD_MENU + #endif // HAS_LCD_MENU -void MarlinUI::init() { + void MarlinUI::init() { - init_lcd(); + init_lcd(); - #if HAS_DIGITAL_BUTTONS - #if BUTTON_EXISTS(EN1) - SET_INPUT_PULLUP(BTN_EN1); - #endif - #if BUTTON_EXISTS(EN2) - SET_INPUT_PULLUP(BTN_EN2); - #endif - #if BUTTON_EXISTS(ENC) - SET_INPUT_PULLUP(BTN_ENC); - #endif - #if BUTTON_EXISTS(ENC_EN) - SET_INPUT_PULLUP(BTN_ENC_EN); - #endif - #if BUTTON_EXISTS(BACK) - SET_INPUT_PULLUP(BTN_BACK); - #endif - #if BUTTON_EXISTS(UP) - SET_INPUT(BTN_UP); - #endif - #if BUTTON_EXISTS(DWN) - SET_INPUT(BTN_DWN); - #endif - #if BUTTON_EXISTS(LFT) - SET_INPUT(BTN_LFT); - #endif - #if BUTTON_EXISTS(RT) - SET_INPUT(BTN_RT); + #if HAS_DIGITAL_BUTTONS + #if BUTTON_EXISTS(EN1) + SET_INPUT_PULLUP(BTN_EN1); + #endif + #if BUTTON_EXISTS(EN2) + SET_INPUT_PULLUP(BTN_EN2); + #endif + #if BUTTON_EXISTS(ENC) + SET_INPUT_PULLUP(BTN_ENC); + #endif + #if BUTTON_EXISTS(ENC_EN) + SET_INPUT_PULLUP(BTN_ENC_EN); + #endif + #if BUTTON_EXISTS(BACK) + SET_INPUT_PULLUP(BTN_BACK); + #endif + #if BUTTON_EXISTS(UP) + SET_INPUT(BTN_UP); + #endif + #if BUTTON_EXISTS(DWN) + SET_INPUT(BTN_DWN); + #endif + #if BUTTON_EXISTS(LFT) + SET_INPUT(BTN_LFT); + #endif + #if BUTTON_EXISTS(RT) + SET_INPUT(BTN_RT); + #endif #endif - #endif - #if HAS_SHIFT_ENCODER + #if HAS_SHIFT_ENCODER - #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register + #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register - SET_OUTPUT(SR_DATA_PIN); - SET_OUTPUT(SR_CLK_PIN); + SET_OUTPUT(SR_DATA_PIN); + SET_OUTPUT(SR_CLK_PIN); - #elif PIN_EXISTS(SHIFT_CLK) + #elif PIN_EXISTS(SHIFT_CLK) - SET_OUTPUT(SHIFT_CLK_PIN); - OUT_WRITE(SHIFT_LD_PIN, HIGH); - #if PIN_EXISTS(SHIFT_EN) - OUT_WRITE(SHIFT_EN_PIN, LOW); - #endif - SET_INPUT_PULLUP(SHIFT_OUT_PIN); + SET_OUTPUT(SHIFT_CLK_PIN); + OUT_WRITE(SHIFT_LD_PIN, HIGH); + #if PIN_EXISTS(SHIFT_EN) + OUT_WRITE(SHIFT_EN_PIN, LOW); + #endif + SET_INPUT_PULLUP(SHIFT_OUT_PIN); - #endif + #endif - #endif // HAS_SHIFT_ENCODER + #endif // HAS_SHIFT_ENCODER - #if BOTH(HAS_ENCODER_ACTION, HAS_SLOW_BUTTONS) - slow_buttons = 0; - #endif + #if BOTH(HAS_ENCODER_ACTION, HAS_SLOW_BUTTONS) + slow_buttons = 0; + #endif - update_buttons(); + update_buttons(); - TERN_(HAS_ENCODER_ACTION, encoderDiff = 0); -} + TERN_(HAS_ENCODER_ACTION, encoderDiff = 0); + } -bool MarlinUI::get_blink() { - static uint8_t blink = 0; - static millis_t next_blink_ms = 0; - millis_t ms = millis(); - if (ELAPSED(ms, next_blink_ms)) { - blink ^= 0xFF; - next_blink_ms = ms + 1000 - (LCD_UPDATE_INTERVAL) / 2; + bool MarlinUI::get_blink() { + static uint8_t blink = 0; + static millis_t next_blink_ms = 0; + millis_t ms = millis(); + if (ELAPSED(ms, next_blink_ms)) { + blink ^= 0xFF; + next_blink_ms = ms + 1000 - (LCD_UPDATE_INTERVAL) / 2; + } + return blink != 0; } - return blink != 0; -} -//////////////////////////////////////////// -///////////// Keypad Handling ////////////// -//////////////////////////////////////////// + //////////////////////////////////////////// + ///////////// Keypad Handling ////////////// + //////////////////////////////////////////// -#if IS_RRW_KEYPAD && HAS_ENCODER_ACTION + #if IS_RRW_KEYPAD && HAS_ENCODER_ACTION - volatile uint8_t MarlinUI::keypad_buttons; + volatile uint8_t MarlinUI::keypad_buttons; - #if HAS_LCD_MENU && !HAS_ADC_BUTTONS + #if HAS_LCD_MENU && !HAS_ADC_BUTTONS - void lcd_move_x(); - void lcd_move_y(); - void lcd_move_z(); + void lcd_move_x(); + void lcd_move_y(); + void lcd_move_z(); - void _reprapworld_keypad_move(const AxisEnum axis, const int16_t dir) { - ui.manual_move.menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - ui.encoderPosition = dir; - switch (axis) { - case X_AXIS: lcd_move_x(); break; - case Y_AXIS: lcd_move_y(); break; - case Z_AXIS: lcd_move_z(); - default: break; + void _reprapworld_keypad_move(const AxisEnum axis, const int16_t dir) { + ui.manual_move.menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; + ui.encoderPosition = dir; + switch (axis) { + case X_AXIS: lcd_move_x(); break; + case Y_AXIS: lcd_move_y(); break; + case Z_AXIS: lcd_move_z(); + default: break; + } } - } - #endif + #endif - bool MarlinUI::handle_keypad() { + bool MarlinUI::handle_keypad() { - #if HAS_ADC_BUTTONS + #if HAS_ADC_BUTTONS - #define ADC_MIN_KEY_DELAY 100 - if (keypad_buttons) { - #if HAS_ENCODER_ACTION - refresh(LCDVIEW_REDRAW_NOW); - #if HAS_LCD_MENU - if (encoderDirection == -(ENCODERBASE)) { // HAS_ADC_BUTTONS forces REVERSE_MENU_DIRECTION, so this indicates menu navigation - if (RRK(EN_KEYPAD_UP)) encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; - else if (RRK(EN_KEYPAD_DOWN)) encoderPosition -= ENCODER_STEPS_PER_MENU_ITEM; - else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } - else if (RRK(EN_KEYPAD_RIGHT)) { return_to_status(); quick_feedback(); } - } - else - #endif - { + #define ADC_MIN_KEY_DELAY 100 + if (keypad_buttons) { + #if HAS_ENCODER_ACTION + refresh(LCDVIEW_REDRAW_NOW); #if HAS_LCD_MENU - if (RRK(EN_KEYPAD_UP)) encoderPosition -= epps; - else if (RRK(EN_KEYPAD_DOWN)) encoderPosition += epps; - else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } - else if (RRK(EN_KEYPAD_RIGHT)) encoderPosition = 0; - #else - if (RRK(EN_KEYPAD_UP) || RRK(EN_KEYPAD_LEFT)) encoderPosition -= epps; - else if (RRK(EN_KEYPAD_DOWN) || RRK(EN_KEYPAD_RIGHT)) encoderPosition += epps; + if (encoderDirection == -(ENCODERBASE)) { // HAS_ADC_BUTTONS forces REVERSE_MENU_DIRECTION, so this indicates menu navigation + if (RRK(EN_KEYPAD_UP)) encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; + else if (RRK(EN_KEYPAD_DOWN)) encoderPosition -= ENCODER_STEPS_PER_MENU_ITEM; + else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } + else if (RRK(EN_KEYPAD_RIGHT)) { return_to_status(); quick_feedback(); } + } + else #endif - } - #endif - next_button_update_ms = millis() + ADC_MIN_KEY_DELAY; - return true; - } - - #else // !HAS_ADC_BUTTONS + { + #if HAS_LCD_MENU + if (RRK(EN_KEYPAD_UP)) encoderPosition -= epps; + else if (RRK(EN_KEYPAD_DOWN)) encoderPosition += epps; + else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } + else if (RRK(EN_KEYPAD_RIGHT)) encoderPosition = 0; + #else + if (RRK(EN_KEYPAD_UP) || RRK(EN_KEYPAD_LEFT)) encoderPosition -= epps; + else if (RRK(EN_KEYPAD_DOWN) || RRK(EN_KEYPAD_RIGHT)) encoderPosition += epps; + #endif + } + #endif + next_button_update_ms = millis() + ADC_MIN_KEY_DELAY; + return true; + } - static uint8_t keypad_debounce = 0; + #else // !HAS_ADC_BUTTONS - if (!RRK( EN_KEYPAD_F1 | EN_KEYPAD_F2 - | EN_KEYPAD_F3 | EN_KEYPAD_DOWN - | EN_KEYPAD_RIGHT | EN_KEYPAD_MIDDLE - | EN_KEYPAD_UP | EN_KEYPAD_LEFT ) - ) { - if (keypad_debounce > 0) keypad_debounce--; - } - else if (!keypad_debounce) { - keypad_debounce = 2; + static uint8_t keypad_debounce = 0; - const bool homed = all_axes_homed(); + if (!RRK( EN_KEYPAD_F1 | EN_KEYPAD_F2 + | EN_KEYPAD_F3 | EN_KEYPAD_DOWN + | EN_KEYPAD_RIGHT | EN_KEYPAD_MIDDLE + | EN_KEYPAD_UP | EN_KEYPAD_LEFT ) + ) { + if (keypad_debounce > 0) keypad_debounce--; + } + else if (!keypad_debounce) { + keypad_debounce = 2; - #if HAS_LCD_MENU + const bool homed = all_axes_homed(); - if (RRK(EN_KEYPAD_MIDDLE)) goto_screen(menu_move); + #if HAS_LCD_MENU - #if NONE(DELTA, Z_HOME_TO_MAX) - if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); - #endif + if (RRK(EN_KEYPAD_MIDDLE)) goto_screen(menu_move); - if (homed) { - #if EITHER(DELTA, Z_HOME_TO_MAX) - if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); + #if NONE(DELTA, Z_HOME_TO_MAX) + if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); #endif - if (RRK(EN_KEYPAD_F3)) _reprapworld_keypad_move(Z_AXIS, -1); - if (RRK(EN_KEYPAD_LEFT)) _reprapworld_keypad_move(X_AXIS, -1); - if (RRK(EN_KEYPAD_RIGHT)) _reprapworld_keypad_move(X_AXIS, 1); - if (RRK(EN_KEYPAD_DOWN)) _reprapworld_keypad_move(Y_AXIS, 1); - if (RRK(EN_KEYPAD_UP)) _reprapworld_keypad_move(Y_AXIS, -1); - } - #endif // HAS_LCD_MENU + if (homed) { + #if EITHER(DELTA, Z_HOME_TO_MAX) + if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); + #endif + if (RRK(EN_KEYPAD_F3)) _reprapworld_keypad_move(Z_AXIS, -1); + if (RRK(EN_KEYPAD_LEFT)) _reprapworld_keypad_move(X_AXIS, -1); + if (RRK(EN_KEYPAD_RIGHT)) _reprapworld_keypad_move(X_AXIS, 1); + if (RRK(EN_KEYPAD_DOWN)) _reprapworld_keypad_move(Y_AXIS, 1); + if (RRK(EN_KEYPAD_UP)) _reprapworld_keypad_move(Y_AXIS, -1); + } - if (!homed && RRK(EN_KEYPAD_F1)) queue.inject_P(G28_STR); - return true; - } + #endif // HAS_LCD_MENU - #endif // !HAS_ADC_BUTTONS + if (!homed && RRK(EN_KEYPAD_F1)) queue.inject_P(G28_STR); + return true; + } - return false; - } + #endif // !HAS_ADC_BUTTONS -#endif // IS_RRW_KEYPAD && HAS_ENCODER_ACTION + return false; + } -/** - * Status Screen - * - * This is very display-dependent, so the lcd implementation draws this. - */ + #endif // IS_RRW_KEYPAD && HAS_ENCODER_ACTION -#if BASIC_PROGRESS_BAR - millis_t MarlinUI::progress_bar_ms; // = 0 - #if PROGRESS_MSG_EXPIRE > 0 - millis_t MarlinUI::expire_status_ms; // = 0 + /** + * Status Screen + * + * This is very display-dependent, so the lcd implementation draws this. + */ + + #if BASIC_PROGRESS_BAR + millis_t MarlinUI::progress_bar_ms; // = 0 + #if PROGRESS_MSG_EXPIRE > 0 + millis_t MarlinUI::expire_status_ms; // = 0 + #endif #endif -#endif -void MarlinUI::status_screen() { + void MarlinUI::status_screen() { - TERN_(HAS_LCD_MENU, ENCODER_RATE_MULTIPLY(false)); + TERN_(HAS_LCD_MENU, ENCODER_RATE_MULTIPLY(false)); - #if BASIC_PROGRESS_BAR + #if BASIC_PROGRESS_BAR - // - // HD44780 implements the following message blinking and - // message expiration because Status Line and Progress Bar - // share the same line on the display. - // + // + // HD44780 implements the following message blinking and + // message expiration because Status Line and Progress Bar + // share the same line on the display. + // - #if DISABLED(PROGRESS_MSG_ONCE) || (PROGRESS_MSG_EXPIRE > 0) - #define GOT_MS - const millis_t ms = millis(); - #endif + #if DISABLED(PROGRESS_MSG_ONCE) || (PROGRESS_MSG_EXPIRE > 0) + #define GOT_MS + const millis_t ms = millis(); + #endif - // If the message will blink rather than expire... - #if DISABLED(PROGRESS_MSG_ONCE) - if (ELAPSED(ms, progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME)) - progress_bar_ms = ms; - #endif + // If the message will blink rather than expire... + #if DISABLED(PROGRESS_MSG_ONCE) + if (ELAPSED(ms, progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME)) + progress_bar_ms = ms; + #endif - #if PROGRESS_MSG_EXPIRE > 0 + #if PROGRESS_MSG_EXPIRE > 0 - // Handle message expire - if (expire_status_ms) { + // Handle message expire + if (expire_status_ms) { - // Expire the message if a job is active and the bar has ticks - if (get_progress_percent() > 2 && !print_job_timer.isPaused()) { - if (ELAPSED(ms, expire_status_ms)) { - status_message[0] = '\0'; - expire_status_ms = 0; + // Expire the message if a job is active and the bar has ticks + if (get_progress_percent() > 2 && !print_job_timer.isPaused()) { + if (ELAPSED(ms, expire_status_ms)) { + status_message[0] = '\0'; + expire_status_ms = 0; + } + } + else { + // Defer message expiration before bar appears + // and during any pause (not just SD) + expire_status_ms += LCD_UPDATE_INTERVAL; } } - else { - // Defer message expiration before bar appears - // and during any pause (not just SD) - expire_status_ms += LCD_UPDATE_INTERVAL; - } - } - #endif // PROGRESS_MSG_EXPIRE + #endif // PROGRESS_MSG_EXPIRE - #endif // BASIC_PROGRESS_BAR + #endif // BASIC_PROGRESS_BAR - #if HAS_LCD_MENU - if (use_click()) { - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) - next_filament_display = millis() + 5000UL; // Show status message for 5s - #endif - goto_screen(menu_main); - #if DISABLED(NO_LCD_REINIT) - init_lcd(); // May revive the LCD if static electricity killed it - #endif - return; - } + #if HAS_LCD_MENU + if (use_click()) { + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + next_filament_display = millis() + 5000UL; // Show status message for 5s + #endif + goto_screen(menu_main); + #if DISABLED(NO_LCD_REINIT) + init_lcd(); // May revive the LCD if static electricity killed it + #endif + return; + } - #endif + #endif - #if ENABLED(ULTIPANEL_FEEDMULTIPLY) + #if ENABLED(ULTIPANEL_FEEDMULTIPLY) - const int16_t old_frm = feedrate_percentage; - int16_t new_frm = old_frm + int16_t(encoderPosition); + const int16_t old_frm = feedrate_percentage; + int16_t new_frm = old_frm + int16_t(encoderPosition); - // Dead zone at 100% feedrate - if (old_frm == 100) { - if (int16_t(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) - new_frm -= ENCODER_FEEDRATE_DEADZONE; - else if (int16_t(encoderPosition) < -(ENCODER_FEEDRATE_DEADZONE)) - new_frm += ENCODER_FEEDRATE_DEADZONE; - else - new_frm = old_frm; - } - else if ((old_frm < 100 && new_frm > 100) || (old_frm > 100 && new_frm < 100)) - new_frm = 100; - - LIMIT(new_frm, 10, 999); - - if (old_frm != new_frm) { - feedrate_percentage = new_frm; - encoderPosition = 0; - #if BOTH(HAS_BUZZER, BEEP_ON_FEEDRATE_CHANGE) - static millis_t next_beep; - #ifndef GOT_MS - const millis_t ms = millis(); + // Dead zone at 100% feedrate + if (old_frm == 100) { + if (int16_t(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) + new_frm -= ENCODER_FEEDRATE_DEADZONE; + else if (int16_t(encoderPosition) < -(ENCODER_FEEDRATE_DEADZONE)) + new_frm += ENCODER_FEEDRATE_DEADZONE; + else + new_frm = old_frm; + } + else if ((old_frm < 100 && new_frm > 100) || (old_frm > 100 && new_frm < 100)) + new_frm = 100; + + LIMIT(new_frm, 10, 999); + + if (old_frm != new_frm) { + feedrate_percentage = new_frm; + encoderPosition = 0; + #if BOTH(HAS_BUZZER, BEEP_ON_FEEDRATE_CHANGE) + static millis_t next_beep; + #ifndef GOT_MS + const millis_t ms = millis(); + #endif + if (ELAPSED(ms, next_beep)) { + buzz(FEEDRATE_CHANGE_BEEP_DURATION, FEEDRATE_CHANGE_BEEP_FREQUENCY); + next_beep = ms + 500UL; + } #endif - if (ELAPSED(ms, next_beep)) { - buzz(FEEDRATE_CHANGE_BEEP_DURATION, FEEDRATE_CHANGE_BEEP_FREQUENCY); - next_beep = ms + 500UL; - } - #endif - } + } - #endif // ULTIPANEL_FEEDMULTIPLY + #endif // ULTIPANEL_FEEDMULTIPLY - draw_status_screen(); -} + draw_status_screen(); + } -void MarlinUI::kill_screen(PGM_P lcd_error, PGM_P lcd_component) { - init(); - status_printf_P(1, PSTR(S_FMT ": " S_FMT), lcd_error, lcd_component); - TERN_(HAS_LCD_MENU, return_to_status()); + void MarlinUI::kill_screen(PGM_P lcd_error, PGM_P lcd_component) { + init(); + status_printf_P(1, PSTR(S_FMT ": " S_FMT), lcd_error, lcd_component); + TERN_(HAS_LCD_MENU, return_to_status()); - // RED ALERT. RED ALERT. - #ifdef LED_BACKLIGHT_TIMEOUT - leds.set_color(LEDColorRed()); - #ifdef NEOPIXEL_BKGD_INDEX_FIRST - neo.set_background_color(255, 0, 0, 0); - neo.show(); + // RED ALERT. RED ALERT. + #ifdef LED_BACKLIGHT_TIMEOUT + leds.set_color(LEDColorRed()); + #ifdef NEOPIXEL_BKGD_INDEX_FIRST + neo.set_background_color(255, 0, 0, 0); + neo.show(); + #endif #endif - #endif - - draw_kill_screen(); -} -void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) { + draw_kill_screen(); + } - TERN_(HAS_LCD_MENU, refresh()); + void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) { - #if HAS_ENCODER_ACTION - if (clear_buttons) buttons = 0; - next_button_update_ms = millis() + 500; - #else - UNUSED(clear_buttons); - #endif + TERN_(HAS_LCD_MENU, refresh()); - #if HAS_CHIRP - chirp(); // Buzz and wait. Is the delay needed for buttons to settle? - #if BOTH(HAS_LCD_MENU, USE_BEEPER) - for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } - #elif HAS_LCD_MENU - delay(10); + #if HAS_ENCODER_ACTION + if (clear_buttons) buttons = 0; + next_button_update_ms = millis() + 500; + #else + UNUSED(clear_buttons); #endif - #endif -} - -//////////////////////////////////////////// -/////////////// Manual Move //////////////// -//////////////////////////////////////////// - -#if HAS_LCD_MENU - - ManualMove MarlinUI::manual_move{}; - millis_t ManualMove::start_time = 0; - float ManualMove::menu_scale = 1; - #if IS_KINEMATIC - float ManualMove::offset = 0; - xyze_pos_t ManualMove::all_axes_destination = { 0 }; - bool ManualMove::processing = false; - #endif - #if MULTI_E_MANUAL - int8_t ManualMove::e_index = 0; - #endif - AxisEnum ManualMove::axis = NO_AXIS_ENUM; - - /** - * If a manual move has been posted and its time has arrived, and if the planner - * has a space for it, then add a linear move to current_position the planner. - * - * If any manual move needs to be interrupted, make sure to force a manual move - * by setting manual_move.start_time to millis() after updating current_position. - * - * To post a manual move: - * - Update current_position to the new place you want to go. - * - Set manual_move.axis to an axis like X_AXIS. Use ALL_AXES_ENUM for diagonal moves. - * - Set manual_move.start_time to a point in the future (in ms) when the move should be done. - * - * For kinematic machines: - * - Set manual_move.offset to modify one axis and post the move. - * This is used to achieve more rapid stepping on kinematic machines. - * - * Currently used by the _lcd_move_xyz function in menu_motion.cpp - * and the ubl_map_move_to_xy funtion in menu_ubl.cpp. - */ - void ManualMove::task() { - - if (processing) return; // Prevent re-entry from idle() calls + #if HAS_CHIRP + chirp(); // Buzz and wait. Is the delay needed for buttons to settle? + #if BOTH(HAS_LCD_MENU, USE_BEEPER) + for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } + #elif HAS_LCD_MENU + delay(10); + #endif + #endif + } - // Add a manual move to the queue? - if (axis != NO_AXIS_ENUM && ELAPSED(millis(), start_time) && !planner.is_full()) { + //////////////////////////////////////////// + /////////////// Manual Move //////////////// + //////////////////////////////////////////// - const feedRate_t fr_mm_s = (axis <= LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; + #if HAS_LCD_MENU - #if IS_KINEMATIC + ManualMove MarlinUI::manual_move{}; - #if HAS_MULTI_EXTRUDER - REMEMBER(ae, active_extruder); - #if MULTI_E_MANUAL - if (axis == E_AXIS) active_extruder = e_index; + millis_t ManualMove::start_time = 0; + float ManualMove::menu_scale = 1; + #if IS_KINEMATIC + float ManualMove::offset = 0; + xyze_pos_t ManualMove::all_axes_destination = { 0 }; + bool ManualMove::processing = false; + #endif + #if MULTI_E_MANUAL + int8_t ManualMove::e_index = 0; + #endif + AxisEnum ManualMove::axis = NO_AXIS_ENUM; + + /** + * If a manual move has been posted and its time has arrived, and if the planner + * has a space for it, then add a linear move to current_position the planner. + * + * If any manual move needs to be interrupted, make sure to force a manual move + * by setting manual_move.start_time to millis() after updating current_position. + * + * To post a manual move: + * - Update current_position to the new place you want to go. + * - Set manual_move.axis to an axis like X_AXIS. Use ALL_AXES_ENUM for diagonal moves. + * - Set manual_move.start_time to a point in the future (in ms) when the move should be done. + * + * For kinematic machines: + * - Set manual_move.offset to modify one axis and post the move. + * This is used to achieve more rapid stepping on kinematic machines. + * + * Currently used by the _lcd_move_xyz function in menu_motion.cpp + * and the ubl_map_move_to_xy funtion in menu_ubl.cpp. + */ + void ManualMove::task() { + + if (processing) return; // Prevent re-entry from idle() calls + + // Add a manual move to the queue? + if (axis != NO_AXIS_ENUM && ELAPSED(millis(), start_time) && !planner.is_full()) { + + const feedRate_t fr_mm_s = (axis <= LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; + + #if IS_KINEMATIC + + #if HAS_MULTI_EXTRUDER + REMEMBER(ae, active_extruder); + #if MULTI_E_MANUAL + if (axis == E_AXIS) active_extruder = e_index; + #endif #endif - #endif - // Apply a linear offset to a single axis - if (axis == ALL_AXES_ENUM) - destination = all_axes_destination; - else if (axis <= XYZE) { - destination = current_position; - destination[axis] += offset; - } + // Apply a linear offset to a single axis + if (axis == ALL_AXES_ENUM) + destination = all_axes_destination; + else if (axis <= XYZE) { + destination = current_position; + destination[axis] += offset; + } - // Reset for the next move - offset = 0; - axis = NO_AXIS_ENUM; + // Reset for the next move + offset = 0; + axis = NO_AXIS_ENUM; - // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to - // move_to_destination. This will cause idle() to be called, which can then call this function while the - // previous invocation is being blocked. Modifications to offset shouldn't be made while - // processing is true or the planner will get out of sync. - processing = true; - prepare_internal_move_to_destination(fr_mm_s); // will set current_position from destination - processing = false; + // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to + // move_to_destination. This will cause idle() to be called, which can then call this function while the + // previous invocation is being blocked. Modifications to offset shouldn't be made while + // processing is true or the planner will get out of sync. + processing = true; + prepare_internal_move_to_destination(fr_mm_s); // will set current_position from destination + processing = false; - #else + #else - // For Cartesian / Core motion simply move to the current_position - planner.buffer_line(current_position, fr_mm_s, - TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder - ); + // For Cartesian / Core motion simply move to the current_position + planner.buffer_line(current_position, fr_mm_s, + TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder + ); - //SERIAL_ECHOLNPAIR("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s); + //SERIAL_ECHOLNPAIR("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s); - axis = NO_AXIS_ENUM; + axis = NO_AXIS_ENUM; - #endif + #endif + } } - } - // - // Tell ui.update() to start a move to current_position after a short delay. - // - void ManualMove::soon(const AxisEnum move_axis - OPTARG(MULTI_E_MANUAL, const int8_t eindex/*=active_extruder*/) - ) { - TERN_(MULTI_E_MANUAL, if (move_axis == E_AXIS) e_index = eindex); - start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves - axis = move_axis; - //SERIAL_ECHOLNPAIR("Post Move with Axis ", AS_CHAR(axis_codes[axis]), " soon."); - } + // + // Tell ui.update() to start a move to current_position after a short delay. + // + void ManualMove::soon(const AxisEnum move_axis + OPTARG(MULTI_E_MANUAL, const int8_t eindex/*=active_extruder*/) + ) { + TERN_(MULTI_E_MANUAL, if (move_axis == E_AXIS) e_index = eindex); + start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves + axis = move_axis; + //SERIAL_ECHOLNPAIR("Post Move with Axis ", AS_CHAR(axis_codes[axis]), " soon."); + } - #if ENABLED(AUTO_BED_LEVELING_UBL) + #if ENABLED(AUTO_BED_LEVELING_UBL) - void MarlinUI::external_encoder() { - if (external_control && encoderDiff) { - ubl.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing - encoderDiff = 0; // Hide encoder events from the screen handler - refresh(LCDVIEW_REDRAW_NOW); // ...but keep the refresh. + void MarlinUI::external_encoder() { + if (external_control && encoderDiff) { + ubl.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing + encoderDiff = 0; // Hide encoder events from the screen handler + refresh(LCDVIEW_REDRAW_NOW); // ...but keep the refresh. + } } - } - #endif + #endif -#endif // HAS_LCD_MENU + #endif // HAS_LCD_MENU -/** - * Update the LCD, read encoder buttons, etc. - * - Read button states - * - Check the SD Card slot state - * - Act on RepRap World keypad input - * - Update the encoder position - * - Apply acceleration to the encoder position - * - Do refresh(LCDVIEW_CALL_REDRAW_NOW) on controller events - * - Reset the Info Screen timeout if there's any input - * - Update status indicators, if any - * - * Run the current LCD menu handler callback function: - * - Call the handler only if lcdDrawUpdate != LCDVIEW_NONE - * - Before calling the handler, LCDVIEW_CALL_NO_REDRAW => LCDVIEW_NONE - * - Call the menu handler. Menu handlers should do the following: - * - If a value changes, set lcdDrawUpdate to LCDVIEW_REDRAW_NOW and draw the value - * (Encoder events automatically set lcdDrawUpdate for you.) - * - if (should_draw()) { redraw } - * - Before exiting the handler set lcdDrawUpdate to: - * - LCDVIEW_CLEAR_CALL_REDRAW to clear screen and set LCDVIEW_CALL_REDRAW_NEXT. - * - LCDVIEW_REDRAW_NOW to draw now (including remaining stripes). - * - LCDVIEW_CALL_REDRAW_NEXT to draw now and get LCDVIEW_REDRAW_NOW on the next loop. - * - LCDVIEW_CALL_NO_REDRAW to draw now and get LCDVIEW_NONE on the next loop. - * - NOTE: For graphical displays menu handlers may be called 2 or more times per loop, - * so don't change lcdDrawUpdate without considering this. - * - * After the menu handler callback runs (or not): - * - Clear the LCD if lcdDrawUpdate == LCDVIEW_CLEAR_CALL_REDRAW - * - Update lcdDrawUpdate for the next loop (i.e., move one state down, usually) - * - * This function is only called from the main thread. - */ + /** + * Update the LCD, read encoder buttons, etc. + * - Read button states + * - Check the SD Card slot state + * - Act on RepRap World keypad input + * - Update the encoder position + * - Apply acceleration to the encoder position + * - Do refresh(LCDVIEW_CALL_REDRAW_NOW) on controller events + * - Reset the Info Screen timeout if there's any input + * - Update status indicators, if any + * + * Run the current LCD menu handler callback function: + * - Call the handler only if lcdDrawUpdate != LCDVIEW_NONE + * - Before calling the handler, LCDVIEW_CALL_NO_REDRAW => LCDVIEW_NONE + * - Call the menu handler. Menu handlers should do the following: + * - If a value changes, set lcdDrawUpdate to LCDVIEW_REDRAW_NOW and draw the value + * (Encoder events automatically set lcdDrawUpdate for you.) + * - if (should_draw()) { redraw } + * - Before exiting the handler set lcdDrawUpdate to: + * - LCDVIEW_CLEAR_CALL_REDRAW to clear screen and set LCDVIEW_CALL_REDRAW_NEXT. + * - LCDVIEW_REDRAW_NOW to draw now (including remaining stripes). + * - LCDVIEW_CALL_REDRAW_NEXT to draw now and get LCDVIEW_REDRAW_NOW on the next loop. + * - LCDVIEW_CALL_NO_REDRAW to draw now and get LCDVIEW_NONE on the next loop. + * - NOTE: For graphical displays menu handlers may be called 2 or more times per loop, + * so don't change lcdDrawUpdate without considering this. + * + * After the menu handler callback runs (or not): + * - Clear the LCD if lcdDrawUpdate == LCDVIEW_CLEAR_CALL_REDRAW + * - Update lcdDrawUpdate for the next loop (i.e., move one state down, usually) + * + * This function is only called from the main thread. + */ -LCDViewAction MarlinUI::lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; -millis_t next_lcd_update_ms; + LCDViewAction MarlinUI::lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; + millis_t next_lcd_update_ms; -inline bool can_encode() { - return !BUTTON_PRESSED(ENC_EN); // Update encoder only when ENC_EN is not LOW (pressed) -} + inline bool can_encode() { + return !BUTTON_PRESSED(ENC_EN); // Update encoder only when ENC_EN is not LOW (pressed) + } -void MarlinUI::update() { + void MarlinUI::update() { - static uint16_t max_display_update_time = 0; - millis_t ms = millis(); + static uint16_t max_display_update_time = 0; + millis_t ms = millis(); - #ifdef LED_BACKLIGHT_TIMEOUT - leds.update_timeout(powersupply_on); - #endif + #ifdef LED_BACKLIGHT_TIMEOUT + leds.update_timeout(powersupply_on); + #endif - #if HAS_LCD_MENU + #if HAS_LCD_MENU - // Handle any queued Move Axis motion - manual_move.task(); + // Handle any queued Move Axis motion + manual_move.task(); - // Update button states for button_pressed(), etc. - // If the state changes the next update may be delayed 300-500ms. - update_buttons(); + // Update button states for button_pressed(), etc. + // If the state changes the next update may be delayed 300-500ms. + update_buttons(); - // If the action button is pressed... - static bool wait_for_unclick; // = false + // If the action button is pressed... + static bool wait_for_unclick; // = false - auto do_click = [&]{ - wait_for_unclick = true; // - Set debounce flag to ignore continuous clicks - lcd_clicked = !wait_for_user; // - Keep the click if not waiting for a user-click - wait_for_user = false; // - Any click clears wait for user - quick_feedback(); // - Always make a click sound - }; + auto do_click = [&]{ + wait_for_unclick = true; // - Set debounce flag to ignore continuous clicks + lcd_clicked = !wait_for_user; // - Keep the click if not waiting for a user-click + wait_for_user = false; // - Any click clears wait for user + quick_feedback(); // - Always make a click sound + }; - #if HAS_TOUCH_BUTTONS - if (touch_buttons) { - reset_status_timeout(ms); - if (touch_buttons & (EN_A | EN_B)) { // Menu arrows, in priority - if (ELAPSED(ms, next_button_update_ms)) { - encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * epps * encoderDirection; - if (touch_buttons & EN_A) encoderDiff *= -1; - TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); - next_button_update_ms = ms + repeat_delay; // Assume the repeat delay - if (!wait_for_unclick) { - next_button_update_ms += 250; // Longer delay on first press - wait_for_unclick = true; // Avoid Back/Select click while repeating - chirp(); + #if HAS_TOUCH_BUTTONS + if (touch_buttons) { + reset_status_timeout(ms); + if (touch_buttons & (EN_A | EN_B)) { // Menu arrows, in priority + if (ELAPSED(ms, next_button_update_ms)) { + encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * epps * encoderDirection; + if (touch_buttons & EN_A) encoderDiff *= -1; + TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); + next_button_update_ms = ms + repeat_delay; // Assume the repeat delay + if (!wait_for_unclick) { + next_button_update_ms += 250; // Longer delay on first press + wait_for_unclick = true; // Avoid Back/Select click while repeating + chirp(); + } } } + else if (!wait_for_unclick && (buttons & EN_C)) // OK button, if not waiting for a debounce release: + do_click(); } - else if (!wait_for_unclick && (buttons & EN_C)) // OK button, if not waiting for a debounce release: - do_click(); - } - // keep wait_for_unclick value - #endif + // keep wait_for_unclick value + #endif - if (!touch_buttons) { - // Integrated LCD click handling via button_pressed - if (!external_control && button_pressed()) { - if (!wait_for_unclick) do_click(); // Handle the click + if (!touch_buttons) { + // Integrated LCD click handling via button_pressed + if (!external_control && button_pressed()) { + if (!wait_for_unclick) do_click(); // Handle the click + } + else + wait_for_unclick = false; } - else - wait_for_unclick = false; - } - if (LCD_BACK_CLICKED()) { - quick_feedback(); - goto_previous_screen(); - } + if (LCD_BACK_CLICKED()) { + quick_feedback(); + goto_previous_screen(); + } - #endif // HAS_LCD_MENU + #endif // HAS_LCD_MENU - if (ELAPSED(ms, next_lcd_update_ms) || TERN0(HAS_MARLINUI_U8GLIB, drawing_screen)) { + if (ELAPSED(ms, next_lcd_update_ms) || TERN0(HAS_MARLINUI_U8GLIB, drawing_screen)) { - next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL; + next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL; - #if HAS_TOUCH_BUTTONS + #if HAS_TOUCH_BUTTONS - if (on_status_screen()) next_lcd_update_ms += (LCD_UPDATE_INTERVAL) * 2; + if (on_status_screen()) next_lcd_update_ms += (LCD_UPDATE_INTERVAL) * 2; - TERN_(HAS_ENCODER_ACTION, touch_buttons = touch.read_buttons()); + TERN_(HAS_ENCODER_ACTION, touch_buttons = touch.read_buttons()); - #endif - - TERN_(LCD_HAS_STATUS_INDICATORS, update_indicators()); + #endif - #if HAS_ENCODER_ACTION + TERN_(LCD_HAS_STATUS_INDICATORS, update_indicators()); - TERN_(HAS_SLOW_BUTTONS, slow_buttons = read_slow_buttons()); // Buttons that take too long to read in interrupt context + #if HAS_ENCODER_ACTION - if (TERN0(IS_RRW_KEYPAD, handle_keypad())) - reset_status_timeout(ms); + TERN_(HAS_SLOW_BUTTONS, slow_buttons = read_slow_buttons()); // Buttons that take too long to read in interrupt context - uint8_t abs_diff = ABS(encoderDiff); + if (TERN0(IS_RRW_KEYPAD, handle_keypad())) + reset_status_timeout(ms); - #if ENCODER_PULSES_PER_STEP > 1 - // When reversing the encoder direction, a movement step can be missed because - // encoderDiff has a non-zero residual value, making the controller unresponsive. - // The fix clears the residual value when the encoder is idle. - // Also check if past half the threshold to compensate for missed single steps. - static int8_t lastEncoderDiff; + uint8_t abs_diff = ABS(encoderDiff); - // Timeout? No decoder change since last check. 10 or 20 times per second. - if (encoderDiff == lastEncoderDiff && abs_diff <= epps / 2) // Same direction & size but not over a half-step? - encoderDiff = 0; // Clear residual pulses. - else if (WITHIN(abs_diff, epps / 2 + 1, epps - 1)) { // Past half of threshold? - abs_diff = epps; // Treat as a full step size - encoderDiff = (encoderDiff < 0 ? -1 : 1) * abs_diff; // ...in the spin direction. - } - lastEncoderDiff = encoderDiff; - #endif + #if ENCODER_PULSES_PER_STEP > 1 + // When reversing the encoder direction, a movement step can be missed because + // encoderDiff has a non-zero residual value, making the controller unresponsive. + // The fix clears the residual value when the encoder is idle. + // Also check if past half the threshold to compensate for missed single steps. + static int8_t lastEncoderDiff; - const bool encoderPastThreshold = (abs_diff >= epps); - if (encoderPastThreshold || lcd_clicked) { - if (encoderPastThreshold && TERN1(IS_TFTGLCD_PANEL, !external_control)) { + // Timeout? No decoder change since last check. 10 or 20 times per second. + if (encoderDiff == lastEncoderDiff && abs_diff <= epps / 2) // Same direction & size but not over a half-step? + encoderDiff = 0; // Clear residual pulses. + else if (WITHIN(abs_diff, epps / 2 + 1, epps - 1)) { // Past half of threshold? + abs_diff = epps; // Treat as a full step size + encoderDiff = (encoderDiff < 0 ? -1 : 1) * abs_diff; // ...in the spin direction. + } + lastEncoderDiff = encoderDiff; + #endif - #if BOTH(HAS_LCD_MENU, ENCODER_RATE_MULTIPLIER) + const bool encoderPastThreshold = (abs_diff >= epps); + if (encoderPastThreshold || lcd_clicked) { + if (encoderPastThreshold && TERN1(IS_TFTGLCD_PANEL, !external_control)) { - int32_t encoderMultiplier = 1; + #if BOTH(HAS_LCD_MENU, ENCODER_RATE_MULTIPLIER) - if (encoderRateMultiplierEnabled) { - const float encoderMovementSteps = float(abs_diff) / epps; + int32_t encoderMultiplier = 1; - if (lastEncoderMovementMillis) { - // Note that the rate is always calculated between two passes through the - // loop and that the abs of the encoderDiff value is tracked. - const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000; + if (encoderRateMultiplierEnabled) { + const float encoderMovementSteps = float(abs_diff) / epps; - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; + if (lastEncoderMovementMillis) { + // Note that the rate is always calculated between two passes through the + // loop and that the abs of the encoderDiff value is tracked. + const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000; - // Enable to output the encoder steps per second value - //#define ENCODER_RATE_MULTIPLIER_DEBUG - #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Enc Step Rate: ", encoderStepRate); - SERIAL_ECHOPAIR(" Multiplier: ", encoderMultiplier); - SERIAL_ECHOPAIR(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); - SERIAL_ECHOPAIR(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); - SERIAL_EOL(); - #endif - } + if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; + else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; - lastEncoderMovementMillis = ms; - } // encoderRateMultiplierEnabled + // Enable to output the encoder steps per second value + //#define ENCODER_RATE_MULTIPLIER_DEBUG + #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) + SERIAL_ECHO_START(); + SERIAL_ECHOPAIR("Enc Step Rate: ", encoderStepRate); + SERIAL_ECHOPAIR(" Multiplier: ", encoderMultiplier); + SERIAL_ECHOPAIR(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); + SERIAL_ECHOPAIR(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); + SERIAL_EOL(); + #endif + } - #else + lastEncoderMovementMillis = ms; + } // encoderRateMultiplierEnabled - constexpr int32_t encoderMultiplier = 1; + #else - #endif // ENCODER_RATE_MULTIPLIER + constexpr int32_t encoderMultiplier = 1; - if (can_encode()) encoderPosition += (encoderDiff * encoderMultiplier) / epps; + #endif // ENCODER_RATE_MULTIPLIER - encoderDiff = 0; - } + if (can_encode()) encoderPosition += (encoderDiff * encoderMultiplier) / epps; - reset_status_timeout(ms); + encoderDiff = 0; + } - refresh(LCDVIEW_REDRAW_NOW); + reset_status_timeout(ms); - #ifdef LED_BACKLIGHT_TIMEOUT - if (!powersupply_on) leds.reset_timeout(ms); - #endif - } + refresh(LCDVIEW_REDRAW_NOW); - #endif + #ifdef LED_BACKLIGHT_TIMEOUT + if (!powersupply_on) leds.reset_timeout(ms); + #endif + } - // This runs every ~100ms when idling often enough. - // Instead of tracking changes just redraw the Status Screen once per second. - if (on_status_screen() && !lcd_status_update_delay--) { - lcd_status_update_delay = TERN(HAS_MARLINUI_U8GLIB, 12, 9); - if (max_display_update_time) max_display_update_time--; // Be sure never go to a very big number - refresh(LCDVIEW_REDRAW_NOW); - } + #endif - #if BOTH(HAS_LCD_MENU, SCROLL_LONG_FILENAMES) - // If scrolling of long file names is enabled and we are in the sd card menu, - // cause a refresh to occur until all the text has scrolled into view. - if (currentScreen == menu_media && !lcd_status_update_delay--) { - lcd_status_update_delay = ++filename_scroll_pos >= filename_scroll_max ? 12 : 4; // Long delay at end and start - if (filename_scroll_pos > filename_scroll_max) filename_scroll_pos = 0; + // This runs every ~100ms when idling often enough. + // Instead of tracking changes just redraw the Status Screen once per second. + if (on_status_screen() && !lcd_status_update_delay--) { + lcd_status_update_delay = TERN(HAS_MARLINUI_U8GLIB, 12, 9); + if (max_display_update_time) max_display_update_time--; // Be sure never go to a very big number refresh(LCDVIEW_REDRAW_NOW); - reset_status_timeout(ms); } - #endif - // Then we want to use only 50% of the time - const uint16_t bbr2 = planner.block_buffer_runtime() >> 1; - - if ((should_draw() || drawing_screen) && (!bbr2 || bbr2 > max_display_update_time)) { - - // Change state of drawing flag between screen updates - if (!drawing_screen) switch (lcdDrawUpdate) { - case LCDVIEW_CALL_NO_REDRAW: - refresh(LCDVIEW_NONE); - break; - case LCDVIEW_CLEAR_CALL_REDRAW: - case LCDVIEW_CALL_REDRAW_NEXT: + #if BOTH(HAS_LCD_MENU, SCROLL_LONG_FILENAMES) + // If scrolling of long file names is enabled and we are in the sd card menu, + // cause a refresh to occur until all the text has scrolled into view. + if (currentScreen == menu_media && !lcd_status_update_delay--) { + lcd_status_update_delay = ++filename_scroll_pos >= filename_scroll_max ? 12 : 4; // Long delay at end and start + if (filename_scroll_pos > filename_scroll_max) filename_scroll_pos = 0; refresh(LCDVIEW_REDRAW_NOW); - case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT - case LCDVIEW_NONE: - break; - } // switch + reset_status_timeout(ms); + } + #endif - TERN_(HAS_ADC_BUTTONS, keypad_buttons = 0); + // Then we want to use only 50% of the time + const uint16_t bbr2 = planner.block_buffer_runtime() >> 1; + + if ((should_draw() || drawing_screen) && (!bbr2 || bbr2 > max_display_update_time)) { + + // Change state of drawing flag between screen updates + if (!drawing_screen) switch (lcdDrawUpdate) { + case LCDVIEW_CALL_NO_REDRAW: + refresh(LCDVIEW_NONE); + break; + case LCDVIEW_CLEAR_CALL_REDRAW: + case LCDVIEW_CALL_REDRAW_NEXT: + refresh(LCDVIEW_REDRAW_NOW); + case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT + case LCDVIEW_NONE: + break; + } // switch + + TERN_(HAS_ADC_BUTTONS, keypad_buttons = 0); + + #if HAS_MARLINUI_U8GLIB + + #if ENABLED(LIGHTWEIGHT_UI) + const bool in_status = on_status_screen(), + do_u8g_loop = !in_status; + lcd_in_status(in_status); + if (in_status) status_screen(); + #else + constexpr bool do_u8g_loop = true; + #endif - #if HAS_MARLINUI_U8GLIB + if (do_u8g_loop) { + if (!drawing_screen) { // If not already drawing pages + u8g.firstPage(); // Start the first page + drawing_screen = first_page = true; // Flag as drawing pages + } + set_font(FONT_MENU); // Setup font for every page draw + u8g.setColorIndex(1); // And reset the color + run_current_screen(); // Draw and process the current screen + first_page = false; + + // The screen handler can clear drawing_screen for an action that changes the screen. + // If still drawing and there's another page, update max-time and return now. + // The nextPage will already be set up on the next call. + if (drawing_screen && (drawing_screen = u8g.nextPage())) { + if (on_status_screen()) + NOLESS(max_display_update_time, millis() - ms); + return; + } + } - #if ENABLED(LIGHTWEIGHT_UI) - const bool in_status = on_status_screen(), - do_u8g_loop = !in_status; - lcd_in_status(in_status); - if (in_status) status_screen(); #else - constexpr bool do_u8g_loop = true; - #endif - - if (do_u8g_loop) { - if (!drawing_screen) { // If not already drawing pages - u8g.firstPage(); // Start the first page - drawing_screen = first_page = true; // Flag as drawing pages - } - set_font(FONT_MENU); // Setup font for every page draw - u8g.setColorIndex(1); // And reset the color - run_current_screen(); // Draw and process the current screen - first_page = false; - - // The screen handler can clear drawing_screen for an action that changes the screen. - // If still drawing and there's another page, update max-time and return now. - // The nextPage will already be set up on the next call. - if (drawing_screen && (drawing_screen = u8g.nextPage())) { - if (on_status_screen()) - NOLESS(max_display_update_time, millis() - ms); - return; - } - } - #else + run_current_screen(); - run_current_screen(); + #endif - #endif + TERN_(HAS_LCD_MENU, lcd_clicked = false); - TERN_(HAS_LCD_MENU, lcd_clicked = false); + // Keeping track of the longest time for an individual LCD update. + // Used to do screen throttling when the planner starts to fill up. + if (on_status_screen()) + NOLESS(max_display_update_time, millis() - ms); + } - // Keeping track of the longest time for an individual LCD update. - // Used to do screen throttling when the planner starts to fill up. - if (on_status_screen()) - NOLESS(max_display_update_time, millis() - ms); - } + #if SCREENS_CAN_TIME_OUT + // Return to Status Screen after a timeout + if (on_status_screen() || defer_return_to_status) + reset_status_timeout(ms); + else if (ELAPSED(ms, return_to_status_ms)) + return_to_status(); + #endif - #if SCREENS_CAN_TIME_OUT - // Return to Status Screen after a timeout - if (on_status_screen() || defer_return_to_status) - reset_status_timeout(ms); - else if (ELAPSED(ms, return_to_status_ms)) - return_to_status(); - #endif + // Change state of drawing flag between screen updates + if (!drawing_screen) switch (lcdDrawUpdate) { + case LCDVIEW_CLEAR_CALL_REDRAW: + clear_lcd(); break; + case LCDVIEW_REDRAW_NOW: + refresh(LCDVIEW_NONE); + case LCDVIEW_NONE: + case LCDVIEW_CALL_REDRAW_NEXT: + case LCDVIEW_CALL_NO_REDRAW: + default: break; + } // switch - // Change state of drawing flag between screen updates - if (!drawing_screen) switch (lcdDrawUpdate) { - case LCDVIEW_CLEAR_CALL_REDRAW: - clear_lcd(); break; - case LCDVIEW_REDRAW_NOW: - refresh(LCDVIEW_NONE); - case LCDVIEW_NONE: - case LCDVIEW_CALL_REDRAW_NEXT: - case LCDVIEW_CALL_NO_REDRAW: - default: break; - } // switch + } // ELAPSED(ms, next_lcd_update_ms) - } // ELAPSED(ms, next_lcd_update_ms) + TERN_(HAS_GRAPHICAL_TFT, tft_idle()); + } - TERN_(HAS_GRAPHICAL_TFT, tft_idle()); -} + #if HAS_ADC_BUTTONS -#if HAS_ADC_BUTTONS + typedef struct { + uint16_t ADCKeyValueMin, ADCKeyValueMax; + uint8_t ADCKeyNo; + } _stADCKeypadTable_; - typedef struct { - uint16_t ADCKeyValueMin, ADCKeyValueMax; - uint8_t ADCKeyNo; - } _stADCKeypadTable_; + #ifndef ADC_BUTTONS_VALUE_SCALE + #define ADC_BUTTONS_VALUE_SCALE 1.0 // for the power voltage equal to the reference voltage + #endif + #ifndef ADC_BUTTONS_R_PULLUP + #define ADC_BUTTONS_R_PULLUP 4.7 // common pull-up resistor in the voltage divider + #endif + #ifndef ADC_BUTTONS_LEFT_R_PULLDOWN + #define ADC_BUTTONS_LEFT_R_PULLDOWN 0.47 // pull-down resistor for LEFT button voltage divider + #endif + #ifndef ADC_BUTTONS_RIGHT_R_PULLDOWN + #define ADC_BUTTONS_RIGHT_R_PULLDOWN 4.7 // pull-down resistor for RIGHT button voltage divider + #endif + #ifndef ADC_BUTTONS_UP_R_PULLDOWN + #define ADC_BUTTONS_UP_R_PULLDOWN 1.0 // pull-down resistor for UP button voltage divider + #endif + #ifndef ADC_BUTTONS_DOWN_R_PULLDOWN + #define ADC_BUTTONS_DOWN_R_PULLDOWN 10.0 // pull-down resistor for DOWN button voltage divider + #endif + #ifndef ADC_BUTTONS_MIDDLE_R_PULLDOWN + #define ADC_BUTTONS_MIDDLE_R_PULLDOWN 2.2 // pull-down resistor for MIDDLE button voltage divider + #endif - #ifndef ADC_BUTTONS_VALUE_SCALE - #define ADC_BUTTONS_VALUE_SCALE 1.0 // for the power voltage equal to the reference voltage - #endif - #ifndef ADC_BUTTONS_R_PULLUP - #define ADC_BUTTONS_R_PULLUP 4.7 // common pull-up resistor in the voltage divider - #endif - #ifndef ADC_BUTTONS_LEFT_R_PULLDOWN - #define ADC_BUTTONS_LEFT_R_PULLDOWN 0.47 // pull-down resistor for LEFT button voltage divider - #endif - #ifndef ADC_BUTTONS_RIGHT_R_PULLDOWN - #define ADC_BUTTONS_RIGHT_R_PULLDOWN 4.7 // pull-down resistor for RIGHT button voltage divider - #endif - #ifndef ADC_BUTTONS_UP_R_PULLDOWN - #define ADC_BUTTONS_UP_R_PULLDOWN 1.0 // pull-down resistor for UP button voltage divider - #endif - #ifndef ADC_BUTTONS_DOWN_R_PULLDOWN - #define ADC_BUTTONS_DOWN_R_PULLDOWN 10.0 // pull-down resistor for DOWN button voltage divider - #endif - #ifndef ADC_BUTTONS_MIDDLE_R_PULLDOWN - #define ADC_BUTTONS_MIDDLE_R_PULLDOWN 2.2 // pull-down resistor for MIDDLE button voltage divider - #endif + // Calculate the ADC value for the voltage divider with specified pull-down resistor value + #define ADC_BUTTON_VALUE(r) int(HAL_ADC_RANGE * (ADC_BUTTONS_VALUE_SCALE) * r / (r + ADC_BUTTONS_R_PULLUP)) + + static constexpr uint16_t adc_button_tolerance = HAL_ADC_RANGE * 25 / 1024, + adc_other_button = HAL_ADC_RANGE * 1000 / 1024; + static const _stADCKeypadTable_ stADCKeyTable[] PROGMEM = { + // VALUE_MIN, VALUE_MAX, KEY + { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F1 }, // F1 + { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F2 }, // F2 + { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F3 }, // F3 + { ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_LEFT }, // LEFT ( 272 ... 472) + { ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_RIGHT }, // RIGHT (1948 ... 2148) + { ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_UP }, // UP ( 618 ... 818) + { ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_DOWN }, // DOWN (2686 ... 2886) + { ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_MIDDLE }, // ENTER (1205 ... 1405) + }; - // Calculate the ADC value for the voltage divider with specified pull-down resistor value - #define ADC_BUTTON_VALUE(r) int(HAL_ADC_RANGE * (ADC_BUTTONS_VALUE_SCALE) * r / (r + ADC_BUTTONS_R_PULLUP)) - - static constexpr uint16_t adc_button_tolerance = HAL_ADC_RANGE * 25 / 1024, - adc_other_button = HAL_ADC_RANGE * 1000 / 1024; - static const _stADCKeypadTable_ stADCKeyTable[] PROGMEM = { - // VALUE_MIN, VALUE_MAX, KEY - { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F1 }, // F1 - { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F2 }, // F2 - { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F3 }, // F3 - { ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_LEFT }, // LEFT ( 272 ... 472) - { ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_RIGHT }, // RIGHT (1948 ... 2148) - { ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_UP }, // UP ( 618 ... 818) - { ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_DOWN }, // DOWN (2686 ... 2886) - { ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_MIDDLE }, // ENTER (1205 ... 1405) - }; - - uint8_t get_ADC_keyValue() { - if (thermalManager.ADCKey_count >= 16) { - const uint16_t currentkpADCValue = thermalManager.current_ADCKey_raw; - thermalManager.current_ADCKey_raw = HAL_ADC_RANGE; - thermalManager.ADCKey_count = 0; - if (currentkpADCValue < adc_other_button) - LOOP_L_N(i, ADC_KEY_NUM) { - const uint16_t lo = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMin), - hi = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMax); - if (WITHIN(currentkpADCValue, lo, hi)) return pgm_read_byte(&stADCKeyTable[i].ADCKeyNo); - } + uint8_t get_ADC_keyValue() { + if (thermalManager.ADCKey_count >= 16) { + const uint16_t currentkpADCValue = thermalManager.current_ADCKey_raw; + thermalManager.current_ADCKey_raw = HAL_ADC_RANGE; + thermalManager.ADCKey_count = 0; + if (currentkpADCValue < adc_other_button) + LOOP_L_N(i, ADC_KEY_NUM) { + const uint16_t lo = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMin), + hi = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMax); + if (WITHIN(currentkpADCValue, lo, hi)) return pgm_read_byte(&stADCKeyTable[i].ADCKeyNo); + } + } + return 0; } - return 0; - } -#endif // HAS_ADC_BUTTONS + #endif // HAS_ADC_BUTTONS -#if HAS_ENCODER_ACTION + #if HAS_ENCODER_ACTION - /** - * Read encoder buttons from the hardware registers - * Warning: This function is called from interrupt context! - */ - void MarlinUI::update_buttons() { - const millis_t now = millis(); - if (ELAPSED(now, next_button_update_ms)) { + /** + * Read encoder buttons from the hardware registers + * Warning: This function is called from interrupt context! + */ + void MarlinUI::update_buttons() { + const millis_t now = millis(); + if (ELAPSED(now, next_button_update_ms)) { - #if HAS_DIGITAL_BUTTONS + #if HAS_DIGITAL_BUTTONS - #if ANY_BUTTON(EN1, EN2, ENC, BACK) + #if ANY_BUTTON(EN1, EN2, ENC, BACK) - uint8_t newbutton = 0; - if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; - if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; - if (can_encode() && BUTTON_PRESSED(ENC)) newbutton |= EN_C; - if (BUTTON_PRESSED(BACK)) newbutton |= EN_D; + uint8_t newbutton = 0; + if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; + if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; + if (can_encode() && BUTTON_PRESSED(ENC)) newbutton |= EN_C; + if (BUTTON_PRESSED(BACK)) newbutton |= EN_D; - #else + #else - constexpr uint8_t newbutton = 0; + constexpr uint8_t newbutton = 0; - #endif + #endif - // - // Directional buttons - // - #if ANY_BUTTON(UP, DWN, LFT, RT) + // + // Directional buttons + // + #if ANY_BUTTON(UP, DWN, LFT, RT) - const int8_t pulses = epps * encoderDirection; + const int8_t pulses = epps * encoderDirection; - if (BUTTON_PRESSED(UP)) { - encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * pulses; - next_button_update_ms = now + 300; - } - else if (BUTTON_PRESSED(DWN)) { - encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * pulses; - next_button_update_ms = now + 300; - } - else if (BUTTON_PRESSED(LFT)) { - encoderDiff = -pulses; - next_button_update_ms = now + 300; - } - else if (BUTTON_PRESSED(RT)) { - encoderDiff = pulses; - next_button_update_ms = now + 300; - } + if (BUTTON_PRESSED(UP)) { + encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * pulses; + next_button_update_ms = now + 300; + } + else if (BUTTON_PRESSED(DWN)) { + encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * pulses; + next_button_update_ms = now + 300; + } + else if (BUTTON_PRESSED(LFT)) { + encoderDiff = -pulses; + next_button_update_ms = now + 300; + } + else if (BUTTON_PRESSED(RT)) { + encoderDiff = pulses; + next_button_update_ms = now + 300; + } - #endif // UP || DWN || LFT || RT + #endif // UP || DWN || LFT || RT - buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons) - #if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION) - | (touch_buttons & TERN(HAS_ENCODER_WHEEL, ~(EN_A | EN_B), 0xFF)) - #endif - ); + buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons) + #if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION) + | (touch_buttons & TERN(HAS_ENCODER_WHEEL, ~(EN_A | EN_B), 0xFF)) + #endif + ); - #elif HAS_ADC_BUTTONS + #elif HAS_ADC_BUTTONS - buttons = 0; + buttons = 0; - #endif + #endif - #if HAS_ADC_BUTTONS - if (keypad_buttons == 0) { - const uint8_t b = get_ADC_keyValue(); - if (WITHIN(b, 1, 8)) keypad_buttons = _BV(b - 1); - } - #endif + #if HAS_ADC_BUTTONS + if (keypad_buttons == 0) { + const uint8_t b = get_ADC_keyValue(); + if (WITHIN(b, 1, 8)) keypad_buttons = _BV(b - 1); + } + #endif - #if HAS_SHIFT_ENCODER - /** - * Set up Rotary Encoder bit values (for two pin encoders to indicate movement). - * These values are independent of which pins are used for EN_A / EN_B indications. - * The rotary encoder part is also independent of the LCD chipset. - */ - uint8_t val = 0; - WRITE(SHIFT_LD_PIN, LOW); - WRITE(SHIFT_LD_PIN, HIGH); - LOOP_L_N(i, 8) { - val >>= 1; - if (READ(SHIFT_OUT_PIN)) SBI(val, 7); - WRITE(SHIFT_CLK_PIN, HIGH); - WRITE(SHIFT_CLK_PIN, LOW); - } - TERN(REPRAPWORLD_KEYPAD, keypad_buttons, buttons) = ~val; - #endif + #if HAS_SHIFT_ENCODER + /** + * Set up Rotary Encoder bit values (for two pin encoders to indicate movement). + * These values are independent of which pins are used for EN_A / EN_B indications. + * The rotary encoder part is also independent of the LCD chipset. + */ + uint8_t val = 0; + WRITE(SHIFT_LD_PIN, LOW); + WRITE(SHIFT_LD_PIN, HIGH); + LOOP_L_N(i, 8) { + val >>= 1; + if (READ(SHIFT_OUT_PIN)) SBI(val, 7); + WRITE(SHIFT_CLK_PIN, HIGH); + WRITE(SHIFT_CLK_PIN, LOW); + } + TERN(REPRAPWORLD_KEYPAD, keypad_buttons, buttons) = ~val; + #endif - #if IS_TFTGLCD_PANEL - next_button_update_ms = now + (LCD_UPDATE_INTERVAL / 2); - buttons = slow_buttons; - TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); - #endif + #if IS_TFTGLCD_PANEL + next_button_update_ms = now + (LCD_UPDATE_INTERVAL / 2); + buttons = slow_buttons; + TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); + #endif - } // next_button_update_ms + } // next_button_update_ms - #if HAS_ENCODER_WHEEL - static uint8_t lastEncoderBits; + #if HAS_ENCODER_WHEEL + static uint8_t lastEncoderBits; - // Manage encoder rotation - #define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: encoderDiff += encoderDirection; break; case _E2: encoderDiff -= encoderDirection; } + // Manage encoder rotation + #define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: encoderDiff += encoderDirection; break; case _E2: encoderDiff -= encoderDirection; } - uint8_t enc = 0; - if (buttons & EN_A) enc |= B01; - if (buttons & EN_B) enc |= B10; - if (enc != lastEncoderBits) { - switch (enc) { - case ENCODER_PHASE_0: ENCODER_SPIN(ENCODER_PHASE_3, ENCODER_PHASE_1); break; - case ENCODER_PHASE_1: ENCODER_SPIN(ENCODER_PHASE_0, ENCODER_PHASE_2); break; - case ENCODER_PHASE_2: ENCODER_SPIN(ENCODER_PHASE_1, ENCODER_PHASE_3); break; - case ENCODER_PHASE_3: ENCODER_SPIN(ENCODER_PHASE_2, ENCODER_PHASE_0); break; + uint8_t enc = 0; + if (buttons & EN_A) enc |= B01; + if (buttons & EN_B) enc |= B10; + if (enc != lastEncoderBits) { + switch (enc) { + case ENCODER_PHASE_0: ENCODER_SPIN(ENCODER_PHASE_3, ENCODER_PHASE_1); break; + case ENCODER_PHASE_1: ENCODER_SPIN(ENCODER_PHASE_0, ENCODER_PHASE_2); break; + case ENCODER_PHASE_2: ENCODER_SPIN(ENCODER_PHASE_1, ENCODER_PHASE_3); break; + case ENCODER_PHASE_3: ENCODER_SPIN(ENCODER_PHASE_2, ENCODER_PHASE_0); break; + } + #if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL) + external_encoder(); + #endif + lastEncoderBits = enc; } - #if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL) - external_encoder(); - #endif - lastEncoderBits = enc; - } - #endif // HAS_ENCODER_WHEEL - } + #endif // HAS_ENCODER_WHEEL + } -#endif // HAS_ENCODER_ACTION + #endif // HAS_ENCODER_ACTION #endif // HAS_WIRED_LCD From 0a655c84bfb2455ef7d9bf00e66b35daf4ee73df Mon Sep 17 00:00:00 2001 From: Glought Date: Tue, 29 Jun 2021 10:35:22 -0700 Subject: [PATCH 005/323] =?UTF-8?q?=F0=9F=9A=B8=20Sanity-check=20Slim=20LC?= =?UTF-8?q?D=20menus=20with=20Probe=20Offset=20Wizard=20(#22259)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 7524259f6083..36ccbee9b9c9 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3588,6 +3588,13 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "Either enable MEATPACK_ON_SERIAL_PORT_* or BINARY_FILE_TRANSFER, not both." #endif +/** + * Sanity Check for Slim LCD Menus and Probe Offset Wizard + */ +#if BOTH(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD) + #error "SLIM_LCD_MENUS disables \"Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.\"" +#endif + /** * Sanity check for unique start and stop values in NOZZLE_CLEAN_FEATURE */ From 61c48b8513f445e4c57e4bf3e4c46ea6e7b39808 Mon Sep 17 00:00:00 2001 From: Cytown Date: Wed, 30 Jun 2021 01:58:11 +0800 Subject: [PATCH 006/323] =?UTF-8?q?=F0=9F=9A=B8=20Retain=20power=20during?= =?UTF-8?q?=20Pause=20(#22227)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/MarlinCore.h | 6 +++++- Marlin/src/feature/power.cpp | 19 ++++++++++++++++--- Marlin/src/feature/power.h | 2 +- Marlin/src/lcd/marlinui.h | 7 +++++-- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index f77f3b2f0b81..254283da5b67 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -617,7 +617,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { TERN_(USE_CONTROLLER_FAN, controllerFan.update()); // Check if fan should be turned on to cool stepper drivers down - TERN_(AUTO_POWER_CONTROL, powerManager.check()); + TERN_(AUTO_POWER_CONTROL, powerManager.check(!ui.on_status_screen() || printJobOngoing() || printingIsPaused())); TERN_(HOTEND_IDLE_TIMEOUT, hotend_idle.check()); diff --git a/Marlin/src/MarlinCore.h b/Marlin/src/MarlinCore.h index 01a1be4d594f..243811d7fb7e 100644 --- a/Marlin/src/MarlinCore.h +++ b/Marlin/src/MarlinCore.h @@ -91,7 +91,11 @@ extern bool wait_for_heatup; #define PSU_OFF_SOON() powerManager.power_off_soon() #else #define PSU_ON() PSU_PIN_ON() - #define PSU_OFF() PSU_PIN_OFF() + #if ENABLED(PS_OFF_SOUND) + #define PSU_OFF() do{ BUZZ(1000, 659); PSU_PIN_OFF(); }while(0) + #else + #define PSU_OFF() PSU_PIN_OFF() + #endif #define PSU_OFF_SOON PSU_OFF #endif #endif diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 519b2308d027..9b173d6ee706 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -50,6 +50,9 @@ Power powerManager; millis_t Power::lastPowerOn; bool Power::is_power_needed() { + + if (printJobOngoing() || printingIsPaused()) return true; + #if ENABLED(AUTO_POWER_FANS) FANS_LOOP(i) if (thermalManager.fan_speed[i]) return true; #endif @@ -110,9 +113,17 @@ bool Power::is_power_needed() { #define POWER_TIMEOUT 0 #endif -void Power::check() { +void Power::check(const bool pause) { + static bool _pause = false; static millis_t nextPowerCheck = 0; - millis_t now = millis(); + const millis_t now = millis(); + #if POWER_TIMEOUT > 0 + if (pause != _pause) { + lastPowerOn = now + !now; + _pause = pause; + } + if (pause) return; + #endif if (ELAPSED(now, nextPowerCheck)) { nextPowerCheck = now + 2500UL; if (is_power_needed()) @@ -123,7 +134,8 @@ void Power::check() { } void Power::power_on() { - lastPowerOn = millis(); + const millis_t now = millis(); + lastPowerOn = now + !now; if (!powersupply_on) { PSU_PIN_ON(); safe_delay(PSU_POWERUP_DELAY); @@ -152,6 +164,7 @@ void Power::power_off() { void Power::power_off_soon() { #if POWER_OFF_DELAY lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY); + //if (!lastPowerOn) ++lastPowerOn; #else power_off(); #endif diff --git a/Marlin/src/feature/power.h b/Marlin/src/feature/power.h index 2462b9231b92..bca5432946fb 100644 --- a/Marlin/src/feature/power.h +++ b/Marlin/src/feature/power.h @@ -29,7 +29,7 @@ class Power { public: - static void check(); + static void check(const bool pause); static void power_on(); static void power_off(); static void power_off_soon(); diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 87ecc48366de..7531fae67451 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -529,10 +529,13 @@ class MarlinUI { static void draw_select_screen_prompt(PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr); - #elif HAS_WIRED_LCD + #else static constexpr bool on_status_screen() { return true; } - FORCE_INLINE static void run_current_screen() { status_screen(); } + + #if HAS_WIRED_LCD + FORCE_INLINE static void run_current_screen() { status_screen(); } + #endif #endif From b90de621971656df4c0030cd04a3b4c782e4511d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 29 Jun 2021 16:25:37 -0500 Subject: [PATCH 007/323] =?UTF-8?q?=F0=9F=94=A8=20Clean=20up=20build=20scr?= =?UTF-8?q?ipts=20(#22264)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add 10K to marlin_blackSTM32F407VET6 (typo?) * Document custom build scripts. * Add a Robin common build script. * Extraneous .ldscript specifiers --- .../PlatformIO/boards/marlin_blackSTM32F407VET6.json | 2 +- buildroot/share/PlatformIO/scripts/custom_board.py | 3 +++ buildroot/share/PlatformIO/scripts/marlin.py | 8 -------- buildroot/share/PlatformIO/scripts/mks_robin.py | 4 ++-- buildroot/share/PlatformIO/scripts/mks_robin_e3.py | 4 ++-- buildroot/share/PlatformIO/scripts/mks_robin_e3p.py | 4 ++-- buildroot/share/PlatformIO/scripts/mks_robin_lite.py | 4 ++-- .../share/PlatformIO/scripts/mks_robin_lite3.py | 4 ++-- buildroot/share/PlatformIO/scripts/mks_robin_mini.py | 4 ++-- buildroot/share/PlatformIO/scripts/mks_robin_nano.py | 4 ++-- .../share/PlatformIO/scripts/mks_robin_nano35.py | 4 ++-- buildroot/share/PlatformIO/scripts/mks_robin_pro.py | 4 ++-- buildroot/share/PlatformIO/scripts/robin.py | 12 ++++++++++++ .../share/PlatformIO/scripts/stm32_bootloader.py | 7 +++++++ ini/stm32f1.ini | 7 ------- ini/stm32f4.ini | 5 ----- 16 files changed, 41 insertions(+), 39 deletions(-) create mode 100644 buildroot/share/PlatformIO/scripts/robin.py diff --git a/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json b/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json index 176563408602..a3f130c6b174 100644 --- a/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json +++ b/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json @@ -48,7 +48,7 @@ "upload": { "disable_flushing": false, "maximum_ram_size": 131072, - "maximum_size": 514288, + "maximum_size": 524288, "protocol": "stlink", "protocols": [ "stlink", diff --git a/buildroot/share/PlatformIO/scripts/custom_board.py b/buildroot/share/PlatformIO/scripts/custom_board.py index 5d3ca3c65214..e462738190dd 100644 --- a/buildroot/share/PlatformIO/scripts/custom_board.py +++ b/buildroot/share/PlatformIO/scripts/custom_board.py @@ -1,6 +1,9 @@ # # buildroot/share/PlatformIO/scripts/custom_board.py # +# - For build.address replace VECT_TAB_ADDR to relocate the firmware +# - For build.ldscript use one of the linker scripts in buildroot/share/PlatformIO/ldscripts +# import marlin board = marlin.env.BoardConfig() diff --git a/buildroot/share/PlatformIO/scripts/marlin.py b/buildroot/share/PlatformIO/scripts/marlin.py index 23c1b957426c..3949037904bb 100644 --- a/buildroot/share/PlatformIO/scripts/marlin.py +++ b/buildroot/share/PlatformIO/scripts/marlin.py @@ -67,11 +67,3 @@ def encrypt_mks(source, target, env, new_name): def add_post_action(action): env.AddPostAction(join("$BUILD_DIR", "${PROGNAME}.bin"), action); - -# Apply customizations for a MKS Robin -def prepare_robin(address, ldname, fwname): - def encrypt(source, target, env): - encrypt_mks(source, target, env, fwname) - relocate_firmware(address) - custom_ld_script(ldname) - add_post_action(encrypt); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin.py b/buildroot/share/PlatformIO/scripts/mks_robin.py index 8c5e4ae27665..2dea7c615f79 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin.py # -import marlin -marlin.prepare_robin("0x08007000", "mks_robin.ld", "Robin.bin") +import robin +robin.prepare("0x08007000", "mks_robin.ld", "Robin.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_e3.py b/buildroot/share/PlatformIO/scripts/mks_robin_e3.py index 7f6f538d6a21..6ddeccbf80f4 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_e3.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_e3.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_e3.py # -import marlin -marlin.prepare_robin("0x08005000", "mks_robin_e3.ld", "Robin_e3.bin") +import robin +robin.prepare("0x08005000", "mks_robin_e3.ld", "Robin_e3.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py b/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py index 1f3cacf87336..5eeb93c09663 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_e3p.py # -import marlin -marlin.prepare_robin("0x08007000", "mks_robin_e3p.ld", "Robin_e3p.bin") +import robin +robin.prepare("0x08007000", "mks_robin_e3p.ld", "Robin_e3p.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py index b8c039ada88d..c2018336fd1f 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_lite.py # -import marlin -marlin.prepare_robin("0x08005000", "mks_robin_lite.ld", "mksLite.bin") +import robin +robin.prepare("0x08005000", "mks_robin_lite.ld", "mksLite.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py index bea8b80ace6c..42c8fb18b691 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_lite3.py # -import marlin -marlin.prepare_robin("0x08005000", "mks_robin_lite.ld", "mksLite3.bin") +import robin +robin.prepare("0x08005000", "mks_robin_lite.ld", "mksLite3.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py index 3ff9ccf4a67a..b0d83886533a 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_mini.py # -import marlin -marlin.prepare_robin("0x08007000", "mks_robin_mini.ld", "Robin_mini.bin") +import robin +robin.prepare("0x08007000", "mks_robin_mini.ld", "Robin_mini.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py index 319b4d498202..35e99830c4df 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_nano.py # -import marlin -marlin.prepare_robin("0x08007000", "mks_robin_nano.ld", "Robin_nano.bin") +import robin +robin.prepare("0x08007000", "mks_robin_nano.ld", "Robin_nano.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py index 310c3d660667..4a5726ad5b98 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_nano35.py # -import marlin -marlin.prepare_robin("0x08007000", "mks_robin_nano.ld", "Robin_nano35.bin") +import robin +robin.prepare("0x08007000", "mks_robin_nano.ld", "Robin_nano35.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_pro.py b/buildroot/share/PlatformIO/scripts/mks_robin_pro.py index c624663a330c..60e2482bb030 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_pro.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_pro.py @@ -1,5 +1,5 @@ # # buildroot/share/PlatformIO/scripts/mks_robin_pro.py # -import marlin -marlin.prepare_robin("0x08007000", "mks_robin_pro.ld", "Robin_pro.bin") +import robin +robin.prepare("0x08007000", "mks_robin_pro.ld", "Robin_pro.bin") diff --git a/buildroot/share/PlatformIO/scripts/robin.py b/buildroot/share/PlatformIO/scripts/robin.py new file mode 100644 index 000000000000..50d0d92d2ff7 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/robin.py @@ -0,0 +1,12 @@ +# +# buildroot/share/PlatformIO/scripts/robin.py +# +import marlin + +# Apply customizations for a MKS Robin +def prepare(address, ldname, fwname): + def encrypt(source, target, env): + marlin.encrypt_mks(source, target, env, fwname) + marlin.relocate_firmware(address) + marlin.custom_ld_script(ldname) + marlin.add_post_action(encrypt); diff --git a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py b/buildroot/share/PlatformIO/scripts/stm32_bootloader.py index eb28b901d267..f3b1b273a28f 100644 --- a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py +++ b/buildroot/share/PlatformIO/scripts/stm32_bootloader.py @@ -1,6 +1,13 @@ # # stm32_bootloader.py # +# - If 'build.offset' is provided, either by JSON or by the environment... +# - Set linker flag LD_FLASH_OFFSET and relocate the VTAB based on 'build.offset'. +# - Set linker flag LD_MAX_DATA_SIZE based on 'build.maximum_ram_size'. +# - Define STM32_FLASH_SIZE from 'upload.maximum_size' for use by Flash-based EEPROM emulation. +# +# - For 'board_build.rename' add a post-action to rename the firmware file. +# import os,sys,marlin Import("env") diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 3f09a45c7ba9..0b394d173058 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -41,7 +41,6 @@ board = genericSTM32F103RC monitor_speed = 115200 board_build.core = stm32 board_build.variant = MARLIN_F103Rx -board_build.ldscript = ldscript.ld extra_scripts = ${common_stm32.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py @@ -108,7 +107,6 @@ extends = common_stm32 board = genericSTM32F103ZE board_build.core = stm32 board_build.variant = MARLIN_F103Zx -board_build.ldscript = ldscript.ld board_build.offset = 0x7000 board_build.encrypt = Robin.bin build_flags = ${common_stm32.build_flags} @@ -150,7 +148,6 @@ monitor_speed = 115200 board_build.core = stm32 board_build.variant = MARLIN_F103Rx board_build.offset = 0x7000 -board_build.ldscript = ldscript.ld board_upload.offset_address = 0x08007000 build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC extra_scripts = ${common.extra_scripts} @@ -175,7 +172,6 @@ monitor_speed = 115200 board_build.core = stm32 board_build.variant = MARLIN_F103Rx board_build.offset = 0x7000 -board_build.ldscript = ldscript.ld board_upload.offset_address = 0x08007000 build_unflags = ${common_stm32.build_unflags} extra_scripts = ${common.extra_scripts} @@ -207,7 +203,6 @@ build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER= board = genericSTM32F103VE board_build.core = stm32 board_build.variant = MARLIN_F103Vx -board_build.ldscript = ldscript.ld board_build.offset = 0x7000 board_build.encrypt = Robin_mini.bin board_upload.offset_address = 0x08007000 @@ -227,7 +222,6 @@ build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER= board = genericSTM32F103VE board_build.core = stm32 board_build.variant = MARLIN_F103Vx -board_build.ldscript = ldscript.ld board_build.offset = 0x7000 board_build.encrypt = Robin_nano35.bin board_upload.offset_address = 0x08007000 @@ -248,7 +242,6 @@ extends = common_stm32 board = genericSTM32F103ZE board_build.core = stm32 board_build.variant = MARLIN_F103Zx -board_build.ldscript = ldscript.ld board_build.offset = 0x10000 build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index ee88135ecaa5..e7695dcc7a27 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -112,7 +112,6 @@ build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL board = marlin_STM32F407VGT6_CCM board_build.core = stm32 board_build.variant = MARLIN_F4x7Vx -board_build.ldscript = ldscript.ld board_build.encrypt = firmware.srec # Just openblt.py (not stm32_bootloader.py) generates the file board_build.offset = 0x10000 @@ -222,7 +221,6 @@ extends = common_stm32 board = marlin_STM32F407VGT6_CCM board_build.core = stm32 board_build.variant = MARLIN_F4x7Vx -board_build.ldscript = ldscript.ld board_build.offset = 0x8000 board_upload.offset_address = 0x08008000 extra_scripts = ${common.extra_scripts} @@ -344,7 +342,6 @@ upload_protocol = dfu monitor_speed = 500000 board_build.core = stm32 board_build.variant = MARLIN_F446VE -board_build.ldscript = ldscript.ld board_build.offset = 0x0000 extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -361,7 +358,6 @@ build_flags = ${stm_flash_drive.build_flags} board = genericSTM32F407VET6 board_build.core = stm32 board_build.variant = MARLIN_F4x7Vx -board_build.ldscript = ldscript.ld board_build.offset = 0x0000 board_upload.offset_address = 0x08000000 build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC @@ -387,7 +383,6 @@ build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} - board = marlin_STM32F407VGT6_CCM board_build.core = stm32 board_build.variant = MARLIN_F4x7Vx -board_build.ldscript = ldscript.ld board_build.rename = Robin_nano_v3.bin board_build.offset = 0xC000 board_upload.offset_address = 0x0800C000 From 415166e02c981d21d1b2ee8e7ba9a0f90927cf04 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 30 Jun 2021 01:00:32 +0000 Subject: [PATCH 008/323] [cron] Bump distribution date (2021-06-30) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index fdd672ec0ed1..bd6e276fd4b2 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-06-29" + #define STRING_DISTRIBUTION_DATE "2021-06-30" #endif /** From 106eee071bd8d17148477c33aefabfa5755ad1e1 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 1 Jul 2021 01:00:20 +0000 Subject: [PATCH 009/323] [cron] Bump distribution date (2021-07-01) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index bd6e276fd4b2..63e2ed957fcc 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-06-30" + #define STRING_DISTRIBUTION_DATE "2021-07-01" #endif /** From 03a469724af05223be2a8bac71a1082c9ebbc55c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 30 Jun 2021 21:58:25 -0500 Subject: [PATCH 010/323] =?UTF-8?q?=F0=9F=93=9D=20Update=20Z=5FSAFE=5FHOMI?= =?UTF-8?q?NG=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6fc4a7cd4c7d..3b3087e46f9b 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1700,15 +1700,13 @@ //#define MANUAL_J_HOME_POS 0 //#define MANUAL_K_HOME_POS 0 -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing. -// - Prevent Z homing when the Z probe is outside bed area. -// +/** + * Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. + * + * - Moves the Z probe (or nozzle) to a defined XY point before Z homing. + * - Allows Z homing only when XY positions are known and trusted. + * - If stepper drivers sleep, XY homing may be required again before Z homing. + */ //#define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) From e96720c0760c7b66367f08fcd081648dac070cc9 Mon Sep 17 00:00:00 2001 From: ellensp Date: Fri, 2 Jul 2021 09:27:27 +1200 Subject: [PATCH 011/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Arduino=20IDE=20bu?= =?UTF-8?q?ild=20(TOUCH=5FUI=5FFTDI=5FEVE=20includes)=20(#22276)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- .../extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp | 2 +- .../ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp | 2 +- Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h | 6 +++++- Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h | 2 +- Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp index a64c237fa13f..1d4711c0e262 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp @@ -20,7 +20,7 @@ * location: . * ****************************************************************************/ -#include "../compat.h" +#include "../config.h" #if ENABLED(TOUCH_UI_FTDI_EVE) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp index ea8d4037531e..b4165a742a5f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp @@ -20,7 +20,7 @@ * location: . * ****************************************************************************/ -#include "../compat.h" +#include "../config.h" #if ENABLED(TOUCH_UI_FTDI_EVE) #include "media_file_reader.h" diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h index 76b231536bea..05e19b20e478 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h @@ -21,6 +21,10 @@ #pragma once +// Configure this display with options in Configuration_adv.h +#include "../../../inc/MarlinConfigPre.h" +#if ENABLED(TOUCH_UI_FTDI_EVE) + #include "compat.h" -// Configure this display with options in Configuration_adv.h +#endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h index f118303d2188..4fe4cb938adf 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h @@ -22,7 +22,7 @@ #pragma once -#include "compat.h" +#include "config.h" #if ENABLED(TOUCH_UI_FTDI_EVE) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp index afbed0cab123..1ed712ded1bc 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp @@ -20,7 +20,7 @@ * location: . * ****************************************************************************/ -#include "../compat.h" +#include "../config.h" #if ENABLED(TOUCH_UI_FTDI_EVE) From 71bf61901c6469ed47cc068f34ce952d9e5d55f5 Mon Sep 17 00:00:00 2001 From: Cytown Date: Fri, 2 Jul 2021 08:37:44 +0800 Subject: [PATCH 012/323] =?UTF-8?q?=F0=9F=9A=B8=20Filament=20Change=20add?= =?UTF-8?q?=20confirm=20step=20(#22277)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_filament.cpp | 17 +++++++++++++---- Marlin/src/lcd/menu/menu_main.cpp | 10 +++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index c6b8568085f4..d70ed98aa849 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -106,10 +106,11 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) { * "Change Filament" submenu */ #if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) - bool printingIsPaused(); +#endif - void menu_change_filament() { +void menu_change_filament() { + #if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) // Say "filament change" when no print is active editable.int8 = printingIsPaused() ? PAUSE_MODE_PAUSE_PRINT : PAUSE_MODE_CHANGE_FILAMENT; @@ -204,8 +205,16 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) { #endif END_MENU(); - } -#endif + + #else + + if (thermalManager.targetHotEnoughToExtrude(active_extruder)) + queue.inject_P(PSTR("M600B0")); + else + _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); + + #endif +} static uint8_t hotend_status_extruder = 0; diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 1e79edb86418..4e3310f2383f 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -77,7 +77,6 @@ void menu_configuration(); #endif #if ENABLED(ADVANCED_PAUSE_FEATURE) - void _menu_temp_filament_op(const PauseMode, const int8_t); void menu_change_filament(); #endif @@ -365,10 +364,11 @@ void menu_main() { #if ENABLED(ADVANCED_PAUSE_FEATURE) #if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES) - if (thermalManager.targetHotEnoughToExtrude(active_extruder)) - GCODES_ITEM(MSG_FILAMENTCHANGE, PSTR("M600 B0")); - else - SUBMENU(MSG_FILAMENTCHANGE, []{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); }); + CONFIRM_ITEM(MSG_FILAMENTCHANGE, + MSG_YES, MSG_NO, + menu_change_filament, ui.goto_previous_screen, + GET_TEXT(MSG_FILAMENTCHANGE), (const char *)nullptr, PSTR("?") + ); #else SUBMENU(MSG_FILAMENTCHANGE, menu_change_filament); #endif From 2566f5e0f3fd3103b614606205dcd98d789dbdfc Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 2 Jul 2021 01:01:44 +0000 Subject: [PATCH 013/323] [cron] Bump distribution date (2021-07-02) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 63e2ed957fcc..01fac6127951 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-01" + #define STRING_DISTRIBUTION_DATE "2021-07-02" #endif /** From ee4c1839d49766f4f62a9ba14cfbcf82b525be57 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 3 Jul 2021 00:55:59 +0000 Subject: [PATCH 014/323] [cron] Bump distribution date (2021-07-03) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 01fac6127951..9cb35a7f5497 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-02" + #define STRING_DISTRIBUTION_DATE "2021-07-03" #endif /** From cff2d16be66cd88828d5d968cdecb2c6042e7163 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 4 Jul 2021 00:58:37 +0000 Subject: [PATCH 015/323] [cron] Bump distribution date (2021-07-04) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 9cb35a7f5497..cc52c730209a 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-03" + #define STRING_DISTRIBUTION_DATE "2021-07-04" #endif /** From de38cae00cf45ef864e2df180a9d37dc509817a4 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 5 Jul 2021 00:56:12 +0000 Subject: [PATCH 016/323] [cron] Bump distribution date (2021-07-05) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index cc52c730209a..5fdcc7c7281e 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-04" + #define STRING_DISTRIBUTION_DATE "2021-07-05" #endif /** From 9eb5444c20b552cc39a668a22ce68536bff3664d Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 6 Jul 2021 01:00:11 +0000 Subject: [PATCH 017/323] [cron] Bump distribution date (2021-07-06) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 5fdcc7c7281e..b432c821ac61 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-05" + #define STRING_DISTRIBUTION_DATE "2021-07-06" #endif /** From b2f0913083d83bd3fd9af1c603d1f4cc1afb64eb Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Tue, 6 Jul 2021 17:36:41 -0700 Subject: [PATCH 018/323] =?UTF-8?q?=F0=9F=90=9B=20Redundant=20Temp=20Senso?= =?UTF-8?q?r=20followup=20(#22196)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 136 ++-- Marlin/Configuration_adv.h | 19 +- Marlin/src/HAL/SAMD51/inc/SanityCheck.h | 3 +- Marlin/src/MarlinCore.cpp | 4 +- Marlin/src/core/macros.h | 4 +- Marlin/src/gcode/calibrate/G34_M422.cpp | 12 +- Marlin/src/inc/Conditionals_post.h | 459 ++++++++----- Marlin/src/inc/SanityCheck.h | 136 ++-- Marlin/src/libs/MAX31865.cpp | 500 ++++++++++++++ Marlin/src/libs/MAX31865.h | 131 ++++ Marlin/src/module/motion.cpp | 3 +- Marlin/src/module/temperature.cpp | 626 +++++++++--------- Marlin/src/module/temperature.h | 20 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 6 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 13 + Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 4 +- Marlin/src/pins/mega/pins_MALYAN_M180.h | 18 +- Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 20 +- Marlin/src/pins/mega/pins_PICA.h | 6 +- Marlin/src/pins/pinsDebug_list.h | 40 +- Marlin/src/pins/rambo/pins_RAMBO.h | 6 +- Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h | 6 +- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 6 +- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 6 +- Marlin/src/pins/ramps/pins_RAMPS.h | 6 +- Marlin/src/pins/ramps/pins_RAMPS_OLD.h | 6 +- Marlin/src/pins/ramps/pins_RIGIDBOARD.h | 8 +- Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 6 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 6 +- Marlin/src/pins/sam/pins_DUE3DOM.h | 6 +- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 6 +- Marlin/src/pins/sam/pins_RADDS.h | 6 +- Marlin/src/pins/sam/pins_RAMPS_DUO.h | 8 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 6 +- Marlin/src/pins/sam/pins_RAMPS_SMART.h | 8 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 6 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 6 +- Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h | 11 +- .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 8 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 4 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 4 +- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 20 +- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 12 +- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 4 +- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 4 +- ini/features.ini | 2 +- platformio.ini | 1 + 49 files changed, 1563 insertions(+), 783 deletions(-) create mode 100644 Marlin/src/libs/MAX31865.cpp create mode 100644 Marlin/src/libs/MAX31865.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 3b3087e46f9b..e9a49b605617 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -397,70 +397,92 @@ // @section temperature /** - * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * --NORMAL IS 4.7kΩ PULLUP!-- 1kΩ pullup can be used on hotend sensor, using correct resistor and table * * Temperature sensors available: * - * -5 : PT100 / PT1000 with MAX31865 (only for sensors 0-1) - * -3 : thermocouple with MAX31855 (only for sensors 0-1) - * -2 : thermocouple with MAX6675 (only for sensors 0-1) - * -4 : thermocouple with AD8495 - * -1 : thermocouple with AD595 + * SPI RTD/Thermocouple Boards - IMPORTANT: Read the NOTE below! + * ------- + * -5 : MAX31865 with Pt100/Pt1000, 2, 3, or 4-wire (only for sensors 0-1) + * NOTE: You must uncomment/set the MAX31865_*_OHMS_n defines below. + * -3 : MAX31855 with Thermocouple, -200°C to +700°C (only for sensors 0-1) + * -2 : MAX6675 with Thermocouple, 0°C to +700°C (only for sensors 0-1) + * + * NOTE: Ensure TEMP_n_CS_PIN is set in your pins file for each TEMP_SENSOR_n using an SPI Thermocouple. By default, + * Hardware SPI on the default serial bus is used. If you have also set TEMP_n_SCK_PIN and TEMP_n_MISO_PIN, + * Software SPI will be used on those ports instead. You can force Hardware SPI on the default bus in the + * Configuration_adv.h file. At this time, separate Hardware SPI buses for sensors are not supported. + * + * Analog Themocouple Boards + * ------- + * -4 : AD8495 with Thermocouple + * -1 : AD595 with Thermocouple + * + * Analog Thermistors - 4.7kΩ pullup - Normal + * ------- + * 1 : 100kΩ EPCOS - Best choice for EPCOS thermistors + * 331 : 100kΩ Same as #1, but 3.3V scaled for MEGA + * 332 : 100kΩ Same as #1, but 3.3V scaled for DUE + * 2 : 200kΩ ATC Semitec 204GT-2 + * 202 : 200kΩ Copymaster 3D + * 3 : ???Ω Mendel-parts thermistor + * 4 : 10kΩ Generic Thermistor !! DO NOT use for a hotend - it gives bad resolution at high temp. !! + * 5 : 100kΩ ATC Semitec 104GT-2/104NT-4-R025H42G - Used in ParCan, J-Head, and E3D, SliceEngineering 300°C + * 501 : 100kΩ Zonestar - Tronxy X3A + * 502 : 100kΩ Zonestar - used by hot bed in Zonestar Průša P802M + * 512 : 100kΩ RPW-Ultra hotend + * 6 : 100kΩ EPCOS - Not as accurate as table #1 (created using a fluke thermocouple) + * 7 : 100kΩ Honeywell 135-104LAG-J01 + * 71 : 100kΩ Honeywell 135-104LAF-J01 + * 8 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT + * 9 : 100kΩ GE Sensing AL03006-58.2K-97-G1 + * 10 : 100kΩ RS PRO 198-961 + * 11 : 100kΩ Keenovo AC silicone mats, most Wanhao i3 machines - beta 3950, 1% + * 12 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT (#8) - calibrated for Makibox hot bed + * 13 : 100kΩ Hisens up to 300°C - for "Simple ONE" & "All In ONE" hotend - beta 3950, 1% + * 15 : 100kΩ Calibrated for JGAurora A5 hotend + * 18 : 200kΩ ATC Semitec 204GT-2 Dagoma.Fr - MKS_Base_DKU001327 + * 22 : 100kΩ GTM32 Pro vB - hotend - 4.7kΩ pullup to 3.3V and 220Ω to analog input + * 23 : 100kΩ GTM32 Pro vB - bed - 4.7kΩ pullup to 3.3v and 220Ω to analog input + * 30 : 100kΩ Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K - beta 3950 + * 60 : 100kΩ Maker's Tool Works Kapton Bed Thermistor - beta 3950 + * 61 : 100kΩ Formbot/Vivedino 350°C Thermistor - beta 3950 + * 66 : 4.7MΩ Dyze Design High Temperature Thermistor + * 67 : 500kΩ SliceEngineering 450°C Thermistor + * 70 : 100kΩ bq Hephestos 2 + * 75 : 100kΩ Generic Silicon Heat Pad with NTC100K MGB18-104F39050L32 + * + * Analog Thermistors - 1kΩ pullup - Atypical, and requires changing out the 4.7kΩ pullup for 1kΩ. + * ------- (but gives greater accuracy and more stable PID) + * 51 : 100kΩ EPCOS (1kΩ pullup) + * 52 : 200kΩ ATC Semitec 204GT-2 (1kΩ pullup) + * 55 : 100kΩ ATC Semitec 104GT-2 - Used in ParCan & J-Head (1kΩ pullup) + * + * Analog Thermistors - 10kΩ pullup - Atypical + * ------- + * 99 : 100kΩ Found on some Wanhao i3 machines with a 10kΩ pull-up resistor + * + * Analog RTDs (Pt100/Pt1000) + * ------- + * 110 : Pt100 with 1kΩ pullup (atypical) + * 147 : Pt100 with 4.7kΩ pullup + * 1010 : Pt1000 with 1kΩ pullup (atypical) + * 1047 : Pt1000 with 4.7kΩ pullup (E3D) + * 20 : Pt100 with circuit in the Ultimainboard V2.x with mainboard ADC reference voltage = INA826 amplifier-board supply voltage. + * NOTE: (1) Must use an ADC input with no pullup. (2) Some INA826 amplifiers are unreliable at 3.3V so consider using sensor 147, 110, or 21. + * 21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v ADC reference voltage (STM32, LPC176x....) and 5V INA826 amplifier board supply. + * NOTE: ADC pins are not 5V tolerant. Not recommended because it's possible to damage the CPU by going over 500°C. + * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x + * + * Custom/Dummy/Other Thermos + * ------ * 0 : not used - * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) - * 331 : (3.3V scaled thermistor 1 table for MEGA) - * 332 : (3.3V scaled thermistor 1 table for DUE) - * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) - * 202 : 200k thermistor - Copymaster 3D - * 3 : Mendel-parts thermistor (4.7k pullup) - * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! - * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan, J-Head, and E3D) (4.7k pullup) - * 501 : 100K Zonestar (Tronxy X3A) Thermistor - * 502 : 100K Zonestar Thermistor used by hot bed in Zonestar Průša P802M - * 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup) - * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) - * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) - * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) - * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) - * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) - * 10 : 100k RS thermistor 198-961 (4.7k pullup) - * 11 : 100k beta 3950 1% thermistor (Used in Keenovo AC silicone mats and most Wanhao i3 machines) (4.7k pullup) - * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) - * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" - * 15 : 100k thermistor calibration for JGAurora A5 hotend - * 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 - * 20 : Pt100 with circuit in the Ultimainboard V2.x with mainboard ADC reference voltage = INA826 amplifier-board supply voltage. - * NOTES: (1) Must use an ADC input with no pullup. (2) Some INA826 amplifiers are unreliable at 3.3V so consider using sensor 147, 110, or 21. - * 21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v ADC reference voltage (STM32, LPC176x....) and 5V INA826 amplifier board supply. - * NOTE: ADC pins are not 5V tolerant. Not recommended because it's possible to damage the CPU by going over 500°C. - * 22 : 100k (hotend) with 4.7k pullup to 3.3V and 220R to analog input (as in GTM32 Pro vB) - * 23 : 100k (bed) with 4.7k pullup to 3.3v and 220R to analog input (as in GTM32 Pro vB) - * 30 : Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K / B3950 (4.7k pullup) - * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x - * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 - * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup - * 66 : 4.7M High Temperature thermistor from Dyze Design - * 67 : 450C thermistor from SliceEngineering - * 70 : the 100K thermistor found in the bq Hephestos 2 - * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor - * 99 : 100k thermistor with a 10K pull-up resistor (found on some Wanhao i3 machines) - * - * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. - * (but gives greater accuracy and more stable PID) - * 51 : 100k thermistor - EPCOS (1k pullup) - * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) - * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) - * - * 1047 : Pt1000 with 4k7 pullup (E3D) - * 1010 : Pt1000 with 1k pullup (non standard) - * 147 : Pt100 with 4k7 pullup - * 110 : Pt100 with 1k pullup (non standard) - * * 1000 : Custom - Specify parameters in Configuration_adv.h * - * Use these for Testing or Development purposes. NEVER for production machine. + * !!! Use these for Testing or Development purposes. NEVER for production machine. !!! * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -482,7 +504,7 @@ // Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1 //#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000) -//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for AdaFruit PT100; 4300 for AdaFruit PT1000 +//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000 //#define MAX31865_SENSOR_OHMS_1 100 //#define MAX31865_CALIBRATION_OHMS_1 430 diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 818edecea2f7..6a7219383b2a 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -131,10 +131,21 @@ #define REDUNDANT_BETA 3950 // Beta value #endif -// -// Hephestos 2 24V heated bed upgrade kit. -// https://store.bq.com/en/heated-bed-kit-hephestos2 -// +/** + * Configuration options for MAX Thermocouples (-2, -3, -5). + * FORCE_HW_SPI: Ignore SCK/MOSI/MISO pins and just use the CS pin & default SPI bus. + * MAX31865_WIRES: Set the number of wires for the probe connected to a MAX31865 board, 2-4. Default: 2 + * MAX31865_50HZ: Enable 50Hz filter instead of the default 60Hz. + */ +//#define TEMP_SENSOR_FORCE_HW_SPI +//#define MAX31865_SENSOR_WIRES_0 2 +//#define MAX31865_SENSOR_WIRES_1 2 +//#define MAX31865_50HZ_FILTER + +/** + * Hephestos 2 24V heated bed upgrade kit. + * https://store.bq.com/en/heated-bed-kit-hephestos2 + */ //#define HEPHESTOS2_HEATED_BED_KIT #if ENABLED(HEPHESTOS2_HEATED_BED_KIT) #undef TEMP_SENSOR_BED diff --git a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h index 2a4bde98e6cb..38c6dd9e08de 100644 --- a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h +++ b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h @@ -31,7 +31,8 @@ #error "No custom SD drive cable defined for this board." #endif -#if defined(MAX6675_SCK_PIN) && defined(MAX6675_DO_PIN) && (MAX6675_SCK_PIN == SCK1 || MAX6675_DO_PIN == MISO1) +#if (defined(TEMP_0_SCK_PIN) && defined(TEMP_0_MISO_PIN) && (TEMP_0_SCK_PIN == SCK1 || TEMP_0_MISO_PIN == MISO1)) || \ + (defined(TEMP_1_SCK_PIN) && defined(TEMP_1_MISO_PIN) && (TEMP_1_SCK_PIN == SCK1 || TEMP_1_MISO_PIN == MISO1)) #error "OnBoard SPI BUS can't be shared with other devices." #endif diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 254283da5b67..dc9fbb2ba787 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1169,10 +1169,10 @@ void setup() { // Init and disable SPI thermocouples; this is still needed #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0) - OUT_WRITE(MAX6675_SS_PIN, HIGH); // Disable + OUT_WRITE(TEMP_0_CS_PIN, HIGH); // Disable #endif #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1) - OUT_WRITE(MAX6675_SS2_PIN, HIGH); // Disable + OUT_WRITE(TEMP_1_CS_PIN, HIGH); #endif #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD) diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 295eee9bcfa8..05640bce8740 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -204,8 +204,8 @@ #define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1' #define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B. -#define _OPTARG(A) , A -#define OPTARG(O,A) TERN_(O,DEFER4(_OPTARG)(A)) +#define _OPTARG(A...) , A +#define OPTARG(O,A...) TERN_(O,DEFER4(_OPTARG)(A)) #define _OPTCODE(A) A; #define OPTCODE(O,A) TERN_(O,DEFER4(_OPTCODE)(A)) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 686996202840..50f3419c8960 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -314,11 +314,13 @@ void GcodeSuite::G34() { sprintf_P(msg, PSTR("1:2=%s" TERN_(TRIPLE_Z, " 3-2=%s 3-1=%s") TERN_(QUAD_Z, " 4-3=%s 4-2=%s 4-1=%s")), dtostrf(ABS(z_measured[1] - z_measured[0]), 1, 3, fstr1) - OPTARG(TRIPLE_Z, dtostrf(ABS(z_measured[2] - z_measured[1]), 1, 3, fstr2)) - OPTARG(TRIPLE_Z, dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr3)) - OPTARG(QUAD_Z, dtostrf(ABS(z_measured[3] - z_measured[2]), 1, 3, fstr4)) - OPTARG(QUAD_Z, dtostrf(ABS(z_measured[3] - z_measured[1]), 1, 3, fstr5)) - OPTARG(QUAD_Z, dtostrf(ABS(z_measured[3] - z_measured[0]), 1, 3, fstr6)) + OPTARG(TRIPLE_Z, + dtostrf(ABS(z_measured[2] - z_measured[1]), 1, 3, fstr2), + dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr3)) + OPTARG(QUAD_Z, + dtostrf(ABS(z_measured[3] - z_measured[2]), 1, 3, fstr4), + dtostrf(ABS(z_measured[3] - z_measured[1]), 1, 3, fstr5), + dtostrf(ABS(z_measured[3] - z_measured[0]), 1, 3, fstr6)) ); ui.set_status(msg); #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 45271bca72ac..2f5af2b7008e 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -615,20 +615,21 @@ #if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2 #define TEMP_SENSOR_0_IS_MAX_TC 1 - #define HAS_MAX_TC 1 - #if TEMP_SENSOR_0 == -3 - #define TEMP_SENSOR_0_MAX_TC_TMIN -270 - #define TEMP_SENSOR_0_MAX_TC_TMAX 1800 - #else - #define TEMP_SENSOR_0_MAX_TC_TMIN 0 - #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 - #endif #if TEMP_SENSOR_0 == -5 #define TEMP_SENSOR_0_IS_MAX31865 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN 0 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 + #ifndef MAX31865_SENSOR_WIRES_0 + #define MAX31865_SENSOR_WIRES_0 2 + #endif #elif TEMP_SENSOR_0 == -3 #define TEMP_SENSOR_0_IS_MAX31855 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN -270 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1800 #elif TEMP_SENSOR_0 == -2 #define TEMP_SENSOR_0_IS_MAX6675 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN 0 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 #endif #elif TEMP_SENSOR_0 == -4 #define TEMP_SENSOR_0_IS_AD8495 1 @@ -648,21 +649,23 @@ #if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2 #define TEMP_SENSOR_1_IS_MAX_TC 1 - #define HAS_MAX_TC 1 - #if TEMP_SENSOR_1 == -3 - #define TEMP_SENSOR_1_MAX_TC_TMIN -270 - #define TEMP_SENSOR_1_MAX_TC_TMAX 1800 - #else - #define TEMP_SENSOR_1_MAX_TC_TMIN 0 - #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 - #endif #if TEMP_SENSOR_1 == -5 #define TEMP_SENSOR_1_IS_MAX31865 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN 0 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 + #ifndef MAX31865_SENSOR_WIRES_1 + #define MAX31865_SENSOR_WIRES_1 2 + #endif #elif TEMP_SENSOR_1 == -3 #define TEMP_SENSOR_1_IS_MAX31855 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN -270 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1800 #elif TEMP_SENSOR_1 == -2 #define TEMP_SENSOR_1_IS_MAX6675 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN 0 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 #endif + #if TEMP_SENSOR_1 != TEMP_SENSOR_0 #if TEMP_SENSOR_1 == -5 #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." @@ -690,37 +693,48 @@ #if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2 #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1 - #define HAS_MAX_TC 1 - #if TEMP_SENSOR_REDUNDANT == -3 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800 - #else - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 - #endif - #if TEMP_SENSOR_REDUNDANT_SOURCE == 0 - #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN - #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 1 - #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN - #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX - #endif + #if TEMP_SENSOR_REDUNDANT == -5 #if TEMP_SENSOR_REDUNDANT_SOURCE != 0 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." #endif - #define TEMP_SENSOR_REDUNDANT_IS_MAX31865 1 + + #define TEMP_SENSOR_REDUNDANT_IS_MAX31865 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 #elif TEMP_SENSOR_REDUNDANT == -3 #if TEMP_SENSOR_REDUNDANT_SOURCE != 0 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." #endif - #define TEMP_SENSOR_REDUNDANT_IS_MAX31855 1 + + #define TEMP_SENSOR_REDUNDANT_IS_MAX31855 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800 #elif TEMP_SENSOR_REDUNDANT == -2 #if TEMP_SENSOR_REDUNDANT_SOURCE != 0 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." #endif - #define TEMP_SENSOR_REDUNDANT_IS_MAX6675 1 + + #define TEMP_SENSOR_REDUNDANT_IS_MAX6675 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 #endif + + // mimic setting up the source TEMP_SENSOR + #if TEMP_SENSOR_REDUNDANT_SOURCE == 0 + #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN + #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX + #ifndef MAX31865_SENSOR_WIRES_0 + #define MAX31865_SENSOR_WIRES_0 2 + #endif + #elif TEMP_SENSOR_REDUNDANT_SOURCE == 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN + #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX + #ifndef MAX31865_SENSOR_WIRES_1 + #define MAX31865_SENSOR_WIRES_1 2 + #endif + #endif + #if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1) #if TEMP_SENSOR_REDUNDANT == -5 #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." @@ -743,101 +757,182 @@ #endif #endif +#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC + #define HAS_MAX_TC 1 +#endif +#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675 + #define HAS_MAX6675 1 +#endif #if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855 #define HAS_MAX31855 1 #endif #if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865 #define HAS_MAX31865 1 #endif -#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675 - #define HAS_MAX6675 1 -#endif // // Compatibility layer for MAX (SPI) temp boards // -#define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_##M) && TEMP_SENSOR_REDUNDANT_SOURCE == (n))) +#if HAS_MAX_TC + + // Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines. + #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1) + + #if !PIN_EXISTS(TEMP_0_CS) // SS, CS + #if PIN_EXISTS(MAX6675_SS) + #define TEMP_0_CS_PIN MAX6675_SS_PIN + #elif PIN_EXISTS(MAX6675_CS) + #define TEMP_0_CS_PIN MAX6675_CS_PIN + #elif PIN_EXISTS(MAX31855_SS) + #define TEMP_0_CS_PIN MAX31855_SS_PIN + #elif PIN_EXISTS(MAX31855_CS) + #define TEMP_0_CS_PIN MAX31855_CS_PIN + #elif PIN_EXISTS(MAX31865_SS) + #define TEMP_0_CS_PIN MAX31865_SS_PIN + #elif PIN_EXISTS(MAX31865_CS) + #define TEMP_0_CS_PIN MAX31865_CS_PIN + #endif + #endif -#if PIN_EXISTS(MAX6675_SS) - #if TEMP_SENSOR_IS_MAX(0, MAX31855) - #define MAX31855_CS_PIN MAX6675_SS_PIN - #elif TEMP_SENSOR_IS_MAX(0, MAX31865) - #define MAX31865_CS_PIN MAX6675_SS_PIN - #elif TEMP_SENSOR_IS_MAX(0, MAX6675) - #define MAX6675_CS_PIN MAX6675_SS_PIN - #endif -#endif + #if TEMP_SENSOR_0_IS_MAX6675 + #if !PIN_EXISTS(TEMP_0_MISO) // DO + #if PIN_EXISTS(MAX6675_MISO) + #define TEMP_0_MISO_PIN MAX6675_MISO_PIN + #elif PIN_EXISTS(MAX6675_DO) + #define TEMP_0_MISO_PIN MAX6675_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX6675_SCK) + #define TEMP_0_SCK_PIN MAX6675_SCK_PIN + #endif -#if PIN_EXISTS(MAX6675_SS2) - #if TEMP_SENSOR_IS_MAX(1, MAX31855) - #define MAX31855_CS2_PIN MAX6675_SS2_PIN - #elif TEMP_SENSOR_IS_MAX(1, MAX31865) - #define MAX31865_CS2_PIN MAX6675_SS2_PIN - #elif TEMP_SENSOR_IS_MAX(1, MAX6675) - #define MAX6675_CS2_PIN MAX6675_SS2_PIN - #endif -#endif + #elif TEMP_SENSOR_0_IS_MAX31855 + #if !PIN_EXISTS(TEMP_0_MISO) // DO + #if PIN_EXISTS(MAX31855_MISO) + #define TEMP_0_MISO_PIN MAX31855_MISO_PIN + #elif PIN_EXISTS(MAX31855_DO) + #define TEMP_0_MISO_PIN MAX31855_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX31855_SCK) + #define TEMP_0_SCK_PIN MAX31855_SCK_PIN + #endif -#if PIN_EXISTS(MAX6675_DO) - #if HAS_MAX31855 - #define MAX31855_MISO_PIN MAX6675_DO_PIN - #elif HAS_MAX31865 - #define MAX31865_MISO_PIN MAX6675_DO_PIN - #elif HAS_MAX6675 - #define MAX6675_MISO_PIN MAX6675_DO_PIN - #endif -#endif + #elif TEMP_SENSOR_1_IS_MAX31865 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX31865_MISO) + #define TEMP_1_MISO_PIN MAX31865_MISO_PIN + #elif PIN_EXISTS(MAX31865_DO) + #define TEMP_1_MISO_PIN MAX31865_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31865_SCK) + #define TEMP_1_SCK_PIN MAX31865_SCK_PIN + #endif + #if !PIN_EXISTS(TEMP_1_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only + #define TEMP_1_MOSI_PIN MAX31865_MOSI_PIN + #endif + #endif -#if PIN_EXISTS(MAX6675_SCK) - #if HAS_MAX31855 - #define MAX31855_SCK_PIN MAX6675_SCK_PIN - #elif HAS_MAX31865 - #define MAX31865_SCK_PIN MAX6675_SCK_PIN - #endif -#endif + // Software SPI - enable if MISO/SCK are defined. + #if PIN_EXISTS(TEMP_0_MISO) && PIN_EXISTS(TEMP_0_SCK) && DISABLED(TEMP_SENSOR_0_FORCE_HW_SPI) + #if TEMP_SENSOR_0_IS_MAX31865 && !PIN_EXISTS(TEMP_0_MOSI) + #error "TEMP_SENSOR_0 MAX31865 requires TEMP_0_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_0_FORCE_HW_SPI." + #else + #define TEMP_SENSOR_0_HAS_SPI_PINS 1 + #endif + #endif -// Compatibility Layer for use when HAL manipulates PINS for MAX31855 and MAX6675 -#if PIN_EXISTS(MAX31855_CS) && !PIN_EXISTS(MAX6675_SS) - #define MAX6675_SS_PIN MAX31855_CS_PIN -#endif -#if PIN_EXISTS(MAX31855_CS2) && !PIN_EXISTS(MAX6675_SS2) - #define MAX6675_SS2_PIN MAX31855_CS2_PIN -#endif -#if PIN_EXISTS(MAX6675_CS) && !PIN_EXISTS(MAX6675_SS) - #define MAX6675_SS_PIN MAX6675_CS_PIN -#endif -#if PIN_EXISTS(MAX6675_CS2) && !PIN_EXISTS(MAX6675_SS2) - #define MAX6675_SS2_PIN MAX6675_CS2_PIN -#endif -#if PIN_EXISTS(MAX31855_MISO) && !PIN_EXISTS(MAX6675_DO) - #define MAX6675_DO_PIN MAX31855_MISO_PIN -#endif -#if PIN_EXISTS(MAX6675_MISO) && !PIN_EXISTS(MAX6675_DO) - #define MAX6675_DO_PIN MAX6675_MISO_PIN -#endif -#if PIN_EXISTS(MAX31855_SCK) && !PIN_EXISTS(MAX6675_SCK) - #define MAX6675_SCK_PIN MAX31855_SCK_PIN -#endif + #endif // TEMP_SENSOR_0_IS_MAX_TC + + #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1) + + #if !PIN_EXISTS(TEMP_1_CS) // SS2, CS2 + #if PIN_EXISTS(MAX6675_SS2) + #define TEMP_1_CS_PIN MAX6675_SS2_PIN + #elif PIN_EXISTS(MAX6675_CS) + #define TEMP_1_CS_PIN MAX6675_CS2_PIN + #elif PIN_EXISTS(MAX31855_SS2) + #define TEMP_1_CS_PIN MAX31855_SS2_PIN + #elif PIN_EXISTS(MAX31855_CS2) + #define TEMP_1_CS_PIN MAX31855_CS2_PIN + #elif PIN_EXISTS(MAX31865_SS2) + #define TEMP_1_CS_PIN MAX31865_SS2_PIN + #elif PIN_EXISTS(MAX31865_CS2) + #define TEMP_1_CS_PIN MAX31865_CS2_PIN + #endif + #endif -// -// User-defined thermocouple libraries -// -// Add LIB_MAX6675 / LIB_MAX31855 / LIB_MAX31865 to the build_flags -// to select a USER library for MAX6675, MAX31855, MAX31865 -// -#if BOTH(HAS_MAX6675, LIB_MAX6675) - #define LIB_USR_MAX6675 1 -#endif -#if BOTH(HAS_MAX31855, LIB_MAX31855) - #define LIB_USR_MAX31855 1 -#endif -#if HAS_MAX31865 - #if ENABLED(LIB_MAX31865) + #if TEMP_SENSOR_1_IS_MAX6675 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX6675_MISO) + #define TEMP_1_MISO_PIN MAX6675_MISO_PIN + #elif PIN_EXISTS(MAX6675_DO) + #define TEMP_1_MISO_PIN MAX6675_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX6675_SCK) + #define TEMP_1_SCK_PIN MAX6675_SCK_PIN + #endif + + #elif TEMP_SENSOR_1_IS_MAX31855 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX31855_MISO) + #define TEMP_1_MISO_PIN MAX31855_MISO_PIN + #elif PIN_EXISTS(MAX31855_DO) + #define TEMP_1_MISO_PIN MAX31855_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31855_SCK) + #define TEMP_1_SCK_PIN MAX31855_SCK_PIN + #endif + + #elif TEMP_SENSOR_1_IS_MAX31865 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX31865_MISO) + #define TEMP_1_MISO_PIN MAX31865_MISO_PIN + #elif PIN_EXISTS(MAX31865_DO) + #define TEMP_1_MISO_PIN MAX31865_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31865_SCK) + #define TEMP_1_SCK_PIN MAX31865_SCK_PIN + #endif + #if !PIN_EXISTS(TEMP_1_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only + #define TEMP_1_MOSI_PIN MAX31865_MOSI_PIN + #endif + #endif + + // Software SPI - enable if MISO/SCK are defined. + #if PIN_EXISTS(TEMP_1_MISO) && PIN_EXISTS(TEMP_1_SCK) && DISABLED(TEMP_SENSOR_1_FORCE_HW_SPI) + #if TEMP_SENSOR_1_IS_MAX31865 && !PIN_EXISTS(TEMP_1_MOSI) + #error "TEMP_SENSOR_1 MAX31865 requires TEMP_1_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_1_FORCE_HW_SPI." + #else + #define TEMP_SENSOR_1_HAS_SPI_PINS 1 + #endif + #endif + + #endif // TEMP_SENSOR_1_IS_MAX_TC + + // + // User-defined thermocouple libraries + // + // Add LIB_MAX6675 / LIB_MAX31855 / LIB_MAX31865 to the build_flags + // to select a USER library for MAX6675, MAX31855, MAX31865 + // + #if BOTH(HAS_MAX6675, LIB_MAX6675) + #define LIB_USR_MAX6675 1 + #endif + #if BOTH(HAS_MAX31855, LIB_MAX31855) + #define LIB_USR_MAX31855 1 + #endif + #if BOTH(HAS_MAX31865, LIB_MAX31865) #define LIB_USR_MAX31865 1 - #else - #define LIB_ADAFRUIT_MAX31865 1 + #elif HAS_MAX31865 + #define LIB_INTERNAL_MAX31865 1 #endif -#endif + +#endif //HAS_MAX_TC #if TEMP_SENSOR_2 == -4 #define TEMP_SENSOR_2_IS_AD8495 1 @@ -2722,6 +2817,77 @@ #define BED_OR_CHAMBER_OR_FAN 1 #endif +/** + * Up to 3 PWM fans + */ +#ifndef FAN_INVERTING + #define FAN_INVERTING false +#endif + +#if HAS_FAN7 + #define FAN_COUNT 8 +#elif HAS_FAN6 + #define FAN_COUNT 7 +#elif HAS_FAN5 + #define FAN_COUNT 6 +#elif HAS_FAN4 + #define FAN_COUNT 5 +#elif HAS_FAN3 + #define FAN_COUNT 4 +#elif HAS_FAN2 + #define FAN_COUNT 3 +#elif HAS_FAN1 + #define FAN_COUNT 2 +#elif HAS_FAN0 + #define FAN_COUNT 1 +#else + #define FAN_COUNT 0 +#endif + +#if FAN_COUNT > 0 + #define HAS_FAN 1 +#endif + +/** + * Part Cooling fan multipliexer + */ +#if PIN_EXISTS(FANMUX0) + #define HAS_FANMUX 1 +#endif + +/** + * MIN/MAX fan PWM scaling + */ +#ifndef FAN_OFF_PWM + #define FAN_OFF_PWM 0 +#endif +#ifndef FAN_MIN_PWM + #if FAN_OFF_PWM > 0 + #define FAN_MIN_PWM (FAN_OFF_PWM + 1) + #else + #define FAN_MIN_PWM 0 + #endif +#endif +#ifndef FAN_MAX_PWM + #define FAN_MAX_PWM 255 +#endif +#if FAN_MIN_PWM < 0 || FAN_MIN_PWM > 255 + #error "FAN_MIN_PWM must be a value from 0 to 255." +#elif FAN_MAX_PWM < 0 || FAN_MAX_PWM > 255 + #error "FAN_MAX_PWM must be a value from 0 to 255." +#elif FAN_MIN_PWM > FAN_MAX_PWM + #error "FAN_MIN_PWM must be less than or equal to FAN_MAX_PWM." +#elif FAN_OFF_PWM > FAN_MIN_PWM + #error "FAN_OFF_PWM must be less than or equal to FAN_MIN_PWM." +#endif + +/** + * FAST PWM FAN Settings + */ +#if ENABLED(FAST_PWM_FAN) && !defined(FAST_PWM_FAN_FREQUENCY) + #define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default +#endif + // Servos #if PIN_EXISTS(SERVO0) && NUM_SERVOS > 0 #define HAS_SERVO_0 1 @@ -2996,77 +3162,6 @@ #undef PREHEAT_SHORTCUT_MENU_ITEM #endif -/** - * Up to 3 PWM fans - */ -#ifndef FAN_INVERTING - #define FAN_INVERTING false -#endif - -#if HAS_FAN7 - #define FAN_COUNT 8 -#elif HAS_FAN6 - #define FAN_COUNT 7 -#elif HAS_FAN5 - #define FAN_COUNT 6 -#elif HAS_FAN4 - #define FAN_COUNT 5 -#elif HAS_FAN3 - #define FAN_COUNT 4 -#elif HAS_FAN2 - #define FAN_COUNT 3 -#elif HAS_FAN1 - #define FAN_COUNT 2 -#elif HAS_FAN0 - #define FAN_COUNT 1 -#else - #define FAN_COUNT 0 -#endif - -#if FAN_COUNT > 0 - #define HAS_FAN 1 -#endif - -/** - * Part Cooling fan multipliexer - */ -#if PIN_EXISTS(FANMUX0) - #define HAS_FANMUX 1 -#endif - -/** - * MIN/MAX fan PWM scaling - */ -#ifndef FAN_OFF_PWM - #define FAN_OFF_PWM 0 -#endif -#ifndef FAN_MIN_PWM - #if FAN_OFF_PWM > 0 - #define FAN_MIN_PWM (FAN_OFF_PWM + 1) - #else - #define FAN_MIN_PWM 0 - #endif -#endif -#ifndef FAN_MAX_PWM - #define FAN_MAX_PWM 255 -#endif -#if FAN_MIN_PWM < 0 || FAN_MIN_PWM > 255 - #error "FAN_MIN_PWM must be a value from 0 to 255." -#elif FAN_MAX_PWM < 0 || FAN_MAX_PWM > 255 - #error "FAN_MAX_PWM must be a value from 0 to 255." -#elif FAN_MIN_PWM > FAN_MAX_PWM - #error "FAN_MIN_PWM must be less than or equal to FAN_MAX_PWM." -#elif FAN_OFF_PWM > FAN_MIN_PWM - #error "FAN_OFF_PWM must be less than or equal to FAN_MIN_PWM." -#endif - -/** - * FAST PWM FAN Settings - */ -#if ENABLED(FAST_PWM_FAN) && !defined(FAST_PWM_FAN_FREQUENCY) - #define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default -#endif - /** * MIN/MAX case light PWM scaling */ diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 36ccbee9b9c9..f416ca88bd79 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -416,8 +416,19 @@ #error "MBL_Z_STEP is now MESH_EDIT_Z_STEP." #elif defined(CHDK) #error "CHDK is now CHDK_PIN." -#elif defined(MAX6675_SS) || defined(MAX6675_SS2) - #error "MAX6675_SS / MAX6675_SS2 is now MAX6675_SS_PIN / MAX6675_SS2_PIN." +#elif ANY_PIN( \ + MAX6675_SS, MAX6675_SS2, MAX6675_CS, MAX6675_CS2, \ + MAX31855_SS, MAX31855_SS2, MAX31855_CS, MAX31855_CS2, \ + MAX31865_SS, MAX31865_SS2, MAX31865_CS, MAX31865_CS2) + #warning "MAX*_SS_PIN, MAX*_SS2_PIN, MAX*_CS_PIN, and MAX*_CS2_PIN are deprecated and will be removed in a future version. Please use TEMP_0_CS_PIN/TEMP_1_CS_PIN instead." +#elif ANY_PIN(MAX6675_SCK, MAX31855_SCK, MAX31865_SCK) + #warning "MAX*_SCK_PIN is deprecated and will be removed in a future version. Please use TEMP_0_SCK_PIN/TEMP_1_SCK_PIN instead." +#elif ANY_PIN(MAX6675_MISO, MAX6675_DO, MAX31855_MISO, MAX31855_DO, MAX31865_MISO, MAX31865_DO) + #warning "MAX*_MISO_PIN and MAX*_DO_PIN are deprecated and will be removed in a future version. Please use TEMP_0_MISO_PIN/TEMP_1_MISO_PIN instead." +#elif PIN_EXISTS(MAX31865_MOSI) + #warning "MAX31865_MOSI_PIN is deprecated and will be removed in a future version. Please use TEMP_0_MOSI_PIN/TEMP_1_MOSI_PIN instead." +#elif ANY_PIN(THERMO_CS1_PIN, THERMO_CS2_PIN, THERMO_DO_PIN, THERMO_SCK_PIN) + #error "THERMO_*_PIN is now TEMP_n_CS_PIN, TEMP_n_SCK_PIN, TEMP_n_MOSI_PIN, TEMP_n_MISO_PIN." #elif defined(MAX31865_SENSOR_OHMS) #error "MAX31865_SENSOR_OHMS is now MAX31865_SENSOR_OHMS_0." #elif defined(MAX31865_CALIBRATION_OHMS) @@ -1953,14 +1964,21 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif /** - * Pins and Sensor IDs must be set for each heater + * Required MAX31865 settings */ -#if TEMP_SENSOR_0_IS_MAX6675 && !ANY_PIN(MAX6675_SS, MAX31855_CS, MAX31865_CS, MAX6675_CS) - #error "TEMP_SENSOR_0 -2 requires a MAX6675_SS_PIN, MAX6675_CS_PIN, MAX31855_CS_PIN, or MAX31865_CS_PIN." -#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !TEMP_SENSOR_0_IS_DUMMY - #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board." -#elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1 - #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin." +#if TEMP_SENSOR_0_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && TEMP_SENSOR_REDUNDANT_SOURCE == 0) + #if !defined(MAX31865_SENSOR_WIRES_0) || !WITHIN(MAX31865_SENSOR_WIRES_0, 2, 4) + #error "MAX31865_SENSOR_WIRES_0 must be defined as an integer between 2 and 4." + #elif !defined(MAX31865_SENSOR_OHMS_0) || !defined(MAX31865_CALIBRATION_OHMS_0) + #error "MAX31865_SENSOR_OHMS_0 and MAX31865_CALIBRATION_OHMS_0 must be set if TEMP_SENSOR_0/TEMP_SENSOR_REDUNDANT is MAX31865." + #endif +#endif +#if TEMP_SENSOR_1_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && TEMP_SENSOR_REDUNDANT_SOURCE == 1) + #if !defined(MAX31865_SENSOR_WIRES_1) || !WITHIN(MAX31865_SENSOR_WIRES_1, 2, 4) + #error "MAX31865_SENSOR_WIRES_1 must be defined as an integer between 2 and 4." + #elif !defined(MAX31865_SENSOR_OHMS_1) || !defined(MAX31865_CALIBRATION_OHMS_1) + #error "MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 must be set if TEMP_SENSOR_1/TEMP_SENSOR_REDUNDANT is MAX31865." + #endif #endif /** @@ -2023,20 +2041,36 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "TEMP_SENSOR_REDUNDANT_TARGET can't be Cooler (-5): requires TEMP_COOLER_PIN" #endif - #if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0 && !PIN_EXISTS(MAX6675_SS) - #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 0 requires a MAX6675_SS_PIN, MAX6675_CS_PIN, MAX31855_CS_PIN, or MAX31865_CS_PIN." - #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1 && !PIN_EXISTS(MAX6675_SS2) - #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 1 requires a MAX6675_SS2_PIN, MAX6675_CS_PIN, MAX31855_CS_PIN, or MAX31865_CS_PIN." + #if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0 && !PIN_EXISTS(TEMP_0_CS) + #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 0 requires TEMP_0_CS_PIN." + #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1 && !PIN_EXISTS(TEMP_1_CS) + #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 1 requires TEMP_1_CS_PIN." #endif #endif +/** + * Test Sensor & Heater pin combos. + * Pins and Sensor IDs must be set for each heater + */ +#if !ANY_PIN(TEMP_0, TEMP_0_CS) + #error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board." +#elif !HAS_HEATER_0 && EXTRUDERS + #error "HEATER_0_PIN not defined for this board." +#elif TEMP_SENSOR_0_IS_MAX_TC && !PIN_EXISTS(TEMP_0_CS) + #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN." +#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !TEMP_SENSOR_0_IS_DUMMY + #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board." +#elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1 + #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin." +#endif + #if HAS_MULTI_HOTEND - #if TEMP_SENSOR_1_IS_MAX6675 && !ANY_PIN(MAX6675_SS2, MAX31855_CS2, MAX31865_CS2, MAX6675_CS2) - #error "TEMP_SENSOR_1 requires a MAX6675_SS2_PIN, MAX6675_CS2_PIN, MAX31855_CS2_PIN, or MAX31865_CS2_PIN." + #if TEMP_SENSOR_1_IS_MAX_TC && !PIN_EXISTS(TEMP_1_CS) + #error "TEMP_SENSOR_1 MAX thermocouple requires TEMP_1_CS_PIN." #elif TEMP_SENSOR_1 == 0 #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS." - #elif !ANY_PIN(TEMP_1, MAX6675_SS2) && !TEMP_SENSOR_1_IS_DUMMY - #error "TEMP_1_PIN or MAX6675_SS2_PIN not defined for this board." + #elif !ANY_PIN(TEMP_1, TEMP_1_CS) && !TEMP_SENSOR_1_IS_DUMMY + #error "TEMP_1_PIN or TEMP_1_CS_PIN not defined for this board." #endif #if HOTENDS > 2 #if TEMP_SENSOR_2 == 0 @@ -2148,14 +2182,31 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "TEMP_SENSOR_6 shouldn't be set with only 1 HOTEND." #elif TEMP_SENSOR_7 != 0 #error "TEMP_SENSOR_7 shouldn't be set with only 1 HOTEND." -#endif +#endif // HAS_MULTI_HOTEND +/** + * Pins must be set for temp sensors, with some other feature requirements. + */ #if TEMP_SENSOR_CHAMBER && !PIN_EXISTS(TEMP_CHAMBER) #error "TEMP_SENSOR_CHAMBER requires TEMP_CHAMBER_PIN." #endif -#if TEMP_SENSOR_COOLER && !(PIN_EXISTS(TEMP_COOLER) && ENABLED(LASER_FEATURE)) - #error "TEMP_SENSOR_COOLER requires LASER_FEATURE and TEMP_COOLER_PIN." +#if TEMP_SENSOR_COOLER + #if !PIN_EXISTS(TEMP_COOLER) + #error "TEMP_SENSOR_COOLER requires TEMP_COOLER_PIN." + #elif DISABLED(LASER_FEATURE) + #error "TEMP_SENSOR_COOLER requires LASER_FEATURE." + #endif +#endif + +#if TEMP_SENSOR_PROBE + #if !PIN_EXISTS(TEMP_PROBE) + #error "TEMP_SENSOR_PROBE requires TEMP_PROBE_PIN." + #elif !HAS_TEMP_ADC_PROBE + #error "TEMP_PROBE_PIN must be an ADC pin." + #elif DISABLED(FIX_MOUNTED_PROBE) + #error "TEMP_SENSOR_PROBE shouldn't be set without FIX_MOUNTED_PROBE." + #endif #endif #if ENABLED(LASER_COOLANT_FLOW_METER) && !(PIN_EXISTS(FLOWMETER) && ENABLED(LASER_FEATURE)) @@ -2186,41 +2237,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #endif -#if TEMP_SENSOR_PROBE - #if !PIN_EXISTS(TEMP_PROBE) - #error "TEMP_SENSOR_PROBE requires TEMP_PROBE_PIN." - #elif !HAS_TEMP_ADC_PROBE - #error "TEMP_PROBE_PIN must be an ADC pin." - #elif DISABLED(FIX_MOUNTED_PROBE) - #error "TEMP_SENSOR_PROBE shouldn't be set without FIX_MOUNTED_PROBE." - #endif -#endif - -#if TEMP_SENSOR_IS_MAX(0, MAX31865) && !(defined(MAX31865_SENSOR_OHMS_0) && defined(MAX31865_CALIBRATION_OHMS_0)) - #error "MAX31865_SENSOR_OHMS_0 and MAX31865_CALIBRATION_OHMS_0 must be set if TEMP_SENSOR_0/TEMP_SENSOR_REDUNDANT is MAX31865." -#elif TEMP_SENSOR_IS_MAX(1, MAX31865) && !(defined(MAX31865_SENSOR_OHMS_1) && defined(MAX31865_CALIBRATION_OHMS_1)) - #error "MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 must be set if TEMP_SENSOR_1/TEMP_SENSOR_REDUNDANT is MAX31865." -#endif - -/** - * Test Heater, Temp Sensor, and Extruder Pins - */ -#if !HAS_HEATER_0 && EXTRUDERS - #error "HEATER_0_PIN not defined for this board." -#elif !ANY_PIN(TEMP_0, MAX6675_SS) - #error "TEMP_0_PIN or MAX6675_SS not defined for this board." -#endif - -#if HAS_EXTRUDERS - #if ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PINS_EXIST(E0_STEP, E0_DIR)) - #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board." - #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PINS_EXIST(E0_STEP, E0_DIR) || !HAS_E0_ENABLE)) - #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." - #elif EXTRUDERS && TEMP_SENSOR_0 == 0 - #error "TEMP_SENSOR_0 is required if there are any extruders." - #endif -#endif - /** * Temperature status LEDs */ @@ -2262,6 +2278,16 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Test Extruder Stepper Pins */ +#if HAS_EXTRUDERS + #if ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PINS_EXIST(E0_STEP, E0_DIR)) + #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board." + #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PINS_EXIST(E0_STEP, E0_DIR) || !HAS_E0_ENABLE)) + #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." + #elif EXTRUDERS && TEMP_SENSOR_0 == 0 + #error "TEMP_SENSOR_0 is required if there are any extruders." + #endif +#endif + #if E_STEPPERS #if !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE) #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." diff --git a/Marlin/src/libs/MAX31865.cpp b/Marlin/src/libs/MAX31865.cpp new file mode 100644 index 000000000000..590dea5ca5d9 --- /dev/null +++ b/Marlin/src/libs/MAX31865.cpp @@ -0,0 +1,500 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on Based on Adafruit MAX31865 library: + * + * This is a library for the Adafruit PT100/P1000 RTD Sensor w/MAX31865 + * Designed specifically to work with the Adafruit RTD Sensor + * https://www.adafruit.com/products/3328 + * + * This sensor uses SPI to communicate, 4 pins are required to interface. + * + * Adafruit invests time and resources providing this open source code, + * please support Adafruit and open-source hardware by purchasing + * products from Adafruit! + * + * Written by Limor Fried/Ladyada for Adafruit Industries. + * + * Modifications by JoAnn Manges (@GadgetAngel) + * Copyright (c) 2020, JoAnn Manges + * All rights reserved. + */ + +// Useful for RTD debugging. +//#define MAX31865_DEBUG +//#define MAX31865_DEBUG_SPI + +//TODO: switch to SPIclass/SoftSPI + +#include "../inc/MarlinConfig.h" + +#if HAS_MAX31865 && !LIB_USR_MAX31865 + +#include "MAX31865.h" + +// The maximum speed the MAX31865 can do is 5 MHz +SPISettings MAX31865::spiConfig = SPISettings( + #if defined(TARGET_LPC1768) + SPI_QUARTER_SPEED + #elif defined(ARDUINO_ARCH_STM32) + SPI_CLOCK_DIV4 + #else + 500000 + #endif + , MSBFIRST + , SPI_MODE_1 // CPOL0 CPHA1 +); + +#ifndef LARGE_PINMAP + + /** + * Create the interface object using software (bitbang) SPI for PIN values + * less than or equal to 127. + * + * @param spi_cs the SPI CS pin to use + * @param spi_mosi the SPI MOSI pin to use + * @param spi_miso the SPI MISO pin to use + * @param spi_clk the SPI clock pin to use + */ + MAX31865::MAX31865(int8_t spi_cs, int8_t spi_mosi, int8_t spi_miso, int8_t spi_clk) { + _cs = spi_cs; + _mosi = spi_mosi; + _miso = spi_miso; + _sclk = spi_clk; + } + + /** + * Create the interface object using hardware SPI for PIN for PIN values less + * than or equal to 127. + * + * @param spi_cs the SPI CS pin to use along with the default SPI device + */ + MAX31865::MAX31865(int8_t spi_cs) { + _cs = spi_cs; + _sclk = _miso = _mosi = -1; + } + +#else + + /** + * Create the interface object using software (bitbang) SPI for PIN values + * which are larger than 127. If you have PIN values less than or equal to + * 127 use the other call for SW SPI. + * + * @param spi_cs the SPI CS pin to use + * @param spi_mosi the SPI MOSI pin to use + * @param spi_miso the SPI MISO pin to use + * @param spi_clk the SPI clock pin to use + * @param pin_mapping set to 1 for positive pin values + */ + MAX31865::MAX31865(uint32_t spi_cs, uint32_t spi_mosi, + uint32_t spi_miso, uint32_t spi_clk, + uint8_t pin_mapping) { + _cs = spi_cs; + _mosi = spi_mosi; + _miso = spi_miso; + _sclk = spi_clk; + } + + /** + * Create the interface object using hardware SPI for PIN values which are + * larger than 127. If you have PIN values less than or equal to 127 use + * the other call for HW SPI. + * + * @param spi_cs the SPI CS pin to use along with the default SPI device + * @param pin_mapping set to 1 for positive pin values + */ + MAX31865::MAX31865(uint32_t spi_cs, uint8_t pin_mapping) { + _cs = spi_cs; + _sclk = _miso = _mosi = -1UL; //-1UL or 0xFFFFFFFF or 4294967295 + } + +#endif // LARGE_PINMAP + + +/** + * + * Instance & Class methods + * + */ + + +/** + * Initialize the SPI interface and set the number of RTD wires used + * + * @param wires The number of wires in enum format. Can be MAX31865_2WIRE, MAX31865_3WIRE, or MAX31865_4WIRE. + * @param zero The resistance of the RTD at 0 degC, in ohms. + * @param ref The resistance of the reference resistor, in ohms. + */ +void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { + Rzero = zero; + Rref = ref; + + OUT_WRITE(_cs, HIGH); + + if (_sclk != TERN(LARGE_PINMAP, -1UL, -1)) { + // define pin modes for Software SPI + #ifdef MAX31865_DEBUG + SERIAL_ECHOLN("Initializing MAX31865 Software SPI"); + #endif + + OUT_WRITE(_sclk, LOW); + SET_OUTPUT(_mosi); + SET_INPUT(_miso); + } else { + // start and configure hardware SPI + #ifdef MAX31865_DEBUG + SERIAL_ECHOLN("Initializing MAX31865 Hardware SPI"); + #endif + + SPI.begin(); + } + + setWires(wires); + enableBias(false); + autoConvert(false); + clearFault(); + + #ifdef MAX31865_DEBUG_SPI + #ifndef LARGE_PINMAP + SERIAL_ECHOLNPAIR( + "Regular begin call with _cs: ", _cs, + " _miso: ", _miso, + " _sclk: ", _sclk, + " _mosi: ", _mosi + ); + #else + SERIAL_ECHOLNPAIR( + "LARGE_PINMAP begin call with _cs: ", _cs, + " _miso: ", _miso, + " _sclk: ", _sclk, + " _mosi: ", _mosi + ); + #endif // LARGE_PINMAP + + SERIAL_ECHOLNPAIR("config: ", readRegister8(MAX31856_CONFIG_REG)); + SERIAL_EOL(); + #endif // MAX31865_DEBUG_SPI +} + +/** + * Read the raw 8-bit FAULTSTAT register + * + * @return The raw unsigned 8-bit FAULT status register + */ +uint8_t MAX31865::readFault() { + return readRegister8(MAX31856_FAULTSTAT_REG); +} + +/** + * Clear all faults in FAULTSTAT. + */ +void MAX31865::clearFault() { + setConfig(MAX31856_CONFIG_FAULTSTAT, 1); +} + +/** + * Whether we want to have continuous conversions (50/60 Hz) + * + * @param b If true, auto conversion is enabled + */ +void MAX31865::autoConvert(bool b) { + setConfig(MAX31856_CONFIG_MODEAUTO, b); +} + +/** + * Whether we want filter out 50Hz noise or 60Hz noise + * + * @param b If true, 50Hz noise is filtered, else 60Hz(default) + */ +void MAX31865::enable50HzFilter(bool b) { + setConfig(MAX31856_CONFIG_FILT50HZ, b); +} + +/** + * Enable the bias voltage on the RTD sensor + * + * @param b If true bias is enabled, else disabled + */ +void MAX31865::enableBias(bool b) { + setConfig(MAX31856_CONFIG_BIAS, b); + + // From the datasheet: + // Note that if VBIAS is off (to reduce supply current between conversions), any filter + // capacitors at the RTDIN inputs need to charge before an accurate conversion can be + // performed. Therefore, enable VBIAS and wait at least 10.5 time constants of the input + // RC network plus an additional 1ms before initiating the conversion. + if (b) + DELAY_US(11500); //11.5ms +} + +/** + * Start a one-shot temperature reading. + */ +void MAX31865::oneShot() { + setConfig(MAX31856_CONFIG_1SHOT, 1); + + // From the datasheet: + // Note that a single conversion requires approximately 52ms in 60Hz filter + // mode or 62.5ms in 50Hz filter mode to complete. 1-Shot is a self-clearing bit. + // TODO: switch this out depeding on the filter mode. + DELAY_US(65000); // 65ms +} + +/** + * How many wires we have in our RTD setup, can be MAX31865_2WIRE, + * MAX31865_3WIRE, or MAX31865_4WIRE + * + * @param wires The number of wires in enum format + */ +void MAX31865::setWires(max31865_numwires_t wires) { + uint8_t t = readRegister8(MAX31856_CONFIG_REG); + if (wires == MAX31865_3WIRE) + t |= MAX31856_CONFIG_3WIRE; + else // 2 or 4 wire + t &= ~MAX31856_CONFIG_3WIRE; + writeRegister8(MAX31856_CONFIG_REG, t); +} + +/** + * Read the raw 16-bit value from the RTD_REG in one shot mode. This will include + * the fault bit, D0. + * + * @return The raw unsigned 16-bit register value with ERROR bit attached, NOT temperature! + */ +uint16_t MAX31865::readRaw() { + clearFault(); + enableBias(true); + + oneShot(); + uint16_t rtd = readRegister16(MAX31856_RTDMSB_REG); + + #ifdef MAX31865_DEBUG + SERIAL_ECHOLNPAIR("RTD MSB:", (rtd >> 8), " RTD LSB:", (rtd & 0x00FF)); + #endif + + // Disable the bias to lower power dissipation between reads. + // If the ref resistor heats up, the temperature reading will be skewed. + enableBias(false); + + return rtd; +} + +/** + * Calulate and return the resistance value of the connected RTD. + * + * @param refResistor The value of the matching reference resistor, usually 430 or 4300 + * @return The raw RTD resistance value, NOT temperature! + */ +float MAX31865::readResistance() { + // Strip the error bit (D0) and convert to a float ratio. + // less precise method: (readRaw() * Rref) >> 16 + return (((readRaw() >> 1) / 32768.0f) * Rref); +} + +/** + * Read the RTD and pass it to temperature(float) for calculation. + * + * @return Temperature in C + */ +float MAX31865::temperature() { + return temperature(readResistance()); +} + +/** + * Given the 15-bit ADC value, calculate the resistance and pass it to temperature(float) for calculation. + * + * @return Temperature in C + */ +float MAX31865::temperature(uint16_t adcVal) { + return temperature(((adcVal) / 32768.0f) * Rref); +} + +/** + * Calculate the temperature in C from the RTD resistance. + * Uses the technique outlined in this PDF: + * http://www.analog.com/media/en/technical-documentation/application-notes/AN709_0.pdf + * + * @param Rrtd the resistance value in ohms + * @return the temperature in degC + */ +float MAX31865::temperature(float Rrtd) { + float temp = (RTD_Z1 + sqrt(RTD_Z2 + (RTD_Z3 * Rrtd))) / RTD_Z4; + + // From the PDF... + // + // The previous equation is valid only for temperatures of 0°C and above. + // The equation for RRTD(t) that defines negative temperature behavior is a + // fourth-order polynomial (after expanding the third term) and is quite + // impractical to solve for a single expression of temperature as a function + // of resistance. + // + if (temp < 0) { + Rrtd = (Rrtd / Rzero) * 100; // normalize to 100 ohm + float rpoly = Rrtd; + + temp = -242.02 + (2.2228 * rpoly); + rpoly *= Rrtd; // square + temp += 2.5859e-3 * rpoly; + rpoly *= Rrtd; // ^3 + temp -= 4.8260e-6 * rpoly; + rpoly *= Rrtd; // ^4 + temp -= 2.8183e-8 * rpoly; + rpoly *= Rrtd; // ^5 + temp += 1.5243e-10 * rpoly; + } + + return temp; +} + +// +// private: +// + + +/** + * Set a value in the configuration register. + * + * @param config 8-bit value for the config item + * @param enable whether to enable or disable the value + */ +void MAX31865::setConfig(uint8_t config, bool enable) { + uint8_t t = readRegister8(MAX31856_CONFIG_REG); + if (enable) + t |= config; + else + t &= ~config; // disable + writeRegister8(MAX31856_CONFIG_REG, t); +} + +/** + * Read a single byte from the specified register address. + * + * @param addr the register address + * @return the register contents + */ +uint8_t MAX31865::readRegister8(uint8_t addr) { + uint8_t ret = 0; + readRegisterN(addr, &ret, 1); + + return ret; +} + +/** + * Read two bytes: 1 from the specified register address, and 1 from the next address. + * + * @param addr the first register address + * @return both register contents as a single 16-bit int + */ +uint16_t MAX31865::readRegister16(uint8_t addr) { + uint8_t buffer[2] = {0, 0}; + readRegisterN(addr, buffer, 2); + + uint16_t ret = buffer[0]; + ret <<= 8; + ret |= buffer[1]; + + return ret; +} + +/** + * Read +n+ bytes from a specified address into +buffer+. Set D7 to 0 to specify a read. + * + * @param addr the first register address + * @param buffer storage for the read bytes + * @param n the number of bytes to read + */ +void MAX31865::readRegisterN(uint8_t addr, uint8_t buffer[], uint8_t n) { + addr &= 0x7F; // make sure top bit is not set + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.beginTransaction(spiConfig); + else + WRITE(_sclk, LOW); + + WRITE(_cs, LOW); + spixfer(addr); + + while (n--) { + buffer[0] = spixfer(0xFF); + #ifdef MAX31865_DEBUG_SPI + SERIAL_ECHOLNPAIR("buffer read ", n, " data: ", buffer[0]); + #endif + buffer++; + } + + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.endTransaction(); + + WRITE(_cs, HIGH); +} + +/** + * Write an 8-bit value to a register. Set D7 to 1 to specify a write. + * + * @param addr the address to write to + * @param data the data to write + */ +void MAX31865::writeRegister8(uint8_t addr, uint8_t data) { + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.beginTransaction(spiConfig); + else + WRITE(_sclk, LOW); + + WRITE(_cs, LOW); + + spixfer(addr | 0x80); // make sure top bit is set + spixfer(data); + + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.endTransaction(); + + WRITE(_cs, HIGH); +} + +/** + * Transfer SPI data +x+ and read the response. From the datasheet... + * Input data (SDI) is latched on the internal strobe edge and output data (SDO) is + * shifted out on the shift edge. There is one clock for each bit transferred. + * Address and data bits are transferred in groups of eight, MSB first. + * + * @param x an 8-bit chunk of data to write + * @return the 8-bit response + */ +uint8_t MAX31865::spixfer(uint8_t x) { + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + return SPI.transfer(x); + + uint8_t reply = 0; + for (int i = 7; i >= 0; i--) { + reply <<= 1; + WRITE(_sclk, HIGH); + WRITE(_mosi, x & (1 << i)); + WRITE(_sclk, LOW); + if (READ(_miso)) + reply |= 1; + } + + return reply; +} + +#endif // HAS_MAX31865 && !LIB_USR_MAX31865 diff --git a/Marlin/src/libs/MAX31865.h b/Marlin/src/libs/MAX31865.h new file mode 100644 index 000000000000..2ab78ecbe8cf --- /dev/null +++ b/Marlin/src/libs/MAX31865.h @@ -0,0 +1,131 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on Adafruit MAX31865 library: + * + * This is a library for the Adafruit PT100/P1000 RTD Sensor w/MAX31865 + * Designed specifically to work with the Adafruit RTD Sensor + * https://www.adafruit.com/products/3328 + * + * This sensor uses SPI to communicate, 4 pins are required to interface. + * + * Adafruit invests time and resources providing this open source code, + * please support Adafruit and open-source hardware by purchasing + * products from Adafruit! + * + * Written by Limor Fried/Ladyada for Adafruit Industries. + * + * Modifications by JoAnn Manges (@GadgetAngel) + * Copyright (c) 2020, JoAnn Manges + * All rights reserved. + */ +#pragma once + +#include "../inc/MarlinConfig.h" +#include "../HAL/shared/Delay.h" +#include HAL_PATH(../HAL, MarlinSPI.h) + +#define MAX31856_CONFIG_REG 0x00 +#define MAX31856_CONFIG_BIAS 0x80 +#define MAX31856_CONFIG_MODEAUTO 0x40 +#define MAX31856_CONFIG_MODEOFF 0x00 +#define MAX31856_CONFIG_1SHOT 0x20 +#define MAX31856_CONFIG_3WIRE 0x10 +#define MAX31856_CONFIG_24WIRE 0x00 +#define MAX31856_CONFIG_FAULTSTAT 0x02 +#define MAX31856_CONFIG_FILT50HZ 0x01 +#define MAX31856_CONFIG_FILT60HZ 0x00 + +#define MAX31856_RTDMSB_REG 0x01 +#define MAX31856_RTDLSB_REG 0x02 +#define MAX31856_HFAULTMSB_REG 0x03 +#define MAX31856_HFAULTLSB_REG 0x04 +#define MAX31856_LFAULTMSB_REG 0x05 +#define MAX31856_LFAULTLSB_REG 0x06 +#define MAX31856_FAULTSTAT_REG 0x07 + +#define MAX31865_FAULT_HIGHTHRESH 0x80 // D7 +#define MAX31865_FAULT_LOWTHRESH 0x40 // D6 +#define MAX31865_FAULT_REFINLOW 0x20 // D5 +#define MAX31865_FAULT_REFINHIGH 0x10 // D4 +#define MAX31865_FAULT_RTDINLOW 0x08 // D3 +#define MAX31865_FAULT_OVUV 0x04 // D2 + +// http://www.analog.com/media/en/technical-documentation/application-notes/AN709_0.pdf +// constants for calulating temperature from the measured RTD resistance. +#define RTD_Z1 -0.0039083 +#define RTD_Z2 0.00001758480889 +#define RTD_Z3 -0.0000000231 +#define RTD_Z4 -0.000001155 + +typedef enum max31865_numwires { + MAX31865_2WIRE = 0, + MAX31865_3WIRE = 1, + MAX31865_4WIRE = 0 +} max31865_numwires_t; + +/* Interface class for the MAX31865 RTD Sensor reader */ +class MAX31865 { +private: + static SPISettings spiConfig; + + TERN(LARGE_PINMAP, uint32_t, uint8_t) _sclk, _miso, _mosi, _cs; + float Rzero, Rref; + + void setConfig(uint8_t config, bool enable); + + void readRegisterN(uint8_t addr, uint8_t buffer[], uint8_t n); + uint8_t readRegister8(uint8_t addr); + uint16_t readRegister16(uint8_t addr); + + void writeRegister8(uint8_t addr, uint8_t reg); + uint8_t spixfer(uint8_t addr); + +public: + #ifdef LARGE_PINMAP + MAX31865(uint32_t spi_cs, uint8_t pin_mapping); + MAX31865(uint32_t spi_cs, uint32_t spi_mosi, uint32_t spi_miso, + uint32_t spi_clk, uint8_t pin_mapping); + #else + MAX31865(int8_t spi_cs); + MAX31865(int8_t spi_cs, int8_t spi_mosi, int8_t spi_miso, + int8_t spi_clk); + #endif + + void begin(max31865_numwires_t wires, float zero, float ref); + + uint8_t readFault(); + void clearFault(); + + void setWires(max31865_numwires_t wires); + void autoConvert(bool b); + void enable50HzFilter(bool b); + void enableBias(bool b); + void oneShot(); + + uint16_t readRaw(); + float readResistance(); + float temperature(); + float temperature(uint16_t adcVal); + float temperature(float Rrtd); +}; diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 63fdd5afc3db..eb6dc6597ce4 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -703,8 +703,7 @@ void restore_feedrate_and_scaling() { * at the same positions relative to the machine. */ void update_software_endstops(const AxisEnum axis - OPTARG(HAS_HOTEND_OFFSET, const uint8_t old_tool_index/*=0*/) - OPTARG(HAS_HOTEND_OFFSET, const uint8_t new_tool_index/*=0*/) + OPTARG(HAS_HOTEND_OFFSET, const uint8_t old_tool_index/*=0*/, const uint8_t new_tool_index/*=0*/) ) { #if ENABLED(DUAL_X_CARRIAGE) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 9f32ce933bff..83187259ff46 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -34,6 +34,7 @@ #include "temperature.h" #include "endstops.h" #include "planner.h" +#include "printcounter.h" #if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "../feature/cooler.h" @@ -56,112 +57,56 @@ #include "../feature/host_actions.h" #endif -#define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && ENABLED(TEMP_SENSOR_REDUNDANT_SOURCE) && TEMP_SENSOR_REDUNDANT_SOURCE == n)) +// MAX TC related macros +#define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && TEMP_SENSOR_REDUNDANT_SOURCE == (n))) +#define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && TEMP_SENSOR_REDUNDANT_SOURCE == n)) -// LIB_MAX31855 can be added to the build_flags in platformio.ini to use a user-defined library -#if LIB_USR_MAX31855 +// LIB_MAX6675 can be added to the build_flags in platformio.ini to use a user-defined library +// If LIB_MAX6675 is not on the build_flags then raw SPI reads will be used. +#if HAS_MAX6675 && LIB_USR_MAX6675 + #include + #define HAS_MAX6675_LIBRARY 1 +#endif + +// LIB_MAX31855 can be added to the build_flags in platformio.ini to use a user-defined library. +// If LIB_MAX31855 is not on the build_flags then raw SPI reads will be used. +#if HAS_MAX31855 && LIB_USR_MAX31855 #include - #if PIN_EXISTS(MAX31855_MISO) && PIN_EXISTS(MAX31855_SCK) - #define MAX31855_USES_SW_SPI 1 - #endif - #if TEMP_SENSOR_IS_MAX(0, MAX31855) && PIN_EXISTS(MAX31855_CS) - #define HAS_MAX31855_TEMP 1 - Adafruit_MAX31855 max31855_0 = Adafruit_MAX31855(MAX31855_CS_PIN - #if MAX31855_USES_SW_SPI - , MAX31855_MISO_PIN, MAX31855_SCK_PIN // For software SPI also set MISO/SCK - #endif - #if ENABLED(LARGE_PINMAP) - , HIGH - #endif - ); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX31855) && PIN_EXISTS(MAX31855_CS2) - #define HAS_MAX31855_TEMP 1 - Adafruit_MAX31855 max31855_1 = Adafruit_MAX31855(MAX31855_CS2_PIN - #if MAX31855_USES_SW_SPI - , MAX31855_MISO_PIN, MAX31855_SCK_PIN // For software SPI also set MISO/SCK - #endif - #if ENABLED(LARGE_PINMAP) - , HIGH - #endif - ); - #endif + #define HAS_MAX31855_LIBRARY 1 + typedef Adafruit_MAX31855 MAX31855; #endif -// LIB_MAX31865 can be added to the build_flags in platformio.ini to use a user-defined library. -// If LIB_MAX31865 is not on the build_flags then the Adafruit MAX31865 V1.1.0 library is used. #if HAS_MAX31865 - #include - #ifndef MAX31865_MOSI_PIN - #define MAX31865_MOSI_PIN SD_MOSI_PIN - #endif - #if PIN_EXISTS(MAX31865_MISO) && PIN_EXISTS(MAX31865_SCK) - #define MAX31865_USES_SW_SPI 1 - #endif - #if TEMP_SENSOR_IS_MAX(0, MAX31865) && PIN_EXISTS(MAX31865_CS) - #define HAS_MAX31865_TEMP 1 - Adafruit_MAX31865 max31865_0 = Adafruit_MAX31865(MAX31865_CS_PIN - #if MAX31865_USES_SW_SPI && PIN_EXISTS(MAX31865_MOSI) - , MAX31865_MOSI_PIN, MAX31865_MISO_PIN, MAX31865_SCK_PIN // For software SPI also set MOSI/MISO/SCK - #endif - #if ENABLED(LARGE_PINMAP) - , HIGH - #endif - ); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX31865) && PIN_EXISTS(MAX31865_CS2) - #define HAS_MAX31865_TEMP 1 - Adafruit_MAX31865 max31865_1 = Adafruit_MAX31865(MAX31865_CS2_PIN - #if MAX31865_USES_SW_SPI && PIN_EXISTS(MAX31865_MOSI) - , MAX31865_MOSI_PIN, MAX31865_MISO_PIN, MAX31865_SCK_PIN // For software SPI also set MOSI/MISO/SCK - #endif - #if ENABLED(LARGE_PINMAP) - , HIGH - #endif - ); + #if LIB_USR_MAX31865 + #include + typedef Adafruit_MAX31865 MAX31865; + #else + #include "../libs/MAX31865.h" #endif #endif -// LIB_MAX6675 can be added to the build_flags in platformio.ini to use a user-defined library -#if LIB_USR_MAX6675 - #include - #if PIN_EXISTS(MAX6675_MISO) && PIN_EXISTS(MAX6675_SCK) - #define MAX6675_USES_SW_SPI 1 - #endif - #if TEMP_SENSOR_IS_MAX(0, MAX6675) && PIN_EXISTS(MAX6675_CS) - #define HAS_MAX6675_TEMP 1 - MAX6675 max6675_0 = MAX6675(MAX6675_CS_PIN - #if MAX6675_USES_SW_SPI - , MAX6675_MISO_PIN, MAX6675_SCK_PIN // For software SPI also set MISO/SCK - #endif - #if ENABLED(LARGE_PINMAP) - , HIGH - #endif - ); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX6675) && PIN_EXISTS(MAX6675_CS2) - #define HAS_MAX6675_TEMP 1 - MAX6675 max6675_1 = MAX6675(MAX6675_CS2_PIN - #if MAX6675_USES_SW_SPI - , MAX6675_MISO_PIN, MAX6675_SCK_PIN // For software SPI also set MISO/SCK - #endif - #if ENABLED(LARGE_PINMAP) - , HIGH - #endif - ); - #endif +#if HAS_MAX6675_LIBRARY || HAS_MAX31855_LIBRARY || HAS_MAX31865 + #define HAS_MAXTC_LIBRARIES 1 #endif -#if !HAS_MAX6675_TEMP && !HAS_MAX31855_TEMP && !HAS_MAX31865_TEMP - #define NO_THERMO_TEMPS 1 +// If we have a MAX TC with SCK and MISO pins defined, it's either on a separate/dedicated Hardware +// SPI bus, or some pins for Software SPI. Alternate Hardware SPI buses are not supported yet, so +// your SPI options are: +// +// 1. Only CS pin(s) defined: Hardware SPI on the default bus (usually the SD card SPI). +// 2. CS, MISO, and SCK pins defined: Software SPI on a separate bus, as defined by MISO, SCK. +// 3. CS, MISO, and SCK pins w/ FORCE_HW_SPI: Hardware SPI on the default bus, ignoring MISO, SCK. +// +#if TEMP_SENSOR_IS_ANY_MAX_TC(0) && TEMP_SENSOR_0_HAS_SPI_PINS && DISABLED(TEMP_SENSOR_FORCE_HW_SPI) + #define TEMP_SENSOR_0_USES_SW_SPI 1 #endif - -#if (TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && PINS_EXIST(MAX6675_SCK, MAX6675_DO) && NO_THERMO_TEMPS - #define THERMO_SEPARATE_SPI 1 +#if TEMP_SENSOR_IS_ANY_MAX_TC(1) && TEMP_SENSOR_1_HAS_SPI_PINS && DISABLED(TEMP_SENSOR_FORCE_HW_SPI) + #define TEMP_SENSOR_1_USES_SW_SPI 1 #endif -#if THERMO_SEPARATE_SPI +#if (TEMP_SENSOR_0_USES_SW_SPI || TEMP_SENSOR_1_USES_SW_SPI) && !HAS_MAXTC_LIBRARIES #include "../libs/private_spi.h" + #define HAS_MAXTC_SW_SPI 1 #endif #if ENABLED(PID_EXTRUSION_SCALING) @@ -172,8 +117,6 @@ #include "../feature/babystep.h" #endif -#include "printcounter.h" - #if ENABLED(FILAMENT_WIDTH_SENSOR) #include "../feature/filwidth.h" #endif @@ -246,7 +189,67 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #define _E_PSTR(h,N) ((HOTENDS) > N && (h) == N) ? PSTR(LCD_STR_E##N) : #define HEATER_PSTR(h) _BED_PSTR(h) _CHAMBER_PSTR(h) _COOLER_PSTR(h) _E_PSTR(h,1) _E_PSTR(h,2) _E_PSTR(h,3) _E_PSTR(h,4) _E_PSTR(h,5) PSTR(LCD_STR_E0) -// public: +// +// Initialize MAX TC objects/SPI +// +#if HAS_MAX_TC + + #if HAS_MAXTC_SW_SPI + // Initialize SoftSPI for non-lib Software SPI; Libraries take care of it themselves. + template + SoftSPI SPIclass::softSPI; + SPIclass max_tc_spi; + #endif + + #define MAXTC_INIT(n, M) \ + MAX##M max##M##_##n = MAX##M( \ + TEMP_##n##_CS_PIN \ + OPTARG(_MAX31865_##n##_SW, TEMP_##n##_MOSI_PIN) \ + OPTARG(TEMP_SENSOR_##n##_USES_SW_SPI, TEMP_##n##_MISO_PIN, TEMP_##n##_SCK_PIN) \ + OPTARG(LARGE_PINMAP, HIGH) \ + ) + + #if HAS_MAX6675_LIBRARY + #if TEMP_SENSOR_IS_MAX(0, 6675) + MAXTC_INIT(0, 6675); + #endif + #if TEMP_SENSOR_IS_MAX(1, 6675) + MAXTC_INIT(1, 6675); + #endif + #endif + + #if HAS_MAX31855_LIBRARY + #if TEMP_SENSOR_IS_MAX(0, 31855) + MAXTC_INIT(0, 31855); + #endif + #if TEMP_SENSOR_IS_MAX(1, 31855) + MAXTC_INIT(1, 31855); + #endif + #endif + + // MAX31865 always uses a library, unlike '55 & 6675 + #if HAS_MAX31865 + #define _MAX31865_0_SW TEMP_SENSOR_0_USES_SW_SPI + #define _MAX31865_1_SW TEMP_SENSOR_1_USES_SW_SPI + + #if TEMP_SENSOR_IS_MAX(0, 31865) + MAXTC_INIT(0, 31865); + #endif + #if TEMP_SENSOR_IS_MAX(1, 31865) + MAXTC_INIT(1, 31865); + #endif + + #undef _MAX31865_0_SW + #undef _MAX31865_1_SW + #endif + + #undef MAXTC_INIT + +#endif + +/** + * public: + */ #if ENABLED(NO_FAN_SLOWING_IN_PID_TUNING) bool Temperature::adaptive_fan_slowing = true; @@ -274,6 +277,25 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, uint8_t Temperature::coolerfan_speed; // = 0 #endif +// Init fans according to whether they're native PWM or Software PWM +#ifdef BOARD_OPENDRAIN_MOSFETS + #define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, FAN_INVERTING ? LOW : HIGH) +#else + #define _INIT_SOFT_FAN(P) OUT_WRITE(P, FAN_INVERTING ? LOW : HIGH) +#endif +#if ENABLED(FAN_SOFT_PWM) + #define _INIT_FAN_PIN(P) _INIT_SOFT_FAN(P) +#else + #define _INIT_FAN_PIN(P) do{ if (PWM_PIN(P)) SET_PWM(P); else _INIT_SOFT_FAN(P); }while(0) +#endif +#if ENABLED(FAST_PWM_FAN) + #define SET_FAST_PWM_FREQ(P) set_pwm_frequency(P, FAST_PWM_FAN_FREQUENCY) +#else + #define SET_FAST_PWM_FREQ(P) NOOP +#endif +#define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0) + +// HAS_FAN does not include CONTROLLER_FAN #if HAS_FAN uint8_t Temperature::fan_speed[FAN_COUNT]; // = { 0 } @@ -419,7 +441,18 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, celsius_t Temperature::extrude_min_temp = EXTRUDE_MINTEMP; #endif -// private: +#if HAS_ADC_BUTTONS + uint32_t Temperature::current_ADCKey_raw = HAL_ADC_RANGE; + uint16_t Temperature::ADCKey_count = 0; +#endif + +#if ENABLED(PID_EXTRUSION_SCALING) + int16_t Temperature::lpq_len; // Initialized in settings.cpp +#endif + +/** + * private: + */ volatile bool Temperature::raw_temps_ready = false; @@ -472,16 +505,10 @@ volatile bool Temperature::raw_temps_ready = false; bool Temperature::paused_for_probing; #endif -// public: - -#if HAS_ADC_BUTTONS - uint32_t Temperature::current_ADCKey_raw = HAL_ADC_RANGE; - uint16_t Temperature::ADCKey_count = 0; -#endif - -#if ENABLED(PID_EXTRUSION_SCALING) - int16_t Temperature::lpq_len; // Initialized in settings.cpp -#endif +/** + * public: + * Class and Instance Methods + */ #if HAS_PID_HEATING @@ -758,10 +785,6 @@ volatile bool Temperature::raw_temps_ready = false; #endif // HAS_PID_HEATING -/** - * Class and Instance Methods - */ - int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { switch (heater_id) { #if HAS_HEATED_BED @@ -781,6 +804,16 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { #define _EFANOVERLAP(A,B) _FANOVERLAP(E##A,B) #if HAS_AUTO_FAN + #if EXTRUDER_AUTO_FAN_SPEED != 255 + #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) + #else + #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) + #endif + #if CHAMBER_AUTO_FAN_SPEED != 255 + #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) + #else + #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) + #endif #define CHAMBER_FAN_INDEX HOTENDS @@ -1668,11 +1701,6 @@ void Temperature::manage_heater() { } celsius_float_t Temperature::user_thermistor_to_deg_c(const uint8_t t_index, const int16_t raw) { - //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB) - // static uint32_t clocks_total = 0; - // static uint32_t calls = 0; - // uint32_t tcnt5 = TCNT5; - //#endif if (!WITHIN(t_index, 0, COUNT(user_thermistor) - 1)) return 25; @@ -1700,14 +1728,6 @@ void Temperature::manage_heater() { value += t.sh_c_coeff * cu(log_resistance); value = 1.0f / value; - //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB) - // int32_t clocks = TCNT5 - tcnt5; - // if (clocks >= 0) { - // clocks_total += clocks; - // calls++; - // } - //#endif - // Return degrees C (up to 999, as the LCD only displays 3 digits) return _MIN(value + THERMISTOR_ABS_ZERO_C, 999); } @@ -1730,7 +1750,14 @@ void Temperature::manage_heater() { #if TEMP_SENSOR_0_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_0, raw); #elif TEMP_SENSOR_0_IS_MAX_TC - return TERN(TEMP_SENSOR_0_IS_MAX31865, max31865_0.temperature(MAX31865_SENSOR_OHMS_0, MAX31865_CALIBRATION_OHMS_0), raw * 0.25); + #if TEMP_SENSOR_0_IS_MAX31865 + return TERN(LIB_INTERNAL_MAX31865, + max31865_0.temperature((uint16_t)raw), + max31865_0.temperature(MAX31865_SENSOR_OHMS_0, MAX31865_CALIBRATION_OHMS_0) + ); + #else + return raw * 0.25; + #endif #elif TEMP_SENSOR_0_IS_AD595 return TEMP_AD595(raw); #elif TEMP_SENSOR_0_IS_AD8495 @@ -1742,7 +1769,14 @@ void Temperature::manage_heater() { #if TEMP_SENSOR_1_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_1, raw); #elif TEMP_SENSOR_1_IS_MAX_TC - return TERN(TEMP_SENSOR_1_IS_MAX31865, max31865_1.temperature(MAX31865_SENSOR_OHMS_1, MAX31865_CALIBRATION_OHMS_1), raw * 0.25); + #if TEMP_SENSOR_0_IS_MAX31865 + return TERN(LIB_INTERNAL_MAX31865, + max31865_1.temperature((uint16_t)raw), + max31865_1.temperature(MAX31865_SENSOR_OHMS_1, MAX31865_CALIBRATION_OHMS_1) + ); + #else + return raw * 0.25; + #endif #elif TEMP_SENSOR_1_IS_AD595 return TEMP_AD595(raw); #elif TEMP_SENSOR_1_IS_AD8495 @@ -1901,9 +1935,9 @@ void Temperature::manage_heater() { #if TEMP_SENSOR_REDUNDANT_IS_CUSTOM return user_thermistor_to_deg_c(CTI_REDUNDANT, raw); #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0 - return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_0.temperature(MAX31865_SENSOR_OHMS_0, MAX31865_CALIBRATION_OHMS_0), raw * 0.25); + return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_0.temperature((uint16_t)raw), raw * 0.25); #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1 - return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_1.temperature(MAX31865_SENSOR_OHMS_1, MAX31865_CALIBRATION_OHMS_1), raw * 0.25); + return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_1.temperature((uint16_t)raw), raw * 0.25); #elif TEMP_SENSOR_REDUNDANT_IS_THERMISTOR SCAN_THERMISTOR_TABLE(TEMPTABLE_REDUNDANT, TEMPTABLE_REDUNDANT_LEN); #elif TEMP_SENSOR_REDUNDANT_IS_AD595 @@ -1936,6 +1970,7 @@ void Temperature::updateTemperaturesFromRawValues() { TERN_(TEMP_SENSOR_0_IS_MAX_TC, temp_hotend[0].raw = READ_MAX_TC(0)); TERN_(TEMP_SENSOR_1_IS_MAX_TC, temp_hotend[1].raw = READ_MAX_TC(1)); TERN_(TEMP_SENSOR_REDUNDANT_IS_MAX_TC, temp_redundant.raw = READ_MAX_TC(TEMP_SENSOR_REDUNDANT_SOURCE)); + #if HAS_HOTEND HOTEND_LOOP() temp_hotend[e].celsius = analog_to_celsius_hotend(temp_hotend[e].raw, e); #endif @@ -2008,40 +2043,7 @@ void Temperature::updateTemperaturesFromRawValues() { if (cutter.unitPower > 0 && COOLERCMP(temp_cooler.raw, maxtemp_raw_COOLER)) max_temp_error(H_COOLER); if (COOLERCMP(mintemp_raw_COOLER, temp_cooler.raw)) min_temp_error(H_COOLER); #endif -} - -#if THERMO_SEPARATE_SPI - template SoftSPI SPIclass::softSPI; - SPIclass max_tc_spi; -#endif - -// Init fans according to whether they're native PWM or Software PWM -#ifdef BOARD_OPENDRAIN_MOSFETS - #define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, FAN_INVERTING ? LOW : HIGH) -#else - #define _INIT_SOFT_FAN(P) OUT_WRITE(P, FAN_INVERTING ? LOW : HIGH) -#endif -#if ENABLED(FAN_SOFT_PWM) - #define _INIT_FAN_PIN(P) _INIT_SOFT_FAN(P) -#else - #define _INIT_FAN_PIN(P) do{ if (PWM_PIN(P)) SET_PWM(P); else _INIT_SOFT_FAN(P); }while(0) -#endif -#if ENABLED(FAST_PWM_FAN) - #define SET_FAST_PWM_FREQ(P) set_pwm_frequency(P, FAST_PWM_FAN_FREQUENCY) -#else - #define SET_FAST_PWM_FREQ(P) NOOP -#endif -#define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0) -#if EXTRUDER_AUTO_FAN_SPEED != 255 - #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) -#else - #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) -#endif -#if CHAMBER_AUTO_FAN_SPEED != 255 - #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) -#else - #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) -#endif +} // Temperature::updateTemperaturesFromRawValues /** * Initialize the temperature manager @@ -2070,50 +2072,47 @@ void Temperature::init() { #endif // Init (and disable) SPI thermocouples - #if TEMP_SENSOR_IS_MAX(0, MAX6675) && PIN_EXISTS(MAX6675_CS) - OUT_WRITE(MAX6675_CS_PIN, HIGH); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX6675) && PIN_EXISTS(MAX6675_CS2) - OUT_WRITE(MAX6675_CS2_PIN, HIGH); - #endif - #if TEMP_SENSOR_IS_MAX(0, MAX6675) && PIN_EXISTS(MAX31855_CS) - OUT_WRITE(MAX31855_CS_PIN, HIGH); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX6675) && PIN_EXISTS(MAX31855_CS2) - OUT_WRITE(MAX31855_CS2_PIN, HIGH); - #endif - #if TEMP_SENSOR_IS_MAX(0, MAX6675) && PIN_EXISTS(MAX31865_CS) - OUT_WRITE(MAX31865_CS_PIN, HIGH); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX6675) && PIN_EXISTS(MAX31865_CS2) - OUT_WRITE(MAX31865_CS2_PIN, HIGH); - #endif - - #if HAS_MAX31865_TEMP - #if TEMP_SENSOR_IS_MAX(0, MAX31865) - max31865_0.begin(MAX31865_2WIRE); // MAX31865_2WIRE, MAX31865_3WIRE, MAX31865_4WIRE - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX31865) - max31865_1.begin(MAX31865_2WIRE); - #endif - #endif - - #if HAS_MAX31855_TEMP - #if TEMP_SENSOR_IS_MAX(0, MAX31855) - max31855_0.begin(MAX31855); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX31855) - max31855_1.begin(MAX31855); + #if TEMP_SENSOR_IS_ANY_MAX_TC(0) && PIN_EXISTS(TEMP_0_CS) + OUT_WRITE(TEMP_0_CS_PIN, HIGH); + #endif + #if TEMP_SENSOR_IS_ANY_MAX_TC(1) && PIN_EXISTS(TEMP_1_CS) + OUT_WRITE(TEMP_1_CS_PIN, HIGH); + #endif + + // Setup objects for library-based polling of MAX TCs + #if HAS_MAXTC_LIBRARIES + #define _MAX31865_WIRES(n) MAX31865_##n##WIRE + #define MAX31865_WIRES(n) _MAX31865_WIRES(n) + + #if TEMP_SENSOR_IS_MAX(0, 6675) && HAS_MAX6675_LIBRARY + max6675_0.begin(); + #elif TEMP_SENSOR_IS_MAX(0, 31855) && HAS_MAX31855_LIBRARY + max31855_0.begin(); + #elif TEMP_SENSOR_IS_MAX(0, 31865) + max31865_0.begin( + MAX31865_WIRES(MAX31865_SENSOR_WIRES_0) // MAX31865_2WIRE, MAX31865_3WIRE, MAX31865_4WIRE + OPTARG(LIB_INTERNAL_MAX31865, MAX31865_SENSOR_OHMS_0, MAX31865_CALIBRATION_OHMS_0) + ); + #if defined(LIB_INTERNAL_MAX31865) && ENABLED(MAX31865_50HZ_FILTER) + max31865_0.enable50HzFilter(1); + #endif #endif - #endif - #if HAS_MAX6675_TEMP - #if TEMP_SENSOR_IS_MAX(0, MAX6675) - max6675_0.begin(MAX6675); - #endif - #if TEMP_SENSOR_IS_MAX(1, MAX6675) - max6675_1.begin(MAX6675); + #if TEMP_SENSOR_IS_MAX(1, 6675) && HAS_MAX6675_LIBRARY + max6675_1.begin(); + #elif TEMP_SENSOR_IS_MAX(1, 31855) && HAS_MAX31855_LIBRARY + max31855_1.begin(); + #elif TEMP_SENSOR_IS_MAX(1, 31865) + max31865_1.begin( + MAX31865_WIRES(MAX31865_SENSOR_WIRES_1) // MAX31865_2WIRE, MAX31865_3WIRE, MAX31865_4WIRE + OPTARG(LIB_INTERNAL_MAX31865, MAX31865_SENSOR_OHMS_1, MAX31865_CALIBRATION_OHMS_1) + ); + #if defined(LIB_INTERNAL_MAX31865) && ENABLED(MAX31865_50HZ_FILTER) + max31865_1.enable50HzFilter(1); + #endif #endif + #undef MAX31865_WIRES + #undef _MAX31865_WIRES #endif #if MB(RUMBA) @@ -2152,7 +2151,6 @@ void Temperature::init() { OUT_WRITE(HEATER_0_PIN, HEATER_0_INVERTING); #endif #endif - #if HAS_HEATER_1 OUT_WRITE(HEATER_1_PIN, HEATER_1_INVERTING); #endif @@ -2219,7 +2217,9 @@ void Temperature::init() { INIT_FAN_PIN(CONTROLLER_FAN_PIN); #endif - TERN_(THERMO_SEPARATE_SPI, max_tc_spi.init()); + #if HAS_MAXTC_SW_SPI + max_tc_spi.init(); + #endif HAL_adc_init(); @@ -2318,11 +2318,7 @@ void Temperature::init() { INIT_CHAMBER_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN); #endif - // Wait for temperature measurement to settle - //delay(250); - #if HAS_HOTEND - #define _TEMP_MIN_E(NR) do{ \ const celsius_t tmin = _MAX(HEATER_##NR##_MINTEMP, TERN(TEMP_SENSOR_##NR##_IS_CUSTOM, 0, (int)pgm_read_word(&TEMPTABLE_##NR [TEMP_SENSOR_##NR##_MINTEMP_IND].celsius))); \ temp_range[NR].mintemp = tmin; \ @@ -2386,7 +2382,6 @@ void Temperature::init() { #if _MINMAX_TEST(7, MAX) _TEMP_MAX_E(7); #endif - #endif // HAS_HOTEND #if HAS_HEATED_BED @@ -2520,9 +2515,8 @@ void Temperature::init() { void Temperature::disable_all_heaters() { + // Disable autotemp, unpause and reset everything TERN_(AUTOTEMP, planner.autotemp_enabled = false); - - // Unpause and reset everything TERN_(PROBING_HEATERS_OFF, pause_heaters(false)); #if HAS_HOTEND @@ -2558,8 +2552,6 @@ void Temperature::disable_all_heaters() { #if ENABLED(PRINTJOB_TIMER_AUTOSTART) - #include "printcounter.h" - bool Temperature::auto_job_over_threshold() { #if HAS_HOTEND HOTEND_LOOP() if (degTargetHotend(e) > (EXTRUDE_MINTEMP) / 2) return true; @@ -2578,7 +2570,7 @@ void Temperature::disable_all_heaters() { } } -#endif +#endif // PRINTJOB_TIMER_AUTOSTART #if ENABLED(PROBING_HEATERS_OFF) @@ -2616,7 +2608,7 @@ void Temperature::disable_all_heaters() { #endif } -#endif +#endif // SINGLENOZZLE_STANDBY_TEMP || SINGLENOZZLE_STANDBY_FAN #if HAS_MAX_TC @@ -2624,113 +2616,114 @@ void Temperature::disable_all_heaters() { #define THERMOCOUPLE_MAX_ERRORS 15 #endif - int Temperature::read_max_tc(TERN_(HAS_MULTI_MAX_TC, const uint8_t hindex/*=0*/)) { - #define MAX6675_HEAT_INTERVAL 250UL + /** + * @brief Read MAX Thermocouple temperature. + * + * Reads the thermocouple board via HW or SW SPI, using a library (LIB_USR_x) or raw SPI reads. + * Doesn't strictly return a temperature; returns an "ADC Value" (i.e. raw register content). + * + * @param hindex the hotend we're referencing (if MULTI_MAX_TC) + * @return integer representing the board's buffer, to be converted later if needed + */ + int16_t Temperature::read_max_tc(TERN_(HAS_MULTI_MAX_TC, const uint8_t hindex/*=0*/)) { + #define MAXTC_HEAT_INTERVAL 250UL - #if HAS_MAX31855_TEMP - static uint32_t max_tc_temp = 2000; - #define MAX_TC_ERROR_MASK 7 - #define MAX_TC_DISCARD_BITS 18 - #define MAX_TC_SPEED_BITS 3 // (_BV(SPR1)) // clock ÷ 64 - #elif HAS_MAX31865_TEMP - static uint16_t max_tc_temp = 2000; // From datasheet 16 bits D15-D0 - #define MAX_TC_ERROR_MASK 1 // D0 Bit not used + #if HAS_MAX31855 + #define MAX_TC_ERROR_MASK 7 // D2-0: SCV, SCG, OC + #define MAX_TC_DISCARD_BITS 18 // Data D31-18; sign bit D31 + #define MAX_TC_SPEED_BITS 3 // ~1MHz + #elif HAS_MAX31865 + #define MAX_TC_ERROR_MASK 1 // D0 Bit on fault only #define MAX_TC_DISCARD_BITS 1 // Data is in D15-D1 - #define MAX_TC_SPEED_BITS 3 // (_BV(SPR1)) // clock ÷ 64 - #else - static uint16_t max_tc_temp = 2000; - #define MAX_TC_ERROR_MASK 4 - #define MAX_TC_DISCARD_BITS 3 - #define MAX_TC_SPEED_BITS 2 // (_BV(SPR0)) // clock ÷ 16 + #define MAX_TC_SPEED_BITS 3 // ~1MHz + #else // MAX6675 + #define MAX_TC_ERROR_MASK 3 // D2 only; 1 = open circuit + #define MAX_TC_DISCARD_BITS 3 // Data D15-D1 + #define MAX_TC_SPEED_BITS 2 // ~2MHz #endif #if HAS_MULTI_MAX_TC // Needed to return the correct temp when this is called between readings - static celsius_t max_tc_temp_previous[MAX_TC_COUNT] = { 0 }; + static int16_t max_tc_temp_previous[MAX_TC_COUNT] = { 0 }; #define THERMO_TEMP(I) max_tc_temp_previous[I] #define THERMO_SEL(A,B) (hindex ? (B) : (A)) - #define MAX6675_WRITE(V) do{ switch (hindex) { case 1: WRITE(MAX6675_SS2_PIN, V); break; default: WRITE(MAX6675_SS_PIN, V); } }while(0) - #define MAX6675_SET_OUTPUT() do{ switch (hindex) { case 1: SET_OUTPUT(MAX6675_SS2_PIN); break; default: SET_OUTPUT(MAX6675_SS_PIN); } }while(0) + #define MAXTC_CS_WRITE(V) do{ switch (hindex) { case 1: WRITE(TEMP_1_CS_PIN, V); break; default: WRITE(TEMP_0_CS_PIN, V); } }while(0) #else + // When we have only 1 max tc, THERMO_SEL will pick the appropriate sensor + // variable, and MAXTC_*() macros will be hardcoded to the correct CS pin. constexpr uint8_t hindex = 0; #define THERMO_TEMP(I) max_tc_temp - #if TEMP_SENSOR_IS_ANY_MAX_TC(1) - #define THERMO_SEL(A,B) B - #else + #if TEMP_SENSOR_IS_ANY_MAX_TC(0) #define THERMO_SEL(A,B) A - #endif - #if TEMP_SENSOR_IS_MAX(0, MAX6675) - #define MAX6675_WRITE(V) WRITE(MAX6675_SS_PIN, V) - #define MAX6675_SET_OUTPUT() SET_OUTPUT(MAX6675_SS_PIN) + #define MAXTC_CS_WRITE(V) WRITE(TEMP_0_CS_PIN, V) #else - #define MAX6675_WRITE(V) WRITE(MAX6675_SS2_PIN, V) - #define MAX6675_SET_OUTPUT() SET_OUTPUT(MAX6675_SS2_PIN) + #define THERMO_SEL(A,B) B + #define MAXTC_CS_WRITE(V) WRITE(TEMP_1_CS_PIN, V) #endif - #endif + static TERN(HAS_MAX31855, uint32_t, uint16_t) max_tc_temp = THERMO_SEL( + TEMP_SENSOR_0_MAX_TC_TMAX, + TEMP_SENSOR_1_MAX_TC_TMAX + ); + static uint8_t max_tc_errors[MAX_TC_COUNT] = { 0 }; + static millis_t next_max_tc_ms[MAX_TC_COUNT] = { 0 }; // Return last-read value between readings - static millis_t next_max_tc_ms[MAX_TC_COUNT] = { 0 }; millis_t ms = millis(); - if (PENDING(ms, next_max_tc_ms[hindex])) return int(THERMO_TEMP(hindex)); - next_max_tc_ms[hindex] = ms + MAX6675_HEAT_INTERVAL; + if (PENDING(ms, next_max_tc_ms[hindex])) + return (int16_t)THERMO_TEMP(hindex); - // - // TODO: spiBegin, spiRec and spiInit doesn't work when soft spi is used. - // - #if !THERMO_SEPARATE_SPI && NO_THERMO_TEMPS - spiBegin(); - spiInit(MAX_TC_SPEED_BITS); - #endif + next_max_tc_ms[hindex] = ms + MAXTC_HEAT_INTERVAL; - #if NO_THERMO_TEMPS - MAX6675_WRITE(LOW); // enable TT_MAX6675 - DELAY_NS(100); // Ensure 100ns delay - #endif + #if !HAS_MAXTC_LIBRARIES + max_tc_temp = 0; - max_tc_temp = 0; + #if !HAS_MAXTC_SW_SPI + // Initialize SPI using the default Hardware SPI bus. + // FIXME: spiBegin, spiRec and spiInit doesn't work when soft spi is used. + spiBegin(); + spiInit(MAX_TC_SPEED_BITS); + #endif + + MAXTC_CS_WRITE(LOW); // enable MAXTC + DELAY_NS(100); // Ensure 100ns delay - // Read a big-endian temperature value - #if NO_THERMO_TEMPS + // Read a big-endian temperature value without using a library for (uint8_t i = sizeof(max_tc_temp); i--;) { - max_tc_temp |= TERN(THERMO_SEPARATE_SPI, max_tc_spi.receive(), spiRec()); + max_tc_temp |= TERN(HAS_MAXTC_SW_SPI, max_tc_spi.receive(), spiRec()); if (i > 0) max_tc_temp <<= 8; // shift left if not the last byte } - MAX6675_WRITE(HIGH); // disable TT_MAX6675 - #endif - #if HAS_MAX31855_TEMP - Adafruit_MAX31855 &max855ref = THERMO_SEL(max31855_0, max31855_1); - max_tc_temp = max855ref.readRaw32(); - #endif - - #if HAS_MAX31865_TEMP - Adafruit_MAX31865 &max865ref = THERMO_SEL(max31865_0, max31865_1); - #if ENABLED(LIB_USR_MAX31865) - max_tc_temp = max865ref.readRTD_with_Fault(); + MAXTC_CS_WRITE(HIGH); // disable MAXTC + #else + #if HAS_MAX6675_LIBRARY + MAX6675 &max6675ref = THERMO_SEL(max6675_0, max6675_1); + max_tc_temp = max6675ref.readRaw16(); #endif - #endif - #if HAS_MAX6675_TEMP - MAX6675 &max6675ref = THERMO_SEL(max6675_0, max6675_1); - max_tc_temp = max6675ref.readRaw16(); - #endif + #if HAS_MAX31855_LIBRARY + MAX31855 &max855ref = THERMO_SEL(max31855_0, max31855_1); + max_tc_temp = max855ref.readRaw32(); + #endif - #if ENABLED(LIB_ADAFRUIT_MAX31865) - const uint8_t fault_31865 = max865ref.readFault() & 0x3FU; + #if HAS_MAX31865 + MAX31865 &max865ref = THERMO_SEL(max31865_0, max31865_1); + max_tc_temp = TERN(LIB_INTERNAL_MAX31865, max865ref.readRaw(), max865ref.readRTD_with_Fault()); + #endif #endif - if (DISABLED(IGNORE_THERMOCOUPLE_ERRORS) - && TERN(LIB_ADAFRUIT_MAX31865, fault_31865, (max_tc_temp & MAX_TC_ERROR_MASK)) - ) { + // Handle an error. If there have been more than THERMOCOUPLE_MAX_ERRORS, send an error over serial. + // Either way, return the TMAX for the thermocouple to trigger a max_temp_error() + if (max_tc_temp & MAX_TC_ERROR_MASK) { max_tc_errors[hindex]++; + if (max_tc_errors[hindex] > THERMOCOUPLE_MAX_ERRORS) { SERIAL_ERROR_START(); SERIAL_ECHOPGM("Temp measurement error! "); - #if MAX_TC_ERROR_MASK == 7 - SERIAL_ECHOPGM("MAX31855 Fault : (", max_tc_temp & 0x7, ") >> "); + #if HAS_MAX31855 + SERIAL_ECHOPAIR("MAX31855 Fault: (", max_tc_temp & 0x7, ") >> "); if (max_tc_temp & 0x1) SERIAL_ECHOLNPGM("Open Circuit"); else if (max_tc_temp & 0x2) @@ -2738,59 +2731,46 @@ void Temperature::disable_all_heaters() { else if (max_tc_temp & 0x4) SERIAL_ECHOLNPGM("Short to VCC"); #elif HAS_MAX31865 - #if ENABLED(LIB_USR_MAX31865) - // At the present time we do not have the ability to set the MAX31865 HIGH threshold - // or thr LOW threshold, so no need to check for them, zero these bits out - const uint8_t fault_31865 = max865ref.readFault() & 0x3FU; - #endif + const uint8_t fault_31865 = max865ref.readFault(); max865ref.clearFault(); if (fault_31865) { SERIAL_EOL(); - SERIAL_ECHOLNPAIR("\nMAX31865 Fault :(", fault_31865, ") >>"); + SERIAL_ECHOLNPAIR("\nMAX31865 Fault: (", fault_31865, ") >>"); if (fault_31865 & MAX31865_FAULT_HIGHTHRESH) SERIAL_ECHOLNPGM("RTD High Threshold"); if (fault_31865 & MAX31865_FAULT_LOWTHRESH) SERIAL_ECHOLNPGM("RTD Low Threshold"); if (fault_31865 & MAX31865_FAULT_REFINLOW) - SERIAL_ECHOLNPGM("REFIN- > 0.85 x Bias"); + SERIAL_ECHOLNPGM("REFIN- > 0.85 x V bias"); if (fault_31865 & MAX31865_FAULT_REFINHIGH) - SERIAL_ECHOLNPGM("REFIN- < 0.85 x Bias - FORCE- open"); + SERIAL_ECHOLNPGM("REFIN- < 0.85 x V bias (FORCE- open)"); if (fault_31865 & MAX31865_FAULT_RTDINLOW) - SERIAL_ECHOLNPGM("REFIN- < 0.85 x Bias - FORCE- open"); + SERIAL_ECHOLNPGM("REFIN- < 0.85 x V bias (FORCE- open)"); if (fault_31865 & MAX31865_FAULT_OVUV) SERIAL_ECHOLNPGM("Under/Over voltage"); } - #else - SERIAL_ECHOLNPGM("MAX6675 Open Circuit"); + #else // MAX6675 + SERIAL_ECHOLNPGM("MAX6675 Fault: Open Circuit"); #endif - // Thermocouple open - max_tc_temp = 4 * THERMO_SEL(TEMP_SENSOR_0_MAX_TC_TMAX, TEMP_SENSOR_1_MAX_TC_TMAX); + // Set thermocouple above max temperature (TMAX) + max_tc_temp = THERMO_SEL(TEMP_SENSOR_0_MAX_TC_TMAX, TEMP_SENSOR_1_MAX_TC_TMAX) << (MAX_TC_DISCARD_BITS + 1); } - else - max_tc_temp >>= MAX_TC_DISCARD_BITS; } else { - max_tc_temp >>= MAX_TC_DISCARD_BITS; - max_tc_errors[hindex] = 0; + max_tc_errors[hindex] = 0; // No error bit, reset error count } - #if HAS_MAX31855 - if (max_tc_temp & 0x00002000) max_tc_temp |= 0xFFFFC000; // Support negative temperature - #endif + max_tc_temp >>= MAX_TC_DISCARD_BITS; - // Return the RTD resistance for MAX31865 for display in SHOW_TEMP_ADC_VALUES - #if HAS_MAX31865_TEMP - #if ENABLED(LIB_ADAFRUIT_MAX31865) - max_tc_temp = (uint32_t(max865ref.readRTD()) * THERMO_SEL(MAX31865_CALIBRATION_OHMS_0, MAX31865_CALIBRATION_OHMS_1)) >> 16; - #elif ENABLED(LIB_USR_MAX31865) - max_tc_temp = (uint32_t(max_tc_temp) * THERMO_SEL(MAX31865_CALIBRATION_OHMS_0, MAX31865_CALIBRATION_OHMS_1)) >> 16; - #endif + #if HAS_MAX31855 + // Support negative temperature for MAX38155 + if (max_tc_temp & 0x00002000) max_tc_temp |= 0xFFFFC000; #endif THERMO_TEMP(hindex) = max_tc_temp; - return int(max_tc_temp); + return (int16_t)max_tc_temp; } #endif // HAS_MAX_TC @@ -2815,16 +2795,16 @@ void Temperature::update_raw_temperatures() { temp_redundant.update(); #endif - TERN_(HAS_TEMP_ADC_2, temp_hotend[2].update()); - TERN_(HAS_TEMP_ADC_3, temp_hotend[3].update()); - TERN_(HAS_TEMP_ADC_4, temp_hotend[4].update()); - TERN_(HAS_TEMP_ADC_5, temp_hotend[5].update()); - TERN_(HAS_TEMP_ADC_6, temp_hotend[6].update()); - TERN_(HAS_TEMP_ADC_7, temp_hotend[7].update()); - TERN_(HAS_TEMP_ADC_BED, temp_bed.update()); + TERN_(HAS_TEMP_ADC_2, temp_hotend[2].update()); + TERN_(HAS_TEMP_ADC_3, temp_hotend[3].update()); + TERN_(HAS_TEMP_ADC_4, temp_hotend[4].update()); + TERN_(HAS_TEMP_ADC_5, temp_hotend[5].update()); + TERN_(HAS_TEMP_ADC_6, temp_hotend[6].update()); + TERN_(HAS_TEMP_ADC_7, temp_hotend[7].update()); + TERN_(HAS_TEMP_ADC_BED, temp_bed.update()); TERN_(HAS_TEMP_ADC_CHAMBER, temp_chamber.update()); - TERN_(HAS_TEMP_ADC_PROBE, temp_probe.update()); - TERN_(HAS_TEMP_ADC_COOLER, temp_cooler.update()); + TERN_(HAS_TEMP_ADC_PROBE, temp_probe.update()); + TERN_(HAS_TEMP_ADC_COOLER, temp_cooler.update()); TERN_(HAS_JOY_ADC_X, joystick.x.update()); TERN_(HAS_JOY_ADC_Y, joystick.y.update()); @@ -3465,7 +3445,7 @@ void Temperature::isr() { SERIAL_PRINT(t, SFP); #if ENABLED(SHOW_TEMP_ADC_VALUES) // Temperature MAX SPI boards do not have an OVERSAMPLENR defined - SERIAL_ECHOPAIR(" (", TERN(NO_THERMO_TEMPS, false, k == 'T') ? r : r * RECIPROCAL(OVERSAMPLENR)); + SERIAL_ECHOPAIR(" (", TERN(HAS_MAXTC_LIBRARIES, k == 'T', false) ? r : r * RECIPROCAL(OVERSAMPLENR)); SERIAL_CHAR(')'); #endif delay(2); diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 3a8c506a5db0..26c1dca8afb8 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -428,6 +428,15 @@ class Temperature { static heater_idle_t heater_idle[NR_HEATER_IDLE]; + #endif // HEATER_IDLE_TIMER + + #if HAS_ADC_BUTTONS + static uint32_t current_ADCKey_raw; + static uint16_t ADCKey_count; + #endif + + #if ENABLED(PID_EXTRUSION_SCALING) + static int16_t lpq_len; #endif private: @@ -486,15 +495,6 @@ class Temperature { #endif public: - #if HAS_ADC_BUTTONS - static uint32_t current_ADCKey_raw; - static uint16_t ADCKey_count; - #endif - - #if ENABLED(PID_EXTRUSION_SCALING) - static int16_t lpq_len; - #endif - /** * Instance Methods */ @@ -915,7 +915,7 @@ class Temperature { #else #define READ_MAX_TC(N) read_max_tc() #endif - static int read_max_tc(TERN_(HAS_MULTI_MAX_TC, const uint8_t hindex=0)); + static int16_t read_max_tc(TERN_(HAS_MULTI_MAX_TC, const uint8_t hindex=0)); #endif static void checkExtruderAutoFans(); diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index ab1446f07c9f..568086e066f1 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -133,11 +133,11 @@ #define TEMP_1_PIN 1 // Analog Input #define TEMP_BED_PIN 2 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index 066c65be3af8..f7e566e2d620 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -73,6 +73,19 @@ #endif #endif +// CS, MISO, MOSI, and SCK for MAX Thermocouple SPI +#if HAS_MAX_TC + //#define TEMP_0_CS_PIN P... + //#define TEMP_0_MISO_PIN P... + //#define TEMP_0_MOSI_PIN P... + //#define TEMP_0_SCK_PIN P... + + //#define TEMP_1_CS_PIN P... + //#define TEMP_1_MISO_PIN P... + //#define TEMP_1_MOSI_PIN P... + //#define TEMP_1_SCK_PIN P... +#endif + // // Heaters / Fans // diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 83fcf36e4e1f..c25f676a08b1 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -248,8 +248,8 @@ #define PS_ON_PIN P2_12 // (12) -#if !defined(MAX6675_SS_PIN) && DISABLED(USE_ZMAX_PLUG) - #define MAX6675_SS_PIN P1_28 +#if !defined(TEMP_0_CS_PIN) && DISABLED(USE_ZMAX_PLUG) + #define TEMP_0_CS_PIN P1_28 #endif #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN) diff --git a/Marlin/src/pins/mega/pins_MALYAN_M180.h b/Marlin/src/pins/mega/pins_MALYAN_M180.h index e244d294f1c6..19095a53799f 100644 --- a/Marlin/src/pins/mega/pins_MALYAN_M180.h +++ b/Marlin/src/pins/mega/pins_MALYAN_M180.h @@ -72,17 +72,17 @@ #define TEMP_BED_PIN 15 // Analog Input // Extruder thermocouples 0 and 1 are read out by two separate ICs using -// SPI for Max6675 Thermocouple +// SPI for MAX Thermocouple // Uses a separate SPI bus -#define THERMO_SCK_PIN 78 // E2 - SCK -#define THERMO_DO_PIN 3 // E5 - DO -#define THERMO_CS1_PIN 5 // E3 - CS0 -#define THERMO_CS2_PIN 2 // E4 - CS1 +#define TEMP_0_CS_PIN 5 // E3 - CS0 +#define TEMP_0_SCK_PIN 78 // E2 - SCK +#define TEMP_0_MISO_PIN 3 // E5 - MISO +//#define TEMP_0_MOSI_PIN ... // For MAX31865 -#define MAX6675_SS_PIN THERMO_CS1_PIN -#define MAX6675_SS2_PIN THERMO_CS2_PIN -#define MAX6675_SCK_PIN THERMO_SCK_PIN -#define MAX6675_DO_PIN THERMO_DO_PIN +#define TEMP_1_CS_PIN 2 // E4 - CS1 +#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN +#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN +//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // // Heaters / Fans diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index 2531f10a7ae3..aea05134a87c 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -125,7 +125,7 @@ // K7 - 69 / ADC15 - 15 #define TEMP_BED_PIN 15 -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // Uses a separate SPI bus // // 3 E5 DO (SO) @@ -133,15 +133,15 @@ // 2 E4 CS2 // 78 E2 SCK // -#define THERMO_SCK_PIN 78 // E2 -#define THERMO_DO_PIN 3 // E5 -#define THERMO_CS1_PIN 5 // E3 -#define THERMO_CS2_PIN 2 // E4 - -#define MAX6675_SS_PIN THERMO_CS1_PIN -#define MAX6675_SS2_PIN THERMO_CS2_PIN -#define MAX6675_SCK_PIN THERMO_SCK_PIN -#define MAX6675_DO_PIN THERMO_DO_PIN +#define TEMP_0_CS_PIN 5 // E3 +#define TEMP_0_SCK_PIN 78 // E2 +#define TEMP_0_MISO_PIN 3 // E5 +//#define TEMP_0_MOSI_PIN ... // For MAX31865 + +#define TEMP_1_CS_PIN 2 // E4 +#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN +#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN +//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // // Augmentation for auto-assigning plugs diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index 41afe5d891b3..47c101711c4f 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -118,11 +118,11 @@ #define SSR_PIN 6 -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 1ab7188b701a..8b1cad3a7c97 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -760,17 +760,29 @@ #if PIN_EXISTS(LED_RED) REPORT_NAME_DIGITAL(__LINE__, LED_RED_PIN) #endif -#if PIN_EXISTS(MAX6675_DO) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_DO_PIN) +#if PIN_EXISTS(TEMP_0_CS) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_CS_PIN) #endif -#if PIN_EXISTS(MAX6675_SCK) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_SCK_PIN) +#if PIN_EXISTS(TEMP_0_SCK) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_SCK_PIN) #endif -#if PIN_EXISTS(MAX6675_SS) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS_PIN) +#if PIN_EXISTS(TEMP_0_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_MOSI_PIN) #endif -#if PIN_EXISTS(MAX6675_SS2) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS2_PIN) +#if PIN_EXISTS(TEMP_0_MISO) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_MISO_PIN) +#endif +#if PIN_EXISTS(TEMP_1_CS) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_CS_PIN) +#endif +#if PIN_EXISTS(TEMP_1_SCK) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_SCK_PIN) +#endif +#if PIN_EXISTS(TEMP_1_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_MOSI_PIN) +#endif +#if PIN_EXISTS(TEMP_1_MISO) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_MISO_PIN) #endif #if PIN_EXISTS(MAX7219_CLK) REPORT_NAME_DIGITAL(__LINE__, MAX7219_CLK_PIN) @@ -1010,18 +1022,6 @@ #if PIN_EXISTS(SUICIDE) REPORT_NAME_DIGITAL(__LINE__, SUICIDE_PIN) #endif -#if PIN_EXISTS(THERMO_CS1) - REPORT_NAME_DIGITAL(__LINE__, THERMO_CS1_PIN) -#endif -#if PIN_EXISTS(THERMO_CS2) - REPORT_NAME_DIGITAL(__LINE__, THERMO_CS2_PIN) -#endif -#if PIN_EXISTS(THERMO_DO) - REPORT_NAME_DIGITAL(__LINE__, THERMO_DO_PIN) -#endif -#if PIN_EXISTS(THERMO_SCK) - REPORT_NAME_DIGITAL(__LINE__, THERMO_SCK_PIN) -#endif #if PIN_EXISTS(TLC_BLANK) REPORT_NAME_DIGITAL(__LINE__, TLC_BLANK_PIN) #endif diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index 5d6f9c1fd09d..f2d34dc00d79 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -171,10 +171,10 @@ #define SPINDLE_DIR_PIN 32 // -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // -#ifndef MAX6675_SS_PIN - #define MAX6675_SS_PIN 32 // SPINDLE_DIR_PIN / STAT_LED_BLUE_PIN +#ifndef TEMP_0_CS_PIN + #define TEMP_0_CS_PIN 32 // SPINDLE_DIR_PIN / STAT_LED_BLUE_PIN #endif // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index 383501caaaf8..34a4ceb27d16 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -114,11 +114,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 14 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index ac0b7428f498..5f645e5d957a 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -111,11 +111,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 3 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index 76a9fbe62804..c953cff3d066 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -111,11 +111,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 14 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index c2d4dbeb3f81..b13b5e72a0a3 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -167,10 +167,10 @@ #endif // -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // -#ifndef MAX6675_SS_PIN - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) +#ifndef TEMP_0_CS_PIN + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index a43ee3c6ca5a..974766623594 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -74,11 +74,11 @@ #define TEMP_0_PIN 2 // Analog Input #define TEMP_BED_PIN 1 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h index 345c51d5de59..203af5e08180 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h @@ -75,12 +75,12 @@ #define TEMP_1_PIN 13 // Analog Input #define TEMP_BED_PIN 15 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple -#undef MAX6675_SS_PIN +// SPI for MAX Thermocouple +#undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card + #define TEMP_0_CS_PIN 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card #else - #define MAX6675_SS_PIN 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present + #define TEMP_0_CS_PIN 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif // diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index 53e419af00cc..de8db60847f5 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -123,11 +123,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 14 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN -1 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN -1 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN -1 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN -1 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index aba8f80e6107..57a9a560d35b 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -181,11 +181,11 @@ #define TEMP_4_PIN 12 #endif -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple //#if DISABLED(SDSUPPORT) -// #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card +// #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card //#else -// #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) +// #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) //#endif // diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index de3cb33e8de3..81eca3e4b14a 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -82,11 +82,11 @@ #define TEMP_2_PIN 5 // Analog Input (unused) #define TEMP_BED_PIN 1 // Analog Input (BED thermistor) -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN -1 + #define TEMP_0_CS_PIN -1 #else - #define MAX6675_SS_PIN -1 + #define TEMP_0_CS_PIN -1 #endif // diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index c52199a54dc5..bc0d29b00a02 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -71,11 +71,11 @@ #define TEMP_2_PIN 5 // Analog Input (OnBoard thermistor beta 3950) #define TEMP_BED_PIN 1 // Analog Input (BED thermistor) -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #endif // diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index 7b0ec5ab68e8..7a865b4ad870 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -179,11 +179,11 @@ #define TEMP_4_PIN 5 // dummy so will compile when PINS_DEBUGGING is enabled #define TEMP_BED_PIN 4 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif // diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index b1a6680c506c..5b2b2f0b6615 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -60,12 +60,12 @@ #undef TEMP_BED_PIN #define TEMP_BED_PIN 10 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple -#undef MAX6675_SS_PIN +// SPI for MAX Thermocouple +#undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 69 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 69 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 69 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 69 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index e4c53530f7b0..30f209ad3713 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -109,11 +109,11 @@ #define TEMP_2_PIN 3 // Analog Input #define TEMP_BED_PIN 0 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif // diff --git a/Marlin/src/pins/sam/pins_RAMPS_SMART.h b/Marlin/src/pins/sam/pins_RAMPS_SMART.h index 3882dfb94420..96d0c9e1cc9a 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_SMART.h +++ b/Marlin/src/pins/sam/pins_RAMPS_SMART.h @@ -94,12 +94,12 @@ #undef TEMP_BED_PIN #define TEMP_BED_PIN 11 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple -#undef MAX6675_SS_PIN +// SPI for MAX Thermocouple +#undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 67 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 67 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 67 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 67 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index a52af48e1122..b21742891152 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -156,12 +156,12 @@ #define TEMP_5_PIN 6 // A6 (Marlin 2.0 not support) #endif -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple /* #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif */ diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 37ebb567a699..700288690817 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -142,12 +142,12 @@ #define TEMP_5_PIN 6 // A6 (Marlin 2.0 not support) #endif -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple /* #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif */ diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index e567b0f5e11d..a655d0121c84 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -149,12 +149,11 @@ #define SD_MISO_PIN 74 #define SD_MOSI_PIN 75 -// SPI for Max6675 or Max31855 Thermocouple -#define MAX6675_SS_PIN 65 -#define MAX31855_SS0 65 -#define MAX31855_SS1 52 -#define MAX31855_SS2 50 -#define MAX31855_SS3 51 +// SPI for MAX Thermocouple +#define TEMP_0_CS_PIN 65 +#define TEMP_1_CS_PIN 52 +#define TEMP_2_CS_PIN 50 +#define TEMP_3_CS_PIN 51 #define ENC424_SS 61 diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index 429cf14ac5b8..179c04a3045c 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -100,10 +100,10 @@ //#define TEMP_0_PIN PB3 // E0 K+ #define TEMP_BED_PIN PF7 // THERM_BED -#define MAX6675_SS_PIN PB5 -#define MAX6675_SCK_PIN PB3 -#define MAX6675_DO_PIN PB4 -#define MAX6675_MOSI_PIN PA14 +#define TEMP_0_CS_PIN PB5 +#define TEMP_0_SCK_PIN PB3 +#define TEMP_0_MISO_PIN PB4 +#define TEMP_0_MOSI_PIN PA14 // // Heaters / Fans diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index b9f1074c7aa4..8da4dcc9de6c 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -121,8 +121,8 @@ // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // // Filament runout sensor diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index ea3a7a1eea8e..0e2aee9e9971 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -124,8 +124,8 @@ // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // // Misc. Functions diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 6ef3a0804384..3a203aab4978 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -188,8 +188,8 @@ // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // // Misc. Functions diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index b56971c7a353..129b640d9774 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -175,8 +175,8 @@ /** * Note: MKS Robin Pro board is using SPI2 interface. Make sure your stm32duino library is configured accordingly */ -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PF11 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PF11 // TC2 - CS2 #define POWER_LOSS_PIN PA2 // PW_DET #define PS_ON_PIN PG11 // PW_OFF diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index 4438ed63acc4..3151a38ae8f9 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -298,19 +298,19 @@ #define TEMP_BED_PIN PC0 // T0 <-> Bed -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // Uses a separate SPI bus -// If you have a two-way thermocouple, you can customize two THERMO_CSx_PIN pins (x:1~2) +// If you have a two-way thermocouple, you can customize two TEMP_x_CS_PIN pins (x:0~1) -#define THERMO_SCK_PIN PI1 // SCK -#define THERMO_DO_PIN PI2 // MISO -#define THERMO_CS1_PIN PH9 // GTR K-TEMP -#define THERMO_CS2_PIN PH2 // M5 K-TEMP +#define TEMP_0_CS_PIN PH9 // GTR K-TEMP +#define TEMP_0_SCK_PIN PI1 // SCK +#define TEMP_0_MISO_PIN PI2 // MISO +//#define TEMP_0_MOSI_PIN ... // For MAX31865 -#define MAX6675_SS_PIN THERMO_CS1_PIN -#define MAX6675_SS2_PIN THERMO_CS2_PIN -#define MAX6675_SCK_PIN THERMO_SCK_PIN -#define MAX6675_DO_PIN THERMO_DO_PIN +#define TEMP_1_CS_PIN PH2 // M5 K-TEMP +#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN +#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN +//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // // Heaters / Fans diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index 105d0d6f6070..65db99025c8b 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -104,16 +104,16 @@ // MAX6675 Cold-Junction-Compensated K-Thermocouple to Digital Converter (0°C to +1024°C) // https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf -#define MAX6675_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested -#define MAX6675_DO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested -#define MAX6675_SS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong +#define TEMP_0_CS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong +#define TEMP_0_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested +#define TEMP_0_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested // Expansion board with second max6675 // Warning: Some boards leave the slot unpopulated. -//#define MAX6675_SCK2_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested -//#define MAX6675_DO2_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested -//#define MAX6675_SS2_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested +//#define TEMP_1_CS_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested +//#define TEMP_1_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested +//#define TEMP_1_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested // // Heaters / Fans diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 5a056b97cdfa..9ae2870a4053 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -172,8 +172,8 @@ // // Thermocouples // -//#define MAX6675_SS_PIN HEATER_0_PIN // TC1 - CS1 -//#define MAX6675_SS_PIN HEATER_1_PIN // TC2 - CS2 +//#define TEMP_0_CS_PIN HEATER_0_PIN // TC1 - CS1 +//#define TEMP_0_CS_PIN HEATER_1_PIN // TC2 - CS2 // // Misc. Functions diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 2b0df002d394..0b9512a1cbe5 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -189,8 +189,8 @@ // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // // Misc. Functions diff --git a/ini/features.ini b/ini/features.ini index a1e96884474f..5a1b48804dd5 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -27,9 +27,9 @@ HAS_TMC26X = TMC26XStepper=https://github.com/trinam src_filter=+ HAS_L64XX = Arduino-L6470@0.8.0 src_filter=+ + + + +LIB_INTERNAL_MAX31865 = src_filter=+ NEOPIXEL_LED = adafruit/Adafruit NeoPixel@~1.8.0 src_filter=+ -TEMP_.+_IS_MAX31865 = Adafruit MAX31865 library@~1.1.0 I2C_AMMETER = peterus/INA226Lib@1.1.2 USES_LIQUIDCRYSTAL = fmalpartida/LiquidCrystal@1.5.0 USES_LIQUIDCRYSTAL_I2C = marcoschwartz/LiquidCrystal_I2C@1.1.4 diff --git a/platformio.ini b/platformio.ini index f55f5f5a9355..afdd823f9e6f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -230,6 +230,7 @@ default_src_filter = + - - + - - - - - - + - - - - - From 1093224ba2309d09ca55c4289394d6328a63f043 Mon Sep 17 00:00:00 2001 From: George Fu Date: Wed, 7 Jul 2021 08:40:11 +0800 Subject: [PATCH 019/323] =?UTF-8?q?=F0=9F=94=A8=20FYSETC=20S6=20small=20bo?= =?UTF-8?q?otloader=20target=20(#22207)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/pins/pins.h | 6 ++-- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 4 ++- Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h | 6 ++++ .../PlatformIO/boards/marlin_fysetc_s6.json | 2 +- .../boards/marlin_fysetc_s6_8000.json | 35 +++++++++++++++++++ ini/stm32f4.ini | 19 ++++++++-- 6 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 88dd170a9eff..1f53227553c4 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -610,11 +610,11 @@ #elif MB(VAKE403D) #include "stm32f4/pins_VAKE403D.h" // STM32F4 #elif MB(FYSETC_S6) - #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FYSETC_S6_V2_0) - #include "stm32f4/pins_FYSETC_S6_V2_0.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_S6_V2_0.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FYSETC_SPIDER) - #include "stm32f4/pins_FYSETC_SPIDER.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_SPIDER.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FLYF407ZG) #include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG #elif MB(MKS_ROBIN2) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 7aeab0196a14..504a86d7d08f 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -56,7 +56,9 @@ // // Servos // -#define SERVO0_PIN PA3 +#ifndef SERVO0_PIN + #define SERVO0_PIN PA3 +#endif // // Limit Switches diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h index a33f35bd5503..e90ac552aef1 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h @@ -68,6 +68,12 @@ // #define X_ENABLE_PIN PE9 +// +// Servos +// Z_MAX_PIN only works in input mode +// +#define SERVO0_PIN PA2 + #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE7 #define X_SERIAL_RX_PIN PE7 diff --git a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json index 286e46ffbd20..42a203786d8a 100644 --- a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json +++ b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json @@ -21,7 +21,7 @@ "name": "3D Printer control board", "upload": { "maximum_ram_size": 131072, - "maximum_size": 524288, + "maximum_size": 458752, "protocol": "stlink", "protocols": [ "jlink", diff --git a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json new file mode 100644 index 000000000000..1d808a23d7c3 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json @@ -0,0 +1,35 @@ +{ + "build": { + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F446xx", + "f_cpu": "180000000L", + "mcu": "stm32f446ret6", + "variant": "MARLIN_FYSETC_S6" + }, + "connectivity": [ + "can" + ], + "debug": { + "jlink_device": "STM32F446RE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F446x.svd" + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "3D Printer control board", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 491520, + "protocol": "stlink", + "protocols": [ + "jlink", + "stlink", + "blackmagic", + "serial" + ] + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html", + "vendor": "FYSETC" +} diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index e7695dcc7a27..6067bbc3b82b 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -76,15 +76,28 @@ platform = ${common_stm32.platform} extends = common_stm32 platform_packages = tool-stm32duino board = marlin_fysetc_s6 -build_flags = ${common_stm32.build_flags} - -DVECT_TAB_OFFSET=0x10000 - -DHAL_PCD_MODULE_ENABLED +build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x10000 -DHAL_PCD_MODULE_ENABLED extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py debug_tool = stlink upload_protocol = dfu upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" +# +# FYSETC S6 new bootloader +# +[env:FYSETC_S6_8000] +platform = ${common_stm32.platform} +extends = env:FYSETC_S6 +board = marlin_fysetc_s6_8000 +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 +build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py + buildroot/share/PlatformIO/scripts/stm32_bootloader.py +upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" + # # STM32F407VET6 with RAMPS-like shield # 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407 From 0595b87d9a86a8ef6bdd4189701cdbd9229ce164 Mon Sep 17 00:00:00 2001 From: ldursw <37294448+ldursw@users.noreply.github.com> Date: Tue, 6 Jul 2021 21:50:01 -0300 Subject: [PATCH 020/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Maple=20/=20STM32?= =?UTF-8?q?=20serial=20buffer=20(#22292)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformIO/scripts/fix_framework_weakness.py | 12 ------------ .../share/PlatformIO/scripts/stm32_serialbuffer.py | 7 ++++++- ini/stm32f1-maple.ini | 4 +++- ini/stm32f1.ini | 4 ++-- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/fix_framework_weakness.py b/buildroot/share/PlatformIO/scripts/fix_framework_weakness.py index 29705de442c7..fa91b7bb7041 100644 --- a/buildroot/share/PlatformIO/scripts/fix_framework_weakness.py +++ b/buildroot/share/PlatformIO/scripts/fix_framework_weakness.py @@ -30,15 +30,3 @@ def _touch(path): print("Done patching exception handler") print("Libmaple modified and ready for post mortem debugging") - -mf = env["MARLIN_FEATURES"] -rxBuf = mf["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in mf else "0" -txBuf = mf["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in mf else "0" -if int(rxBuf) < 64: - rxBuf = "64" -if int(txBuf) < 64: - txBuf = "64" - -build_flags = env.get('BUILD_FLAGS') -build_flags.append("-DUSART_RX_BUF_SIZE=" + rxBuf + " -DUSART_TX_BUF_SIZE=" + txBuf) -env.Replace(BUILD_FLAGS=build_flags) diff --git a/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py b/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py index 2be5a202efed..fecce47db307 100644 --- a/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py +++ b/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py @@ -13,11 +13,16 @@ # # The script will set the value as the default one (64 bytes) # or the user-configured one, whichever is higher. +# +# Marlin has 128 and 32 as default values for RX_BUFFER_SIZE and +# TX_BUFFER_SIZE respectively. We use the highest value. mf = env["MARLIN_FEATURES"] -rxBuf = str(max(64, int(mf["RX_BUFFER_SIZE"]) if "RX_BUFFER_SIZE" in mf else 0)) +rxBuf = str(max(128, int(mf["RX_BUFFER_SIZE"]) if "RX_BUFFER_SIZE" in mf else 0)) txBuf = str(max(64, int(mf["TX_BUFFER_SIZE"]) if "TX_BUFFER_SIZE" in mf else 0)) build_flags = env.get('BUILD_FLAGS') build_flags.append("-DSERIAL_RX_BUFFER_SIZE=" + rxBuf) build_flags.append("-DSERIAL_TX_BUFFER_SIZE=" + txBuf) +build_flags.append("-DUSART_RX_BUF_SIZE=" + rxBuf) +build_flags.append("-DUSART_TX_BUF_SIZE=" + txBuf) env.Replace(BUILD_FLAGS=build_flags) diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index 25ebfb64b625..2580c4700c54 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -36,6 +36,7 @@ lib_deps = ${common.lib_deps} platform_packages = tool-stm32duino extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py + pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py # # STM32F103RC @@ -325,7 +326,8 @@ lib_ignore = ${common_stm32f1.lib_ignore} platform = ${common_stm32f1.platform} extends = common_stm32f1 board = marlin_CHITU_F103 -extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py +extra_scripts = ${common_stm32f1.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/common-dependencies.py pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py buildroot/share/PlatformIO/scripts/chitu_crypt.py build_flags = ${common_stm32f1.build_flags} diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 0b394d173058..6c39d0b6fa42 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -150,7 +150,7 @@ board_build.variant = MARLIN_F103Rx board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${common.extra_scripts} +extra_scripts = ${common_stm32.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py pre:buildroot/share/PlatformIO/scripts/random-bin.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py @@ -174,7 +174,7 @@ board_build.variant = MARLIN_F103Rx board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 build_unflags = ${common_stm32.build_unflags} -extra_scripts = ${common.extra_scripts} +extra_scripts = ${common_stm32.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py debug_tool = jlink From 3d333c4e5d5db64725f20382f92c03a81882dc52 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 6 Jul 2021 19:54:02 -0500 Subject: [PATCH 021/323] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Fix=20up=20and=20u?= =?UTF-8?q?se=20YESNO=5FITEM=20macros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_item.h | 18 +++++++++--------- Marlin/src/lcd/menu/menu_main.cpp | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index 0f2bd3cb1f1c..0a4f4bb7d191 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -434,23 +434,23 @@ class MenuItem_bool : public MenuEditItemBase { }while(0) // Indexed items set a global index value -#define _CONFIRM_ITEM_N_P(N, V...) _CONFIRM_ITEM_N_S_P(N, nullptr, V) +#define _CONFIRM_ITEM_N_P(N, V...) _CONFIRM_ITEM_N_S_P(N, nullptr, V) -#define CONFIRM_ITEM_P(PLABEL,A,B,V...) _CONFIRM_ITEM_P(PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) -#define CONFIRM_ITEM(LABEL, V...) CONFIRM_ITEM_P(GET_TEXT(LABEL), ##V) +#define CONFIRM_ITEM_P(PLABEL,A,B,V...) _CONFIRM_ITEM_P(PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) +#define CONFIRM_ITEM(LABEL, V...) CONFIRM_ITEM_P(GET_TEXT(LABEL), ##V) -#define YESNO_ITEM_P(PLABEL, V...) _CONFIRM_ITEM_P(PLABEL, ##V) -#define YESNO_ITEM(LABEL, V...) YESNO_ITEM_P(GET_TEXT(LABEL), ##V) +#define YESNO_ITEM_P(PLABEL, V...) CONFIRM_ITEM_P(PLABEL, MSG_YES, MSG_NO, ##V) +#define YESNO_ITEM(LABEL, V...) YESNO_ITEM_P(GET_TEXT(LABEL), ##V) #define CONFIRM_ITEM_N_S_P(N,S,PLABEL,A,B,V...) _CONFIRM_ITEM_N_S_P(N, S, PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) #define CONFIRM_ITEM_N_S(N,S,LABEL,V...) CONFIRM_ITEM_N_S_P(N, S, GET_TEXT(LABEL), ##V) #define CONFIRM_ITEM_N_P(N,PLABEL,A,B,V...) _CONFIRM_ITEM_N_P(N, PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) #define CONFIRM_ITEM_N(N,LABEL, V...) CONFIRM_ITEM_N_P(N, GET_TEXT(LABEL), ##V) -#define YESNO_ITEM_N_S_P(N,S,PLABEL, V...) _CONFIRM_ITEM_N_S_P(N, S, PLABEL, ##V) -#define YESNO_ITEM_N_S(N,S,LABEL, V...) YESNO_ITEM_N_S_P(N, S, GET_TEXT(LABEL), ##V) -#define YESNO_ITEM_N_P(N,PLABEL, V...) _CONFIRM_ITEM_N_P(N, PLABEL, ##V) -#define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_P(N, GET_TEXT(LABEL), ##V) +#define YESNO_ITEM_N_S_P(N,S,PLABEL, V...) _CONFIRM_ITEM_N_S_P(N, S, PLABEL, MSG_YES, MSG_NO, ##V) +#define YESNO_ITEM_N_S(N,S,LABEL, V...) YESNO_ITEM_N_S_P(N, S, GET_TEXT(LABEL), ##V) +#define YESNO_ITEM_N_P(N,PLABEL, V...) CONFIRM_ITEM_N_P(N, PLABEL, MSG_YES, MSG_NO, ##V) +#define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_P(N, GET_TEXT(LABEL), ##V) #if ENABLED(LEVEL_BED_CORNERS) void _lcd_level_bed_corners(); diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 4e3310f2383f..6f32ef1d60f6 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -364,8 +364,7 @@ void menu_main() { #if ENABLED(ADVANCED_PAUSE_FEATURE) #if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES) - CONFIRM_ITEM(MSG_FILAMENTCHANGE, - MSG_YES, MSG_NO, + YESNO_ITEM(MSG_FILAMENTCHANGE, menu_change_filament, ui.goto_previous_screen, GET_TEXT(MSG_FILAMENTCHANGE), (const char *)nullptr, PSTR("?") ); From bec2c50d2927213b67c379a2aded39ded44ac827 Mon Sep 17 00:00:00 2001 From: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Wed, 7 Jul 2021 03:55:31 +0300 Subject: [PATCH 022/323] =?UTF-8?q?=F0=9F=8C=90=20Update=20Russian=20and?= =?UTF-8?q?=20Ukrainian=20(#22290)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_ru.h | 26 +++++++++------ Marlin/src/lcd/language/language_uk.h | 46 +++++++++++++++------------ 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index 4240ecbec3b2..bf2bb02ba349 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -127,23 +127,28 @@ namespace Language_ru { PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Охлаждение"); PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Частота"); PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Управление лазером"); - PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Переключить лазер"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Управление шпинделем"); - PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Переключить шпиндель"); #if LCD_WIDTH > 21 + PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Управление шпинделем"); + PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Переключить лазер"); + PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Переключ.шпиндель"); PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Мощность шпинделя"); PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Мощность лазера"); PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Тестовый импульс мс"); + PROGMEM Language_Str MSG_LASER_EVAC_TOGGLE = _UxGT("Переключить обдув"); + PROGMEM Language_Str MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Переключить вакуум"); #else + PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Управление шпинд."); + PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Переключ.лазер"); + PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Переключ.шпинд"); PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Мощн.шпинделя"); PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Мощн. лазера"); PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Тест. имп. мс"); + PROGMEM Language_Str MSG_LASER_EVAC_TOGGLE = _UxGT("Переключ. обдув"); + PROGMEM Language_Str MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Переключ. вакуум"); #endif - PROGMEM Language_Str MSG_LASER_EVAC_TOGGLE = _UxGT("Переключить обдув"); PROGMEM Language_Str MSG_LASER_ASSIST_TOGGLE = _UxGT("Управление обдувом"); PROGMEM Language_Str MSG_FLOWMETER_FAULT = _UxGT("Ошибка обдува"); PROGMEM Language_Str MSG_LASER_FIRE_PULSE = _UxGT("Импульс лазера"); - PROGMEM Language_Str MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Переключить вакуум"); PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Шпиндель вперёд"); PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Инверсия шпинделя"); @@ -356,13 +361,14 @@ namespace Language_ru { PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Сопло ожидает"); PROGMEM Language_Str MSG_BED = _UxGT("Стол, ") LCD_STR_DEGREE "C"; PROGMEM Language_Str MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_COOLER = _UxGT("Охлаждение лазера"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Переключить охлаждение"); - PROGMEM Language_Str MSG_FLOWMETER_SAFETY = _UxGT("Безопасность потока"); - #else - PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Переключить охлажд."); + PROGMEM Language_Str MSG_COOLER = _UxGT("Охлаждение лазера"); + PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Переключ. охлажд."); PROGMEM Language_Str MSG_FLOWMETER_SAFETY = _UxGT("Безопасн. потока"); + #else + PROGMEM Language_Str MSG_COOLER = _UxGT("Охлажд. лазера"); + PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Переключ. охл."); + PROGMEM Language_Str MSG_FLOWMETER_SAFETY = _UxGT("Безопас.потока"); #endif PROGMEM Language_Str MSG_LASER = _UxGT("Лазер"); PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Кулер"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 86d0e01fe61b..cee795745cb6 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -34,7 +34,7 @@ namespace Language_uk { using namespace Language_en; // Inherit undefined strings from English constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Ukranian"); + PROGMEM Language_Str LANGUAGE = _UxGT("Ukrainian"); PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Готовий."); PROGMEM Language_Str MSG_YES = _UxGT("ТАК"); @@ -133,23 +133,24 @@ namespace Language_uk { PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Керування шпінделем"); #if LCD_WIDTH > 21 PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Потужність лазера"); - #else - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Потуж.лазера"); - #endif - PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Перемкнути шпіндель"); - PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Перемкнути лазер"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Потуж. шпінделя"); + PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Перемкн. шпіндель"); + PROGMEM Language_Str MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Перемкнути вакуум"); + PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Перемкнути лазер"); + PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Потужн. шпінделя"); PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Тестовий імпульс мс"); + PROGMEM Language_Str MSG_LASER_EVAC_TOGGLE = _UxGT("Перемкнути обдув"); #else - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Потуж. шпінд."); - PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Тест. імп. мс"); + PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Потужн. лазера"); + PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Перемк. шпінд."); + PROGMEM Language_Str MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Перемк. вакуум"); + PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Перемкн. лазер"); + PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Потужн. шпінд."); + PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Тест. імп., мс"); + PROGMEM Language_Str MSG_LASER_EVAC_TOGGLE = _UxGT("Перемкн. обдув"); #endif - PROGMEM Language_Str MSG_LASER_EVAC_TOGGLE = _UxGT("Перемкнути обдув"); PROGMEM Language_Str MSG_LASER_ASSIST_TOGGLE = _UxGT("Керування обдувом"); PROGMEM Language_Str MSG_FLOWMETER_FAULT = _UxGT("Помилка обдуву"); PROGMEM Language_Str MSG_LASER_FIRE_PULSE = _UxGT("Імпульс лазеру"); - PROGMEM Language_Str MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Перемкнути вакуум"); PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Шпіндель вперед"); PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Шпіндель назад"); @@ -361,18 +362,19 @@ namespace Language_uk { PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Сопло очікує"); PROGMEM Language_Str MSG_BED = _UxGT("Стіл, ") LCD_STR_DEGREE "C"; PROGMEM Language_Str MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_COOLER = _UxGT("Охолодження лазеру"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Перемкнути охолодження"); + PROGMEM Language_Str MSG_COOLER = _UxGT("Охолодження лазеру"); + PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Перемк. охолодж."); #else - PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Перемкнути охолодж."); + PROGMEM Language_Str MSG_COOLER = _UxGT("Охолодж. лазеру"); + PROGMEM Language_Str MSG_COOLER_TOGGLE = _UxGT("Перемк.охолод"); #endif PROGMEM Language_Str MSG_FLOWMETER_SAFETY = _UxGT("Безпека потоку"); PROGMEM Language_Str MSG_LASER = _UxGT("Лазер"); PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Швидк. вент."); PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Швидк. вент. ~"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Збереж. швидк. вент. ~"); + PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Збереж.швидк.вент. ~"); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Дод. швидк. вент. ~"); #else PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Збереж. вент. ~"); @@ -391,8 +393,8 @@ namespace Language_uk { PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С макс"); PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Фактор"); PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Автотемпер."); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Увімк"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Вимк."); + PROGMEM Language_Str MSG_LCD_ON = _UxGT("Увім"); + PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Вимк"); PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("Автопідбір PID"); PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("Автопідбір PID *"); @@ -426,8 +428,12 @@ namespace Language_uk { PROGMEM Language_Str MSG_VMAX_K = _UxGT("Швидк.макс ") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("Швидк.макс ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Швидк.макс *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Швидк.мін"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Переміщення мін"); + PROGMEM Language_Str MSG_VMIN = _UxGT("Швидк. мін"); + #if LCD_WIDTH > 21 + PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Переміщення мін"); + #else + PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Переміщ. мін"); + #endif PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Прискорення, мм/с2"); PROGMEM Language_Str MSG_AMAX_A = _UxGT("Приск.макс ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Приск.макс ") LCD_STR_B; From 3c746645ccc9239ee96e220b47de59981ee98e64 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 7 Jul 2021 01:18:25 +0000 Subject: [PATCH 023/323] [cron] Bump distribution date (2021-07-07) --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index b432c821ac61..9c9e2d3ee24f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-06" + #define STRING_DISTRIBUTION_DATE "2021-07-07" #endif /** From e5e939bb4c02212ac8a3a7006737b0b8895c7525 Mon Sep 17 00:00:00 2001 From: Marcio T Date: Tue, 6 Jul 2021 19:32:08 -0600 Subject: [PATCH 024/323] =?UTF-8?q?=F0=9F=93=BA=20Assorted=20small=20FTDI?= =?UTF-8?q?=20Eve=20Touch=20UI=20fixes=20(#22273)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archim2-flash/media_file_reader.h | 4 +- .../ftdi_eve_touch_ui/cocoa_press/screens.h | 1 - .../cocoa_press/status_screen.cpp | 10 ++ .../cocoa_press/status_screen.h | 2 + .../ftdi_eve_lib/extended/poly_ui.h | 6 +- .../ftdi_eve_lib/scripts/file2cpp.py | 47 ++++++++ .../ftdi_eve_lib/scripts/font2cpp.py | 108 +++++++++++++++++ .../ftdi_eve_lib/scripts/img2cpp.py | 113 ++++++++++++++++++ .../generic/bed_mesh_edit_screen.cpp | 16 +-- .../generic/bed_mesh_view_screen.cpp | 3 +- .../ftdi_eve_touch_ui/generic/boot_screen.cpp | 6 +- .../confirm_user_request_alert_box.cpp | 15 ++- .../generic/leveling_menu.cpp | 35 +++--- .../ftdi_eve_touch_ui/generic/tune_menu.cpp | 11 +- .../generic/z_offset_screen.cpp | 2 +- .../ftdi_eve_touch_ui/language/language_en.h | 4 +- .../src/lcd/extui/ftdi_eve_touch_ui/screens.h | 2 +- .../extui/ftdi_eve_touch_ui/theme/bitmaps.h | 66 ++++++++-- Marlin/src/lcd/extui/ui_api.h | 6 +- 19 files changed, 396 insertions(+), 61 deletions(-) create mode 100755 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py create mode 100755 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py create mode 100755 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h index 249c57b9c658..eb76bb9b2b2c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h @@ -32,9 +32,7 @@ class MediaFileReader { private: #if ENABLED(SDSUPPORT) - DiskIODriver_SPI_SD card; - SdVolume volume; - SdFile root, file; + SdFile root, file; #endif public: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h index 3a47d6bee483..87d31da6f63b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h @@ -118,7 +118,6 @@ enum { #include "../generic/files_screen.h" #include "../generic/move_axis_screen.h" #include "../generic/flow_percent_screen.h" -#include "../generic/tune_menu.h" #if HAS_JUNCTION_DEVIATION #include "../generic/junction_deviation_screen.h" #else diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp index 38fdc2bb26f0..467d3b9119de 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp @@ -294,4 +294,14 @@ void StatusScreen::onIdle() { } } +void StatusScreen::onMediaInserted() { + if (AT_SCREEN(StatusScreen)) + setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED)); +} + +void StatusScreen::onMediaRemoved() { + if (AT_SCREEN(StatusScreen) || ExtUI::isPrintingFromMedia()) + setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED)); +} + #endif // COCOA_STATUS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h index 1cddfa0896f1..75b4333351c6 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h @@ -52,4 +52,6 @@ class StatusScreen : public BaseScreen, public CachedScreen static bool onTouchHeld(uint8_t tag); static bool onTouchEnd(uint8_t tag); static void onIdle(); + static void onMediaInserted(); + static void onMediaRemoved(); }; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h index ba41650f2f84..2e74ec3a4776 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h @@ -239,9 +239,11 @@ class DeduplicatedPolyReader : public POLY_READER { */ template> class GenericPolyUI { - private: + protected: CommandProcessor &cmd; + draw_mode_t mode; + private: // Attributes used to paint buttons uint32_t btn_fill_color = 0x000000; @@ -250,8 +252,6 @@ class GenericPolyUI { uint32_t btn_stroke_color = 0x000000; uint8_t btn_stroke_width = 28; - draw_mode_t mode; - public: enum ButtonStyle : uint8_t { FILL = 1, diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py new file mode 100755 index 000000000000..25919c3c4dd6 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py @@ -0,0 +1,47 @@ +#!/usr/bin/python + +# Written By Marcio Teixeira 2021 - SynDaver Labs, Inc. +# +# 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: . + +from __future__ import print_function +import argparse +import textwrap +import os +import zlib + +def deflate(data): + return zlib.compress(data) + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Converts a file into a packed C array for use as data') + parser.add_argument("input") + parser.add_argument("-d", "--deflate", action="store_true", help="Packs the data using the deflate algorithm") + args = parser.parse_args() + + varname = os.path.splitext(os.path.basename(args.input))[0]; + + with open(args.input, "rb") as in_file: + data = in_file.read() + if args.deflate: + data = deflate(data) + data = bytearray(data) + data = list(map(lambda a: "0x" + format(a, '02x'), data)) + nElements = len(data) + data = ', '.join(data) + data = textwrap.fill(data, 75, initial_indent = ' ', subsequent_indent = ' ') + + print("const unsigned char " + varname + "[" + format(nElements) + "] PROGMEM = {") + print(data) + print("};") diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py new file mode 100755 index 000000000000..0c4499e9aadf --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py @@ -0,0 +1,108 @@ +#!/usr/bin/python + +# Written By Marcio Teixeira 2019 - Aleph Objects, Inc. +# +# 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: . + +from __future__ import print_function +from PIL import Image +import argparse +import textwrap + +def pack_rle(data): + """Use run-length encoding to pack the bytes""" + rle = [] + value = data[0] + count = 0 + for i in data: + if i != value or count == 255: + rle.append(count) + rle.append(value) + value = i + count = 1 + else: + count += 1 + rle.append(count) + rle.append(value) + return rle + +class WriteSource: + def __init__(self, lines_in_blocks): + self.blocks = [] + self.values = [] + self.block_size = lines_in_blocks + self.rows = 0 + + def add_pixel(self, value): + self.values.append(value) + + def convert_to_4bpp(self, data, chunk_size = 0): + # Invert the image + data = list(map(lambda i: 255 - i, data)) + # Quanitize 8-bit values into 4-bits + data = list(map(lambda i: i >> 4, data)) + # Make sure there is an even number of elements + if (len(data) & 1) == 1: + data.append(0) + # Combine each two adjacent values into one + i = iter(data) + data = list(map(lambda a, b: a << 4 | b, i ,i)) + # Pack the data + data = pack_rle(data) + # Convert values into hex strings + return list(map(lambda a: "0x" + format(a, '02x'), data)) + + def end_row(self, y): + # Pad each row into even number of values + if len(self.values) & 1: + self.values.append(0) + + self.rows += 1 + if self.block_size and (self.rows % self.block_size) == 0: + self.blocks.append(self.values) + self.values = [] + + def write(self): + if len(self.values): + self.blocks.append(self.values) + + block_strs = []; + for b in self.blocks: + data = self.convert_to_4bpp(b) + data = ', '.join(data) + data = textwrap.fill(data, 75, initial_indent = ' ', subsequent_indent = ' ') + block_strs.append(data) + + print("const unsigned char font[] PROGMEM = {") + for i, b in enumerate(block_strs): + if i: + print(',') + print('\n /* {} */'.format(i)) + print(b, end='') + print("\n};") + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Converts a grayscale bitmap into a 16-level RLE packed C array for use as font data') + parser.add_argument("input") + parser.add_argument('--char_height', help='Adds a separator every so many lines', type=int) + args = parser.parse_args() + + writer = WriteSource(args.char_height) + + img = Image.open(args.input).convert('L') + for y in range(img.height): + for x in range(img.width): + writer.add_pixel(img.getpixel((x,y))) + writer.end_row(y) + writer.write() diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py new file mode 100755 index 000000000000..5908f5bf1772 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py @@ -0,0 +1,113 @@ +#!/usr/bin/python + +# Written By Marcio Teixeira 2021 - SynDaver Labs, Inc. +# +# 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: . + +from __future__ import print_function +from PIL import Image +import argparse +import textwrap +import os +import sys +import zlib + +class WriteSource: + def __init__(self, mode): + self.values = [] + self.mode = mode + self.offset = 8 + self.byte = 0 + + def finish_byte(self): + if self.offset != 8: + self.values.append(self.byte) + self.offset = 8 + self.byte = 0 + + def add_bits_to_byte(self, value, size = 1): + self.offset -= size + self.byte = self.byte | value << self.offset + if self.offset == 0: + self.finish_byte() + + def append_rgb565(self, color): + value = ((color[0] & 0xF8) << 8) + ((color[1] & 0xFC) << 3) + ((color[2] & 0xF8) >> 3) + self.values.append((value & 0x00FF) >> 0); + self.values.append((value & 0xFF00) >> 8); + + def append_rgb332(self, color): + value = (color[0] & 0xE0) + ((color[1] & 0xE0) >> 3) + ((color[2] & 0xC0) >> 6) + self.values.append(value); + + def append_grayscale(self, color, bits): + luminance = int(0.2126 * color[0] + 0.7152 * color[1] + 0.0722 * color[2]) + self.add_bits_to_byte(luminance >> (8 - bits), bits) + + def deflate(self, data): + return zlib.compress(data) + + def add_pixel(self, color): + if self.mode == "l1": + self.append_grayscale(color, 1) + elif self.mode == "l2": + self.append_grayscale(color, 2) + elif self.mode == "l4": + self.append_grayscale(color, 4) + elif self.mode == "l8": + self.append_grayscale(color, 8) + elif self.mode == "rgb565": + self.append_rgb565(color) + elif self.mode == "rgb332": + self.append_rgb332(color) + + def end_row(self, y): + if self.mode in ["l1", "l2", "l3"]: + self.finish_byte() + + def write(self, varname, deflate): + print("Length of uncompressed data: ", len(self.values), file=sys.stderr) + data = bytes(bytearray(self.values)) + if deflate: + data = self.deflate(data) + print("Length of data after compression: ", len(data), file=sys.stderr) + data = bytearray(data) + data = list(map(lambda a: "0x" + format(a, '02x'), data)) + nElements = len(data) + data = ', '.join(data) + data = textwrap.fill(data, 75, initial_indent = ' ', subsequent_indent = ' ') + + print("const unsigned char " + varname + "[" + format(nElements) + "] PROGMEM = {") + print(data) + print("};") + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Converts a bitmap into a C array') + parser.add_argument("input") + parser.add_argument("-d", "--deflate", action="store_true", help="Packs the data using the deflate algorithm") + parser.add_argument("-m", "--mode", default="l1", help="Mode, can be l1, l2, l4, l8, rgb332 or rgb565") + args = parser.parse_args() + + varname = os.path.splitext(os.path.basename(args.input))[0]; + + writer = WriteSource(args.mode) + + img = Image.open(args.input) + print("Image height: ", img.height, file=sys.stderr) + print("Image width: ", img.width, file=sys.stderr) + for y in range(img.height): + for x in range(img.width): + writer.add_pixel(img.getpixel((x,y))) + writer.end_row(y) + writer.write(varname, args.deflate) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp index e06fb5277349..3dfcd429a5b9 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp @@ -190,17 +190,11 @@ bool BedMeshEditScreen::onTouchEnd(uint8_t tag) { } void BedMeshEditScreen::show() { - // On entry, home if needed and save current mesh - if (!ExtUI::isMachineHomed()) { - SpinnerDialogBox::enqueueAndWait_P(F("G28\nG29 S1")); - // After the spinner, go to this screen. - current_screen.forget(); - PUSH_SCREEN(BedMeshEditScreen); - } - else { - injectCommands_P(PSTR("G29 S1")); - GOTO_SCREEN(BedMeshEditScreen); - } + // On entry, always home (to account for possible Z offset changes) and save current mesh + SpinnerDialogBox::enqueueAndWait_P(F("G28\nG29 S1")); + // After the spinner, go to this screen. + current_screen.forget(); + PUSH_SCREEN(BedMeshEditScreen); } #endif // FTDI_BED_MESH_EDIT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp index 75b15828a20e..552cd831ea17 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp @@ -132,7 +132,6 @@ void BedMeshViewScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI mydata.count = GRID_MAX_POINTS; break; case ExtUI::G26_START: - GOTO_SCREEN(BedMeshViewScreen); mydata.message = nullptr; mydata.count = 0; break; @@ -161,7 +160,7 @@ void BedMeshViewScreen::doProbe() { void BedMeshViewScreen::doMeshValidation() { mydata.count = 0; GOTO_SCREEN(StatusScreen); - injectCommands_P(PSTR("M75\nG28 O\nM117 Heating...\nG26 R X0 Y0\nG27\nM77")); + injectCommands_P(PSTR("G28\nM117 Heating...\nG26 R X0 Y0\nG27")); } void BedMeshViewScreen::show() { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp index d2a22692958b..c0940bed5ce4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp @@ -83,8 +83,10 @@ void BootScreen::onIdle() { if (UIData::animations_enabled()) { // If there is a startup video in the flash SPI, play // that, otherwise show a static splash screen. - if (!MediaPlayerScreen::playBootMedia()) - showSplashScreen(); + #ifdef FTDI_MEDIA_PLAYER_SCREEN + if (!MediaPlayerScreen::playBootMedia()) + #endif + showSplashScreen(); } #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp index 4aabbaab5978..c10d37274389 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp @@ -35,12 +35,15 @@ void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) { bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) { switch (tag) { case 1: - if (ExtUI::isPrintingPaused()) { - // The TuneMenu will call ExtUI::setUserConfirmed() - GOTO_SCREEN(TuneMenu); - current_screen.forget(); - } - else { + #ifdef FTDI_TUNE_MENU + if (ExtUI::isPrintingPaused()) { + // The TuneMenu will call ExtUI::setUserConfirmed() + GOTO_SCREEN(TuneMenu); + current_screen.forget(); + } + else + #endif + { ExtUI::setUserConfirmed(); GOTO_PREVIOUS(); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index 826e01a9cfba..797bb3799690 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -83,6 +83,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { .font(font_medium).colors(normal_btn) .enabled(EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)) .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_LEVEL_X_AXIS)) + .enabled(ENABLED(HAS_BED_PROBE)) .tag(3).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) .enabled(ENABLED(HAS_MESH)) .tag(4).button(SHOW_MESH_POS, GET_TEXT_F(MSG_SHOW_MESH)) @@ -101,30 +102,32 @@ void LevelingMenu::onRedraw(draw_mode_t what) { bool LevelingMenu::onTouchEnd(uint8_t tag) { switch (tag) { - case 1: GOTO_PREVIOUS(); break; + case 1: GOTO_PREVIOUS(); break; #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) - case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break; + case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break; #endif - case 3: - #ifndef BED_LEVELING_COMMANDS - #define BED_LEVELING_COMMANDS "G29" + #if ENABLED(HAS_BED_PROBE) + case 3: + #ifndef BED_LEVELING_COMMANDS + #define BED_LEVELING_COMMANDS "G29" + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + BedMeshViewScreen::doProbe(); + #else + SpinnerDialogBox::enqueueAndWait_P(F(BED_LEVELING_COMMANDS)); + #endif + break; #endif #if ENABLED(AUTO_BED_LEVELING_UBL) - BedMeshViewScreen::doProbe(); - #else - SpinnerDialogBox::enqueueAndWait_P(F(BED_LEVELING_COMMANDS)); - #endif - break; - #if ENABLED(AUTO_BED_LEVELING_UBL) - case 4: BedMeshViewScreen::show(); break; - case 5: BedMeshEditScreen::show(); break; + case 4: BedMeshViewScreen::show(); break; + case 5: BedMeshEditScreen::show(); break; #endif #if ENABLED(G26_MESH_VALIDATION) - case 6: BedMeshViewScreen::doMeshValidation(); break; + case 6: BedMeshViewScreen::doMeshValidation(); break; #endif #if ENABLED(BLTOUCH) - case 7: injectCommands_P(PSTR("M280 P0 S60")); break; - case 8: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; + case 7: injectCommands_P(PSTR("M280 P0 S60")); break; + case 8: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; #endif default: return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp index b4afae9f17d4..a5e2460631e1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp @@ -77,8 +77,11 @@ void TuneMenu::onRedraw(draw_mode_t what) { .tag(3).button(FIL_CHANGE_POS, GET_TEXT_F(MSG_FILAMENTCHANGE)) .enabled(EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)) .tag(9).button(FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT)) - .enabled(BOTH(HAS_LEVELING, HAS_BED_PROBE) || ENABLED(BABYSTEPPING)) - .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(TERN(BABYSTEPPING, MSG_NUDGE_NOZZLE, MSG_ZPROBE_ZOFFSET))) + #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND + .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_NUDGE_NOZZLE)) + #elif BOTH(HAS_LEVELING, HAS_BED_PROBE) + .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) + #endif .tag(5).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED)) .enabled(sdOrHostPrinting) .tag(sdOrHostPaused ? 7 : 6) @@ -99,11 +102,11 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { using namespace Theme; using namespace ExtUI; switch (tag) { - case 1: GOTO_PREVIOUS(); break; + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: GOTO_SCREEN(TemperatureScreen); break; case 3: GOTO_SCREEN(ChangeFilamentScreen); break; case 4: - #if ENABLED(BABYSTEPPING) + #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND GOTO_SCREEN(NudgeNozzleScreen); #elif BOTH(HAS_LEVELING, HAS_BED_PROBE) GOTO_SCREEN(ZOffsetScreen); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp index 073665e586c4..2a75596a034c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp @@ -53,7 +53,7 @@ void ZOffsetScreen::onRedraw(draw_mode_t what) { w.heading( GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm()); w.increments(); - w.button(2, GET_TEXT_F(MSG_PROBE_WIZARD), !isPrinting()); + w.button(2, GET_TEXT_F(MSG_PROBE_WIZARD), !isPrinting() && !wizardRunning()); } void ZOffsetScreen::move(float mm, int16_t steps) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h index 4ac44501d5ba..0d883d8d02c0 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h @@ -130,7 +130,7 @@ namespace Language_en { PROGMEM Language_Str MSG_EEPROM_RESTORED = u8"Settings restored from backup"; PROGMEM Language_Str MSG_EEPROM_RESET = u8"Settings restored to default"; PROGMEM Language_Str MSG_EEPROM_SAVED = u8"Settings saved!"; - PROGMEM Language_Str MSG_EEPROM_SAVE_PROMPT = u8"Do you wish to save these settings for next power-on?"; + PROGMEM Language_Str MSG_EEPROM_SAVE_PROMPT = u8"Settings applied. Save these settings for next power-on?"; PROGMEM Language_Str MSG_EEPROM_RESET_WARNING = u8"Are you sure? Customizations will be lost."; PROGMEM Language_Str MSG_PASSCODE_REJECTED = u8"Wrong passcode!"; @@ -146,7 +146,7 @@ namespace Language_en { PROGMEM Language_Str MSG_AXIS_LEVELING = u8"Axis Leveling"; PROGMEM Language_Str MSG_PROBE_BED = u8"Probe Mesh"; PROGMEM Language_Str MSG_SHOW_MESH = u8"View Mesh"; - PROGMEM Language_Str MSG_PRINT_TEST = u8"Print Test"; + PROGMEM Language_Str MSG_PRINT_TEST = u8"Print Test (PLA)"; PROGMEM Language_Str MSG_MOVE_Z_TO_TOP = u8"Raise Z to Top"; #if ENABLED(TOUCH_UI_LULZBOT_BIO) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h index 4fe4cb938adf..fb3e909d2f24 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h @@ -40,7 +40,7 @@ extern tiny_timer_t refresh_timer; #if ENABLED(TOUCH_UI_LULZBOT_BIO) #include "bioprinter/screens.h" #elif ENABLED(TOUCH_UI_COCOA_PRESS) - #include "cocoapress/screens.h" + #include "cocoa_press/screens.h" #elif ENABLED(TOUCH_UI_SYNDAVER_LEVEL) #include "syndaver_level/screens.h" #else diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h index 8c0366ebebad..f7cb63125f4b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h @@ -36,7 +36,7 @@ namespace Theme { .height = 23, }; - constexpr PROGMEM unsigned char Extruder_Icon[] = { + constexpr PROGMEM unsigned char Extruder_Icon[69] = { 0x3F, 0xFF, 0xFC, 0x7F, 0xFF, 0xFE, 0xC0, 0x00, 0x03, @@ -68,12 +68,12 @@ namespace Theme { .filter = BILINEAR, .wrapx = BORDER, .wrapy = BORDER, - .RAMG_offset = 8100, + .RAMG_offset = 8069, .width = 32, .height = 23, }; - constexpr PROGMEM unsigned char Bed_Heat_Icon[] = { + constexpr PROGMEM unsigned char Bed_Heat_Icon[92] = { 0x01, 0x81, 0x81, 0x80, 0x01, 0x81, 0x81, 0x80, 0x00, 0xC0, 0xC0, 0xC0, @@ -105,12 +105,12 @@ namespace Theme { .filter = BILINEAR, .wrapx = BORDER, .wrapy = BORDER, - .RAMG_offset = 8300, + .RAMG_offset = 8161, .width = 32, .height = 32, }; - constexpr PROGMEM unsigned char Fan_Icon[] = { + constexpr PROGMEM unsigned char Fan_Icon[128] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x1F, @@ -151,12 +151,12 @@ namespace Theme { .filter = BILINEAR, .wrapx = BORDER, .wrapy = BORDER, - .RAMG_offset = 9000, + .RAMG_offset = 8289, .width = 50, .height = 20, }; - constexpr PROGMEM unsigned char TD_Icon[] = { + constexpr PROGMEM unsigned char TD_Icon[140] = { 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, // Thumb Drive Widget 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80, @@ -179,5 +179,55 @@ namespace Theme { 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00 }; - constexpr PROGMEM uint32_t UTF8_FONT_OFFSET = 10000; + constexpr PROGMEM bitmap_info_t File_Icon_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8429, + .width = 25, + .height = 32, + }; + + const unsigned char File_Icon[128] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, + 0x40, 0x02, 0x80, 0x00, 0x40, 0x02, 0x40, 0x00, 0x40, 0x02, 0x20, 0x00, + 0x40, 0x02, 0x10, 0x00, 0x40, 0x02, 0x08, 0x00, 0x40, 0x02, 0x04, 0x00, + 0x40, 0x02, 0x02, 0x00, 0x40, 0x03, 0xFF, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x7F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + constexpr PROGMEM bitmap_info_t Clock_Icon_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8557, + .width = 32, + .height = 32, + }; + + const unsigned char Clock_Icon[128] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x7E, 0x7E, 0x00, + 0x00, 0xE0, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x07, 0x01, 0x00, 0xE0, + 0x0C, 0x01, 0x80, 0x70, 0x0C, 0x01, 0x80, 0x30, 0x18, 0x01, 0x80, 0x18, + 0x30, 0x01, 0x80, 0x08, 0x30, 0x01, 0x80, 0x0C, 0x20, 0x01, 0x80, 0x0C, + 0x60, 0x01, 0x80, 0x04, 0x60, 0x01, 0x80, 0x06, 0x60, 0x01, 0x80, 0x06, + 0x60, 0x01, 0xFF, 0x06, 0x60, 0x01, 0xFF, 0x06, 0x60, 0x00, 0x00, 0x06, + 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x0C, + 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, 0x18, + 0x0C, 0x00, 0x00, 0x30, 0x0E, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0xE0, + 0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x7F, 0xFE, 0x00, + 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + constexpr PROGMEM uint32_t UTF8_FONT_OFFSET = 10000; }; // namespace Theme diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 8d8b0e59e415..5efd74b8dff4 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -190,7 +190,11 @@ namespace ExtUI { void setHostResponse(const uint8_t); #endif - inline void simulateUserClick() { ui.lcd_clicked = true; } + inline void simulateUserClick() { + #if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) + ui.lcd_clicked = true; + #endif + } #if ENABLED(PRINTCOUNTER) char* getFailedPrints_str(char buffer[21]); From 82193b092367f23069129a42c37e9c46654ff4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20B=C5=82a=C5=BCewicz?= Date: Wed, 7 Jul 2021 04:10:40 +0200 Subject: [PATCH 025/323] =?UTF-8?q?=E2=9C=A8=20DWIN=20LCD=20for=20BTT=20SK?= =?UTF-8?q?R=20Mini=20E3=20(#22288)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 6 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 78 ++++++++++++------- 3 files changed, 56 insertions(+), 30 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 833fe0d2277e..a9ad5018e89c 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1078,7 +1078,11 @@ #if ENABLED(DWIN_CREALITY_LCD) #define SERIAL_CATCHALL 0 #ifndef LCD_SERIAL_PORT - #define LCD_SERIAL_PORT 3 // Creality 4.x board + #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO) + #define LCD_SERIAL_PORT 1 + #else + #define LCD_SERIAL_PORT 3 // Creality 4.x board + #endif #endif #endif diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 4719dd81115b..970a402b3059 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -202,7 +202,7 @@ #define EXP1_10_PIN P2_08 #if ENABLED(DWIN_CREALITY_LCD) - #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16, and LCD_SERIAL_PORT 1. Comment out this line to continue." + #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue." #define BEEPER_PIN EXP1_10_PIN #define BTN_EN1 EXP1_03_PIN diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 5850f11ef030..8f305542a981 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -117,14 +117,14 @@ /** * SKR Mini E3 V1.0, V1.2 SKR Mini E3 V2.0 - * _____ _____ - * 5V | 1 2 | GND 5V | 1 2 | GND - * (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS) (LCD_EN) PB15 | 3 4 | PB8 (LCD_RS) - * (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) - * RESET | 7 8 | PA9 (BTN_EN1) RESET | 7 8 | PA9 (BTN_EN1) - * (BTN_ENC) PB6 | 9 10| PB5 (BEEPER) (BTN_ENC) PA15 | 9 10| PB5 (BEEPER) - * ----- ----- - * EXP1 EXP1 + * ______ ______ + * 5V | 1 2 | GND 5V | 1 2 | GND + * (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS) (LCD_EN) PB15 | 3 4 | PB8 (LCD_RS) + * (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) + * RESET | 7 8 | PA9 (BTN_EN1) RESET | 7 8 | PA9 (BTN_EN1) + * (BTN_ENC) PB6 | 9 10 | PB5 (BEEPER) (BTN_ENC) PA15 | 9 10 | PB5 (BEEPER) + * ------ ------ + * EXP1 EXP1 */ #ifdef SKR_MINI_E3_V2 #define EXP1_9 PA15 @@ -134,7 +134,28 @@ #define EXP1_3 PB7 #endif -#if HAS_WIRED_LCD +#if ENABLED(DWIN_CREALITY_LCD) + /** + * ------ ------ ------ + * VCC | 1 2 | GND VCC | 1 2 | GND GND | 2 1 | VCC + * A | 3 4 | B A | 3 4 | B B | 4 3 | A + * | 5 6 TX BEEP | 5 6 ENT ENT | 6 5 | BEEP + * | 7 8 | RX TX | 7 8 | RX RX | 8 7 | TX + * BEEP | 9 10 | ENT | 9 10 | | 10 9 | + * ------ ------ ------ + * EXP1 DWIN DWIN (plug) + * + * All pins are labeled as printed on DWIN PCB. Connect TX-TX, A-A and so on. + */ + + #error "DWIN_CREALITY_LCD requires a custom cable, see diagram above this line. Comment out this line to continue." + + #define BEEPER_PIN EXP1_9 + #define BTN_EN1 EXP1_3 + #define BTN_EN2 PB8 + #define BTN_ENC PB5 + +#elif HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY) @@ -184,19 +205,19 @@ * TFTGLCD_PANEL_SPI display pinout * * Board Display - * _____ _____ - * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) - * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) LCD_CS | 3 4 | SD_CS (PA10) - * (FREE) PB9 | 5 6 | PA10 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI) - * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | (FREE) - * (BEEPER) PB6 | 9 10| PB5 (SD_DET) GND | 9 10| 5V - * ----- ----- - * EXP1 EXP1 + * ______ ______ + * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) + * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) LCD_CS | 3 4 | SD_CS (PA10) + * (FREE) PB9 | 5 6 | PA10 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI) + * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | (FREE) + * (BEEPER) PB6 | 9 10 | PB5 (SD_DET) GND | 9 10 | 5V + * ------ ------ + * EXP1 EXP1 * * Needs custom cable: * - * Board Adapter Display - * _________ + * Board Display + * * EXP1-1 ----------- EXP1-10 * EXP1-2 ----------- EXP1-9 * SPI1-4 ----------- EXP1-6 @@ -223,17 +244,18 @@ #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. Comment out this line to continue." - /** FYSETC TFT TFT81050 display pinout + /** + * FYSETC TFT TFT81050 display pinout * * Board Display - * _____ _____ - * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) - * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10) - * (FREE) PB9 | 5 6 | PA10 (SD_CS) (PB8) LCD_CS | 5 6 | MOSI (SPI1-MOSI) - * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | RESET - * (BEEPER) PB6 | 9 10| PB5 (SD_DET) GND | 9 10| 5V - * ----- ----- - * EXP1 EXP1 + * ______ ______ + * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) + * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10) + * (FREE) PB9 | 5 6 | PA10 (SD_CS) (PB8) LCD_CS | 5 6 | MOSI (SPI1-MOSI) + * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | RESET + * (BEEPER) PB6 | 9 10 | PB5 (SD_DET) GND | 9 10 | 5V + * ------ ------ + * EXP1 EXP1 * * Needs custom cable: * From 094caadf9471a51a877bcc61f40081266fdc19d3 Mon Sep 17 00:00:00 2001 From: Mihai Date: Wed, 7 Jul 2021 07:10:35 +0300 Subject: [PATCH 026/323] =?UTF-8?q?=E2=9C=A8=20Enable=20'M20=20L'=20with?= =?UTF-8?q?=20LONG=5FFILENAME=5FHOST=5FSUPPORT=20(#22271)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/sd/M20.cpp | 2 +- Marlin/src/sd/cardreader.cpp | 92 +++++++++++++++++++++++------------- Marlin/src/sd/cardreader.h | 9 +++- 3 files changed, 68 insertions(+), 35 deletions(-) diff --git a/Marlin/src/gcode/sd/M20.cpp b/Marlin/src/gcode/sd/M20.cpp index 7ac4affdae9c..573183833854 100644 --- a/Marlin/src/gcode/sd/M20.cpp +++ b/Marlin/src/gcode/sd/M20.cpp @@ -33,7 +33,7 @@ void GcodeSuite::M20() { if (card.flag.mounted) { SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST); - card.ls(); + card.ls(TERN_(LONG_FILENAME_HOST_SUPPORT, parser.boolval('L'))); SERIAL_ECHOLNPGM(STR_END_FILE_LIST); } else diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 19b2f04bfda8..bcb0317990b4 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -258,54 +258,82 @@ void CardReader::selectByName(SdFile dir, const char * const match) { } } -// -// Recursive method to print all files within a folder in flat -// DOS 8.3 format. This style of listing is the most compatible -// with legacy hosts. -// -// This method recurses to unlimited depth and lists every -// G-code file within the given parent. If the hierarchy is -// very deep this can blow up the stack, so a 'depth' parameter -// (as with printListingJSON) would be a good addition. -// -void CardReader::printListing(SdFile parent, const char * const prepend/*=nullptr*/) { +/** + * Recursive method to print all files within a folder in flat + * DOS 8.3 format. This style of listing is the most compatible + * with legacy hosts. + * + * This method recurses to unlimited depth and lists all G-code + * files within the given parent. If the hierarchy is very deep + * this can blow up the stack, so a 'depth' parameter would be a + * good addition. + */ +void CardReader::printListing( + SdFile parent + OPTARG(LONG_FILENAME_HOST_SUPPORT, const bool includeLongNames/*=false*/) + , const char * const prepend/*=nullptr*/ + OPTARG(LONG_FILENAME_HOST_SUPPORT, const char * const prependLong/*=nullptr*/) +) { dir_t p; while (parent.readDir(&p, longFilename) > 0) { if (DIR_IS_SUBDIR(&p)) { - // Get the short name for the item, which we know is a folder - char dosFilename[FILENAME_LENGTH]; + size_t lenPrepend = prepend ? strlen(prepend) + 1 : 0; + // Allocate enough stack space for the full path including / separator + char path[lenPrepend + FILENAME_LENGTH]; + if (prepend) { + strcpy(path, prepend); + path[lenPrepend - 1] = '/'; + } + char* dosFilename = path + lenPrepend; createFilename(dosFilename, p); - // Allocate enough stack space for the full path to a folder, trailing slash, and nul - const bool prepend_is_empty = (!prepend || prepend[0] == '\0'); - const int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(dosFilename) + 1 + 1; - char path[len]; - - // Append the FOLDERNAME12/ to the passed string. - // It contains the full path to the "parent" argument. - // We now have the full path to the item in this folder. - strcpy(path, prepend_is_empty ? "/" : prepend); // root slash if prepend is empty - strcat(path, dosFilename); // FILENAME_LENGTH characters maximum - strcat(path, "/"); // 1 character - - // Serial.print(path); - // Get a new directory object using the full path // and dive recursively into it. SdFile child; // child.close() in destructor if (child.open(&parent, dosFilename, O_READ)) - printListing(child, path); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + if (includeLongNames) { + size_t lenPrependLong = prependLong ? strlen(prependLong) + 1 : 0; + // Allocate enough stack space for the full long path including / separator + char pathLong[lenPrependLong + strlen(longFilename) + 1]; + if (prependLong) { + strcpy(pathLong, prependLong); + pathLong[lenPrependLong - 1] = '/'; + } + strcpy(pathLong + lenPrependLong, longFilename); + printListing(child, /*includeLongNames=*/true, path, pathLong); + } + else + #endif + printListing(child, path); else { SERIAL_ECHO_MSG(STR_SD_CANT_OPEN_SUBDIR, dosFilename); return; } } else if (is_dir_or_gcode(p)) { - if (prepend) SERIAL_ECHO(prepend); + if (prepend) { + SERIAL_ECHO(prepend); + SERIAL_CHAR('/'); + } SERIAL_ECHO(createFilename(filename, p)); SERIAL_CHAR(' '); - SERIAL_ECHOLN(p.fileSize); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + if (!includeLongNames) + #endif + SERIAL_ECHOLN(p.fileSize); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + else { + SERIAL_ECHO(p.fileSize); + SERIAL_CHAR(' '); + if (prependLong) { + SERIAL_ECHO(prependLong); + SERIAL_CHAR('/'); + } + SERIAL_ECHOLN(longFilename[0] ? longFilename : "???"); + } + #endif } } } @@ -313,10 +341,10 @@ void CardReader::printListing(SdFile parent, const char * const prepend/*=nullpt // // List all files on the SD card // -void CardReader::ls() { +void CardReader::ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames/*=false*/)) { if (flag.mounted) { root.rewind(); - printListing(root); + printListing(root OPTARG(LONG_FILENAME_HOST_SUPPORT, includeLongNames)); } } diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 943cdae7418f..66cb97baeb9e 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -199,7 +199,7 @@ class CardReader { FORCE_INLINE static void getfilename_sorted(const uint16_t nr) { selectFileByIndex(nr); } #endif - static void ls(); + static void ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames=false)); #if ENABLED(POWER_LOSS_RECOVERY) static bool jobRecoverFileExists(); @@ -330,7 +330,12 @@ class CardReader { static int countItems(SdFile dir); static void selectByIndex(SdFile dir, const uint8_t index); static void selectByName(SdFile dir, const char * const match); - static void printListing(SdFile parent, const char * const prepend=nullptr); + static void printListing( + SdFile parent + OPTARG(LONG_FILENAME_HOST_SUPPORT, const bool includeLongNames=false) + , const char * const prepend=nullptr + OPTARG(LONG_FILENAME_HOST_SUPPORT, const char * const prependLong=nullptr) + ); #if ENABLED(SDCARD_SORT_ALPHA) static void flush_presort(); From 9642a3689544716610ed78ace36548505460d82f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 8 Jul 2021 00:56:59 +0000 Subject: [PATCH 027/323] [cron] Bump distribution date (2021-07-08) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index eb2f9f9a14d4..e63dd350c7ce 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2019-07-10" +//#define STRING_DISTRIBUTION_DATE "2021-07-08" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 9c9e2d3ee24f..cc1653a5b16d 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-07" + #define STRING_DISTRIBUTION_DATE "2021-07-08" #endif /** From 0d5db6aa75268740037bcaafa51759ebc353ec34 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Thu, 8 Jul 2021 00:41:33 -0400 Subject: [PATCH 028/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20redundant=20heater?= =?UTF-8?q?=20/=20sensor=20pin=20assignments=20(#22309)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 4 ++-- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 2 +- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 2 +- Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 568086e066f1..3930279c94e7 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -192,7 +192,7 @@ #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") #define FAN_PIN RAMPS_D9_PIN #define HEATER_BED_PIN RAMPS_D8_PIN - #if HOTENDS == 1 + #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN #else #define HEATER_1_PIN MOSFET_D_PIN diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index f7e566e2d620..ba53032a2a9d 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -65,7 +65,7 @@ #define TEMP_BED_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_BED_PIN #endif -#if HOTENDS == 1 +#if HOTENDS == 1 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 #if TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN TEMP_1_PIN #elif TEMP_SENSOR_CHAMBER @@ -92,7 +92,7 @@ #ifndef HEATER_0_PIN #define HEATER_0_PIN P2_07 #endif -#if HOTENDS == 1 +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #ifndef FAN1_PIN #define FAN1_PIN P2_04 #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index f998ecde4e3e..68e138984199 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -202,7 +202,7 @@ // #define HEATER_BED_PIN P2_05 #define HEATER_0_PIN P2_07 -#if HOTENDS == 1 +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #ifndef FAN1_PIN #define FAN1_PIN P2_06 #endif diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index c25f676a08b1..fe7daa8cdafd 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -217,7 +217,7 @@ #define FAN1_PIN RAMPS_D8_PIN #elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #define HEATER_BED_PIN RAMPS_D8_PIN - #if HOTENDS == 1 + #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN #else #define HEATER_1_PIN MOSFET_D_PIN diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index b13b5e72a0a3..fb143fa8bc10 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -219,7 +219,7 @@ #define FAN1_PIN RAMPS_D8_PIN #elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #define HEATER_BED_PIN RAMPS_D8_PIN - #if HOTENDS == 1 + #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN #else #define HEATER_1_PIN MOSFET_D_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 0e2aee9e9971..0a6186cf5719 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -105,7 +105,7 @@ #ifndef HEATER_0_PIN #define HEATER_0_PIN PC3 #endif -#if HOTENDS == 1 +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #ifndef FAN1_PIN #define FAN1_PIN PB0 #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index d465bb23c71e..a9dfc367bf33 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -210,7 +210,7 @@ #define TEMP_0_PIN PA2 // TH0 #define TEMP_1_PIN PA3 // TH1 -#if HOTENDS == 1 +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #if TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN TEMP_1_PIN #elif TEMP_SENSOR_CHAMBER From 20b3403ee845113f0818265a5c03e72781b82074 Mon Sep 17 00:00:00 2001 From: "Zs.Antal" <45710979+AntoszHUN@users.noreply.github.com> Date: Thu, 8 Jul 2021 06:44:07 +0200 Subject: [PATCH 029/323] =?UTF-8?q?=F0=9F=8C=90=20Update=20Hungarian=20lan?= =?UTF-8?q?guage=20(#22307)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_hu.h | 68 ++++++++++++++++++++------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 0c73d9a85af1..ebbc4b2df720 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -26,11 +26,11 @@ * * LCD Menu Messages. See also https://marlinfw.org/docs/development/lcd_language.html * Hungarian translation by AntoszHUN. I am constantly improving and updating the translation. - * Translation last updated: 23/05/2021 - 20:45 + * Translation last updated: 07/07/2021 - 11:20 * * LCD Menü Üzenetek. Lásd még https://marlinfw.org/docs/development/lcd_language.html * A Magyar fordítást készítette: AntoszHUN. A fordítást folyamatosan javítom és frissítem. - * A Fordítás utolsó frissítése: 2021.05.23. - 20:45 + * A Fordítás utolsó frissítése: 2021.07.07. - 11:20 */ namespace Language_hu { @@ -66,6 +66,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X kezdöpont"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y kezdöpont"); PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Z kezdöpont"); + PROGMEM Language_Str MSG_AUTO_HOME_I = _UxGT("Kezdö ") LCD_STR_I; + PROGMEM Language_Str MSG_AUTO_HOME_J = _UxGT("Kezdö ") LCD_STR_J; + PROGMEM Language_Str MSG_AUTO_HOME_K = _UxGT("Kezdö ") LCD_STR_K; PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-igazítás"); PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Ismétlés: %i"); PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Pontosság csökken!"); @@ -79,6 +82,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_HOME_OFFSET_X = _UxGT("X Kezdö eltol."); PROGMEM Language_Str MSG_HOME_OFFSET_Y = _UxGT("Y Kezdö eltol."); PROGMEM Language_Str MSG_HOME_OFFSET_Z = _UxGT("Z Kezdö eltol."); + PROGMEM Language_Str MSG_HOME_OFFSET_I = _UxGT("Kezdö eltol. ") LCD_STR_I; + PROGMEM Language_Str MSG_HOME_OFFSET_J = _UxGT("Kezdö eltol. ") LCD_STR_J; + PROGMEM Language_Str MSG_HOME_OFFSET_K = _UxGT("Kezdö eltol. ") LCD_STR_K; PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Eltolás beállítva."); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Eredeti Be"); PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Elektromos segéd"); @@ -259,6 +265,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_MOVE_X = _UxGT("X mozgás"); PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Y mozgás"); PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Z mozgás"); + PROGMEM Language_Str MSG_MOVE_I = _UxGT("Mozgás ") LCD_STR_I; + PROGMEM Language_Str MSG_MOVE_J = _UxGT("Mozgás ") LCD_STR_J; + PROGMEM Language_Str MSG_MOVE_K = _UxGT("Mozgás ") LCD_STR_K; PROGMEM Language_Str MSG_MOVE_E = _UxGT("Adagoló"); PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Adagoló *"); PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("A fej túl hideg"); @@ -267,9 +276,10 @@ namespace Language_hu { PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mozgás 1mm"); PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mozgás 10mm"); PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("Mozgás 100mm"); - PROGMEM Language_Str MSG_MOVE_0001IN = _UxGT("Mozgás 0.001mm"); - PROGMEM Language_Str MSG_MOVE_001IN = _UxGT("Mozgás 0.01mm"); - PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Mozgás 0.1mm"); + PROGMEM Language_Str MSG_MOVE_0001IN = _UxGT("Mozgás 0.025mm"); + PROGMEM Language_Str MSG_MOVE_001IN = _UxGT("Mozgás 0.254mm"); + PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Mozgás 2.54mm"); + PROGMEM Language_Str MSG_MOVE_1IN = _UxGT("Mozgáá 25.4mm"); PROGMEM Language_Str MSG_SPEED = _UxGT("Sebesség"); PROGMEM Language_Str MSG_BED_Z = _UxGT("Z ágy"); PROGMEM Language_Str MSG_NOZZLE = _UxGT("Fej"); @@ -321,16 +331,22 @@ namespace Language_hu { PROGMEM Language_Str MSG_SELECT_E = _UxGT("Kiválaszt *"); PROGMEM Language_Str MSG_ACC = _UxGT("Gyorsítás"); PROGMEM Language_Str MSG_JERK = _UxGT("Rántás"); - PROGMEM Language_Str MSG_VA_JERK = LCD_STR_A _UxGT(" Ránt. seb."); - PROGMEM Language_Str MSG_VB_JERK = LCD_STR_B _UxGT(" Ránt. seb."); - PROGMEM Language_Str MSG_VC_JERK = LCD_STR_C _UxGT(" Ránt. seb."); + PROGMEM Language_Str MSG_VA_JERK = _UxGT("Seb.") LCD_STR_A _UxGT("-Rántás"); + PROGMEM Language_Str MSG_VB_JERK = _UxGT("Seb.") LCD_STR_B _UxGT("-Rántás"); + PROGMEM Language_Str MSG_VC_JERK = _UxGT("Seb.") LCD_STR_C _UxGT("-Rántás"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Seb.") LCD_STR_I _UxGT("-Rántás"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Seb.") LCD_STR_J _UxGT("-Rántás"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Seb.") LCD_STR_K _UxGT("-Rántás"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("E ránt. seb."); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Csomopont eltérés"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Sebesség"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max sebesség ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max sebesség ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max sebesség ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max sebesség ") LCD_STR_E; + PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max Seb. ") LCD_STR_A; + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max Seb. ") LCD_STR_B; + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max Seb. ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Max Seb. ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Max Seb. ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Max Seb. ") LCD_STR_K; + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max Seb. ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max sebesség *"); PROGMEM Language_Str MSG_VMIN = _UxGT("Min sebesség"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Min utazó.seb."); @@ -338,6 +354,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max gyors. ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max gyors. ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max gyors. ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Max gyors. ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Max gyors. ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Max gyors. ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max gyors. ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max gyorsulás *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Visszahúzás"); @@ -345,11 +364,14 @@ namespace Language_hu { PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Max frekvencia"); PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min elötolás"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Lépés/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" lépés/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" lépés/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" lépés/mm"); + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" Lépés/mm"); + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" Lépés/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" Lépés/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" Lépés/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" Lépés/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" Lépés/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E lépés/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*lépés/mm"); + PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*Lépés/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Höfok"); PROGMEM Language_Str MSG_MOTION = _UxGT("Mozgatások"); PROGMEM Language_Str MSG_FILAMENT = _UxGT("Nyomtatószál"); @@ -481,6 +503,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Mikrolépés X"); PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Mikrolépés Y"); PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Mikrolépés Z"); + PROGMEM Language_Str MSG_BABYSTEP_I = _UxGT("Mikrolépés ") LCD_STR_I; + PROGMEM Language_Str MSG_BABYSTEP_J = _UxGT("Mikrolépés ") LCD_STR_J; + PROGMEM Language_Str MSG_BABYSTEP_K = _UxGT("Mikrolépés ") LCD_STR_K; PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Teljes"); PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Végállás megszakítva!"); PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Fütés hiba!"); @@ -524,8 +549,8 @@ namespace Language_hu { PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Lineáris szintezés"); PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilineáris szintezés"); PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Egységes ágy szintezés"); - PROGMEM Language_Str MSG_MESH_DONE = _UxGT("Mesh probing done"); PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Háló szintezés"); + PROGMEM Language_Str MSG_MESH_DONE = _UxGT("Háló szintezés kész"); PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Statisztikák"); PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Alaplap infó"); PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termisztorok"); @@ -561,6 +586,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X meghajtó %"); PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y meghajtó %"); PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = AXIS4_STR _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = AXIS5_STR _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = AXIS6_STR _UxGT(" Meghajtó %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E meghajtó %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CSATLAKOZÁSI HIBA"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM írása"); @@ -678,6 +706,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korrekció"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Simítás"); @@ -705,6 +736,9 @@ namespace Language_hu { PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Kalibrálási hiba"); PROGMEM Language_Str MSG_DRIVER_BACKWARD = _UxGT(" meghajtók hátra"); + + PROGMEM Language_Str MSG_SD_CARD = _UxGT("SD Kártya"); + PROGMEM Language_Str MSG_USB_DISK = _UxGT("USB Lemez"); } #if FAN_COUNT == 1 From a90b864a3b1bfc51c5163fcb7bbb0fbb6dedf250 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Wed, 7 Jul 2021 21:45:15 -0700 Subject: [PATCH 030/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Einsy=20RAMBo=20FA?= =?UTF-8?q?N1=5FPIN=20(#22305)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index fb7743605ff2..de50657b7419 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -135,9 +135,9 @@ #ifndef FAN1_PIN #ifdef MK3_FAN_PINS - #define FAN_PIN -1 + #define FAN1_PIN -1 #else - #define FAN_PIN 6 + #define FAN1_PIN 6 #endif #endif From 504c569f9c2c74c569e5b5b687024825d19acae0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 6 Jul 2021 22:46:05 -0500 Subject: [PATCH 031/323] =?UTF-8?q?=F0=9F=90=9B=20Followup=20to=20M20=20L?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix `printListing` after #22271 --- Marlin/src/sd/cardreader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index bcb0317990b4..ba2342195174 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -302,11 +302,13 @@ void CardReader::printListing( pathLong[lenPrependLong - 1] = '/'; } strcpy(pathLong + lenPrependLong, longFilename); - printListing(child, /*includeLongNames=*/true, path, pathLong); + printListing(child, true, path, pathLong); } else + printListing(child, false, path); + #else + printListing(child, path); #endif - printListing(child, path); else { SERIAL_ECHO_MSG(STR_SD_CANT_OPEN_SUBDIR, dosFilename); return; From de0fc0874441a077150d4d915c550987c9d0de70 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 7 Jul 2021 23:34:24 -0500 Subject: [PATCH 032/323] =?UTF-8?q?=F0=9F=91=BD=EF=B8=8F=20Update=20FLASH?= =?UTF-8?q?=5FEEPROM=5FEMULATION=20include?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/eeprom_flash.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index dfeae9e9e5e6..68356ebee0bb 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -27,10 +27,7 @@ #if ENABLED(FLASH_EEPROM_EMULATION) #include "../shared/eeprom_api.h" - -// Better: "utility/stm32_eeprom.h", but only after updating stm32duino to 2.0.0 -// Use EEPROM.h for compatibility, for now. -#include +#include "utility/stm32_eeprom.h" /** * The STM32 HAL supports chips that deal with "pages" and some with "sectors" and some that From edc037355f5c2b16aa0d9cb0f14bced679776c30 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 9 Jul 2021 00:58:56 +0000 Subject: [PATCH 033/323] [cron] Bump distribution date (2021-07-09) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index e63dd350c7ce..dffab6e6001f 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-08" +//#define STRING_DISTRIBUTION_DATE "2021-07-09" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index cc1653a5b16d..2ee567cc612d 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-08" + #define STRING_DISTRIBUTION_DATE "2021-07-09" #endif /** From cc1145302b31eab07cc51870b5c37f32da1d368c Mon Sep 17 00:00:00 2001 From: Skruppy Date: Fri, 9 Jul 2021 04:55:34 +0200 Subject: [PATCH 034/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20AVR=20DELAY=5FUS?= =?UTF-8?q?=20int=20overflow=20(#22268)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/shared/Delay.h | 80 ++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 29 deletions(-) diff --git a/Marlin/src/HAL/shared/Delay.h b/Marlin/src/HAL/shared/Delay.h index f7e01ad25cf8..3174968c1be2 100644 --- a/Marlin/src/HAL/shared/Delay.h +++ b/Marlin/src/HAL/shared/Delay.h @@ -97,43 +97,65 @@ void calibrate_delay_loop(); #define DELAY_US(x) DelayCycleFnc((x) * ((F_CPU) / 1000000UL)) #elif defined(__AVR__) - - #define nop() __asm__ __volatile__("nop;\n\t":::) - - FORCE_INLINE static void __delay_4cycles(uint8_t cy) { - __asm__ __volatile__( - L("1") - A("dec %[cnt]") - A("nop") - A("brne 1b") - : [cnt] "+r"(cy) // output: +r means input+output - : // input: - : "cc" // clobbers: - ); + FORCE_INLINE static void __delay_up_to_3c(uint8_t cycles) { + switch (cycles) { + case 3: + __asm__ __volatile__(A("RJMP .+0") A("NOP")); + break; + case 2: + __asm__ __volatile__(A("RJMP .+0")); + break; + case 1: + __asm__ __volatile__(A("NOP")); + break; + } } // Delay in cycles - FORCE_INLINE static void DELAY_CYCLES(uint16_t x) { - - if (__builtin_constant_p(x)) { - #define MAXNOPS 4 - - if (x <= (MAXNOPS)) { - switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); } + FORCE_INLINE static void DELAY_CYCLES(uint16_t cycles) { + if (__builtin_constant_p(cycles)) { + if (cycles <= 3) { + __delay_up_to_3c(cycles); + } + else if (cycles == 4) { + __delay_up_to_3c(2); + __delay_up_to_3c(2); } else { - const uint32_t rem = (x) % (MAXNOPS); - switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); } - if ((x = (x) / (MAXNOPS))) - __delay_4cycles(x); // if need more then 4 nop loop is more optimal + cycles -= 1 + 4; // Compensate for the first LDI (1) and the first round (4) + __delay_up_to_3c(cycles % 4); + + cycles /= 4; + // The following code burns [1 + 4 * (rounds+1)] cycles + uint16_t dummy; + __asm__ __volatile__( + // "manually" load counter from constants, otherwise the compiler may optimize this part away + A("LDI %A[rounds], %[l]") // 1c + A("LDI %B[rounds], %[h]") // 1c (compensating the non branching BRCC) + L("1") + A("SBIW %[rounds], 1") // 2c + A("BRCC 1b") // 2c when branching, else 1c (end of loop) + : // Outputs ... + [rounds] "=w" (dummy) // Restrict to a wo (=) 16 bit register pair (w) + : // Inputs ... + [l] "M" (cycles%256), // Restrict to 0..255 constant (M) + [h] "M" (cycles/256) // Restrict to 0..255 constant (M) + :// Clobbers ... + "cc" // Indicate we are modifying flags like Carry (cc) + ); } - - #undef MAXNOPS } - else if ((x >>= 2)) - __delay_4cycles(x); + else { + __asm__ __volatile__( + L("1") + A("SBIW %[cycles], 4") // 2c + A("BRCC 1b") // 2c when branching, else 1c (end of loop) + : [cycles] "+w" (cycles) // output: Restrict to a rw (+) 16 bit register pair (w) + : // input: - + : "cc" // clobbers: We are modifying flags like Carry (cc) + ); + } } - #undef nop // Delay in microseconds #define DELAY_US(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL)) From 2fa24a637d8b6c2ebba92d6e9a3f0eeecf581402 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 8 Jul 2021 23:02:20 -0500 Subject: [PATCH 035/323] Revert FLASH_EEPROM_EMULATION include --- Marlin/src/HAL/STM32/eeprom_flash.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index 68356ebee0bb..dfeae9e9e5e6 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -27,7 +27,10 @@ #if ENABLED(FLASH_EEPROM_EMULATION) #include "../shared/eeprom_api.h" -#include "utility/stm32_eeprom.h" + +// Better: "utility/stm32_eeprom.h", but only after updating stm32duino to 2.0.0 +// Use EEPROM.h for compatibility, for now. +#include /** * The STM32 HAL supports chips that deal with "pages" and some with "sectors" and some that From 79405ce2afd2a3d36ecb70274ec7a5355a7765c8 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Thu, 8 Jul 2021 21:48:11 -0700 Subject: [PATCH 036/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20manage=5Fheaters?= =?UTF-8?q?=20recursion=20on=20servo=20move=20(#22313)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to e297748b22 --- Marlin/src/module/temperature.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 83187259ff46..3b3c76986699 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1236,6 +1236,10 @@ void Temperature::min_temp_error(const heater_id_t heater_id) { void Temperature::manage_heater() { if (marlin_state == MF_INITIALIZING) return watchdog_refresh(); // If Marlin isn't started, at least reset the watchdog! + static bool no_reentry = false; // Prevent recursion + if (no_reentry) return; + REMEMBER(mh, no_reentry, true); + #if ENABLED(EMERGENCY_PARSER) if (emergency_parser.killed_by_M112) kill(M112_KILL_STR, nullptr, true); From e7e1c514022131529167d7f97044159a5cb798f6 Mon Sep 17 00:00:00 2001 From: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Sat, 10 Jul 2021 04:06:10 +0800 Subject: [PATCH 037/323] =?UTF-8?q?=F0=9F=90=9B=20Fixes=20for=20BTT=20Octo?= =?UTF-8?q?pus=20(#22314)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c | 2 ++ .../PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c index 2ad0bb864cf1..a4f8f696ee82 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c @@ -232,6 +232,7 @@ const PinMap PinMap_PWM[] = { const PinMap PinMap_UART_TX[] = { // {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, @@ -248,6 +249,7 @@ const PinMap PinMap_UART_TX[] = { const PinMap PinMap_UART_RX[] = { // {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h index 4305c81a4598..f512a311e32c 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h @@ -150,7 +150,7 @@ extern "C" { // PWM resolution //#define PWM_RESOLUTION 12 -#define PWM_FREQUENCY 20000 // >= 20 Khz => inaudible noise for fans +#define PWM_FREQUENCY 1000 // >= 20 Khz => inaudible noise for fans #define PWM_MAX_DUTY_CYCLE 255 // SPI Definitions From cd55b5f5cc5756dde086b6adfc575162505dca4a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 9 Jul 2021 16:02:27 -0500 Subject: [PATCH 038/323] =?UTF-8?q?=F0=9F=93=8C=20Require=20U8glib-HAL@~0.?= =?UTF-8?q?5.0=20(#22324)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp | 2 +- Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp | 2 +- Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp | 2 +- Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp | 2 +- Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp | 2 +- Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h | 2 +- Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp | 2 +- Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp | 2 +- .../src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp | 2 +- .../src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp | 2 +- Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp | 2 +- Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp | 2 +- Marlin/src/lcd/dogm/HAL_LCD_com_defines.h | 2 +- Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h | 2 +- Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_an.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_bg.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_ca.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_cz.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_da.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_de.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_el.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_en.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_es.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_eu.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_fi.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_fr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_gl.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_hr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_hu.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_it.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_nl.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_pl.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_pt.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_ro.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_ru.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_sk.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_test.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_tr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_uk.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_vi.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h | 2 +- Marlin/src/lcd/dogm/marlinui_DOGM.h | 2 +- Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp | 2 +- Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp | 2 +- Marlin/src/lcd/dogm/u8g_fontutf8.h | 2 +- Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h | 2 +- buildroot/share/fonts/genallfont.sh | 2 +- buildroot/share/fonts/uxggenpages.sh | 2 +- ini/features.ini | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp b/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp index cb95a48cccec..9d928e7af3b0 100644 --- a/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp +++ b/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp @@ -62,7 +62,7 @@ #include "../shared/Marduino.h" #include "../shared/Delay.h" -#include +#include uint8_t u8g_bitData, u8g_bitNotData, u8g_bitClock, u8g_bitNotClock; volatile uint8_t *u8g_outData, *u8g_outClock; diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp index d07da15ad80e..fcfcef88beb1 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp @@ -60,7 +60,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "../../../MarlinCore.h" diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp index d01cd4dd6b27..65bfd4f4e2d4 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp @@ -62,7 +62,7 @@ #include "../../../inc/MarlinConfig.h" #include "../../shared/Delay.h" -#include +#include #include "u8g_com_HAL_DUE_sw_spi_shared.h" diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp index 890546af58bb..2b13c182d023 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp @@ -64,7 +64,7 @@ #include "../../shared/Marduino.h" #include "../../shared/Delay.h" -#include +#include #if ENABLED(FYSETC_MINI_12864) #define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3 diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp index 4fb7a6e2c315..904924793b4c 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp @@ -62,7 +62,7 @@ #include "../../../inc/MarlinConfig.h" #include "../../shared/Delay.h" -#include +#include #include "u8g_com_HAL_DUE_sw_spi_shared.h" diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h index f076c503cac2..45231fd091eb 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h @@ -23,7 +23,7 @@ #include "../../../inc/MarlinConfigPre.h" #include "../../shared/Marduino.h" -#include +#include void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index); void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level); diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp index b1eea13d5747..0118f92847de 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp @@ -59,7 +59,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "../../shared/HAL_SPI.h" #ifndef LCD_SPI_SPEED diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp index 6f7efba4ae20..bf76eaf0f491 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp @@ -79,7 +79,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #define I2C_SLA (0x3C*2) //#define I2C_CMD_MODE 0x080 diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp index 0b0626de798f..ce7b33801931 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp @@ -59,7 +59,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "../../shared/HAL_SPI.h" #include "../../shared/Delay.h" diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp index 61211d9d881c..039fa6769bbe 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp @@ -59,7 +59,7 @@ #if ENABLED(U8GLIB_ST7920) -#include +#include #include #include "../../shared/Delay.h" #include "../../shared/HAL_SPI.h" diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp index 7f38ec54aff7..3308d03e79f9 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp @@ -71,7 +71,7 @@ #include #include -#include +#include uint8_t swSpiTransfer_mode_0(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin ) { diff --git a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp index 784a80c29fd3..f1cd6b373052 100644 --- a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp +++ b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp @@ -22,7 +22,7 @@ #if BOTH(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI) -#include +#include #include "../../shared/HAL_SPI.h" #ifndef LCD_SPI_SPEED diff --git a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h index 8a707ab41a36..98a8f0a98a6a 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h @@ -23,7 +23,7 @@ // Use this file to select the com driver for device drivers that are NOT in the U8G library -#include +#include #ifndef U8G_HAL_LINKS // Defined by LPC1768/9 environments in platform.ini diff --git a/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h b/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h index cd9cb3cdc968..524ff18778dc 100644 --- a/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h +++ b/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h @@ -32,7 +32,7 @@ X Font ascent = 6 descent=-2 Max Font ascent = 7 descent=-2 */ -#include +#include const u8g_fntpgm_uint8_t u8g_font_6x9[2434] U8G_FONT_SECTION(".progmem.u8g_font_6x9") = { 0x00,0x06,0x09,0x00,0xFE,0x06,0x02,0x0F,0x03,0x84,0x01,0xFF,0xFE,0x07,0xFE,0x06, 0xFE,0x05,0x07,0x07,0x00,0x00,0x00,0x40,0xF0,0xC8,0x88,0x98,0x78,0x10,0x05,0x07, diff --git a/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h b/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h index b4b615da4d0f..0a7ece860177 100644 --- a/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h +++ b/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h @@ -16,7 +16,7 @@ * along with this program. If not, see . * */ -#include +#include #if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7) // reduced font (only symbols 1 - 127) - saves about 1278 bytes of FLASH diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_an.h b/Marlin/src/lcd/dogm/fontdata/langdata_an.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_an.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_an.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h index c506f879335b..8d5d7e8321dd 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_8_144_149[96] U8G_FONT_SECTION("fontpage_8_144_149") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0x95,0x00,0x07,0xFF,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h index 754459d9af2a..e6894a8d30b2 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_2_140_141[47] U8G_FONT_SECTION("fontpage_2_140_141") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8D,0x00,0x0A,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_da.h b/Marlin/src/lcd/dogm/fontdata/langdata_da.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_da.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_da.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_de.h b/Marlin/src/lcd/dogm/fontdata/langdata_de.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_de.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_de.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el.h b/Marlin/src/lcd/dogm/fontdata/langdata_el.h index 4b545f228436..f949f28ca658 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h b/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h index 4b545f228436..f949f28ca658 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_en.h b/Marlin/src/lcd/dogm/fontdata/langdata_en.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_en.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_en.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_es.h b/Marlin/src/lcd/dogm/fontdata/langdata_es.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_es.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_es.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h index cdb2cc7d1ade..e5430834ad4a 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_2_135_135[31] U8G_FONT_SECTION("fontpage_2_135_135") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x08,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_hu.h b/Marlin/src/lcd/dogm/fontdata/langdata_hu.h index 8c15a3890ab0..eb43cbea0f62 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_hu.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_hu.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_2_241_241[31] U8G_FONT_SECTION("fontpage_2_241_241") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x08,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_it.h b/Marlin/src/lcd/dogm/fontdata/langdata_it.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_it.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_it.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h b/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h index 01316d4c1311..4d0ec6ab4fca 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_97_161_164[65] U8G_FONT_SECTION("fontpage_97_161_164") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA1,0xA4,0x00,0x07,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h index 6b48434a6f58..23c84d6573d2 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_344_240_240[34] U8G_FONT_SECTION("fontpage_344_240_240") = { 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x09,0xFE,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h index 926f07529537..11163d9177fa 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_2_132_133[45] U8G_FONT_SECTION("fontpage_2_132_133") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x84,0x85,0x00,0x07,0xFE,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h index ffda82764fa2..7989690f1f17 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h index 4edd6e74e304..617119dde30f 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_8_144_168[348] U8G_FONT_SECTION("fontpage_8_144_168") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0xA8,0x00,0x0A,0xFE,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h index 491006e05a20..152d74bbda21 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_2_140_143[79] U8G_FONT_SECTION("fontpage_2_140_143") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8F,0x00,0x0A,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_test.h b/Marlin/src/lcd/dogm/fontdata/langdata_test.h index c397d8b4b95b..ca6e369eb180 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_test.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_test.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_8_128_255[1677] U8G_FONT_SECTION("fontpage_8_128_255") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x00,0x0A,0xFE,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h index a4068e10d092..aeb1124cf204 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_2_158_159[49] U8G_FONT_SECTION("fontpage_2_158_159") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9E,0x9F,0x00,0x0A,0xFE,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h index 47ec93992fc2..fe409d4e3cff 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_8_134_134[30] U8G_FONT_SECTION("fontpage_8_134_134") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x86,0x86,0x00,0x07,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_vi.h b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h index a8a0c5c121e6..998ae44af1a8 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_vi.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_2_131_131[31] U8G_FONT_SECTION("fontpage_2_131_131") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x08,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h index 491d480a0150..8d74ba4414ed 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_64_157_157[26] U8G_FONT_SECTION("fontpage_64_157_157") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9D,0x9D,0x00,0x07,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h index 8eee544ec81b..51344936be2c 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h @@ -3,7 +3,7 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include const u8g_fntpgm_uint8_t fontpage_69_191_191[28] U8G_FONT_SECTION("fontpage_69_191_191") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x05,0x00,0x00, diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index e3ceb63f96b5..328b69b93b6c 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -27,7 +27,7 @@ #include "../../inc/MarlinConfigPre.h" -#include +#include #include "HAL_LCD_class_defines.h" //#define ALTERNATIVE_LCD diff --git a/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp b/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp index 7b4c470afe61..2a21bd67cad5 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp @@ -24,7 +24,7 @@ #if HAS_MARLINUI_U8GLIB #include "HAL_LCD_com_defines.h" -#include +#include #define WIDTH 128 #define HEIGHT 64 diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp index 84c10dbb4d2e..fda090338ca1 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp @@ -57,7 +57,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "HAL_LCD_com_defines.h" #define WIDTH 128 diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.h b/Marlin/src/lcd/dogm/u8g_fontutf8.h index 34e365cf9553..d7ea618de008 100644 --- a/Marlin/src/lcd/dogm/u8g_fontutf8.h +++ b/Marlin/src/lcd/dogm/u8g_fontutf8.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include "../fontutils.h" // the macro to indicate a UTF-8 string diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h index e8a48299cb19..446bfcfd4212 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h @@ -35,7 +35,7 @@ #define PAGE_HEIGHT 16 // 256 byte framebuffer //#define PAGE_HEIGHT 32 // 512 byte framebuffer -#include +#include void ST7920_SWSPI_SND_8BIT(uint8_t val); diff --git a/buildroot/share/fonts/genallfont.sh b/buildroot/share/fonts/genallfont.sh index 0a66990212d7..d5cad54361ed 100755 --- a/buildroot/share/fonts/genallfont.sh +++ b/buildroot/share/fonts/genallfont.sh @@ -119,7 +119,7 @@ if [ 1 = 1 ]; then * along with this program. If not, see . * */ -#include +#include #if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7) // reduced font (only symbols 1 - 127) - saves about 1278 bytes of FLASH diff --git a/buildroot/share/fonts/uxggenpages.sh b/buildroot/share/fonts/uxggenpages.sh index a99fd9902463..047d3ae661b9 100755 --- a/buildroot/share/fonts/uxggenpages.sh +++ b/buildroot/share/fonts/uxggenpages.sh @@ -169,7 +169,7 @@ cat <fontutf8-data.h * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include $TMPA #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {$TMPB}; diff --git a/ini/features.ini b/ini/features.ini index 5a1b48804dd5..2d9d7ab06327 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -36,7 +36,7 @@ USES_LIQUIDCRYSTAL_I2C = marcoschwartz/LiquidCrystal_I2C@1.1.4 USES_LIQUIDTWI2 = LiquidTWI2@1.2.7 HAS_WIRED_LCD = src_filter=+ HAS_MARLINUI_HD44780 = src_filter=+ -HAS_MARLINUI_U8GLIB = U8glib-HAL@~0.4.5 +HAS_MARLINUI_U8GLIB = U8glib-HAL@~0.5.0 src_filter=+ HAS_(FSMC|SPI|LTDC)_TFT = src_filter=+ + + HAS_FSMC_TFT = src_filter=+ + From 6cbd21d0d46cc366e8b0ec84cc9a531485adf465 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 9 Jul 2021 23:07:55 +0200 Subject: [PATCH 039/323] =?UTF-8?q?=F0=9F=8C=90=20Update=20French=20langua?= =?UTF-8?q?ge=20(#22323)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_fr.h | 70 ++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 6 deletions(-) diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index 5dbec298d495..78a649f62676 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -60,6 +60,9 @@ namespace Language_fr { PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Origine X auto"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Origine Y auto"); PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Origine Z auto"); + PROGMEM Language_Str MSG_AUTO_HOME_I = _UxGT("Origine ") LCD_STR_I _UxGT(" auto"); + PROGMEM Language_Str MSG_AUTO_HOME_J = _UxGT("Origine ") LCD_STR_J _UxGT(" auto"); + PROGMEM Language_Str MSG_AUTO_HOME_K = _UxGT("Origine ") LCD_STR_K _UxGT(" auto"); PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Align. Z auto"); PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Origine XYZ..."); PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Clic pour commencer"); @@ -67,6 +70,12 @@ namespace Language_fr { PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Mise à niveau OK!"); PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Hauteur lissée"); PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Régl. décal origine"); + PROGMEM Language_Str MSG_HOME_OFFSET_X = _UxGT("Décal. origine X"); + PROGMEM Language_Str MSG_HOME_OFFSET_Y = _UxGT("Décal. origine Y"); + PROGMEM Language_Str MSG_HOME_OFFSET_Z = _UxGT("Décal. origine Z"); + PROGMEM Language_Str MSG_HOME_OFFSET_I = _UxGT("Décal. origine ") LCD_STR_I; + PROGMEM Language_Str MSG_HOME_OFFSET_J = _UxGT("Décal. origine ") LCD_STR_J; + PROGMEM Language_Str MSG_HOME_OFFSET_K = _UxGT("Décal. origine ") LCD_STR_K; PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Décalages appliqués"); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Régler origine"); PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assistant Molettes"); @@ -228,14 +237,21 @@ namespace Language_fr { PROGMEM Language_Str MSG_MOVE_X = _UxGT("Déplacer X"); PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Déplacer Y"); PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Déplacer Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrudeur"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrudeur *"); + PROGMEM Language_Str MSG_MOVE_I = _UxGT("Déplacer ") LCD_STR_I; + PROGMEM Language_Str MSG_MOVE_J = _UxGT("Déplacer ") LCD_STR_J; + PROGMEM Language_Str MSG_MOVE_K = _UxGT("Déplacer ") LCD_STR_K; + PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extruder"); + PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extruder *"); PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Buse trop froide"); PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Déplacer %smm"); PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Déplacer 0.1mm"); PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Déplacer 1mm"); PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Déplacer 10mm"); PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("Déplacer 100mm"); + PROGMEM Language_Str MSG_MOVE_0001IN = _UxGT("Déplacer 0.001\""); + PROGMEM Language_Str MSG_MOVE_001IN = _UxGT("Déplacer 0.01\""); + PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Déplacer 0.1\""); + PROGMEM Language_Str MSG_MOVE_1IN = _UxGT("Déplacer 1\""); PROGMEM Language_Str MSG_SPEED = _UxGT("Vitesse"); PROGMEM Language_Str MSG_BED_Z = _UxGT("Lit Z"); PROGMEM Language_Str MSG_NOZZLE = _UxGT("Buse"); @@ -270,11 +286,31 @@ namespace Language_fr { PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT(" jerk"); PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT(" jerk"); PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT(" jerk"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT(" jerk"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT(" jerk"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT(" jerk"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve jerk"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Vélocité"); + PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vit. Max ") LCD_STR_A; + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vit. Max ") LCD_STR_B; + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vit. Max ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Vit. Max ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Vit. Max ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Vit. Max ") LCD_STR_K; + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vit. Max ") LCD_STR_E; + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vit. Max *"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Déviat. jonct."); + PROGMEM Language_Str MSG_VMIN = _UxGT("Vit. Min"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vmin course"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accélération"); + PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max Accél. ") LCD_STR_A; + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max Accél. ") LCD_STR_B; + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max Accél. ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Max Accél. ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Max Accél. ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Max Accél. ") LCD_STR_K; + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max Accél. ") LCD_STR_E; + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max Accél. *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Acc.rétraction"); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Acc.course"); PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Fréquence max"); @@ -283,6 +319,9 @@ namespace Language_fr { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pas/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pas/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pas/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" pas/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" pas/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" pas/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pas/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pas/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Température"); @@ -402,6 +441,12 @@ namespace Language_fr { PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Décalage X"); PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Décalage Y"); PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Décalage Z"); + PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); + PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + PROGMEM Language_Str MSG_BABYSTEP_I = _UxGT("Babystep ") LCD_STR_I; + PROGMEM Language_Str MSG_BABYSTEP_J = _UxGT("Babystep ") LCD_STR_J; + PROGMEM Language_Str MSG_BABYSTEP_K = _UxGT("Babystep ") LCD_STR_K; PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Butée abandon"); PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Err de chauffe"); @@ -444,6 +489,7 @@ namespace Language_fr { PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Niveau bilinéaire"); PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Niveau lit unifié"); PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Niveau par grille"); + PROGMEM Language_Str MSG_MESH_DONE = _UxGT("Niveau terminé"); PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Stats. imprimante"); PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Infos carte"); PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistances"); @@ -476,10 +522,13 @@ namespace Language_fr { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp Max"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Alim."); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Puiss. moteur "); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("Driver X %"); + PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Driver Y %"); + PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Driver Z %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = _UxGT("Driver " AXIS4_STR " %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = _UxGT("Driver " AXIS5_STR " %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = _UxGT("Driver " AXIS6_STR " %"); + PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("Driver E %"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM sauv."); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERREUR CONNEXION TMC"); @@ -576,6 +625,12 @@ namespace Language_fr { PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop activé"); PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Réinit."); PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" dans:"); + PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; + PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; + PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Correction"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Lissage"); @@ -601,4 +656,7 @@ namespace Language_fr { PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Coin bas droit"); PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Calibration terminée"); PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Échec de l'étalonnage"); + + PROGMEM Language_Str MSG_SD_CARD = _UxGT("Carte SD"); + PROGMEM Language_Str MSG_USB_DISK = _UxGT("Clé USB"); } From 26bfc267977ddc444513c793c18f76847e23310e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 9 Jul 2021 17:09:58 -0500 Subject: [PATCH 040/323] =?UTF-8?q?=F0=9F=8E=A8=20Check=20flags=20without?= =?UTF-8?q?=20ENABLED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 4 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 2 +- Marlin/src/feature/dac/dac_mcp4728.cpp | 2 +- Marlin/src/feature/dac/stepper_dac.cpp | 2 +- Marlin/src/feature/joystick.h | 6 +-- Marlin/src/feature/powerloss.h | 12 +++--- Marlin/src/feature/tmc_util.h | 2 +- Marlin/src/gcode/calibrate/G33.cpp | 2 +- Marlin/src/gcode/calibrate/G34.cpp | 8 ++-- .../src/gcode/feature/digipot/M907-M910.cpp | 6 +-- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 42 +++++++++---------- Marlin/src/gcode/queue.h | 2 +- .../lcd/dogm/status_screen_lite_ST7920.cpp | 2 +- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 4 +- Marlin/src/lcd/dwin/e3v2/dwin.h | 12 +++--- .../src/lcd/extui/dgus/DGUSScreenHandler.cpp | 2 +- .../src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp | 2 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 4 +- .../generic/advanced_settings_menu.cpp | 2 +- .../generic/leveling_menu.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/draw_printing.cpp | 2 +- Marlin/src/lcd/extui/ui_api.cpp | 16 +++---- Marlin/src/lcd/marlinui.h | 10 ++--- Marlin/src/lcd/menu/menu_advanced.cpp | 4 +- Marlin/src/module/settings.cpp | 4 +- Marlin/src/module/temperature.h | 14 +++---- Marlin/src/pins/ramps/pins_DAGOMA_F5.h | 2 +- Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h | 2 +- .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 2 +- Marlin/src/sd/cardreader.cpp | 2 +- 31 files changed, 90 insertions(+), 90 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index dc9fbb2ba787..18965bcbb9c1 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -135,7 +135,7 @@ #include "module/servo.h" #endif -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "feature/dac/stepper_dac.h" #endif @@ -1355,7 +1355,7 @@ void setup() { SETUP_RUN(digipot_i2c.init()); #endif - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC SETUP_RUN(stepper_dac.init()); #endif diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index e144390c8de7..e1ed013cf2fa 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -307,7 +307,7 @@ void unified_bed_leveling::G29() { const uint8_t p_val = parser.byteval('P'); const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J'); - #if ENABLED(HAS_MULTI_HOTEND) + #if HAS_MULTI_HOTEND const uint8_t old_tool_index = active_extruder; #endif diff --git a/Marlin/src/feature/dac/dac_mcp4728.cpp b/Marlin/src/feature/dac/dac_mcp4728.cpp index ddbaced08640..1278d1bec857 100644 --- a/Marlin/src/feature/dac/dac_mcp4728.cpp +++ b/Marlin/src/feature/dac/dac_mcp4728.cpp @@ -32,7 +32,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "dac_mcp4728.h" diff --git a/Marlin/src/feature/dac/stepper_dac.cpp b/Marlin/src/feature/dac/stepper_dac.cpp index 3abaece44359..6d03808b8282 100644 --- a/Marlin/src/feature/dac/stepper_dac.cpp +++ b/Marlin/src/feature/dac/stepper_dac.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "stepper_dac.h" #include "../../MarlinCore.h" // for SP_X_LBL... diff --git a/Marlin/src/feature/joystick.h b/Marlin/src/feature/joystick.h index d1c4fbd314bc..91bf6bdc00d2 100644 --- a/Marlin/src/feature/joystick.h +++ b/Marlin/src/feature/joystick.h @@ -32,13 +32,13 @@ class Joystick { friend class Temperature; private: - #if ENABLED(HAS_JOY_ADC_X) + #if HAS_JOY_ADC_X static temp_info_t x; #endif - #if ENABLED(HAS_JOY_ADC_Y) + #if HAS_JOY_ADC_Y static temp_info_t y; #endif - #if ENABLED(HAS_JOY_ADC_Z) + #if HAS_JOY_ADC_Z static temp_info_t z; #endif public: diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index 55180e539023..d3ecc6c9cc0b 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -64,13 +64,13 @@ typedef struct { Repeat stored_repeat; #endif - #if ENABLED(HAS_HOME_OFFSET) + #if HAS_HOME_OFFSET xyz_pos_t home_offset; #endif - #if ENABLED(HAS_POSITION_SHIFT) + #if HAS_POSITION_SHIFT xyz_pos_t position_shift; #endif - #if ENABLED(HAS_MULTI_EXTRUDER) + #if HAS_MULTI_EXTRUDER uint8_t active_extruder; #endif @@ -78,13 +78,13 @@ typedef struct { float filament_size[EXTRUDERS]; #endif - #if ENABLED(HAS_HOTEND) + #if HAS_HOTEND celsius_t target_temperature[HOTENDS]; #endif - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED celsius_t target_temperature_bed; #endif - #if ENABLED(HAS_FAN) + #if HAS_FAN uint8_t fan_speed[FAN_COUNT]; #endif diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 741b840ec74b..4753f78d91fe 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -363,7 +363,7 @@ void test_tmc_connection(LOGICAL_AXIS_DECL(const bool, true)); struct motion_state_t { xy_ulong_t acceleration; - #if ENABLED(HAS_CLASSIC_JERK) + #if HAS_CLASSIC_JERK xy_float_t jerk_state; #endif }; diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 14ac53aeba8c..0737c9166850 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -63,7 +63,7 @@ enum CalEnum : char { // the 7 main calibration points - #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP) #define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP) -#if ENABLED(HAS_MULTI_HOTEND) +#if HAS_MULTI_HOTEND const uint8_t old_tool_index = active_extruder; #endif diff --git a/Marlin/src/gcode/calibrate/G34.cpp b/Marlin/src/gcode/calibrate/G34.cpp index 956960866dc8..f335a123114a 100644 --- a/Marlin/src/gcode/calibrate/G34.cpp +++ b/Marlin/src/gcode/calibrate/G34.cpp @@ -81,11 +81,11 @@ void GcodeSuite::G34() { const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT); const uint32_t previous_current = stepper.motor_current_setting[Z_AXIS]; stepper.set_digipot_current(1, target_current); - #elif ENABLED(HAS_MOTOR_CURRENT_DAC) + #elif HAS_MOTOR_CURRENT_DAC const float target_current = parser.floatval('S', GANTRY_CALIBRATION_CURRENT); const float previous_current = dac_amps(Z_AXIS, target_current); stepper_dac.set_current_value(Z_AXIS, target_current); - #elif ENABLED(HAS_MOTOR_CURRENT_I2C) + #elif HAS_MOTOR_CURRENT_I2C const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT); previous_current = dac_amps(Z_AXIS); digipot_i2c.set_current(Z_AXIS, target_current) @@ -127,9 +127,9 @@ void GcodeSuite::G34() { stepper.set_digipot_current(Z_AXIS, previous_current); #elif HAS_MOTOR_CURRENT_PWM stepper.set_digipot_current(1, previous_current); - #elif ENABLED(HAS_MOTOR_CURRENT_DAC) + #elif HAS_MOTOR_CURRENT_DAC stepper_dac.set_current_value(Z_AXIS, previous_current); - #elif ENABLED(HAS_MOTOR_CURRENT_I2C) + #elif HAS_MOTOR_CURRENT_I2C digipot_i2c.set_current(Z_AXIS, previous_current) #elif HAS_TRINAMIC_CONFIG #if AXIS_IS_TMC(Z) diff --git a/Marlin/src/gcode/feature/digipot/M907-M910.cpp b/Marlin/src/gcode/feature/digipot/M907-M910.cpp index 118ad21564ac..bd741f8a64b4 100644 --- a/Marlin/src/gcode/feature/digipot/M907-M910.cpp +++ b/Marlin/src/gcode/feature/digipot/M907-M910.cpp @@ -34,7 +34,7 @@ #include "../../../feature/digipot/digipot.h" #endif -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "../../../feature/dac/stepper_dac.h" #endif @@ -73,7 +73,7 @@ void GcodeSuite::M907() { #endif #endif - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC if (parser.seenval('S')) { const float dac_percent = parser.value_float(); LOOP_LE_N(i, 4) stepper_dac.set_current_percent(i, dac_percent); @@ -92,7 +92,7 @@ void GcodeSuite::M907() { TERN_(HAS_MOTOR_CURRENT_DAC, stepper_dac.set_current_value(parser.byteval('P', -1), parser.ushortval('S', 0))); } - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC void GcodeSuite::M909() { stepper_dac.print_values(); } void GcodeSuite::M910() { stepper_dac.commit_eeprom(); } diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index ac3b5010b980..0f66c4035e13 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -908,7 +908,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes. #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) case 908: M908(); break; // M908: Control digital trimpot directly. - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC case 909: M909(); break; // M909: Print digipot/DAC current value case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 752a3da9dc63..6f889e85584d 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -524,7 +524,7 @@ class GcodeSuite { static void G38(const int8_t subcode); #endif - #if ENABLED(HAS_MESH) + #if HAS_MESH static void G42(); #endif @@ -557,7 +557,7 @@ class GcodeSuite { static void G425(); #endif - #if ENABLED(HAS_RESUME_CONTINUE) + #if HAS_RESUME_CONTINUE static void M0_M1(); #endif @@ -612,7 +612,7 @@ class GcodeSuite { static void M31(); #if ENABLED(SDSUPPORT) - #if ENABLED(HAS_MEDIA_SUBCALLS) + #if HAS_MEDIA_SUBCALLS static void M32(); #endif #if ENABLED(LONG_FILENAME_HOST_SUPPORT) @@ -743,7 +743,7 @@ class GcodeSuite { static void M149(); #endif - #if ENABLED(HAS_COLOR_LEDS) + #if HAS_COLOR_LEDS static void M150(); #endif @@ -777,7 +777,7 @@ class GcodeSuite { static void M204(); static void M205(); - #if ENABLED(HAS_M206_COMMAND) + #if HAS_M206_COMMAND static void M206(); #endif @@ -791,11 +791,11 @@ class GcodeSuite { static void M211(); - #if ENABLED(HAS_MULTI_EXTRUDER) + #if HAS_MULTI_EXTRUDER static void M217(); #endif - #if ENABLED(HAS_HOTEND_OFFSET) + #if HAS_HOTEND_OFFSET static void M218(); #endif @@ -813,7 +813,7 @@ class GcodeSuite { static void M240(); #endif - #if ENABLED(HAS_LCD_CONTRAST) + #if HAS_LCD_CONTRAST static void M250(); #endif @@ -833,7 +833,7 @@ class GcodeSuite { static void M290(); #endif - #if ENABLED(HAS_BUZZER) + #if HAS_BUZZER static void M300(); #endif @@ -845,7 +845,7 @@ class GcodeSuite { static void M302(); #endif - #if ENABLED(HAS_PID_HEATING) + #if HAS_PID_HEATING static void M303(); #endif @@ -853,7 +853,7 @@ class GcodeSuite { static void M304(); #endif - #if ENABLED(HAS_USER_THERMISTORS) + #if HAS_USER_THERMISTORS static void M305(); #endif @@ -894,7 +894,7 @@ class GcodeSuite { static void M402(); #endif - #if ENABLED(HAS_PRUSA_MMU2) + #if HAS_PRUSA_MMU2 static void M403(); #endif @@ -905,11 +905,11 @@ class GcodeSuite { static void M407(); #endif - #if ENABLED(HAS_FILAMENT_SENSOR) + #if HAS_FILAMENT_SENSOR static void M412(); #endif - #if ENABLED(HAS_MULTI_LANGUAGE) + #if HAS_MULTI_LANGUAGE static void M414(); #endif @@ -922,11 +922,11 @@ class GcodeSuite { static void M425(); #endif - #if ENABLED(HAS_M206_COMMAND) + #if HAS_M206_COMMAND static void M428(); #endif - #if ENABLED(HAS_POWER_MONITOR) + #if HAS_POWER_MONITOR static void M430(); #endif @@ -977,11 +977,11 @@ class GcodeSuite { static void M603(); #endif - #if ENABLED(HAS_DUPLICATION_MODE) + #if HAS_DUPLICATION_MODE static void M605(); #endif - #if ENABLED(IS_KINEMATIC) + #if IS_KINEMATIC static void M665(); #endif @@ -1006,7 +1006,7 @@ class GcodeSuite { static void M810_819(); #endif - #if ENABLED(HAS_BED_PROBE) + #if HAS_BED_PROBE static void M851(); #endif @@ -1039,7 +1039,7 @@ class GcodeSuite { #if HAS_TRINAMIC_CONFIG static void M122(); static void M906(); - #if ENABLED(HAS_STEALTHCHOP) + #if HAS_STEALTHCHOP static void M569(); #endif #if ENABLED(MONITOR_DRIVER_STATUS) @@ -1066,7 +1066,7 @@ class GcodeSuite { static void M907(); #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) static void M908(); - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC static void M909(); static void M910(); #endif diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index ea99ce7a2d54..3474a402c38d 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -59,7 +59,7 @@ class GCodeQueue { struct CommandLine { char buffer[MAX_CMD_SIZE]; //!< The command buffer bool skip_ok; //!< Skip sending ok when command is processed? - #if ENABLED(HAS_MULTI_SERIAL) + #if HAS_MULTI_SERIAL serial_index_t port; //!< Serial port the command was received on #endif }; diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index 2f8b5f67e2e7..c76857b6bb40 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -536,7 +536,7 @@ void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool static struct { bool E1_show_target : 1; bool E2_show_target : 1; - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED bool bed_show_target : 1; #endif } display_state = { diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index 777b56ac0e4d..9aea68dfcb02 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -182,10 +182,10 @@ static uint8_t _card_percent = 0; static uint16_t _remain_time = 0; #if ENABLED(PAUSE_HEAT) - #if ENABLED(HAS_HOTEND) + #if HAS_HOTEND uint16_t resume_hotend_temp = 0; #endif - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED uint16_t resume_bed_temp = 0; #endif #endif diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.h b/Marlin/src/lcd/dwin/e3v2/dwin.h index ad210db27db9..0272748cd5d5 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.h +++ b/Marlin/src/lcd/dwin/e3v2/dwin.h @@ -255,13 +255,13 @@ extern char print_filename[16]; extern millis_t dwin_heat_time; typedef struct { - #if ENABLED(HAS_HOTEND) + #if HAS_HOTEND celsius_t E_Temp = 0; #endif - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED celsius_t Bed_Temp = 0; #endif - #if ENABLED(HAS_FAN) + #if HAS_FAN int16_t Fan_speed = 0; #endif int16_t print_speed = 100; @@ -344,13 +344,13 @@ void HMI_Move_E(); void HMI_Zoffset(); -#if ENABLED(HAS_HOTEND) +#if HAS_HOTEND void HMI_ETemp(); #endif -#if ENABLED(HAS_HEATED_BED) +#if HAS_HEATED_BED void HMI_BedTemp(); #endif -#if ENABLED(HAS_FAN) +#if HAS_FAN void HMI_FanSpeed(); #endif diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index 2e8df757eba5..57ecc4bb65d6 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -622,7 +622,7 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr DEBUG_ECHOLNPGM("HandlePreheat"); uint8_t e_temp = 0; - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED uint8_t bed_temp = 0; #endif const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp index 7d8581c9f37c..c60d6e8bc4b3 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp @@ -35,7 +35,7 @@ #include "../../ui_api.h" #include "../../../marlinui.h" -#if ENABLED(HAS_STEALTHCHOP) +#if HAS_STEALTHCHOP #include "../../../../module/stepper/trinamic.h" #endif diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index aabe6fc53189..0ee382838770 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -37,7 +37,7 @@ #include "../../../../gcode/gcode.h" -#if ENABLED(HAS_STEALTHCHOP) +#if HAS_STEALTHCHOP #include "../../../../module/stepper/trinamic.h" #include "../../../../module/stepper/indirection.h" #endif @@ -396,7 +396,7 @@ void DGUSScreenHandler::Z_offset_select(DGUS_VP_Variable &var, void *val_ptr) { void DGUSScreenHandler::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr) { - #if ENABLED(HAS_BED_PROBE) + #if HAS_BED_PROBE int32_t value = swap32(*(int32_t *)val_ptr); float Offset = value / 100.0f; DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp index 58a7112d010b..503abbdb05c0 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp @@ -122,7 +122,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { case 2: GOTO_SCREEN(ZOffsetScreen); break; #endif case 3: GOTO_SCREEN(StepsScreen); break; - #if ENABLED(HAS_MULTI_HOTEND) + #if HAS_MULTI_HOTEND case 4: GOTO_SCREEN(NozzleOffsetScreen); break; #endif case 5: GOTO_SCREEN(MaxVelocityScreen); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index 797bb3799690..acbc17989120 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -106,7 +106,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break; #endif - #if ENABLED(HAS_BED_PROBE) + #if HAS_BED_PROBE case 3: #ifndef BED_LEVELING_COMMANDS #define BED_LEVELING_COMMANDS "G29" diff --git a/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp index c9172d5887dc..e3efb14c2894 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp @@ -49,7 +49,7 @@ static lv_obj_t *labelPause, *labelStop, *labelOperat; static lv_obj_t *bar1, *bar1ValueText; static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonExt2, *buttonBedstate, *buttonFanstate, *buttonZpos; -#if ENABLED(HAS_MULTI_EXTRUDER) +#if HAS_MULTI_EXTRUDER static lv_obj_t *labelExt2; #endif diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 00b785e6807f..df735278126e 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -178,10 +178,10 @@ namespace ExtUI { #if HAS_HEATED_BED case BED: thermalManager.reset_bed_idle_timer(); return; #endif - #if ENABLED(HAS_HEATED_CHAMBER) + #if HAS_HEATED_CHAMBER case CHAMBER: return; // Chamber has no idle timer #endif - #if ENABLED(HAS_COOLER) + #if HAS_COOLER case COOLER: return; // Cooler has no idle timer #endif default: @@ -241,10 +241,10 @@ namespace ExtUI { bool isHeaterIdle(const heater_t heater) { #if HEATER_IDLE_HANDLER switch (heater) { - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out; #endif - #if ENABLED(HAS_HEATED_CHAMBER) + #if HAS_HEATED_CHAMBER case CHAMBER: return false; // Chamber has no idle timer #endif default: @@ -264,10 +264,10 @@ namespace ExtUI { celsius_float_t getActualTemp_celsius(const heater_t heater) { switch (heater) { - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed()); #endif - #if ENABLED(HAS_HEATED_CHAMBER) + #if HAS_HEATED_CHAMBER case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber()); #endif default: return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(heater - H0)); @@ -280,10 +280,10 @@ namespace ExtUI { celsius_float_t getTargetTemp_celsius(const heater_t heater) { switch (heater) { - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed()); #endif - #if ENABLED(HAS_HEATED_CHAMBER) + #if HAS_HEATED_CHAMBER case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber()); #endif default: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(heater - H0)); diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 7531fae67451..56ef741b543a 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -111,13 +111,13 @@ #if PREHEAT_COUNT typedef struct { - #if ENABLED(HAS_HOTEND) + #if HAS_HOTEND celsius_t hotend_temp; #endif - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED celsius_t bed_temp; #endif - #if ENABLED(HAS_FAN) + #if HAS_FAN uint16_t fan_speed; #endif } preheat_t; @@ -135,12 +135,12 @@ static int8_t constexpr e_index = 0; #endif static millis_t start_time; - #if ENABLED(IS_KINEMATIC) + #if IS_KINEMATIC static xyze_pos_t all_axes_destination; #endif public: static float menu_scale; - #if ENABLED(IS_KINEMATIC) + #if IS_KINEMATIC static float offset; #endif template diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index a6719f184758..4ae38edf24ce 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -58,7 +58,7 @@ void menu_tmc(); void menu_backlash(); -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "../../feature/dac/stepper_dac.h" @@ -590,7 +590,7 @@ void menu_advanced_settings() { SUBMENU(MSG_BACKLASH, menu_backlash); #endif - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC SUBMENU(MSG_DRIVE_STRENGTH, menu_dac); #endif #if HAS_MOTOR_CURRENT_PWM diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 27ba7cbc75b3..8c3e9fb75cf3 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -3818,10 +3818,10 @@ void MarlinSettings::reset() { SERIAL_CHAR(' ', 'B'); // B (maps to E1 by default) SERIAL_ECHOLN(stepper.motor_current_setting[4]); #endif - #elif ENABLED(HAS_MOTOR_CURRENT_I2C) // i2c-based has any number of values + #elif HAS_MOTOR_CURRENT_I2C // i2c-based has any number of values // Values sent over i2c are not stored. // Indexes map directly to drivers, not axes. - #elif ENABLED(HAS_MOTOR_CURRENT_DAC) // DAC-based has 4 values, for X Y Z (I J K) E + #elif HAS_MOTOR_CURRENT_DAC // DAC-based has 4 values, for X Y Z (I J K) E // Values sent over i2c are not stored. Uses indirect mapping. #endif diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 26c1dca8afb8..c8d085133cb3 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -340,16 +340,16 @@ class Temperature { static const celsius_t hotend_maxtemp[HOTENDS]; static inline celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); } #endif - #if ENABLED(HAS_HEATED_BED) + #if HAS_HEATED_BED static bed_info_t temp_bed; #endif - #if ENABLED(HAS_TEMP_PROBE) + #if HAS_TEMP_PROBE static probe_info_t temp_probe; #endif - #if ENABLED(HAS_TEMP_CHAMBER) + #if HAS_TEMP_CHAMBER static chamber_info_t temp_chamber; #endif - #if ENABLED(HAS_TEMP_COOLER) + #if HAS_TEMP_COOLER static cooler_info_t temp_cooler; #endif #if HAS_TEMP_REDUNDANT @@ -450,7 +450,7 @@ class Temperature { static lpq_ptr_t lpq_ptr; #endif - #if ENABLED(HAS_HOTEND) + #if HAS_HOTEND static temp_range_t temp_range[HOTENDS]; #endif @@ -486,7 +486,7 @@ class Temperature { static millis_t preheat_end_time[HOTENDS]; #endif - #if ENABLED(HAS_AUTO_FAN) + #if HAS_AUTO_FAN static millis_t next_auto_fan_check_ms; #endif @@ -920,7 +920,7 @@ class Temperature { static void checkExtruderAutoFans(); - #if ENABLED(HAS_HOTEND) + #if HAS_HOTEND static float get_pid_output_hotend(const uint8_t e); #endif #if ENABLED(PIDTEMPBED) diff --git a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h index 07e46acfe71b..8dc93c833b3b 100644 --- a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h +++ b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h @@ -51,7 +51,7 @@ // // DAC steppers // -#define HAS_MOTOR_CURRENT_DAC +#define HAS_MOTOR_CURRENT_DAC 1 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 } diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h index 1428de31a22b..5a6bba3c0842 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h @@ -34,7 +34,7 @@ // // I2C based DAC like on the Printrboard REVF -#define HAS_MOTOR_CURRENT_DAC +#define HAS_MOTOR_CURRENT_DAC 1 // Channels available for DAC, For Rigidboard there are 4 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 } diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 0e6842125e11..539a3bb8f3df 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -141,7 +141,7 @@ #endif // NO_EXTRUDRBOARD // Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF -#define HAS_MOTOR_CURRENT_DAC +#define HAS_MOTOR_CURRENT_DAC 1 // Set default drive strength percents if not already defined - X, Y, Z, E axis #ifndef DAC_MOTOR_CURRENT_DEFAULT diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index ba2342195174..90c39feaf8b6 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -1153,7 +1153,7 @@ void CardReader::cdroot() { #if DISABLED(SDSORT_USES_RAM) selectFileByIndex(o1); // Pre-fetch the first entry and save it strcpy(name1, longest_filename()); // so the loop only needs one fetch - #if ENABLED(HAS_FOLDER_SORTING) + #if HAS_FOLDER_SORTING bool dir1 = flag.filenameIsDir; #endif #endif From 938d86d1c5512a39ac2527b497a0875d742d17e9 Mon Sep 17 00:00:00 2001 From: mks-viva <1224833100@qq.com> Date: Fri, 9 Jul 2021 17:59:36 -0500 Subject: [PATCH 041/323] =?UTF-8?q?=E2=9C=A8=20MKS=20MINI12864=20V3=20for?= =?UTF-8?q?=20MKS=20Robin=20Nano=20V2/3=20(#22285)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 5 +++ Marlin/src/HAL/STM32F1/inc/SanityCheck.h | 2 +- Marlin/src/inc/Conditionals_LCD.h | 5 +++ Marlin/src/inc/Conditionals_post.h | 4 ++ .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 11 ++++++ .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 39 ++++++++++++++++--- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 15 ++++++- 7 files changed, 73 insertions(+), 8 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index e9a49b605617..5a38ddda0f06 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2414,6 +2414,11 @@ // //#define MKS_MINI_12864 +// +// MKS MINI12864 V3 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight. +// +//#define MKS_MINI_12864_V3 + // // MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout. // https://www.aliexpress.com/item/33018110072.html diff --git a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h index 89ee66d6464b..2846155c351d 100644 --- a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h @@ -39,7 +39,7 @@ #error "SERIAL_STATS_DROPPED_RX is not supported on the STM32F1 platform." #endif -#if ENABLED(NEOPIXEL_LED) +#if ENABLED(NEOPIXEL_LED) && DISABLED(MKS_MINI_12864_V3) #error "NEOPIXEL_LED (Adafruit NeoPixel) is not supported for HAL/STM32F1. Comment out this line to proceed at your own risk!" #endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index a9ad5018e89c..6cf0b822418d 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -31,6 +31,11 @@ #define MKS_MINI_12864 #endif +// MKS_MINI_12864_V3 is simply identical to FYSETC_MINI_12864_2_1 +#if ENABLED(MKS_MINI_12864_V3) + #define FYSETC_MINI_12864_2_1 +#endif + /** * General Flags that may be set below by specific LCDs * diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 2f5af2b7008e..f4bb862db91d 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -369,6 +369,10 @@ #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 195 +#elif ENABLED(MKS_MINI_12864_V3) + #define _LCD_CONTRAST_MIN 255 + #define _LCD_CONTRAST_INIT 255 + #define _LCD_CONTRAST_MAX 255 #elif ENABLED(FYSETC_MINI_12864) #define _LCD_CONTRAST_INIT 220 #elif ENABLED(ULTI_CONTROLLER) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index b482065666fb..127dfb7c7a17 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -155,6 +155,17 @@ #define DOGLCD_SCK PB13 #define DOGLCD_MOSI PB15 + #elif ENABLED(MKS_MINI_12864_V3) + #define ENABLE_SPI3 + #define DOGLCD_CS PA4 + #define DOGLCD_A0 PA5 + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN PA6 + #define NEOPIXEL_PIN PA7 + #define DOGLCD_MOSI PB15 + #define DOGLCD_SCK PB13 + #else #define LCD_PINS_D4 PA6 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 3a203aab4978..3c3e604f28e8 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -231,10 +231,19 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define SDIO_SUPPORT -#define SDIO_CLOCK 4500000 // 4.5 MHz -#define SD_DETECT_PIN PD12 -#define ONBOARD_SD_CS_PIN PC11 +#if SD_CONNECTION_IS(ONBOARD) + #define SDIO_SUPPORT + #define SDIO_CLOCK 4500000 // 4.5 MHz + #define SD_DETECT_PIN PD12 + #define ONBOARD_SD_CS_PIN PC11 +#elif SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS PE10 + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PE12 +#endif // // LCD / Controller @@ -291,8 +300,13 @@ #endif #if HAS_WIRED_LCD && !HAS_SPI_TFT - - // NON TFT Displays + #define BEEPER_PIN PC5 + #define BTN_ENC PE13 + #define LCD_PINS_ENABLE PD13 + #define LCD_PINS_RS PC6 + #define BTN_EN1 PE8 + #define BTN_EN2 PE11 + #define LCD_BACKLIGHT_PIN -1 #if ENABLED(MKS_MINI_12864) @@ -318,6 +332,19 @@ #ifndef BEEPER_PIN #define BEEPER_PIN -1 #endif + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS PD13 + #define DOGLCD_A0 PC6 + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN PE14 + #define NEOPIXEL_PIN PE15 + #define DOGLCD_MOSI PA7 + #define DOGLCD_SCK PA5 + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif #else // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 9ae2870a4053..589fcf24df3a 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -243,7 +243,7 @@ // // LCD / Controller #define SPI_FLASH -#define HAS_SPI_FLASH 1 +#define HAS_SPI_FLASH 1 #define SPI_DEVICE 2 #define SPI_FLASH_SIZE 0x1000000 #if ENABLED(SPI_FLASH) @@ -340,6 +340,19 @@ // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B //#undef SHOW_BOOTSCREEN + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS PD13 + #define DOGLCD_A0 PC6 + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN PE14 + #define NEOPIXEL_PIN PE15 + #define DOGLCD_MOSI PA7 + #define DOGLCD_SCK PA5 + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif #else // !MKS_MINI_12864 From 3ba5eda0b28498a3e557669496e0d6ffec875876 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Fri, 9 Jul 2021 19:24:14 -0400 Subject: [PATCH 042/323] =?UTF-8?q?=F0=9F=93=BA=20ExtUI=20pause=20state=20?= =?UTF-8?q?response=20(#22164)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/gcode.h | 1 + Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/lcd/extui/ui_api.cpp | 15 +++++++++++-- Marlin/src/lcd/extui/ui_api.h | 36 ++++++++++++++++++------------ Marlin/src/lcd/marlinui.cpp | 34 ++++++++++++++++++++++++++++ Marlin/src/lcd/marlinui.h | 4 ++-- 6 files changed, 73 insertions(+), 19 deletions(-) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 6f889e85584d..6b9d0eb47d66 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -424,6 +424,7 @@ class GcodeSuite { static uint8_t host_keepalive_interval; static void host_keepalive(); + static inline bool host_keepalive_is_paused() { return busy_state >= PAUSED_FOR_USER; } #define KEEPALIVE_STATE(N) REMEMBER(_KA_, gcode.busy_state, gcode.N) #else diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index f4bb862db91d..dde5edb522f5 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3266,7 +3266,7 @@ * Advanced Pause - Filament Change */ #if ENABLED(ADVANCED_PAUSE_FEATURE) - #if HAS_LCD_MENU || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) + #if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) #define M600_PURGE_MORE_RESUMABLE 1 #endif #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index df735278126e..7173790262a1 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -102,6 +102,10 @@ #include "../../feature/host_actions.h" #endif +#if M600_PURGE_MORE_RESUMABLE + #include "../../feature/pause.h" +#endif + namespace ExtUI { static struct { uint8_t printer_killed : 1; @@ -381,7 +385,8 @@ namespace ExtUI { return !thermalManager.tooColdToExtrude(extruder - E0); } - GcodeSuite::MarlinBusyState getMachineBusyState() { return TERN0(HOST_KEEPALIVE_FEATURE, GcodeSuite::busy_state); } + GcodeSuite::MarlinBusyState getHostKeepaliveState() { return TERN0(HOST_KEEPALIVE_FEATURE, gcode.busy_state); } + bool getHostKeepaliveIsPaused() { return TERN0(HOST_KEEPALIVE_FEATURE, gcode.host_keepalive_is_paused()); } #if HAS_SOFTWARE_ENDSTOPS bool getSoftEndstopState() { return soft_endstop._enabled; } @@ -1025,9 +1030,15 @@ namespace ExtUI { TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); } - bool awaitingUserConfirm() { return TERN0(HAS_RESUME_CONTINUE, wait_for_user); } + bool awaitingUserConfirm() { + return TERN0(HAS_RESUME_CONTINUE, wait_for_user) || getHostKeepaliveIsPaused(); + } void setUserConfirmed() { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); } + #if M600_PURGE_MORE_RESUMABLE + void setPauseMenuResponse(PauseMenuResponse response) { pause_menu_response = response; } + #endif + void printFile(const char *filename) { TERN(SDSUPPORT, card.openAndPrintFile(filename), UNUSED(filename)); } diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 5efd74b8dff4..faa6c8f41a85 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -45,6 +45,9 @@ #include "../../inc/MarlinConfig.h" #include "../marlinui.h" #include "../../gcode/gcode.h" +#if M600_PURGE_MORE_RESUMABLE + #include "../../feature/pause.h" +#endif namespace ExtUI { @@ -79,7 +82,8 @@ namespace ExtUI { void injectCommands(char * const); bool commandsInQueue(); - GcodeSuite::MarlinBusyState getMachineBusyState(); + GcodeSuite::MarlinBusyState getHostKeepaliveState(); + bool getHostKeepaliveIsPaused(); bool isHeaterIdle(const heater_t); bool isHeaterIdle(const extruder_t); @@ -220,14 +224,18 @@ namespace ExtUI { void setFeedrate_mm_s(const feedRate_t); void setMinFeedrate_mm_s(const feedRate_t); void setMinTravelFeedrate_mm_s(const feedRate_t); - void setPrintingAcceleration_mm_s2(const_float_t ); - void setRetractAcceleration_mm_s2(const_float_t ); - void setTravelAcceleration_mm_s2(const_float_t ); - void setFeedrate_percent(const_float_t ); + void setPrintingAcceleration_mm_s2(const_float_t); + void setRetractAcceleration_mm_s2(const_float_t); + void setTravelAcceleration_mm_s2(const_float_t); + void setFeedrate_percent(const_float_t); void setFlow_percent(const int16_t, const extruder_t); bool awaitingUserConfirm(); void setUserConfirmed(); + #if M600_PURGE_MORE_RESUMABLE + void setPauseMenuResponse(PauseMenuResponse); + #endif + #if ENABLED(LIN_ADVANCE) float getLinearAdvance_mm_mm_s(const extruder_t); void setLinearAdvance_mm_mm_s(const_float_t, const extruder_t); @@ -235,7 +243,7 @@ namespace ExtUI { #if HAS_JUNCTION_DEVIATION float getJunctionDeviation_mm(); - void setJunctionDeviation_mm(const_float_t ); + void setJunctionDeviation_mm(const_float_t); #else float getAxisMaxJerk_mm_s(const axis_t); float getAxisMaxJerk_mm_s(const extruder_t); @@ -262,7 +270,7 @@ namespace ExtUI { #endif float getZOffset_mm(); - void setZOffset_mm(const_float_t ); + void setZOffset_mm(const_float_t); #if HAS_BED_PROBE float getProbeOffset_mm(const axis_t); @@ -274,11 +282,11 @@ namespace ExtUI { void setAxisBacklash_mm(const_float_t, const axis_t); float getBacklashCorrection_percent(); - void setBacklashCorrection_percent(const_float_t ); + void setBacklashCorrection_percent(const_float_t); #ifdef BACKLASH_SMOOTHING_MM float getBacklashSmoothing_mm(); - void setBacklashSmoothing_mm(const_float_t ); + void setBacklashSmoothing_mm(const_float_t); #endif #endif @@ -290,7 +298,7 @@ namespace ExtUI { #if HAS_FILAMENT_RUNOUT_DISTANCE float getFilamentRunoutDistance_mm(); - void setFilamentRunoutDistance_mm(const_float_t ); + void setFilamentRunoutDistance_mm(const_float_t); #endif #endif @@ -300,7 +308,7 @@ namespace ExtUI { #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) float getCaseLightBrightness_percent(); - void setCaseLightBrightness_percent(const_float_t ); + void setCaseLightBrightness_percent(const_float_t); #endif #endif @@ -309,15 +317,15 @@ namespace ExtUI { float getPIDValues_Ki(const extruder_t); float getPIDValues_Kd(const extruder_t); void setPIDValues(const_float_t, const_float_t , const_float_t , extruder_t); - void startPIDTune(const_float_t, extruder_t); + void startPIDTune(const celsius_t, extruder_t); #endif #if ENABLED(PIDTEMPBED) float getBedPIDValues_Kp(); float getBedPIDValues_Ki(); float getBedPIDValues_Kd(); - void setBedPIDValues(const_float_t, const_float_t , const_float_t ); - void startBedPIDTune(const_float_t ); + void setBedPIDValues(const_float_t, const_float_t , const_float_t); + void startBedPIDTune(const celsius_t); #endif /** diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 6741de3e408b..0cb476c04bbc 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1661,6 +1661,40 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; } #endif +#if BOTH(EXTENSIBLE_UI, ADVANCED_PAUSE_FEATURE) + + void MarlinUI::pause_show_message( + const PauseMessage message, + const PauseMode mode/*=PAUSE_MODE_SAME*/, + const uint8_t extruder/*=active_extruder*/ + ) { + if (mode == PAUSE_MODE_SAME) + return; + pause_mode = mode; + switch (message) { + case PAUSE_MESSAGE_PARKING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PAUSE_PRINT_PARKING)); + case PAUSE_MESSAGE_CHANGING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INIT)); + case PAUSE_MESSAGE_UNLOAD: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_UNLOAD)); + case PAUSE_MESSAGE_WAITING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_ADVANCED_PAUSE_WAITING)); + case PAUSE_MESSAGE_INSERT: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INSERT)); + case PAUSE_MESSAGE_LOAD: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_LOAD)); + case PAUSE_MESSAGE_PURGE: + #if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE) + ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_CONT_PURGE)); + #else + ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE)); + #endif + case PAUSE_MESSAGE_RESUME: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_RESUME)); + case PAUSE_MESSAGE_HEAT: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEAT)); + case PAUSE_MESSAGE_HEATING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEATING)); + case PAUSE_MESSAGE_OPTION: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_OPTION_HEADER)); + case PAUSE_MESSAGE_STATUS: + default: break; + } + } + +#endif + #if ENABLED(EEPROM_SETTINGS) #if HAS_LCD_MENU diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 56ef741b543a..bf7215d38357 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -55,7 +55,7 @@ #include "../module/printcounter.h" #endif -#if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE) +#if ENABLED(ADVANCED_PAUSE_FEATURE) && EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) #include "../feature/pause.h" #include "../module/motion.h" // for active_extruder #endif @@ -551,7 +551,7 @@ class MarlinUI { static inline bool use_click() { return false; } #endif - #if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE) + #if ENABLED(ADVANCED_PAUSE_FEATURE) && EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder); #else static inline void _pause_show_message() {} From e487900069368003c7feb1d23ba7c73fe4f1ee7f Mon Sep 17 00:00:00 2001 From: Skruppy Date: Sat, 10 Jul 2021 01:25:47 +0200 Subject: [PATCH 043/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20HAS=5FKILL=20&&=20?= =?UTF-8?q?SOFT=5FRESET=5FON=5FKILL=20soft=20reset=20button=20logic=20(#22?= =?UTF-8?q?269)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 18965bcbb9c1..51ed99f97585 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -890,11 +890,11 @@ void minkill(const bool steppers_off/*=false*/) { #if EITHER(HAS_KILL, SOFT_RESET_ON_KILL) // Wait for both KILL and ENC to be released - while (TERN0(HAS_KILL, !kill_state()) || TERN0(SOFT_RESET_ON_KILL, !ui.button_pressed())) + while (TERN0(HAS_KILL, kill_state()) || TERN0(SOFT_RESET_ON_KILL, ui.button_pressed())) watchdog_refresh(); - // Wait for either KILL or ENC press - while (TERN1(HAS_KILL, kill_state()) && TERN1(SOFT_RESET_ON_KILL, ui.button_pressed())) + // Wait for either KILL or ENC to be pressed again + while (TERN1(HAS_KILL, !kill_state()) && TERN1(SOFT_RESET_ON_KILL, !ui.button_pressed())) watchdog_refresh(); // Reboot the board From 6547b16c455a420651ed5116818b43f3e279830c Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 10 Jul 2021 00:56:46 +0000 Subject: [PATCH 044/323] [cron] Bump distribution date (2021-07-10) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index dffab6e6001f..6c92ec78e84a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-09" +//#define STRING_DISTRIBUTION_DATE "2021-07-10" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2ee567cc612d..9e0161b88a30 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-09" + #define STRING_DISTRIBUTION_DATE "2021-07-10" #endif /** From bd60d779041b05d844102237109c3fd98d56f891 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 9 Jul 2021 22:24:43 -0500 Subject: [PATCH 045/323] =?UTF-8?q?=F0=9F=8E=A8=20Strip=20trailing=20white?= =?UTF-8?q?space?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 2 +- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 2 +- .../extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py | 2 +- .../extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py | 4 ++-- Marlin/src/lcd/language/language_hu.h | 2 +- Marlin/src/lcd/lcdprint.cpp | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 5a38ddda0f06..576e401ce052 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2416,7 +2416,7 @@ // // MKS MINI12864 V3 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight. -// +// //#define MKS_MINI_12864_V3 // diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 726eb2cc39d8..f6ed2275397f 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -370,7 +370,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop if (mark_as_selected(row, style & SS_INVERT)) { pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed - + const int plen = pstr ? calculateWidth(pstr) : 0, vlen = vstr ? utf8_strlen(vstr) : 0; if (style & SS_CENTER) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py index 25919c3c4dd6..6aa8947b9858 100755 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py @@ -31,7 +31,7 @@ def deflate(data): args = parser.parse_args() varname = os.path.splitext(os.path.basename(args.input))[0]; - + with open(args.input, "rb") as in_file: data = in_file.read() if args.deflate: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py index 5908f5bf1772..74be57430049 100755 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py @@ -29,13 +29,13 @@ def __init__(self, mode): self.mode = mode self.offset = 8 self.byte = 0 - + def finish_byte(self): if self.offset != 8: self.values.append(self.byte) self.offset = 8 self.byte = 0 - + def add_bits_to_byte(self, value, size = 1): self.offset -= size self.byte = self.byte | value << self.offset diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index ebbc4b2df720..d4ff151f579e 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -736,7 +736,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Kalibrálási hiba"); PROGMEM Language_Str MSG_DRIVER_BACKWARD = _UxGT(" meghajtók hátra"); - + PROGMEM Language_Str MSG_SD_CARD = _UxGT("SD Kártya"); PROGMEM Language_Str MSG_USB_DISK = _UxGT("USB Lemez"); } diff --git a/Marlin/src/lcd/lcdprint.cpp b/Marlin/src/lcd/lcdprint.cpp index c421ef1a0330..eef27dbdb4bc 100644 --- a/Marlin/src/lcd/lcdprint.cpp +++ b/Marlin/src/lcd/lcdprint.cpp @@ -86,7 +86,7 @@ int calculateWidth(PGM_P const pstr) { const uint8_t prop = 2; uint8_t *p = (uint8_t*)pstr; int n = 0; - + do { wchar_t ch; p = get_utf8_value_cb(p, read_byte_rom, &ch); diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 3c3e604f28e8..7bbc2b26da7f 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -332,7 +332,7 @@ #ifndef BEEPER_PIN #define BEEPER_PIN -1 #endif - + #elif ENABLED(MKS_MINI_12864_V3) #define DOGLCD_CS PD13 #define DOGLCD_A0 PC6 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 589fcf24df3a..091a3362320b 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -340,7 +340,7 @@ // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B //#undef SHOW_BOOTSCREEN - + #elif ENABLED(MKS_MINI_12864_V3) #define DOGLCD_CS PD13 #define DOGLCD_A0 PC6 From 95f96fec13eecafede6751a8b97828859005e95a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 11 Jul 2021 01:03:04 +0000 Subject: [PATCH 046/323] [cron] Bump distribution date (2021-07-11) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 6c92ec78e84a..014669f45da4 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-10" +//#define STRING_DISTRIBUTION_DATE "2021-07-11" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 9e0161b88a30..fc73e30033b0 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-10" + #define STRING_DISTRIBUTION_DATE "2021-07-11" #endif /** From ec84770c22e1097ed794441dac60dbb3294a0c87 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 11 Jul 2021 13:18:16 -0500 Subject: [PATCH 047/323] =?UTF-8?q?=F0=9F=9A=B8=20Limit=20LCD=20delta=20en?= =?UTF-8?q?dstop=20adjustment=20like=20M666?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In reference to #22325 --- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 195afecc1b74..e6d23b1fae2f 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -105,7 +105,7 @@ void lcd_delta_settings() { START_MENU(); BACK_ITEM(MSG_DELTA_CALIBRATE); EDIT_ITEM(float52sign, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10, delta_height + 10, _recalc_delta_settings); - #define EDIT_ENDSTOP_ADJ(LABEL,N) EDIT_ITEM_P(float43, PSTR(LABEL), &delta_endstop_adj.N, -5, 5, _recalc_delta_settings) + #define EDIT_ENDSTOP_ADJ(LABEL,N) EDIT_ITEM_P(float43, PSTR(LABEL), &delta_endstop_adj.N, -5, 0, _recalc_delta_settings) EDIT_ENDSTOP_ADJ("Ex", a); EDIT_ENDSTOP_ADJ("Ey", b); EDIT_ENDSTOP_ADJ("Ez", c); From 01ae1ced386c71bde6ae75137200ff23bd187cbb Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 11 Jul 2021 18:25:51 -0500 Subject: [PATCH 048/323] =?UTF-8?q?=F0=9F=9A=B8=20M666:=20Fix=20value=20fi?= =?UTF-8?q?lter,=20add=20report=20(#22337)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In reference to #22325 --- Marlin/src/gcode/calibrate/M666.cpp | 74 +++++++++++++------ .../src/gcode/feature/controllerfan/M710.cpp | 4 +- Marlin/src/module/settings.cpp | 43 +++-------- 3 files changed, 62 insertions(+), 59 deletions(-) diff --git a/Marlin/src/gcode/calibrate/M666.cpp b/Marlin/src/gcode/calibrate/M666.cpp index 8ff51f0e3f83..872344e4e923 100644 --- a/Marlin/src/gcode/calibrate/M666.cpp +++ b/Marlin/src/gcode/calibrate/M666.cpp @@ -27,30 +27,72 @@ #include "../gcode.h" #if ENABLED(DELTA) - #include "../../module/delta.h" #include "../../module/motion.h" +#else + #include "../../module/endstops.h" +#endif - #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) - #include "../../core/debug_out.h" +#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) +#include "../../core/debug_out.h" + +void M666_report(const bool forReplay=true) { + if (!forReplay) { SERIAL_ECHOLNPGM("; Endstop adjustment:"); SERIAL_ECHO_START(); } + #if ENABLED(DELTA) + SERIAL_ECHOLNPAIR_P( + PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) + , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) + , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) + ); + #else + SERIAL_ECHOPGM(" M666"); + #if ENABLED(X_DUAL_ENDSTOPS) + SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); + #endif + #if ENABLED(Y_DUAL_ENDSTOPS) + SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) + #if NUM_Z_STEPPER_DRIVERS >= 3 + SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + if (!forReplay) SERIAL_ECHO_START(); + SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + #if NUM_Z_STEPPER_DRIVERS >= 4 + if (!forReplay) SERIAL_ECHO_START(); + SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); + #endif + #else + SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); + #endif + #endif + #endif +} + +#if ENABLED(DELTA) /** * M666: Set delta endstop adjustment */ void GcodeSuite::M666() { DEBUG_SECTION(log_M666, "M666", DEBUGGING(LEVELING)); + bool is_err = false, is_set = false; LOOP_LINEAR_AXES(i) { if (parser.seen(AXIS_CHAR(i))) { + is_set = true; const float v = parser.value_linear_units(); - if (v * Z_HOME_DIR <= 0) delta_endstop_adj[i] = v; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", delta_endstop_adj[i]); + if (v > 0) + is_err = true; + else { + delta_endstop_adj[i] = v; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v); + } } } + if (is_err) SERIAL_ECHOLNPAIR("?M666 offsets must be <= 0"); + if (!is_set) M666_report(); } -#elif HAS_EXTRA_ENDSTOPS - - #include "../../module/endstops.h" +#else /** * M666: Set Dual Endstops offsets for X, Y, and/or Z. @@ -81,21 +123,7 @@ #endif } #endif - if (!parser.seen("XYZ")) { - auto echo_adj = [](PGM_P const label, const_float_t value) { SERIAL_ECHOPAIR_P(label, value); }; - SERIAL_ECHOPGM("Dual Endstop Adjustment (mm): "); - #if ENABLED(X_DUAL_ENDSTOPS) - echo_adj(PSTR(" X2:"), endstops.x2_endstop_adj); - #endif - #if ENABLED(Y_DUAL_ENDSTOPS) - echo_adj(PSTR(" Y2:"), endstops.y2_endstop_adj); - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - #define _ECHO_ZADJ(N) echo_adj(PSTR(" Z" STRINGIFY(N) ":"), endstops.z##N##_endstop_adj); - REPEAT_S(2, INCREMENT(NUM_Z_STEPPER_DRIVERS), _ECHO_ZADJ) - #endif - SERIAL_EOL(); - } + if (!parser.seen("XYZ")) M666_report(); } #endif // HAS_EXTRA_ENDSTOPS diff --git a/Marlin/src/gcode/feature/controllerfan/M710.cpp b/Marlin/src/gcode/feature/controllerfan/M710.cpp index cc450732baed..aa382a3ea9eb 100644 --- a/Marlin/src/gcode/feature/controllerfan/M710.cpp +++ b/Marlin/src/gcode/feature/controllerfan/M710.cpp @@ -27,7 +27,7 @@ #include "../../gcode.h" #include "../../../feature/controllerfan.h" -void M710_report(const bool forReplay) { +void M710_report(const bool forReplay=true) { if (!forReplay) { SERIAL_ECHOLNPGM("; Controller Fan"); SERIAL_ECHO_START(); } SERIAL_ECHOLNPAIR(" M710" " S", int(controllerFan.settings.active_speed), @@ -75,7 +75,7 @@ void GcodeSuite::M710() { if (seenD) controllerFan.settings.duration = parser.value_ushort(); if (!(seenR || seenS || seenI || seenA || seenD)) - M710_report(false); + M710_report(); } #endif // CONTROLLER_FAN_EDITABLE diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 8c3e9fb75cf3..cc4d69f58192 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -130,7 +130,7 @@ #include "../feature/controllerfan.h" #if ENABLED(CONTROLLER_FAN_EDITABLE) - void M710_report(const bool forReplay); + void M710_report(const bool forReplay=true); #endif #if ENABLED(CASE_LIGHT_ENABLE) @@ -168,6 +168,10 @@ void M554_report(); #endif +#if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) + void M666_report(const bool forReplay=true); +#endif + #define _EN_ITEM(N) , E##N typedef struct { uint16_t LINEAR_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM); } tmc_stepper_current_t; @@ -3302,14 +3306,6 @@ void MarlinSettings::reset() { #elif ENABLED(DELTA) - CONFIG_ECHO_HEADING("Endstop adjustment:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) - , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) - , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) - ); - CONFIG_ECHO_HEADING("Delta settings: L R H S XYZ ABC"); CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR_P( @@ -3325,32 +3321,11 @@ void MarlinSettings::reset() { , PSTR(" C"), LINEAR_UNIT(delta_diagonal_rod_trim.c) ); - #elif HAS_EXTRA_ENDSTOPS - - CONFIG_ECHO_HEADING("Endstop adjustment:"); - CONFIG_ECHO_START(); - SERIAL_ECHOPGM(" M666"); - #if ENABLED(X_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); - #endif - #if ENABLED(Y_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - #if NUM_Z_STEPPER_DRIVERS >= 3 - SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); - CONFIG_ECHO_START(); - SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); - #if NUM_Z_STEPPER_DRIVERS >= 4 - CONFIG_ECHO_START(); - SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); - #endif - #else - SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); - #endif - #endif + #endif - #endif // [XYZ]_DUAL_ENDSTOPS + #if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) + M666_report(forReplay); + #endif #if PREHEAT_COUNT From 4b63578a10b1443ab60a68a62421fc81be9e86a3 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 12 Jul 2021 00:56:59 +0000 Subject: [PATCH 049/323] [cron] Bump distribution date (2021-07-12) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 014669f45da4..c2df42881adc 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-11" +//#define STRING_DISTRIBUTION_DATE "2021-07-12" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index fc73e30033b0..b8a83e02caa5 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-11" + #define STRING_DISTRIBUTION_DATE "2021-07-12" #endif /** From 2f6c8e1176202a014c2a038846cb0403cd2cafe0 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Sun, 11 Jul 2021 18:41:33 -0700 Subject: [PATCH 050/323] =?UTF-8?q?=E2=9C=A8=20Add=20TEMP=5FSENSOR=5FBOARD?= =?UTF-8?q?=20(#22279)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 15 +- Marlin/Configuration_adv.h | 40 +++-- Marlin/src/MarlinCore.cpp | 4 +- Marlin/src/core/language.h | 3 + Marlin/src/feature/controllerfan.cpp | 11 +- Marlin/src/inc/Conditionals_adv.h | 23 +++ Marlin/src/inc/Conditionals_post.h | 91 +++++++----- Marlin/src/inc/SanityCheck.h | 136 ++++++++++------- Marlin/src/module/temperature.cpp | 137 ++++++++++++++---- Marlin/src/module/temperature.h | 41 +++++- Marlin/src/module/thermistor/thermistors.h | 18 +++ Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 2 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 +- Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 9 +- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 2 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 1 + 16 files changed, 378 insertions(+), 157 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 576e401ce052..bdeb8d8501e2 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -474,7 +474,7 @@ * NOTE: ADC pins are not 5V tolerant. Not recommended because it's possible to damage the CPU by going over 500°C. * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x * - * Custom/Dummy/Other Thermos + * Custom/Dummy/Other Thermal Sensors * ------ * 0 : not used * 1000 : Custom - Specify parameters in Configuration_adv.h @@ -496,6 +496,7 @@ #define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_CHAMBER 0 #define TEMP_SENSOR_COOLER 0 +#define TEMP_SENSOR_BOARD 0 #define TEMP_SENSOR_REDUNDANT 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 @@ -528,17 +529,11 @@ * the print will be aborted. Whichever sensor is selected will have its normal functions disabled; i.e. selecting * the Bed sensor (-1) will disable bed heating/monitoring. * - * Use the following to select temp sensors: - * -5 : Cooler - * -4 : Probe - * -3 : not used - * -2 : Chamber - * -1 : Bed - * 0-7 : E0 through E7 + * For selecting source/target use: COOLER, PROBE, BOARD, CHAMBER, BED, E0, E1, E2, E3, E4, E5, E6, E7 */ #if TEMP_SENSOR_REDUNDANT - #define TEMP_SENSOR_REDUNDANT_SOURCE 1 // The sensor that will provide the redundant reading. - #define TEMP_SENSOR_REDUNDANT_TARGET 0 // The sensor that we are providing a redundant reading for. + #define TEMP_SENSOR_REDUNDANT_SOURCE E1 // The sensor that will provide the redundant reading. + #define TEMP_SENSOR_REDUNDANT_TARGET E0 // The sensor that we are providing a redundant reading for. #define TEMP_SENSOR_REDUNDANT_MAX_DIFF 10 // (°C) Temperature difference that will trigger a print abort. #endif diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 6a7219383b2a..e99e1f7c0960 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -125,6 +125,12 @@ #define PROBE_BETA 3950 // Beta value #endif +#if TEMP_SENSOR_BOARD == 1000 + #define BOARD_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BOARD_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BOARD_BETA 3950 // Beta value +#endif + #if TEMP_SENSOR_REDUNDANT == 1000 #define REDUNDANT_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor #define REDUNDANT_RESISTANCE_25C_OHMS 100000 // Resistance at 25C @@ -224,6 +230,18 @@ #endif #endif +// +// Motherboard Sensor options +// +#if TEMP_SENSOR_BOARD + #define THERMAL_PROTECTION_BOARD // Halt the printer if the board sensor leaves the temp range below. + #define BOARD_MINTEMP 8 // (°C) + #define BOARD_MAXTEMP 70 // (°C) + #ifndef TEMP_BOARD_PIN + //#define TEMP_BOARD_PIN -1 // Board temp sensor pin, if not set in pins file. + #endif +#endif + // // Laser Coolant Flow Meter // @@ -480,16 +498,20 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - //#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered - //#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled. - #define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.) - #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled - #define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled - #define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors - //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered + //#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled. + #define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.) + #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled + #define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled + #define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors + + // Use TEMP_SENSOR_BOARD as a trigger for enabling the controller fan + //#define CONTROLLER_FAN_MIN_BOARD_TEMP 40 // (°C) Turn on the fan if the board reaches this temperature + + //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings #if ENABLED(CONTROLLER_FAN_EDITABLE) - #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu + #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu #endif #endif diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 51ed99f97585..92965c743e31 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1168,10 +1168,10 @@ void setup() { SETUP_RUN(HAL_init()); // Init and disable SPI thermocouples; this is still needed - #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0) + #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0)) OUT_WRITE(TEMP_0_CS_PIN, HIGH); // Disable #endif - #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1) + #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1)) OUT_WRITE(TEMP_1_CS_PIN, HIGH); #endif diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 8e97ec66a981..8de839759322 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -231,6 +231,9 @@ #define STR_HEATER_BED "bed" #define STR_HEATER_CHAMBER "chamber" #define STR_COOLER "cooler" +#define STR_MOTHERBOARD "motherboard" +#define STR_PROBE "probe" +#define STR_REDUNDANT "redundant " #define STR_LASER_TEMP "laser temperature" #define STR_STOPPED_HEATER ", system stopped! Heater_ID: " diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp index 020646775253..35f567fa8fee 100644 --- a/Marlin/src/feature/controllerfan.cpp +++ b/Marlin/src/feature/controllerfan.cpp @@ -76,9 +76,14 @@ void ControllerFan::update() { ) ); - // If any of the drivers or the heated bed are enabled... - if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)) - lastMotorOn = ms; //... set time to NOW so the fan will turn on + // If any triggers for the controller fan are true... + // - At least one stepper driver is enabled + // - The heated bed is enabled + // - TEMP_SENSOR_BOARD is reporting >= CONTROLLER_FAN_MIN_BOARD_TEMP + if ( motor_on + || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0) + || TERN0(HAS_CONTROLLER_FAN_MIN_BOARD_TEMP, thermalManager.wholeDegBoard() >= CONTROLLER_FAN_MIN_BOARD_TEMP) + ) lastMotorOn = ms; //... set time to NOW so the fan will turn on // Fan Settings. Set fan > 0: // - If AutoMode is on and steppers have been enabled for CONTROLLERFAN_IDLE_TIME seconds. diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index f88d28e1a108..33ed0dad38a4 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -125,6 +125,29 @@ #undef THERMAL_PROTECTION_COOLER #endif +// Usurp a sensor to do redundant readings +#if TEMP_SENSOR_REDUNDANT + #define REDUNDANT_TEMP_MATCH(M,N) (TEMP_SENSOR_REDUNDANT_##M == HID_##N) +#else + #define REDUNDANT_TEMP_MATCH(...) 0 +#endif + +// Temperature sensor IDs +#define HID_REDUNDANT -6 +#define HID_COOLER -5 +#define HID_PROBE -4 +#define HID_BOARD -3 +#define HID_CHAMBER -2 +#define HID_BED -1 +#define HID_E0 0 +#define HID_E1 1 +#define HID_E2 2 +#define HID_E3 3 +#define HID_E4 4 +#define HID_E5 5 +#define HID_E6 6 +#define HID_E7 7 + #if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS)) #define HAS_MIXER_SYNC_CHANNEL 1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index dde5edb522f5..d62debf7553f 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -532,84 +532,84 @@ // Usurp a sensor to do redundant readings #if TEMP_SENSOR_REDUNDANT #ifndef TEMP_SENSOR_REDUNDANT_SOURCE - #define TEMP_SENSOR_REDUNDANT_SOURCE 1 + #define TEMP_SENSOR_REDUNDANT_SOURCE E1 #endif #ifndef TEMP_SENSOR_REDUNDANT_TARGET - #define TEMP_SENSOR_REDUNDANT_TARGET 0 + #define TEMP_SENSOR_REDUNDANT_TARGET E0 #endif #if !PIN_EXISTS(TEMP_REDUNDANT) #ifndef TEMP_SENSOR_REDUNDANT_MAX_DIFF #define TEMP_SENSOR_REDUNDANT_MAX_DIFF 10 #endif - #if TEMP_SENSOR_REDUNDANT_SOURCE == -5 + #if REDUNDANT_TEMP_MATCH(SOURCE, COOLER) #if !PIN_EXISTS(TEMP_COOLER) #error "TEMP_SENSOR_REDUNDANT_SOURCE set to COOLER requires TEMP_COOLER_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_COOLER_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -4 + #elif REDUNDANT_TEMP_MATCH(SOURCE, PROBE) #if !PIN_EXISTS(TEMP_PROBE) #error "TEMP_SENSOR_REDUNDANT_SOURCE set to PROBE requires TEMP_PROBE_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_PROBE_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -2 + #elif REDUNDANT_TEMP_MATCH(SOURCE, CHAMBER) #if !PIN_EXISTS(TEMP_CHAMBER) #error "TEMP_SENSOR_REDUNDANT_SOURCE set to CHAMBER requires TEMP_CHAMBER_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_CHAMBER_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -1 + #elif REDUNDANT_TEMP_MATCH(SOURCE, BED) #if !PIN_EXISTS(TEMP_BED) #error "TEMP_SENSOR_REDUNDANT_SOURCE set to BED requires TEMP_BED_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_BED_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 0 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E0) #if !PIN_EXISTS(TEMP_0) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 0 requires TEMP_0_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E0 requires TEMP_0_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_0_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 1 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E1) #if !PIN_EXISTS(TEMP_1) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 1 requires TEMP_1_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E1 requires TEMP_1_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_1_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 2 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E2) #if !PIN_EXISTS(TEMP_2) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 2 requires TEMP_2_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E2 requires TEMP_2_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_2_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 3 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E3) #if !PIN_EXISTS(TEMP_3) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 3 requires TEMP_3_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E3 requires TEMP_3_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_3_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 4 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E4) #if !PIN_EXISTS(TEMP_4) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 4 requires TEMP_4_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E4 requires TEMP_4_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_4_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 5 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E5) #if !PIN_EXISTS(TEMP_5) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 5 requires TEMP_5_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E5 requires TEMP_5_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_5_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 6 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E6) #if !PIN_EXISTS(TEMP_6) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 6 requires TEMP_6_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E6 requires TEMP_6_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_6_PIN #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 7 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E7) #if !PIN_EXISTS(TEMP_7) - #error "TEMP_SENSOR_REDUNDANT_SOURCE set to 7 requires TEMP_7_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E7 requires TEMP_7_PIN." #else #define TEMP_REDUNDANT_PIN TEMP_7_PIN #endif @@ -699,7 +699,7 @@ #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1 #if TEMP_SENSOR_REDUNDANT == -5 - #if TEMP_SENSOR_REDUNDANT_SOURCE != 0 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." #endif @@ -707,7 +707,7 @@ #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 #elif TEMP_SENSOR_REDUNDANT == -3 - #if TEMP_SENSOR_REDUNDANT_SOURCE != 0 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." #endif @@ -715,7 +715,7 @@ #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270 #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800 #elif TEMP_SENSOR_REDUNDANT == -2 - #if TEMP_SENSOR_REDUNDANT_SOURCE != 0 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." #endif @@ -725,13 +725,13 @@ #endif // mimic setting up the source TEMP_SENSOR - #if TEMP_SENSOR_REDUNDANT_SOURCE == 0 + #if REDUNDANT_TEMP_MATCH(SOURCE, E0) #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX #ifndef MAX31865_SENSOR_WIRES_0 #define MAX31865_SENSOR_WIRES_0 2 #endif - #elif TEMP_SENSOR_REDUNDANT_SOURCE == 1 + #elif REDUNDANT_TEMP_MATCH(SOURCE, E1) #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX #ifndef MAX31865_SENSOR_WIRES_1 @@ -780,7 +780,7 @@ #if HAS_MAX_TC // Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines. - #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1) + #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1)) #if !PIN_EXISTS(TEMP_0_CS) // SS, CS #if PIN_EXISTS(MAX6675_SS) @@ -849,7 +849,7 @@ #endif // TEMP_SENSOR_0_IS_MAX_TC - #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1) + #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1)) #if !PIN_EXISTS(TEMP_1_CS) // SS2, CS2 #if PIN_EXISTS(MAX6675_SS2) @@ -2584,6 +2584,9 @@ #if HAS_ADC_TEST(COOLER) #define HAS_TEMP_ADC_COOLER 1 #endif +#if HAS_ADC_TEST(BOARD) + #define HAS_TEMP_ADC_BOARD 1 +#endif #if HAS_ADC_TEST(REDUNDANT) #define HAS_TEMP_ADC_REDUNDANT 1 #endif @@ -2604,6 +2607,9 @@ #if HAS_TEMP(COOLER) #define HAS_TEMP_COOLER 1 #endif +#if HAS_TEMP(BOARD) + #define HAS_TEMP_BOARD 1 +#endif #if HAS_TEMP(REDUNDANT) #define HAS_TEMP_REDUNDANT 1 #endif @@ -2675,7 +2681,8 @@ #if HAS_HEATED_BED || HAS_TEMP_CHAMBER #define BED_OR_CHAMBER 1 #endif -#if HAS_TEMP_HOTEND || BED_OR_CHAMBER || HAS_TEMP_PROBE || HAS_TEMP_COOLER + +#if HAS_TEMP_HOTEND || BED_OR_CHAMBER || HAS_TEMP_PROBE || HAS_TEMP_COOLER || HAS_TEMP_BOARD #define HAS_TEMP_SENSOR 1 #endif @@ -2813,9 +2820,6 @@ #endif #undef _NOT_E_AUTO #undef _HAS_FAN -#if PIN_EXISTS(CONTROLLER_FAN) - #define HAS_CONTROLLER_FAN 1 -#endif #if BED_OR_CHAMBER || HAS_FAN0 #define BED_OR_CHAMBER_OR_FAN 1 @@ -2892,6 +2896,27 @@ #define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default #endif +/** + * Controller Fan Settings + */ +#if PIN_EXISTS(CONTROLLER_FAN) + #define HAS_CONTROLLER_FAN 1 + #if CONTROLLER_FAN_MIN_BOARD_TEMP + #define HAS_CONTROLLER_FAN_MIN_BOARD_TEMP 1 + #endif +#endif + +#if HAS_CONTROLLER_FAN + #if ENABLED(CONTROLLER_FAN_USE_BOARD_TEMP) + #define HAS_CONTROLLER_FAN_BOARD_TEMP_TRIGGER 1 + #ifndef CONTROLLER_FAN_TRIGGER_TEMP + #define CONTROLLER_FAN_TRIGGER_TEMP 30 + #endif + #else + #undef CONTROLLER_FAN_TRIGGER_TEMP + #endif +#endif + // Servos #if PIN_EXISTS(SERVO0) && NUM_SERVOS > 0 #define HAS_SERVO_0 1 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f416ca88bd79..ae4aba14db90 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -583,6 +583,10 @@ #error "TEMP_SENSOR_1_AS_REDUNDANT is now TEMP_SENSOR_REDUNDANT, with associated TEMP_SENSOR_REDUNDANT_* config." #elif defined(MAX_REDUNDANT_TEMP_SENSOR_DIFF) #error "MAX_REDUNDANT_TEMP_SENSOR_DIFF is now TEMP_SENSOR_REDUNDANT_MAX_DIFF" +#elif MOTHERBOARD == BOARD_DUE3DOM_MINI && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) + #warning "Onboard temperature sensor for BOARD_DUE3DOM_MINI has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." +#elif MOTHERBOARD == BOARD_BTT_SKR_E3_TURBO && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) + #warning "Onboard temperature sensor for BOARD_BTT_SKR_E3_TURBO has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." #endif constexpr float arm[] = AXIS_RELATIVE_MODES; @@ -1959,6 +1963,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "TEMP_SENSOR_CHAMBER 1000 requires CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS and CHAMBER_BETA in Configuration_adv.h." #elif TEMP_SENSOR_PROBE_IS_CUSTOM && !(defined(PROBE_PULLUP_RESISTOR_OHMS) && defined(PROBE_RESISTANCE_25C_OHMS) && defined(PROBE_BETA)) #error "TEMP_SENSOR_PROBE 1000 requires PROBE_PULLUP_RESISTOR_OHMS, PROBE_RESISTANCE_25C_OHMS and PROBE_BETA in Configuration_adv.h." +#elif TEMP_SENSOR_BOARD_IS_CUSTOM && !(defined(BOARD_PULLUP_RESISTOR_OHMS) && defined(BOARD_RESISTANCE_25C_OHMS) && defined(BOARD_BETA)) + #error "TEMP_SENSOR_BOARD 1000 requires BOARD_PULLUP_RESISTOR_OHMS, BOARD_RESISTANCE_25C_OHMS and BOARD_BETA in Configuration_adv.h." #elif TEMP_SENSOR_REDUNDANT_IS_CUSTOM && !(defined(REDUNDANT_PULLUP_RESISTOR_OHMS) && defined(REDUNDANT_RESISTANCE_25C_OHMS) && defined(REDUNDANT_BETA)) #error "TEMP_SENSOR_REDUNDANT 1000 requires REDUNDANT_PULLUP_RESISTOR_OHMS, REDUNDANT_RESISTANCE_25C_OHMS and REDUNDANT_BETA in Configuration_adv.h." #endif @@ -1966,14 +1972,14 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Required MAX31865 settings */ -#if TEMP_SENSOR_0_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && TEMP_SENSOR_REDUNDANT_SOURCE == 0) +#if TEMP_SENSOR_0_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && REDUNDANT_TEMP_MATCH(SOURCE, E0)) #if !defined(MAX31865_SENSOR_WIRES_0) || !WITHIN(MAX31865_SENSOR_WIRES_0, 2, 4) #error "MAX31865_SENSOR_WIRES_0 must be defined as an integer between 2 and 4." #elif !defined(MAX31865_SENSOR_OHMS_0) || !defined(MAX31865_CALIBRATION_OHMS_0) #error "MAX31865_SENSOR_OHMS_0 and MAX31865_CALIBRATION_OHMS_0 must be set if TEMP_SENSOR_0/TEMP_SENSOR_REDUNDANT is MAX31865." #endif #endif -#if TEMP_SENSOR_1_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && TEMP_SENSOR_REDUNDANT_SOURCE == 1) +#if TEMP_SENSOR_1_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && REDUNDANT_TEMP_MATCH(SOURCE, E1)) #if !defined(MAX31865_SENSOR_WIRES_1) || !WITHIN(MAX31865_SENSOR_WIRES_1, 2, 4) #error "MAX31865_SENSOR_WIRES_1 must be defined as an integer between 2 and 4." #elif !defined(MAX31865_SENSOR_OHMS_1) || !defined(MAX31865_CALIBRATION_OHMS_1) @@ -1989,62 +1995,58 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "TEMP_SENSOR_REDUNDANT requires TEMP_SENSOR_REDUNDANT_SOURCE." #elif !defined(TEMP_SENSOR_REDUNDANT_TARGET) #error "TEMP_SENSOR_REDUNDANT requires TEMP_SENSOR_REDUNDANT_TARGET." - #elif TEMP_SENSOR_REDUNDANT_SOURCE == TEMP_SENSOR_REDUNDANT_TARGET + #elif REDUNDANT_TEMP_MATCH(SOURCE, TEMP_SENSOR_REDUNDANT_TARGET) #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be the same as TEMP_SENSOR_REDUNDANT_TARGET." - #elif TEMP_SENSOR_REDUNDANT_SOURCE < -5 || TEMP_SENSOR_REDUNDANT_SOURCE > 7 - #error "TEMP_SENSOR_REDUNDANT_SOURCE must be between -5 and 7." - #elif TEMP_SENSOR_REDUNDANT_TARGET < -5 || TEMP_SENSOR_REDUNDANT_TARGET > 7 - #error "TEMP_SENSOR_REDUNDANT_TARGET must be between -5 and 7." - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -3 - #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be -3 (not used)." - #elif TEMP_SENSOR_REDUNDANT_TARGET == -3 - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be -3 (not used)." #elif HAS_MULTI_HOTEND && TEMP_SENSOR_REDUNDANT_SOURCE < HOTENDS - #error "TEMP_SENSOR_REDUNDANT_SOURCE must be after the last TEMP_SENSOR used with a hotend; you can't use a sensor in the middle of two hotends." - #endif - - #if TEMP_SENSOR_REDUNDANT_SOURCE == 0 && HAS_HOTEND - #error "TEMP_SENSOR_REDUNDANT_SOURCE can not be 0 if a hotend is used. E0 always uses TEMP_SENSOR_0." - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -5 && HAS_TEMP_COOLER - #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be Cooler (-5): TEMP_SENSOR_COOLER has already defined the sensor." - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -4 && HAS_TEMP_PROBE - #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be Probe (-4): TEMP_SENSOR_PROBE has already defined the sensor." - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -2 && HAS_TEMP_CHAMBER - #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be Chamber (-2): TEMP_SENSOR_CHAMBER has already defined the sensor." - #elif TEMP_SENSOR_REDUNDANT_SOURCE == -1 && HAS_TEMP_BED - #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be Bed (-1): TEMP_SENSOR_BED has already defined the sensor." - #endif - - #if TEMP_SENSOR_REDUNDANT_TARGET == 0 && !PIN_EXISTS(TEMP_0) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E0 (0): requires TEMP_0_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == 1 && !PIN_EXISTS(TEMP_1) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E1 (1): requires TEMP_1_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == 2 && !PIN_EXISTS(TEMP_2) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E2 (2): requires TEMP_2_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == 3 && !PIN_EXISTS(TEMP_3) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E3 (3): requires TEMP_3_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == 4 && !PIN_EXISTS(TEMP_4) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E4 (4): requires TEMP_4_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == 5 && !PIN_EXISTS(TEMP_5) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E5 (5): requires TEMP_5_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == 6 && !PIN_EXISTS(TEMP_6) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E6 (6): requires TEMP_6_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == 7 && !PIN_EXISTS(TEMP_7) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E7 (7): requires TEMP_7_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == -1 && !PIN_EXISTS(TEMP_BED) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be Bed (-1): requires TEMP_BED_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == -2 && !PIN_EXISTS(TEMP_CHAMBER) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be Chamber (-2): requires TEMP_CHAMBER_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == -4 && !PIN_EXISTS(TEMP_PROBE) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be Probe (-4): requires TEMP_PROBE_PIN" - #elif TEMP_SENSOR_REDUNDANT_TARGET == -5 && !PIN_EXISTS(TEMP_COOLER) - #error "TEMP_SENSOR_REDUNDANT_TARGET can't be Cooler (-5): requires TEMP_COOLER_PIN" - #endif - - #if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0 && !PIN_EXISTS(TEMP_0_CS) - #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 0 requires TEMP_0_CS_PIN." - #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1 && !PIN_EXISTS(TEMP_1_CS) - #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE 1 requires TEMP_1_CS_PIN." + #error "TEMP_SENSOR_REDUNDANT_SOURCE must be after the last used hotend TEMP_SENSOR." + #endif + + #if REDUNDANT_TEMP_MATCH(SOURCE, E0) && HAS_HOTEND + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be 0 if a hotend is used. E0 always uses TEMP_SENSOR_0." + #elif REDUNDANT_TEMP_MATCH(SOURCE, COOLER) && HAS_TEMP_COOLER + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be COOLER. TEMP_SENSOR_COOLER is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, PROBE) && HAS_TEMP_PROBE + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be PROBE. TEMP_SENSOR_PROBE is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, BOARD) && HAS_TEMP_BOARD + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be BOARD. TEMP_SENSOR_BOARD is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, CHAMBER) && HAS_TEMP_CHAMBER + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be CHAMBER. TEMP_SENSOR_CHAMBER is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, BED) && HAS_TEMP_BED + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be BED. TEMP_SENSOR_BED is in use." + #endif + + #if REDUNDANT_TEMP_MATCH(TARGET, E0) && !PIN_EXISTS(TEMP_0) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E0 without TEMP_0_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E1) && !PIN_EXISTS(TEMP_1) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E1 without TEMP_1_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E2) && !PIN_EXISTS(TEMP_2) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E2 without TEMP_2_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E3) && !PIN_EXISTS(TEMP_3) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E3 without TEMP_3_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E4) && !PIN_EXISTS(TEMP_4) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E4 without TEMP_4_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E5) && !PIN_EXISTS(TEMP_5) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E5 without TEMP_5_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E6) && !PIN_EXISTS(TEMP_6) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E6 without TEMP_6_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E7) && !PIN_EXISTS(TEMP_7) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E7 without TEMP_7_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, BED) && !PIN_EXISTS(TEMP_BED) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be BED without TEMP_BED_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, CHAMBER) && !PIN_EXISTS(TEMP_CHAMBER) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be CHAMBER without TEMP_CHAMBER_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, BOARD) && !PIN_EXISTS(TEMP_BOARD) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be BOARD without TEMP_BOARD_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, PROBE) && !PIN_EXISTS(TEMP_PROBE) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be PROBE without TEMP_PROBE_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, COOLER) && !PIN_EXISTS(TEMP_COOLER) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be COOLER without TEMP_COOLER_PIN defined." + #endif + + #if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0) && !PIN_EXISTS(TEMP_0_CS) + #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E0 requires TEMP_0_CS_PIN." + #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1) && !PIN_EXISTS(TEMP_1_CS) + #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E1 requires TEMP_1_CS_PIN." #endif #endif @@ -2209,6 +2211,28 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #endif +#if TEMP_SENSOR_PROBE + #if !PIN_EXISTS(TEMP_PROBE) + #error "TEMP_SENSOR_PROBE requires TEMP_PROBE_PIN." + #elif !HAS_TEMP_ADC_PROBE + #error "TEMP_PROBE_PIN must be an ADC pin." + #elif DISABLED(FIX_MOUNTED_PROBE) + #error "TEMP_SENSOR_PROBE shouldn't be set without FIX_MOUNTED_PROBE." + #endif +#endif + +#if TEMP_SENSOR_BOARD + #if !PIN_EXISTS(TEMP_BOARD) + #error "TEMP_SENSOR_BOARD requires TEMP_BOARD_PIN." + #elif !HAS_TEMP_ADC_BOARD + #error "TEMP_BOARD_PIN must be an ADC pin." + #elif ENABLED(THERMAL_PROTECTION_BOARD) && (!defined(BOARD_MINTEMP) || !defined(BOARD_MAXTEMP)) + #error "THERMAL_PROTECTION_BOARD requires BOARD_MINTEMP and BOARD_MAXTEMP." + #endif +#elif CONTROLLER_FAN_MIN_BOARD_TEMP + #error "CONTROLLER_FAN_MIN_BOARD_TEMP requires TEMP_SENSOR_BOARD." +#endif + #if ENABLED(LASER_COOLANT_FLOW_METER) && !(PIN_EXISTS(FLOWMETER) && ENABLED(LASER_FEATURE)) #error "LASER_COOLANT_FLOW_METER requires FLOWMETER_PIN and LASER_FEATURE." #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 3b3c76986699..0a72b2b467be 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -58,8 +58,8 @@ #endif // MAX TC related macros -#define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && TEMP_SENSOR_REDUNDANT_SOURCE == (n))) -#define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && TEMP_SENSOR_REDUNDANT_SOURCE == n)) +#define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) +#define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) // LIB_MAX6675 can be added to the build_flags in platformio.ini to use a user-defined library // If LIB_MAX6675 is not on the build_flags then raw SPI reads will be used. @@ -262,7 +262,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #endif #if HAS_TEMP_REDUNDANT - redundant_temp_info_t Temperature::temp_redundant; + redundant_info_t Temperature::temp_redundant; #endif #if ENABLED(AUTO_POWER_E_FANS) @@ -436,6 +436,14 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, probe_info_t Temperature::temp_probe; // = { 0 } #endif +#if HAS_TEMP_BOARD + board_info_t Temperature::temp_board; // = { 0 } + #if ENABLED(THERMAL_PROTECTION_BOARD) + int16_t Temperature::mintemp_raw_BOARD = TEMP_SENSOR_BOARD_RAW_LO_TEMP, + Temperature::maxtemp_raw_BOARD = TEMP_SENSOR_COOLER_RAW_HI_TEMP; + #endif +#endif + #if ENABLED(PREVENT_COLD_EXTRUSION) bool Temperature::allow_cold_extrude = false; celsius_t Temperature::extrude_min_temp = EXTRUDE_MINTEMP; @@ -937,14 +945,26 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms SERIAL_ERROR_START(); SERIAL_ECHOPGM_P(serial_msg); SERIAL_ECHOPGM(STR_STOPPED_HEATER); - if (heater_id >= 0) - SERIAL_ECHO(heater_id); - else if (TERN0(HAS_HEATED_CHAMBER, heater_id == H_CHAMBER)) - SERIAL_ECHOPGM(STR_HEATER_CHAMBER); - else if (TERN0(HAS_COOLER, heater_id == H_COOLER)) - SERIAL_ECHOPGM(STR_COOLER); - else - SERIAL_ECHOPGM(STR_HEATER_BED); + + heater_id_t real_heater_id = heater_id; + + #if HAS_TEMP_REDUNDANT + if (heater_id == H_REDUNDANT) { + SERIAL_ECHOPGM(STR_REDUNDANT); // print redundant and cascade to print target, too. + real_heater_id = (heater_id_t)TEMP_SENSOR_REDUNDANT_TARGET; + } + #endif + + switch (real_heater_id) { + OPTCODE(HAS_TEMP_COOLER, case H_COOLER: SERIAL_ECHOPGM(STR_COOLER); break) + OPTCODE(HAS_TEMP_PROBE, case H_PROBE: SERIAL_ECHOPGM(STR_PROBE); break) + OPTCODE(HAS_TEMP_BOARD, case H_BOARD: SERIAL_ECHOPGM(STR_MOTHERBOARD); break) + OPTCODE(HAS_TEMP_CHAMBER, case H_CHAMBER: SERIAL_ECHOPGM(STR_HEATER_CHAMBER); break) + OPTCODE(HAS_TEMP_BED, case H_BED: SERIAL_ECHOPGM(STR_HEATER_BED); break) + default: + if (real_heater_id >= 0) + SERIAL_ECHOLNPAIR("E", real_heater_id); + } SERIAL_EOL(); } @@ -1663,6 +1683,9 @@ void Temperature::manage_heater() { #if TEMP_SENSOR_PROBE_IS_CUSTOM { true, 0, 0, PROBE_PULLUP_RESISTOR_OHMS, PROBE_RESISTANCE_25C_OHMS, 0, 0, PROBE_BETA, 0 }, #endif + #if TEMP_SENSOR_BOARD_IS_CUSTOM + { true, 0, 0, BOARD_PULLUP_RESISTOR_OHMS, BOARD_RESISTANCE_25C_OHMS, 0, 0, BOARD_BETA, 0 }, + #endif #if TEMP_SENSOR_REDUNDANT_IS_CUSTOM { true, 0, 0, REDUNDANT_PULLUP_RESISTOR_OHMS, REDUNDANT_RESISTANCE_25C_OHMS, 0, 0, REDUNDANT_BETA, 0 }, #endif @@ -1698,6 +1721,7 @@ void Temperature::manage_heater() { TERN_(TEMP_SENSOR_CHAMBER_IS_CUSTOM, t_index == CTI_CHAMBER ? PSTR("CHAMBER") :) TERN_(TEMP_SENSOR_COOLER_IS_CUSTOM, t_index == CTI_COOLER ? PSTR("COOLER") :) TERN_(TEMP_SENSOR_PROBE_IS_CUSTOM, t_index == CTI_PROBE ? PSTR("PROBE") :) + TERN_(TEMP_SENSOR_BOARD_IS_CUSTOM, t_index == CTI_BOARD ? PSTR("BOARD") :) TERN_(TEMP_SENSOR_REDUNDANT_IS_CUSTOM, t_index == CTI_REDUNDANT ? PSTR("REDUNDANT") :) nullptr ); @@ -1933,14 +1957,32 @@ void Temperature::manage_heater() { } #endif // HAS_TEMP_PROBE +#if HAS_TEMP_BOARD + // For motherboard temperature measurement. + celsius_float_t Temperature::analog_to_celsius_board(const int16_t raw) { + #if TEMP_SENSOR_BOARD_IS_CUSTOM + return user_thermistor_to_deg_c(CTI_BOARD, raw); + #elif TEMP_SENSOR_BOARD_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_BOARD, TEMPTABLE_BOARD_LEN); + #elif TEMP_SENSOR_BOARD_IS_AD595 + return TEMP_AD595(raw); + #elif TEMP_SENSOR_BOARD_IS_AD8495 + return TEMP_AD8495(raw); + #else + UNUSED(raw); + return 0; + #endif + } +#endif // HAS_TEMP_BOARD + #if HAS_TEMP_REDUNDANT // For redundant temperature measurement. celsius_float_t Temperature::analog_to_celsius_redundant(const int16_t raw) { #if TEMP_SENSOR_REDUNDANT_IS_CUSTOM return user_thermistor_to_deg_c(CTI_REDUNDANT, raw); - #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0 + #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0) return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_0.temperature((uint16_t)raw), raw * 0.25); - #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1 + #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1) return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_1.temperature((uint16_t)raw), raw * 0.25); #elif TEMP_SENSOR_REDUNDANT_IS_THERMISTOR SCAN_THERMISTOR_TABLE(TEMPTABLE_REDUNDANT, TEMPTABLE_REDUNDANT_LEN); @@ -1983,6 +2025,7 @@ void Temperature::updateTemperaturesFromRawValues() { TERN_(HAS_TEMP_CHAMBER, temp_chamber.celsius = analog_to_celsius_chamber(temp_chamber.raw)); TERN_(HAS_TEMP_COOLER, temp_cooler.celsius = analog_to_celsius_cooler(temp_cooler.raw)); TERN_(HAS_TEMP_PROBE, temp_probe.celsius = analog_to_celsius_probe(temp_probe.raw)); + TERN_(HAS_TEMP_BOARD, temp_board.celsius = analog_to_celsius_board(temp_board.raw)); TERN_(HAS_TEMP_REDUNDANT, temp_redundant.celsius = analog_to_celsius_redundant(temp_redundant.raw)); TERN_(FILAMENT_WIDTH_SENSOR, filwidth.update_measured_mm()); @@ -2030,23 +2073,28 @@ void Temperature::updateTemperaturesFromRawValues() { #endif // HAS_HOTEND + #define TP_CMP(S,A,B) (TEMPDIR(S) < 0 ? ((A)<(B)) : ((A)>(B))) #if ENABLED(THERMAL_PROTECTION_BED) - #define BEDCMP(A,B) (TEMPDIR(BED) < 0 ? ((A)<(B)) : ((A)>(B))) - if (BEDCMP(temp_bed.raw, maxtemp_raw_BED)) max_temp_error(H_BED); - if (temp_bed.target > 0 && BEDCMP(mintemp_raw_BED, temp_bed.raw)) min_temp_error(H_BED); + if (TP_CMP(BED, temp_bed.raw, maxtemp_raw_BED)) max_temp_error(H_BED); + if (temp_bed.target > 0 && TP_CMP(BED, mintemp_raw_BED, temp_bed.raw)) min_temp_error(H_BED); #endif #if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) - #define CHAMBERCMP(A,B) (TEMPDIR(CHAMBER) < 0 ? ((A)<(B)) : ((A)>(B))) - if (CHAMBERCMP(temp_chamber.raw, maxtemp_raw_CHAMBER)) max_temp_error(H_CHAMBER); - if (temp_chamber.target > 0 && CHAMBERCMP(mintemp_raw_CHAMBER, temp_chamber.raw)) min_temp_error(H_CHAMBER); + if (TP_CMP(CHAMBER, temp_chamber.raw, maxtemp_raw_CHAMBER)) max_temp_error(H_CHAMBER); + if (temp_chamber.target > 0 && TP_CMP(CHAMBER, mintemp_raw_CHAMBER, temp_chamber.raw)) min_temp_error(H_CHAMBER); #endif #if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) - #define COOLERCMP(A,B) (TEMPDIR(COOLER) < 0 ? ((A)<(B)) : ((A)>(B))) - if (cutter.unitPower > 0 && COOLERCMP(temp_cooler.raw, maxtemp_raw_COOLER)) max_temp_error(H_COOLER); - if (COOLERCMP(mintemp_raw_COOLER, temp_cooler.raw)) min_temp_error(H_COOLER); + if (cutter.unitPower > 0 && TP_CMP(COOLER, temp_cooler.raw, maxtemp_raw_COOLER)) max_temp_error(H_COOLER); + if (TP_CMP(COOLER, mintemp_raw_COOLER, temp_cooler.raw)) min_temp_error(H_COOLER); + #endif + + #if BOTH(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) + if (TP_CMP(BOARD, temp_board.raw, maxtemp_raw_BOARD)) max_temp_error(H_BOARD); + if (TP_CMP(BOARD, mintemp_raw_BOARD, temp_board.raw)) min_temp_error(H_BOARD); #endif + #undef TP_CMP + } // Temperature::updateTemperaturesFromRawValues /** @@ -2275,6 +2323,9 @@ void Temperature::init() { #if HAS_TEMP_ADC_PROBE HAL_ANALOG_SELECT(TEMP_PROBE_PIN); #endif + #if HAS_TEMP_ADC_BOARD + HAL_ANALOG_SELECT(TEMP_BOARD_PIN); + #endif #if HAS_TEMP_ADC_REDUNDANT HAL_ANALOG_SELECT(TEMP_REDUNDANT_PIN); #endif @@ -2388,6 +2439,7 @@ void Temperature::init() { #endif #endif // HAS_HOTEND + // TODO: combine these into the macros above #if HAS_HEATED_BED while (analog_to_celsius_bed(mintemp_raw_BED) < BED_MINTEMP) mintemp_raw_BED += TEMPDIR(BED) * (OVERSAMPLENR); while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) maxtemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR); @@ -2403,15 +2455,22 @@ void Temperature::init() { while (analog_to_celsius_cooler(maxtemp_raw_COOLER) < COOLER_MAXTEMP) maxtemp_raw_COOLER -= TEMPDIR(COOLER) * (OVERSAMPLENR); #endif + #if HAS_TEMP_BOARD + while (analog_to_celsius_board(mintemp_raw_BOARD) > BOARD_MINTEMP) mintemp_raw_BOARD += TEMPDIR(BOARD) * (OVERSAMPLENR); + while (analog_to_celsius_board(maxtemp_raw_BOARD) < BOARD_MAXTEMP) maxtemp_raw_BOARD -= TEMPDIR(BOARD) * (OVERSAMPLENR); + #endif + #if HAS_TEMP_REDUNDANT temp_redundant.target = &( - #if TEMP_SENSOR_REDUNDANT_TARGET == -5 && HAS_TEMP_COOLER + #if REDUNDANT_TEMP_MATCH(TARGET, COOLER) && HAS_TEMP_COOLER temp_cooler - #elif TEMP_SENSOR_REDUNDANT_TARGET == -4 && HAS_TEMP_PROBE + #elif REDUNDANT_TEMP_MATCH(TARGET, PROBE) && HAS_TEMP_PROBE temp_probe - #elif TEMP_SENSOR_REDUNDANT_TARGET == -2 && HAS_TEMP_CHAMBER + #elif REDUNDANT_TEMP_MATCH(TARGET, BOARD) && HAS_TEMP_BOARD + temp_board + #elif REDUNDANT_TEMP_MATCH(TARGET, CHAMBER) && HAS_TEMP_CHAMBER temp_chamber - #elif TEMP_SENSOR_REDUNDANT_TARGET == -1 && HAS_TEMP_BED + #elif REDUNDANT_TEMP_MATCH(TARGET, BED) && HAS_TEMP_BED temp_bed #else temp_hotend[TEMP_SENSOR_REDUNDANT_TARGET] @@ -2787,6 +2846,7 @@ void Temperature::disable_all_heaters() { */ void Temperature::update_raw_temperatures() { + // TODO: can this be collapsed into a HOTEND_LOOP()? #if HAS_TEMP_ADC_0 && !TEMP_SENSOR_0_IS_MAX_TC temp_hotend[0].update(); #endif @@ -2808,6 +2868,7 @@ void Temperature::update_raw_temperatures() { TERN_(HAS_TEMP_ADC_BED, temp_bed.update()); TERN_(HAS_TEMP_ADC_CHAMBER, temp_chamber.update()); TERN_(HAS_TEMP_ADC_PROBE, temp_probe.update()); + TERN_(HAS_TEMP_ADC_BOARD, temp_board.update()); TERN_(HAS_TEMP_ADC_COOLER, temp_cooler.update()); TERN_(HAS_JOY_ADC_X, joystick.x.update()); @@ -2834,10 +2895,11 @@ void Temperature::readings_ready() { HOTEND_LOOP() temp_hotend[e].reset(); #endif - TERN_(HAS_HEATED_BED, temp_bed.reset()); - TERN_(HAS_TEMP_CHAMBER, temp_chamber.reset()); - TERN_(HAS_TEMP_PROBE, temp_probe.reset()); - TERN_(HAS_TEMP_COOLER, temp_cooler.reset()); + TERN_(HAS_HEATED_BED, temp_bed.reset()); + TERN_(HAS_TEMP_CHAMBER, temp_chamber.reset()); + TERN_(HAS_TEMP_PROBE, temp_probe.reset()); + TERN_(HAS_TEMP_COOLER, temp_cooler.reset()); + TERN_(HAS_TEMP_BOARD, temp_board.reset()); TERN_(HAS_TEMP_REDUNDANT, temp_redundant.reset()); TERN_(HAS_JOY_ADC_X, joystick.x.reset()); @@ -3264,6 +3326,11 @@ void Temperature::isr() { case MeasureTemp_PROBE: ACCUMULATE_ADC(temp_probe); break; #endif + #if HAS_TEMP_ADC_BOARD + case PrepareTemp_BOARD: HAL_START_ADC(TEMP_BOARD_PIN); break; + case MeasureTemp_BOARD: ACCUMULATE_ADC(temp_board); break; + #endif + #if HAS_TEMP_ADC_REDUNDANT case PrepareTemp_REDUNDANT: HAL_START_ADC(TEMP_REDUNDANT_PIN); break; case MeasureTemp_REDUNDANT: ACCUMULATE_ADC(temp_redundant); break; @@ -3430,6 +3497,9 @@ void Temperature::isr() { #if HAS_TEMP_COOLER case H_COOLER: k = 'L'; break; #endif + #if HAS_TEMP_BOARD + case H_BOARD: k = 'M'; break; + #endif #if HAS_TEMP_REDUNDANT case H_REDUNDANT: k = 'R'; break; #endif @@ -3459,7 +3529,7 @@ void Temperature::isr() { OPTARG(HAS_TEMP_REDUNDANT, const bool include_r/*=false*/) ) { #if HAS_TEMP_HOTEND - print_heater_state(H_NONE, degHotend(target_extruder), degTargetHotend(target_extruder) OPTARG(SHOW_TEMP_ADC_VALUES, rawHotendTemp(target_extruder))); + print_heater_state(H_E0, degHotend(target_extruder), degTargetHotend(target_extruder) OPTARG(SHOW_TEMP_ADC_VALUES, rawHotendTemp(target_extruder))); #endif #if HAS_HEATED_BED print_heater_state(H_BED, degBed(), degTargetBed() OPTARG(SHOW_TEMP_ADC_VALUES, rawBedTemp())); @@ -3471,7 +3541,10 @@ void Temperature::isr() { print_heater_state(H_COOLER, degCooler(), TERN0(HAS_COOLER, degTargetCooler()) OPTARG(SHOW_TEMP_ADC_VALUES, rawCoolerTemp())); #endif #if HAS_TEMP_PROBE - print_heater_state(H_PROBE, degProbe(), 0 OPTARG(SHOW_TEMP_ADC_VALUES, rawProbeTemp()) ); + print_heater_state(H_PROBE, degProbe(), 0 OPTARG(SHOW_TEMP_ADC_VALUES, rawProbeTemp())); + #endif + #if HAS_TEMP_BOARD + print_heater_state(H_BOARD, degBoard(), 0 OPTARG(SHOW_TEMP_ADC_VALUES, rawBoardTemp())); #endif #if HAS_TEMP_REDUNDANT if (include_r) print_heater_state(H_REDUNDANT, degRedundant(), degRedundantTarget() OPTARG(SHOW_TEMP_ADC_VALUES, rawRedundantTemp())); diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index c8d085133cb3..61993c43a868 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -46,9 +46,13 @@ // Element identifiers. Positive values are hotends. Negative values are other heaters or coolers. typedef enum : int8_t { - H_NONE = -6, - H_COOLER, H_PROBE, H_REDUNDANT, H_CHAMBER, H_BED, - H_E0, H_E1, H_E2, H_E3, H_E4, H_E5, H_E6, H_E7 + H_REDUNDANT = HID_REDUNDANT, + H_COOLER = HID_COOLER, + H_PROBE = HID_PROBE, + H_BOARD = HID_BOARD, + H_CHAMBER = HID_CHAMBER, + H_BED = HID_BED, + H_E0 = HID_E0, H_E1, H_E2, H_E3, H_E4, H_E5, H_E6, H_E7 } heater_id_t; // PID storage @@ -105,6 +109,9 @@ enum ADCSensorState : char { #if HAS_TEMP_ADC_PROBE PrepareTemp_PROBE, MeasureTemp_PROBE, #endif + #if HAS_TEMP_ADC_BOARD + PrepareTemp_BOARD, MeasureTemp_BOARD, + #endif #if HAS_TEMP_ADC_REDUNDANT PrepareTemp_REDUNDANT, MeasureTemp_REDUNDANT, #endif @@ -192,7 +199,7 @@ typedef struct TempInfo { // A redundant temperature sensor typedef struct RedundantTempInfo : public TempInfo { temp_info_t* target; - } redundant_temp_info_t; + } redundant_info_t; #endif // A PWM heater with temperature sensor @@ -231,6 +238,9 @@ struct PIDHeaterInfo : public HeaterInfo { #elif HAS_TEMP_CHAMBER typedef temp_info_t chamber_info_t; #endif +#if HAS_TEMP_BOARD + typedef temp_info_t board_info_t; +#endif #if EITHER(HAS_COOLER, HAS_TEMP_COOLER) typedef heater_info_t cooler_info_t; #endif @@ -312,6 +322,9 @@ typedef struct { int16_t raw_min, raw_max; celsius_t mintemp, maxtemp; } temp_ra #if TEMP_SENSOR_COOLER_IS_CUSTOM CTI_COOLER, #endif + #if TEMP_SENSOR_BOARD_IS_CUSTOM + CTI_BOARD, + #endif #if TEMP_SENSOR_REDUNDANT_IS_CUSTOM CTI_REDUNDANT, #endif @@ -352,8 +365,11 @@ class Temperature { #if HAS_TEMP_COOLER static cooler_info_t temp_cooler; #endif + #if HAS_TEMP_BOARD + static board_info_t temp_board; + #endif #if HAS_TEMP_REDUNDANT - static redundant_temp_info_t temp_redundant; + static redundant_info_t temp_redundant; #endif #if ENABLED(AUTO_POWER_E_FANS) @@ -478,6 +494,10 @@ class Temperature { static int16_t mintemp_raw_COOLER, maxtemp_raw_COOLER; #endif + #if HAS_TEMP_BOARD && ENABLED(THERMAL_PROTECTION_BOARD) + static int16_t mintemp_raw_BOARD, maxtemp_raw_BOARD; + #endif + #if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED > 1 static uint8_t consecutive_low_temperature_error[HOTENDS]; #endif @@ -551,6 +571,9 @@ class Temperature { #if HAS_TEMP_COOLER static celsius_float_t analog_to_celsius_cooler(const int16_t raw); #endif + #if HAS_TEMP_BOARD + static celsius_float_t analog_to_celsius_board(const int16_t raw); + #endif #if HAS_TEMP_REDUNDANT static celsius_float_t analog_to_celsius_redundant(const int16_t raw); #endif @@ -787,6 +810,14 @@ class Temperature { #endif #endif + #if HAS_TEMP_BOARD + #if ENABLED(SHOW_TEMP_ADC_VALUES) + static inline int16_t rawBoardTemp() { return temp_board.raw; } + #endif + static inline celsius_float_t degBoard() { return temp_board.celsius; } + static inline celsius_t wholeDegBoard() { return static_cast(degBoard() + 0.5f); } + #endif + #if HAS_TEMP_REDUNDANT #if ENABLED(SHOW_TEMP_ADC_VALUES) static inline int16_t rawRedundantTemp() { return temp_redundant.raw; } diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index a6cd7c86dfd8..9351fa6eb1ac 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -51,6 +51,7 @@ || TEMP_SENSOR_IS(n, CHAMBER) \ || TEMP_SENSOR_IS(n, COOLER) \ || TEMP_SENSOR_IS(n, PROBE) \ + || TEMP_SENSOR_IS(n, BOARD) \ || TEMP_SENSOR_IS(n, REDUNDANT) ) typedef struct { int16_t value; celsius_t celsius; } temp_entry_t; @@ -305,6 +306,13 @@ typedef struct { int16_t value; celsius_t celsius; } temp_entry_t; #define TEMPTABLE_PROBE_LEN 0 #endif +#if TEMP_SENSOR_BOARD > 0 + #define TEMPTABLE_BOARD TT_NAME(TEMP_SENSOR_BOARD) + #define TEMPTABLE_BOARD_LEN COUNT(TEMPTABLE_BOARD) +#else + #define TEMPTABLE_BOARD_LEN 0 +#endif + #if TEMP_SENSOR_REDUNDANT > 0 #define TEMPTABLE_REDUNDANT TT_NAME(TEMP_SENSOR_REDUNDANT) #define TEMPTABLE_REDUNDANT_LEN COUNT(TEMPTABLE_REDUNDANT) @@ -319,6 +327,7 @@ static_assert(255 > TEMPTABLE_0_LEN || 255 > TEMPTABLE_1_LEN || 255 > TEMPTABLE_ || 255 > TEMPTABLE_CHAMBER_LEN || 255 > TEMPTABLE_COOLER_LEN || 255 > TEMPTABLE_PROBE_LEN + || 255 > TEMPTABLE_BOARD_LEN || 255 > TEMPTABLE_REDUNDANT_LEN , "Temperature conversion tables over 255 entries need special consideration." ); @@ -513,6 +522,15 @@ static_assert(255 > TEMPTABLE_0_LEN || 255 > TEMPTABLE_1_LEN || 255 > TEMPTABLE_ #define TEMP_SENSOR_PROBE_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif +#ifndef TEMP_SENSOR_BOARD_RAW_HI_TEMP + #if TT_REVRAW(BOARD) + #define TEMP_SENSOR_BOARD_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_BOARD_RAW_LO_TEMP 0 + #else + #define TEMP_SENSOR_BOARD_RAW_HI_TEMP 0 + #define TEMP_SENSOR_BOARD_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #endif +#endif #ifndef TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP #if TT_REVRAW(REDUNDANT) #define TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index ba53032a2a9d..bb4c0e80001f 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -65,7 +65,7 @@ #define TEMP_BED_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_BED_PIN #endif -#if HOTENDS == 1 && TEMP_SENSOR_REDUNDANT_SOURCE != 1 +#if HOTENDS == 1 && !REDUNDANT_TEMP_MATCH(SOURCE, E1) #if TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN TEMP_1_PIN #elif TEMP_SENSOR_CHAMBER diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 970a402b3059..e99c15e70e99 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -165,8 +165,8 @@ // #define TEMP_0_PIN P0_24 #define TEMP_1_PIN P0_23 -//#define TEMP_2_PIN P1_30 // Onboard thermistor #define TEMP_BED_PIN P0_25 +#define TEMP_BOARD_PIN P1_30 // Onboard thermistor, NTC100K // // Heaters / Fans diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index de50657b7419..5be2bba25c05 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -114,10 +114,11 @@ // // Temperature Sensors // -#define TEMP_0_PIN 0 // Analog Input -#define TEMP_1_PIN 1 // Analog Input -#define TEMP_BED_PIN 2 // Analog Input -#define TEMP_PROBE_PIN 3 // Analog Input +#define TEMP_0_PIN 0 // Analog Input, Header J2 +#define TEMP_1_PIN 1 // Analog Input, Header J3 +#define TEMP_BOARD_PIN TEMP_1_PIN // Analog Input, Header J3 +#define TEMP_BED_PIN 2 // Analog Input, Header J6 +#define TEMP_PROBE_PIN 3 // Analog Input, Header J15 // // Heaters / Fans diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index bc0d29b00a02..7754fa9329f9 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -68,8 +68,8 @@ // #define TEMP_0_PIN 0 // Analog Input (HOTEND0 thermistor) #define TEMP_1_PIN 2 // Analog Input (unused) -#define TEMP_2_PIN 5 // Analog Input (OnBoard thermistor beta 3950) #define TEMP_BED_PIN 1 // Analog Input (BED thermistor) +#define TEMP_BOARD_PIN 5 // Analog Input (OnBoard thermistor beta 3950) // SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 408048bfe249..866d94924ad2 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -161,6 +161,7 @@ // #define TEMP_0_PIN PA2 // T0 <-> E0 #define TEMP_1_PIN PA0 // T1 <-> E1 +#define TEMP_BOARD_PIN TEMP_1_PIN // Onboard sensor shared with T1 #define TEMP_BED_PIN PA1 // T2 <-> Bed #define TEMP_PROBE_PIN PC3 // Shares J4 connector with PD1 From 37cf94b888d5866cab914166ef246f14969a2cb4 Mon Sep 17 00:00:00 2001 From: Mike La Spina Date: Sun, 11 Jul 2021 20:45:47 -0500 Subject: [PATCH 051/323] =?UTF-8?q?=F0=9F=94=A8=20Update=20LPC176x=20platf?= =?UTF-8?q?orm=20to=200.2.8=20(#22333)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/lpc176x.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ini/lpc176x.ini b/ini/lpc176x.ini index 450585b01a32..3c5f43764ba6 100644 --- a/ini/lpc176x.ini +++ b/ini/lpc176x.ini @@ -14,7 +14,7 @@ # [common_LPC] platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip -platform_packages = framework-arduino-lpc176x@^0.2.6 +platform_packages = framework-arduino-lpc176x@^0.2.8 board = nxp_lpc1768 lib_ldf_mode = off lib_compat_mode = strict From c8ee056cc63c5cb996b70c3336aae9be52f8cc85 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Sun, 11 Jul 2021 22:13:58 -0700 Subject: [PATCH 052/323] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Consolidate=20PSU?= =?UTF-8?q?=5FCONTROL=20(#22304)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 9 +- Marlin/src/MarlinCore.h | 19 -- Marlin/src/feature/power.cpp | 239 ++++++++++++++---------- Marlin/src/feature/power.h | 25 ++- Marlin/src/gcode/control/M80_M81.cpp | 30 +-- Marlin/src/lcd/marlinui.cpp | 12 +- Marlin/src/lcd/menu/menu_led.cpp | 11 +- Marlin/src/lcd/menu/menu_main.cpp | 6 +- Marlin/src/module/stepper/indirection.h | 2 +- ini/features.ini | 2 +- 10 files changed, 195 insertions(+), 160 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 92965c743e31..1752c2ba1035 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -236,6 +236,10 @@ #include "feature/stepper_driver_safety.h" #endif +#if ENABLED(PSU_CONTROL) + #include "feature/power.h" +#endif + PGMSTR(M112_KILL_STR, "M112 Shutdown"); MarlinState marlin_state = MF_INITIALIZING; @@ -883,7 +887,7 @@ void minkill(const bool steppers_off/*=false*/) { // Power off all steppers (for M112) or just the E steppers steppers_off ? disable_all_steppers() : disable_e_steppers(); - TERN_(PSU_CONTROL, PSU_OFF()); + TERN_(PSU_CONTROL, powerManager.power_off()); TERN_(HAS_SUICIDE, suicide()); @@ -1189,8 +1193,7 @@ void setup() { #if ENABLED(PSU_CONTROL) SETUP_LOG("PSU_CONTROL"); - powersupply_on = ENABLED(PSU_DEFAULT_OFF); - if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON(); + powerManager.init(); #endif #if ENABLED(POWER_LOSS_RECOVERY) diff --git a/Marlin/src/MarlinCore.h b/Marlin/src/MarlinCore.h index 243811d7fb7e..d7ab11d046a3 100644 --- a/Marlin/src/MarlinCore.h +++ b/Marlin/src/MarlinCore.h @@ -81,25 +81,6 @@ extern bool wait_for_heatup; void wait_for_user_response(millis_t ms=0, const bool no_sleep=false); #endif -#if ENABLED(PSU_CONTROL) - extern bool powersupply_on; - #define PSU_PIN_ON() do{ OUT_WRITE(PS_ON_PIN, PSU_ACTIVE_STATE); powersupply_on = true; }while(0) - #define PSU_PIN_OFF() do{ OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE); powersupply_on = false; }while(0) - #if ENABLED(AUTO_POWER_CONTROL) - #define PSU_ON() powerManager.power_on() - #define PSU_OFF() powerManager.power_off() - #define PSU_OFF_SOON() powerManager.power_off_soon() - #else - #define PSU_ON() PSU_PIN_ON() - #if ENABLED(PS_OFF_SOUND) - #define PSU_OFF() do{ BUZZ(1000, 659); PSU_PIN_OFF(); }while(0) - #else - #define PSU_OFF() PSU_PIN_OFF() - #endif - #define PSU_OFF_SOON PSU_OFF - #endif -#endif - bool pin_is_protected(const pin_t pin); #if HAS_SUICIDE diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 9b173d6ee706..9070fd7946e6 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -26,10 +26,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(AUTO_POWER_CONTROL) - #include "power.h" -#include "../module/temperature.h" #include "../module/stepper/indirection.h" #include "../MarlinCore.h" @@ -41,133 +38,179 @@ #include "../gcode/gcode.h" #endif -#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) - #include "controllerfan.h" +Power powerManager; +bool Power::psu_on; + +#if ENABLED(AUTO_POWER_CONTROL) + #include "../module/temperature.h" + + #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) + #include "controllerfan.h" + #endif + + millis_t Power::lastPowerOn; #endif -Power powerManager; +/** + * Initialize pins & state for the power manager. + * + */ +void Power::init(){ + psu_on = ENABLED(PSU_DEFAULT_OFF); // Set opposite state to get full power_off/on + TERN(PSU_DEFAULT_OFF, power_off(), power_on()); +} -millis_t Power::lastPowerOn; +/** + * Power on if the power is currently off. + * Restores stepper drivers and processes any PSU_POWERUP_GCODE. + * + */ +void Power::power_on() { + #if ENABLED(AUTO_POWER_CONTROL) + const millis_t now = millis(); + lastPowerOn = now + !now; + #endif -bool Power::is_power_needed() { + if (psu_on) return; - if (printJobOngoing() || printingIsPaused()) return true; + OUT_WRITE(PS_ON_PIN, PSU_ACTIVE_STATE); + psu_on = true; + safe_delay(PSU_POWERUP_DELAY); + restore_stepper_drivers(); + TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); - #if ENABLED(AUTO_POWER_FANS) - FANS_LOOP(i) if (thermalManager.fan_speed[i]) return true; + #ifdef PSU_POWERUP_GCODE + GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE)); #endif +} + +/** + * Power off if the power is currently on. + * Processes any PSU_POWEROFF_GCODE and makes a PS_OFF_SOUND if enabled. + * + */ +void Power::power_off() { + if (!psu_on) return; - #if ENABLED(AUTO_POWER_E_FANS) - HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true; + #ifdef PSU_POWEROFF_GCODE + GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE)); #endif - #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) - if (controllerFan.state()) return true; + #if ENABLED(PS_OFF_SOUND) + BUZZ(1000, 659); #endif - if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed)) - return true; + OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE); + psu_on = false; +} - if (TERN0(AUTO_POWER_COOLER_FAN, thermalManager.coolerfan_speed)) - return true; - // If any of the drivers or the bed are enabled... - if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON - #if HAS_X2_ENABLE - || X2_ENABLE_READ() == X_ENABLE_ON - #endif - #if HAS_Y2_ENABLE - || Y2_ENABLE_READ() == Y_ENABLE_ON - #endif - #if HAS_Z2_ENABLE - || Z2_ENABLE_READ() == Z_ENABLE_ON - #endif - #if E_STEPPERS - #define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == E_ENABLE_ON - REPEAT(E_STEPPERS, _OR_ENABLED_E) - #endif - ) return true; +#if ENABLED(AUTO_POWER_CONTROL) - #if HAS_HOTEND - HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true; + #ifndef POWER_TIMEOUT + #define POWER_TIMEOUT 0 #endif - if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true; + /** + * Check all conditions that would signal power needing to be on. + * + * @returns bool if power is needed + */ + bool Power::is_power_needed() { - #if HAS_HOTEND && AUTO_POWER_E_TEMP - HOTEND_LOOP() if (thermalManager.degHotend(e) >= (AUTO_POWER_E_TEMP)) return true; - #endif + if (printJobOngoing() || printingIsPaused()) return true; - #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP - if (thermalManager.degChamber() >= (AUTO_POWER_CHAMBER_TEMP)) return true; - #endif + #if ENABLED(AUTO_POWER_FANS) + FANS_LOOP(i) if (thermalManager.fan_speed[i]) return true; + #endif - #if HAS_COOLER && AUTO_POWER_COOLER_TEMP - if (thermalManager.degCooler() >= (AUTO_POWER_COOLER_TEMP)) return true; - #endif + #if ENABLED(AUTO_POWER_E_FANS) + HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true; + #endif - return false; -} + #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) + if (controllerFan.state()) return true; + #endif -#ifndef POWER_TIMEOUT - #define POWER_TIMEOUT 0 -#endif + if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed)) + return true; + + if (TERN0(AUTO_POWER_COOLER_FAN, thermalManager.coolerfan_speed)) + return true; + + // If any of the drivers or the bed are enabled... + if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON + #if HAS_X2_ENABLE + || X2_ENABLE_READ() == X_ENABLE_ON + #endif + #if HAS_Y2_ENABLE + || Y2_ENABLE_READ() == Y_ENABLE_ON + #endif + #if HAS_Z2_ENABLE + || Z2_ENABLE_READ() == Z_ENABLE_ON + #endif + #if E_STEPPERS + #define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == E_ENABLE_ON + REPEAT(E_STEPPERS, _OR_ENABLED_E) + #endif + ) return true; + + #if HAS_HOTEND + HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true; + #endif -void Power::check(const bool pause) { - static bool _pause = false; - static millis_t nextPowerCheck = 0; - const millis_t now = millis(); - #if POWER_TIMEOUT > 0 - if (pause != _pause) { - lastPowerOn = now + !now; - _pause = pause; - } - if (pause) return; - #endif - if (ELAPSED(now, nextPowerCheck)) { - nextPowerCheck = now + 2500UL; - if (is_power_needed()) - power_on(); - else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT)))) - power_off(); - } -} + if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true; -void Power::power_on() { - const millis_t now = millis(); - lastPowerOn = now + !now; - if (!powersupply_on) { - PSU_PIN_ON(); - safe_delay(PSU_POWERUP_DELAY); - restore_stepper_drivers(); - TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); - #ifdef PSU_POWERUP_GCODE - GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE)); + #if HAS_HOTEND && AUTO_POWER_E_TEMP + HOTEND_LOOP() if (thermalManager.degHotend(e) >= (AUTO_POWER_E_TEMP)) return true; #endif - } -} -void Power::power_off() { - if (powersupply_on) { - #ifdef PSU_POWEROFF_GCODE - GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE)); + #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP + if (thermalManager.degChamber() >= (AUTO_POWER_CHAMBER_TEMP)) return true; #endif - #if ENABLED(PS_OFF_SOUND) - BUZZ(1000, 659); + #if HAS_COOLER && AUTO_POWER_COOLER_TEMP + if (thermalManager.degCooler() >= (AUTO_POWER_COOLER_TEMP)) return true; #endif - PSU_PIN_OFF(); + return false; } -} -void Power::power_off_soon() { - #if POWER_OFF_DELAY - lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY); - //if (!lastPowerOn) ++lastPowerOn; - #else - power_off(); + /** + * Check if we should power off automatically (POWER_TIMEOUT elapsed, !is_power_needed). + * + * @param pause pause the 'timer' + */ + void Power::check(const bool pause) { + static millis_t nextPowerCheck = 0; + const millis_t now = millis(); + #if POWER_TIMEOUT > 0 + static bool _pause = false; + if (pause != _pause) { + lastPowerOn = now + !now; + _pause = pause; + } + if (pause) return; + #endif + if (ELAPSED(now, nextPowerCheck)) { + nextPowerCheck = now + 2500UL; + if (is_power_needed()) + power_on(); + else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT)))) + power_off(); + } + } + + #if POWER_OFF_DELAY > 0 + + /** + * Power off with a delay. Power off is triggered by check() after the delay. + * + */ + void Power::power_off_soon() { + lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY); + } + #endif -} #endif // AUTO_POWER_CONTROL diff --git a/Marlin/src/feature/power.h b/Marlin/src/feature/power.h index bca5432946fb..7f5a97e6df83 100644 --- a/Marlin/src/feature/power.h +++ b/Marlin/src/feature/power.h @@ -25,17 +25,32 @@ * power.h - power control */ -#include "../core/millis_t.h" +#if ENABLED(AUTO_POWER_CONTROL) + #include "../core/millis_t.h" +#endif class Power { public: - static void check(const bool pause); + static bool psu_on; + + static void init(); static void power_on(); static void power_off(); + + #if ENABLED(AUTO_POWER_CONTROL) && POWER_OFF_DELAY > 0 static void power_off_soon(); - private: - static millis_t lastPowerOn; - static bool is_power_needed(); + #else + static inline void power_off_soon() { power_off(); } + #endif + + #if ENABLED(AUTO_POWER_CONTROL) + static void check(const bool pause); + + private: + static millis_t lastPowerOn; + static bool is_power_needed(); + + #endif }; extern Power powerManager; diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index 1b5ea2f7eff0..9640c72006d7 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -29,25 +29,17 @@ #include "../../inc/MarlinConfig.h" +#if ENABLED(PSU_CONTROL) + #include "../queue.h" + #include "../../feature/power.h" +#endif + #if HAS_SUICIDE #include "../../MarlinCore.h" #endif #if ENABLED(PSU_CONTROL) - #if ENABLED(AUTO_POWER_CONTROL) - #include "../../feature/power.h" - #else - void restore_stepper_drivers(); - #endif - - // Could be moved to a feature, but this is all the data - bool powersupply_on; - - #if HAS_TRINAMIC_CONFIG - #include "../../feature/tmc_util.h" - #endif - /** * M80 : Turn on the Power Supply * M80 S : Report the current state and exit @@ -56,11 +48,11 @@ // S: Report the current power supply state and exit if (parser.seen('S')) { - SERIAL_ECHOPGM_P(powersupply_on ? PSTR("PS:1\n") : PSTR("PS:0\n")); + SERIAL_ECHOPGM_P(powerManager.psu_on ? PSTR("PS:1\n") : PSTR("PS:0\n")); return; } - PSU_ON(); + powerManager.power_on(); /** * If you have a switch on suicide pin, this is useful @@ -71,12 +63,6 @@ OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING); #endif - #if DISABLED(AUTO_POWER_CONTROL) - safe_delay(PSU_POWERUP_DELAY); - restore_stepper_drivers(); - TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); - #endif - TERN_(HAS_LCD_MENU, ui.reset_status()); } @@ -106,7 +92,7 @@ void GcodeSuite::M81() { #if HAS_SUICIDE suicide(); #elif ENABLED(PSU_CONTROL) - PSU_OFF_SOON(); + powerManager.power_off_soon(); #endif LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " STR_OFF ".")); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 0cb476c04bbc..206bae925a3d 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -158,6 +158,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #include "../feature/power_monitor.h" #endif + #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT) + #include "../feature/power.h" + #endif + #if HAS_ENCODER_ACTION volatile uint8_t MarlinUI::buttons; #if HAS_SLOW_BUTTONS @@ -826,8 +830,8 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; static uint16_t max_display_update_time = 0; millis_t ms = millis(); - #ifdef LED_BACKLIGHT_TIMEOUT - leds.update_timeout(powersupply_on); + #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT) + leds.update_timeout(powerManager.psu_on); #endif #if HAS_LCD_MENU @@ -976,8 +980,8 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; refresh(LCDVIEW_REDRAW_NOW); - #ifdef LED_BACKLIGHT_TIMEOUT - if (!powersupply_on) leds.reset_timeout(ms); + #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT) + if (!powerManager.psu_on) leds.reset_timeout(ms); #endif } diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 284e80c931b7..3261ecc65874 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -30,6 +30,10 @@ #include "menu_item.h" +#if ENABLED(PSU_CONTROL) + #include "../../feature/power.h" +#endif + #if ENABLED(LED_CONTROL_MENU) #include "../../feature/leds/leds.h" @@ -125,12 +129,7 @@ void menu_led() { BACK_ITEM(MSG_MAIN); #if ENABLED(LED_CONTROL_MENU) - #if ENABLED(PSU_CONTROL) - extern bool powersupply_on; - #else - constexpr bool powersupply_on = true; - #endif - if (powersupply_on) { + if (TERN1(PSU_CONTROL, powerManager.psu_on)) { editable.state = leds.lights_on; EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle); } diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 6f32ef1d60f6..8fce2038a3cc 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -35,6 +35,10 @@ #include "../../module/stepper.h" #include "../../sd/cardreader.h" +#if ENABLED(PSU_CONTROL) + #include "../../feature/power.h" +#endif + #if HAS_GAMES && DISABLED(LCD_INFO_MENU) #include "game/game.h" #endif @@ -385,7 +389,7 @@ void menu_main() { // Switch power on/off // #if ENABLED(PSU_CONTROL) - if (powersupply_on) + if (powerManager.psu_on) #if ENABLED(PS_OFF_CONFIRM) CONFIRM_ITEM(MSG_SWITCH_PS_OFF, MSG_YES, MSG_NO, diff --git a/Marlin/src/module/stepper/indirection.h b/Marlin/src/module/stepper/indirection.h index 08d0be0b3153..beba03699e9d 100644 --- a/Marlin/src/module/stepper/indirection.h +++ b/Marlin/src/module/stepper/indirection.h @@ -44,7 +44,7 @@ #include "trinamic.h" #endif -void restore_stepper_drivers(); // Called by PSU_ON +void restore_stepper_drivers(); // Called by powerManager.power_on() void reset_stepper_drivers(); // Called by settings.load / settings.reset // X Stepper diff --git a/ini/features.ini b/ini/features.ini index 2d9d7ab06327..bf8342e545b6 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -128,7 +128,7 @@ HAS_PRUSA_MMU1 = src_filter=+ HAS_PRUSA_MMU2 = src_filter=+ + PASSWORD_FEATURE = src_filter=+ + ADVANCED_PAUSE_FEATURE = src_filter=+ + + -AUTO_POWER_CONTROL = src_filter=+ +PSU_CONTROL = src_filter=+ HAS_POWER_MONITOR = src_filter=+ + POWER_LOSS_RECOVERY = src_filter=+ + PROBE_TEMP_COMPENSATION = src_filter=+ + From 2c6a053ce174f2404d8eeb3917fc303115b7614a Mon Sep 17 00:00:00 2001 From: ellensp Date: Mon, 12 Jul 2021 17:15:48 +1200 Subject: [PATCH 053/323] =?UTF-8?q?=F0=9F=8E=A8=20Optional=20Custom=20Butt?= =?UTF-8?q?on=20description=20(#22336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 113 ++++++++++++++++++++++++++++---------- 1 file changed, 83 insertions(+), 30 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 1752c2ba1035..8b5f83f2a493 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -526,95 +526,148 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { #if ENABLED(CUSTOM_USER_BUTTONS) // Handle a custom user button if defined const bool printer_not_busy = !printingIsActive(); - #define HAS_CUSTOM_USER_BUTTON(N) (PIN_EXISTS(BUTTON##N) && defined(BUTTON##N##_HIT_STATE) && defined(BUTTON##N##_GCODE) && defined(BUTTON##N##_DESC)) - #define CHECK_CUSTOM_USER_BUTTON(N) do{ \ + const millis_t ms = millis(); + #define HAS_CUSTOM_USER_BUTTON(N) (PIN_EXISTS(BUTTON##N) && defined(BUTTON##N##_HIT_STATE) && defined(BUTTON##N##_GCODE)) + #define HAS_BETTER_USER_BUTTON(N) HAS_CUSTOM_USER_BUTTON(N) && defined(BUTTON##N##_DESC) + #define _CHECK_CUSTOM_USER_BUTTON(N, CODE) do{ \ constexpr millis_t CUB_DEBOUNCE_DELAY_##N = 250UL; \ static millis_t next_cub_ms_##N; \ if (BUTTON##N##_HIT_STATE == READ(BUTTON##N##_PIN) \ && (ENABLED(BUTTON##N##_WHEN_PRINTING) || printer_not_busy)) { \ - const millis_t ms = millis(); \ if (ELAPSED(ms, next_cub_ms_##N)) { \ next_cub_ms_##N = ms + CUB_DEBOUNCE_DELAY_##N; \ - if (strlen(BUTTON##N##_DESC)) \ - LCD_MESSAGEPGM_P(PSTR(BUTTON##N##_DESC)); \ + CODE; \ queue.inject_P(PSTR(BUTTON##N##_GCODE)); \ } \ } \ }while(0) - #if HAS_CUSTOM_USER_BUTTON(1) + #define CHECK_CUSTOM_USER_BUTTON(N) _CHECK_CUSTOM_USER_BUTTON(N, NOOP) + #define CHECK_BETTER_USER_BUTTON(N) _CHECK_CUSTOM_USER_BUTTON(N, if (strlen(BUTTON##N##_DESC)) LCD_MESSAGEPGM_P(PSTR(BUTTON##N##_DESC))) + + #if HAS_BETTER_USER_BUTTON(1) + CHECK_BETTER_USER_BUTTON(1); + #elif HAS_CUSTOM_USER_BUTTON(1) CHECK_CUSTOM_USER_BUTTON(1); #endif - #if HAS_CUSTOM_USER_BUTTON(2) + #if HAS_BETTER_USER_BUTTON(2) + CHECK_BETTER_USER_BUTTON(2); + #elif HAS_CUSTOM_USER_BUTTON(2) CHECK_CUSTOM_USER_BUTTON(2); #endif - #if HAS_CUSTOM_USER_BUTTON(3) + #if HAS_BETTER_USER_BUTTON(3) + CHECK_BETTER_USER_BUTTON(3); + #elif HAS_CUSTOM_USER_BUTTON(3) CHECK_CUSTOM_USER_BUTTON(3); #endif - #if HAS_CUSTOM_USER_BUTTON(4) + #if HAS_BETTER_USER_BUTTON(4) + CHECK_BETTER_USER_BUTTON(4); + #elif HAS_CUSTOM_USER_BUTTON(4) CHECK_CUSTOM_USER_BUTTON(4); #endif - #if HAS_CUSTOM_USER_BUTTON(5) + #if HAS_BETTER_USER_BUTTON(5) + CHECK_BETTER_USER_BUTTON(5); + #elif HAS_CUSTOM_USER_BUTTON(5) CHECK_CUSTOM_USER_BUTTON(5); #endif - #if HAS_CUSTOM_USER_BUTTON(6) + #if HAS_BETTER_USER_BUTTON(6) + CHECK_BETTER_USER_BUTTON(6); + #elif HAS_CUSTOM_USER_BUTTON(6) CHECK_CUSTOM_USER_BUTTON(6); #endif - #if HAS_CUSTOM_USER_BUTTON(7) + #if HAS_BETTER_USER_BUTTON(7) + CHECK_BETTER_USER_BUTTON(7); + #elif HAS_CUSTOM_USER_BUTTON(7) CHECK_CUSTOM_USER_BUTTON(7); #endif - #if HAS_CUSTOM_USER_BUTTON(8) + #if HAS_BETTER_USER_BUTTON(8) + CHECK_BETTER_USER_BUTTON(8); + #elif HAS_CUSTOM_USER_BUTTON(8) CHECK_CUSTOM_USER_BUTTON(8); #endif - #if HAS_CUSTOM_USER_BUTTON(9) + #if HAS_BETTER_USER_BUTTON(9) + CHECK_BETTER_USER_BUTTON(9); + #elif HAS_CUSTOM_USER_BUTTON(9) CHECK_CUSTOM_USER_BUTTON(9); #endif - #if HAS_CUSTOM_USER_BUTTON(10) + #if HAS_BETTER_USER_BUTTON(10) + CHECK_BETTER_USER_BUTTON(10); + #elif HAS_CUSTOM_USER_BUTTON(10) CHECK_CUSTOM_USER_BUTTON(10); #endif - #if HAS_CUSTOM_USER_BUTTON(11) + #if HAS_BETTER_USER_BUTTON(11) + CHECK_BETTER_USER_BUTTON(11); + #elif HAS_CUSTOM_USER_BUTTON(11) CHECK_CUSTOM_USER_BUTTON(11); #endif - #if HAS_CUSTOM_USER_BUTTON(12) + #if HAS_BETTER_USER_BUTTON(12) + CHECK_BETTER_USER_BUTTON(12); + #elif HAS_CUSTOM_USER_BUTTON(12) CHECK_CUSTOM_USER_BUTTON(12); #endif - #if HAS_CUSTOM_USER_BUTTON(13) + #if HAS_BETTER_USER_BUTTON(13) + CHECK_BETTER_USER_BUTTON(13); + #elif HAS_CUSTOM_USER_BUTTON(13) CHECK_CUSTOM_USER_BUTTON(13); #endif - #if HAS_CUSTOM_USER_BUTTON(14) + #if HAS_BETTER_USER_BUTTON(14) + CHECK_BETTER_USER_BUTTON(14); + #elif HAS_CUSTOM_USER_BUTTON(14) CHECK_CUSTOM_USER_BUTTON(14); #endif - #if HAS_CUSTOM_USER_BUTTON(15) + #if HAS_BETTER_USER_BUTTON(15) + CHECK_BETTER_USER_BUTTON(15); + #elif HAS_CUSTOM_USER_BUTTON(15) CHECK_CUSTOM_USER_BUTTON(15); #endif - #if HAS_CUSTOM_USER_BUTTON(16) + #if HAS_BETTER_USER_BUTTON(16) + CHECK_BETTER_USER_BUTTON(16); + #elif HAS_CUSTOM_USER_BUTTON(16) CHECK_CUSTOM_USER_BUTTON(16); #endif - #if HAS_CUSTOM_USER_BUTTON(17) + #if HAS_BETTER_USER_BUTTON(17) + CHECK_BETTER_USER_BUTTON(17); + #elif HAS_CUSTOM_USER_BUTTON(17) CHECK_CUSTOM_USER_BUTTON(17); #endif - #if HAS_CUSTOM_USER_BUTTON(18) + #if HAS_BETTER_USER_BUTTON(18) + CHECK_BETTER_USER_BUTTON(18); + #elif HAS_CUSTOM_USER_BUTTON(18) CHECK_CUSTOM_USER_BUTTON(18); #endif - #if HAS_CUSTOM_USER_BUTTON(19) + #if HAS_BETTER_USER_BUTTON(19) + CHECK_BETTER_USER_BUTTON(19); + #elif HAS_CUSTOM_USER_BUTTON(19) CHECK_CUSTOM_USER_BUTTON(19); #endif - #if HAS_CUSTOM_USER_BUTTON(20) + #if HAS_BETTER_USER_BUTTON(20) + CHECK_BETTER_USER_BUTTON(20); + #elif HAS_CUSTOM_USER_BUTTON(20) CHECK_CUSTOM_USER_BUTTON(20); #endif - #if HAS_CUSTOM_USER_BUTTON(21) + #if HAS_BETTER_USER_BUTTON(21) + CHECK_BETTER_USER_BUTTON(21); + #elif HAS_CUSTOM_USER_BUTTON(21) CHECK_CUSTOM_USER_BUTTON(21); #endif - #if HAS_CUSTOM_USER_BUTTON(22) + #if HAS_BETTER_USER_BUTTON(22) + CHECK_BETTER_USER_BUTTON(22); + #elif HAS_CUSTOM_USER_BUTTON(22) CHECK_CUSTOM_USER_BUTTON(22); #endif - #if HAS_CUSTOM_USER_BUTTON(23) + #if HAS_BETTER_USER_BUTTON(23) + CHECK_BETTER_USER_BUTTON(23); + #elif HAS_CUSTOM_USER_BUTTON(23) CHECK_CUSTOM_USER_BUTTON(23); #endif - #if HAS_CUSTOM_USER_BUTTON(24) + #if HAS_BETTER_USER_BUTTON(24) + CHECK_BETTER_USER_BUTTON(24); + #elif HAS_CUSTOM_USER_BUTTON(24) CHECK_CUSTOM_USER_BUTTON(24); #endif - #if HAS_CUSTOM_USER_BUTTON(25) + #if HAS_BETTER_USER_BUTTON(25) + CHECK_BETTER_USER_BUTTON(25); + #elif HAS_CUSTOM_USER_BUTTON(25) CHECK_CUSTOM_USER_BUTTON(25); #endif #endif From c0ecc6625ffbe70cf761465ddd5443ac30124cae Mon Sep 17 00:00:00 2001 From: Mike La Spina Date: Mon, 12 Jul 2021 00:22:08 -0500 Subject: [PATCH 054/323] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Allow=20headles?= =?UTF-8?q?s=20Flow=20Meter=20(#22234)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/cooler.cpp | 23 ++++++++++++----------- Marlin/src/feature/cooler.h | 6 +++--- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/module/temperature.cpp | 2 +- ini/features.ini | 3 ++- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Marlin/src/feature/cooler.cpp b/Marlin/src/feature/cooler.cpp index a1f25c5fad7a..e0f99777d19a 100644 --- a/Marlin/src/feature/cooler.cpp +++ b/Marlin/src/feature/cooler.cpp @@ -22,26 +22,27 @@ #include "../inc/MarlinConfig.h" -#if HAS_COOLER +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) #include "cooler.h" Cooler cooler; -uint8_t Cooler::mode = 0; -uint16_t Cooler::capacity; -uint16_t Cooler::load; -bool Cooler::enabled = false; +#if HAS_COOLER + uint8_t Cooler::mode = 0; + uint16_t Cooler::capacity; + uint16_t Cooler::load; + bool Cooler::enabled = false; +#endif #if ENABLED(LASER_COOLANT_FLOW_METER) bool Cooler::flowmeter = false; millis_t Cooler::flowmeter_next_ms; // = 0 volatile uint16_t Cooler::flowpulses; float Cooler::flowrate; + #if ENABLED(FLOWMETER_SAFETY) + bool Cooler::flowsafety_enabled = true; + bool Cooler::flowfault = false; + #endif #endif -#if ENABLED(FLOWMETER_SAFETY) - bool Cooler::flowsafety_enabled = true; - bool Cooler::fault = false; -#endif - -#endif // HAS_COOLER +#endif // HAS_COOLER || LASER_COOLANT_FLOW_METER diff --git a/Marlin/src/feature/cooler.h b/Marlin/src/feature/cooler.h index 9bd98d0b1032..9891514e23c9 100644 --- a/Marlin/src/feature/cooler.h +++ b/Marlin/src/feature/cooler.h @@ -94,12 +94,12 @@ class Cooler { } #if ENABLED(FLOWMETER_SAFETY) - static bool fault; // Flag that the cooler is in a fault state - static bool flowsafety_enabled; // Flag to disable the cutter if flow rate is too low + static bool flowfault; // Flag that the cooler is in a fault state + static bool flowsafety_enabled; // Flag to disable the cutter if flow rate is too low static void flowsafety_toggle() { flowsafety_enabled = !flowsafety_enabled; } static bool check_flow_too_low() { const bool too_low = flowsafety_enabled && flowrate < (FLOWMETER_MIN_LITERS_PER_MINUTE); - if (too_low) fault = true; + flowfault = too_low; return too_low; } #endif diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 0f66c4035e13..12fd231ca8e4 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -292,7 +292,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #endif #if ENABLED(FLOWMETER_SAFETY) - if (cooler.fault) { + if (cooler.flowfault) { SERIAL_ECHO_MSG(STR_FLOWMETER_FAULT); return; } diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 0a72b2b467be..4a56ba66e996 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1608,7 +1608,7 @@ void Temperature::manage_heater() { #if ENABLED(FLOWMETER_SAFETY) if (cutter.enabled() && cooler.check_flow_too_low()) { cutter.disable(); - ui.flow_fault(); + TERN_(HAS_DISPLAY, ui.flow_fault()); } #endif #endif diff --git a/ini/features.ini b/ini/features.ini index bf8342e545b6..e397ea31e92e 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -202,7 +202,8 @@ SDSUPPORT = src_filter=+ + GCODE_REPEAT_MARKERS = src_filter=+ + HAS_EXTRUDERS = src_filter=+ + + -HAS_COOLER = src_filter=+ + +HAS_COOLER = src_filter=+ +HAS_COOLER|LASER_COOLANT_FLOW_METER = src_filter=+ AUTO_REPORT_TEMPERATURES = src_filter=+ INCH_MODE_SUPPORT = src_filter=+ TEMPERATURE_UNITS_SUPPORT = src_filter=+ From 4febb2352179f3de58db2161572de4050197bd5d Mon Sep 17 00:00:00 2001 From: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Date: Tue, 13 Jul 2021 08:17:28 +0800 Subject: [PATCH 055/323] =?UTF-8?q?=E2=9C=A8=20MKS=20Robin=20Nano=20v3=20+?= =?UTF-8?q?=20TFT=5FLVGL=5FUI=20+=20WiFi=20module=20(#22109)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/HAL.cpp | 14 +- Marlin/src/HAL/STM32/HAL_MinSerial.cpp | 2 +- Marlin/src/HAL/STM32/HAL_SPI.cpp | 4 +- Marlin/src/HAL/STM32/MarlinSPI.cpp | 4 +- Marlin/src/HAL/STM32/MarlinSerial.cpp | 4 +- .../src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp | 4 +- Marlin/src/HAL/STM32/Servo.cpp | 4 +- Marlin/src/HAL/STM32/eeprom_flash.cpp | 4 +- Marlin/src/HAL/STM32/eeprom_sdcard.cpp | 4 +- Marlin/src/HAL/STM32/eeprom_sram.cpp | 4 +- Marlin/src/HAL/STM32/eeprom_wired.cpp | 4 +- Marlin/src/HAL/STM32/fast_pwm.cpp | 4 +- Marlin/src/HAL/STM32/fastio.cpp | 4 +- Marlin/src/HAL/STM32/msc_sd.cpp | 14 +- Marlin/src/HAL/STM32/tft/gt911.cpp | 4 +- Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 4 +- Marlin/src/HAL/STM32/tft/tft_ltdc.cpp | 4 +- Marlin/src/HAL/STM32/tft/tft_spi.cpp | 4 +- Marlin/src/HAL/STM32/tft/xpt2046.cpp | 4 +- Marlin/src/HAL/STM32/timers.cpp | 4 +- Marlin/src/HAL/STM32/usb_host.cpp | 4 +- Marlin/src/HAL/STM32/usb_serial.cpp | 4 +- Marlin/src/HAL/STM32/watchdog.cpp | 4 +- Marlin/src/HAL/STM32F1/msc_sd.cpp | 7 +- Marlin/src/MarlinCore.cpp | 7 - Marlin/src/core/macros.h | 2 +- .../ftdi_eve_touch_ui/ftdi_eve_lib/compat.h | 2 +- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 28 +- .../lcd/extui/mks_ui/draw_error_message.cpp | 5 +- Marlin/src/lcd/extui/mks_ui/draw_printing.cpp | 4 +- .../src/lcd/extui/mks_ui/draw_ready_print.cpp | 122 ++- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 36 +- Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp | 16 +- .../lcd/extui/mks_ui/mks_hardware_test.cpp | 140 ++-- .../src/lcd/extui/mks_ui/mks_hardware_test.h | 6 +- Marlin/src/lcd/extui/mks_ui/pic_manager.cpp | 5 +- .../lcd/extui/mks_ui/printer_operation.cpp | 37 +- .../extui/mks_ui/tft_lvgl_configuration.cpp | 33 +- .../lcd/extui/mks_ui/tft_multi_language.cpp | 34 +- Marlin/src/lcd/extui/mks_ui/wifiSerial.h | 76 +- .../src/lcd/extui/mks_ui/wifiSerial_STM32.cpp | 352 +++++++++ .../src/lcd/extui/mks_ui/wifiSerial_STM32.h | 63 ++ ...{wifiSerial.cpp => wifiSerial_STM32F1.cpp} | 18 +- .../src/lcd/extui/mks_ui/wifiSerial_STM32F1.h | 77 ++ Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 702 ++++++++++++------ Marlin/src/lcd/extui/mks_ui/wifi_module.h | 4 + Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp | 10 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 1 + .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 15 +- buildroot/tests/mks_robin_nano35 | 4 +- ini/stm32f1-maple.ini | 3 +- 51 files changed, 1270 insertions(+), 649 deletions(-) create mode 100644 Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp create mode 100644 Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h rename Marlin/src/lcd/extui/mks_ui/{wifiSerial.cpp => wifiSerial_STM32F1.cpp} (88%) create mode 100644 Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.h diff --git a/Marlin/src/HAL/STM32/HAL.cpp b/Marlin/src/HAL/STM32/HAL.cpp index e09b52f7db5a..d8035a979ded 100644 --- a/Marlin/src/HAL/STM32/HAL.cpp +++ b/Marlin/src/HAL/STM32/HAL.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "HAL.h" #include "usb_serial.h" @@ -91,15 +91,13 @@ void HAL_init() { USB_Hook_init(); #endif - TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler + TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler - #if HAS_SD_HOST_DRIVE - MSC_SD_init(); // Enable USB SD card access - #endif + TERN_(HAS_SD_HOST_DRIVE, MSC_SD_init()); // Enable USB SD card access #if PIN_EXISTS(USB_CONNECT) - OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection - delay(1000); // Give OS time to notice + OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection + delay(1000); // Give OS time to notice WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING); #endif } @@ -167,4 +165,4 @@ void HAL_SYSTICK_Callback() { if (systick_user_callback) systick_user_callback(); } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/HAL_MinSerial.cpp b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp index 7268eed5919c..44fb93337d4a 100644 --- a/Marlin/src/HAL/STM32/HAL_MinSerial.cpp +++ b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfigPre.h" diff --git a/Marlin/src/HAL/STM32/HAL_SPI.cpp b/Marlin/src/HAL/STM32/HAL_SPI.cpp index bd36562de9ca..ba8e6bef197e 100644 --- a/Marlin/src/HAL/STM32/HAL_SPI.cpp +++ b/Marlin/src/HAL/STM32/HAL_SPI.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -224,4 +224,4 @@ static SPISettings spiConfig; #endif // SOFTWARE_SPI -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/MarlinSPI.cpp b/Marlin/src/HAL/STM32/MarlinSPI.cpp index 896ec1433f40..41081dfb80ca 100644 --- a/Marlin/src/HAL/STM32/MarlinSPI.cpp +++ b/Marlin/src/HAL/STM32/MarlinSPI.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(STM32H7xx) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) && !defined(STM32H7xx) #include "MarlinSPI.h" @@ -165,4 +165,4 @@ uint8_t MarlinSPI::dmaSend(const void * transmitBuf, uint16_t length, bool minc) return 1; } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 && !STM32H7xx diff --git a/Marlin/src/HAL/STM32/MarlinSerial.cpp b/Marlin/src/HAL/STM32/MarlinSerial.cpp index 265e8b5ab61b..d990d2f428a1 100644 --- a/Marlin/src/HAL/STM32/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32/MarlinSerial.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" #include "MarlinSerial.h" @@ -101,4 +101,4 @@ void MarlinSerial::_rx_complete_irq(serial_t *obj) { } } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp index 3353f8c36b8c..2ba0359cac69 100644 --- a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp +++ b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -343,4 +343,4 @@ #endif // !USBD_USE_CDC_COMPOSITE #endif // SDIO_SUPPORT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/Servo.cpp b/Marlin/src/HAL/STM32/Servo.cpp index 1cf117a05694..c0a64c5ea949 100644 --- a/Marlin/src/HAL/STM32/Servo.cpp +++ b/Marlin/src/HAL/STM32/Servo.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -107,4 +107,4 @@ void libServo::setInterruptPriority(uint32_t preemptPriority, uint32_t subPriori } #endif // HAS_SERVOS -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index dfeae9e9e5e6..05e0d4c42015 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -270,4 +270,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // FLASH_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp index f811468fb484..9cab90f10909 100644 --- a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) /** * Implementation of EEPROM settings in SD Card @@ -88,4 +88,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uin } #endif // SDCARD_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/eeprom_sram.cpp b/Marlin/src/HAL/STM32/eeprom_sram.cpp index 135bcabde9aa..c39178523472 100644 --- a/Marlin/src/HAL/STM32/eeprom_sram.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sram.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -65,4 +65,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // SRAM_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/eeprom_wired.cpp b/Marlin/src/HAL/STM32/eeprom_wired.cpp index 6aa2f1d360f8..3346abbe4ac3 100644 --- a/Marlin/src/HAL/STM32/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32/eeprom_wired.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -75,4 +75,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // USE_WIRED_EEPROM -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/fast_pwm.cpp b/Marlin/src/HAL/STM32/fast_pwm.cpp index 42eecb5e1a96..eaffb8cfa40f 100644 --- a/Marlin/src/HAL/STM32/fast_pwm.cpp +++ b/Marlin/src/HAL/STM32/fast_pwm.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfigPre.h" @@ -56,4 +56,4 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255 } #endif // NEEDS_HARDWARE_PWM -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/fastio.cpp b/Marlin/src/HAL/STM32/fastio.cpp index 0d55579d8886..5056e99d35f0 100644 --- a/Marlin/src/HAL/STM32/fastio.cpp +++ b/Marlin/src/HAL/STM32/fastio.cpp @@ -20,7 +20,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -31,4 +31,4 @@ void FastIO_init() { FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i])); } -#endif +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/msc_sd.cpp b/Marlin/src/HAL/STM32/msc_sd.cpp index 64f2533002d8..98f75d89f041 100644 --- a/Marlin/src/HAL/STM32/msc_sd.cpp +++ b/Marlin/src/HAL/STM32/msc_sd.cpp @@ -13,21 +13,24 @@ * along with this program. If not, see . * */ +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) + #include "../../inc/MarlinConfigPre.h" -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && HAS_SD_HOST_DRIVE +#if HAS_SD_HOST_DRIVE #include "msc_sd.h" -#include "../shared/Marduino.h" #include "usbd_core.h" + +#include "../shared/Marduino.h" +#include "../../sd/cardreader.h" + #include #include #define BLOCK_SIZE 512 #define PRODUCT_ID 0x29 -#include "../../sd/cardreader.h" - class Sd2CardUSBMscHandler : public USBMscHandler { public: DiskIODriver* diskIODriver() { @@ -121,4 +124,5 @@ void MSC_SD_init() { USBDevice.begin(); } -#endif // __STM32F1__ && HAS_SD_HOST_DRIVE +#endif // HAS_SD_HOST_DRIVE +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/tft/gt911.cpp b/Marlin/src/HAL/STM32/tft/gt911.cpp index f99fa46e1946..8c59a60f92d5 100644 --- a/Marlin/src/HAL/STM32/tft/gt911.cpp +++ b/Marlin/src/HAL/STM32/tft/gt911.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../../inc/MarlinConfig.h" @@ -199,4 +199,4 @@ bool GT911::getPoint(int16_t *x, int16_t *y) { } #endif // TFT_TOUCH_DEVICE_GT911 -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index 87ca2dbbe18a..f349eacac31c 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../../inc/MarlinConfig.h" @@ -178,4 +178,4 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou } #endif // HAS_FSMC_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp index f2509ce5e4db..53e5bd83e027 100644 --- a/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../../inc/MarlinConfig.h" @@ -384,4 +384,4 @@ void TFT_LTDC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou } #endif // HAS_LTDC_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/tft/tft_spi.cpp b/Marlin/src/HAL/STM32/tft/tft_spi.cpp index 6bfce81f1a53..4e3f894a52e0 100644 --- a/Marlin/src/HAL/STM32/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_spi.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../../inc/MarlinConfig.h" @@ -240,4 +240,4 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun } #endif // HAS_SPI_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/tft/xpt2046.cpp b/Marlin/src/HAL/STM32/tft/xpt2046.cpp index dffeb6aaf72f..d50c24d1777d 100644 --- a/Marlin/src/HAL/STM32/tft/xpt2046.cpp +++ b/Marlin/src/HAL/STM32/tft/xpt2046.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../../inc/MarlinConfig.h" @@ -167,4 +167,4 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) { } #endif // HAS_TFT_XPT2046 -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/timers.cpp b/Marlin/src/HAL/STM32/timers.cpp index 03353c2ca30e..78061981803d 100644 --- a/Marlin/src/HAL/STM32/timers.cpp +++ b/Marlin/src/HAL/STM32/timers.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -319,4 +319,4 @@ static constexpr bool verify_no_timer_conflicts() { // when hovering over it, making it easy to identify the conflicting timers. static_assert(verify_no_timer_conflicts(), "One or more timer conflict detected. Examine \"timers_in_use\" to help identify conflict."); -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/usb_host.cpp b/Marlin/src/HAL/STM32/usb_host.cpp index 8fa49ccbcc16..e45ab560e662 100644 --- a/Marlin/src/HAL/STM32/usb_host.cpp +++ b/Marlin/src/HAL/STM32/usb_host.cpp @@ -20,7 +20,7 @@ * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfig.h" @@ -114,4 +114,4 @@ uint8_t BulkStorage::Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t b } #endif // USE_OTG_USB_HOST && USBHOST -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/usb_serial.cpp b/Marlin/src/HAL/STM32/usb_serial.cpp index 705d649ff58c..0e23175fc060 100644 --- a/Marlin/src/HAL/STM32/usb_serial.cpp +++ b/Marlin/src/HAL/STM32/usb_serial.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfigPre.h" @@ -51,4 +51,4 @@ void USB_Hook_init() { } #endif // EMERGENCY_PARSER && USBD_USE_CDC -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/watchdog.cpp b/Marlin/src/HAL/STM32/watchdog.cpp index aad0a79a0cb2..09b403e7f237 100644 --- a/Marlin/src/HAL/STM32/watchdog.cpp +++ b/Marlin/src/HAL/STM32/watchdog.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #include "../../inc/MarlinConfigPre.h" @@ -46,4 +46,4 @@ void HAL_watchdog_refresh() { } #endif // USE_WATCHDOG -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32F1/msc_sd.cpp b/Marlin/src/HAL/STM32F1/msc_sd.cpp index 7725b2c32400..f490c83ed829 100644 --- a/Marlin/src/HAL/STM32F1/msc_sd.cpp +++ b/Marlin/src/HAL/STM32F1/msc_sd.cpp @@ -13,9 +13,11 @@ * along with this program. If not, see . * */ +#ifdef __STM32F1__ + #include "../../inc/MarlinConfigPre.h" -#if defined(__STM32F1__) && HAS_SD_HOST_DRIVE +#if HAS_SD_HOST_DRIVE #include "msc_sd.h" #include "SPI.h" @@ -92,4 +94,5 @@ void MSC_SD_init() { #endif } -#endif // __STM32F1__ && HAS_SD_HOST_DRIVE +#endif // HAS_SD_HOST_DRIVE +#endif // __STM32F1__ diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 8b5f83f2a493..c595e8b13664 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1213,13 +1213,6 @@ void setup() { #endif #endif - #if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) - mks_esp_wifi_init(); - WIFISERIAL.begin(WIFI_BAUDRATE); - serial_connect_timeout = millis() + 1000UL; - while (/*!WIFISERIAL && */PENDING(millis(), serial_connect_timeout)) { /*nada*/ } - #endif - TERN_(DYNAMIC_VECTORTABLE, hook_cpu_exceptions()); // If supported, install Marlin exception handlers at runtime SETUP_RUN(HAL_init()); diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 05640bce8740..abcd7b9480cb 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -442,7 +442,7 @@ return contains(str, '/') ? findLastPos(findStringEnd(str), '/') : str; } - // Find the first occurence of a character in a string (or return the last position in the string) + // Find the first occurrence of a character in a string (or return the last position in the string) constexpr const char* findFirst(const char *str, const char ch) { return *str == ch || *str == 0 ? (str + 1) : findFirst(str + 1, ch); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h index 8ae7a150f876..339b337e5533 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h @@ -288,7 +288,7 @@ // Remove compiler warning on an unused variable #ifndef UNUSED - #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) #define UNUSED(X) (void)X #else #define UNUSED(x) ((void)(x)) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index 6d207b86a7c7..3f2cd32c7377 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -61,7 +61,7 @@ static lv_obj_t *scr, *tempText1, *filament_bar; extern uint8_t sel_id; extern bool once_flag, gcode_preview_over; extern int upload_result; -extern uint32_t upload_time; +extern uint32_t upload_time_sec; extern uint32_t upload_size; extern bool temps_update_flag; @@ -406,28 +406,24 @@ void lv_draw_dialog(uint8_t type) { char buf[200]; int _index = 0; - strcpy(buf, DIALOG_UPLOAD_FINISH_EN); + strcpy_P(buf, PSTR(DIALOG_UPLOAD_FINISH_EN)); _index = strlen(buf); - buf[_index] = '\n'; - _index++; - strcat(buf, DIALOG_UPLOAD_SIZE_EN); + buf[_index++] = '\n'; + strcat_P(buf, PSTR(DIALOG_UPLOAD_SIZE_EN)); _index = strlen(buf); - buf[_index] = ':'; - _index++; - sprintf(&buf[_index], " %d KBytes\n", (int)(upload_size / 1024)); + buf[_index++] = ':'; + sprintf_P(&buf[_index], PSTR(" %d KBytes\n"), (int)(upload_size / 1024)); - strcat(buf, DIALOG_UPLOAD_TIME_EN); + strcat_P(buf, PSTR(DIALOG_UPLOAD_TIME_EN)); _index = strlen(buf); - buf[_index] = ':'; - _index++; - sprintf(&buf[_index], " %d s\n", (int)upload_time); + buf[_index++] = ':'; + sprintf_P(&buf[_index], PSTR(" %d s\n"), (int)upload_time_sec); - strcat(buf, DIALOG_UPLOAD_SPEED_EN); + strcat_P(buf, PSTR(DIALOG_UPLOAD_SPEED_EN)); _index = strlen(buf); - buf[_index] = ':'; - _index++; - sprintf(&buf[_index], " %d KBytes/s\n", (int)(upload_size / upload_time / 1024)); + buf[_index++] = ':'; + sprintf_P(&buf[_index], PSTR(" %d KBytes/s\n"), (int)(upload_size / upload_time_sec / 1024)); lv_label_set_text(labelDialog, buf); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp index 3297b9da2772..7ee2617326f0 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp @@ -29,9 +29,12 @@ #include "tft_lvgl_configuration.h" #include "SPI_TFT.h" -#include "mks_hardware_test.h" #include "../../../inc/MarlinConfig.h" +#if ENABLED(MKS_TEST) + #include "mks_hardware_test.h" +#endif + static lv_obj_t *scr; void lv_draw_error_message(PGM_P const msg) { diff --git a/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp index e3efb14c2894..e3915adeb088 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp @@ -47,14 +47,16 @@ static lv_obj_t *scr; static lv_obj_t *labelExt1, *labelFan, *labelZpos, *labelTime; static lv_obj_t *labelPause, *labelStop, *labelOperat; static lv_obj_t *bar1, *bar1ValueText; -static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonExt2, *buttonBedstate, *buttonFanstate, *buttonZpos; +static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonFanstate, *buttonZpos; #if HAS_MULTI_EXTRUDER static lv_obj_t *labelExt2; + static lv_obj_t *buttonExt2; #endif #if HAS_HEATED_BED static lv_obj_t* labelBed; + static lv_obj_t* buttonBedstate; #endif enum { diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp index 18f125b57d3a..83aec7613e01 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp @@ -27,7 +27,6 @@ #include "draw_tool.h" #include #include "tft_lvgl_configuration.h" -#include "mks_hardware_test.h" #include "draw_ui.h" #include @@ -40,6 +39,10 @@ #include "draw_touch_calibration.h" #endif +#if ENABLED(MKS_TEST) + #include "mks_hardware_test.h" +#endif + #include #define ICON_POS_Y 38 @@ -48,14 +51,16 @@ extern lv_group_t* g; static lv_obj_t *scr; -static lv_obj_t *labelExt1, *labelExt1Target, *labelFan; +static lv_obj_t *buttonExt1, *labelExt1, *buttonFanstate, *labelFan; -#if HAS_MULTI_EXTRUDER - static lv_obj_t *labelExt2, *labelExt2Target; +#if HAS_MULTI_HOTEND + static lv_obj_t *labelExt2; + static lv_obj_t *buttonExt2; #endif #if HAS_HEATED_BED - static lv_obj_t *labelBed, *labelBedTarget; + static lv_obj_t* labelBed; + static lv_obj_t* buttonBedstate; #endif #if ENABLED(MKS_TEST) @@ -136,18 +141,18 @@ void lv_draw_ready_print() { lv_obj_align(label_tool, buttonTool, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } - e1 = lv_label_create_empty(scr); - lv_obj_set_pos(e1, 20, 20); - sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(0)); - lv_label_set_text(e1, buf); - + #if HAS_HOTEND + e1 = lv_label_create_empty(scr); + lv_obj_set_pos(e1, 20, 20); + sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(0)); + lv_label_set_text(e1, buf); + #endif #if HAS_MULTI_HOTEND e2 = lv_label_create_empty(scr); lv_obj_set_pos(e2, 20, 45); sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(1)); lv_label_set_text(e2, buf); #endif - #if HAS_HEATED_BED bed = lv_label_create_empty(scr); lv_obj_set_pos(bed, 20, 95); @@ -178,72 +183,27 @@ void lv_draw_ready_print() { lv_label_set_text(det_info, " "); } else { - lv_big_button_create(scr, "F:/bmp_tool.bin", main_menu.tool, 20, 180, event_handler, ID_TOOL); - lv_big_button_create(scr, "F:/bmp_set.bin", main_menu.set, 180, 180, event_handler, ID_SET); - lv_big_button_create(scr, "F:/bmp_printing.bin", main_menu.print, 340, 180, event_handler, ID_PRINT); + lv_big_button_create(scr, "F:/bmp_tool.bin", main_menu.tool, 20, 150, event_handler, ID_TOOL); + lv_big_button_create(scr, "F:/bmp_set.bin", main_menu.set, 180, 150, event_handler, ID_SET); + lv_big_button_create(scr, "F:/bmp_printing.bin", main_menu.print, 340, 150, event_handler, ID_PRINT); // Monitoring - lv_obj_t *buttonExt1 = lv_big_button_create(scr, "F:/bmp_ext1_state.bin", " ", 55, ICON_POS_Y, event_handler, ID_INFO_EXT); - #if HAS_MULTI_EXTRUDER - lv_obj_t *buttonExt2 = lv_big_button_create(scr, "F:/bmp_ext2_state.bin", " ", 163, ICON_POS_Y, event_handler, ID_INFO_EXT); - #if HAS_HEATED_BED - lv_obj_t *buttonBedstate = lv_big_button_create(scr, "F:/bmp_bed_state.bin", " ", 271, ICON_POS_Y, event_handler, ID_INFO_BED); - #endif - #else - #if HAS_HEATED_BED - lv_obj_t *buttonBedstate = lv_big_button_create(scr, "F:/bmp_bed_state.bin", " ", 210, ICON_POS_Y, event_handler, ID_INFO_BED); - #endif + #if HAS_HOTEND + buttonExt1 = lv_big_button_create(scr, "F:/bmp_ext1_state.bin", " ", 55, ICON_POS_Y, event_handler, ID_INFO_EXT); #endif - - lv_obj_t *buttonFanstate = lv_big_button_create(scr, "F:/bmp_fan_state.bin", " ", 380, ICON_POS_Y, event_handler, ID_INFO_FAN); - - labelExt1 = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr); - labelExt1Target = lv_label_create(scr, 55, LABEL_MOD_Y, nullptr); - - #if HAS_MULTI_EXTRUDER - labelExt2 = lv_label_create(scr, 163, LABEL_MOD_Y, nullptr); - labelExt2Target = lv_label_create(scr, 163, LABEL_MOD_Y, nullptr); - #if HAS_HEATED_BED - labelBed = lv_label_create(scr, 271, LABEL_MOD_Y, nullptr); - labelBedTarget = lv_label_create(scr, 271, LABEL_MOD_Y, nullptr); - #endif - #else - #if HAS_HEATED_BED - labelBed = lv_label_create(scr, 210, LABEL_MOD_Y, nullptr); - labelBedTarget = lv_label_create(scr, 210, LABEL_MOD_Y, nullptr); - #endif - #endif - - labelFan = lv_label_create(scr, 380, 80, nullptr); - - itoa(thermalManager.degHotend(0), buf, 10); - lv_label_set_text(labelExt1, buf); - lv_obj_align(labelExt1, buttonExt1, LV_ALIGN_CENTER, 0, LABEL_MOD_Y); - sprintf_P(buf, PSTR("-> %d"), thermalManager.degTargetHotend(0)); - lv_label_set_text(labelExt1Target, buf); - lv_obj_align(labelExt1Target, buttonExt1, LV_ALIGN_CENTER, 0, TARGET_LABEL_MOD_Y); - - #if HAS_MULTI_EXTRUDER - itoa(thermalManager.degHotend(1), buf, 10); - lv_label_set_text(labelExt2, buf); - lv_obj_align(labelExt2, buttonExt2, LV_ALIGN_CENTER, 0, LABEL_MOD_Y); - sprintf_P(buf, PSTR("-> %d"), thermalManager.degTargetHotend(1)); - lv_label_set_text(labelExt2Target, buf); - lv_obj_align(labelExt2Target, buttonExt2, LV_ALIGN_CENTER, 0, TARGET_LABEL_MOD_Y); + #if HAS_MULTI_HOTEND + buttonExt2 = lv_big_button_create(scr, "F:/bmp_ext2_state.bin", " ", 163, ICON_POS_Y, event_handler, ID_INFO_EXT); #endif - #if HAS_HEATED_BED - itoa(thermalManager.degBed(), buf, 10); - lv_label_set_text(labelBed, buf); - lv_obj_align(labelBed, buttonBedstate, LV_ALIGN_CENTER, 0, LABEL_MOD_Y); - sprintf_P(buf, PSTR("-> %d"), thermalManager.degTargetBed()); - lv_label_set_text(labelBedTarget, buf); - lv_obj_align(labelBedTarget, buttonBedstate, LV_ALIGN_CENTER, 0, TARGET_LABEL_MOD_Y); + buttonBedstate = lv_big_button_create(scr, "F:/bmp_bed_state.bin", " ", TERN(HAS_MULTI_HOTEND, 271, 210), ICON_POS_Y, event_handler, ID_INFO_BED); #endif - sprintf_P(buf, PSTR("%d%%"), (int)thermalManager.fanSpeedPercent(0)); - lv_label_set_text(labelFan, buf); - lv_obj_align(labelFan, buttonFanstate, LV_ALIGN_CENTER, 0, LABEL_MOD_Y); + TERN_(HAS_HOTEND, labelExt1 = lv_label_create_empty(scr)); + TERN_(HAS_MULTI_HOTEND, labelExt2 = lv_label_create_empty(scr)); + TERN_(HAS_HEATED_BED, labelBed = lv_label_create_empty(scr)); + TERN_(HAS_FAN, labelFan = lv_label_create_empty(scr)); + + lv_temp_refr(); } #if ENABLED(TOUCH_SCREEN_CALIBRATION) @@ -256,17 +216,25 @@ void lv_draw_ready_print() { } void lv_temp_refr() { + #if HAS_HOTEND + sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); + lv_label_set_text(labelExt1, public_buf_l); + lv_obj_align(labelExt1, buttonExt1, LV_ALIGN_OUT_BOTTOM_MID, 0, 0); + #endif + #if HAS_MULTI_HOTEND + sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); + lv_label_set_text(labelExt2, public_buf_l); + lv_obj_align(labelExt2, buttonExt2, LV_ALIGN_OUT_BOTTOM_MID, 0, 0); + #endif #if HAS_HEATED_BED sprintf(public_buf_l, printing_menu.bed_temp, thermalManager.wholeDegBed(), thermalManager.degTargetBed()); lv_label_set_text(labelBed, public_buf_l); + lv_obj_align(labelBed, buttonBedstate, LV_ALIGN_OUT_BOTTOM_MID, 0, 0); #endif - - sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); - lv_label_set_text(labelExt1, public_buf_l); - - #if HAS_MULTI_EXTRUDER - sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); - lv_label_set_text(labelExt2, public_buf_l); + #if HAS_FAN + sprintf_P(public_buf_l, PSTR("%d%%"), (int)thermalManager.fanSpeedPercent(0)); + lv_label_set_text(labelFan, public_buf_l); + lv_obj_align(labelFan, buttonFanstate, LV_ALIGN_OUT_BOTTOM_MID, 0, 0); #endif } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 727120c18356..30e08e03ed45 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -30,7 +30,6 @@ #include "pic_manager.h" #include "draw_ui.h" -#include "mks_hardware_test.h" #include @@ -52,6 +51,10 @@ #include "draw_touch_calibration.h" #endif +#if ENABLED(MKS_TEST) + #include "mks_hardware_test.h" +#endif + CFG_ITMES gCfgItems; UI_CFG uiCfg; DISP_STATE_STACK disp_state_stack; @@ -202,27 +205,27 @@ void ui_cfg_init() { #if ENABLED(MKS_WIFI_MODULE) memset(&wifiPara, 0, sizeof(wifiPara)); memset(&ipPara, 0, sizeof(ipPara)); - strcpy(wifiPara.ap_name, WIFI_AP_NAME); - strcpy(wifiPara.keyCode, WIFI_KEY_CODE); + strcpy_P(wifiPara.ap_name, PSTR(WIFI_AP_NAME)); + strcpy_P(wifiPara.keyCode, PSTR(WIFI_KEY_CODE)); //client - strcpy(ipPara.ip_addr, IP_ADDR); - strcpy(ipPara.mask, IP_MASK); - strcpy(ipPara.gate, IP_GATE); - strcpy(ipPara.dns, IP_DNS); + strcpy_P(ipPara.ip_addr, PSTR(IP_ADDR)); + strcpy_P(ipPara.mask, PSTR(IP_MASK)); + strcpy_P(ipPara.gate, PSTR(IP_GATE)); + strcpy_P(ipPara.dns, PSTR(IP_DNS)); ipPara.dhcp_flag = IP_DHCP_FLAG; //AP - strcpy(ipPara.dhcpd_ip, AP_IP_ADDR); - strcpy(ipPara.dhcpd_mask, AP_IP_MASK); - strcpy(ipPara.dhcpd_gate, AP_IP_GATE); - strcpy(ipPara.dhcpd_dns, AP_IP_DNS); - strcpy(ipPara.start_ip_addr, IP_START_IP); - strcpy(ipPara.end_ip_addr, IP_END_IP); + strcpy_P(ipPara.dhcpd_ip, PSTR(AP_IP_ADDR)); + strcpy_P(ipPara.dhcpd_mask, PSTR(AP_IP_MASK)); + strcpy_P(ipPara.dhcpd_gate, PSTR(AP_IP_GATE)); + strcpy_P(ipPara.dhcpd_dns, PSTR(AP_IP_DNS)); + strcpy_P(ipPara.start_ip_addr, PSTR(IP_START_IP)); + strcpy_P(ipPara.end_ip_addr, PSTR(IP_END_IP)); ipPara.dhcpd_flag = AP_IP_DHCP_FLAG; - strcpy((char*)uiCfg.cloud_hostUrl, "baizhongyun.cn"); + strcpy_P((char*)uiCfg.cloud_hostUrl, PSTR("baizhongyun.cn")); uiCfg.cloud_port = 10086; #endif @@ -1362,7 +1365,10 @@ void print_time_count() { void LV_TASK_HANDLER() { lv_task_handler(); - if (mks_test_flag == 0x1E) mks_hardware_test(); + + #if ENABLED(MKS_TEST) + if (mks_test_flag == 0x1E) mks_hardware_test(); + #endif TERN_(HAS_GCODE_PREVIEW, disp_pre_gcode(2, 36)); diff --git a/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp b/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp index df48cbec0ac8..f3c87c03c4b5 100644 --- a/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp +++ b/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp @@ -19,14 +19,14 @@ * along with this program. If not, see . * */ +#ifdef __STM32F1__ + #include "../../../inc/MarlinConfigPre.h" -#if HAS_TFT_LVGL_UI +#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "tft_lvgl_configuration.h" -#if ENABLED(MKS_WIFI_MODULE) - #include "draw_ui.h" #include "wifiSerial.h" @@ -46,15 +46,15 @@ #define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); void __irq_usart1() { - if ((USART1_BASE->CR1 & USART_CR1_RXNEIE) && (USART1_BASE->SR & USART_SR_RXNE)) - WRITE(WIFI_IO1_PIN, HIGH); + if ((USART1_BASE->CR1 & USART_CR1_RXNEIE) && (USART1_BASE->SR & USART_SR_RXNE)) + WRITE(WIFI_IO1_PIN, HIGH); - WIFISERIAL.wifi_usart_irq(USART1_BASE); + WIFISERIAL.wifi_usart_irq(USART1_BASE); } #ifdef __cplusplus } /* C-declarations for C++ */ #endif -#endif // MKS_WIFI_MODULE -#endif // HAS_TFT_LVGL_UI +#endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE +#endif // __STM32F1__ diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.cpp index bcb3cdb6a27e..125f8be0f6c3 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.cpp @@ -27,7 +27,6 @@ #include "tft_lvgl_configuration.h" #include "draw_ready_print.h" -#include "mks_hardware_test.h" #include "draw_ui.h" #include "pic_manager.h" #include @@ -36,51 +35,47 @@ #include "../../../module/temperature.h" #include "../../../sd/cardreader.h" -uint8_t pw_det_sta, pw_off_sta, mt_det_sta, mt_det3_sta; -#if PIN_EXISTS(MT_DET_2) - uint8_t mt_det2_sta; -#endif -uint8_t endstopx1_sta, endstopx2_sta, endstopy1_sta, endstopy2_sta, endstopz1_sta, endstopz2_sta; -void test_gpio_readlevel_L() { - #if ENABLED(MKS_TEST) - volatile uint32_t itest; +#if ENABLED(MKS_TEST) + + #include "mks_hardware_test.h" + + bool pw_det_sta, pw_off_sta, mt_det_sta; + #if PIN_EXISTS(MT_DET_2) + bool mt_det2_sta; + #endif + bool endstopx1_sta, endstopx2_sta, endstopy1_sta, endstopy2_sta, endstopz1_sta, endstopz2_sta; + + void test_gpio_readlevel_L() { WRITE(WIFI_IO0_PIN, HIGH); - itest = 10000; - while (itest--); - pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == 0); - pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == 0); - mt_det_sta = (READ(MT_DET_1_PIN) == 0); + delay(10); + pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == LOW); + pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == LOW); + mt_det_sta = (READ(MT_DET_1_PIN) == LOW); #if PIN_EXISTS(MT_DET_2) - mt_det2_sta = (READ(MT_DET_2_PIN) == 0); + mt_det2_sta = (READ(MT_DET_2_PIN) == LOW); #endif - endstopx1_sta = (READ(X_MIN_PIN) == 0); - endstopy1_sta = (READ(Y_MIN_PIN) == 0); - endstopz1_sta = (READ(Z_MIN_PIN) == 0); - endstopz2_sta = (READ(Z_MAX_PIN) == 0); - #endif -} + endstopx1_sta = (READ(X_MIN_PIN) == LOW); + endstopy1_sta = (READ(Y_MIN_PIN) == LOW); + endstopz1_sta = (READ(Z_MIN_PIN) == LOW); + endstopz2_sta = (READ(Z_MAX_PIN) == LOW); + } -void test_gpio_readlevel_H() { - #if ENABLED(MKS_TEST) - volatile uint32_t itest; + void test_gpio_readlevel_H() { WRITE(WIFI_IO0_PIN, LOW); - itest = 10000; - while (itest--); - pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == 1); - pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == 1); - mt_det_sta = (READ(MT_DET_1_PIN) == 1); + delay(10); + pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == HIGH); + pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == HIGH); + mt_det_sta = (READ(MT_DET_1_PIN) == HIGH); #if PIN_EXISTS(MT_DET_2) - mt_det2_sta = (READ(MT_DET_2_PIN) == 1); + mt_det2_sta = (READ(MT_DET_2_PIN) == HIGH); #endif - endstopx1_sta = (READ(X_MIN_PIN) == 1); - endstopy1_sta = (READ(Y_MIN_PIN) == 1); - endstopz1_sta = (READ(Z_MIN_PIN) == 1); - endstopz2_sta = (READ(Z_MAX_PIN) == 1); - #endif -} + endstopx1_sta = (READ(X_MIN_PIN) == HIGH); + endstopy1_sta = (READ(Y_MIN_PIN) == HIGH); + endstopz1_sta = (READ(Z_MIN_PIN) == HIGH); + endstopz2_sta = (READ(Z_MAX_PIN) == HIGH); + } -void init_test_gpio() { - #ifdef MKS_TEST + void init_test_gpio() { SET_INPUT_PULLUP(X_MIN_PIN); SET_INPUT_PULLUP(Y_MIN_PIN); SET_INPUT_PULLUP(Z_MIN_PIN); @@ -102,7 +97,7 @@ void init_test_gpio() { SET_OUTPUT(Y_ENABLE_PIN); SET_OUTPUT(Z_ENABLE_PIN); SET_OUTPUT(E0_ENABLE_PIN); - #if !MB(MKS_ROBIN_E3P) + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) SET_OUTPUT(E1_ENABLE_PIN); #endif @@ -110,11 +105,11 @@ void init_test_gpio() { WRITE(Y_ENABLE_PIN, LOW); WRITE(Z_ENABLE_PIN, LOW); WRITE(E0_ENABLE_PIN, LOW); - #if !MB(MKS_ROBIN_E3P) + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(E1_ENABLE_PIN, LOW); #endif - #if MB(MKS_ROBIN_E3P) + #if ENABLED(MKS_HARDWARE_TEST_ONLY_E0) SET_INPUT_PULLUP(PA1); SET_INPUT_PULLUP(PA3); SET_INPUT_PULLUP(PC2); @@ -123,68 +118,56 @@ void init_test_gpio() { SET_INPUT_PULLUP(PE6); SET_INPUT_PULLUP(PE7); #endif - #endif -} + } -void mks_test_beeper() { - #ifdef MKS_TEST + void mks_test_beeper() { WRITE(BEEPER_PIN, HIGH); delay(100); WRITE(BEEPER_PIN, LOW); delay(100); - #endif -} + } -void mks_gpio_test() { - #if ENABLED(MKS_TEST) + void mks_gpio_test() { init_test_gpio(); test_gpio_readlevel_L(); test_gpio_readlevel_H(); test_gpio_readlevel_L(); - if ((pw_det_sta == 1) - && (pw_off_sta == 1) - && (mt_det_sta == 1) + if (pw_det_sta && pw_off_sta && mt_det_sta #if PIN_EXISTS(MT_DET_2) - && (mt_det2_sta == 1) + && mt_det2_sta #endif - #if MB(MKS_ROBIN_E3P) - && (READ(PA1) == 0) - && (READ(PA3) == 0) - && (READ(PC2) == 0) - && (READ(PD8) == 0) - && (READ(PE5) == 0) - && (READ(PE6) == 0) - && (READ(PE7) == 0) + #if ENABLED(MKS_HARDWARE_TEST_ONLY_E0) + && (READ(PA1) == LOW) + && (READ(PA3) == LOW) + && (READ(PC2) == LOW) + && (READ(PD8) == LOW) + && (READ(PE5) == LOW) + && (READ(PE6) == LOW) + && (READ(PE7) == LOW) #endif ) disp_det_ok(); else disp_det_error(); - if ( (endstopx1_sta == 1) - && (endstopy1_sta == 1) - && (endstopz1_sta == 1) - && (endstopz2_sta == 1) - ) + if (endstopx1_sta && endstopy1_sta && endstopz1_sta && endstopz2_sta) disp_Limit_ok(); else disp_Limit_error(); - #endif -} + } -void mks_hardware_test() { - #if ENABLED(MKS_TEST) + void mks_hardware_test() { if (millis() % 2000 < 1000) { WRITE(X_DIR_PIN, LOW); WRITE(Y_DIR_PIN, LOW); WRITE(Z_DIR_PIN, LOW); WRITE(E0_DIR_PIN, LOW); - #if !MB(MKS_ROBIN_E3P) + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(E1_DIR_PIN, LOW); #endif thermalManager.fan_speed[0] = 255; - #if !MB(MKS_ROBIN_E3P) + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(HEATER_1_PIN, HIGH); // HE1 #endif WRITE(HEATER_0_PIN, HIGH); // HE0 @@ -195,21 +178,18 @@ void mks_hardware_test() { WRITE(Y_DIR_PIN, HIGH); WRITE(Z_DIR_PIN, HIGH); WRITE(E0_DIR_PIN, HIGH); - #if !MB(MKS_ROBIN_E3P) + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(E1_DIR_PIN, HIGH); #endif thermalManager.fan_speed[0] = 0; - #if !MB(MKS_ROBIN_E3P) + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(HEATER_1_PIN, LOW); // HE1 #endif WRITE(HEATER_0_PIN, LOW); // HE0 WRITE(HEATER_BED_PIN, LOW); // HOT-BED } - if ( (endstopx1_sta == 1) && (endstopx2_sta == 1) - && (endstopy1_sta == 1) && (endstopy2_sta == 1) - && (endstopz1_sta == 1) && (endstopz2_sta == 1) - ) { + if (endstopx1_sta && endstopx2_sta && endstopy1_sta && endstopy2_sta && endstopz1_sta && endstopz2_sta) { // nothing here } else { @@ -217,9 +197,9 @@ void mks_hardware_test() { if (disp_state == PRINT_READY_UI) mks_disp_test(); + } - #endif -} +#endif // MKS_TEST static const uint16_t ASCII_Table_16x24[] PROGMEM = { // Space ' ' diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.h b/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.h index 0e2d8096bac9..1b46d4b0e61e 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.h +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.h @@ -24,10 +24,12 @@ #include void mks_gpio_test(); +void mks_hardware_test(); +void mks_test_get(); + void disp_char_1624(uint16_t x, uint16_t y, uint8_t c, uint16_t charColor, uint16_t bkColor); void disp_string(uint16_t x, uint16_t y, const char * string, uint16_t charColor, uint16_t bkColor); -void mks_hardware_test(); void disp_assets_update(); void disp_assets_update_progress(const char *msg); -void mks_test_get(); + extern uint8_t mks_test_flag; diff --git a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp index da7b1929cec0..03e408e32a38 100644 --- a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp @@ -27,7 +27,10 @@ #include "draw_ui.h" #include "pic_manager.h" #include "draw_ready_print.h" -#include "mks_hardware_test.h" + +#if ENABLED(MKS_TEST) + #include "mks_hardware_test.h" +#endif #include "SPIFlashStorage.h" #include "../../../libs/W25Qxx.h" diff --git a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp index b618a01957e8..5e359c409182 100644 --- a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp @@ -158,19 +158,12 @@ void filament_pin_setup() { } void filament_check() { - const int FIL_DELAY = 20; + #if ANY_PIN(MT_DET_1, MT_DET_2, MT_DET_3) + const int FIL_DELAY = 20; + #endif #if PIN_EXISTS(MT_DET_1) static int fil_det_count_1 = 0; - if (!READ(MT_DET_1_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_1++; - else if (READ(MT_DET_1_PIN) && MT_DET_PIN_INVERTING) - fil_det_count_1++; - else if (fil_det_count_1 > 0) - fil_det_count_1--; - - if (!READ(MT_DET_1_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_1++; - else if (READ(MT_DET_1_PIN) && MT_DET_PIN_INVERTING) + if (READ(MT_DET_1_PIN) == MT_DET_PIN_INVERTING) fil_det_count_1++; else if (fil_det_count_1 > 0) fil_det_count_1--; @@ -178,16 +171,7 @@ void filament_check() { #if PIN_EXISTS(MT_DET_2) static int fil_det_count_2 = 0; - if (!READ(MT_DET_2_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_2++; - else if (READ(MT_DET_2_PIN) && MT_DET_PIN_INVERTING) - fil_det_count_2++; - else if (fil_det_count_2 > 0) - fil_det_count_2--; - - if (!READ(MT_DET_2_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_2++; - else if (READ(MT_DET_2_PIN) && MT_DET_PIN_INVERTING) + if (READ(MT_DET_2_PIN) == MT_DET_PIN_INVERTING) fil_det_count_2++; else if (fil_det_count_2 > 0) fil_det_count_2--; @@ -195,16 +179,7 @@ void filament_check() { #if PIN_EXISTS(MT_DET_3) static int fil_det_count_3 = 0; - if (!READ(MT_DET_3_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_3++; - else if (READ(MT_DET_3_PIN) && MT_DET_PIN_INVERTING) - fil_det_count_3++; - else if (fil_det_count_3 > 0) - fil_det_count_3--; - - if (!READ(MT_DET_3_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_3++; - else if (READ(MT_DET_3_PIN) && MT_DET_PIN_INVERTING) + if (READ(MT_DET_3_PIN) == MT_DET_PIN_INVERTING) fil_det_count_3++; else if (fil_det_count_3 > 0) fil_det_count_3--; diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 84e3040e84e7..7f84277ef07b 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -45,6 +45,14 @@ XPT2046 touch; #include "../../../feature/powerloss.h" #endif +#if HAS_SERVOS + #include "../../../module/servo.h" +#endif + +#if EITHER(PROBE_TARE, HAS_Z_SERVO_PROBE) + #include "../../../module/probe.h" +#endif + #if ENABLED(TOUCH_SCREEN_CALIBRATION) #include "../../tft_io/touch_calibration.h" #include "draw_touch_calibration.h" @@ -131,10 +139,9 @@ void tft_lvgl_init() { #if ENABLED(SDSUPPORT) UpdateAssets(); watchdog_refresh(); // LVGL init takes time + mks_test_get(); #endif - mks_test_get(); - touch.Init(); lv_init(); @@ -193,8 +200,12 @@ void tft_lvgl_init() { filament_pin_setup(); lv_encoder_pin_init(); - TERN_(MKS_WIFI_MODULE, mks_wifi_firmware_update()); - + #if ENABLED(MKS_WIFI_MODULE) + mks_esp_wifi_init(); + mks_wifi_firmware_update(); + #endif + TERN_(HAS_SERVOS, servo_init()); + TERN_(HAS_Z_SERVO_PROBE, probe.servo_probe_init()); bool ready = true; #if ENABLED(POWER_LOSS_RECOVERY) recovery.load(); @@ -207,16 +218,22 @@ void tft_lvgl_init() { uiCfg.print_state = REPRINTING; - strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m)); - card.printLongPath(public_buf_m); - strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[0])); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m)); + card.printLongPath(public_buf_m); + strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[0])); + #else + strncpy(list_file.long_name[sel_id], recovery.info.sd_filename, sizeof(list_file.long_name[0])); + #endif lv_draw_printing(); } #endif if (ready) lv_draw_ready_print(); - if (mks_test_flag == 0x1E) mks_gpio_test(); + #if ENABLED(MKS_TEST) + if (mks_test_flag == 0x1E) mks_gpio_test(); + #endif } void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p) { diff --git a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp index b34942303a82..0771a31cb415 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp @@ -58,6 +58,8 @@ pause_msg_def pause_msg_menu; eeprom_def eeprom_menu; media_select_menu_def media_select_menu; +// TODO: Make all strings PSTR and update accessors for the benefit of AVR + machine_common_def machine_menu; void machine_setting_disp() { if (gCfgItems.language == LANG_SIMPLE_CHINESE) { @@ -1093,8 +1095,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_CN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_CN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_CN; - eeprom_menu.readTips = EEPROM_READ_TIPS_CN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_CN; + eeprom_menu.readTips = EEPROM_READ_TIPS_CN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_CN; break; #if 1 @@ -1337,8 +1339,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_T_CN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_T_CN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_T_CN; - eeprom_menu.readTips = EEPROM_READ_TIPS_T_CN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_T_CN; + eeprom_menu.readTips = EEPROM_READ_TIPS_T_CN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_T_CN; break; case LANG_ENGLISH: common_menu.dialog_confirm_title = TITLE_DIALOG_CONFIRM_EN; @@ -1571,8 +1573,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_EN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_EN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_EN; - eeprom_menu.readTips = EEPROM_READ_TIPS_EN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; + eeprom_menu.readTips = EEPROM_READ_TIPS_EN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; break; case LANG_RUSSIAN: common_menu.dialog_confirm_title = TITLE_DIALOG_CONFIRM_RU; @@ -1896,8 +1898,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_RU; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_RU; eeprom_menu.storeTips = EEPROM_STORE_TIPS_RU; - eeprom_menu.readTips = EEPROM_READ_TIPS_RU; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_RU; + eeprom_menu.readTips = EEPROM_READ_TIPS_RU; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_RU; break; case LANG_SPANISH: common_menu.dialog_confirm_title = TITLE_DIALOG_CONFIRM_SP; @@ -2133,8 +2135,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_SP; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_SP; eeprom_menu.storeTips = EEPROM_STORE_TIPS_SP; - eeprom_menu.readTips = EEPROM_READ_TIPS_SP; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_SP; + eeprom_menu.readTips = EEPROM_READ_TIPS_SP; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_SP; break; #endif // if 1 @@ -2367,8 +2369,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_FR; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_FR; eeprom_menu.storeTips = EEPROM_STORE_TIPS_FR; - eeprom_menu.readTips = EEPROM_READ_TIPS_FR; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_FR; + eeprom_menu.readTips = EEPROM_READ_TIPS_FR; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_FR; break; case LANG_ITALY: @@ -2600,8 +2602,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_IT; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_IT; eeprom_menu.storeTips = EEPROM_STORE_TIPS_IT; - eeprom_menu.readTips = EEPROM_READ_TIPS_IT; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_IT; + eeprom_menu.readTips = EEPROM_READ_TIPS_IT; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_IT; break; #endif // if 1 @@ -2836,8 +2838,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_EN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_EN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_EN; - eeprom_menu.readTips = EEPROM_READ_TIPS_EN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; + eeprom_menu.readTips = EEPROM_READ_TIPS_EN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; break; } } diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial.h b/Marlin/src/lcd/extui/mks_ui/wifiSerial.h index fcc35a6a657c..1a3e9aae9b2d 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial.h +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial.h @@ -21,10 +21,6 @@ */ #pragma once -#include "tft_lvgl_configuration.h" - -#if ENABLED(MKS_WIFI_MODULE) - #ifdef SERIAL_PORT_2 #error "SERIAL_PORT_2 must be disabled with TFT_LVGL_UI* and MKS_WIFI_MODULE." #endif @@ -33,70 +29,16 @@ #define WIFI_UPLOAD_BAUDRATE 1958400 #define USART_SAFE_INSERT -#define WIFI_RX_BUF_SIZE (1024+1) - -#include -#include -#include -#include -#include -#include - -#define DEFINE_WFSERIAL(name, n)\ - WifiSerial name(USART##n, \ - BOARD_USART##n##_TX_PIN, \ - BOARD_USART##n##_RX_PIN) - -class WifiSerial { - public: - uint8 wifiRxBuf[WIFI_RX_BUF_SIZE]; +#define WIFI_RX_BUF_SIZE (1024) +#define WIFI_TX_BUF_SIZE (64) - public: - WifiSerial(struct usart_dev *usart_device, uint8 tx_pin, uint8 rx_pin); - - /* Set up/tear down */ - void begin(uint32 baud); - void begin(uint32 baud,uint8_t config); - void end(); - int available(); - int read(); - int write(uint8_t); - inline void wifi_usart_irq(usart_reg_map *regs) { - /* Handling RXNEIE and TXEIE interrupts. - * RXNE signifies availability of a byte in DR. - * - * See table 198 (sec 27.4, p809) in STM document RM0008 rev 15. - * We enable RXNEIE. - */ - if ((regs->CR1 & USART_CR1_RXNEIE) && (regs->SR & USART_SR_RXNE)) { - #ifdef USART_SAFE_INSERT - /* If the buffer is full and the user defines USART_SAFE_INSERT, - * ignore new bytes. */ - rb_safe_insert(this->usart_device->rb, (uint8)regs->DR); - #else - /* By default, push bytes around in the ring buffer. */ - rb_push_insert(this->usart_device->rb, (uint8)regs->DR); - #endif - } - /* TXE signifies readiness to send a byte to DR. */ - if ((regs->CR1 & USART_CR1_TXEIE) && (regs->SR & USART_SR_TXE)) { - if (!rb_is_empty(this->usart_device->wb)) - regs->DR=rb_remove(this->usart_device->wb); - else - regs->CR1 &= ~((uint32)USART_CR1_TXEIE); // disable TXEIE - } - } - - int wifi_rb_is_full(); +#include "tft_lvgl_configuration.h" - struct usart_dev *usart_device; - private: - uint8 tx_pin; - uint8 rx_pin; -}; +#ifdef __STM32F1__ + #include "wifiSerial_STM32F1.h" +#else + #include "wifiSerial_STM32.h" +#endif extern WifiSerial WifiSerial1; - -#define WIFISERIAL WifiSerial1 - -#endif // MKS_WIFI_MODULE +#define WIFISERIAL WifiSerial1 diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp new file mode 100644 index 000000000000..39d85626761f --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp @@ -0,0 +1,352 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) + +#include "../../../inc/MarlinConfigPre.h" + +#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) + +#include "tft_lvgl_configuration.h" + +#include "draw_ui.h" +#include "wifiSerial.h" + +WifiSerial WifiSerial1(USART1); + +void WifiSerial::setRx(uint32_t _rx) { _serial.pin_rx = digitalPinToPinName(_rx); } +void WifiSerial::setTx(uint32_t _tx) { _serial.pin_tx = digitalPinToPinName(_tx); } +void WifiSerial::setRx(PinName _rx) { _serial.pin_rx = _rx; } +void WifiSerial::setTx(PinName _tx) { _serial.pin_tx = _tx; } + +void WifiSerial::init(PinName _rx, PinName _tx) { + _serial.pin_rx = (_rx == _tx) ? NC : _rx; + _serial.pin_tx = _tx; + _serial.rx_buff = wifiRxBuf; + _serial.rx_head = 0; + _serial.rx_tail = 0; + _serial.tx_buff = wifiTxBuf; + _serial.tx_head = 0; + _serial.tx_tail = 0; +} + +WifiSerial::WifiSerial(void *peripheral) { + // If PIN_SERIALy_RX is not defined assume half-duplex + _serial.pin_rx = NC; + // If Serial is defined in variant set + // the Rx/Tx pins for com port if defined + #if defined(Serial) && defined(PIN_SERIAL_TX) + if ((void *)this == (void *)&Serial) { + #ifdef PIN_SERIAL_RX + setRx(PIN_SERIAL_RX); + #endif + setTx(PIN_SERIAL_TX); + } else + #endif + #if defined(PIN_SERIAL1_TX) && defined(USART1_BASE) + if (peripheral == USART1) { + #ifdef PIN_SERIAL1_RX + setRx(PIN_SERIAL1_RX); + #endif + setTx(PIN_SERIAL1_TX); + } else + #endif + #if defined(PIN_SERIAL2_TX) && defined(USART2_BASE) + if (peripheral == USART2) { + #ifdef PIN_SERIAL2_RX + setRx(PIN_SERIAL2_RX); + #endif + setTx(PIN_SERIAL2_TX); + } else + #endif + #if defined(PIN_SERIAL3_TX) && defined(USART3_BASE) + if (peripheral == USART3) { + #ifdef PIN_SERIAL3_RX + setRx(PIN_SERIAL3_RX); + #endif + setTx(PIN_SERIAL3_TX); + } else + #endif + #ifdef PIN_SERIAL4_TX + if (false + #ifdef USART4_BASE + || peripheral == USART4 + #elif defined(UART4_BASE) + || peripheral == UART4 + #endif + ) { + #ifdef PIN_SERIAL4_RX + setRx(PIN_SERIAL4_RX); + #endif + setTx(PIN_SERIAL4_TX); + } else + #endif + #ifdef PIN_SERIAL5_TX + if (false + #ifdef USART5_BASE + || peripheral == USART5 + #elif defined(UART5_BASE) + || peripheral == UART5 + #endif + ) { + #ifdef PIN_SERIAL5_RX + setRx(PIN_SERIAL5_RX); + #endif + setTx(PIN_SERIAL5_TX); + } else + #endif + #if defined(PIN_SERIAL6_TX) && defined(USART6_BASE) + if (peripheral == USART6) { + #ifdef PIN_SERIAL6_RX + setRx(PIN_SERIAL6_RX); + #endif + setTx(PIN_SERIAL6_TX); + } else + #endif + #ifdef PIN_SERIAL7_TX + if (false + #ifdef USART7_BASE + || peripheral == USART7 + #elif defined(UART7_BASE) + || peripheral == UART7 + #endif + ) { + #ifdef PIN_SERIAL7_RX + setRx(PIN_SERIAL7_RX); + #endif + setTx(PIN_SERIAL7_TX); + } else + #endif + #ifdef PIN_SERIAL8_TX + if (false + #ifdef USART8_BASE + || peripheral == USART8 + #elif defined(UART8_BASE) + || peripheral == UART8 + #endif + ) { + #ifdef PIN_SERIAL8_RX + setRx(PIN_SERIAL8_RX); + #endif + setTx(PIN_SERIAL8_TX); + } else + #endif + #if defined(PIN_SERIAL9_TX) && defined(UART9_BASE) + if (peripheral == UART9) { + #ifdef PIN_SERIAL9_RX + setRx(PIN_SERIAL9_RX); + #endif + setTx(PIN_SERIAL9_TX); + } else + #endif + #ifdef PIN_SERIAL10_TX + if (false + #ifdef USART10_BASE + || peripheral == USART10 + #elif defined(UART10_BASE) + || peripheral == UART10 + #endif + ) { + #ifdef PIN_SERIAL10_RX + setRx(PIN_SERIAL10_RX); + #endif + setTx(PIN_SERIAL10_TX); + } else + #endif + #if defined(PIN_SERIALLP1_TX) && defined(LPUART1_BASE) + if (peripheral == LPUART1) { + #ifdef PIN_SERIALLP1_RX + setRx(PIN_SERIALLP1_RX); + #endif + setTx(PIN_SERIALLP1_TX); + } else + #endif + // else get the pins of the first peripheral occurrence in PinMap + { + _serial.pin_rx = pinmap_pin(peripheral, PinMap_UART_RX); + _serial.pin_tx = pinmap_pin(peripheral, PinMap_UART_TX); + } + //if (halfDuplex == HALF_DUPLEX_ENABLED) _serial.pin_rx = NC; + init(_serial.pin_rx, _serial.pin_tx); +} + +void WifiSerial::flush() { + // If we have never written a byte, no need to flush. This special + // case is needed since there is no way to force the TXC (transmit + // complete) bit to 1 during initialization + if (!_written) return; + + while ((_serial.tx_head != _serial.tx_tail)) { + // nop, the interrupt handler will free up space for us + } + // If we get here, nothing is queued anymore (DRIE is disabled) and + // the hardware finished tranmission (TXC is set). +} + +bool WifiSerial::isHalfDuplex() const { return _serial.pin_rx == NC; } + +void WifiSerial::enableHalfDuplexRx() { + if (isHalfDuplex()) { + // In half-duplex mode we have to wait for all TX characters to + // be transmitted before we can receive data. + flush(); + if (!_rx_enabled) { + _rx_enabled = true; + uart_enable_rx(&_serial); + } + } +} + +// Actual interrupt handlers ////////////////////////////////////////////////////////////// + +void WifiSerial::_rx_complete_irq(serial_t *obj) { + // No Parity error, read byte and store it in the buffer if there is room + unsigned char c; + + if (uart_getc(obj, &c) == 0) { + + WRITE(WIFI_IO1_PIN, HIGH); + + rx_buffer_index_t i = (unsigned int)(obj->rx_head + 1) % WIFI_RX_BUF_SIZE; + + // if we should be storing the received character into the location + // just before the tail (meaning that the head would advance to the + // current location of the tail), we're about to overflow the buffer + // and so we don't write the character or advance the head. + if (i != obj->rx_tail) { + obj->rx_buff[obj->rx_head] = c; + obj->rx_head = i; + } + } +} + +// Actual interrupt handlers ////////////////////////////////////////////////////////////// + +int WifiSerial::_tx_complete_irq(serial_t *obj) { + // If interrupts are enabled, there must be more data in the output + // buffer. Send the next byte + obj->tx_tail = (obj->tx_tail + 1) % WIFI_TX_BUF_SIZE; + + return (obj->tx_head == obj->tx_tail) ? -1 : 0; +} + +void WifiSerial::begin(unsigned long baud) { begin(baud, SERIAL_8N1); } + +void WifiSerial::begin(unsigned long baud, byte config) { + uint32_t databits = 0, stopbits = 0, parity = 0; + + _baud = baud; + _config = config; + + // Manage databits + switch (config & 0x07) { + case 0x02: databits = 6; break; + case 0x04: databits = 7; break; + case 0x06: databits = 8; break; + default: databits = 0; break; + } + + if ((config & 0x30) == 0x30) { + parity = UART_PARITY_ODD; + databits++; + } + else if ((config & 0x20) == 0x20) { + parity = UART_PARITY_EVEN; + databits++; + } + else + parity = UART_PARITY_NONE; + + stopbits = ((config & 0x08) == 0x08) ? UART_STOPBITS_2 : UART_STOPBITS_1; + + switch (databits) { + #ifdef UART_WORDLENGTH_7B + case 7: databits = UART_WORDLENGTH_7B; break; + #endif + case 8: databits = UART_WORDLENGTH_8B; break; + case 9: databits = UART_WORDLENGTH_9B; break; + default: + case 0: Error_Handler(); break; + } + + uart_init(&_serial, (uint32_t)baud, databits, parity, stopbits); + enableHalfDuplexRx(); + if (baud == WIFI_BAUDRATE) + uart_attach_rx_callback(&_serial, _rx_complete_irq); + else + USART1->CR1 |= USART_CR1_RE; // Preserve word length, etc. Use 'or' to preserve USART_CR1_M_8N1 +} + +void WifiSerial::end() { + // wait for transmission of outgoing data + flush(); + + uart_deinit(&_serial); + + // clear any received data + _serial.rx_head = _serial.rx_tail; +} + +int WifiSerial::available() { + return ((unsigned int)(WIFI_RX_BUF_SIZE + _serial.rx_head - _serial.rx_tail)) % WIFI_RX_BUF_SIZE; +} + +// +// I/O +// +int WifiSerial::read() { + enableHalfDuplexRx(); + // if the head isn't ahead of the tail, we don't have any characters + if (_serial.rx_head == _serial.rx_tail) return -1; + + unsigned char c = _serial.rx_buff[_serial.rx_tail]; + _serial.rx_tail = (rx_buffer_index_t)(_serial.rx_tail + 1) % WIFI_RX_BUF_SIZE; + return c; +} + +int WifiSerial::write(uint8_t c) { + _written = true; + if (isHalfDuplex()) { + if (_rx_enabled) { + _rx_enabled = false; + uart_enable_tx(&_serial); + } + } + + tx_buffer_index_t i = (_serial.tx_head + 1) % WIFI_TX_BUF_SIZE; + + // If the output buffer is full, there's nothing for it other than to + // wait for the interrupt handler to empty it a bit + while (i == _serial.tx_tail) { + // nop, the interrupt handler will free up space for us + } + + _serial.tx_buff[_serial.tx_head] = c; + _serial.tx_head = i; + + if (!serial_tx_active(&_serial)) + uart_attach_tx_callback(&_serial, _tx_complete_irq); + + return 1; +} + +#endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE +#endif // !__STM32F1__ diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h new file mode 100644 index 000000000000..87de27c04439 --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h @@ -0,0 +1,63 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include +#include "Stream.h" +#include "uart.h" + +class WifiSerial { + protected: + // Has any byte been written to the UART since begin() + bool _written; + serial_t _serial; + public: + uint8_t wifiRxBuf[WIFI_RX_BUF_SIZE]; + uint8_t wifiTxBuf[WIFI_TX_BUF_SIZE]; + WifiSerial(void *peripheral); + + // Set up / tear down + void begin(uint32_t baud); + void begin(uint32_t baud,uint8_t config); + void end(); + int available(void); + int read(void); + int write(uint8_t); + + // Interrupt handlers + static int _tx_complete_irq(serial_t *obj); + static void _rx_complete_irq(serial_t *obj); + + void flush(void); + bool isHalfDuplex(void) const; + void enableHalfDuplexRx(void); + + private: + void setRx(uint32_t _rx); + void setTx(uint32_t _tx); + void setRx(PinName _rx); + void setTx(PinName _tx); + void init(PinName _rx, PinName _tx); + bool _rx_enabled; + uint8_t _config; + unsigned long _baud; +}; diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp similarity index 88% rename from Marlin/src/lcd/extui/mks_ui/wifiSerial.cpp rename to Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp index d00fd269d828..75830ce1bd4a 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm @@ -19,14 +19,14 @@ * along with this program. If not, see . * */ +#ifdef __STM32F1__ + #include "../../../inc/MarlinConfigPre.h" -#if HAS_TFT_LVGL_UI +#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "tft_lvgl_configuration.h" -#if ENABLED(MKS_WIFI_MODULE) - #include "draw_ui.h" #include "wifiSerial.h" @@ -59,19 +59,19 @@ WifiSerial::WifiSerial(usart_dev *usart_device, uint8 tx_pin, uint8 rx_pin) { if (with_irq) usart_enable(usart_device); else { usart_reg_map *regs = usart_device->regs; - regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // don't change the word length etc, and 'or' in the pattern not overwrite |USART_CR1_M_8N1); + regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // Preserve word length, etc. Use 'or' to preserve USART_CR1_M_8N1 regs->CR1 |= USART_CR1_UE; } } #elif STM32_MCU_SERIES == STM32_SERIES_F2 || STM32_MCU_SERIES == STM32_SERIES_F4 - #define disable_timer_if_necessary(dev, ch) ((void)0) + #define disable_timer_if_necessary(dev, ch) NOOP static void usart_enable_no_irq(usart_dev *usart_device, bool with_irq) { if (with_irq) usart_enable(usart_device); else { usart_reg_map *regs = usart_device->regs; - regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // don't change the word length etc, and 'or' in the pattern not overwrite |USART_CR1_M_8N1); + regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // Preserve word length, etc. Use 'or' to preserve USART_CR1_M_8N1 regs->CR1 |= USART_CR1_UE; } } @@ -137,5 +137,5 @@ int WifiSerial::wifi_rb_is_full() { return rb_is_full(this->usart_device->rb); } -#endif // MKS_WIFI_MODULE -#endif // HAS_TFT_LVGL_UI +#endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE +#endif // __STM32F1__ diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.h b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.h new file mode 100644 index 000000000000..6af2f9743ba7 --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.h @@ -0,0 +1,77 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include +#include +#include +#include +#include +#include + +#define DEFINE_WFSERIAL(name, n) WifiSerial name(USART##n, BOARD_USART##n##_TX_PIN, BOARD_USART##n##_RX_PIN) + +class WifiSerial { + public: + uint8 wifiRxBuf[WIFI_RX_BUF_SIZE]; + + public: + WifiSerial(struct usart_dev *usart_device, uint8 tx_pin, uint8 rx_pin); + + /* Set up/tear down */ + void begin(uint32 baud); + void begin(uint32 baud,uint8_t config); + void end(); + int available(); + int read(); + int write(uint8_t); + inline void wifi_usart_irq(usart_reg_map *regs) { + /* Handling RXNEIE and TXEIE interrupts. + * RXNE signifies availability of a byte in DR. + * + * See table 198 (sec 27.4, p809) in STM document RM0008 rev 15. + * We enable RXNEIE. + */ + if ((regs->CR1 & USART_CR1_RXNEIE) && (regs->SR & USART_SR_RXNE)) { + #ifdef USART_SAFE_INSERT + /* If the buffer is full and the user defines USART_SAFE_INSERT, + * ignore new bytes. */ + rb_safe_insert(this->usart_device->rb, (uint8)regs->DR); + #else + /* By default, push bytes around in the ring buffer. */ + rb_push_insert(this->usart_device->rb, (uint8)regs->DR); + #endif + } + /* TXE signifies readiness to send a byte to DR. */ + if ((regs->CR1 & USART_CR1_TXEIE) && (regs->SR & USART_SR_TXE)) { + if (!rb_is_empty(this->usart_device->wb)) + regs->DR=rb_remove(this->usart_device->wb); + else + regs->CR1 &= ~((uint32)USART_CR1_TXEIE); // disable TXEIE + } + } + int wifi_rb_is_full(); + struct usart_dev *usart_device; + private: + uint8 tx_pin; + uint8 rx_pin; +}; diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index 52a877031f83..1d136a407549 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -51,17 +51,13 @@ #define WIFI_SET() WRITE(WIFI_RESET_PIN, HIGH); #define WIFI_RESET() WRITE(WIFI_RESET_PIN, LOW); -#define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH); -#define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); +#define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH); +#define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); extern uint8_t Explore_Disk (char *path , uint8_t recu_level); extern uint8_t commands_in_queue; extern uint8_t sel_id; - -int usartFifoAvailable(SZ_USART_FIFO *fifo); -int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); -int writeUsartFifo(SZ_USART_FIFO * fifo, int8_t * buf, int32_t len); extern unsigned int getTickDiff(unsigned int curTick, unsigned int lastTick); volatile SZ_USART_FIFO WifiRxFifo; @@ -79,12 +75,12 @@ extern uint8_t pause_resum; uint8_t wifi_connect_flg = 0; extern volatile uint8_t get_temp_flag; -#define WIFI_MODE 2 +#define WIFI_MODE 2 #define WIFI_AP_MODE 3 int upload_result = 0; -uint32_t upload_time = 0; +uint32_t upload_time_sec = 0; uint32_t upload_size = 0; volatile WIFI_STATE wifi_link_state; @@ -120,29 +116,19 @@ extern bool flash_dma_mode; uint32_t getWifiTick() { return millis(); } uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick) { - if (lastTick <= curTick) - return (curTick - lastTick) * TICK_CYCLE; - else - return (0xFFFFFFFF - lastTick + curTick) * TICK_CYCLE; + return (lastTick <= curTick ? curTick - lastTick : 0xFFFFFFFF - lastTick + curTick) * TICK_CYCLE; } void wifi_delay(int n) { - uint32_t begin = getWifiTick(); - uint32_t end = begin; - while (getWifiTickDiff(begin, end) < (uint32_t)n) { + const uint32_t start = getWifiTick(); + while (getWifiTickDiff(start, getWifiTick()) < (uint32_t)n) watchdog_refresh(); - end = getWifiTick(); - } } void wifi_reset() { - uint32_t start, now; - start = getWifiTick(); - now = start; + uint32_t start = getWifiTick(); WIFI_RESET(); - while (getWifiTickDiff(start, now) < 500) - now = getWifiTick(); - + while (getWifiTickDiff(start, getWifiTick()) < 500) { /* nada */ } WIFI_SET(); } @@ -154,82 +140,83 @@ void mount_file_sys(uint8_t disk_type) { } } -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -void changeFlashMode(const bool dmaMode) { - if (flash_dma_mode != dmaMode) { - flash_dma_mode = dmaMode; - if (!flash_dma_mode) { - dma_disable(DMA1, DMA_CH5); - dma_clear_isr_bits(DMA1, DMA_CH4); - } - } -} - static bool longName2DosName(const char *longName, char *dosName) { - uint8_t i; - for (i = FILENAME_LENGTH; i--;) dosName[i] = '\0'; + uint8_t i = FILENAME_LENGTH; + while (i) dosName[--i] = '\0'; + while (*longName) { uint8_t c = *longName++; if (c == '.') { // For a dot... if (i == 0) return false; strcat_P(dosName, PSTR(".GCO")); - break; + return dosName[0] != '\0'; } else { - if (c < 0x21 || c == 0x7F) return false; // Check size, non-printable characters // Fail for illegal characters PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); - while (const uint8_t b = pgm_read_byte(p++)) if (b == c) return false; - dosName[i++] = c + (WITHIN(c, 'a', 'z') ? 'A' - 'a' : 0); // Uppercase required for 8.3 name + while (uint8_t b = pgm_read_byte(p++)) if (b == c) return false; + if (c < 0x21 || c == 0x7F) return false; // Check size, non-printable characters + dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name } if (i >= 5) { strcat_P(dosName, PSTR("~1.GCO")); - break; + return dosName[0] != '\0'; } } return dosName[0] != '\0'; // Return true if any name was set } -static int storeRcvData(volatile uint8_t *bufToCpy, int32_t len) { - unsigned char tmpW = wifiDmaRcvFifo.write_cur; +#ifdef __STM32F1__ + + #include + #include + #include + + #include + #include + + #include + #include - if (len > UDISKBUFLEN) return 0; + #include + #include + #include + #include - if (wifiDmaRcvFifo.state[tmpW] == udisk_buf_empty) { - memcpy((unsigned char *) wifiDmaRcvFifo.bufferAddr[tmpW], (uint8_t *)bufToCpy, len); - wifiDmaRcvFifo.state[tmpW] = udisk_buf_full; - wifiDmaRcvFifo.write_cur = (tmpW + 1) % TRANS_RCV_FIFO_BLOCK_NUM; - return 1; + void changeFlashMode(const bool dmaMode) { + if (flash_dma_mode != dmaMode) { + flash_dma_mode = dmaMode; + if (!flash_dma_mode) { + dma_disable(DMA1, DMA_CH5); + dma_clear_isr_bits(DMA1, DMA_CH4); + } + } } - return 0; -} -static void esp_dma_pre() { - dma_channel_reg_map *channel_regs = dma_tube_regs(DMA1, DMA_CH5); + static int storeRcvData(volatile uint8_t *bufToCpy, int32_t len) { + unsigned char tmpW = wifiDmaRcvFifo.write_cur; + if (len > UDISKBUFLEN) return 0; + if (wifiDmaRcvFifo.state[tmpW] == udisk_buf_empty) { + memcpy((unsigned char *) wifiDmaRcvFifo.bufferAddr[tmpW], (uint8_t *)bufToCpy, len); + wifiDmaRcvFifo.state[tmpW] = udisk_buf_full; + wifiDmaRcvFifo.write_cur = (tmpW + 1) % TRANS_RCV_FIFO_BLOCK_NUM; + return 1; + } + return 0; + } - CBI32(channel_regs->CCR, 0); - channel_regs->CMAR = (uint32_t)WIFISERIAL.usart_device->rb->buf; - channel_regs->CNDTR = 0x0000; - channel_regs->CNDTR = UART_RX_BUFFER_SIZE; - DMA1->regs->IFCR = 0xF0000; - SBI32(channel_regs->CCR, 0); -} + static void esp_dma_pre() { + dma_channel_reg_map *channel_regs = dma_tube_regs(DMA1, DMA_CH5); + + CBI32(channel_regs->CCR, 0); + channel_regs->CMAR = (uint32_t)WIFISERIAL.usart_device->rb->buf; + channel_regs->CNDTR = 0x0000; + channel_regs->CNDTR = UART_RX_BUFFER_SIZE; + DMA1->regs->IFCR = 0xF0000; + SBI32(channel_regs->CCR, 0); + } -static void dma_ch5_irq_handle() { + static void dma_ch5_irq_handle() { uint8 status_bits = dma_get_isr_bits(DMA1, DMA_CH5); dma_clear_isr_bits(DMA1, DMA_CH5); if (status_bits & 0x8) { @@ -254,74 +241,329 @@ static void dma_ch5_irq_handle() { // DMA transmit half WIFI_IO1_SET(); } -} - -static void wifi_usart_dma_init() { - dma_init(DMA1); - uint32_t flags = ( DMA_MINC_MODE | DMA_TRNS_CMPLT | DMA_HALF_TRNS | DMA_TRNS_ERR); - dma_xfer_size dma_bit_size = DMA_SIZE_8BITS; - dma_setup_transfer(DMA1, DMA_CH5, &USART1_BASE->DR, dma_bit_size, - (volatile void*)WIFISERIAL.usart_device->rb->buf, dma_bit_size, flags);// Transmit buffer DMA - dma_set_priority(DMA1, DMA_CH5, DMA_PRIORITY_LOW); - dma_attach_interrupt(DMA1, DMA_CH5, &dma_ch5_irq_handle); - - dma_clear_isr_bits(DMA1, DMA_CH5); - dma_set_num_transfers(DMA1, DMA_CH5, UART_RX_BUFFER_SIZE); + } - bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 1); - dma_enable(DMA1, DMA_CH5); // enable transmit + static void wifi_usart_dma_init() { + dma_init(DMA1); + uint32_t flags = ( DMA_MINC_MODE | DMA_TRNS_CMPLT | DMA_HALF_TRNS | DMA_TRNS_ERR); + dma_xfer_size dma_bit_size = DMA_SIZE_8BITS; + dma_setup_transfer(DMA1, DMA_CH5, &USART1_BASE->DR, dma_bit_size, + (volatile void*)WIFISERIAL.usart_device->rb->buf, dma_bit_size, flags);// Transmit buffer DMA + dma_set_priority(DMA1, DMA_CH5, DMA_PRIORITY_LOW); + dma_attach_interrupt(DMA1, DMA_CH5, &dma_ch5_irq_handle); - for (uint8_t i = 0; i < TRANS_RCV_FIFO_BLOCK_NUM; i++) { - wifiDmaRcvFifo.bufferAddr[i] = &bmp_public_buf[1024 * i]; - wifiDmaRcvFifo.state[i] = udisk_buf_empty; - } + dma_clear_isr_bits(DMA1, DMA_CH5); + dma_set_num_transfers(DMA1, DMA_CH5, UART_RX_BUFFER_SIZE); - memset(wifiDmaRcvFifo.bufferAddr[0], 0, 1024 * TRANS_RCV_FIFO_BLOCK_NUM); - wifiDmaRcvFifo.read_cur = 0; - wifiDmaRcvFifo.write_cur = 0; -} + bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 1); + dma_enable(DMA1, DMA_CH5); // enable transmit -void esp_port_begin(uint8_t interrupt) { - WifiRxFifo.uart_read_point = 0; - WifiRxFifo.uart_write_point = 0; + for (uint8_t i = 0; i < TRANS_RCV_FIFO_BLOCK_NUM; i++) { + wifiDmaRcvFifo.bufferAddr[i] = &bmp_public_buf[1024 * i]; + wifiDmaRcvFifo.state[i] = udisk_buf_empty; + } - #if 1 + memset(wifiDmaRcvFifo.bufferAddr[0], 0, 1024 * TRANS_RCV_FIFO_BLOCK_NUM); + wifiDmaRcvFifo.read_cur = 0; + wifiDmaRcvFifo.write_cur = 0; + } + void esp_port_begin(uint8_t interrupt) { + WifiRxFifo.uart_read_point = 0; + WifiRxFifo.uart_write_point = 0; #if ENABLED(MKS_WIFI_MODULE) - WIFISERIAL.end(); if (interrupt) { + WIFISERIAL.end(); for (uint16_t i = 0; i < 65535; i++) { /*nada*/ } WIFISERIAL.begin(WIFI_BAUDRATE); millis_t serial_connect_timeout = millis() + 1000UL; while (PENDING(millis(), serial_connect_timeout)) { /*nada*/ } } else { + WIFISERIAL.end(); WIFISERIAL.usart_device->regs->CR1 &= ~USART_CR1_RXNEIE; WIFISERIAL.begin(WIFI_UPLOAD_BAUDRATE); wifi_usart_dma_init(); } #endif + } - #else +#else // !__STM32F1__ - #if MKS_WIFI_MODULE - WIFISERIAL.end(); - for (uint16_t i = 0; i < 65535; i++) { /*nada*/ } - WIFISERIAL.begin(interrupt ? WIFI_BAUDRATE : WIFI_UPLOAD_BAUDRATE); - millis_t serial_connect_timeout = millis() + 1000UL; - while (PENDING(millis(), serial_connect_timeout)) { /*nada*/ } - #endif - if (!interrupt) wifi_usart_dma_init(); + DMA_HandleTypeDef wifiUsartDMArx; + + void changeFlashMode(const bool dmaMode) { + if (flash_dma_mode != dmaMode) { + flash_dma_mode = dmaMode; + if (flash_dma_mode == 1) { + } + else { + } + } + } + + #ifdef STM32F1xx + HAL_StatusTypeDef HAL_DMA_PollForTransferCustomize(DMA_HandleTypeDef *hdma, uint32_t CompleteLevel, uint32_t Timeout) { + uint32_t temp; + uint32_t tickstart = 0U; + + if (HAL_DMA_STATE_BUSY != hdma->State) { // No transfer ongoing + hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; + __HAL_UNLOCK(hdma); + return HAL_ERROR; + } + + // Polling mode not supported in circular mode + if (RESET != (hdma->Instance->CCR & DMA_CCR_CIRC)) { + hdma->ErrorCode = HAL_DMA_ERROR_NOT_SUPPORTED; + return HAL_ERROR; + } + + // Get the level transfer complete flag + temp = (CompleteLevel == HAL_DMA_FULL_TRANSFER + ? __HAL_DMA_GET_TC_FLAG_INDEX(hdma) // Transfer Complete flag + : __HAL_DMA_GET_HT_FLAG_INDEX(hdma) // Half Transfer Complete flag + ); + + // Get tick + tickstart = HAL_GetTick(); + + while (__HAL_DMA_GET_FLAG(hdma, temp) == RESET) { + if ((__HAL_DMA_GET_FLAG(hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma)) != RESET)) { + __HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma)); // Clear the half transfer complete flag + WIFI_IO1_SET(); + } + + if ((__HAL_DMA_GET_FLAG(hdma, __HAL_DMA_GET_TE_FLAG_INDEX(hdma)) != RESET)) { + /** + * When a DMA transfer error occurs + * A hardware clear of its EN bits is performed + * Clear all flags + */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << hdma->ChannelIndex); + + SET_BIT(hdma->ErrorCode, HAL_DMA_ERROR_TE); // Update error code + hdma->State= HAL_DMA_STATE_READY; // Change the DMA state + __HAL_UNLOCK(hdma); // Process Unlocked + return HAL_ERROR; + } + + // Check for the Timeout + if (Timeout != HAL_MAX_DELAY && (!Timeout || (HAL_GetTick() - tickstart) > Timeout)) { + SET_BIT(hdma->ErrorCode, HAL_DMA_ERROR_TIMEOUT); // Update error code + hdma->State = HAL_DMA_STATE_READY; // Change the DMA state + __HAL_UNLOCK(hdma); // Process Unlocked + return HAL_ERROR; + } + } + + if (CompleteLevel == HAL_DMA_FULL_TRANSFER) { + // Clear the transfer complete flag + __HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_TC_FLAG_INDEX(hdma)); + + /* The selected Channelx EN bit is cleared (DMA is disabled and + all transfers are complete) */ + hdma->State = HAL_DMA_STATE_READY; + } + else + __HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma)); // Clear the half transfer complete flag + + __HAL_UNLOCK(hdma); // Process unlocked + + return HAL_OK; + } + + #else // !STM32F1xx + + typedef struct { + __IO uint32_t ISR; //!< DMA interrupt status register + __IO uint32_t Reserved0; + __IO uint32_t IFCR; //!< DMA interrupt flag clear register + } MYDMA_Base_Registers; + + HAL_StatusTypeDef HAL_DMA_PollForTransferCustomize(DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout) { + HAL_StatusTypeDef status = HAL_OK; + uint32_t mask_cpltlevel; + uint32_t tickstart = HAL_GetTick(); + uint32_t tmpisr; + + MYDMA_Base_Registers *regs; // Calculate DMA base and stream number + + if (HAL_DMA_STATE_BUSY != hdma->State) { // No transfer ongoing + hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; + __HAL_UNLOCK(hdma); + return HAL_ERROR; + } + + // Polling mode not supported in circular mode and double buffering mode + if ((hdma->Instance->CR & DMA_SxCR_CIRC) != RESET) { + hdma->ErrorCode = HAL_DMA_ERROR_NOT_SUPPORTED; + return HAL_ERROR; + } + + // Get the level transfer complete flag + mask_cpltlevel = (CompleteLevel == HAL_DMA_FULL_TRANSFER + ? DMA_FLAG_TCIF0_4 << hdma->StreamIndex // Transfer Complete flag + : DMA_FLAG_HTIF0_4 << hdma->StreamIndex // Half Transfer Complete flag + ); + + regs = (MYDMA_Base_Registers *)hdma->StreamBaseAddress; + tmpisr = regs->ISR; + + while (((tmpisr & mask_cpltlevel) == RESET) && ((hdma->ErrorCode & HAL_DMA_ERROR_TE) == RESET)) { + // Check for the Timeout (Not applicable in circular mode) + if (Timeout != HAL_MAX_DELAY) { + if (!Timeout || (HAL_GetTick() - tickstart) > Timeout) { + hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; // Update error code + __HAL_UNLOCK(hdma); // Process Unlocked + hdma->State = HAL_DMA_STATE_READY; // Change the DMA state + return HAL_TIMEOUT; + } + } + + tmpisr = regs->ISR; // Get the ISR register value + + if ((tmpisr & (DMA_FLAG_HTIF0_4 << hdma->StreamIndex)) != RESET) { + regs->IFCR = DMA_FLAG_HTIF0_4 << hdma->StreamIndex; // Clear the Direct Mode error flag + WIFI_IO1_SET(); + } + + if ((tmpisr & (DMA_FLAG_TEIF0_4 << hdma->StreamIndex)) != RESET) { + hdma->ErrorCode |= HAL_DMA_ERROR_TE; // Update error code + regs->IFCR = DMA_FLAG_TEIF0_4 << hdma->StreamIndex; // Clear the transfer error flag + } + + if ((tmpisr & (DMA_FLAG_FEIF0_4 << hdma->StreamIndex)) != RESET) { + hdma->ErrorCode |= HAL_DMA_ERROR_FE; // Update error code + regs->IFCR = DMA_FLAG_FEIF0_4 << hdma->StreamIndex; // Clear the FIFO error flag + } + + if ((tmpisr & (DMA_FLAG_DMEIF0_4 << hdma->StreamIndex)) != RESET) { + hdma->ErrorCode |= HAL_DMA_ERROR_DME; // Update error code + regs->IFCR = DMA_FLAG_DMEIF0_4 << hdma->StreamIndex; // Clear the Direct Mode error flag + } + } + + if (hdma->ErrorCode != HAL_DMA_ERROR_NONE && (hdma->ErrorCode & HAL_DMA_ERROR_TE) != RESET) { + HAL_DMA_Abort(hdma); + regs->IFCR = (DMA_FLAG_HTIF0_4 | DMA_FLAG_TCIF0_4) << hdma->StreamIndex; // Clear the half transfer and transfer complete flags + __HAL_UNLOCK(hdma); // Process Unlocked + hdma->State= HAL_DMA_STATE_READY; // Change the DMA state + return HAL_ERROR; + } + + // Get the level transfer complete flag + if (CompleteLevel == HAL_DMA_FULL_TRANSFER) { + regs->IFCR = (DMA_FLAG_HTIF0_4 | DMA_FLAG_TCIF0_4) << hdma->StreamIndex; // Clear the half transfer and transfer complete flags + __HAL_UNLOCK(hdma); // Process Unlocked + hdma->State = HAL_DMA_STATE_READY; + } + else + regs->IFCR = (DMA_FLAG_HTIF0_4) << hdma->StreamIndex; // Clear the half transfer and transfer complete flags + + return status; + } #endif -} + + static void dmaTransmitBegin() { + wifiUsartDMArx.Init.MemInc = DMA_MINC_ENABLE; + if (HAL_DMA_Init((DMA_HandleTypeDef *)&wifiUsartDMArx) != HAL_OK) + Error_Handler(); + + if (HAL_DMA_Start(&wifiUsartDMArx, (uint32_t)&(USART1->DR), (uint32_t)WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE)) + Error_Handler(); + + USART1->CR1 |= USART_CR1_UE; + + SET_BIT(USART1->CR3, USART_CR3_DMAR); + WIFI_IO1_RESET(); + } + + static int storeRcvData(volatile uint8_t *bufToCpy, int32_t len) { + unsigned char tmpW = wifiDmaRcvFifo.write_cur; + + if (len > UDISKBUFLEN) return 0; + + if (wifiDmaRcvFifo.state[tmpW] == udisk_buf_empty) { + const int timeOut = 2000; //millisecond + dmaTransmitBegin(); + if (HAL_DMA_PollForTransferCustomize(&wifiUsartDMArx, HAL_DMA_FULL_TRANSFER, timeOut) == HAL_OK) { + memcpy((unsigned char *) wifiDmaRcvFifo.bufferAddr[tmpW], (uint8_t *)bufToCpy, len); + wifiDmaRcvFifo.state[tmpW] = udisk_buf_full; + wifiDmaRcvFifo.write_cur = (tmpW + 1) % TRANS_RCV_FIFO_BLOCK_NUM; + return 1; + } + } + return 0; + } + + static void wifi_usart_dma_init() { + #ifdef STM32F1xx + __HAL_RCC_DMA1_CLK_ENABLE(); + wifiUsartDMArx.Instance = DMA1_Channel5; + #else + __HAL_RCC_DMA2_CLK_ENABLE(); + wifiUsartDMArx.Instance = DMA2_Stream2; + wifiUsartDMArx.Init.Channel = DMA_CHANNEL_4; + #endif + wifiUsartDMArx.Init.Direction = DMA_PERIPH_TO_MEMORY; + wifiUsartDMArx.Init.PeriphInc = DMA_PINC_DISABLE; + wifiUsartDMArx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; + wifiUsartDMArx.Init.MemDataAlignment = DMA_PDATAALIGN_BYTE; + wifiUsartDMArx.Init.Mode = DMA_NORMAL; + #ifdef STM32F4xx + wifiUsartDMArx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; + #endif + wifiUsartDMArx.Init.MemInc = DMA_MINC_ENABLE; + if (HAL_DMA_Init((DMA_HandleTypeDef *)&wifiUsartDMArx) != HAL_OK) + Error_Handler(); + + if (HAL_DMA_Start(&wifiUsartDMArx, (uint32_t)&(USART1->DR), (uint32_t)WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE)) + Error_Handler(); + + USART1->CR1 |= USART_CR1_UE; + + SET_BIT(USART1->CR3, USART_CR3_DMAR); // Enable Rx DMA Request + + for (uint8_t i = 0; i < TRANS_RCV_FIFO_BLOCK_NUM; i++) { + wifiDmaRcvFifo.bufferAddr[i] = &bmp_public_buf[1024 * i]; + wifiDmaRcvFifo.state[i] = udisk_buf_empty; + } + + memset(wifiDmaRcvFifo.bufferAddr[0], 0, 1024 * TRANS_RCV_FIFO_BLOCK_NUM); + wifiDmaRcvFifo.read_cur = 0; + wifiDmaRcvFifo.write_cur = 0; + } + + void esp_port_begin(uint8_t interrupt) { + WifiRxFifo.uart_read_point = 0; + WifiRxFifo.uart_write_point = 0; + + #if ENABLED(MKS_WIFI_MODULE) + if (interrupt) { + WIFISERIAL.end(); + for (uint16_t i = 0; i < 65535; i++) { /*nada*/ } + WIFISERIAL.begin(WIFI_BAUDRATE); + uint32_t serial_connect_timeout = millis() + 1000UL; + while (PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + } + else { + WIFISERIAL.end(); + USART1->CR1 &= ~USART_CR1_RXNEIE; + WIFISERIAL.begin(WIFI_UPLOAD_BAUDRATE); + wifi_usart_dma_init(); + } + #endif + } + +#endif // !__STM32F1__ #if ENABLED(MKS_WIFI_MODULE) int raw_send_to_wifi(uint8_t *buf, int len) { if (buf == 0 || len <= 0) return 0; - for (int i = 0; i < len; i++) - WIFISERIAL.write(*(buf + i)); + for (int i = 0; i < len; i++) WIFISERIAL.write(*(buf + i)); return len; } @@ -336,9 +578,9 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { uint8_t wifi_ret_tail = 0xFC; if (type == WIFI_PARA_SET) { - int data_offset = 4; - int apLen = strlen((const char *)uiCfg.wifi_name); - int keyLen = strlen((const char *)uiCfg.wifi_key); + int data_offset = 4, + apLen = strlen((const char *)uiCfg.wifi_name), + keyLen = strlen((const char *)uiCfg.wifi_key); ZERO(buf_to_wifi); index_to_wifi = 0; @@ -378,9 +620,9 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { if (buf_to_wifi[index_to_wifi + 3] == '\n') { // mask "wait" "busy" "X:" - if (((buf_to_wifi[4] == 'w') && (buf_to_wifi[5] == 'a') && (buf_to_wifi[6] == 'i') && (buf_to_wifi[7] == 't') ) - || ((buf_to_wifi[4] == 'b') && (buf_to_wifi[5] == 'u') && (buf_to_wifi[6] == 's') && (buf_to_wifi[7] == 'y') ) - || ((buf_to_wifi[4] == 'X') && (buf_to_wifi[5] == ':') ) + if ( ((buf_to_wifi[4] == 'w') && (buf_to_wifi[5] == 'a') && (buf_to_wifi[6] == 'i') && (buf_to_wifi[7] == 't')) + || ((buf_to_wifi[4] == 'b') && (buf_to_wifi[5] == 'u') && (buf_to_wifi[6] == 's') && (buf_to_wifi[7] == 'y')) + || ((buf_to_wifi[4] == 'X') && (buf_to_wifi[5] == ':')) ) { ZERO(buf_to_wifi); index_to_wifi = 0; @@ -458,6 +700,7 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { return 1; } + #define SEND_OK_TO_WIFI send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")) int send_to_wifi(uint8_t *buf, int len) { return package_to_wifi(WIFI_TRANS_INF, buf, len); } @@ -530,15 +773,15 @@ int write_to_file(char *buf, int len) { return 0; } -#define ESP_PROTOC_HEAD (uint8_t)0xA5 -#define ESP_PROTOC_TAIL (uint8_t)0xFC +#define ESP_PROTOC_HEAD (uint8_t)0xA5 +#define ESP_PROTOC_TAIL (uint8_t)0xFC -#define ESP_TYPE_NET (uint8_t)0x0 -#define ESP_TYPE_GCODE (uint8_t)0x1 +#define ESP_TYPE_NET (uint8_t)0x0 +#define ESP_TYPE_GCODE (uint8_t)0x1 #define ESP_TYPE_FILE_FIRST (uint8_t)0x2 -#define ESP_TYPE_FILE_FRAGMENT (uint8_t)0x3 +#define ESP_TYPE_FILE_FRAGMENT (uint8_t)0x3 -#define ESP_TYPE_WIFI_LIST (uint8_t)0x4 +#define ESP_TYPE_WIFI_LIST (uint8_t)0x4 uint8_t esp_msg_buf[UART_RX_BUFFER_SIZE] = { 0 }; uint16_t esp_msg_index = 0; @@ -651,13 +894,10 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { } break; - case 21: - /*init sd card*/ - SEND_OK_TO_WIFI; - break; + case 21: SEND_OK_TO_WIFI; break; // Init SD card case 23: - /*select the file*/ + // Select the file if (uiCfg.print_state == IDLE) { int index = 0; while (tmpStr[index] == ' ') index++; @@ -747,8 +987,10 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { if (card.isFileOpen()) { //saved_feedrate_percentage = feedrate_percentage; feedrate_percentage = 100; - planner.flow_percentage[0] = 100; - planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; + #if EXTRUDERS + planner.flow_percentage[0] = 100; + planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; + #endif #if EXTRUDERS == 2 planner.flow_percentage[1] = 100; planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; @@ -786,7 +1028,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 25: - /*pause print file*/ + // Pause print file if (uiCfg.print_state == WORKING) { stop_print_time(); @@ -806,7 +1048,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 26: - /*stop print file*/ + // Stop print file if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED) || (uiCfg.print_state == REPRINTING)) { stop_print_time(); @@ -823,7 +1065,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 27: - /*report print rate*/ + // Report print rate if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)|| (uiCfg.print_state == REPRINTING)) { print_rate = uiCfg.totalSend; ZERO(tempBuf); @@ -833,7 +1075,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 28: - /*begin to transfer file to filesys*/ + // Begin to transfer file to filesys if (uiCfg.print_state == IDLE) { int index = 0; @@ -887,7 +1129,6 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { sprintf_P(tbuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); const int tlen = strlen(tbuf); - sprintf_P(outBuf, PSTR("T:%s"), tbuf); outBuf += 2 + tlen; @@ -909,7 +1150,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { #if HAS_MULTI_HOTEND sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); #else - strcat_P(outBuf, PSTR("0 /0")); + strcpy_P(outBuf, PSTR("0 /0")); #endif outBuf += 4; @@ -918,17 +1159,11 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { else { sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), - #if HAS_HEATED_BED - thermalManager.wholeDegBed(), thermalManager.degTargetBed(), - #else - 0, 0, - #endif + TERN0(HAS_HEATED_BED, thermalManager.wholeDegBed()), + TERN0(HAS_HEATED_BED, thermalManager.degTargetBed()), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), - #if HAS_MULTI_HOTEND - thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1) - #else - 0, 0 - #endif + TERN0(HAS_MULTI_HOTEND, thermalManager.wholeDegHotend(1)), + TERN0(HAS_MULTI_HOTEND, thermalManager.degTargetHotend(1)) ); } @@ -977,11 +1212,8 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { case 998: if (uiCfg.print_state == IDLE) { - int v = atoi((char *)tmpStr); - if (v == 0) - set_cur_file_sys(0); - else if (v == 1) - set_cur_file_sys(1); + const int v = atoi((char *)tmpStr); + if (v == 0 || v == 1) set_cur_file_sys(v); wifi_ret_ack(); } break; @@ -996,18 +1228,14 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { strcat_P((char *)cmd_line, PSTR("\n")); if (espGcodeFifo.wait_tick > 5) { - uint32_t left; - if (espGcodeFifo.r > espGcodeFifo.w) - left = espGcodeFifo.r - espGcodeFifo.w - 1; - else - left = WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; + const uint32_t left = espGcodeFifo.r > espGcodeFifo.w + ? espGcodeFifo.r - espGcodeFifo.w - 1 + : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; if (left >= strlen((const char *)cmd_line)) { - uint32_t index = 0; - while (index < strlen((const char *)cmd_line)) { + for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - index++; } if (left - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) SEND_OK_TO_WIFI; @@ -1022,18 +1250,14 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { strcat_P((char *)cmd_line, PSTR("\n")); if (espGcodeFifo.wait_tick > 5) { - uint32_t left_g; - if (espGcodeFifo.r > espGcodeFifo.w) - left_g = espGcodeFifo.r - espGcodeFifo.w - 1; - else - left_g = WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; + const uint32_t left_g = espGcodeFifo.r > espGcodeFifo.w + ? espGcodeFifo.r - espGcodeFifo.w - 1 + : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; if (left_g >= strlen((const char *)cmd_line)) { - uint32_t index = 0; - while (index < strlen((const char *)cmd_line)) { + for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - index++; } if (left_g - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) SEND_OK_TO_WIFI; @@ -1061,11 +1285,10 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { if (msgLen <= 0) return; - // ip + // IP address sprintf_P(ipPara.ip_addr, PSTR("%d.%d.%d.%d"), msg[0], msg[1], msg[2], msg[3]); - // port - // connect state + // port connect state switch (msg[6]) { case 0x0A: wifi_link_state = WIFI_CONNECTED; break; case 0x0E: wifi_link_state = WIFI_EXCEPTION; break; @@ -1075,7 +1298,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { // mode wifiPara.mode = msg[7]; - // wifi name + // WiFi name wifiNameLen = msg[8]; wifiKeyLen = msg[9 + wifiNameLen]; if (wifiNameLen < 32) { @@ -1085,7 +1308,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { memset(&wifi_list.wifiConnectedName, 0, sizeof(wifi_list.wifiConnectedName)); memcpy(&wifi_list.wifiConnectedName, &msg[9], wifiNameLen); - // wifi key + // WiFi key if (wifiKeyLen < 64) { ZERO(wifiPara.keyCode); memcpy(wifiPara.keyCode, &msg[10 + wifiNameLen], wifiKeyLen); @@ -1102,7 +1325,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { cloud_para.port = msg[12 + wifiNameLen + wifiKeyLen + hostLen] + (msg[13 + wifiNameLen + wifiKeyLen + hostLen] << 8); } - // id + // ID id_len = msg[14 + wifiNameLen + wifiKeyLen + hostLen]; if (id_len == 20) { ZERO(cloud_para.id); @@ -1125,10 +1348,10 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { if (cfg_cloud_flag == 1) { if (((cloud_para.state >> 4) != (char)gCfgItems.cloud_enable) || (strncmp(cloud_para.hostUrl, (const char *)uiCfg.cloud_hostUrl, 96) != 0) - || (cloud_para.port != uiCfg.cloud_port)) { - package_to_wifi(WIFI_CLOUD_CFG, (uint8_t *)0, 0); - } - else cfg_cloud_flag = 0; + || (cloud_para.port != uiCfg.cloud_port) + ) package_to_wifi(WIFI_CLOUD_CFG, (uint8_t *)0, 0); + else + cfg_cloud_flag = 0; } } @@ -1366,6 +1589,7 @@ static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) { lastFragment = frag; if ((frag & (~FRAG_MASK)) != 0) { + wifiDmaRcvFifo.receiveEspData = false; int res = upload_file.write(public_buf, file_writer.write_index); if (res == -1) { upload_file.close(); @@ -1392,7 +1616,7 @@ static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) { ZERO(public_buf); file_writer.write_index = 0; file_writer.tick_end = getWifiTick(); - upload_time = getWifiTickDiff(file_writer.tick_begin, file_writer.tick_end) / 1000; + upload_time_sec = getWifiTickDiff(file_writer.tick_begin, file_writer.tick_end) / 1000; upload_size = gCfgItems.curFilesize; wifi_link_state = WIFI_CONNECTED; upload_result = 3; @@ -1540,9 +1764,16 @@ void stopEspTransfer() { WIFI_IO1_SET(); // disable dma - dma_clear_isr_bits(DMA1, DMA_CH5); - bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 0); - dma_disable(DMA1, DMA_CH5); + #ifdef __STM32F1__ + dma_clear_isr_bits(DMA1, DMA_CH5); + bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 0); + dma_disable(DMA1, DMA_CH5); + #else + // First, abort any running dma + HAL_DMA_Abort(&wifiUsartDMArx); + // DeInit objects + HAL_DMA_DeInit(&wifiUsartDMArx); + #endif wifi_delay(200); changeFlashMode(true); // Set SPI flash to use DMA mode @@ -1571,6 +1802,9 @@ void wifi_rcv_handle() { } } #else + #ifndef __STM32F1__ + if (wifiDmaRcvFifo.receiveEspData) storeRcvData(WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE); + #endif len = readWifiFifo(ucStr, UART_RX_BUFFER_SIZE); #endif if (len > 0) { @@ -1582,15 +1816,16 @@ void wifi_rcv_handle() { } getDataF = 1; } - if (esp_state == TRANSFER_STORE) { - if (storeRcvData(WIFISERIAL.usart_device->rb->buf, UART_RX_BUFFER_SIZE)) { - esp_state = TRANSFERING; - esp_dma_pre(); - if (wifiTransError.flag != 0x1) WIFI_IO1_RESET(); + #ifdef __STM32F1__ + if (esp_state == TRANSFER_STORE) { + if (storeRcvData(WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE)) { + esp_state = TRANSFERING; + esp_dma_pre(); + if (wifiTransError.flag != 0x1) WIFI_IO1_RESET(); + } + else WIFI_IO1_SET(); } - else - WIFI_IO1_SET(); - } + #endif } else { len = readWifiBuf((int8_t *)ucStr, UART_RX_BUFFER_SIZE); @@ -1602,6 +1837,10 @@ void wifi_rcv_handle() { esp_port_begin(0); wifi_delay(10); tick_net_time1 = 0; + #ifndef __STM32F1__ + wifiDmaRcvFifo.receiveEspData = true; + return; + #endif } if (wifiTransError.flag != 0x1) WIFI_IO1_RESET(); getDataF = 1; @@ -1612,9 +1851,8 @@ void wifi_rcv_handle() { } } - if (getDataF == 1) { + if (getDataF == 1) tick_net_time1 = getWifiTick(); - } else { tick_net_time2 = getWifiTick(); @@ -1664,74 +1902,68 @@ void mks_esp_wifi_init() { esp_state = TRANSFER_IDLE; esp_port_begin(1); - + watchdog_refresh(); wifi_reset(); #if 0 if (update_flag == 0) { res = f_open(&esp_upload.uploadFile, ESP_WEB_FIRMWARE_FILE, FA_OPEN_EXISTING | FA_READ); + if (res == FR_OK) { + f_close(&esp_upload.uploadFile); - if (res == FR_OK) { - f_close(&esp_upload.uploadFile); - - wifi_delay(2000); + wifi_delay(2000); - if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) { - return; - } - - clear_cur_ui(); + if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) return; - draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMWARE); - if (wifi_upload(1) >= 0) { + clear_cur_ui(); - f_unlink("1:/MKS_WIFI_CUR"); - f_rename(ESP_WEB_FIRMWARE_FILE,"/MKS_WIFI_CUR"); - } - draw_return_ui(); - update_flag = 1; + draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMWARE); + if (wifi_upload(1) >= 0) { + f_unlink("1:/MKS_WIFI_CUR"); + f_rename(ESP_WEB_FIRMWARE_FILE,"/MKS_WIFI_CUR"); } - + draw_return_ui(); + update_flag = 1; } - if (update_flag == 0) { - res = f_open(&esp_upload.uploadFile, ESP_WEB_FILE, FA_OPEN_EXISTING | FA_READ); - if (res == FR_OK) { - f_close(&esp_upload.uploadFile); + } - wifi_delay(2000); + if (update_flag == 0) { + res = f_open(&esp_upload.uploadFile, ESP_WEB_FILE, FA_OPEN_EXISTING | FA_READ); + if (res == FR_OK) { + f_close(&esp_upload.uploadFile); - if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) { - return; - } + wifi_delay(2000); - clear_cur_ui(); + if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) return; - draw_dialog(DIALOG_TYPE_UPDATE_ESP_DATA); + clear_cur_ui(); - if (wifi_upload(2) >= 0) { + draw_dialog(DIALOG_TYPE_UPDATE_ESP_DATA); - f_unlink("1:/MKS_WEB_CONTROL_CUR"); - f_rename(ESP_WEB_FILE,"/MKS_WEB_CONTROL_CUR"); - } - draw_return_ui(); + if (wifi_upload(2) >= 0) { + f_unlink("1:/MKS_WEB_CONTROL_CUR"); + f_rename(ESP_WEB_FILE,"/MKS_WEB_CONTROL_CUR"); } + draw_return_ui(); } + } #endif + wifiPara.decodeType = WIFI_DECODE_TYPE; wifiPara.baud = 115200; wifi_link_state = WIFI_NOT_CONFIG; } void mks_wifi_firmware_update() { + watchdog_refresh(); card.openFileRead((char *)ESP_FIRMWARE_FILE); if (card.isFileOpen()) { card.closefile(); wifi_delay(2000); - - if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) - return; + watchdog_refresh(); + if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) return; clear_cur_ui(); @@ -1753,12 +1985,6 @@ void mks_wifi_firmware_update() { } } -#define BUF_INC_POINTER(p) ((p + 1 == UART_FIFO_BUFFER_SIZE) ? 0:(p + 1)) - -int usartFifoAvailable(SZ_USART_FIFO *fifo) { - return WIFISERIAL.available(); -} - void get_wifi_commands() { static char wifi_line_buffer[MAX_CMD_SIZE]; static bool wifi_comment_mode = false; @@ -1836,4 +2062,6 @@ int readWifiBuf(int8_t *buf, int32_t len) { return i; } +int usartFifoAvailable(SZ_USART_FIFO *fifo) { return WIFISERIAL.available(); } + #endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.h b/Marlin/src/lcd/extui/mks_ui/wifi_module.h index 8f6461341799..709d3d17190f 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.h +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.h @@ -64,6 +64,7 @@ typedef enum{ #define TRANS_RCV_FIFO_BLOCK_NUM 14 typedef struct { + bool receiveEspData; unsigned char *bufferAddr[TRANS_RCV_FIFO_BLOCK_NUM]; unsigned char *p; UDISK_DATA_BUFFER_STATE state[TRANS_RCV_FIFO_BLOCK_NUM]; @@ -191,6 +192,9 @@ void get_wifi_list_command_send(); void get_wifi_commands(); int readWifiBuf(int8_t *buf, int32_t len); void mks_wifi_firmware_update(); +int usartFifoAvailable(SZ_USART_FIFO *fifo); +int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); +void esp_port_begin(uint8_t interrupt); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp index 4a8e473a5cca..4a5f08edaaea 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp @@ -40,7 +40,6 @@ extern SZ_USART_FIFO WifiRxFifo; extern int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); extern int writeUsartFifo(SZ_USART_FIFO * fifo, int8_t * buf, int32_t len); void esp_port_begin(uint8_t interrupt); -extern int usartFifoAvailable(SZ_USART_FIFO *fifo); void wifi_delay(int n); #define ARRAY_SIZE(a) sizeof(a) / sizeof((a)[0]) @@ -280,7 +279,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t switch (state) { case begin: // expecting frame start c = uploadPort_read(); - if (c == (uint8_t)0xC0) break; + if (c != (uint8_t)0xC0) break; state = header; needBytes = 2; break; @@ -644,10 +643,7 @@ static const uint32_t FirmwareAddress = 0x00000000, WebFilesAddress = 0x00100000 void ResetWiFiForUpload(int begin_or_end) { //#if 0 - uint32_t start, now; - - start = getWifiTick(); - now = start; + uint32_t start = getWifiTick(); if (begin_or_end == 0) { SET_OUTPUT(WIFI_IO0_PIN); @@ -657,7 +653,7 @@ void ResetWiFiForUpload(int begin_or_end) { SET_INPUT_PULLUP(WIFI_IO0_PIN); WIFI_RESET(); - while (getWifiTickDiff(start, now) < 500) now = getWifiTick(); + while (getWifiTickDiff(start, getWifiTick()) < 500) { /* nada */ } WIFI_SET(); //#endif } diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 14664bda3940..c7850903e7bf 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -36,6 +36,7 @@ #define BOARD_INFO_NAME "MKS Robin E3P" #define BOARD_NO_NATIVE_USB +#define MKS_HARDWARE_TEST_ONLY_E0 // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 091a3362320b..7de5552dbba8 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -178,16 +178,16 @@ // // Misc. Functions // -#define MT_DET_1 PA4 -#define MT_DET_2 PE6 +#define MT_DET_1_PIN PA4 +#define MT_DET_2_PIN PE6 #define PW_DET PA13 #define PW_OFF PB2 #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN MT_DET_1 + #define FIL_RUNOUT_PIN MT_DET_1_PIN #endif #ifndef FIL_RUNOUT2_PIN - #define FIL_RUNOUT2_PIN MT_DET_2 + #define FIL_RUNOUT2_PIN MT_DET_2_PIN #endif #ifndef POWER_LOSS_PIN @@ -214,6 +214,13 @@ #define SDCARD_CONNECTION ONBOARD #endif +// MKS WIFI MODULE +#if ENABLED(MKS_WIFI_MODULE) + #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN + #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN + #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN +#endif + // // Onboard SD card // diff --git a/buildroot/tests/mks_robin_nano35 b/buildroot/tests/mks_robin_nano35 index 08917446927e..99ff2623bb61 100755 --- a/buildroot/tests/mks_robin_nano35 +++ b/buildroot/tests/mks_robin_nano35 @@ -21,8 +21,8 @@ exec_test $1 $2 "MKS Robin nano v1.2 Emulated DOGM FSMC" "$3" use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC -opt_enable TFT_INTERFACE_SPI -exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI" "$3" +opt_enable TFT_INTERFACE_SPI MKS_WIFI_MODULE +exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI, MKS_WIFI_MODULE" "$3" # # MKS Robin nano v1.2 LVGL FSMC diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index 2580c4700c54..db1cc99217c1 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -26,8 +26,7 @@ platform = ststm32@~12.1 board_build.core = maple build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py - ${common.build_flags} - -DARDUINO_ARCH_STM32 + ${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1 build_unflags = -std=gnu11 -std=gnu++11 src_filter = ${common.default_src_filter} + lib_ignore = SPI, FreeRTOS701, FreeRTOS821 From 05ebde38127ca6c3bc056cb4068a414bade766b4 Mon Sep 17 00:00:00 2001 From: lujios <83166168+lujios@users.noreply.github.com> Date: Tue, 13 Jul 2021 02:19:29 +0200 Subject: [PATCH 056/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Improve=20Sensorle?= =?UTF-8?q?ss=20homing/probing=20for=20G28,=20G33=20(#21899)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 6 +- Marlin/src/feature/tmc_util.h | 7 -- Marlin/src/gcode/calibrate/G28.cpp | 18 ++++- Marlin/src/gcode/calibrate/G33.cpp | 16 ++++- Marlin/src/module/delta.cpp | 1 + Marlin/src/module/endstops.cpp | 12 +++- Marlin/src/module/planner.cpp | 28 ++++++++ Marlin/src/module/planner.h | 13 ++++ Marlin/src/module/probe.cpp | 109 +++++++++++++++++++++++++++-- Marlin/src/module/probe.h | 12 ++++ 10 files changed, 197 insertions(+), 25 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index c595e8b13664..3ec4a8193c86 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -828,10 +828,8 @@ void idle(bool no_stepper_sleep/*=false*/) { // Run StallGuard endstop checks #if ENABLED(SPI_ENDSTOPS) - if (endstops.tmc_spi_homing.any - && TERN1(IMPROVE_HOMING_RELIABILITY, ELAPSED(millis(), sg_guard_period)) - ) LOOP_L_N(i, 4) // Read SGT 4 times per idle loop - if (endstops.tmc_spi_homing_check()) break; + if (endstops.tmc_spi_homing.any && TERN1(IMPROVE_HOMING_RELIABILITY, ELAPSED(millis(), sg_guard_period))) + LOOP_L_N(i, 4) if (endstops.tmc_spi_homing_check()) break; // Read SGT 4 times per idle loop #endif // Handle SD Card insert / remove diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 4753f78d91fe..c878d86faedd 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -360,13 +360,6 @@ void test_tmc_connection(LOGICAL_AXIS_DECL(const bool, true)); #if ENABLED(IMPROVE_HOMING_RELIABILITY) extern millis_t sg_guard_period; constexpr uint16_t default_sg_guard_duration = 400; - - struct motion_state_t { - xy_ulong_t acceleration; - #if HAS_CLASSIC_JERK - xy_float_t jerk_state; - #endif - }; #endif bool tmc_enable_stallguard(TMC2130Stepper &st); diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 7cd1f65fbf36..ca9cbb8cc9b8 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -167,12 +167,15 @@ motion_state_t begin_slow_homing() { motion_state_t motion_state{0}; motion_state.acceleration.set(planner.settings.max_acceleration_mm_per_s2[X_AXIS], - planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); + planner.settings.max_acceleration_mm_per_s2[Y_AXIS] + OPTARG(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS]) + ); planner.settings.max_acceleration_mm_per_s2[X_AXIS] = 100; planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = 100; + TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = 100); #if HAS_CLASSIC_JERK motion_state.jerk_state = planner.max_jerk; - planner.max_jerk.set(0, 0); + planner.max_jerk.set(0, 0 OPTARG(DELTA, 0)); #endif planner.reset_acceleration_rates(); return motion_state; @@ -181,6 +184,7 @@ void end_slow_homing(const motion_state_t &motion_state) { planner.settings.max_acceleration_mm_per_s2[X_AXIS] = motion_state.acceleration.x; planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = motion_state.acceleration.y; + TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = motion_state.acceleration.z); TERN_(HAS_CLASSIC_JERK, planner.max_jerk = motion_state.jerk_state); planner.reset_acceleration_rates(); } @@ -259,7 +263,7 @@ void GcodeSuite::G28() { reset_stepper_timeout(); #define HAS_CURRENT_HOME(N) (defined(N##_CURRENT_HOME) && N##_CURRENT_HOME != N##_CURRENT) - #if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) + #if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z)) #define HAS_HOMING_CURRENT 1 #endif @@ -287,6 +291,11 @@ void GcodeSuite::G28() { stepperY2.rms_current(Y2_CURRENT_HOME); if (DEBUGGING(LEVELING)) debug_current(PSTR("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME); #endif + #if HAS_CURRENT_HOME(Z) && ENABLED(DELTA) + const int16_t tmc_save_current_Z = stepperZ.getMilliamps(); + stepperZ.rms_current(Z_CURRENT_HOME); + if (DEBUGGING(LEVELING)) debug_current(PSTR("Z"), tmc_save_current_Z, Z_CURRENT_HOME); + #endif #endif #if ENABLED(IMPROVE_HOMING_RELIABILITY) @@ -497,6 +506,9 @@ void GcodeSuite::G28() { #if HAS_CURRENT_HOME(Y2) stepperY2.rms_current(tmc_save_current_Y2); #endif + #if HAS_CURRENT_HOME(Z) && ENABLED(DELTA) + stepperZ.rms_current(tmc_save_current_Z); + #endif #if HAS_CURRENT_HOME(I) stepperI.rms_current(tmc_save_current_I); #endif diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 0737c9166850..a897a101157c 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -71,7 +71,9 @@ float lcd_probe_pt(const xy_pos_t &xy); void ac_home() { endstops.enable(true); + TERN_(SENSORLESS_HOMING, probe.set_homing_current(true)); home_delta(); + TERN_(SENSORLESS_HOMING, probe.set_homing_current(false)); endstops.not_homing(); } @@ -384,6 +386,12 @@ static float auto_tune_a() { * V3 Report settings and probe results * * E Engage the probe for each point + * + * With SENSORLESS_PROBING: + * Use these flags to calibrate stall sensitivity: (e.g., `G33 P1 Y Z` to calibrate X only.) + * X Don't activate stallguard on X. + * Y Don't activate stallguard on Y. + * Z Don't activate stallguard on Z. */ void GcodeSuite::G33() { @@ -417,6 +425,12 @@ void GcodeSuite::G33() { const bool stow_after_each = parser.seen_test('E'); + #if ENABLED(SENSORLESS_PROBING) + probe.test_sensitivity.x = !parser.seen_test('X'); + TERN_(HAS_Y_AXIS, probe.test_sensitivity.y = !parser.seen_test('Y')); + TERN_(HAS_Z_AXIS, probe.test_sensitivity.z = !parser.seen_test('Z')); + #endif + const bool _0p_calibration = probe_points == 0, _1p_calibration = probe_points == 1 || probe_points == -1, _4p_calibration = probe_points == 2, @@ -587,7 +601,7 @@ void GcodeSuite::G33() { // print report - if (verbose_level == 3) + if (verbose_level == 3 || verbose_level == 0) print_calibration_results(z_at_pt, _tower_results, _opposite_results); if (verbose_level != 0) { // !dry run diff --git a/Marlin/src/module/delta.cpp b/Marlin/src/module/delta.cpp index 96d8841f1312..992c3a09b469 100644 --- a/Marlin/src/module/delta.cpp +++ b/Marlin/src/module/delta.cpp @@ -254,6 +254,7 @@ void home_delta() { current_position.z = DIFF_TERN(HAS_BED_PROBE, delta_height + 10, probe.offset.z); line_to_current_position(homing_feedrate(Z_AXIS)); planner.synchronize(); + TERN_(SENSORLESS_PROBING,endstops.report_states()); // Re-enable stealthChop if used. Disable diag1 pin on driver. #if ENABLED(SENSORLESS_HOMING) && DISABLED(ENDSTOPS_ALWAYS_ON_DEFAULT) diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 8f6827de2776..420acccb58b0 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -595,9 +595,15 @@ void _O2 Endstops::report_states() { // The following routines are called from an ISR context. It could be the temperature ISR, the // endstop ISR or the Stepper ISR. -#define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX -#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN -#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING +#if BOTH(DELTA, SENSORLESS_PROBING) + #define _ENDSTOP(AXIS, MINMAX) AXIS ##_MAX + #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_MAX_PIN + #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_MAX_ENDSTOP_INVERTING +#else + #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX + #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN + #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING +#endif // Check endstops - Could be called from Temperature ISR! void Endstops::update() { diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 49b2d60b20b8..e48d05b09f6d 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1527,6 +1527,34 @@ void Planner::check_axes_activity() { } #endif +#if ENABLED(IMPROVE_HOMING_RELIABILITY) + + void Planner::enable_stall_prevention(const bool onoff) { + static motion_state_t saved_motion_state; + if (onoff) { + saved_motion_state.acceleration.x = settings.max_acceleration_mm_per_s2[X_AXIS]; + saved_motion_state.acceleration.y = settings.max_acceleration_mm_per_s2[Y_AXIS]; + settings.max_acceleration_mm_per_s2[X_AXIS] = settings.max_acceleration_mm_per_s2[Y_AXIS] = 100; + #if ENABLED(DELTA) + saved_motion_state.acceleration.z = settings.max_acceleration_mm_per_s2[Z_AXIS]; + settings.max_acceleration_mm_per_s2[Z_AXIS] = 100; + #endif + #if HAS_CLASSIC_JERK + saved_motion_state.jerk_state = max_jerk; + max_jerk.set(0, 0 OPTARG(DELTA, 0)); + #endif + } + else { + settings.max_acceleration_mm_per_s2[X_AXIS] = saved_motion_state.acceleration.x; + settings.max_acceleration_mm_per_s2[Y_AXIS] = saved_motion_state.acceleration.y; + TERN_(DELTA, settings.max_acceleration_mm_per_s2[Z_AXIS] = saved_motion_state.acceleration.z); + TERN_(HAS_CLASSIC_JERK, max_jerk = saved_motion_state.jerk_state); + } + reset_acceleration_rates(); + } + +#endif + #if HAS_LEVELING constexpr xy_pos_t level_fulcrum = { diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 10114ebfc637..9b104615f6f9 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -281,6 +281,15 @@ typedef struct { min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate } planner_settings_t; +#if ENABLED(IMPROVE_HOMING_RELIABILITY) + struct motion_state_t { + TERN(DELTA, xyz_ulong_t, xy_ulong_t) acceleration; + #if HAS_CLASSIC_JERK + TERN(DELTA, xyz_float_t, xy_float_t) jerk_state; + #endif + }; +#endif + #if DISABLED(SKEW_CORRECTION) #define XY_SKEW_FACTOR 0 #define XZ_SKEW_FACTOR 0 @@ -532,6 +541,10 @@ class Planner { } #endif + #if ENABLED(IMPROVE_HOMING_RELIABILITY) + void enable_stall_prevention(const bool onoff); + #endif + #if DISABLED(NO_VOLUMETRICS) // Update multipliers based on new diameter measurements diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index dae25feea3eb..6831d151f9ec 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -68,7 +68,7 @@ #include "servo.h" #endif -#if ENABLED(SENSORLESS_PROBING) +#if EITHER(SENSORLESS_PROBING, SENSORLESS_HOMING) #include "stepper.h" #include "../feature/tmc_util.h" #endif @@ -92,6 +92,10 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() const xy_pos_t &Probe::offset_xy = Probe::offset; #endif +#if ENABLED(SENSORLESS_PROBING) + Probe::sense_bool_t Probe::test_sensitivity; +#endif + #if ENABLED(Z_PROBE_SLED) #ifndef SLED_DOCKING_OFFSET @@ -493,11 +497,12 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { #if ENABLED(SENSORLESS_PROBING) sensorless_t stealth_states { false }; #if ENABLED(DELTA) - stealth_states.x = tmc_enable_stallguard(stepperX); - stealth_states.y = tmc_enable_stallguard(stepperY); + if (probe.test_sensitivity.x) stealth_states.x = tmc_enable_stallguard(stepperX); // Delta watches all DIAG pins for a stall + if (probe.test_sensitivity.y) stealth_states.y = tmc_enable_stallguard(stepperY); #endif - stealth_states.z = tmc_enable_stallguard(stepperZ); + if (probe.test_sensitivity.z) stealth_states.z = tmc_enable_stallguard(stepperZ); // All machines will check Z-DIAG for stall endstops.enable(true); + set_homing_current(true); // The "homing" current also applies to probing #endif TERN_(HAS_QUIET_PROBING, set_probing_paused(true)); @@ -520,10 +525,11 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { #if ENABLED(SENSORLESS_PROBING) endstops.not_homing(); #if ENABLED(DELTA) - tmc_disable_stallguard(stepperX, stealth_states.x); - tmc_disable_stallguard(stepperY, stealth_states.y); + if (probe.test_sensitivity.x) tmc_disable_stallguard(stepperX, stealth_states.x); + if (probe.test_sensitivity.y) tmc_disable_stallguard(stepperY, stealth_states.y); #endif - tmc_disable_stallguard(stepperZ, stealth_states.z); + if (probe.test_sensitivity.z) tmc_disable_stallguard(stepperZ, stealth_states.z); + set_homing_current(false); #endif if (probe_triggered && TERN0(BLTOUCH_SLOW_MODE, bltouch.stow())) // Stow in LOW SPEED MODE on every trigger @@ -815,4 +821,93 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai #endif // HAS_Z_SERVO_PROBE +#if EITHER(SENSORLESS_PROBING, SENSORLESS_HOMING) + + sensorless_t stealth_states { false }; + + /** + * Disable stealthChop if used. Enable diag1 pin on driver. + */ + void Probe::enable_stallguard_diag1() { + #if ENABLED(SENSORLESS_PROBING) + #if ENABLED(DELTA) + stealth_states.x = tmc_enable_stallguard(stepperX); + stealth_states.y = tmc_enable_stallguard(stepperY); + #endif + stealth_states.z = tmc_enable_stallguard(stepperZ); + endstops.enable(true); + #endif + } + + /** + * Re-enable stealthChop if used. Disable diag1 pin on driver. + */ + void Probe::disable_stallguard_diag1() { + #if ENABLED(SENSORLESS_PROBING) + endstops.not_homing(); + #if ENABLED(DELTA) + tmc_disable_stallguard(stepperX, stealth_states.x); + tmc_disable_stallguard(stepperY, stealth_states.y); + #endif + tmc_disable_stallguard(stepperZ, stealth_states.z); + #endif + } + + /** + * Change the current in the TMC drivers to N##_CURRENT_HOME. And we save the current configuration of each TMC driver. + */ + void Probe::set_homing_current(const bool onoff) { + #define HAS_CURRENT_HOME(N) (defined(N##_CURRENT_HOME) && N##_CURRENT_HOME != N##_CURRENT) + #if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Z) + #if ENABLED(DELTA) + static int16_t saved_current_X, saved_current_Y; + #endif + #if HAS_CURRENT_HOME(Z) + static int16_t saved_current_Z; + #endif + auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) { + if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); } + }; + if (onoff) { + #if ENABLED(DELTA) + #if HAS_CURRENT_HOME(X) + saved_current_X = stepperX.getMilliamps(); + stepperX.rms_current(X_CURRENT_HOME); + debug_current_on(PSTR("X"), saved_current_X, X_CURRENT_HOME); + #endif + #if HAS_CURRENT_HOME(Y) + saved_current_Y = stepperY.getMilliamps(); + stepperY.rms_current(Y_CURRENT_HOME); + debug_current_on(PSTR("Y"), saved_current_Y, Y_CURRENT_HOME); + #endif + #endif + #if HAS_CURRENT_HOME(Z) + saved_current_Z = stepperZ.getMilliamps(); + stepperZ.rms_current(Z_CURRENT_HOME); + debug_current_on(PSTR("Z"), saved_current_Z, Z_CURRENT_HOME); + #endif + TERN_(IMPROVE_HOMING_RELIABILITY, planner.enable_stall_prevention(true)); + } + else { + #if ENABLED(DELTA) + #if HAS_CURRENT_HOME(X) + stepperX.rms_current(saved_current_X); + debug_current_on(PSTR("X"), X_CURRENT_HOME, saved_current_X); + #endif + #if HAS_CURRENT_HOME(Y) + stepperY.rms_current(saved_current_Y); + debug_current_on(PSTR("Y"), Y_CURRENT_HOME, saved_current_Y); + #endif + #endif + #if HAS_CURRENT_HOME(Z) + stepperZ.rms_current(saved_current_Z); + debug_current_on(PSTR("Z"), Z_CURRENT_HOME, saved_current_Z); + #endif + TERN_(IMPROVE_HOMING_RELIABILITY, planner.enable_stall_prevention(false)); + } + #endif + } + +#endif // SENSORLESS_PROBING + #endif // HAS_BED_PROBE diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index da46c830f699..62880c865f71 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -56,6 +56,11 @@ class Probe { public: + #if ENABLED(SENSORLESS_PROBING) + typedef struct { bool x:1, y:1, z:1; } sense_bool_t; + static sense_bool_t test_sensitivity; + #endif + #if HAS_BED_PROBE static xyz_pos_t offset; @@ -256,6 +261,13 @@ class Probe { static bool tare(); #endif + // Basic functions for Sensorless Homing and Probing + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + static void enable_stallguard_diag1(); + static void disable_stallguard_diag1(); + static void set_homing_current(const bool onoff); + #endif + private: static bool probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s); static void do_z_raise(const float z_raise); From fa6b01c677fbcdabe6972be4a20571ffe3f38415 Mon Sep 17 00:00:00 2001 From: Marcio T Date: Mon, 12 Jul 2021 18:35:00 -0600 Subject: [PATCH 057/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Fixes=20to=20FTDI?= =?UTF-8?q?=20Eve=20Touch=20UI=20(#22347)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/extended/command_processor.h | 16 +++- .../ftdi_eve_lib/extended/text_box.cpp | 74 +++++++++++-------- .../generic/about_screen.cpp | 7 +- .../generic/interface_settings_screen.cpp | 46 ++++-------- .../generic/save_settings_dialog_box.cpp | 4 + .../generic/save_settings_dialog_box.h | 1 + .../lcd/extui/ftdi_eve_touch_ui/theme/fonts.h | 2 +- 7 files changed, 81 insertions(+), 69 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h index 8561eb05a2ab..9a83e9ee09c1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h @@ -209,11 +209,25 @@ class CommandProcessor : public CLCD::CommandFifo { inline CommandProcessor& rectangle(int16_t x, int16_t y, int16_t w, int16_t h) { using namespace FTDI; CLCD::CommandFifo::cmd(BEGIN(RECTS)); - CLCD::CommandFifo::cmd(VERTEX2F(x * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, y * 16)); CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, (y + h) * 16)); return *this; } + inline CommandProcessor& border(int16_t x, int16_t y, int16_t w, int16_t h) { + using namespace FTDI; + CLCD::CommandFifo::cmd(BEGIN(LINES)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, (y + h) * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, (y + h) * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, (y + h) * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, (y + h) * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, y * 16)); + return *this; + } + template FORCEDINLINE CommandProcessor& toggle(int16_t x, int16_t y, int16_t w, int16_t h, T text, bool state, uint16_t options = FTDI::OPT_3D) { CLCD::FontMetrics fm(_font); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp index 9f73c7dfb832..f3f518359c30 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp @@ -29,25 +29,30 @@ namespace FTDI { * be broken so that the display width is less than w. The line will also * be broken after a '\n'. Returns the display width of the line. */ - static uint16_t find_line_break(const FontMetrics &fm, uint16_t w, const char *str, const char *&end) { - w -= fm.get_char_width(' '); + static uint16_t find_line_break(const FontMetrics &utf8_fm, const CLCD::FontMetrics &clcd_fm, const uint16_t w, const char *str, const char *&end, bool use_utf8) { const char *p = str; end = str; uint16_t lw = 0, result = 0; for (;;) { - utf8_char_t c = get_utf8_char_and_inc(p); - if (c == ' ' || c == '\n' || c == '\0') { - if (lw < w || end == str) { - end = (c == '\0') ? p-1 : p; + const char *next = p; + utf8_char_t c = get_utf8_char_and_inc(next); + // Decide whether to break the string at this location + if (c == '\n' || c == '\0' || c == ' ') { + end = p; + result = lw; + } + if (c == '\n' || c == '\0') break; + // Now add the length of the current character to the tally. + lw += use_utf8 ? utf8_fm.get_char_width(c) : clcd_fm.char_widths[(uint8_t)c]; + // Stop processing once string exceeds the display width + if (lw >= w) { + if (end == str) { + end = p; result = lw; } - if (c == '\0' || c == '\n') break; + break; } - lw += fm.get_char_width(c); - } - if (end == str) { - end = p-1; - result = lw; + p = next; } return result; } @@ -55,17 +60,18 @@ namespace FTDI { /** * This function returns a measurements of the word-wrapped text box. */ - static void measure_text_box(const FontMetrics &fm, const char *str, uint16_t &width, uint16_t &height) { + static void measure_text_box(const FontMetrics &utf8_fm, const CLCD::FontMetrics &clcd_fm, const char *str, uint16_t &width, uint16_t &height, bool use_utf8) { const char *line_start = (const char*)str; const char *line_end; const uint16_t wrap_width = width; width = height = 0; for (;;) { - uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end); - if (line_end == line_start) break; + uint16_t line_width = find_line_break(utf8_fm, clcd_fm, wrap_width, line_start, line_end, use_utf8); width = max(width, line_width); - height += fm.get_height(); + height += utf8_fm.get_height(); line_start = line_end; + if (line_start[0] == '\n' || line_start[0] == ' ') line_start++; + if (line_start[0] == '\0') break; } } @@ -73,41 +79,45 @@ namespace FTDI { * This function draws text inside a bounding box, doing word wrapping and using the largest font that will fit. */ void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options, uint8_t font) { + #if ENABLED(TOUCH_UI_USE_UTF8) + const bool use_utf8 = has_utf8_chars(str); + #else + constexpr bool use_utf8 = false; + #endif uint16_t box_width, box_height; - FontMetrics fm(font); + FontMetrics utf8_fm(font); + CLCD::FontMetrics clcd_fm; + clcd_fm.load(font); // Shrink the font until we find a font that fits for (;;) { box_width = w; - measure_text_box(fm, str, box_width, box_height); + measure_text_box(utf8_fm, clcd_fm, str, box_width, box_height, use_utf8); if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break; if (font == 26) break; - fm.load(--font); + utf8_fm.load(--font); + clcd_fm.load(font); } const uint16_t dx = (options & OPT_RIGHTX) ? w : - (options & OPT_CENTERX) ? w/2 : 0; - const uint16_t dy = (options & OPT_BOTTOMY) ? (h - box_height) : - (options & OPT_CENTERY) ? (h - box_height)/2 : 0; + (options & OPT_CENTERX) ? w / 2 : 0, + dy = (options & OPT_BOTTOMY) ? (h - box_height) : + (options & OPT_CENTERY) ? (h - box_height) / 2 : 0; - const char *line_start = str; - const char *line_end; + const char *line_start = str, *line_end; for (;;) { - find_line_break(fm, w, line_start, line_end); - if (line_end == line_start) break; + find_line_break(utf8_fm, clcd_fm, w, line_start, line_end, use_utf8); const size_t line_len = line_end - line_start; if (line_len) { char line[line_len + 1]; strncpy(line, line_start, line_len); line[line_len] = 0; - if (line[line_len - 1] == '\n' || line[line_len - 1] == ' ') - line[line_len - 1] = 0; #if ENABLED(TOUCH_UI_USE_UTF8) - if (has_utf8_chars(line)) { - draw_utf8_text(cmd, x + dx, y + dy, line, fm.fs, options & ~(OPT_CENTERY | OPT_BOTTOMY)); + if (use_utf8) { + draw_utf8_text(cmd, x + dx, y + dy, line, utf8_fm.fs, options & ~(OPT_CENTERY | OPT_BOTTOMY)); } else #endif { @@ -115,9 +125,11 @@ namespace FTDI { cmd.CLCD::CommandFifo::str(line); } } - y += fm.get_height(); + y += utf8_fm.get_height(); line_start = line_end; + if (line_start[0] == '\n' || line_start[0] == ' ') line_start++; + if (line_start[0] == '\0') break; } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp index 4e90e71e8a51..68e50c90ace7 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp @@ -44,16 +44,13 @@ void AboutScreen::onRedraw(draw_mode_t) { .cmd(COLOR_RGB(bg_text_enabled)) .tag(0); - #define HEADING_POS BTN_POS(1,2), BTN_SIZE(4,1) + #define HEADING_POS BTN_POS(1,1), BTN_SIZE(4,2) #define FW_VERS_POS BTN_POS(1,3), BTN_SIZE(4,1) #define FW_INFO_POS BTN_POS(1,4), BTN_SIZE(4,1) #define LICENSE_POS BTN_POS(1,5), BTN_SIZE(4,3) #define STATS_POS BTN_POS(1,8), BTN_SIZE(2,1) #define BACK_POS BTN_POS(3,8), BTN_SIZE(2,1) - #define _INSET_POS(x,y,w,h) x + w/10, y, w - w/5, h - #define INSET_POS(pos) _INSET_POS(pos) - char about_str[1 + strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) #ifdef TOOLHEAD_NAME @@ -89,7 +86,7 @@ void AboutScreen::onRedraw(draw_mode_t) { , OPT_CENTER, font_medium); cmd.tag(0); draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium); - draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); + draw_text_box(cmd, LICENSE_POS, GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); cmd.font(font_medium); #if ENABLED(PRINTCOUNTER) && defined(FTDI_STATISTICS_SCREEN) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp index 568da5352494..a3febb39a223 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp @@ -58,11 +58,7 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { #define GRID_COLS 4 - #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 7 - #else - #define GRID_ROWS 6 - #endif + #define GRID_ROWS TERN(TOUCH_UI_PORTRAIT, 7, 6) cmd.cmd(CLEAR_COLOR_RGB(bg_color)) .cmd(CLEAR(true,true,true)) @@ -77,21 +73,19 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { #if DISABLED(LCD_FYSETC_TFT81050) .text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_LCD_BRIGHTNESS), OPT_RIGHTX | OPT_CENTERY) #endif - .text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY) - .text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_SCREEN_LOCK), OPT_RIGHTX | OPT_CENTERY); + .text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY); + #if ENABLED(FTDI_LOCK_SCREEN) + cmd.text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_SCREEN_LOCK), OPT_RIGHTX | OPT_CENTERY); + #endif #if DISABLED(TOUCH_UI_NO_BOOTSCREEN) - cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BOOT_SCREEN), OPT_RIGHTX | OPT_CENTERY); + cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BOOT_SCREEN), OPT_RIGHTX | OPT_CENTERY); #endif #undef EDGE_R } if (what & FOREGROUND) { - #if defined(FTDI_LOCK_SCREEN) || DISABLED(TOUCH_UI_NO_BOOTSCREEN) - #if ENABLED(TOUCH_UI_PORTRAIT) - constexpr uint8_t w = 2; - #else - constexpr uint8_t w = 1; - #endif + #if ENABLED(FTDI_LOCK_SCREEN) || DISABLED(TOUCH_UI_NO_BOOTSCREEN) + constexpr uint8_t w = TERN(TOUCH_UI_PORTRAIT, 2, 1); #endif cmd.font(font_medium) @@ -101,7 +95,7 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), mydata.brightness, 128) #endif .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), mydata.volume, 0xFF) - #ifdef FTDI_LOCK_SCREEN + #if ENABLED(FTDI_LOCK_SCREEN) .colors(ui_toggle) .tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled()) #endif @@ -126,7 +120,7 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); return true; - #ifdef FTDI_LOCK_SCREEN + #if ENABLED(FTDI_LOCK_SCREEN) case 4: if (!LockScreen::is_enabled()) LockScreen::enable(); @@ -185,8 +179,7 @@ void InterfaceSettingsScreen::onIdle() { } void InterfaceSettingsScreen::failSafeSettings() { - // Reset settings that may make the printer interface - // unusable. + // Reset settings that may make the printer interface unusable. CLCD::mem_write_32(CLCD::REG::ROTATE, 0); CLCD::default_touch_transform(); CLCD::default_display_orientation(); @@ -197,9 +190,7 @@ void InterfaceSettingsScreen::failSafeSettings() { } void InterfaceSettingsScreen::defaultSettings() { - #ifdef FTDI_LOCK_SCREEN - LockScreen::passcode = 0; - #endif + TERN_(FTDI_LOCK_SCREEN, LockScreen::passcode = 0); SoundPlayer::set_volume(255); CLCD::set_brightness(255); UIData::reset_persistent_data(); @@ -218,11 +209,7 @@ void InterfaceSettingsScreen::saveSettings(char *buff) { persistent_data_t eeprom; - #ifdef FTDI_LOCK_SCREEN - eeprom.passcode = LockScreen::passcode; - #else - eeprom.passcode = 0; - #endif + eeprom.passcode = TERN0(FTDI_LOCK_SCREEN, LockScreen::passcode); eeprom.sound_volume = SoundPlayer::get_volume(); eeprom.display_brightness = CLCD::get_brightness(); eeprom.bit_flags = UIData::get_persistent_data(); @@ -251,7 +238,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) { SERIAL_ECHOLNPGM("Loading setting from EEPROM"); - #ifdef FTDI_LOCK_SCREEN + #if ENABLED(FTDI_LOCK_SCREEN) LockScreen::passcode = eeprom.passcode; #endif SoundPlayer::set_volume(eeprom.sound_volume); @@ -282,10 +269,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) { if (success) success = persistentStore.write_data(0, data, ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE) == PERSISTENT_STORE_SUCCESS; - if (success) - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_EEPROM_RESTORED)); - else - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_EEPROM_RESET)); + StatusScreen::setStatusMessage(success ? GET_TEXT_F(MSG_EEPROM_RESTORED) : GET_TEXT_F(MSG_EEPROM_RESET)); return success; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp index 176630d11e8d..5d92052aceaa 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp @@ -60,4 +60,8 @@ void SaveSettingsDialogBox::promptToSaveSettings() { GOTO_PREVIOUS(); // No save needed. } +void SaveSettingsDialogBox::promptToSaveAndStay() { + if (needs_save) GOTO_SCREEN(SaveSettingsDialogBox); +} + #endif // FTDI_SAVE_SETTINGS_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h index 8985a974fe6b..0cbadfbbe6c9 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h @@ -34,5 +34,6 @@ class SaveSettingsDialogBox : public DialogBoxBaseClass, public UncachedScreen { static bool onTouchEnd(uint8_t tag); static void promptToSaveSettings(); + static void promptToSaveAndStay(); static void settingsChanged() {needs_save = true;} }; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/fonts.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/fonts.h index 7cc4e078ada1..63ecdfcb3c7e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/fonts.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/fonts.h @@ -55,7 +55,7 @@ namespace Theme { constexpr int16_t font_small = 27; constexpr int16_t font_medium = 28; constexpr int16_t font_large = 30; - constexpr int16_t font_xlarge = 31; + constexpr int16_t font_xlarge = 30; constexpr float icon_scale = 0.6; #endif #elif defined(TOUCH_UI_320x240) From d95e32f95015d1dac8a5dd51a78638706ff21c09 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 13 Jul 2021 00:59:56 +0000 Subject: [PATCH 058/323] [cron] Bump distribution date (2021-07-13) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c2df42881adc..5cfb8c0a0755 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-12" +//#define STRING_DISTRIBUTION_DATE "2021-07-13" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index b8a83e02caa5..2834d3888bfe 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-12" + #define STRING_DISTRIBUTION_DATE "2021-07-13" #endif /** From 315a722b420226be0c07c05abf95a5b666caf1e6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 12 Jul 2021 22:52:17 -0500 Subject: [PATCH 059/323] =?UTF-8?q?=F0=9F=90=9B=20TM3D=20fixes=20and=20imp?= =?UTF-8?q?rovements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> --- Marlin/src/core/serial.h | 2 +- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 16 +++++++++------- .../cocoa_press/leveling_menu.cpp | 4 ++-- Marlin/src/lcd/extui/ui_api.cpp | 2 +- Marlin/src/pins/ramps/pins_RAMPS.h | 4 +++- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 7 ++++++- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index a5afb9d895d2..ee6c0e6eae92 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -67,7 +67,7 @@ extern uint8_t marlin_debug_flags; // Serial redirection // // Step 1: Find out what the first serial leaf is -#if BOTH(HAS_MULTI_SERIAL, SERIAL_CATCHALL) +#if HAS_MULTI_SERIAL && defined(SERIAL_CATCHALL) #define _SERIAL_LEAF_1 MYSERIAL #else #define _SERIAL_LEAF_1 MYSERIAL1 diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index 9aea68dfcb02..114590a04373 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -2417,13 +2417,15 @@ void Draw_HomeOff_Menu() { #include "../../../libs/buzzer.h" void HMI_AudioFeedback(const bool success=true) { - if (success) { - buzzer.tone(100, 659); - buzzer.tone(10, 0); - buzzer.tone(100, 698); - } - else - buzzer.tone(40, 440); + #if HAS_BUZZER + if (success) { + buzzer.tone(100, 659); + buzzer.tone(10, 0); + buzzer.tone(100, 698); + } + else + buzzer.tone(40, 440); + #endif } /* Prepare */ diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index 57c8a7505c8a..6718fe0a41d1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -23,9 +23,9 @@ #include "../config.h" #include "../screens.h" -#ifdef COCOA_LEVELING_MENU +#if ENABLED(COCOA_LEVELING_MENU) -#if BOTH(HAS_BED_PROBE,BLTOUCH) +#if BOTH(HAS_BED_PROBE, BLTOUCH) #include "../../../../feature/bltouch.h" #endif diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 7173790262a1..4ef96251bcb2 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -1057,7 +1057,7 @@ namespace ExtUI { return isPrinting() && (isPrintingFromMediaPaused() || print_job_timer.isPaused()); } - bool isMediaInserted() { return TERN0(SDSUPPORT, IS_SD_INSERTED() && card.isMounted()); } + bool isMediaInserted() { return TERN0(SDSUPPORT, IS_SD_INSERTED()); } void pausePrint() { ui.pause_print(); } void resumePrint() { ui.resume_print(); } diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index fb143fa8bc10..2c271408b0c3 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -655,7 +655,9 @@ #define BEEPER_PIN EXP1_10_PIN #define BTN_ENC EXP1_09_PIN - #define SD_DETECT_PIN EXP2_04_PIN + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_04_PIN + #endif #ifndef KILL_PIN #define KILL_PIN EXP2_03_PIN diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index a8be2cfc0730..63ad06dc577a 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -172,8 +172,13 @@ // // Misc. Functions // -#define LED_CONTROL_PIN PA13 +#define CASE_LIGHT_PIN PA13 #ifndef NEOPIXEL_PIN #define NEOPIXEL_PIN PA8 #endif + +#define SUICIDE_PIN PC13 +#ifndef SUICIDE_PIN_INVERTING + #define SUICIDE_PIN_INVERTING false +#endif From 4479b0222bb66dd54f2c60f50a35a9d35f3230dc Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Mon, 12 Jul 2021 20:57:01 -0700 Subject: [PATCH 060/323] =?UTF-8?q?=F0=9F=90=9B=20Followup=20to=20TEMP=5FS?= =?UTF-8?q?ENSOR=5FBOARD=20(#22343,=20#22344)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #22279 --- Marlin/src/inc/Conditionals_adv.h | 4 +++- Marlin/src/inc/Conditionals_post.h | 17 +++++++++++++++++ Marlin/src/module/temperature.cpp | 16 ++++++++-------- Marlin/src/module/temperature.h | 2 +- buildroot/tests/mega2560 | 11 +++++++++++ 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 33ed0dad38a4..c781ebb59511 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -127,7 +127,9 @@ // Usurp a sensor to do redundant readings #if TEMP_SENSOR_REDUNDANT - #define REDUNDANT_TEMP_MATCH(M,N) (TEMP_SENSOR_REDUNDANT_##M == HID_##N) + #define _HEATER_ID(M) HID_##M + #define HEATER_ID(M) _HEATER_ID(M) + #define REDUNDANT_TEMP_MATCH(M,N) (HEATER_ID(TEMP_SENSOR_REDUNDANT_##M) == _HEATER_ID(N)) #else #define REDUNDANT_TEMP_MATCH(...) 0 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index d62debf7553f..1bac56339f97 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1135,6 +1135,23 @@ #endif #endif +#if TEMP_SENSOR_BOARD == -4 + #define TEMP_SENSOR_BOARD_IS_AD8495 1 +#elif TEMP_SENSOR_BOARD == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BOARD." +#elif TEMP_SENSOR_BOARD == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BOARD." +#elif TEMP_SENSOR_BOARD == -1 + #define TEMP_SENSOR_BOARD_IS_AD595 1 +#elif TEMP_SENSOR_BOARD > 0 + #define TEMP_SENSOR_BOARD_IS_THERMISTOR 1 + #if TEMP_SENSOR_BOARD == 1000 + #define TEMP_SENSOR_BOARD_IS_CUSTOM 1 + #elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999 + #define TEMP_SENSOR_BOARD_IS_DUMMY 1 + #endif +#endif + /** * X_DUAL_ENDSTOPS endstop reassignment */ diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 4a56ba66e996..fd2c260fd311 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -440,7 +440,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, board_info_t Temperature::temp_board; // = { 0 } #if ENABLED(THERMAL_PROTECTION_BOARD) int16_t Temperature::mintemp_raw_BOARD = TEMP_SENSOR_BOARD_RAW_LO_TEMP, - Temperature::maxtemp_raw_BOARD = TEMP_SENSOR_COOLER_RAW_HI_TEMP; + Temperature::maxtemp_raw_BOARD = TEMP_SENSOR_BOARD_RAW_HI_TEMP; #endif #endif @@ -951,7 +951,7 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms #if HAS_TEMP_REDUNDANT if (heater_id == H_REDUNDANT) { SERIAL_ECHOPGM(STR_REDUNDANT); // print redundant and cascade to print target, too. - real_heater_id = (heater_id_t)TEMP_SENSOR_REDUNDANT_TARGET; + real_heater_id = (heater_id_t)HEATER_ID(TEMP_SENSOR_REDUNDANT_TARGET); } #endif @@ -1323,7 +1323,7 @@ void Temperature::manage_heater() { #if HAS_TEMP_REDUNDANT // Make sure measured temperatures are close together if (ABS(degRedundantTarget() - degRedundant()) > TEMP_SENSOR_REDUNDANT_MAX_DIFF) - _temp_error((heater_id_t)TEMP_SENSOR_REDUNDANT_TARGET, PSTR(STR_REDUNDANCY), GET_TEXT(MSG_ERR_REDUNDANT_TEMP)); + _temp_error((heater_id_t)HEATER_ID(TEMP_SENSOR_REDUNDANT_TARGET), PSTR(STR_REDUNDANCY), GET_TEXT(MSG_ERR_REDUNDANT_TEMP)); #endif #if HAS_AUTO_FAN @@ -2015,7 +2015,7 @@ void Temperature::updateTemperaturesFromRawValues() { TERN_(TEMP_SENSOR_0_IS_MAX_TC, temp_hotend[0].raw = READ_MAX_TC(0)); TERN_(TEMP_SENSOR_1_IS_MAX_TC, temp_hotend[1].raw = READ_MAX_TC(1)); - TERN_(TEMP_SENSOR_REDUNDANT_IS_MAX_TC, temp_redundant.raw = READ_MAX_TC(TEMP_SENSOR_REDUNDANT_SOURCE)); + TERN_(TEMP_SENSOR_REDUNDANT_IS_MAX_TC, temp_redundant.raw = READ_MAX_TC(HEATER_ID(TEMP_SENSOR_REDUNDANT_SOURCE))); #if HAS_HOTEND HOTEND_LOOP() temp_hotend[e].celsius = analog_to_celsius_hotend(temp_hotend[e].raw, e); @@ -2455,9 +2455,9 @@ void Temperature::init() { while (analog_to_celsius_cooler(maxtemp_raw_COOLER) < COOLER_MAXTEMP) maxtemp_raw_COOLER -= TEMPDIR(COOLER) * (OVERSAMPLENR); #endif - #if HAS_TEMP_BOARD - while (analog_to_celsius_board(mintemp_raw_BOARD) > BOARD_MINTEMP) mintemp_raw_BOARD += TEMPDIR(BOARD) * (OVERSAMPLENR); - while (analog_to_celsius_board(maxtemp_raw_BOARD) < BOARD_MAXTEMP) maxtemp_raw_BOARD -= TEMPDIR(BOARD) * (OVERSAMPLENR); + #if BOTH(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) + while (analog_to_celsius_board(mintemp_raw_BOARD) < BOARD_MINTEMP) mintemp_raw_BOARD += TEMPDIR(BOARD) * (OVERSAMPLENR); + while (analog_to_celsius_board(maxtemp_raw_BOARD) > BOARD_MAXTEMP) maxtemp_raw_BOARD -= TEMPDIR(BOARD) * (OVERSAMPLENR); #endif #if HAS_TEMP_REDUNDANT @@ -2473,7 +2473,7 @@ void Temperature::init() { #elif REDUNDANT_TEMP_MATCH(TARGET, BED) && HAS_TEMP_BED temp_bed #else - temp_hotend[TEMP_SENSOR_REDUNDANT_TARGET] + temp_hotend[HEATER_ID(TEMP_SENSOR_REDUNDANT_TARGET)] #endif ); #endif diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 61993c43a868..c78dfa937217 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -815,7 +815,7 @@ class Temperature { static inline int16_t rawBoardTemp() { return temp_board.raw; } #endif static inline celsius_float_t degBoard() { return temp_board.celsius; } - static inline celsius_t wholeDegBoard() { return static_cast(degBoard() + 0.5f); } + static inline celsius_t wholeDegBoard() { return static_cast(temp_board.celsius + 0.5f); } #endif #if HAS_TEMP_REDUNDANT diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index 09323889694b..edae6d24aeb8 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -198,6 +198,17 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS EEPROM_BOO exec_test $1 $2 "REPRAP MEGA2560 RAMPS | Laser Feature | Air Evacuation | Air Assist | Cooler | Flowmeter | 44780 LCD " "$3" +# +# Test redundant temperature sensors + MAX TC +# +restore_configs +opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 1 \ + TEMP_SENSOR_0 -2 TEMP_SENSOR_REDUNDANT -2 \ + TEMP_SENSOR_REDUNDANT_SOURCE E1 TEMP_SENSOR_REDUNDANT_TARGET E0 \ + TEMP_0_CS_PIN 11 TEMP_1_CS_PIN 12 + +exec_test $1 $2 "MEGA2560 RAMPS | Redundant temperature sensor | 2x MAX6675" "$3" + # # Language files test with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER # From 3797549e7e873864f3cd11ab9185f01676c046e0 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 13 Jul 2021 17:08:04 -0700 Subject: [PATCH 061/323] =?UTF-8?q?=F0=9F=90=9B=20Board=20Temp=20Sensor=20?= =?UTF-8?q?followup=20(#22350)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 1 + Marlin/src/lcd/thermistornames.h | 2 + .../src/module/thermistor/thermistor_2000.h | 60 +++++++++++++++++++ Marlin/src/module/thermistor/thermistors.h | 3 + Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 2 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 2 +- 6 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 Marlin/src/module/thermistor/thermistor_2000.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index bdeb8d8501e2..4adc40a19f83 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -451,6 +451,7 @@ * 67 : 500kΩ SliceEngineering 450°C Thermistor * 70 : 100kΩ bq Hephestos 2 * 75 : 100kΩ Generic Silicon Heat Pad with NTC100K MGB18-104F39050L32 + * 2000 : 100kΩ Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor * * Analog Thermistors - 1kΩ pullup - Atypical, and requires changing out the 4.7kΩ pullup for 1kΩ. * ------- (but gives greater accuracy and more stable PID) diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index f9f91ac49a5c..4f6dd23ece90 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -128,6 +128,8 @@ #define THERMISTOR_NAME "Pt100 1K" #elif THERMISTOR_ID == 666 #define THERMISTOR_NAME "Einstart S" +#elif THERMISTOR_ID == 2000 + #define THERMISTOR_NAME "TDK NTCG104LH104JT1" // High Temperature thermistors #elif THERMISTOR_ID == 61 diff --git a/Marlin/src/module/thermistor/thermistor_2000.h b/Marlin/src/module/thermistor/thermistor_2000.h new file mode 100644 index 000000000000..3815a6f2569a --- /dev/null +++ b/Marlin/src/module/thermistor/thermistor_2000.h @@ -0,0 +1,60 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// R25 = 100 KOhm, beta25 = 4550 K, 4.7 kOhm pull-up, TDK NTCG104LH104KT1 https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1 +constexpr temp_entry_t temptable_2000[] PROGMEM = { +{ OV(313), 125 }, +{ OV(347), 120 }, +{ OV(383), 115 }, +{ OV(422), 110 }, +{ OV(463), 105 }, +{ OV(506), 100 }, +{ OV(549), 95 }, +{ OV(594), 90 }, +{ OV(638), 85 }, +{ OV(681), 80 }, +{ OV(722), 75 }, +{ OV(762), 70 }, +{ OV(799), 65 }, +{ OV(833), 60 }, +{ OV(863), 55 }, +{ OV(890), 50 }, +{ OV(914), 45 }, +{ OV(934), 40 }, +{ OV(951), 35 }, +{ OV(966), 30 }, +{ OV(978), 25 }, +{ OV(988), 20 }, +{ OV(996), 15 }, +{ OV(1002), 10 }, +{ OV(1007), 5 }, +{ OV(1012), 0 }, +{ OV(1015), -5 }, +{ OV(1017), -10 }, +{ OV(1019), -15 }, +{ OV(1020), -20 }, +{ OV(1021), -25 }, +{ OV(1022), -30 }, +{ OV(1023), -35 }, +{ OV(1023), -40 } +}; diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index 9351fa6eb1ac..28a1e2f90f89 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -201,6 +201,9 @@ typedef struct { int16_t value; celsius_t celsius; } temp_entry_t; #if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup #include "thermistor_1047.h" #endif +#if ANY_THERMISTOR_IS(2000) // "Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor" https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1 + #include "thermistor_2000.h" +#endif #if ANY_THERMISTOR_IS(998) // User-defined table 1 #include "thermistor_998.h" #endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index 5be2bba25c05..78465dd7a806 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -116,7 +116,7 @@ // #define TEMP_0_PIN 0 // Analog Input, Header J2 #define TEMP_1_PIN 1 // Analog Input, Header J3 -#define TEMP_BOARD_PIN TEMP_1_PIN // Analog Input, Header J3 +#define TEMP_BOARD_PIN 91 // Onboard thermistor, 100k TDK NTCG104LH104JT1 #define TEMP_BED_PIN 2 // Analog Input, Header J6 #define TEMP_PROBE_PIN 3 // Analog Input, Header J15 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 866d94924ad2..2bfbb194270b 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -161,7 +161,7 @@ // #define TEMP_0_PIN PA2 // T0 <-> E0 #define TEMP_1_PIN PA0 // T1 <-> E1 -#define TEMP_BOARD_PIN TEMP_1_PIN // Onboard sensor shared with T1 +#define TEMP_BOARD_PIN PC2 // Onboard thermistor, NTC100K #define TEMP_BED_PIN PA1 // T2 <-> Bed #define TEMP_PROBE_PIN PC3 // Shares J4 connector with PD1 From 9a7727e61c76a9e30fda85d8ac33392be0e453c0 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Tue, 13 Jul 2021 17:13:06 -0700 Subject: [PATCH 062/323] =?UTF-8?q?=F0=9F=8E=A8=20Define=20temp=20sensor?= =?UTF-8?q?=20conditionals=20earlier=20(#22342)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_adv.h | 419 +++++++++++++++++++++++++++-- Marlin/src/inc/Conditionals_post.h | 392 +-------------------------- 2 files changed, 402 insertions(+), 409 deletions(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index c781ebb59511..55ae6ec535ab 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -112,27 +112,9 @@ #undef STEALTHCHOP_E #endif -#if TEMP_SENSOR_BED == 0 - #undef THERMAL_PROTECTION_BED - #undef THERMAL_PROTECTION_BED_PERIOD -#endif - -#if TEMP_SENSOR_CHAMBER == 0 - #undef THERMAL_PROTECTION_CHAMBER -#endif - -#if TEMP_SENSOR_COOLER == 0 - #undef THERMAL_PROTECTION_COOLER -#endif - -// Usurp a sensor to do redundant readings -#if TEMP_SENSOR_REDUNDANT - #define _HEATER_ID(M) HID_##M - #define HEATER_ID(M) _HEATER_ID(M) - #define REDUNDANT_TEMP_MATCH(M,N) (HEATER_ID(TEMP_SENSOR_REDUNDANT_##M) == _HEATER_ID(N)) -#else - #define REDUNDANT_TEMP_MATCH(...) 0 -#endif +/** + * Temperature Sensors; define what sensor(s) we have. + */ // Temperature sensor IDs #define HID_REDUNDANT -6 @@ -150,6 +132,401 @@ #define HID_E6 6 #define HID_E7 7 +#define ANY_TEMP_SENSOR_IS(n) (n == TEMP_SENSOR_0 || n == TEMP_SENSOR_1 || n == TEMP_SENSOR_2 || n == TEMP_SENSOR_3 \ + || n == TEMP_SENSOR_4 || n == TEMP_SENSOR_5 || n == TEMP_SENSOR_6 || n == TEMP_SENSOR_7 \ + || n == TEMP_SENSOR_BED \ + || n == TEMP_SENSOR_PROBE \ + || n == TEMP_SENSOR_CHAMBER \ + || n == TEMP_SENSOR_COOLER \ + || n == TEMP_SENSOR_REDUNDANT ) +#if ANY_TEMP_SENSOR_IS(1000) + #define HAS_USER_THERMISTORS 1 +#endif +#undef ANY_TEMP_SENSOR_IS + +#if TEMP_SENSOR_REDUNDANT + #define _HEATER_ID(M) HID_##M + #define HEATER_ID(M) _HEATER_ID(M) + #define REDUNDANT_TEMP_MATCH(M,N) (HEATER_ID(TEMP_SENSOR_REDUNDANT_##M) == _HEATER_ID(N)) +#else + #define REDUNDANT_TEMP_MATCH(...) 0 +#endif + +#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2 + #define TEMP_SENSOR_0_IS_MAX_TC 1 + #if TEMP_SENSOR_0 == -5 + #define TEMP_SENSOR_0_IS_MAX31865 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN 0 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 + #ifndef MAX31865_SENSOR_WIRES_0 + #define MAX31865_SENSOR_WIRES_0 2 + #endif + #elif TEMP_SENSOR_0 == -3 + #define TEMP_SENSOR_0_IS_MAX31855 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN -270 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1800 + #elif TEMP_SENSOR_0 == -2 + #define TEMP_SENSOR_0_IS_MAX6675 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN 0 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 + #endif +#elif TEMP_SENSOR_0 == -4 + #define TEMP_SENSOR_0_IS_AD8495 1 +#elif TEMP_SENSOR_0 == -1 + #define TEMP_SENSOR_0_IS_AD595 1 +#elif TEMP_SENSOR_0 > 0 + #define TEMP_SENSOR_0_IS_THERMISTOR 1 + #if TEMP_SENSOR_0 == 1000 + #define TEMP_SENSOR_0_IS_CUSTOM 1 + #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999 + #define TEMP_SENSOR_0_IS_DUMMY 1 + #endif +#else + #undef HEATER_0_MINTEMP + #undef HEATER_0_MAXTEMP +#endif + +#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2 + #define TEMP_SENSOR_1_IS_MAX_TC 1 + #if TEMP_SENSOR_1 == -5 + #define TEMP_SENSOR_1_IS_MAX31865 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN 0 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 + #ifndef MAX31865_SENSOR_WIRES_1 + #define MAX31865_SENSOR_WIRES_1 2 + #endif + #elif TEMP_SENSOR_1 == -3 + #define TEMP_SENSOR_1_IS_MAX31855 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN -270 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1800 + #elif TEMP_SENSOR_1 == -2 + #define TEMP_SENSOR_1_IS_MAX6675 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN 0 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 + #endif + + #if TEMP_SENSOR_1 != TEMP_SENSOR_0 + #if TEMP_SENSOR_1 == -5 + #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." + #elif TEMP_SENSOR_1 == -3 + #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." + #elif TEMP_SENSOR_1 == -2 + #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." + #endif + #endif +#elif TEMP_SENSOR_1 == -4 + #define TEMP_SENSOR_1_IS_AD8495 1 +#elif TEMP_SENSOR_1 == -1 + #define TEMP_SENSOR_1_IS_AD595 1 +#elif TEMP_SENSOR_1 > 0 + #define TEMP_SENSOR_1_IS_THERMISTOR 1 + #if TEMP_SENSOR_1 == 1000 + #define TEMP_SENSOR_1_IS_CUSTOM 1 + #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999 + #define TEMP_SENSOR_1_IS_DUMMY 1 + #endif +#else + #undef HEATER_1_MINTEMP + #undef HEATER_1_MAXTEMP +#endif + +#if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2 + #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1 + + #if TEMP_SENSOR_REDUNDANT == -5 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) + #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." + #endif + + #define TEMP_SENSOR_REDUNDANT_IS_MAX31865 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 + #elif TEMP_SENSOR_REDUNDANT == -3 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." + #endif + + #define TEMP_SENSOR_REDUNDANT_IS_MAX31855 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800 + #elif TEMP_SENSOR_REDUNDANT == -2 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." + #endif + + #define TEMP_SENSOR_REDUNDANT_IS_MAX6675 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 + #endif + + // mimic setting up the source TEMP_SENSOR + #if REDUNDANT_TEMP_MATCH(SOURCE, E0) + #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN + #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX + #ifndef MAX31865_SENSOR_WIRES_0 + #define MAX31865_SENSOR_WIRES_0 2 + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E1) + #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN + #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX + #ifndef MAX31865_SENSOR_WIRES_1 + #define MAX31865_SENSOR_WIRES_1 2 + #endif + #endif + + #if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1) + #if TEMP_SENSOR_REDUNDANT == -5 + #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." + #elif TEMP_SENSOR_REDUNDANT == -3 + #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." + #elif TEMP_SENSOR_REDUNDANT == -2 + #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." + #endif + #endif +#elif TEMP_SENSOR_REDUNDANT == -4 + #define TEMP_SENSOR_REDUNDANT_IS_AD8495 1 +#elif TEMP_SENSOR_REDUNDANT == -1 + #define TEMP_SENSOR_REDUNDANT_IS_AD595 1 +#elif TEMP_SENSOR_REDUNDANT > 0 + #define TEMP_SENSOR_REDUNDANT_IS_THERMISTOR 1 + #if TEMP_SENSOR_REDUNDANT == 1000 + #define TEMP_SENSOR_REDUNDANT_IS_CUSTOM 1 + #elif TEMP_SENSOR_REDUNDANT == 998 || TEMP_SENSOR_REDUNDANT == 999 + #error "Dummy sensors are not supported for TEMP_SENSOR_REDUNDANT." + #endif +#endif + +#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC + #define HAS_MAX_TC 1 +#endif +#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675 + #define HAS_MAX6675 1 +#endif +#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855 + #define HAS_MAX31855 1 +#endif +#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865 + #define HAS_MAX31865 1 +#endif + +#if TEMP_SENSOR_2 == -4 + #define TEMP_SENSOR_2_IS_AD8495 1 +#elif TEMP_SENSOR_2 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_2." +#elif TEMP_SENSOR_2 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2." +#elif TEMP_SENSOR_2 == -1 + #define TEMP_SENSOR_2_IS_AD595 1 +#elif TEMP_SENSOR_2 > 0 + #define TEMP_SENSOR_2_IS_THERMISTOR 1 + #if TEMP_SENSOR_2 == 1000 + #define TEMP_SENSOR_2_IS_CUSTOM 1 + #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999 + #define TEMP_SENSOR_2_IS_DUMMY 1 + #endif +#else + #undef HEATER_2_MINTEMP + #undef HEATER_2_MAXTEMP +#endif + +#if TEMP_SENSOR_3 == -4 + #define TEMP_SENSOR_3_IS_AD8495 1 +#elif TEMP_SENSOR_3 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_3." +#elif TEMP_SENSOR_3 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3." +#elif TEMP_SENSOR_3 == -1 + #define TEMP_SENSOR_3_IS_AD595 1 +#elif TEMP_SENSOR_3 > 0 + #define TEMP_SENSOR_3_IS_THERMISTOR 1 + #if TEMP_SENSOR_3 == 1000 + #define TEMP_SENSOR_3_IS_CUSTOM 1 + #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 + #define TEMP_SENSOR_3_IS_DUMMY 1 + #endif +#else + #undef HEATER_3_MINTEMP + #undef HEATER_3_MAXTEMP +#endif + +#if TEMP_SENSOR_4 == -4 + #define TEMP_SENSOR_4_IS_AD8495 1 +#elif TEMP_SENSOR_4 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_4." +#elif TEMP_SENSOR_4 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4." +#elif TEMP_SENSOR_4 == -1 + #define TEMP_SENSOR_4_IS_AD595 1 +#elif TEMP_SENSOR_4 > 0 + #define TEMP_SENSOR_4_IS_THERMISTOR 1 + #if TEMP_SENSOR_4 == 1000 + #define TEMP_SENSOR_4_IS_CUSTOM 1 + #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 + #define TEMP_SENSOR_4_IS_DUMMY 1 + #endif +#else + #undef HEATER_4_MINTEMP + #undef HEATER_4_MAXTEMP +#endif + +#if TEMP_SENSOR_5 == -4 + #define TEMP_SENSOR_5_IS_AD8495 1 +#elif TEMP_SENSOR_5 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_5." +#elif TEMP_SENSOR_5 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5." +#elif TEMP_SENSOR_5 == -1 + #define TEMP_SENSOR_5_IS_AD595 1 +#elif TEMP_SENSOR_5 > 0 + #define TEMP_SENSOR_5_IS_THERMISTOR 1 + #if TEMP_SENSOR_5 == 1000 + #define TEMP_SENSOR_5_IS_CUSTOM 1 + #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 + #define TEMP_SENSOR_5_IS_DUMMY 1 + #endif +#else + #undef HEATER_5_MINTEMP + #undef HEATER_5_MAXTEMP +#endif + +#if TEMP_SENSOR_6 == -4 + #define TEMP_SENSOR_6_IS_AD8495 1 +#elif TEMP_SENSOR_6 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_6." +#elif TEMP_SENSOR_6 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_6." +#elif TEMP_SENSOR_6 == -1 + #define TEMP_SENSOR_6_IS_AD595 1 +#elif TEMP_SENSOR_6 > 0 + #define TEMP_SENSOR_6_IS_THERMISTOR 1 + #if TEMP_SENSOR_6 == 1000 + #define TEMP_SENSOR_6_IS_CUSTOM 1 + #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 + #define TEMP_SENSOR_6_IS_DUMMY 1 + #endif +#else + #undef HEATER_6_MINTEMP + #undef HEATER_6_MAXTEMP +#endif + +#if TEMP_SENSOR_7 == -4 + #define TEMP_SENSOR_7_IS_AD8495 1 +#elif TEMP_SENSOR_7 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_7." +#elif TEMP_SENSOR_7 == -2 + #error "MAX7775 Thermocouples (-2) not supported for TEMP_SENSOR_7." +#elif TEMP_SENSOR_7 == -1 + #define TEMP_SENSOR_7_IS_AD595 1 +#elif TEMP_SENSOR_7 > 0 + #define TEMP_SENSOR_7_IS_THERMISTOR 1 + #if TEMP_SENSOR_7 == 1000 + #define TEMP_SENSOR_7_IS_CUSTOM 1 + #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 + #define TEMP_SENSOR_7_IS_DUMMY 1 + #endif +#else + #undef HEATER_7_MINTEMP + #undef HEATER_7_MAXTEMP +#endif + +#if TEMP_SENSOR_BED == -4 + #define TEMP_SENSOR_BED_IS_AD8495 1 +#elif TEMP_SENSOR_BED == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BED." +#elif TEMP_SENSOR_BED == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED." +#elif TEMP_SENSOR_BED == -1 + #define TEMP_SENSOR_BED_IS_AD595 1 +#elif TEMP_SENSOR_BED > 0 + #define TEMP_SENSOR_BED_IS_THERMISTOR 1 + #if TEMP_SENSOR_BED == 1000 + #define TEMP_SENSOR_BED_IS_CUSTOM 1 + #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999 + #define TEMP_SENSOR_BED_IS_DUMMY 1 + #endif +#else + #undef THERMAL_PROTECTION_BED + #undef THERMAL_PROTECTION_BED_PERIOD + #undef BED_MINTEMP + #undef BED_MAXTEMP +#endif + +#if TEMP_SENSOR_CHAMBER == -4 + #define TEMP_SENSOR_CHAMBER_IS_AD8495 1 +#elif TEMP_SENSOR_CHAMBER == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_CHAMBER." +#elif TEMP_SENSOR_CHAMBER == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER." +#elif TEMP_SENSOR_CHAMBER == -1 + #define TEMP_SENSOR_CHAMBER_IS_AD595 1 +#elif TEMP_SENSOR_CHAMBER > 0 + #define TEMP_SENSOR_CHAMBER_IS_THERMISTOR 1 + #if TEMP_SENSOR_CHAMBER == 1000 + #define TEMP_SENSOR_CHAMBER_IS_CUSTOM 1 + #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999 + #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1 + #endif +#else + #undef THERMAL_PROTECTION_CHAMBER + #undef CHAMBER_MINTEMP + #undef CHAMBER_MAXTEMP +#endif + +#if TEMP_SENSOR_COOLER == -4 + #define TEMP_SENSOR_COOLER_IS_AD8495 1 +#elif TEMP_SENSOR_COOLER == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_COOLER." +#elif TEMP_SENSOR_COOLER == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_COOLER." +#elif TEMP_SENSOR_COOLER == -1 + #define TEMP_SENSOR_COOLER_IS_AD595 1 +#elif TEMP_SENSOR_COOLER > 0 + #define TEMP_SENSOR_COOLER_IS_THERMISTOR 1 + #if TEMP_SENSOR_COOLER == 1000 + #define TEMP_SENSOR_COOLER_IS_CUSTOM 1 + #elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999 + #define TEMP_SENSOR_COOLER_IS_DUMMY 1 + #endif +#else + #undef THERMAL_PROTECTION_COOLER + #undef COOLER_MINTEMP + #undef COOLER_MAXTEMP +#endif + +#if TEMP_SENSOR_PROBE == -4 + #define TEMP_SENSOR_PROBE_IS_AD8495 1 +#elif TEMP_SENSOR_PROBE == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_PROBE." +#elif TEMP_SENSOR_PROBE == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_PROBE." +#elif TEMP_SENSOR_PROBE == -1 + #define TEMP_SENSOR_PROBE_IS_AD595 1 +#elif TEMP_SENSOR_PROBE > 0 + #define TEMP_SENSOR_PROBE_IS_THERMISTOR 1 + #if TEMP_SENSOR_PROBE == 1000 + #define TEMP_SENSOR_PROBE_IS_CUSTOM 1 + #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999 + #define TEMP_SENSOR_PROBE_IS_DUMMY 1 + #endif +#endif + +#if TEMP_SENSOR_BOARD == -4 + #define TEMP_SENSOR_BOARD_IS_AD8495 1 +#elif TEMP_SENSOR_BOARD == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BOARD." +#elif TEMP_SENSOR_BOARD == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BOARD." +#elif TEMP_SENSOR_BOARD == -1 + #define TEMP_SENSOR_BOARD_IS_AD595 1 +#elif TEMP_SENSOR_BOARD > 0 + #define TEMP_SENSOR_BOARD_IS_THERMISTOR 1 + #if TEMP_SENSOR_BOARD == 1000 + #define TEMP_SENSOR_BOARD_IS_CUSTOM 1 + #elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999 + #define TEMP_SENSOR_BOARD_IS_DUMMY 1 + #endif +#endif + #if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS)) #define HAS_MIXER_SYNC_CHANNEL 1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 1bac56339f97..b6cf8eccb6bc 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -513,22 +513,9 @@ #endif /** - * Temp Sensor defines + * Temp Sensor defines; set up pins as needed. */ -#define ANY_TEMP_SENSOR_IS(n) ( \ - n == TEMP_SENSOR_0 || n == TEMP_SENSOR_1 || n == TEMP_SENSOR_2 || n == TEMP_SENSOR_3 \ - || n == TEMP_SENSOR_4 || n == TEMP_SENSOR_5 || n == TEMP_SENSOR_6 || n == TEMP_SENSOR_7 \ - || n == TEMP_SENSOR_BED \ - || n == TEMP_SENSOR_PROBE \ - || n == TEMP_SENSOR_CHAMBER \ - || n == TEMP_SENSOR_COOLER \ - || n == TEMP_SENSOR_REDUNDANT ) -#if ANY_TEMP_SENSOR_IS(1000) - #define HAS_USER_THERMISTORS 1 -#endif -#undef ANY_TEMP_SENSOR_IS - // Usurp a sensor to do redundant readings #if TEMP_SENSOR_REDUNDANT #ifndef TEMP_SENSOR_REDUNDANT_SOURCE @@ -617,166 +604,9 @@ #endif #endif -#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2 - #define TEMP_SENSOR_0_IS_MAX_TC 1 - #if TEMP_SENSOR_0 == -5 - #define TEMP_SENSOR_0_IS_MAX31865 1 - #define TEMP_SENSOR_0_MAX_TC_TMIN 0 - #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 - #ifndef MAX31865_SENSOR_WIRES_0 - #define MAX31865_SENSOR_WIRES_0 2 - #endif - #elif TEMP_SENSOR_0 == -3 - #define TEMP_SENSOR_0_IS_MAX31855 1 - #define TEMP_SENSOR_0_MAX_TC_TMIN -270 - #define TEMP_SENSOR_0_MAX_TC_TMAX 1800 - #elif TEMP_SENSOR_0 == -2 - #define TEMP_SENSOR_0_IS_MAX6675 1 - #define TEMP_SENSOR_0_MAX_TC_TMIN 0 - #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 - #endif -#elif TEMP_SENSOR_0 == -4 - #define TEMP_SENSOR_0_IS_AD8495 1 -#elif TEMP_SENSOR_0 == -1 - #define TEMP_SENSOR_0_IS_AD595 1 -#elif TEMP_SENSOR_0 > 0 - #define TEMP_SENSOR_0_IS_THERMISTOR 1 - #if TEMP_SENSOR_0 == 1000 - #define TEMP_SENSOR_0_IS_CUSTOM 1 - #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999 - #define TEMP_SENSOR_0_IS_DUMMY 1 - #endif -#else - #undef HEATER_0_MINTEMP - #undef HEATER_0_MAXTEMP -#endif - -#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2 - #define TEMP_SENSOR_1_IS_MAX_TC 1 - #if TEMP_SENSOR_1 == -5 - #define TEMP_SENSOR_1_IS_MAX31865 1 - #define TEMP_SENSOR_1_MAX_TC_TMIN 0 - #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 - #ifndef MAX31865_SENSOR_WIRES_1 - #define MAX31865_SENSOR_WIRES_1 2 - #endif - #elif TEMP_SENSOR_1 == -3 - #define TEMP_SENSOR_1_IS_MAX31855 1 - #define TEMP_SENSOR_1_MAX_TC_TMIN -270 - #define TEMP_SENSOR_1_MAX_TC_TMAX 1800 - #elif TEMP_SENSOR_1 == -2 - #define TEMP_SENSOR_1_IS_MAX6675 1 - #define TEMP_SENSOR_1_MAX_TC_TMIN 0 - #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 - #endif - - #if TEMP_SENSOR_1 != TEMP_SENSOR_0 - #if TEMP_SENSOR_1 == -5 - #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." - #elif TEMP_SENSOR_1 == -3 - #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." - #elif TEMP_SENSOR_1 == -2 - #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." - #endif - #endif -#elif TEMP_SENSOR_1 == -4 - #define TEMP_SENSOR_1_IS_AD8495 1 -#elif TEMP_SENSOR_1 == -1 - #define TEMP_SENSOR_1_IS_AD595 1 -#elif TEMP_SENSOR_1 > 0 - #define TEMP_SENSOR_1_IS_THERMISTOR 1 - #if TEMP_SENSOR_1 == 1000 - #define TEMP_SENSOR_1_IS_CUSTOM 1 - #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999 - #define TEMP_SENSOR_1_IS_DUMMY 1 - #endif -#else - #undef HEATER_1_MINTEMP - #undef HEATER_1_MAXTEMP -#endif - -#if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2 - #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1 - - #if TEMP_SENSOR_REDUNDANT == -5 - #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) - #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." - #endif - - #define TEMP_SENSOR_REDUNDANT_IS_MAX31865 1 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 - #elif TEMP_SENSOR_REDUNDANT == -3 - #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." - #endif - - #define TEMP_SENSOR_REDUNDANT_IS_MAX31855 1 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800 - #elif TEMP_SENSOR_REDUNDANT == -2 - #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." - #endif - - #define TEMP_SENSOR_REDUNDANT_IS_MAX6675 1 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 - #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 - #endif - - // mimic setting up the source TEMP_SENSOR - #if REDUNDANT_TEMP_MATCH(SOURCE, E0) - #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN - #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX - #ifndef MAX31865_SENSOR_WIRES_0 - #define MAX31865_SENSOR_WIRES_0 2 - #endif - #elif REDUNDANT_TEMP_MATCH(SOURCE, E1) - #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN - #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX - #ifndef MAX31865_SENSOR_WIRES_1 - #define MAX31865_SENSOR_WIRES_1 2 - #endif - #endif - - #if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1) - #if TEMP_SENSOR_REDUNDANT == -5 - #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." - #elif TEMP_SENSOR_REDUNDANT == -3 - #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." - #elif TEMP_SENSOR_REDUNDANT == -2 - #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." - #endif - #endif -#elif TEMP_SENSOR_REDUNDANT == -4 - #define TEMP_SENSOR_REDUNDANT_IS_AD8495 1 -#elif TEMP_SENSOR_REDUNDANT == -1 - #define TEMP_SENSOR_REDUNDANT_IS_AD595 1 -#elif TEMP_SENSOR_REDUNDANT > 0 - #define TEMP_SENSOR_REDUNDANT_IS_THERMISTOR 1 - #if TEMP_SENSOR_REDUNDANT == 1000 - #define TEMP_SENSOR_REDUNDANT_IS_CUSTOM 1 - #elif TEMP_SENSOR_REDUNDANT == 998 || TEMP_SENSOR_REDUNDANT == 999 - #error "Dummy sensors are not supported for TEMP_SENSOR_REDUNDANT." - #endif -#endif - -#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC - #define HAS_MAX_TC 1 -#endif -#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675 - #define HAS_MAX6675 1 -#endif -#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855 - #define HAS_MAX31855 1 -#endif -#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865 - #define HAS_MAX31865 1 -#endif - -// -// Compatibility layer for MAX (SPI) temp boards -// +/** + * Compatibility layer for MAX (SPI) temp boards + */ #if HAS_MAX_TC // Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines. @@ -938,220 +768,6 @@ #endif //HAS_MAX_TC -#if TEMP_SENSOR_2 == -4 - #define TEMP_SENSOR_2_IS_AD8495 1 -#elif TEMP_SENSOR_2 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_2." -#elif TEMP_SENSOR_2 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2." -#elif TEMP_SENSOR_2 == -1 - #define TEMP_SENSOR_2_IS_AD595 1 -#elif TEMP_SENSOR_2 > 0 - #define TEMP_SENSOR_2_IS_THERMISTOR 1 - #if TEMP_SENSOR_2 == 1000 - #define TEMP_SENSOR_2_IS_CUSTOM 1 - #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999 - #define TEMP_SENSOR_2_IS_DUMMY 1 - #endif -#else - #undef HEATER_2_MINTEMP - #undef HEATER_2_MAXTEMP -#endif - -#if TEMP_SENSOR_3 == -4 - #define TEMP_SENSOR_3_IS_AD8495 1 -#elif TEMP_SENSOR_3 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_3." -#elif TEMP_SENSOR_3 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3." -#elif TEMP_SENSOR_3 == -1 - #define TEMP_SENSOR_3_IS_AD595 1 -#elif TEMP_SENSOR_3 > 0 - #define TEMP_SENSOR_3_IS_THERMISTOR 1 - #if TEMP_SENSOR_3 == 1000 - #define TEMP_SENSOR_3_IS_CUSTOM 1 - #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 - #define TEMP_SENSOR_3_IS_DUMMY 1 - #endif -#else - #undef HEATER_3_MINTEMP - #undef HEATER_3_MAXTEMP -#endif - -#if TEMP_SENSOR_4 == -4 - #define TEMP_SENSOR_4_IS_AD8495 1 -#elif TEMP_SENSOR_4 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_4." -#elif TEMP_SENSOR_4 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4." -#elif TEMP_SENSOR_4 == -1 - #define TEMP_SENSOR_4_IS_AD595 1 -#elif TEMP_SENSOR_4 > 0 - #define TEMP_SENSOR_4_IS_THERMISTOR 1 - #if TEMP_SENSOR_4 == 1000 - #define TEMP_SENSOR_4_IS_CUSTOM 1 - #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 - #define TEMP_SENSOR_4_IS_DUMMY 1 - #endif -#else - #undef HEATER_4_MINTEMP - #undef HEATER_4_MAXTEMP -#endif - -#if TEMP_SENSOR_5 == -4 - #define TEMP_SENSOR_5_IS_AD8495 1 -#elif TEMP_SENSOR_5 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_5." -#elif TEMP_SENSOR_5 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5." -#elif TEMP_SENSOR_5 == -1 - #define TEMP_SENSOR_5_IS_AD595 1 -#elif TEMP_SENSOR_5 > 0 - #define TEMP_SENSOR_5_IS_THERMISTOR 1 - #if TEMP_SENSOR_5 == 1000 - #define TEMP_SENSOR_5_IS_CUSTOM 1 - #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 - #define TEMP_SENSOR_5_IS_DUMMY 1 - #endif -#else - #undef HEATER_5_MINTEMP - #undef HEATER_5_MAXTEMP -#endif - -#if TEMP_SENSOR_6 == -4 - #define TEMP_SENSOR_6_IS_AD8495 1 -#elif TEMP_SENSOR_6 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_6." -#elif TEMP_SENSOR_6 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_6." -#elif TEMP_SENSOR_6 == -1 - #define TEMP_SENSOR_6_IS_AD595 1 -#elif TEMP_SENSOR_6 > 0 - #define TEMP_SENSOR_6_IS_THERMISTOR 1 - #if TEMP_SENSOR_6 == 1000 - #define TEMP_SENSOR_6_IS_CUSTOM 1 - #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 - #define TEMP_SENSOR_6_IS_DUMMY 1 - #endif -#else - #undef HEATER_6_MINTEMP - #undef HEATER_6_MAXTEMP -#endif - -#if TEMP_SENSOR_7 == -4 - #define TEMP_SENSOR_7_IS_AD8495 1 -#elif TEMP_SENSOR_7 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_7." -#elif TEMP_SENSOR_7 == -2 - #error "MAX7775 Thermocouples (-2) not supported for TEMP_SENSOR_7." -#elif TEMP_SENSOR_7 == -1 - #define TEMP_SENSOR_7_IS_AD595 1 -#elif TEMP_SENSOR_7 > 0 - #define TEMP_SENSOR_7_IS_THERMISTOR 1 - #if TEMP_SENSOR_7 == 1000 - #define TEMP_SENSOR_7_IS_CUSTOM 1 - #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 - #define TEMP_SENSOR_7_IS_DUMMY 1 - #endif -#else - #undef HEATER_7_MINTEMP - #undef HEATER_7_MAXTEMP -#endif - -#if TEMP_SENSOR_BED == -4 - #define TEMP_SENSOR_BED_IS_AD8495 1 -#elif TEMP_SENSOR_BED == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BED." -#elif TEMP_SENSOR_BED == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED." -#elif TEMP_SENSOR_BED == -1 - #define TEMP_SENSOR_BED_IS_AD595 1 -#elif TEMP_SENSOR_BED > 0 - #define TEMP_SENSOR_BED_IS_THERMISTOR 1 - #if TEMP_SENSOR_BED == 1000 - #define TEMP_SENSOR_BED_IS_CUSTOM 1 - #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999 - #define TEMP_SENSOR_BED_IS_DUMMY 1 - #endif -#else - #undef BED_MINTEMP - #undef BED_MAXTEMP -#endif - -#if TEMP_SENSOR_CHAMBER == -4 - #define TEMP_SENSOR_CHAMBER_IS_AD8495 1 -#elif TEMP_SENSOR_CHAMBER == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_CHAMBER." -#elif TEMP_SENSOR_CHAMBER == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER." -#elif TEMP_SENSOR_CHAMBER == -1 - #define TEMP_SENSOR_CHAMBER_IS_AD595 1 -#elif TEMP_SENSOR_CHAMBER > 0 - #define TEMP_SENSOR_CHAMBER_IS_THERMISTOR 1 - #if TEMP_SENSOR_CHAMBER == 1000 - #define TEMP_SENSOR_CHAMBER_IS_CUSTOM 1 - #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999 - #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1 - #endif -#else - #undef CHAMBER_MINTEMP - #undef CHAMBER_MAXTEMP -#endif - -#if TEMP_SENSOR_COOLER == -4 - #define TEMP_SENSOR_COOLER_IS_AD8495 1 -#elif TEMP_SENSOR_COOLER == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_COOLER." -#elif TEMP_SENSOR_COOLER == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_COOLER." -#elif TEMP_SENSOR_COOLER == -1 - #define TEMP_SENSOR_COOLER_IS_AD595 1 -#elif TEMP_SENSOR_COOLER > 0 - #define TEMP_SENSOR_COOLER_IS_THERMISTOR 1 - #if TEMP_SENSOR_COOLER == 1000 - #define TEMP_SENSOR_COOLER_IS_CUSTOM 1 - #elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999 - #define TEMP_SENSOR_COOLER_IS_DUMMY 1 - #endif -#else - #undef COOLER_MINTEMP - #undef COOLER_MAXTEMP -#endif - -#if TEMP_SENSOR_PROBE == -4 - #define TEMP_SENSOR_PROBE_IS_AD8495 1 -#elif TEMP_SENSOR_PROBE == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_PROBE." -#elif TEMP_SENSOR_PROBE == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_PROBE." -#elif TEMP_SENSOR_PROBE == -1 - #define TEMP_SENSOR_PROBE_IS_AD595 1 -#elif TEMP_SENSOR_PROBE > 0 - #define TEMP_SENSOR_PROBE_IS_THERMISTOR 1 - #if TEMP_SENSOR_PROBE == 1000 - #define TEMP_SENSOR_PROBE_IS_CUSTOM 1 - #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999 - #define TEMP_SENSOR_PROBE_IS_DUMMY 1 - #endif -#endif - -#if TEMP_SENSOR_BOARD == -4 - #define TEMP_SENSOR_BOARD_IS_AD8495 1 -#elif TEMP_SENSOR_BOARD == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BOARD." -#elif TEMP_SENSOR_BOARD == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BOARD." -#elif TEMP_SENSOR_BOARD == -1 - #define TEMP_SENSOR_BOARD_IS_AD595 1 -#elif TEMP_SENSOR_BOARD > 0 - #define TEMP_SENSOR_BOARD_IS_THERMISTOR 1 - #if TEMP_SENSOR_BOARD == 1000 - #define TEMP_SENSOR_BOARD_IS_CUSTOM 1 - #elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999 - #define TEMP_SENSOR_BOARD_IS_DUMMY 1 - #endif -#endif - /** * X_DUAL_ENDSTOPS endstop reassignment */ From 4ac32b1993972f7b557378e6700e98c4f2d3d17a Mon Sep 17 00:00:00 2001 From: mks-viva <1224833100@qq.com> Date: Tue, 13 Jul 2021 19:14:34 -0500 Subject: [PATCH 063/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Robin=20Nano=20V3?= =?UTF-8?q?=20X=5FDIAG=5FPIN=20(#22340)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 7de5552dbba8..ac93580589ab 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -59,7 +59,7 @@ // // Limit Switches // -#define X_DIAG_PIN PD15 +#define X_DIAG_PIN PA15 #define Y_DIAG_PIN PD2 #define Z_DIAG_PIN PC8 #define E0_DIAG_PIN PC4 From 88dad3a1645f6de0151659494e0ba6ccebbf1526 Mon Sep 17 00:00:00 2001 From: ellensp Date: Wed, 14 Jul 2021 12:32:21 +1200 Subject: [PATCH 064/323] =?UTF-8?q?=F0=9F=90=9B=20Define=20MT=5FDET=5FPIN?= =?UTF-8?q?=5FINVERTING=20for=20MKS=5FROBIN=5FNANO=5FV3=20(#22348)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index ac93580589ab..141c6d4a76fb 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -180,6 +180,7 @@ // #define MT_DET_1_PIN PA4 #define MT_DET_2_PIN PE6 +#define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE #define PW_DET PA13 #define PW_OFF PB2 From 9a0d4d666f85e484d850a48d989d379d58c59781 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 14 Jul 2021 00:54:43 +0000 Subject: [PATCH 065/323] [cron] Bump distribution date (2021-07-14) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 5cfb8c0a0755..a218af3d3dda 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-13" +//#define STRING_DISTRIBUTION_DATE "2021-07-14" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2834d3888bfe..3db502c4709b 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-13" + #define STRING_DISTRIBUTION_DATE "2021-07-14" #endif /** From 65cfbc074104c6b1ae4ef58251e516e3c4bad659 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Wed, 14 Jul 2021 02:34:18 -0300 Subject: [PATCH 066/323] =?UTF-8?q?=E2=9C=A8=20MSC=20Support=20for=20STM32?= =?UTF-8?q?=20+=20SDIO=20boards=20->=20SKR=202=20(#22354)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp | 507 +++++++++--------- Marlin/src/HAL/STM32/msc_sd.cpp | 2 +- Marlin/src/HAL/STM32F1/sdio.cpp | 4 + Marlin/src/pins/pins.h | 4 +- Marlin/src/sd/Sd2Card_sdio.h | 20 +- ini/stm32f4.ini | 10 + 6 files changed, 271 insertions(+), 276 deletions(-) diff --git a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp index 2ba0359cac69..05f859a4af5c 100644 --- a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp +++ b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp @@ -28,319 +28,296 @@ #include #include -#if NONE(STM32F103xE, STM32F103xG, STM32F4xx, STM32F7xx) - #error "ERROR - Only STM32F103xE, STM32F103xG, STM32F4xx or STM32F7xx CPUs supported" +// use local drivers +#if defined(STM32F103xE) || defined(STM32F103xG) + #include + #include +#elif defined(STM32F4xx) + #include + #include + #include + #include +#elif defined(STM32F7xx) + #include + #include + #include + #include +#else + #error "SDIO only supported with STM32F103xE, STM32F103xG, STM32F4xx, or STM32F7xx." #endif -#if HAS_SD_HOST_DRIVE - - // use USB drivers - - extern "C" { - int8_t SD_MSC_Read(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len); - int8_t SD_MSC_Write(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len); - extern SD_HandleTypeDef hsd; - } +// Fixed +#define SDIO_D0_PIN PC8 +#define SDIO_D1_PIN PC9 +#define SDIO_D2_PIN PC10 +#define SDIO_D3_PIN PC11 +#define SDIO_CK_PIN PC12 +#define SDIO_CMD_PIN PD2 + +SD_HandleTypeDef hsd; // create SDIO structure +// F4 supports one DMA for RX and another for TX, but Marlin will never +// do read and write at same time, so we use the same DMA for both. +DMA_HandleTypeDef hdma_sdio; + +/* + SDIO_INIT_CLK_DIV is 118 + SDIO clock frequency is 48MHz / (TRANSFER_CLOCK_DIV + 2) + SDIO init clock frequency should not exceed 400KHz = 48MHz / (118 + 2) + + Default TRANSFER_CLOCK_DIV is 2 (118 / 40) + Default SDIO clock frequency is 48MHz / (2 + 2) = 12 MHz + This might be too fast for stable SDIO operations + + MKS Robin board seems to have stable SDIO with BusWide 1bit and ClockDiv 8 i.e. 4.8MHz SDIO clock frequency + Additional testing is required as there are clearly some 4bit initialization problems +*/ + +#ifndef USBD_OK + #define USBD_OK 0 +#endif - bool SDIO_Init() { - return hsd.State == HAL_SD_STATE_READY; // return pass/fail status - } +// Target Clock, configurable. Default is 18MHz, from STM32F1 +#ifndef SDIO_CLOCK + #define SDIO_CLOCK 18000000 // 18 MHz +#endif - bool SDIO_ReadBlock(uint32_t block, uint8_t *src) { - int8_t status = SD_MSC_Read(0, (uint8_t*)src, block, 1); // read one 512 byte block - return (bool) status; - } +// SDIO retries, configurable. Default is 3, from STM32F1 +#ifndef SDIO_READ_RETRIES + #define SDIO_READ_RETRIES 3 +#endif - bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { - int8_t status = SD_MSC_Write(0, (uint8_t*)src, block, 1); // write one 512 byte block - return (bool) status; - } +// SDIO Max Clock (naming from STM Manual, don't change) +#define SDIOCLK 48000000 + +static uint32_t clock_to_divider(uint32_t clk) { + // limit the SDIO master clock to 8/3 of PCLK2. See STM32 Manuals + // Also limited to no more than 48Mhz (SDIOCLK). + const uint32_t pclk2 = HAL_RCC_GetPCLK2Freq(); + clk = min(clk, (uint32_t)(pclk2 * 8 / 3)); + clk = min(clk, (uint32_t)SDIOCLK); + // Round up divider, so we don't run the card over the speed supported, + // and subtract by 2, because STM32 will add 2, as written in the manual: + // SDIO_CK frequency = SDIOCLK / [CLKDIV + 2] + return pclk2 / clk + (pclk2 % clk != 0) - 2; +} + +void go_to_transfer_speed() { + /* Default SDIO peripheral configuration for SD card initialization */ + hsd.Init.ClockEdge = hsd.Init.ClockEdge; + hsd.Init.ClockBypass = hsd.Init.ClockBypass; + hsd.Init.ClockPowerSave = hsd.Init.ClockPowerSave; + hsd.Init.BusWide = hsd.Init.BusWide; + hsd.Init.HardwareFlowControl = hsd.Init.HardwareFlowControl; + hsd.Init.ClockDiv = clock_to_divider(SDIO_CLOCK); + + /* Initialize SDIO peripheral interface with default configuration */ + SDIO_Init(hsd.Instance, hsd.Init); +} + +void SD_LowLevel_Init(void) { + uint32_t tempreg; + + __HAL_RCC_GPIOC_CLK_ENABLE(); //enable GPIO clocks + __HAL_RCC_GPIOD_CLK_ENABLE(); //enable GPIO clocks + + GPIO_InitTypeDef GPIO_InitStruct; + + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = 1; //GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + + #if DISABLED(STM32F1xx) + GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; + #endif -#else // !USBD_USE_CDC_COMPOSITE + GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_12; // D0 & SCK + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - // use local drivers - #if defined(STM32F103xE) || defined(STM32F103xG) - #include - #include - #elif defined(STM32F4xx) - #include - #include - #include - #include - #elif defined(STM32F7xx) - #include - #include - #include - #include - #else - #error "ERROR - Only STM32F103xE, STM32F103xG, STM32F4xx or STM32F7xx CPUs supported" + #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // define D1-D3 only if have a four bit wide SDIO bus + GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11; // D1-D3 + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); #endif - // Fixed - #define SDIO_D0_PIN PC8 - #define SDIO_D1_PIN PC9 - #define SDIO_D2_PIN PC10 - #define SDIO_D3_PIN PC11 - #define SDIO_CK_PIN PC12 - #define SDIO_CMD_PIN PD2 - - SD_HandleTypeDef hsd; // create SDIO structure - // F4 supports one DMA for RX and another for TX, but Marlin will never - // do read and write at same time, so we use the same DMA for both. - DMA_HandleTypeDef hdma_sdio; - - /* - SDIO_INIT_CLK_DIV is 118 - SDIO clock frequency is 48MHz / (TRANSFER_CLOCK_DIV + 2) - SDIO init clock frequency should not exceed 400KHz = 48MHz / (118 + 2) - - Default TRANSFER_CLOCK_DIV is 2 (118 / 40) - Default SDIO clock frequency is 48MHz / (2 + 2) = 12 MHz - This might be too fast for stable SDIO operations - - MKS Robin board seems to have stable SDIO with BusWide 1bit and ClockDiv 8 i.e. 4.8MHz SDIO clock frequency - Additional testing is required as there are clearly some 4bit initialization problems - */ - - #ifndef USBD_OK - #define USBD_OK 0 - #endif + // Configure PD.02 CMD line + GPIO_InitStruct.Pin = GPIO_PIN_2; + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - // Target Clock, configurable. Default is 18MHz, from STM32F1 - #ifndef SDIO_CLOCK - #define SDIO_CLOCK 18000000 // 18 MHz + // Setup DMA + #if defined(STM32F1xx) + hdma_sdio.Init.Mode = DMA_NORMAL; + hdma_sdio.Instance = DMA2_Channel4; + HAL_NVIC_EnableIRQ(DMA2_Channel4_5_IRQn); + #elif defined(STM32F4xx) + hdma_sdio.Init.Mode = DMA_PFCTRL; + hdma_sdio.Instance = DMA2_Stream3; + hdma_sdio.Init.Channel = DMA_CHANNEL_4; + hdma_sdio.Init.FIFOMode = DMA_FIFOMODE_ENABLE; + hdma_sdio.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; + hdma_sdio.Init.MemBurst = DMA_MBURST_INC4; + hdma_sdio.Init.PeriphBurst = DMA_PBURST_INC4; + HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn); #endif + HAL_NVIC_EnableIRQ(SDIO_IRQn); + hdma_sdio.Init.PeriphInc = DMA_PINC_DISABLE; + hdma_sdio.Init.MemInc = DMA_MINC_ENABLE; + hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; + hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; + hdma_sdio.Init.Priority = DMA_PRIORITY_LOW; + __HAL_LINKDMA(&hsd, hdmarx, hdma_sdio); + __HAL_LINKDMA(&hsd, hdmatx, hdma_sdio); - // SDIO retries, configurable. Default is 3, from STM32F1 - #ifndef SDIO_READ_RETRIES - #define SDIO_READ_RETRIES 3 + #if defined(STM32F1xx) + __HAL_RCC_SDIO_CLK_ENABLE(); + __HAL_RCC_DMA2_CLK_ENABLE(); + #else + __HAL_RCC_SDIO_FORCE_RESET(); + delay(2); + __HAL_RCC_SDIO_RELEASE_RESET(); + delay(2); + __HAL_RCC_SDIO_CLK_ENABLE(); + + __HAL_RCC_DMA2_FORCE_RESET(); + delay(2); + __HAL_RCC_DMA2_RELEASE_RESET(); + delay(2); + __HAL_RCC_DMA2_CLK_ENABLE(); #endif - // SDIO Max Clock (naming from STM Manual, don't change) - #define SDIOCLK 48000000 - - static uint32_t clock_to_divider(uint32_t clk) { - // limit the SDIO master clock to 8/3 of PCLK2. See STM32 Manuals - // Also limited to no more than 48Mhz (SDIOCLK). - const uint32_t pclk2 = HAL_RCC_GetPCLK2Freq(); - clk = min(clk, (uint32_t)(pclk2 * 8 / 3)); - clk = min(clk, (uint32_t)SDIOCLK); - // Round up divider, so we don't run the card over the speed supported, - // and subtract by 2, because STM32 will add 2, as written in the manual: - // SDIO_CK frequency = SDIOCLK / [CLKDIV + 2] - return pclk2 / clk + (pclk2 % clk != 0) - 2; - } - - void go_to_transfer_speed() { - /* Default SDIO peripheral configuration for SD card initialization */ - hsd.Init.ClockEdge = hsd.Init.ClockEdge; - hsd.Init.ClockBypass = hsd.Init.ClockBypass; - hsd.Init.ClockPowerSave = hsd.Init.ClockPowerSave; - hsd.Init.BusWide = hsd.Init.BusWide; - hsd.Init.HardwareFlowControl = hsd.Init.HardwareFlowControl; - hsd.Init.ClockDiv = clock_to_divider(SDIO_CLOCK); - - /* Initialize SDIO peripheral interface with default configuration */ - SDIO_Init(hsd.Instance, hsd.Init); - } - - void SD_LowLevel_Init(void) { - uint32_t tempreg; + //Initialize the SDIO (with initial <400Khz Clock) + tempreg = 0; //Reset value + tempreg |= SDIO_CLKCR_CLKEN; // Clock enabled + tempreg |= SDIO_INIT_CLK_DIV; // Clock Divider. Clock = 48000 / (118 + 2) = 400Khz + // Keep the rest at 0 => HW_Flow Disabled, Rising Clock Edge, Disable CLK ByPass, Bus Width = 0, Power save Disable + SDIO->CLKCR = tempreg; - __HAL_RCC_GPIOC_CLK_ENABLE(); //enable GPIO clocks - __HAL_RCC_GPIOD_CLK_ENABLE(); //enable GPIO clocks + // Power up the SDIO + SDIO_PowerState_ON(SDIO); + hsd.Instance = SDIO; +} - GPIO_InitTypeDef GPIO_InitStruct; +void HAL_SD_MspInit(SD_HandleTypeDef *hsd) { // application specific init + UNUSED(hsd); // Prevent unused argument(s) compilation warning + __HAL_RCC_SDIO_CLK_ENABLE(); // turn on SDIO clock +} - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = 1; //GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; +bool SDIO_Init() { + uint8_t retryCnt = SDIO_READ_RETRIES; - #if DISABLED(STM32F1xx) - GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; - #endif + bool status; + hsd.Instance = SDIO; + hsd.State = HAL_SD_STATE_RESET; - GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_12; // D0 & SCK - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + SD_LowLevel_Init(); - #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // define D1-D3 only if have a four bit wide SDIO bus - GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11; // D1-D3 - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - #endif - - // Configure PD.02 CMD line - GPIO_InitStruct.Pin = GPIO_PIN_2; - HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - - // Setup DMA - #if defined(STM32F1xx) - hdma_sdio.Init.Mode = DMA_NORMAL; - hdma_sdio.Instance = DMA2_Channel4; - HAL_NVIC_EnableIRQ(DMA2_Channel4_5_IRQn); - #elif defined(STM32F4xx) - hdma_sdio.Init.Mode = DMA_PFCTRL; - hdma_sdio.Instance = DMA2_Stream3; - hdma_sdio.Init.Channel = DMA_CHANNEL_4; - hdma_sdio.Init.FIFOMode = DMA_FIFOMODE_ENABLE; - hdma_sdio.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; - hdma_sdio.Init.MemBurst = DMA_MBURST_INC4; - hdma_sdio.Init.PeriphBurst = DMA_PBURST_INC4; - HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn); - #endif - HAL_NVIC_EnableIRQ(SDIO_IRQn); - hdma_sdio.Init.PeriphInc = DMA_PINC_DISABLE; - hdma_sdio.Init.MemInc = DMA_MINC_ENABLE; - hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; - hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; - hdma_sdio.Init.Priority = DMA_PRIORITY_LOW; - __HAL_LINKDMA(&hsd, hdmarx, hdma_sdio); - __HAL_LINKDMA(&hsd, hdmatx, hdma_sdio); - - #if defined(STM32F1xx) - __HAL_RCC_SDIO_CLK_ENABLE(); - __HAL_RCC_DMA2_CLK_ENABLE(); - #else - __HAL_RCC_SDIO_FORCE_RESET(); - delay(2); - __HAL_RCC_SDIO_RELEASE_RESET(); - delay(2); - __HAL_RCC_SDIO_CLK_ENABLE(); - - __HAL_RCC_DMA2_FORCE_RESET(); - delay(2); - __HAL_RCC_DMA2_RELEASE_RESET(); - delay(2); - __HAL_RCC_DMA2_CLK_ENABLE(); - #endif - - //Initialize the SDIO (with initial <400Khz Clock) - tempreg = 0; //Reset value - tempreg |= SDIO_CLKCR_CLKEN; // Clock enabled - tempreg |= SDIO_INIT_CLK_DIV; // Clock Divider. Clock = 48000 / (118 + 2) = 400Khz - // Keep the rest at 0 => HW_Flow Disabled, Rising Clock Edge, Disable CLK ByPass, Bus Width = 0, Power save Disable - SDIO->CLKCR = tempreg; - - // Power up the SDIO - SDIO_PowerState_ON(SDIO); - hsd.Instance = SDIO; - } - - void HAL_SD_MspInit(SD_HandleTypeDef *hsd) { // application specific init - UNUSED(hsd); // Prevent unused argument(s) compilation warning - __HAL_RCC_SDIO_CLK_ENABLE(); // turn on SDIO clock + uint8_t retry_Cnt = retryCnt; + for (;;) { + TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); + status = (bool) HAL_SD_Init(&hsd); + if (!status) break; + if (!--retry_Cnt) return false; // return failing status if retries are exhausted } - bool SDIO_Init() { - uint8_t retryCnt = SDIO_READ_RETRIES; - - bool status; - hsd.Instance = SDIO; - hsd.State = HAL_SD_STATE_RESET; + go_to_transfer_speed(); - SD_LowLevel_Init(); - - uint8_t retry_Cnt = retryCnt; + #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // go to 4 bit wide mode if pins are defined + retry_Cnt = retryCnt; for (;;) { TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - status = (bool) HAL_SD_Init(&hsd); - if (!status) break; - if (!--retry_Cnt) return false; // return failing status if retries are exhausted + if (!HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B)) break; // some cards are only 1 bit wide so a pass here is not required + if (!--retry_Cnt) break; } - - go_to_transfer_speed(); - - #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // go to 4 bit wide mode if pins are defined + if (!retry_Cnt) { // wide bus failed, go back to one bit wide mode + hsd.State = (HAL_SD_StateTypeDef) 0; // HAL_SD_STATE_RESET + SD_LowLevel_Init(); retry_Cnt = retryCnt; for (;;) { TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - if (!HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B)) break; // some cards are only 1 bit wide so a pass here is not required - if (!--retry_Cnt) break; + status = (bool) HAL_SD_Init(&hsd); + if (!status) break; + if (!--retry_Cnt) return false; // return failing status if retries are exhausted } - if (!retry_Cnt) { // wide bus failed, go back to one bit wide mode - hsd.State = (HAL_SD_StateTypeDef) 0; // HAL_SD_STATE_RESET - SD_LowLevel_Init(); - retry_Cnt = retryCnt; - for (;;) { - TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - status = (bool) HAL_SD_Init(&hsd); - if (!status) break; - if (!--retry_Cnt) return false; // return failing status if retries are exhausted - } - go_to_transfer_speed(); - } - #endif + go_to_transfer_speed(); + } + #endif - return true; - } + return true; +} - static bool SDIO_ReadWriteBlock_DMA(uint32_t block, const uint8_t *src, uint8_t *dst) { - if (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) return false; +static bool SDIO_ReadWriteBlock_DMA(uint32_t block, const uint8_t *src, uint8_t *dst) { + if (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) return false; - TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); + TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - HAL_StatusTypeDef ret; - if (src) { - hdma_sdio.Init.Direction = DMA_MEMORY_TO_PERIPH; - HAL_DMA_Init(&hdma_sdio); - ret = HAL_SD_WriteBlocks_DMA(&hsd, (uint8_t *)src, block, 1); - } - else { - hdma_sdio.Init.Direction = DMA_PERIPH_TO_MEMORY; - HAL_DMA_Init(&hdma_sdio); - ret = HAL_SD_ReadBlocks_DMA(&hsd, (uint8_t *)dst, block, 1); - } + HAL_StatusTypeDef ret; + if (src) { + hdma_sdio.Init.Direction = DMA_MEMORY_TO_PERIPH; + HAL_DMA_Init(&hdma_sdio); + ret = HAL_SD_WriteBlocks_DMA(&hsd, (uint8_t *)src, block, 1); + } + else { + hdma_sdio.Init.Direction = DMA_PERIPH_TO_MEMORY; + HAL_DMA_Init(&hdma_sdio); + ret = HAL_SD_ReadBlocks_DMA(&hsd, (uint8_t *)dst, block, 1); + } - if (ret != HAL_OK) { + if (ret != HAL_OK) { + HAL_DMA_Abort_IT(&hdma_sdio); + HAL_DMA_DeInit(&hdma_sdio); + return false; + } + + millis_t timeout = millis() + 500; + // Wait the transfer + while (hsd.State != HAL_SD_STATE_READY) { + if (ELAPSED(millis(), timeout)) { HAL_DMA_Abort_IT(&hdma_sdio); HAL_DMA_DeInit(&hdma_sdio); return false; } + } - millis_t timeout = millis() + 500; - // Wait the transfer - while (hsd.State != HAL_SD_STATE_READY) { - if (ELAPSED(millis(), timeout)) { - HAL_DMA_Abort_IT(&hdma_sdio); - HAL_DMA_DeInit(&hdma_sdio); - return false; - } - } + while (__HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TC_FLAG_INDEX(&hdma_sdio)) != 0 + || __HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TE_FLAG_INDEX(&hdma_sdio)) != 0) { /* nada */ } - while (__HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TC_FLAG_INDEX(&hdma_sdio)) != 0 - || __HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TE_FLAG_INDEX(&hdma_sdio)) != 0) { /* nada */ } + HAL_DMA_Abort_IT(&hdma_sdio); + HAL_DMA_DeInit(&hdma_sdio); - HAL_DMA_Abort_IT(&hdma_sdio); - HAL_DMA_DeInit(&hdma_sdio); + timeout = millis() + 500; + while (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) if (ELAPSED(millis(), timeout)) return false; - timeout = millis() + 500; - while (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) if (ELAPSED(millis(), timeout)) return false; + return true; +} - return true; - } +bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) { + uint8_t retries = SDIO_READ_RETRIES; + while (retries--) if (SDIO_ReadWriteBlock_DMA(block, NULL, dst)) return true; + return false; +} - bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) { - uint8_t retries = SDIO_READ_RETRIES; - while (retries--) if (SDIO_ReadWriteBlock_DMA(block, NULL, dst)) return true; - return false; - } +bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { + uint8_t retries = SDIO_READ_RETRIES; + while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, NULL)) return true; + return false; +} - bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { - uint8_t retries = SDIO_READ_RETRIES; - while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, NULL)) return true; - return false; - } +bool SDIO_IsReady() { + return hsd.State == HAL_SD_STATE_READY; +} - #if defined(STM32F1xx) - #define DMA_IRQ_HANDLER DMA2_Channel4_5_IRQHandler - #elif defined(STM32F4xx) - #define DMA_IRQ_HANDLER DMA2_Stream3_IRQHandler - #else - #error "Unknown STM32 architecture." - #endif +uint32_t SDIO_GetCardSize() { + return (uint32_t)(hsd.SdCard.BlockNbr) * (hsd.SdCard.BlockSize); +} + +#if defined(STM32F1xx) + #define DMA_IRQ_HANDLER DMA2_Channel4_5_IRQHandler +#elif defined(STM32F4xx) + #define DMA_IRQ_HANDLER DMA2_Stream3_IRQHandler +#else + #error "Unknown STM32 architecture." +#endif - extern "C" void SDIO_IRQHandler(void) { HAL_SD_IRQHandler(&hsd); } - extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); } +extern "C" void SDIO_IRQHandler(void) { HAL_SD_IRQHandler(&hsd); } +extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); } -#endif // !USBD_USE_CDC_COMPOSITE #endif // SDIO_SUPPORT #endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 diff --git a/Marlin/src/HAL/STM32/msc_sd.cpp b/Marlin/src/HAL/STM32/msc_sd.cpp index 98f75d89f041..70a719d665ca 100644 --- a/Marlin/src/HAL/STM32/msc_sd.cpp +++ b/Marlin/src/HAL/STM32/msc_sd.cpp @@ -19,10 +19,10 @@ #if HAS_SD_HOST_DRIVE +#include "../shared/Marduino.h" #include "msc_sd.h" #include "usbd_core.h" -#include "../shared/Marduino.h" #include "../../sd/cardreader.h" #include diff --git a/Marlin/src/HAL/STM32F1/sdio.cpp b/Marlin/src/HAL/STM32F1/sdio.cpp index ffa6db1206ae..6e41d2cbf1b4 100644 --- a/Marlin/src/HAL/STM32F1/sdio.cpp +++ b/Marlin/src/HAL/STM32F1/sdio.cpp @@ -184,6 +184,10 @@ bool SDIO_WriteBlock(uint32_t blockAddress, const uint8_t *data) { inline uint32_t SDIO_GetCardState() { return SDIO_CmdSendStatus(SdCard.RelCardAdd << 16U) ? (SDIO_GetResponse(SDIO_RESP1) >> 9U) & 0x0FU : SDIO_CARD_ERROR; } +// No F1 board with SDIO + MSC using Maple, that I aware of... +bool SDIO_IsReady() { return true; } +uint32_t SDIO_GetCardSize() { return 0; } + // ------------------------ // SD Commands and Responses // ------------------------ diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 1f53227553c4..b9a5f19d7c91 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -594,9 +594,9 @@ #elif MB(BTT_E3_RRF) #include "stm32f4/pins_BTT_E3_RRF.h" // STM32F4 env:BIGTREE_E3_RRF #elif MB(BTT_SKR_V2_0_REV_A) - #include "stm32f4/pins_BTT_SKR_V2_0_REV_A.h" // STM32F4 env:BIGTREE_SKR_2 + #include "stm32f4/pins_BTT_SKR_V2_0_REV_A.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB #elif MB(BTT_SKR_V2_0_REV_B) - #include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2 + #include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB #elif MB(BTT_OCTOPUS_V1_0) #include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB #elif MB(BTT_OCTOPUS_V1_1) diff --git a/Marlin/src/sd/Sd2Card_sdio.h b/Marlin/src/sd/Sd2Card_sdio.h index 158034480597..cc29f5d46d3c 100644 --- a/Marlin/src/sd/Sd2Card_sdio.h +++ b/Marlin/src/sd/Sd2Card_sdio.h @@ -29,6 +29,8 @@ bool SDIO_Init(); bool SDIO_ReadBlock(uint32_t block, uint8_t *dst); bool SDIO_WriteBlock(uint32_t block, const uint8_t *src); +bool SDIO_IsReady(); +uint32_t SDIO_GetCardSize(); class DiskIODriver_SDIO : public DiskIODriver { public: @@ -36,20 +38,22 @@ class DiskIODriver_SDIO : public DiskIODriver { bool readCSD(csd_t *csd) override { return false; } - bool readStart(const uint32_t block) override { return false; } - bool readData(uint8_t *dst) override { return false; } - bool readStop() override { return false; } + bool readStart(const uint32_t block) override { curBlock = block; return true; } + bool readData(uint8_t *dst) override { return readBlock(curBlock++, dst); } + bool readStop() override { curBlock = -1; return true; } - bool writeStart(const uint32_t block, const uint32_t) override { return false; } - bool writeData(const uint8_t *src) override { return false; } - bool writeStop() override { return false; } + bool writeStart(const uint32_t block, const uint32_t) override { curBlock = block; return true; } + bool writeData(const uint8_t *src) override { return writeBlock(curBlock++, src); } + bool writeStop() override { curBlock = -1; return true; } bool readBlock(uint32_t block, uint8_t *dst) override { return SDIO_ReadBlock(block, dst); } bool writeBlock(uint32_t block, const uint8_t *src) override { return SDIO_WriteBlock(block, src); } - uint32_t cardSize() override { return 0; } + uint32_t cardSize() override { return SDIO_GetCardSize(); } - bool isReady() override { return true; } + bool isReady() override { return SDIO_IsReady(); } void idle() override {} + private: + uint32_t curBlock; }; diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 6067bbc3b82b..ced410624f93 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -243,6 +243,16 @@ build_flags = ${stm_flash_drive.build_flags} -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED +# +# BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support +# +[env:BIGTREE_SKR_2_USB] +platform = ${common_stm32.platform} +extends = env:BIGTREE_SKR_2 +platform_packages = ${stm_flash_drive.platform_packages} +build_unflags = -DUSBD_USE_CDC +build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC + # # BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4) # From f479a2ef6f8335e7952ac099cb1b8336aa0a3c34 Mon Sep 17 00:00:00 2001 From: ellensp Date: Wed, 14 Jul 2021 18:57:26 +1200 Subject: [PATCH 067/323] =?UTF-8?q?=E2=9C=A8=20FLY=20Mini=20for=20stm32dui?= =?UTF-8?q?no=20(#22356)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/pins.h | 2 +- ini/stm32f1.ini | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index b9a5f19d7c91..20f24f8c218d 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -552,7 +552,7 @@ #elif MB(TRIGORILLA_PRO) #include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro #elif MB(FLY_MINI) - #include "stm32f1/pins_FLY_MINI.h" // STM32F1 env:FLY_MINI + #include "stm32f1/pins_FLY_MINI.h" // STM32F1 env:FLY_MINI env:FLY_MINI_maple #elif MB(FLSUN_HISPEED) #include "stm32f1/pins_FLSUN_HISPEED.h" // STM32F1 env:flsun_hispeedv1 #elif MB(BEAST) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 6c39d0b6fa42..93e97654a421 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -259,3 +259,19 @@ board = malyanm200_f103cb build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED src_filter = ${common.default_src_filter} + + +# +# FLY Mini (STM32F103RCT6) +# +[env:FLY_MINI] +platform = ${common_stm32.platform} +extends = common_stm32 +build_flags = ${common_stm32.build_flags} -DSS_TIMER=4 +board = genericSTM32F103RC +board_build.core = stm32 +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x5000 +board_upload.offset_address = 0x08005000 +extra_scripts = ${common_stm32.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py + buildroot/share/PlatformIO/scripts/stm32_bootloader.py From 7f5c9d273e7564dd18109772fe6cb45b4716eeb7 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 14 Jul 2021 00:03:24 -0700 Subject: [PATCH 068/323] =?UTF-8?q?=F0=9F=92=A1=20Update=20FLYmaker=20comm?= =?UTF-8?q?ents,=20URL=20(#22355)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 6 +++--- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 2 +- ini/stm32f1.ini | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 9dc951e229c6..661a213b4bcd 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -249,7 +249,7 @@ #define BOARD_BTT_SKR_V1_4_TURBO 2508 // BigTreeTech SKR v1.4 TURBO (Power outputs: Hotend0, Hotend1, Fan, Bed) #define BOARD_MKS_SGEN_L_V2 2509 // MKS SGEN_L V2 (Power outputs: Hotend0, Hotend1, Bed, Fan) #define BOARD_BTT_SKR_E3_TURBO 2510 // BigTreeTech SKR E3 Turbo (Power outputs: Hotend0, Hotend1, Bed, Fan0, Fan1) -#define BOARD_FLY_CDY 2511 // FLY_CDY (Power outputs: Hotend0, Hotend1, Hotend2, Bed, Fan0, Fan1, Fan2) +#define BOARD_FLY_CDY 2511 // FLYmaker FLY CDY (Power outputs: Hotend0, Hotend1, Hotend2, Bed, Fan0, Fan1, Fan2) // // SAM3X8E ARM Cortex M3 @@ -340,7 +340,7 @@ #define BOARD_CREALITY_V452 4042 // Creality v4.5.2 (STM32F103RE) #define BOARD_CREALITY_V453 4043 // Creality v4.5.3 (STM32F103RE) #define BOARD_TRIGORILLA_PRO 4044 // Trigorilla Pro (STM32F103ZET6) -#define BOARD_FLY_MINI 4045 // FLY MINI (STM32F103RCT6) +#define BOARD_FLY_MINI 4045 // FLYmaker FLY MINI (STM32F103RCT6) #define BOARD_FLSUN_HISPEED 4046 // FLSUN HiSpeedV1 (STM32F103VET6) #define BOARD_BEAST 4047 // STM32F103RET6 Libmaple-based controller #define BOARD_MINGDA_MPX_ARM_MINI 4048 // STM32F103ZET6 Mingda MD-16 @@ -380,7 +380,7 @@ #define BOARD_FYSETC_S6 4220 // FYSETC S6 (STM32F446VET6) #define BOARD_FYSETC_S6_V2_0 4221 // FYSETC S6 v2.0 (STM32F446VET6) #define BOARD_FYSETC_SPIDER 4222 // FYSETC Spider (STM32F446VET6) -#define BOARD_FLYF407ZG 4223 // FLYF407ZG (STM32F407ZG) +#define BOARD_FLYF407ZG 4223 // FLYmaker FLYF407ZG (STM32F407ZG) #define BOARD_MKS_ROBIN2 4224 // MKS_ROBIN2 (STM32F407ZE) #define BOARD_MKS_ROBIN_PRO_V2 4225 // MKS Robin Pro V2 (STM32F407VE) #define BOARD_MKS_ROBIN_NANO_V3 4226 // MKS Robin Nano V3 (STM32F407VG) diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index b94ec0c7f35e..be0a622b1d71 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -24,7 +24,7 @@ #include "env_validate.h" #define BOARD_INFO_NAME "FLY_MINI" -#define BOARD_WEBSITE_URL "github.com/FLYmaker" +#define BOARD_WEBSITE_URL "github.com/FLYmaker/FLY-MINI" #define DISABLE_JTAG // diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 93e97654a421..f1afb0e4d70f 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -271,7 +271,7 @@ board = genericSTM32F103RC board_build.core = stm32 board_build.variant = MARLIN_F103Rx board_build.offset = 0x5000 -board_upload.offset_address = 0x08005000 +board_upload.offset_address = 0x08005000 extra_scripts = ${common_stm32.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py From 082c61ebb99454acbb3ac8cca3485b24f177de0e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Jul 2021 02:14:55 -0500 Subject: [PATCH 069/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20SD=20pins=20for=20?= =?UTF-8?q?MKS=20Robin=20Lite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index fad36e838480..73c77d092a0e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -143,6 +143,6 @@ // #define SPI_DEVICE 2 #define SD_SCK_PIN PB13 -#define SD_MISO_PIN P1B4 -#define SD_MOSI_PIN P1B5 +#define SD_MISO_PIN PB14 +#define SD_MOSI_PIN PB15 #define SD_SS_PIN PA15 From 826a34b0b156e27994c787071bbed519db3bcfa1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Jul 2021 02:21:26 -0500 Subject: [PATCH 070/323] =?UTF-8?q?=F0=9F=8E=A8=20Remove=20extraneous=20pi?= =?UTF-8?q?n=20defs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 141c6d4a76fb..178e75ab7f65 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -181,8 +181,6 @@ #define MT_DET_1_PIN PA4 #define MT_DET_2_PIN PE6 #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE -#define PW_DET PA13 -#define PW_OFF PB2 #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN MT_DET_1_PIN @@ -192,9 +190,9 @@ #endif #ifndef POWER_LOSS_PIN - #define POWER_LOSS_PIN PW_DET + #define POWER_LOSS_PIN PA13 // PW_DET #endif -#define PS_ON_PIN PW_OFF +#define PS_ON_PIN PB2 // PW_OFF // // Enable MKSPWC support From a13d90093d8e647fa9ecab7a7752009dcc9c55ae Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 14 Jul 2021 15:55:24 -0700 Subject: [PATCH 071/323] =?UTF-8?q?=F0=9F=A9=B9=20FLYmaker=20FLY=20Mini=20?= =?UTF-8?q?followup=20(#22364)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #22355, #22356. --- ini/stm32f1-maple.ini | 14 ++++++++++++++ ini/stm32f1.ini | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index db1cc99217c1..ab1e6c54f41c 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -342,3 +342,17 @@ build_unflags = ${common_stm32f1.build_unflags} platform = ${common_stm32f1.platform} extends = env:chitu_f103 build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX + +# +# FLYmaker FLY Mini (STM32F103RCT6) +# +[env:FLY_MINI_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103RC +board_build.address = 0x08005000 +board_build.ldscript = fly_mini.ld +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py +build_flags = ${common_stm32f1.build_flags} + -DDEBUG_LEVEL=0 -DSS_TIMER=4 diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index f1afb0e4d70f..58f1fc105860 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -261,7 +261,7 @@ build_flags = ${common_stm32.build_flags} src_filter = ${common.default_src_filter} + # -# FLY Mini (STM32F103RCT6) +# FLYmaker FLY Mini (STM32F103RCT6) # [env:FLY_MINI] platform = ${common_stm32.platform} From 3bc1d2dd857fd81631411f75f87048b8f62fe82f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Jul 2021 18:51:58 -0500 Subject: [PATCH 072/323] =?UTF-8?q?=F0=9F=8E=A8=20Minor=20cleanup=20of=20T?= =?UTF-8?q?FT/FSMC=20pins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h | 6 +--- Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h | 7 +---- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 18 ++++++----- .../src/pins/stm32f1/pins_JGAURORA_A5S_A1.h | 24 ++++++++++----- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 30 ++++++++++++------- .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 21 ++++++------- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 15 +++++----- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 20 +++++++------ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 18 ++++++----- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 26 +++++++++------- Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 20 ++++++++----- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 3 +- 12 files changed, 115 insertions(+), 93 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h index 8f5893e3b9ed..e892d3e3f8bd 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h @@ -117,13 +117,9 @@ #define W25QXX_SCK_PIN PB13 // -// TronXY TFT Support +// TFT with FSMC interface // - #if HAS_FSMC_TFT - - // Shared FSMC - #define TOUCH_CS_PIN PB7 // SPI1_NSS #define TOUCH_SCK_PIN PA5 // SPI1_SCK #define TOUCH_MISO_PIN PA6 // SPI1_MISO diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h index df49da109548..51bd7294a9ff 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h @@ -132,13 +132,9 @@ #define W25QXX_SCK_PIN PB13 // -// TronXY TFT Support +// TFT with FSMC interface // - #if HAS_FSMC_TFT - - // Shared FSMC - #define TOUCH_CS_PIN PB7 // SPI1_NSS #define TOUCH_SCK_PIN PA5 // SPI1_SCK #define TOUCH_MISO_PIN PA6 // SPI1_MISO @@ -152,7 +148,6 @@ #define FSMC_RS_PIN PD11 #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 - #endif #if ENABLED(TFT_LVGL_UI) diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index c49c31e741c1..bdf3f48c3ab6 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -271,11 +271,9 @@ #error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER." #endif -#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT - #define TFT_CS_PIN PD7 // NE4 - #define TFT_RS_PIN PD11 // A0 -#endif - +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers @@ -291,12 +289,16 @@ */ //#define TFT_RESET_PIN PC6 // FSMC_RST #define TFT_BACKLIGHT_PIN PD13 - #define FSMC_CS_PIN TFT_CS_PIN // NE4 - #define FSMC_RS_PIN TFT_RS_PIN // A0 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PD11 // A0 #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 + + #define TFT_CS_PIN TFT_CS_PIN + #define TFT_RS_PIN TFT_RS_PIN + #ifdef TFT_CLASSIC_UI #define TFT_MARLINBG_COLOR 0x3186 // Grey #define TFT_MARLINUI_COLOR 0xC7B6 // Green @@ -307,6 +309,8 @@ #elif HAS_GRAPHICAL_TFT #define TFT_RESET_PIN PC6 #define TFT_BACKLIGHT_PIN PD13 + #define TFT_CS_PIN PD7 // NE4 + #define TFT_RS_PIN PD11 // A0 #endif #if NEED_TOUCH_PINS diff --git a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h index 9f08f18bf7f6..bded0edd3a7b 100644 --- a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h @@ -26,6 +26,8 @@ * ║║ ╦╠═╣│ │├┬┘│ │├┬┘├─┤╠╣ │ │├┬┘│ ││││ │ │ ││││ * ╚╝╚═╝╩ ╩└─┘┴└─└─┘┴└─┴ ┴╚ └─┘┴└─└─┘┴ ┴o└─┘└─┘┴ ┴ * Pin assignments for 32-bit JGAurora A5S & A1 + * + * https://jgaurorawiki.com/_media/jgaurora_a5s_a1_pinout.png */ #include "env_validate.h" @@ -102,15 +104,20 @@ #define FIL_RUNOUT_PIN PC7 // -// LCD +// TFT with FSMC interface // -#define LCD_BACKLIGHT_PIN PF11 -#define FSMC_CS_PIN PD7 -#define FSMC_RS_PIN PG0 +#if HAS_FSMC_TFT + #define LCD_BACKLIGHT_PIN PF11 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PG0 -#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT -#define FSMC_DMA_DEV DMA2 -#define FSMC_DMA_CHANNEL DMA_CH5 + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN +#endif // // SD Card @@ -129,4 +136,7 @@ #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PA4 #define TOUCH_INT_PIN PC4 + #define TOUCH_MISO_PIN PA6 + #define TOUCH_MOSI_PIN PA7 + #define TOUCH_SCK_PIN PA5 #endif diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index fa708b248edf..391610522d04 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -117,20 +117,28 @@ //#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5) #endif -#define TFT_RESET_PIN PC4 // pin 33 -#define TFT_BACKLIGHT_PIN PD12 // pin 59 -#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1 -#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed +// +// TFT with FSMC interface +// +#if HAS_FSMC_TFT + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1 + #define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 -#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT -#define FSMC_DMA_DEV DMA2 -#define FSMC_DMA_CHANNEL DMA_CH5 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN -#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h -#define DOGLCD_SCK -1 + #define TFT_RESET_PIN PC4 // pin 33 + #define TFT_BACKLIGHT_PIN PD12 // pin 59 -// Buffer for Color UI -#define TFT_BUFFER_SIZE 3200 + #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h + #define DOGLCD_SCK -1 + + // Buffer for Color UI + #define TFT_BUFFER_SIZE 3200 +#endif /** * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index 179c04a3045c..14f2ad981ac5 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -133,11 +133,9 @@ // #define BEEPER_PIN PE4 -/** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. - */ +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers @@ -151,18 +149,17 @@ * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ - #define TFT_CS_PIN PD7 // NE4 - #define TFT_RS_PIN PG0 // A0 - - #define FSMC_CS_PIN TFT_CS_PIN - #define FSMC_RS_PIN TFT_RS_PIN + #define TFT_RESET_PIN PF15 + #define TFT_BACKLIGHT_PIN PF11 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PG0 // A0 #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 - #define TFT_RESET_PIN PF15 - #define TFT_BACKLIGHT_PIN PF11 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 8da4dcc9de6c..f91297805150 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -155,7 +155,7 @@ #define WIFI_IO0_PIN PG1 // -// LCD screen +// TFT with FSMC interface // #if HAS_FSMC_TFT /** @@ -170,18 +170,17 @@ * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ - #define TFT_CS_PIN PG12 // NE4 - #define TFT_RS_PIN PF0 // A0 - - #define FSMC_CS_PIN TFT_CS_PIN - #define FSMC_RS_PIN TFT_RS_PIN + #define TFT_RESET_PIN PF6 + #define TFT_BACKLIGHT_PIN PG11 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PG12 // NE4 + #define FSMC_RS_PIN PF0 // A0 #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 - #define TFT_RESET_PIN PF6 - #define TFT_BACKLIGHT_PIN PG11 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 0a6186cf5719..95d62f05a4c0 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -172,13 +172,18 @@ // #define BEEPER_PIN PC5 -/** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'TFT_RESET_PIN' - * to let the bootloader init the screen. - */ -// Shared FSMC Configs +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT + /** + * Note: MKS Robin TFT screens use various TFT controllers. + * If the screen stays white, disable 'TFT_RESET_PIN' + * to let the bootloader init the screen. + */ + #define TFT_RESET_PIN PC6 // FSMC_RST + #define TFT_BACKLIGHT_PIN PD13 + #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h #define DOGLCD_SCK -1 @@ -187,9 +192,6 @@ #define TOUCH_MISO_PIN PB14 // SPI2_MISO #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI - #define TFT_RESET_PIN PC6 // FSMC_RST - #define TFT_BACKLIGHT_PIN PD13 - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 129b640d9774..7ff22cc1ced1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -205,12 +205,18 @@ #error "No custom SD drive cable defined for this board." #endif -/** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. - */ +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT + /** + * Note: MKS Robin TFT screens use various TFT controllers. + * If the screen stays white, disable 'LCD_RESET_PIN' + * to let the bootloader init the screen. + */ + #define TFT_RESET_PIN LCD_RESET_PIN + #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 #define FSMC_DMA_DEV DMA2 @@ -221,8 +227,6 @@ #define LCD_RESET_PIN PF6 #define LCD_BACKLIGHT_PIN PD13 - #define TFT_RESET_PIN LCD_RESET_PIN - #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TFT_BUFFER_SIZE 14400 diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index 5eefedb1414a..1de3729dcc58 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -126,20 +126,24 @@ //#define POWER_LOSS_PIN PG2 // PG4 PW_DET #define FIL_RUNOUT_PIN PA15 // MT_DET -/** - * Note: MKS Robin TFT screens use various TFT controllers - * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) - * ILI9488 is not supported. - * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp - * - * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. - * - * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu - * because Marlin uses the reset as a failsafe to revive a glitchy LCD. - */ +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT + /** + * Note: MKS Robin TFT screens use various TFT controllers + * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) + * ILI9488 is not supported. + * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. + * + * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. + */ #define TFT_RESET_PIN PF11 #define TFT_BACKLIGHT_PIN PD13 + #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index 1e1f5251c155..d2ee2e013c3a 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -136,14 +136,18 @@ // // LCD / Controller // -#define TFT_RESET_PIN PE6 -#define TFT_CS_PIN PD7 -#define TFT_RS_PIN PD13 -#define TFT_INTERFACE_FSMC_8BIT - -#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT -#define FSMC_CS_PIN TFT_CS_PIN -#define FSMC_RS_PIN TFT_RS_PIN +#if HAS_SPI_TFT || HAS_FSMC_TFT + #define TFT_RESET_PIN PE6 + #define TFT_CS_PIN PD7 + #define TFT_RS_PIN PD13 + + #if HAS_FSMC_TFT + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN TFT_CS_PIN + #define FSMC_RS_PIN TFT_RS_PIN + #define TFT_INTERFACE_FSMC_8BIT + #endif +#endif // // Touch Screen diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index b92056ea86a8..3b75e7072ad3 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -230,9 +230,8 @@ #define BEEPER_PIN PC7 // -// LCD / Controller +// TFT with FSMC interface // - #if HAS_FSMC_TFT //#define TFT_DRIVER LERDGE_ST7796 From 972b1e2f00a1e4fdf7370f706d6f83899b3471ae Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Wed, 14 Jul 2021 16:56:02 -0700 Subject: [PATCH 073/323] =?UTF-8?q?=F0=9F=8E=A8=20Call=20millis()=20once?= =?UTF-8?q?=20in=20manage=5Finactivity=20(#22363)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 3ec4a8193c86..bb7b227b53b4 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -514,7 +514,6 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { constexpr millis_t HOME_DEBOUNCE_DELAY = 1000UL; static millis_t next_home_key_ms; // = 0 if (!IS_SD_PRINTING() && !READ(HOME_PIN)) { // HOME_PIN goes LOW when pressed - const millis_t ms = millis(); if (ELAPSED(ms, next_home_key_ms)) { next_home_key_ms = ms + HOME_DEBOUNCE_DELAY; LCD_MESSAGEPGM(MSG_AUTO_HOME); @@ -526,7 +525,6 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { #if ENABLED(CUSTOM_USER_BUTTONS) // Handle a custom user button if defined const bool printer_not_busy = !printingIsActive(); - const millis_t ms = millis(); #define HAS_CUSTOM_USER_BUTTON(N) (PIN_EXISTS(BUTTON##N) && defined(BUTTON##N##_HIT_STATE) && defined(BUTTON##N##_GCODE)) #define HAS_BETTER_USER_BUTTON(N) HAS_CUSTOM_USER_BUTTON(N) && defined(BUTTON##N##_DESC) #define _CHECK_CUSTOM_USER_BUTTON(N, CODE) do{ \ From 5ca9ebfa6b0ff814c3a122c3e613574533027803 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 14 Jul 2021 19:44:51 -0500 Subject: [PATCH 074/323] =?UTF-8?q?=F0=9F=94=A8=20Consolidate=20STM32=20ex?= =?UTF-8?q?tra=5Fscripts=20(#22365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformIO/scripts/STM32F103RC_fysetc.py | 2 +- .../share/PlatformIO/scripts/mks_encrypt.py | 29 -------- ...m32_bootloader.py => offset_and_rename.py} | 13 +++- ini/avr.ini | 3 +- ini/stm32f1.ini | 41 ++++-------- ini/stm32f4.ini | 66 +++++++------------ 6 files changed, 50 insertions(+), 104 deletions(-) delete mode 100644 buildroot/share/PlatformIO/scripts/mks_encrypt.py rename buildroot/share/PlatformIO/scripts/{stm32_bootloader.py => offset_and_rename.py} (83%) diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py index 5a09dd3d14c4..668475dc010a 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py @@ -10,7 +10,7 @@ env.AddPostAction( join("$BUILD_DIR", "${PROGNAME}.elf"), env.VerboseAction(" ".join([ - "$OBJCOPY", "-O ihex", "$TARGET", # TARGET=.pio/build/fysetc_STM32F1/firmware.elf + "$OBJCOPY", "-O ihex", "$TARGET", "\"" + join("$BUILD_DIR", "${PROGNAME}.hex") + "\"", # Note: $BUILD_DIR is a full path ]), "Building $TARGET")) diff --git a/buildroot/share/PlatformIO/scripts/mks_encrypt.py b/buildroot/share/PlatformIO/scripts/mks_encrypt.py deleted file mode 100644 index bd3548ab36a2..000000000000 --- a/buildroot/share/PlatformIO/scripts/mks_encrypt.py +++ /dev/null @@ -1,29 +0,0 @@ -# -# buildroot/share/PlatformIO/scripts/mks_encrypt.py -# -# Apply encryption and save as 'build.firmware' for these environments: -# - env:mks_robin -# - env:mks_robin_e3 -# - env:flsun_hispeedv1 -# - env:mks_robin_nano35 -# -Import("env") - -from SCons.Script import DefaultEnvironment -board = DefaultEnvironment().BoardConfig() - -if 'encrypt' in board.get("build").keys(): - - import marlin - - # Encrypt ${PROGNAME}.bin and save it with the name given in build.encrypt - def encrypt(source, target, env): - marlin.encrypt_mks(source, target, env, board.get("build.encrypt")) - - marlin.add_post_action(encrypt); - -else: - - import sys - print("You need to define output file via board_build.encrypt = 'filename' parameter", file=sys.stderr) - env.Exit(1); diff --git a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py b/buildroot/share/PlatformIO/scripts/offset_and_rename.py similarity index 83% rename from buildroot/share/PlatformIO/scripts/stm32_bootloader.py rename to buildroot/share/PlatformIO/scripts/offset_and_rename.py index f3b1b273a28f..b42b2f35317c 100644 --- a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py +++ b/buildroot/share/PlatformIO/scripts/offset_and_rename.py @@ -1,5 +1,5 @@ # -# stm32_bootloader.py +# offset_and_rename.py # # - If 'build.offset' is provided, either by JSON or by the environment... # - Set linker flag LD_FLASH_OFFSET and relocate the VTAB based on 'build.offset'. @@ -36,6 +36,17 @@ if "-Wl,--defsym=LD_MAX_DATA_SIZE" in flag: env["LINKFLAGS"][i] = "-Wl,--defsym=LD_MAX_DATA_SIZE=" + str(maximum_ram_size - 40) +# +# For build.encrypt rename and encode the firmware file. +# +if 'encrypt' in board_keys: + + # Encrypt ${PROGNAME}.bin and save it with the name given in build.encrypt + def encrypt(source, target, env): + marlin.encrypt_mks(source, target, env, board.get("build.encrypt")) + + marlin.add_post_action(encrypt); + # # For build.rename simply rename the firmware file. # diff --git a/ini/avr.ini b/ini/avr.ini index cd10f134990a..88f54a723cb5 100644 --- a/ini/avr.ini +++ b/ini/avr.ini @@ -53,8 +53,7 @@ board = megaatmega1280 [mega_extended_optimized] extends = common_avr8 board_build.variant = MARLIN_MEGA_EXTENDED -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py +extra_scripts = ${env:mega2560ext.extra_scripts} upload_speed = 57600 build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 58f1fc105860..d5f0741d41ea 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -34,6 +34,11 @@ src_filter = ${common.default_src_filter} + + Date: Thu, 15 Jul 2021 01:04:09 +0000 Subject: [PATCH 075/323] [cron] Bump distribution date (2021-07-15) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index a218af3d3dda..03855365ba6a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-14" +//#define STRING_DISTRIBUTION_DATE "2021-07-15" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 3db502c4709b..49a0b94f6456 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-14" + #define STRING_DISTRIBUTION_DATE "2021-07-15" #endif /** From 7e50d8761d66cfa7c6e8a4e864f0754ddd645ada Mon Sep 17 00:00:00 2001 From: ellensp Date: Thu, 15 Jul 2021 14:07:46 +1200 Subject: [PATCH 076/323] =?UTF-8?q?=F0=9F=94=A8=20More=20HAL/STM32=20targe?= =?UTF-8?q?ts=20(#22358)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/pins.h | 26 ++-- Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h | 2 + ini/stm32f1-maple.ini | 26 ++-- ini/stm32f1.ini | 150 ++++++++++++++++++++++ 4 files changed, 178 insertions(+), 26 deletions(-) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 20f24f8c218d..b5a81c60978e 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -486,17 +486,17 @@ #elif MB(MKS_ROBIN) #include "stm32f1/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin env:mks_robin_maple #elif MB(MKS_ROBIN_MINI) - #include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini + #include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini env:mks_robin_mini_maple #elif MB(MKS_ROBIN_NANO) #include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano35 env:mks_robin_nano35_maple #elif MB(MKS_ROBIN_NANO_V2) #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h" // STM32F1 env:mks_robin_nano35 env:mks_robin_nano35_maple #elif MB(MKS_ROBIN_LITE) - #include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite + #include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite env:mks_robin_lite_maple #elif MB(MKS_ROBIN_LITE3) - #include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3 + #include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3 env:mks_robin_lite3_maple #elif MB(MKS_ROBIN_PRO) - #include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro + #include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro env:mks_robin_pro_maple #elif MB(MKS_ROBIN_E3) #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 env:mks_robin_e3_maple #elif MB(MKS_ROBIN_E3_V1_1) @@ -506,7 +506,7 @@ #elif MB(MKS_ROBIN_E3D_V1_1) #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3P) - #include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p + #include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p env:mks_robin_e3p_maple #elif MB(BTT_SKR_MINI_V1_1) #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_MINI_E3_V1_0) @@ -522,21 +522,21 @@ #elif MB(BTT_SKR_CR6) #include "stm32f1/pins_BTT_SKR_CR6.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple #elif MB(JGAURORA_A5S_A1) - #include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1 + #include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1 env:jgaurora_a5s_a1_maple #elif MB(FYSETC_AIO_II) - #include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc + #include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc env:STM32F103RC_fysetc_maple #elif MB(FYSETC_CHEETAH) - #include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc + #include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc env:STM32F103RC_fysetc_maple #elif MB(FYSETC_CHEETAH_V12) - #include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc + #include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc env:STM32F103RC_fysetc_maple #elif MB(LONGER3D_LK) - #include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer + #include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer env:STM32F103VE_longer_maple #elif MB(CCROBOT_MEEB_3DP) #include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb #elif MB(CHITU3D_V5) - #include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_v5_gpio_init + #include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple env:chitu_v5_gpio_init env:chitu_v5_gpio_init_maple #elif MB(CHITU3D_V6) - #include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 + #include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple #elif MB(CREALITY_V4) #include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(CREALITY_V4210) @@ -550,7 +550,7 @@ #elif MB(CREALITY_V453) #include "stm32f1/pins_CREALITY_V453.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(TRIGORILLA_PRO) - #include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro + #include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro env:trigorilla_pro_maple #elif MB(FLY_MINI) #include "stm32f1/pins_FLY_MINI.h" // STM32F1 env:FLY_MINI env:FLY_MINI_maple #elif MB(FLSUN_HISPEED) diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h index e892d3e3f8bd..88dd28a40157 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h @@ -134,6 +134,8 @@ #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #endif #if ENABLED(TFT_LVGL_UI) diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index ab1e6c54f41c..2a9ba8349470 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -74,7 +74,7 @@ upload_protocol = dfu # # FYSETC STM32F103RC # -[env:STM32F103RC_fysetc] +[env:STM32F103RC_fysetc_maple] platform = ${common_stm32f1.platform} extends = common_STM32F103RC_maple extra_scripts = ${common_stm32f1.extra_scripts} @@ -173,7 +173,7 @@ upload_protocol = serial # # Longer 3D board in Alfawise U20 (STM32F103VET6) # -[env:STM32F103VE_longer] +[env:STM32F103VE_longer_maple] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103VE @@ -190,7 +190,7 @@ build_unflags = ${common_stm32f1.build_unflags} # # MKS Robin Mini (STM32F103VET6) # -[env:mks_robin_mini] +[env:mks_robin_mini_maple] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103VE @@ -228,7 +228,7 @@ build_flags = ${common_stm32f1.build_flags} # # MKS Robin Pro (STM32F103ZET6) # -[env:mks_robin_pro] +[env:mks_robin_pro_maple] platform = ${common_stm32f1.platform} extends = env:mks_robin_maple extra_scripts = ${common_stm32f1.extra_scripts} @@ -237,7 +237,7 @@ extra_scripts = ${common_stm32f1.extra_scripts} # # TRIGORILLA PRO (STM32F103ZET6) # -[env:trigorilla_pro] +[env:trigorilla_pro_maple] platform = ${common_stm32f1.platform} extends = env:mks_robin_maple extra_scripts = ${common_stm32f1.extra_scripts} @@ -259,7 +259,7 @@ build_flags = ${common_stm32f1.build_flags} # MKS Robin E3p (STM32F103VET6) # - LVGL UI # -[env:mks_robin_e3p] +[env:mks_robin_e3p_maple] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103VE @@ -273,7 +273,7 @@ upload_protocol = jlink # # MKS Robin Lite/Lite2 (STM32F103RCT6) # -[env:mks_robin_lite] +[env:mks_robin_lite_maple] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103RC @@ -283,7 +283,7 @@ extra_scripts = ${common_stm32f1.extra_scripts} # # MKS ROBIN LITE3 (STM32F103RCT6) # -[env:mks_robin_lite3] +[env:mks_robin_lite3_maple] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103RC @@ -293,7 +293,7 @@ extra_scripts = ${common_stm32f1.extra_scripts} # # JGAurora A5S A1 (STM32F103ZET6) # -[env:jgaurora_a5s_a1] +[env:jgaurora_a5s_a1_maple] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103ZE @@ -321,7 +321,7 @@ lib_ignore = ${common_stm32f1.lib_ignore} # # Chitu boards like Tronxy X5s (STM32F103ZET6) # -[env:chitu_f103] +[env:chitu_f103_maple] platform = ${common_stm32f1.platform} extends = common_stm32f1 board = marlin_CHITU_F103 @@ -338,10 +338,10 @@ build_unflags = ${common_stm32f1.build_unflags} # Some Chitu V5 boards have a problem with GPIO init. # Use this target if G28 or G29 are always failing. # -[env:chitu_v5_gpio_init] +[env:chitu_v5_gpio_init_maple] platform = ${common_stm32f1.platform} -extends = env:chitu_f103 -build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX +extends = env:chitu_f103_maple +build_flags = ${env:chitu_f103_maple.build_flags} -DCHITU_V5_Z_MIN_BUGFIX # # FLYmaker FLY Mini (STM32F103RCT6) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index d5f0741d41ea..f1446f326765 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -260,3 +260,153 @@ board_build.variant = MARLIN_F103Rx board_build.offset = 0x5000 board_upload.offset_address = 0x08005000 extra_scripts = ${stm32f1_variant.extra_scripts} + +# +# MKS Robin Mini (STM32F103VET6) +# +[env:mks_robin_mini] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103VE +board_build.core = stm32 +board_build.variant = MARLIN_F103Vx +board_build.offset = 0x7000 +board_build.encrypt = Robin_mini.bin +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE +board_upload.offset_address = 0x08007000 +extra_scripts = ${stm32f1_variant.extra_scripts} + +# +# MKS Robin Lite/Lite2 (STM32F103RCT6) +# +[env:mks_robin_lite] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103RC +board_build.core = stm32 +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x5000 +board_build.encrypt = mksLite.bin +build_flags = ${common_stm32.build_flags} +board_upload.offset_address = 0x08005000 +extra_scripts = ${stm32f1_variant.extra_scripts} + +# +# MKS ROBIN LITE3 (STM32F103RCT6) +# +[env:mks_robin_lite3] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103RC +board_build.core = stm32 +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x5000 +board_build.encrypt = mksLite3.bin +build_flags = ${common_stm32.build_flags} +board_upload.offset_address = 0x08005000 +extra_scripts = ${stm32f1_variant.extra_scripts} + +# +# MKS Robin Pro (STM32F103ZET6) +# +[env:mks_robin_pro] +platform = ${common_stm32.platform} +extends = env:mks_robin +board_build.encrypt = Robin_pro.bin + +# +# MKS Robin E3p (STM32F103VET6) +# - LVGL UI +# +[env:mks_robin_e3p] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103VE +board_build.core = stm32 +board_build.variant = MARLIN_F103Vx +board_build.offset = 0x7000 +board_build.encrypt = Robin_e3p.bin +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 +board_upload.offset_address = 0x08007000 +extra_scripts = ${stm32f1_variant.extra_scripts} +debug_tool = jlink +upload_protocol = jlink + +# +# JGAurora A5S A1 (STM32F103ZET6) +# +[env:jgaurora_a5s_a1] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103ZE +board_build.core = stm32 +board_build.variant = MARLIN_F103Zx +board_build.offset = 0xA000 +board_build.rename = firmware_for_sd_upload.bin +build_flags = ${common_stm32.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY +board_build.address = 0x0800A000 +extra_scripts = ${stm32f1_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py + +# +# FYSETC STM32F103RC +# +[env:STM32F103RC_fysetc] +platform = ${common_stm32.platform} +extends = common_STM32F103RC +extra_scripts = ${stm32f1_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 +lib_ldf_mode = chain +debug_tool = stlink +upload_protocol = serial + +# +# Longer 3D board in Alfawise U20 (STM32F103VET6) +# +[env:STM32F103VE_longer] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103VE +board_build.core = stm32 +board_build.variant = MARLIN_F103Zx +board_build.offset = 0x1000 +board_build.address = 0x08010000 +build_flags = ${common_stm32.build_flags} + -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 +build_unflags = ${common_stm32.build_unflags} + -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 +extra_scripts = ${stm32f1_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py + +# +# TRIGORILLA PRO (STM32F103ZET6) +# +[env:trigorilla_pro] +platform = ${common_stm32.platform} +extends = env:mks_robin +extra_scripts = ${common_stm32.extra_scripts} + +# +# Chitu boards like Tronxy X5s (STM32F103ZET6) +# +[env:chitu_f103] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103ZE +board_build.core = stm32 +board_build.variant = MARLIN_F103Zx +extra_scripts = ${stm32f1_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/chitu_crypt.py +build_flags = ${common_stm32.build_flags} -DSTM32_XL_DENSITY +build_unflags = ${common_stm32.build_unflags} + -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 + +# +# Some Chitu V5 boards have a problem with GPIO init. +# Use this target if G28 or G29 are always failing. +# +[env:chitu_v5_gpio_init] +platform = ${common_stm32.platform} +extends = env:chitu_f103 +build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX From 3be35a6bd6845a160c416629ea98392129cd6eb3 Mon Sep 17 00:00:00 2001 From: Marcio T Date: Wed, 14 Jul 2021 21:13:08 -0600 Subject: [PATCH 077/323] =?UTF-8?q?=F0=9F=93=BA=20Fix=20Makefile=20build,?= =?UTF-8?q?=20improve=20Touch=20UI=20button=20titles=20(#22361)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/power.cpp | 4 ++++ .../extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp | 2 +- .../src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp | 2 +- .../src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp | 2 +- .../ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp | 2 +- .../extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp | 2 +- .../src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp | 2 +- .../extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp | 2 +- .../src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp | 2 +- .../ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp | 2 +- .../generic/base_numeric_adjustment_screen.cpp | 2 +- .../extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp | 2 +- .../ftdi_eve_touch_ui/generic/change_filament_screen.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp | 2 +- .../extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp | 2 +- .../src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp | 2 +- .../src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp | 2 +- .../ftdi_eve_touch_ui/generic/interface_settings_screen.cpp | 4 ++-- .../ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp | 2 +- .../src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp | 2 +- Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp | 2 +- Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp | 2 +- 25 files changed, 29 insertions(+), 25 deletions(-) diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 9070fd7946e6..30bf0d764d2d 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -38,6 +38,8 @@ #include "../gcode/gcode.h" #endif +#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL) + Power powerManager; bool Power::psu_on; @@ -214,3 +216,5 @@ void Power::power_off() { #endif #endif // AUTO_POWER_CONTROL + +#endif // PSU_CONTROL || AUTO_POWER_CONTROL diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp index fd478c95a2f5..40ec16a9dfe6 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp @@ -87,7 +87,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .tag(13) .button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE)) .tag(14) .button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS)) .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,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); #undef GRID_COLS #undef GRID_ROWS } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp index ae5e7d8ab131..8109ecef7685 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp @@ -54,7 +54,7 @@ void MainMenu::onRedraw(draw_mode_t what) { .tag(8).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS)) .tag(9).button(BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) - .tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } #undef GRID_COLS diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp index 31021c31c03d..2f94555784dd 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp @@ -54,7 +54,7 @@ void TuneMenu::onRedraw(draw_mode_t what) { .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)) .enabled(!isPrinting()).tag(7).button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS)) - .colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } #undef GRID_COLS #undef GRID_ROWS diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp index d984dbe120cc..7549e8d54e93 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp @@ -67,7 +67,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .tag(10).button(DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU)) .tag(11).button(RESTORE_DEFAULTS_POS, GET_TEXT_F(MSG_RESTORE_DEFAULTS)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index 6718fe0a41d1..d3950a7c6ccb 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -71,7 +71,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { #undef GRID_COLS #define GRID_COLS 3 .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp index 8c15cae60f99..d40b3be35460 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp @@ -90,7 +90,7 @@ void LoadChocolateScreen::draw_buttons(draw_mode_t what) { cmd.tag(3).button(x, y, h, v, GET_TEXT_F(MSG_FULL_LOAD)); ui.bounds(POLY(load_screen_back_btn), x, y, h, v); - cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BACK)); + cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_DONE)); } void LoadChocolateScreen::draw_text(draw_mode_t what) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp index a990717fb31a..3fe17b72d5eb 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp @@ -68,7 +68,7 @@ void MainMenu::onRedraw(draw_mode_t what) { .tag(10).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING)) .tag(11).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp index 56e90ceb4d8d..424e0afa7624 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp @@ -65,7 +65,7 @@ void PreheatMenu::onRedraw(draw_mode_t what) { } #endif cmd.colors(action_btn) - .tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp index 75b1fcc9c1e6..300878670e0b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp @@ -77,7 +77,7 @@ void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) { CommandProcessor cmd; cmd.colors(normal_btn) .font(font_medium) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp index 68e50c90ace7..3e07735edf55 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp @@ -94,7 +94,7 @@ void AboutScreen::onRedraw(draw_mode_t) { .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU)); #endif cmd.colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } bool AboutScreen::onTouchEnd(uint8_t tag) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp index 503abbdb05c0..a83cc075156c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp @@ -111,7 +111,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .enabled(ENABLED(BACKLASH_GCODE)) .tag(8).button(BACKLASH_POS, GET_TEXT_F(MSG_BACKLASH)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp index 90199783fd4e..d0ba74721cc4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp @@ -61,7 +61,7 @@ BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what #else BTN_POS(15,7), BTN_SIZE(4,1), #endif - GET_TEXT_F(MSG_BACK), true, true + GET_TEXT_F(MSG_BUTTON_DONE), true, true ); _line = 1; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp index 3dfcd429a5b9..30b9d1c78a41 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp @@ -136,7 +136,7 @@ void BedMeshEditScreen::drawHighlightedPointValue() { if (mydata.highlight.x != NONE) draw_adjuster(cmd, Z_VALUE_POS, 3, getHighlightedValue(), GET_TEXT_F(MSG_UNITS_MM), 4, 3); cmd.colors(mydata.needSave ? normal_btn : action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_BACK)) + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)) .colors(mydata.needSave ? action_btn : normal_btn) .enabled(mydata.needSave) .tag(2).button(SAVE_POS, GET_TEXT_F(MSG_TOUCHMI_SAVE)); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp index 46d3a4ea1cf9..fa0748c17b37 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp @@ -224,7 +224,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) { .tag(6) .enabled(t_ok).button (LOAD_MOMN_POS, GET_TEXT_F(MSG_MOMENTARY)) .tag(7).TOG_STYLE(tog7).enabled(t_ok).button (UNLD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS)) .tag(8).TOG_STYLE(tog8).enabled(t_ok).button (LOAD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS)) - .tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp index 5f8ff9292236..880748089772 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp @@ -135,7 +135,7 @@ void CustomUserMenus::onRedraw(draw_mode_t what) { _USER_ITEM(20) #endif .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp index d12cb32e20c9..c7042e760e48 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp @@ -120,7 +120,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { cmd.font(font_medium) .colors(action_btn) - .tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BUTTON_DONE)); #undef GRID_COLS #undef GRID_ROWS } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp index bd5fa96e8db3..9c9e70cebfc1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp @@ -63,7 +63,7 @@ void FilamentMenu::onRedraw(draw_mode_t what) { .enabled(ENABLED(LIN_ADVANCE)) .tag(3).button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp index bf3250259437..aa54e88967da 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp @@ -168,7 +168,7 @@ void FilesScreen::drawFooter() { cmd.colors(normal_btn) .font(font_medium) .colors(has_selection ? normal_btn : action_btn) - .tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BACK)) + .tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_DONE)) .enabled(has_selection) .colors(has_selection ? action_btn : normal_btn); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp index a3febb39a223..ebefea2dcd52 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp @@ -108,11 +108,11 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { .colors(normal_btn) .tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_SOUNDS)) .colors(action_btn) - .tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); #else .tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUNDS)) .colors(action_btn) - .tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); #endif } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp index 3ba035f19b2a..b951844196f5 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp @@ -102,7 +102,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) { .tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED)) .tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED)) .colors(action_btn) - .tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index acbc17989120..e693bfb05c76 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -96,7 +96,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) { .tag(8).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST)) #endif .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp index f7a0d6683a1b..3f614ec34425 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp @@ -95,7 +95,7 @@ void MainMenu::onRedraw(draw_mode_t what) { .tag(11).button(CUSTOM_MENU_POS, GET_TEXT_F(MSG_CUSTOM_COMMANDS)) #endif .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp index 2153a1e1adcf..b6d9770e9d2d 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp @@ -63,7 +63,7 @@ void StatisticsScreen::onRedraw(draw_mode_t what) { if (what & FOREGROUND) { cmd.font(Theme::font_medium) .colors(action_btn) - .tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp index a5e2460631e1..6f4beb66731c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp @@ -92,7 +92,7 @@ void TuneMenu::onRedraw(draw_mode_t what) { .tag(10).button(CASE_LIGHT_POS, GET_TEXT_F(MSG_CASE_LIGHT)) .tag(11).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS)) .tag(1).colors(action_btn) - .button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } #undef GRID_COLS #undef GRID_ROWS From aec4a82a99fd6d1c3be7683068bcd7f5729904d0 Mon Sep 17 00:00:00 2001 From: Taylor Talkington Date: Thu, 15 Jul 2021 17:32:40 -0400 Subject: [PATCH 078/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Filament=20Change?= =?UTF-8?q?=20menu=20(#22370)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #22277 --- Marlin/src/lcd/menu/menu_filament.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index d70ed98aa849..53fd67dbb258 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -211,7 +211,7 @@ void menu_change_filament() { if (thermalManager.targetHotEnoughToExtrude(active_extruder)) queue.inject_P(PSTR("M600B0")); else - _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); + ui.goto_screen([]{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); }); #endif } From 0207569ca66a8fe60846d85ba1797f3c0204223c Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 16 Jul 2021 00:59:11 +0000 Subject: [PATCH 079/323] [cron] Bump distribution date (2021-07-16) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 03855365ba6a..f21d61885044 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-15" +//#define STRING_DISTRIBUTION_DATE "2021-07-16" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 49a0b94f6456..6809c4b98301 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-15" + #define STRING_DISTRIBUTION_DATE "2021-07-16" #endif /** From 5b43795f54f18bc956f1c4884640f18c9a7bdbce Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 16 Jul 2021 03:40:05 +0200 Subject: [PATCH 080/323] =?UTF-8?q?=F0=9F=90=9B=20Followup=20to=20HAL/STM3?= =?UTF-8?q?2=20targets=20(Longer3D=20timers)=20(#22369)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformIO/variants/MARLIN_F103Vx/variant.h | 8 ++++++-- ini/stm32f1.ini | 16 +++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h index b622b39376b9..496d8817a181 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h @@ -132,8 +132,12 @@ extern "C" { // Timer Definitions (optional) // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin -#define TIMER_TONE TIM3 -#define TIMER_SERVO TIM2 +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index f1446f326765..bc4236b8f03d 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -194,7 +194,7 @@ build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.b [env:flsun_hispeedv1] platform = ${common_stm32.platform} extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board = genericSTM32F103VE board_build.core = stm32 board_build.variant = MARLIN_F103Vx @@ -210,7 +210,7 @@ extra_scripts = ${stm32f1_variant.extra_scripts} [env:mks_robin_nano35] platform = ${common_stm32.platform} extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board = genericSTM32F103VE board_build.core = stm32 board_build.variant = MARLIN_F103Vx @@ -272,7 +272,7 @@ board_build.core = stm32 board_build.variant = MARLIN_F103Vx board_build.offset = 0x7000 board_build.encrypt = Robin_mini.bin -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board_upload.offset_address = 0x08007000 extra_scripts = ${stm32f1_variant.extra_scripts} @@ -326,7 +326,7 @@ board_build.core = stm32 board_build.variant = MARLIN_F103Vx board_build.offset = 0x7000 board_build.encrypt = Robin_e3p.bin -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 board_upload.offset_address = 0x08007000 extra_scripts = ${stm32f1_variant.extra_scripts} debug_tool = jlink @@ -369,13 +369,11 @@ platform = ${common_stm32.platform} extends = common_stm32 board = genericSTM32F103VE board_build.core = stm32 -board_build.variant = MARLIN_F103Zx +board_build.variant = MARLIN_F103Vx board_build.offset = 0x1000 board_build.address = 0x08010000 -build_flags = ${common_stm32.build_flags} - -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 -build_unflags = ${common_stm32.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 +build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 +build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC extra_scripts = ${stm32f1_variant.extra_scripts} buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py From 5d6317329786f5d01eb6734b4c5e664a2fe9e6ba Mon Sep 17 00:00:00 2001 From: mks-viva <1224833100@qq.com> Date: Thu, 15 Jul 2021 20:57:34 -0500 Subject: [PATCH 081/323] =?UTF-8?q?=E2=9C=A8=20MKS=20Mini12864=20v3=20for?= =?UTF-8?q?=20Robin=20E3/E3D=20(#22368)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 5 ++-- .../variants/MARLIN_F103Rx/variant.h | 24 +++++++++++++++---- ini/stm32f1.ini | 3 +-- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 127dfb7c7a17..bc47c9169f7a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -156,7 +156,6 @@ #define DOGLCD_MOSI PB15 #elif ENABLED(MKS_MINI_12864_V3) - #define ENABLE_SPI3 #define DOGLCD_CS PA4 #define DOGLCD_A0 PA5 #define LCD_PINS_DC DOGLCD_A0 @@ -165,7 +164,9 @@ #define NEOPIXEL_PIN PA7 #define DOGLCD_MOSI PB15 #define DOGLCD_SCK PB13 - + #define FORCE_SOFT_SPI + #define SOFTWARE_SPI + #else #define LCD_PINS_D4 PA6 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h index 7dcbb793d0e9..41b194abe031 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h @@ -101,11 +101,24 @@ extern "C" { #endif // Override default Arduino configuration + // SPI Definitions -#define PIN_SPI_SS PA4 -#define PIN_SPI_MOSI PA7 -#define PIN_SPI_MISO PA6 -#define PIN_SPI_SCK PA5 +#if DEFAULT_SPI == 3 + #define PIN_SPI_SS PA15 + #define PIN_SPI_MOSI PB3 + #define PIN_SPI_MISO PB4 + #define PIN_SPI_SCK PB5 +#elif DEFAULT_SPI == 2 + #define PIN_SPI_SS PB12 + #define PIN_SPI_MOSI PB13 + #define PIN_SPI_MISO PB14 + #define PIN_SPI_SCK PB15 +#else + #define PIN_SPI_SS PA4 + #define PIN_SPI_MOSI PA7 + #define PIN_SPI_MISO PA6 + #define PIN_SPI_SCK PA5 +#endif // I2C Definitions #define PIN_WIRE_SDA PB7 @@ -118,6 +131,7 @@ extern "C" { #ifndef TIMER_SERVO #define TIMER_SERVO TIM2 #endif + // UART Definitions // Define here Serial instance number to map on Serial generic name #define SERIAL_UART_INSTANCE 1 @@ -126,7 +140,7 @@ extern "C" { #define PIN_SERIAL_RX PA10 #define PIN_SERIAL_TX PA9 -/* Extra HAL modules */ +// Extra HAL modules #if defined(STM32F103xE) || defined(STM32F103xG) #define HAL_DAC_MODULE_ENABLED #endif diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index bc4236b8f03d..6350afb40bdf 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -125,8 +125,7 @@ lib_deps = [env:mks_robin_e3] platform = ${common_stm32.platform} extends = common_STM32F103RC -build_flags = ${common_stm32.build_flags} - -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5 +build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3 build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC monitor_speed = 115200 board_build.offset = 0x5000 From 665cb5ea10b140a510c03318d55967b9c6633163 Mon Sep 17 00:00:00 2001 From: bilsef Date: Thu, 15 Jul 2021 18:59:52 -0700 Subject: [PATCH 082/323] =?UTF-8?q?=E2=9C=A8=20M115:=20Axis=20Count=20(#22?= =?UTF-8?q?219)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/host/M115.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index 49bb806377a9..3b88c6905e15 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -54,6 +54,9 @@ void GcodeSuite::M115() { "PROTOCOL_VERSION:" PROTOCOL_VERSION " " "MACHINE_TYPE:" MACHINE_NAME " " "EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " " + #if LINEAR_AXES != XYZ + "AXIS_COUNT:" STRINGIFY(LINEAR_AXES) " " + #endif #ifdef MACHINE_UUID "UUID:" MACHINE_UUID #endif From 7b64bbf38424e5f6c03c2748a54e85320e577a29 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 17 Jul 2021 00:56:52 +0000 Subject: [PATCH 083/323] [cron] Bump distribution date (2021-07-17) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index f21d61885044..0d7518225ca7 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-16" +//#define STRING_DISTRIBUTION_DATE "2021-07-17" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 6809c4b98301..a825f38734d6 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-16" + #define STRING_DISTRIBUTION_DATE "2021-07-17" #endif /** From be1801703c4510dcd523de811e9dcff576b4caad Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 17 Jul 2021 03:10:54 -0500 Subject: [PATCH 084/323] =?UTF-8?q?=F0=9F=8E=A8=20Add=20MMU2=20enabled()?= =?UTF-8?q?=20accessor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/mmu/mmu2.cpp | 28 +++++++++---------- Marlin/src/feature/mmu/mmu2.h | 3 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 8a4f5ae0713c..1acd26f331c3 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -75,7 +75,7 @@ MMU2 mmu2; #define MMU2_NO_TOOL 99 #define MMU_BAUD 115200 -bool MMU2::enabled, MMU2::ready, MMU2::mmu_print_saved; +bool MMU2::_enabled, MMU2::ready, MMU2::mmu_print_saved; #if HAS_PRUSA_MMU2S bool MMU2::mmu2s_triggered; #endif @@ -219,7 +219,7 @@ void MMU2::mmu_loop() { DEBUG_ECHOLNPAIR("MMU => ", finda, "\nMMU - ENABLED"); - enabled = true; + _enabled = true; state = 1; TERN_(HAS_PRUSA_MMU2S, mmu2s_triggered = false); } @@ -480,7 +480,7 @@ static void mmu2_not_responding() { */ void MMU2::tool_change(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); @@ -512,7 +512,7 @@ static void mmu2_not_responding() { * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated. */ void MMU2::tool_change(const char *special) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); @@ -561,7 +561,7 @@ static void mmu2_not_responding() { * Handle tool change */ void MMU2::tool_change(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); @@ -599,7 +599,7 @@ static void mmu2_not_responding() { * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated. */ void MMU2::tool_change(const char *special) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); @@ -665,7 +665,7 @@ static void mmu2_not_responding() { * Handle tool change */ void MMU2::tool_change(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); @@ -693,7 +693,7 @@ static void mmu2_not_responding() { * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated. */ void MMU2::tool_change(const char *special) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); @@ -744,7 +744,7 @@ static void mmu2_not_responding() { * Set next command */ void MMU2::command(const uint8_t mmu_cmd) { - if (!enabled) return; + if (!_enabled) return; cmd = mmu_cmd; ready = false; } @@ -833,7 +833,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { } void MMU2::set_filament_type(const uint8_t index, const uint8_t filamentType) { - if (!enabled) return; + if (!_enabled) return; cmd_arg = filamentType; command(MMU_CMD_F0 + index); @@ -892,7 +892,7 @@ void MMU2::filament_runout() { // Load filament into MMU2 void MMU2::load_filament(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; command(MMU_CMD_L0 + index); manage_response(false, false); @@ -904,7 +904,7 @@ void MMU2::load_filament(const uint8_t index) { */ bool MMU2::load_filament_to_nozzle(const uint8_t index) { - if (!enabled) return false; + if (!_enabled) return false; if (thermalManager.tooColdToExtrude(active_extruder)) { BUZZ(200, 404); @@ -940,7 +940,7 @@ void MMU2::load_to_nozzle() { bool MMU2::eject_filament(const uint8_t index, const bool recover) { - if (!enabled) return false; + if (!_enabled) return false; if (thermalManager.tooColdToExtrude(active_extruder)) { BUZZ(200, 404); @@ -989,7 +989,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { */ bool MMU2::unload() { - if (!enabled) return false; + if (!_enabled) return false; if (thermalManager.tooColdToExtrude(active_extruder)) { BUZZ(200, 404); diff --git a/Marlin/src/feature/mmu/mmu2.h b/Marlin/src/feature/mmu/mmu2.h index 079a6ef79afa..95338a518410 100644 --- a/Marlin/src/feature/mmu/mmu2.h +++ b/Marlin/src/feature/mmu/mmu2.h @@ -43,6 +43,7 @@ class MMU2 { static void init(); static void reset(); + static inline bool enabled() { return _enabled; } static void mmu_loop(); static void tool_change(const uint8_t index); static void tool_change(const char *special); @@ -88,7 +89,7 @@ class MMU2 { static void mmu_continue_loading(); #endif - static bool enabled, ready, mmu_print_saved; + static bool _enabled, ready, mmu_print_saved; static uint8_t cmd, cmd_arg, last_cmd, extruder; static int8_t state; diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index bc47c9169f7a..b5d02942f3c6 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -166,7 +166,7 @@ #define DOGLCD_SCK PB13 #define FORCE_SOFT_SPI #define SOFTWARE_SPI - + #else #define LCD_PINS_D4 PA6 From cb461b5daffebfe86d1d2f96093be09e445cbd05 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sun, 18 Jul 2021 00:16:57 +0200 Subject: [PATCH 085/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Longer3D=20build?= =?UTF-8?q?=20environment=20(#22378)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/tests/STM32F103VE_longer_maple | 23 +++++++++++++++++++++++ ini/stm32f1.ini | 7 +++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 buildroot/tests/STM32F103VE_longer_maple diff --git a/buildroot/tests/STM32F103VE_longer_maple b/buildroot/tests/STM32F103VE_longer_maple new file mode 100755 index 000000000000..4570a3214d17 --- /dev/null +++ b/buildroot/tests/STM32F103VE_longer_maple @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103VET6 (using maple STM32F1 framework) +# + +# exit on first failure +set -e + +use_example_configs Alfawise/U20 +opt_enable BAUD_RATE_GCODE +exec_test $1 $2 "maple CLASSIC_UI U20 config" "$3" + +use_example_configs Alfawise/U20 +opt_enable BAUD_RATE_GCODE TFT_COLOR_UI +opt_disable TFT_CLASSIC_UI CUSTOM_STATUS_SCREEN_IMAGE +exec_test $1 $2 "maple COLOR_UI U20 config" "$3" + +use_example_configs Alfawise/U20-bltouch +opt_enable BAUD_RATE_GCODE +exec_test $1 $2 "maple BLTouch U20 config" + +# cleanup +restore_configs diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 6350afb40bdf..f487dc62fc72 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -369,10 +369,13 @@ extends = common_stm32 board = genericSTM32F103VE board_build.core = stm32 board_build.variant = MARLIN_F103Vx -board_build.offset = 0x1000 +board_build.offset = 0x10000 board_build.address = 0x08010000 build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC + -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA -UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10 + -DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED +build_unflags = ${common_stm32.build_unflags} + -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED extra_scripts = ${stm32f1_variant.extra_scripts} buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py From be5dec9795783b97aa3f8ab89c0a33091c5a4842 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 18 Jul 2021 01:00:12 +0000 Subject: [PATCH 086/323] [cron] Bump distribution date (2021-07-18) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 0d7518225ca7..c1cd96ecac17 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-17" +//#define STRING_DISTRIBUTION_DATE "2021-07-18" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index a825f38734d6..b88141a5b77a 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-17" + #define STRING_DISTRIBUTION_DATE "2021-07-18" #endif /** From 9d86241d30da0946aa1b16d77fe5f8ef95a9996b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Jul 2021 00:45:17 -0500 Subject: [PATCH 087/323] =?UTF-8?q?=F0=9F=90=9B=20No=20translated=20serial?= =?UTF-8?q?=20strings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 4 +--- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 4 ++-- Marlin/src/gcode/calibrate/M852.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index bb7b227b53b4..1da030b24965 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1273,9 +1273,7 @@ void setup() { if (mcu & RST_SOFTWARE) SERIAL_ECHOLNPGM(STR_SOFTWARE_RESET); HAL_clear_reset_source(); - SERIAL_ECHOPGM_P(GET_TEXT(MSG_MARLIN)); - SERIAL_CHAR(' '); - SERIAL_ECHOLNPGM(SHORT_BUILD_VERSION); + SERIAL_ECHOLNPGM("Marlin " SHORT_BUILD_VERSION); SERIAL_EOL(); #if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR) SERIAL_ECHO_MSG( diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index e1ed013cf2fa..f8e446cf81be 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -916,11 +916,11 @@ void set_message_with_feedback(PGM_P const msg_P) { if (do_ubl_mesh_map) display_map(param.T_map_type); // Show user where we're probing if (parser.seen_test('B')) { - SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT)); + SERIAL_ECHOPGM("Place Shim & Measure"); LCD_MESSAGEPGM(MSG_UBL_BC_INSERT); } else { - SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT2)); + SERIAL_ECHOPGM("Measure"); LCD_MESSAGEPGM(MSG_UBL_BC_INSERT2); } diff --git a/Marlin/src/gcode/calibrate/M852.cpp b/Marlin/src/gcode/calibrate/M852.cpp index 6f1e984bc30d..73b18ad4665e 100644 --- a/Marlin/src/gcode/calibrate/M852.cpp +++ b/Marlin/src/gcode/calibrate/M852.cpp @@ -93,7 +93,7 @@ void GcodeSuite::M852() { if (!ijk) { SERIAL_ECHO_START(); - SERIAL_ECHOPGM_P(GET_TEXT(MSG_SKEW_FACTOR)); + SERIAL_ECHOPGM("Skew Factor"); SERIAL_ECHOPAIR_F(" XY: ", planner.skew_factor.xy, 6); #if ENABLED(SKEW_CORRECTION_FOR_Z) SERIAL_ECHOPAIR_F(" XZ: ", planner.skew_factor.xz, 6); From 49da4ee4e2942f6897b0833bf35c054f9fcab4fa Mon Sep 17 00:00:00 2001 From: squiddity Date: Sat, 17 Jul 2021 22:50:39 -0700 Subject: [PATCH 088/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20M913=20typos=20(#2?= =?UTF-8?q?2385)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/trinamic/M911-M914.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp index f90a30aab2f6..fca16c063025 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp @@ -260,10 +260,10 @@ #endif case Z_AXIS: - TERN_(Z_HAS_STEALTCHOP, if (index < 2) TMC_SET_PWMTHRS(Z,Z)); - TERN_(Z2_HAS_STEALTCHOP, if (index == 0 || index == 2) TMC_SET_PWMTHRS(Z,Z2)); - TERN_(Z3_HAS_STEALTCHOP, if (index == 0 || index == 3) TMC_SET_PWMTHRS(Z,Z3)); - TERN_(Z4_HAS_STEALTCHOP, if (index == 0 || index == 4) TMC_SET_PWMTHRS(Z,Z4)); + TERN_(Z_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(Z,Z)); + TERN_(Z2_HAS_STEALTHCHOP, if (index == 0 || index == 2) TMC_SET_PWMTHRS(Z,Z2)); + TERN_(Z3_HAS_STEALTHCHOP, if (index == 0 || index == 3) TMC_SET_PWMTHRS(Z,Z3)); + TERN_(Z4_HAS_STEALTHCHOP, if (index == 0 || index == 4) TMC_SET_PWMTHRS(Z,Z4)); break; #if E_STEPPERS case E_AXIS: { From e55427aaa2cbe2d37a9502a0f9ac73feceb183dc Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Sat, 17 Jul 2021 23:10:13 -0700 Subject: [PATCH 089/323] =?UTF-8?q?=F0=9F=8E=A8=20Prefer=20DELAY=5FNS=20ov?= =?UTF-8?q?er=20DELAY=5FCYCLES=20(#22382)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/DUE/HAL_SPI.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/HAL/DUE/HAL_SPI.cpp b/Marlin/src/HAL/DUE/HAL_SPI.cpp index f42e8a98027c..758640285b76 100644 --- a/Marlin/src/HAL/DUE/HAL_SPI.cpp +++ b/Marlin/src/HAL/DUE/HAL_SPI.cpp @@ -240,7 +240,7 @@ } // all the others - static uint32_t spiDelayCyclesX4 = 4 * (F_CPU) / 1000000; // 4µs => 125khz + static uint16_t spiDelayNS = 4000; // 4000ns => 125khz static uint8_t spiTransferX(uint8_t b) { // using Mode 0 int bits = 8; @@ -249,12 +249,12 @@ b <<= 1; // little setup time WRITE(SD_SCK_PIN, HIGH); - DELAY_CYCLES(spiDelayCyclesX4); + DELAY_NS(spiDelayNS); b |= (READ(SD_MISO_PIN) != 0); WRITE(SD_SCK_PIN, LOW); - DELAY_CYCLES(spiDelayCyclesX4); + DELAY_NS(spiDelayNS); } while (--bits); return b; } @@ -510,7 +510,7 @@ spiRxBlock = (pfnSpiRxBlock)spiRxBlockX; break; default: - spiDelayCyclesX4 = ((F_CPU) / 1000000) >> (6 - spiRate) << 2; // spiRate of 2 gives the maximum error with current CPU + spiDelayNS = 4000 >> (6 - spiRate); // spiRate of 2 gives the maximum error with current CPU spiTransferTx = (pfnSpiTransfer)spiTransferX; spiTransferRx = (pfnSpiTransfer)spiTransferX; spiTxBlock = (pfnSpiTxBlock)spiTxBlockX; From b34a009bb1e114addf2d831171fab967d93a651f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 18 Jul 2021 19:56:28 -0500 Subject: [PATCH 090/323] =?UTF-8?q?=F0=9F=90=9B=20Change=20font=20for=20se?= =?UTF-8?q?lected=20language=20(#22381)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/multi_language.h | 3 - Marlin/src/lcd/dogm/fontdata/langdata.h | 23 + Marlin/src/lcd/dogm/fontdata/langdata_an.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_bg.h | 23 +- Marlin/src/lcd/dogm/fontdata/langdata_ca.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_cz.h | 25 +- Marlin/src/lcd/dogm/fontdata/langdata_da.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_de.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_el.h | 27 +- Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h | 27 +- Marlin/src/lcd/dogm/fontdata/langdata_en.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_es.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_eu.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_fi.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_fr.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_gl.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_hr.h | 17 +- Marlin/src/lcd/dogm/fontdata/langdata_hu.h | 9 +- Marlin/src/lcd/dogm/fontdata/langdata_it.h | 7 +- .../src/lcd/dogm/fontdata/langdata_jp_kana.h | 31 +- Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h | 219 +++--- Marlin/src/lcd/dogm/fontdata/langdata_nl.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_pl.h | 19 +- Marlin/src/lcd/dogm/fontdata/langdata_pt.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_ro.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_ru.h | 15 +- Marlin/src/lcd/dogm/fontdata/langdata_sk.h | 21 +- Marlin/src/lcd/dogm/fontdata/langdata_test.h | 13 +- Marlin/src/lcd/dogm/fontdata/langdata_tr.h | 13 +- Marlin/src/lcd/dogm/fontdata/langdata_uk.h | 23 +- Marlin/src/lcd/dogm/fontdata/langdata_vi.h | 97 +-- Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h | 719 +++++++++--------- Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h | 605 +++++++-------- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 36 +- Marlin/src/lcd/dogm/u8g_fontutf8.h | 3 + Marlin/src/lcd/language/language_zh_CN.h | 2 +- Marlin/src/lcd/marlinui.cpp | 8 + Marlin/src/lcd/marlinui.h | 12 +- 39 files changed, 1095 insertions(+), 1000 deletions(-) create mode 100644 Marlin/src/lcd/dogm/fontdata/langdata.h diff --git a/Marlin/src/core/multi_language.h b/Marlin/src/core/multi_language.h index 5a26edf8d453..1eaef6930524 100644 --- a/Marlin/src/core/multi_language.h +++ b/Marlin/src/core/multi_language.h @@ -42,15 +42,12 @@ typedef const char Language_Str[]; #ifndef LCD_LANGUAGE_2 #define LCD_LANGUAGE_2 LCD_LANGUAGE #endif - #ifndef LCD_LANGUAGE_3 #define LCD_LANGUAGE_3 LCD_LANGUAGE_2 #endif - #ifndef LCD_LANGUAGE_4 #define LCD_LANGUAGE_4 LCD_LANGUAGE_3 #endif - #ifndef LCD_LANGUAGE_5 #define LCD_LANGUAGE_5 LCD_LANGUAGE_4 #endif diff --git a/Marlin/src/lcd/dogm/fontdata/langdata.h b/Marlin/src/lcd/dogm/fontdata/langdata.h new file mode 100644 index 000000000000..746a3bd0b451 --- /dev/null +++ b/Marlin/src/lcd/dogm/fontdata/langdata.h @@ -0,0 +1,23 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_an.h b/Marlin/src/lcd/dogm/fontdata/langdata_an.h index 7989690f1f17..fb0fdcf893f5 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_an.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_an.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_an[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h index 8d5d7e8321dd..20cd7b9ed74d 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_144_149[96] U8G_FONT_SECTION("fontpage_8_144_149") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0x95,0x00,0x07,0xFF,0x00, @@ -64,14 +66,13 @@ const u8g_fntpgm_uint8_t fontpage_8_206_207[39] U8G_FONT_SECTION("fontpage_8_206 0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0xA8,0xE8,0xA8,0x90,0x04,0x05,0x05,0x06, 0x01,0x00,0x70,0x90,0x70,0x50,0x90}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е' - FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И' - FONTDATA_ITEM(8, 154, 164, fontpage_8_154_164), // 'К' -- 'Ф' - FONTDATA_ITEM(8, 166, 166, fontpage_8_166_166), // 'Ц' -- 'Ц' - FONTDATA_ITEM(8, 175, 195, fontpage_8_175_195), // 'Я' -- 'у' - FONTDATA_ITEM(8, 197, 200, fontpage_8_197_200), // 'х' -- 'ш' - FONTDATA_ITEM(8, 202, 202, fontpage_8_202_202), // 'ъ' -- 'ъ' - FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' +static const uxg_fontinfo_t g_fontinfo_bg[] PROGMEM = { + FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е' + FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И' + FONTDATA_ITEM(8, 154, 164, fontpage_8_154_164), // 'К' -- 'Ф' + FONTDATA_ITEM(8, 166, 166, fontpage_8_166_166), // 'Ц' -- 'Ц' + FONTDATA_ITEM(8, 175, 195, fontpage_8_175_195), // 'Я' -- 'у' + FONTDATA_ITEM(8, 197, 200, fontpage_8_197_200), // 'х' -- 'ш' + FONTDATA_ITEM(8, 202, 202, fontpage_8_202_202), // 'ъ' -- 'ъ' + FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h index 7989690f1f17..deac3678b56e 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_ca[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h index e6894a8d30b2..39f03f3a97d7 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_140_141[47] U8G_FONT_SECTION("fontpage_2_140_141") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8D,0x00,0x0A,0x00,0x00, @@ -40,15 +42,14 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253 0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x08,0x10,0x20,0x40,0x80, 0xF8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' - FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď' - FONTDATA_ITEM(2, 154, 155, fontpage_2_154_155), // 'Ě' -- 'ě' - FONTDATA_ITEM(2, 200, 200, fontpage_2_200_200), // 'ň' -- 'ň' - FONTDATA_ITEM(2, 216, 217, fontpage_2_216_217), // 'Ř' -- 'ř' - FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' - FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' - FONTDATA_ITEM(2, 239, 239, fontpage_2_239_239), // 'ů' -- 'ů' - FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' +static const uxg_fontinfo_t g_fontinfo_cz[] PROGMEM = { + FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' + FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď' + FONTDATA_ITEM(2, 154, 155, fontpage_2_154_155), // 'Ě' -- 'ě' + FONTDATA_ITEM(2, 200, 200, fontpage_2_200_200), // 'ň' -- 'ň' + FONTDATA_ITEM(2, 216, 217, fontpage_2_216_217), // 'Ř' -- 'ř' + FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' + FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' + FONTDATA_ITEM(2, 239, 239, fontpage_2_239_239), // 'ů' -- 'ů' + FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_da.h b/Marlin/src/lcd/dogm/fontdata/langdata_da.h index 7989690f1f17..ad8df9a42976 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_da.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_da.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_da[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_de.h b/Marlin/src/lcd/dogm/fontdata/langdata_de.h index 7989690f1f17..44230fa302b3 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_de.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_de.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_de[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el.h b/Marlin/src/lcd/dogm/fontdata/langdata_el.h index f949f28ca658..6fefab9c61a1 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, @@ -75,16 +77,15 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x01,0x00,0x00, 0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xA8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' - FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' - FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' - FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' - FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' - FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' - FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' - FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' - FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' - FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' +static const uxg_fontinfo_t g_fontinfo_el[] PROGMEM = { + FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' + FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' + FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' + FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' + FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' + FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' + FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' + FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' + FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' + FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h b/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h index f949f28ca658..8d7cba861530 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, @@ -75,16 +77,15 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x01,0x00,0x00, 0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xA8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' - FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' - FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' - FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' - FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' - FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' - FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' - FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' - FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' - FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' +static const uxg_fontinfo_t g_fontinfo_el_gr[] PROGMEM = { + FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' + FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' + FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' + FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' + FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' + FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' + FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' + FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' + FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' + FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_en.h b/Marlin/src/lcd/dogm/fontdata/langdata_en.h index 7989690f1f17..a69161b5620f 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_en.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_en.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_en[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_es.h b/Marlin/src/lcd/dogm/fontdata/langdata_es.h index 7989690f1f17..a8ddb44ce896 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_es.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_es.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_es[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h index 7989690f1f17..3fdc0253bc80 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_eu[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h index 7989690f1f17..25e192753756 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_fi[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h index 7989690f1f17..a3cc160c97ce 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_fr[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h index 7989690f1f17..2f93d05dbe20 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_gl[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h index e5430834ad4a..b5e4d544cca2 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_135_135[31] U8G_FONT_SECTION("fontpage_2_135_135") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x08,0x00,0x00, @@ -22,11 +24,10 @@ const u8g_fntpgm_uint8_t fontpage_2_254_254[31] U8G_FONT_SECTION("fontpage_2_254 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x08,0x00,0x00, 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' - FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' - FONTDATA_ITEM(2, 145, 145, fontpage_2_145_145), // 'đ' -- 'đ' - FONTDATA_ITEM(2, 225, 225, fontpage_2_225_225), // 'š' -- 'š' - FONTDATA_ITEM(2, 254, 254, fontpage_2_254_254), // 'ž' -- 'ž' +static const uxg_fontinfo_t g_fontinfo_hr[] PROGMEM = { + FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' + FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' + FONTDATA_ITEM(2, 145, 145, fontpage_2_145_145), // 'đ' -- 'đ' + FONTDATA_ITEM(2, 225, 225, fontpage_2_225_225), // 'š' -- 'š' + FONTDATA_ITEM(2, 254, 254, fontpage_2_254_254), // 'ž' -- 'ž' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_hu.h b/Marlin/src/lcd/dogm/fontdata/langdata_hu.h index eb43cbea0f62..450662a8c9d1 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_hu.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_hu.h @@ -3,13 +3,14 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_241_241[31] U8G_FONT_SECTION("fontpage_2_241_241") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x08,0x00,0x00, 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x48,0x90,0x00,0x88,0x88,0x88,0x88,0x70}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű' +static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = { + FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_it.h b/Marlin/src/lcd/dogm/fontdata/langdata_it.h index 7989690f1f17..1a41a794fa52 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_it.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_it.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_it[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h b/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h index 4d0ec6ab4fca..dc483b7d2b59 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_97_161_164[65] U8G_FONT_SECTION("fontpage_97_161_164") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA1,0xA4,0x00,0x07,0x00,0x00, @@ -94,18 +96,17 @@ const u8g_fntpgm_uint8_t fontpage_97_252_252[25] U8G_FONT_SECTION("fontpage_97_2 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x05,0x00,0x00, 0x00,0x05,0x02,0x02,0x06,0x00,0x03,0x80,0x78}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ' - FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ' - FONTDATA_ITEM(97, 168, 168, fontpage_97_168_168), // 'エ' -- 'エ' - FONTDATA_ITEM(97, 170, 187, fontpage_97_170_187), // 'オ' -- 'セ' - FONTDATA_ITEM(97, 189, 193, fontpage_97_189_193), // 'ソ' -- 'チ' - FONTDATA_ITEM(97, 195, 211, fontpage_97_195_211), // 'ッ' -- 'ビ' - FONTDATA_ITEM(97, 213, 217, fontpage_97_213_217), // 'フ' -- 'ベ' - FONTDATA_ITEM(97, 219, 220, fontpage_97_219_220), // 'ホ' -- 'ボ' - FONTDATA_ITEM(97, 222, 223, fontpage_97_222_223), // 'マ' -- 'ミ' - FONTDATA_ITEM(97, 225, 237, fontpage_97_225_237), // 'メ' -- 'ロ' - FONTDATA_ITEM(97, 242, 243, fontpage_97_242_243), // 'ヲ' -- 'ン' - FONTDATA_ITEM(97, 252, 252, fontpage_97_252_252), // 'ー' -- 'ー' +static const uxg_fontinfo_t g_fontinfo_jp_kana[] PROGMEM = { + FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ' + FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ' + FONTDATA_ITEM(97, 168, 168, fontpage_97_168_168), // 'エ' -- 'エ' + FONTDATA_ITEM(97, 170, 187, fontpage_97_170_187), // 'オ' -- 'セ' + FONTDATA_ITEM(97, 189, 193, fontpage_97_189_193), // 'ソ' -- 'チ' + FONTDATA_ITEM(97, 195, 211, fontpage_97_195_211), // 'ッ' -- 'ビ' + FONTDATA_ITEM(97, 213, 217, fontpage_97_213_217), // 'フ' -- 'ベ' + FONTDATA_ITEM(97, 219, 220, fontpage_97_219_220), // 'ホ' -- 'ボ' + FONTDATA_ITEM(97, 222, 223, fontpage_97_222_223), // 'マ' -- 'ミ' + FONTDATA_ITEM(97, 225, 237, fontpage_97_225_237), // 'メ' -- 'ロ' + FONTDATA_ITEM(97, 242, 243, fontpage_97_242_243), // 'ヲ' -- 'ン' + FONTDATA_ITEM(97, 252, 252, fontpage_97_252_252), // 'ー' -- 'ー' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h index 23c84d6573d2..31cc0bca36b7 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_344_240_240[34] U8G_FONT_SECTION("fontpage_344_240_240") = { 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x09,0xFE,0x00, @@ -436,112 +438,111 @@ const u8g_fntpgm_uint8_t fontpage_431_136_136[34] U8G_FONT_SECTION("fontpage_431 0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x01,0xFD,0x01,0x71,0x49,0x89,0x49,0x71, 0x01,0x01}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거' - FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고' - FONTDATA_ITEM(347, 248, 248, fontpage_347_248_248), // '그' -- '그' - FONTDATA_ITEM(348, 137, 137, fontpage_348_137_137), // '급' -- '급' - FONTDATA_ITEM(348, 176, 176, fontpage_348_176_176), // '기' -- '기' - FONTDATA_ITEM(348, 197, 197, fontpage_348_197_197), // '깅' -- '깅' - FONTDATA_ITEM(352, 196, 196, fontpage_352_196_196), // '끄' -- '끄' - FONTDATA_ITEM(353, 180, 180, fontpage_353_180_180), // '내' -- '내' - FONTDATA_ITEM(354, 248, 248, fontpage_354_248_248), // '노' -- '노' - FONTDATA_ITEM(356, 132, 132, fontpage_356_132_132), // '누' -- '누' - FONTDATA_ITEM(356, 244, 244, fontpage_356_244_244), // '뉴' -- '뉴' - FONTDATA_ITEM(357, 200, 200, fontpage_357_200_200), // '니' -- '니' - FONTDATA_ITEM(357, 228, 228, fontpage_357_228_228), // '다' -- '다' - FONTDATA_ITEM(357, 249, 249, fontpage_357_249_249), // '당' -- '당' - FONTDATA_ITEM(359, 196, 196, fontpage_359_196_196), // '도' -- '도' - FONTDATA_ITEM(359, 204, 204, fontpage_359_204_204), // '돌' -- '돌' - FONTDATA_ITEM(359, 217, 217, fontpage_359_217_217), // '동' -- '동' - FONTDATA_ITEM(360, 152, 152, fontpage_360_152_152), // '되' -- '되' - FONTDATA_ITEM(360, 156, 156, fontpage_360_156_156), // '된' -- '된' - FONTDATA_ITEM(360, 168, 168, fontpage_360_168_168), // '됨' -- '됨' - FONTDATA_ITEM(361, 164, 164, fontpage_361_164_164), // '뒤' -- '뒤' - FONTDATA_ITEM(361, 220, 220, fontpage_361_220_220), // '드' -- '드' - FONTDATA_ITEM(362, 148, 148, fontpage_362_148_148), // '디' -- '디' - FONTDATA_ITEM(366, 252, 252, fontpage_366_252_252), // '라' -- '라' - FONTDATA_ITEM(367, 236, 236, fontpage_367_236_236), // '러' -- '러' - FONTDATA_ITEM(368, 136, 136, fontpage_368_136_136), // '레' -- '레' - FONTDATA_ITEM(368, 165, 165, fontpage_368_165_165), // '력' -- '력' - FONTDATA_ITEM(368, 220, 220, fontpage_368_220_220), // '로' -- '로' - FONTDATA_ITEM(369, 204, 204, fontpage_369_204_204), // '료' -- '료' - FONTDATA_ITEM(370, 244, 244, fontpage_370_244_244), // '르' -- '르' - FONTDATA_ITEM(371, 172, 172, fontpage_371_172_172), // '리' -- '리' - FONTDATA_ITEM(371, 176, 176, fontpage_371_176_176), // '린' -- '린' - FONTDATA_ITEM(371, 189, 189, fontpage_371_189_189), // '립' -- '립' - FONTDATA_ITEM(371, 193, 193, fontpage_371_193_193), // '링' -- '링' - FONTDATA_ITEM(372, 200, 200, fontpage_372_200_200), // '멈' -- '멈' - FONTDATA_ITEM(372, 212, 212, fontpage_372_212_212), // '메' -- '메' - FONTDATA_ITEM(372, 244, 244, fontpage_372_244_244), // '면' -- '면' - FONTDATA_ITEM(373, 168, 168, fontpage_373_168_168), // '모' -- '모' - FONTDATA_ITEM(373, 187, 187, fontpage_373_187_187), // '못' -- '못' - FONTDATA_ITEM(375, 248, 248, fontpage_375_248_248), // '미' -- '미' - FONTDATA_ITEM(376, 128, 128, fontpage_376_128_128), // '밀' -- '밀' - FONTDATA_ITEM(376, 148, 148, fontpage_376_148_148), // '바' -- '바' - FONTDATA_ITEM(377, 132, 132, fontpage_377_132_132), // '버' -- '버' - FONTDATA_ITEM(377, 160, 160, fontpage_377_160_160), // '베' -- '베' - FONTDATA_ITEM(377, 168, 168, fontpage_377_168_168), // '벨' -- '벨' - FONTDATA_ITEM(377, 248, 248, fontpage_377_248_248), // '본' -- '본' - FONTDATA_ITEM(380, 196, 196, fontpage_380_196_196), // '비' -- '비' - FONTDATA_ITEM(385, 172, 172, fontpage_385_172_172), // '사' -- '사' - FONTDATA_ITEM(385, 189, 189, fontpage_385_189_189), // '삽' -- '삽' - FONTDATA_ITEM(385, 200, 200, fontpage_385_200_200), // '새' -- '새' - FONTDATA_ITEM(386, 164, 164, fontpage_386_164_164), // '설' -- '설' - FONTDATA_ITEM(387, 140, 141, fontpage_387_140_141), // '소' -- '속' - FONTDATA_ITEM(389, 164, 164, fontpage_389_164_164), // '스' -- '스' - FONTDATA_ITEM(389, 172, 172, fontpage_389_172_172), // '슬' -- '슬' - FONTDATA_ITEM(389, 220, 221, fontpage_389_220_221), // '시' -- '식' - FONTDATA_ITEM(395, 180, 180, fontpage_395_180_180), // '어' -- '어' - FONTDATA_ITEM(395, 198, 198, fontpage_395_198_198), // '없' -- '없' - FONTDATA_ITEM(395, 209, 209, fontpage_395_209_209), // '엑' -- '엑' - FONTDATA_ITEM(395, 212, 212, fontpage_395_212_212), // '엔' -- '엔' - FONTDATA_ITEM(395, 244, 244, fontpage_395_244_244), // '열' -- '열' - FONTDATA_ITEM(396, 136, 136, fontpage_396_136_136), // '예' -- '예' - FONTDATA_ITEM(396, 164, 164, fontpage_396_164_164), // '오' -- '오' - FONTDATA_ITEM(396, 168, 168, fontpage_396_168_168), // '온' -- '온' - FONTDATA_ITEM(396, 196, 196, fontpage_396_196_196), // '완' -- '완' - FONTDATA_ITEM(397, 208, 208, fontpage_397_208_208), // '원' -- '원' - FONTDATA_ITEM(398, 132, 132, fontpage_398_132_132), // '위' -- '위' - FONTDATA_ITEM(398, 188, 188, fontpage_398_188_188), // '으' -- '으' - FONTDATA_ITEM(398, 204, 204, fontpage_398_204_204), // '음' -- '음' - FONTDATA_ITEM(398, 244, 244, fontpage_398_244_244), // '이' -- '이' - FONTDATA_ITEM(398, 252, 253, fontpage_398_252_253), // '일' -- '읽' - FONTDATA_ITEM(399, 133, 133, fontpage_399_133_133), // '입' -- '입' - FONTDATA_ITEM(399, 144, 145, fontpage_399_144_145), // '자' -- '작' - FONTDATA_ITEM(399, 152, 152, fontpage_399_152_152), // '잘' -- '잘' - FONTDATA_ITEM(399, 165, 165, fontpage_399_165_165), // '장' -- '장' - FONTDATA_ITEM(399, 172, 172, fontpage_399_172_172), // '재' -- '재' - FONTDATA_ITEM(400, 128, 128, fontpage_400_128_128), // '저' -- '저' - FONTDATA_ITEM(400, 132, 132, fontpage_400_132_132), // '전' -- '전' - FONTDATA_ITEM(400, 149, 149, fontpage_400_149_149), // '정' -- '정' - FONTDATA_ITEM(400, 156, 156, fontpage_400_156_156), // '제' -- '제' - FONTDATA_ITEM(401, 253, 253, fontpage_401_253_253), // '죽' -- '죽' - FONTDATA_ITEM(402, 128, 128, fontpage_402_128_128), // '준' -- '준' - FONTDATA_ITEM(402, 145, 145, fontpage_402_145_145), // '중' -- '중' - FONTDATA_ITEM(403, 144, 144, fontpage_403_144_144), // '즐' -- '즐' - FONTDATA_ITEM(403, 192, 192, fontpage_403_192_192), // '지' -- '지' - FONTDATA_ITEM(409, 152, 152, fontpage_409_152_152), // '처' -- '처' - FONTDATA_ITEM(410, 136, 136, fontpage_410_136_136), // '초' -- '초' - FONTDATA_ITEM(411, 149, 149, fontpage_411_149_149), // '축' -- '축' - FONTDATA_ITEM(411, 156, 156, fontpage_411_156_156), // '출' -- '출' - FONTDATA_ITEM(411, 164, 164, fontpage_411_164_164), // '춤' -- '춤' - FONTDATA_ITEM(411, 232, 232, fontpage_411_232_232), // '취' -- '취' - FONTDATA_ITEM(412, 216, 216, fontpage_412_216_216), // '치' -- '치' - FONTDATA_ITEM(412, 232, 232, fontpage_412_232_232), // '침' -- '침' - FONTDATA_ITEM(412, 244, 244, fontpage_412_244_244), // '카' -- '카' - FONTDATA_ITEM(414, 156, 156, fontpage_414_156_156), // '켜' -- '켜' - FONTDATA_ITEM(417, 209, 209, fontpage_417_209_209), // '탑' -- '탑' - FONTDATA_ITEM(418, 176, 176, fontpage_418_176_176), // '터' -- '터' - FONTDATA_ITEM(418, 204, 204, fontpage_418_204_204), // '테' -- '테' - FONTDATA_ITEM(419, 160, 160, fontpage_419_160_160), // '토' -- '토' - FONTDATA_ITEM(421, 184, 184, fontpage_421_184_184), // '트' -- '트' - FONTDATA_ITEM(423, 156, 156, fontpage_423_156_156), // '펜' -- '펜' - FONTDATA_ITEM(426, 132, 132, fontpage_426_132_132), // '프' -- '프' - FONTDATA_ITEM(426, 216, 216, fontpage_426_216_216), // '하' -- '하' - FONTDATA_ITEM(426, 233, 233, fontpage_426_233_233), // '합' -- '합' - FONTDATA_ITEM(428, 200, 200, fontpage_428_200_200), // '홈' -- '홈' - FONTDATA_ITEM(428, 212, 212, fontpage_428_212_212), // '화' -- '화' - FONTDATA_ITEM(431, 136, 136, fontpage_431_136_136), // '히' -- '히' +static const uxg_fontinfo_t g_fontinfo_ko_KR[] PROGMEM = { + FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거' + FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고' + FONTDATA_ITEM(347, 248, 248, fontpage_347_248_248), // '그' -- '그' + FONTDATA_ITEM(348, 137, 137, fontpage_348_137_137), // '급' -- '급' + FONTDATA_ITEM(348, 176, 176, fontpage_348_176_176), // '기' -- '기' + FONTDATA_ITEM(348, 197, 197, fontpage_348_197_197), // '깅' -- '깅' + FONTDATA_ITEM(352, 196, 196, fontpage_352_196_196), // '끄' -- '끄' + FONTDATA_ITEM(353, 180, 180, fontpage_353_180_180), // '내' -- '내' + FONTDATA_ITEM(354, 248, 248, fontpage_354_248_248), // '노' -- '노' + FONTDATA_ITEM(356, 132, 132, fontpage_356_132_132), // '누' -- '누' + FONTDATA_ITEM(356, 244, 244, fontpage_356_244_244), // '뉴' -- '뉴' + FONTDATA_ITEM(357, 200, 200, fontpage_357_200_200), // '니' -- '니' + FONTDATA_ITEM(357, 228, 228, fontpage_357_228_228), // '다' -- '다' + FONTDATA_ITEM(357, 249, 249, fontpage_357_249_249), // '당' -- '당' + FONTDATA_ITEM(359, 196, 196, fontpage_359_196_196), // '도' -- '도' + FONTDATA_ITEM(359, 204, 204, fontpage_359_204_204), // '돌' -- '돌' + FONTDATA_ITEM(359, 217, 217, fontpage_359_217_217), // '동' -- '동' + FONTDATA_ITEM(360, 152, 152, fontpage_360_152_152), // '되' -- '되' + FONTDATA_ITEM(360, 156, 156, fontpage_360_156_156), // '된' -- '된' + FONTDATA_ITEM(360, 168, 168, fontpage_360_168_168), // '됨' -- '됨' + FONTDATA_ITEM(361, 164, 164, fontpage_361_164_164), // '뒤' -- '뒤' + FONTDATA_ITEM(361, 220, 220, fontpage_361_220_220), // '드' -- '드' + FONTDATA_ITEM(362, 148, 148, fontpage_362_148_148), // '디' -- '디' + FONTDATA_ITEM(366, 252, 252, fontpage_366_252_252), // '라' -- '라' + FONTDATA_ITEM(367, 236, 236, fontpage_367_236_236), // '러' -- '러' + FONTDATA_ITEM(368, 136, 136, fontpage_368_136_136), // '레' -- '레' + FONTDATA_ITEM(368, 165, 165, fontpage_368_165_165), // '력' -- '력' + FONTDATA_ITEM(368, 220, 220, fontpage_368_220_220), // '로' -- '로' + FONTDATA_ITEM(369, 204, 204, fontpage_369_204_204), // '료' -- '료' + FONTDATA_ITEM(370, 244, 244, fontpage_370_244_244), // '르' -- '르' + FONTDATA_ITEM(371, 172, 172, fontpage_371_172_172), // '리' -- '리' + FONTDATA_ITEM(371, 176, 176, fontpage_371_176_176), // '린' -- '린' + FONTDATA_ITEM(371, 189, 189, fontpage_371_189_189), // '립' -- '립' + FONTDATA_ITEM(371, 193, 193, fontpage_371_193_193), // '링' -- '링' + FONTDATA_ITEM(372, 200, 200, fontpage_372_200_200), // '멈' -- '멈' + FONTDATA_ITEM(372, 212, 212, fontpage_372_212_212), // '메' -- '메' + FONTDATA_ITEM(372, 244, 244, fontpage_372_244_244), // '면' -- '면' + FONTDATA_ITEM(373, 168, 168, fontpage_373_168_168), // '모' -- '모' + FONTDATA_ITEM(373, 187, 187, fontpage_373_187_187), // '못' -- '못' + FONTDATA_ITEM(375, 248, 248, fontpage_375_248_248), // '미' -- '미' + FONTDATA_ITEM(376, 128, 128, fontpage_376_128_128), // '밀' -- '밀' + FONTDATA_ITEM(376, 148, 148, fontpage_376_148_148), // '바' -- '바' + FONTDATA_ITEM(377, 132, 132, fontpage_377_132_132), // '버' -- '버' + FONTDATA_ITEM(377, 160, 160, fontpage_377_160_160), // '베' -- '베' + FONTDATA_ITEM(377, 168, 168, fontpage_377_168_168), // '벨' -- '벨' + FONTDATA_ITEM(377, 248, 248, fontpage_377_248_248), // '본' -- '본' + FONTDATA_ITEM(380, 196, 196, fontpage_380_196_196), // '비' -- '비' + FONTDATA_ITEM(385, 172, 172, fontpage_385_172_172), // '사' -- '사' + FONTDATA_ITEM(385, 189, 189, fontpage_385_189_189), // '삽' -- '삽' + FONTDATA_ITEM(385, 200, 200, fontpage_385_200_200), // '새' -- '새' + FONTDATA_ITEM(386, 164, 164, fontpage_386_164_164), // '설' -- '설' + FONTDATA_ITEM(387, 140, 141, fontpage_387_140_141), // '소' -- '속' + FONTDATA_ITEM(389, 164, 164, fontpage_389_164_164), // '스' -- '스' + FONTDATA_ITEM(389, 172, 172, fontpage_389_172_172), // '슬' -- '슬' + FONTDATA_ITEM(389, 220, 221, fontpage_389_220_221), // '시' -- '식' + FONTDATA_ITEM(395, 180, 180, fontpage_395_180_180), // '어' -- '어' + FONTDATA_ITEM(395, 198, 198, fontpage_395_198_198), // '없' -- '없' + FONTDATA_ITEM(395, 209, 209, fontpage_395_209_209), // '엑' -- '엑' + FONTDATA_ITEM(395, 212, 212, fontpage_395_212_212), // '엔' -- '엔' + FONTDATA_ITEM(395, 244, 244, fontpage_395_244_244), // '열' -- '열' + FONTDATA_ITEM(396, 136, 136, fontpage_396_136_136), // '예' -- '예' + FONTDATA_ITEM(396, 164, 164, fontpage_396_164_164), // '오' -- '오' + FONTDATA_ITEM(396, 168, 168, fontpage_396_168_168), // '온' -- '온' + FONTDATA_ITEM(396, 196, 196, fontpage_396_196_196), // '완' -- '완' + FONTDATA_ITEM(397, 208, 208, fontpage_397_208_208), // '원' -- '원' + FONTDATA_ITEM(398, 132, 132, fontpage_398_132_132), // '위' -- '위' + FONTDATA_ITEM(398, 188, 188, fontpage_398_188_188), // '으' -- '으' + FONTDATA_ITEM(398, 204, 204, fontpage_398_204_204), // '음' -- '음' + FONTDATA_ITEM(398, 244, 244, fontpage_398_244_244), // '이' -- '이' + FONTDATA_ITEM(398, 252, 253, fontpage_398_252_253), // '일' -- '읽' + FONTDATA_ITEM(399, 133, 133, fontpage_399_133_133), // '입' -- '입' + FONTDATA_ITEM(399, 144, 145, fontpage_399_144_145), // '자' -- '작' + FONTDATA_ITEM(399, 152, 152, fontpage_399_152_152), // '잘' -- '잘' + FONTDATA_ITEM(399, 165, 165, fontpage_399_165_165), // '장' -- '장' + FONTDATA_ITEM(399, 172, 172, fontpage_399_172_172), // '재' -- '재' + FONTDATA_ITEM(400, 128, 128, fontpage_400_128_128), // '저' -- '저' + FONTDATA_ITEM(400, 132, 132, fontpage_400_132_132), // '전' -- '전' + FONTDATA_ITEM(400, 149, 149, fontpage_400_149_149), // '정' -- '정' + FONTDATA_ITEM(400, 156, 156, fontpage_400_156_156), // '제' -- '제' + FONTDATA_ITEM(401, 253, 253, fontpage_401_253_253), // '죽' -- '죽' + FONTDATA_ITEM(402, 128, 128, fontpage_402_128_128), // '준' -- '준' + FONTDATA_ITEM(402, 145, 145, fontpage_402_145_145), // '중' -- '중' + FONTDATA_ITEM(403, 144, 144, fontpage_403_144_144), // '즐' -- '즐' + FONTDATA_ITEM(403, 192, 192, fontpage_403_192_192), // '지' -- '지' + FONTDATA_ITEM(409, 152, 152, fontpage_409_152_152), // '처' -- '처' + FONTDATA_ITEM(410, 136, 136, fontpage_410_136_136), // '초' -- '초' + FONTDATA_ITEM(411, 149, 149, fontpage_411_149_149), // '축' -- '축' + FONTDATA_ITEM(411, 156, 156, fontpage_411_156_156), // '출' -- '출' + FONTDATA_ITEM(411, 164, 164, fontpage_411_164_164), // '춤' -- '춤' + FONTDATA_ITEM(411, 232, 232, fontpage_411_232_232), // '취' -- '취' + FONTDATA_ITEM(412, 216, 216, fontpage_412_216_216), // '치' -- '치' + FONTDATA_ITEM(412, 232, 232, fontpage_412_232_232), // '침' -- '침' + FONTDATA_ITEM(412, 244, 244, fontpage_412_244_244), // '카' -- '카' + FONTDATA_ITEM(414, 156, 156, fontpage_414_156_156), // '켜' -- '켜' + FONTDATA_ITEM(417, 209, 209, fontpage_417_209_209), // '탑' -- '탑' + FONTDATA_ITEM(418, 176, 176, fontpage_418_176_176), // '터' -- '터' + FONTDATA_ITEM(418, 204, 204, fontpage_418_204_204), // '테' -- '테' + FONTDATA_ITEM(419, 160, 160, fontpage_419_160_160), // '토' -- '토' + FONTDATA_ITEM(421, 184, 184, fontpage_421_184_184), // '트' -- '트' + FONTDATA_ITEM(423, 156, 156, fontpage_423_156_156), // '펜' -- '펜' + FONTDATA_ITEM(426, 132, 132, fontpage_426_132_132), // '프' -- '프' + FONTDATA_ITEM(426, 216, 216, fontpage_426_216_216), // '하' -- '하' + FONTDATA_ITEM(426, 233, 233, fontpage_426_233_233), // '합' -- '합' + FONTDATA_ITEM(428, 200, 200, fontpage_428_200_200), // '홈' -- '홈' + FONTDATA_ITEM(428, 212, 212, fontpage_428_212_212), // '화' -- '화' + FONTDATA_ITEM(431, 136, 136, fontpage_431_136_136), // '히' -- '히' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h index 7989690f1f17..e76eff334820 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_nl[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h index 11163d9177fa..e89a6c159a4e 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_132_133[45] U8G_FONT_SECTION("fontpage_2_132_133") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x84,0x85,0x00,0x07,0xFE,0x00, @@ -29,12 +31,11 @@ const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 132, 133, fontpage_2_132_133), // 'Ą' -- 'ą' - FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' - FONTDATA_ITEM(2, 153, 153, fontpage_2_153_153), // 'ę' -- 'ę' - FONTDATA_ITEM(2, 193, 196, fontpage_2_193_196), // 'Ł' -- 'ń' - FONTDATA_ITEM(2, 218, 219, fontpage_2_218_219), // 'Ś' -- 'ś' - FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'ż' -- 'ż' +static const uxg_fontinfo_t g_fontinfo_pl[] PROGMEM = { + FONTDATA_ITEM(2, 132, 133, fontpage_2_132_133), // 'Ą' -- 'ą' + FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' + FONTDATA_ITEM(2, 153, 153, fontpage_2_153_153), // 'ę' -- 'ę' + FONTDATA_ITEM(2, 193, 196, fontpage_2_193_196), // 'Ł' -- 'ń' + FONTDATA_ITEM(2, 218, 219, fontpage_2_218_219), // 'Ś' -- 'ś' + FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'ż' -- 'ż' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h index 7989690f1f17..61f857e587b6 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_pt[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h index 7989690f1f17..b0ed5ad5cffc 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_pt_br[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h index 7989690f1f17..6be486355314 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_ro[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h index 617119dde30f..3f857a1b3f22 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_144_168[348] U8G_FONT_SECTION("fontpage_8_144_168") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0xA8,0x00,0x0A,0xFE,0x00, @@ -64,10 +66,9 @@ const u8g_fntpgm_uint8_t fontpage_8_209_209[30] U8G_FONT_SECTION("fontpage_8_209 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD1,0xD1,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0xF0,0x80,0x70}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 144, 168, fontpage_8_144_168), // 'А' -- 'Ш' - FONTDATA_ITEM(8, 171, 173, fontpage_8_171_173), // 'Ы' -- 'Э' - FONTDATA_ITEM(8, 175, 207, fontpage_8_175_207), // 'Я' -- 'я' - FONTDATA_ITEM(8, 209, 209, fontpage_8_209_209), // 'ё' -- 'ё' +static const uxg_fontinfo_t g_fontinfo_ru[] PROGMEM = { + FONTDATA_ITEM(8, 144, 168, fontpage_8_144_168), // 'А' -- 'Ш' + FONTDATA_ITEM(8, 171, 173, fontpage_8_171_173), // 'Ы' -- 'Э' + FONTDATA_ITEM(8, 175, 207, fontpage_8_175_207), // 'Я' -- 'я' + FONTDATA_ITEM(8, 209, 209, fontpage_8_209_209), // 'ё' -- 'ё' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h index 152d74bbda21..4580ce5b7b82 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_140_143[79] U8G_FONT_SECTION("fontpage_2_140_143") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8F,0x00,0x0A,0x00,0x00, @@ -37,13 +39,12 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253 0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x08,0x10,0x20,0x40,0x80, 0xF8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď' - FONTDATA_ITEM(2, 186, 186, fontpage_2_186_186), // 'ĺ' -- 'ĺ' - FONTDATA_ITEM(2, 189, 190, fontpage_2_189_190), // 'Ľ' -- 'ľ' - FONTDATA_ITEM(2, 199, 200, fontpage_2_199_200), // 'Ň' -- 'ň' - FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' - FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' - FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' +static const uxg_fontinfo_t g_fontinfo_sk[] PROGMEM = { + FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď' + FONTDATA_ITEM(2, 186, 186, fontpage_2_186_186), // 'ĺ' -- 'ĺ' + FONTDATA_ITEM(2, 189, 190, fontpage_2_189_190), // 'Ľ' -- 'ľ' + FONTDATA_ITEM(2, 199, 200, fontpage_2_199_200), // 'Ň' -- 'ň' + FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' + FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' + FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_test.h b/Marlin/src/lcd/dogm/fontdata/langdata_test.h index ca6e369eb180..da76a3104156 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_test.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_test.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_128_255[1677] U8G_FONT_SECTION("fontpage_8_128_255") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x00,0x0A,0xFE,0x00, @@ -223,9 +225,8 @@ const u8g_fntpgm_uint8_t fontpage_97_193_255[822] U8G_FONT_SECTION("fontpage_97_ 0x06,0x00,0x02,0x28,0x28,0x00,0x80,0x60,0x10,0x08,0x05,0x06,0x06,0x06,0x00,0x00, 0xF8,0x08,0x08,0x08,0x08,0x08}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ' - FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ' - FONTDATA_ITEM(97, 193, 255, fontpage_97_193_255), // 'チ' -- 'ヿ' +static const uxg_fontinfo_t g_fontinfo_test[] PROGMEM = { + FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ' + FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ' + FONTDATA_ITEM(97, 193, 255, fontpage_97_193_255), // 'チ' -- 'ヿ' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h index aeb1124cf204..0ac02435a5dd 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_158_159[49] U8G_FONT_SECTION("fontpage_2_158_159") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9E,0x9F,0x00,0x0A,0xFE,0x00, @@ -19,9 +21,8 @@ const u8g_fntpgm_uint8_t fontpage_2_222_223[45] U8G_FONT_SECTION("fontpage_2_222 0x00,0x05,0x09,0x09,0x06,0x00,0xFE,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x10,0x60, 0x05,0x07,0x07,0x06,0x00,0xFE,0x78,0x80,0x70,0x08,0xF0,0x10,0x60}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 158, 159, fontpage_2_158_159), // 'Ğ' -- 'ğ' - FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı' - FONTDATA_ITEM(2, 222, 223, fontpage_2_222_223), // 'Ş' -- 'ş' +static const uxg_fontinfo_t g_fontinfo_tr[] PROGMEM = { + FONTDATA_ITEM(2, 158, 159, fontpage_2_158_159), // 'Ğ' -- 'ğ' + FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı' + FONTDATA_ITEM(2, 222, 223, fontpage_2_222_223), // 'Ş' -- 'ş' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h index fe409d4e3cff..b25e2f6db4e3 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_134_134[30] U8G_FONT_SECTION("fontpage_8_134_134") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x86,0x86,0x00,0x07,0x00,0x00, @@ -72,14 +74,13 @@ const u8g_fntpgm_uint8_t fontpage_8_214_215[41] U8G_FONT_SECTION("fontpage_8_214 0x00,0x03,0x06,0x06,0x06,0x01,0x00,0x40,0x00,0xC0,0x40,0x40,0xE0,0x03,0x06,0x06, 0x06,0x01,0x00,0xA0,0x00,0xC0,0x40,0x40,0xE0}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І' - FONTDATA_ITEM(8, 144, 169, fontpage_8_144_169), // 'А' -- 'Щ' - FONTDATA_ITEM(8, 172, 172, fontpage_8_172_172), // 'Ь' -- 'Ь' - FONTDATA_ITEM(8, 175, 201, fontpage_8_175_201), // 'Я' -- 'щ' - FONTDATA_ITEM(8, 204, 204, fontpage_8_204_204), // 'ь' -- 'ь' - FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' - FONTDATA_ITEM(8, 212, 212, fontpage_8_212_212), // 'є' -- 'є' - FONTDATA_ITEM(8, 214, 215, fontpage_8_214_215), // 'і' -- 'ї' +static const uxg_fontinfo_t g_fontinfo_uk[] PROGMEM = { + FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І' + FONTDATA_ITEM(8, 144, 169, fontpage_8_144_169), // 'А' -- 'Щ' + FONTDATA_ITEM(8, 172, 172, fontpage_8_172_172), // 'Ь' -- 'Ь' + FONTDATA_ITEM(8, 175, 201, fontpage_8_175_201), // 'Я' -- 'щ' + FONTDATA_ITEM(8, 204, 204, fontpage_8_204_204), // 'ь' -- 'ь' + FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' + FONTDATA_ITEM(8, 212, 212, fontpage_8_212_212), // 'є' -- 'є' + FONTDATA_ITEM(8, 214, 215, fontpage_8_214_215), // 'і' -- 'ї' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_vi.h b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h index 998ae44af1a8..303c4c66d637 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_vi.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_131_131[31] U8G_FONT_SECTION("fontpage_2_131_131") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x08,0x00,0x00, @@ -177,51 +179,50 @@ const u8g_fntpgm_uint8_t fontpage_61_241_241[32] U8G_FONT_SECTION("fontpage_61_2 0x00,0x06,0x09,0x09,0x07,0x00,0xFE,0x0C,0x04,0x88,0x88,0x88,0x88,0x70,0x00,0x20 }; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 131, 131, fontpage_2_131_131), // 'ă' -- 'ă' - FONTDATA_ITEM(2, 144, 145, fontpage_2_144_145), // 'Đ' -- 'đ' - FONTDATA_ITEM(2, 169, 169, fontpage_2_169_169), // 'ĩ' -- 'ĩ' - FONTDATA_ITEM(3, 161, 161, fontpage_3_161_161), // 'ơ' -- 'ơ' - FONTDATA_ITEM(3, 175, 176, fontpage_3_175_176), // 'Ư' -- 'ư' - FONTDATA_ITEM(6, 131, 131, fontpage_6_131_131), // '̃' -- '̃' - FONTDATA_ITEM(6, 137, 137, fontpage_6_137_137), // '̉' -- '̉' - FONTDATA_ITEM(6, 163, 163, fontpage_6_163_163), // '̣' -- '̣' - FONTDATA_ITEM(6, 192, 193, fontpage_6_192_193), // '̀' -- '́' - FONTDATA_ITEM(61, 161, 161, fontpage_61_161_161), // 'ạ' -- 'ạ' - FONTDATA_ITEM(61, 163, 163, fontpage_61_163_163), // 'ả' -- 'ả' - FONTDATA_ITEM(61, 165, 165, fontpage_61_165_165), // 'ấ' -- 'ấ' - FONTDATA_ITEM(61, 167, 167, fontpage_61_167_167), // 'ầ' -- 'ầ' - FONTDATA_ITEM(61, 169, 169, fontpage_61_169_169), // 'ẩ' -- 'ẩ' - FONTDATA_ITEM(61, 173, 173, fontpage_61_173_173), // 'ậ' -- 'ậ' - FONTDATA_ITEM(61, 175, 175, fontpage_61_175_175), // 'ắ' -- 'ắ' - FONTDATA_ITEM(61, 177, 177, fontpage_61_177_177), // 'ằ' -- 'ằ' - FONTDATA_ITEM(61, 179, 179, fontpage_61_179_179), // 'ẳ' -- 'ẳ' - FONTDATA_ITEM(61, 181, 181, fontpage_61_181_181), // 'ẵ' -- 'ẵ' - FONTDATA_ITEM(61, 183, 183, fontpage_61_183_183), // 'ặ' -- 'ặ' - FONTDATA_ITEM(61, 191, 191, fontpage_61_191_191), // 'ế' -- 'ế' - FONTDATA_ITEM(61, 193, 193, fontpage_61_193_193), // 'ề' -- 'ề' - FONTDATA_ITEM(61, 195, 195, fontpage_61_195_195), // 'ể' -- 'ể' - FONTDATA_ITEM(61, 199, 199, fontpage_61_199_199), // 'ệ' -- 'ệ' - FONTDATA_ITEM(61, 201, 201, fontpage_61_201_201), // 'ỉ' -- 'ỉ' - FONTDATA_ITEM(61, 203, 203, fontpage_61_203_203), // 'ị' -- 'ị' - FONTDATA_ITEM(61, 205, 205, fontpage_61_205_205), // 'ọ' -- 'ọ' - FONTDATA_ITEM(61, 207, 207, fontpage_61_207_207), // 'ỏ' -- 'ỏ' - FONTDATA_ITEM(61, 209, 209, fontpage_61_209_209), // 'ố' -- 'ố' - FONTDATA_ITEM(61, 211, 211, fontpage_61_211_211), // 'ồ' -- 'ồ' - FONTDATA_ITEM(61, 213, 213, fontpage_61_213_213), // 'ổ' -- 'ổ' - FONTDATA_ITEM(61, 215, 215, fontpage_61_215_215), // 'ỗ' -- 'ỗ' - FONTDATA_ITEM(61, 217, 217, fontpage_61_217_217), // 'ộ' -- 'ộ' - FONTDATA_ITEM(61, 219, 219, fontpage_61_219_219), // 'ớ' -- 'ớ' - FONTDATA_ITEM(61, 221, 221, fontpage_61_221_221), // 'ờ' -- 'ờ' - FONTDATA_ITEM(61, 223, 223, fontpage_61_223_223), // 'ở' -- 'ở' - FONTDATA_ITEM(61, 225, 225, fontpage_61_225_225), // 'ỡ' -- 'ỡ' - FONTDATA_ITEM(61, 227, 227, fontpage_61_227_227), // 'ợ' -- 'ợ' - FONTDATA_ITEM(61, 229, 229, fontpage_61_229_229), // 'ụ' -- 'ụ' - FONTDATA_ITEM(61, 231, 231, fontpage_61_231_231), // 'ủ' -- 'ủ' - FONTDATA_ITEM(61, 233, 233, fontpage_61_233_233), // 'ứ' -- 'ứ' - FONTDATA_ITEM(61, 235, 235, fontpage_61_235_235), // 'ừ' -- 'ừ' - FONTDATA_ITEM(61, 237, 237, fontpage_61_237_237), // 'ử' -- 'ử' - FONTDATA_ITEM(61, 239, 239, fontpage_61_239_239), // 'ữ' -- 'ữ' - FONTDATA_ITEM(61, 241, 241, fontpage_61_241_241), // 'ự' -- 'ự' +static const uxg_fontinfo_t g_fontinfo_vi[] PROGMEM = { + FONTDATA_ITEM(2, 131, 131, fontpage_2_131_131), // 'ă' -- 'ă' + FONTDATA_ITEM(2, 144, 145, fontpage_2_144_145), // 'Đ' -- 'đ' + FONTDATA_ITEM(2, 169, 169, fontpage_2_169_169), // 'ĩ' -- 'ĩ' + FONTDATA_ITEM(3, 161, 161, fontpage_3_161_161), // 'ơ' -- 'ơ' + FONTDATA_ITEM(3, 175, 176, fontpage_3_175_176), // 'Ư' -- 'ư' + FONTDATA_ITEM(6, 131, 131, fontpage_6_131_131), // '̃' -- '̃' + FONTDATA_ITEM(6, 137, 137, fontpage_6_137_137), // '̉' -- '̉' + FONTDATA_ITEM(6, 163, 163, fontpage_6_163_163), // '̣' -- '̣' + FONTDATA_ITEM(6, 192, 193, fontpage_6_192_193), // '̀' -- '́' + FONTDATA_ITEM(61, 161, 161, fontpage_61_161_161), // 'ạ' -- 'ạ' + FONTDATA_ITEM(61, 163, 163, fontpage_61_163_163), // 'ả' -- 'ả' + FONTDATA_ITEM(61, 165, 165, fontpage_61_165_165), // 'ấ' -- 'ấ' + FONTDATA_ITEM(61, 167, 167, fontpage_61_167_167), // 'ầ' -- 'ầ' + FONTDATA_ITEM(61, 169, 169, fontpage_61_169_169), // 'ẩ' -- 'ẩ' + FONTDATA_ITEM(61, 173, 173, fontpage_61_173_173), // 'ậ' -- 'ậ' + FONTDATA_ITEM(61, 175, 175, fontpage_61_175_175), // 'ắ' -- 'ắ' + FONTDATA_ITEM(61, 177, 177, fontpage_61_177_177), // 'ằ' -- 'ằ' + FONTDATA_ITEM(61, 179, 179, fontpage_61_179_179), // 'ẳ' -- 'ẳ' + FONTDATA_ITEM(61, 181, 181, fontpage_61_181_181), // 'ẵ' -- 'ẵ' + FONTDATA_ITEM(61, 183, 183, fontpage_61_183_183), // 'ặ' -- 'ặ' + FONTDATA_ITEM(61, 191, 191, fontpage_61_191_191), // 'ế' -- 'ế' + FONTDATA_ITEM(61, 193, 193, fontpage_61_193_193), // 'ề' -- 'ề' + FONTDATA_ITEM(61, 195, 195, fontpage_61_195_195), // 'ể' -- 'ể' + FONTDATA_ITEM(61, 199, 199, fontpage_61_199_199), // 'ệ' -- 'ệ' + FONTDATA_ITEM(61, 201, 201, fontpage_61_201_201), // 'ỉ' -- 'ỉ' + FONTDATA_ITEM(61, 203, 203, fontpage_61_203_203), // 'ị' -- 'ị' + FONTDATA_ITEM(61, 205, 205, fontpage_61_205_205), // 'ọ' -- 'ọ' + FONTDATA_ITEM(61, 207, 207, fontpage_61_207_207), // 'ỏ' -- 'ỏ' + FONTDATA_ITEM(61, 209, 209, fontpage_61_209_209), // 'ố' -- 'ố' + FONTDATA_ITEM(61, 211, 211, fontpage_61_211_211), // 'ồ' -- 'ồ' + FONTDATA_ITEM(61, 213, 213, fontpage_61_213_213), // 'ổ' -- 'ổ' + FONTDATA_ITEM(61, 215, 215, fontpage_61_215_215), // 'ỗ' -- 'ỗ' + FONTDATA_ITEM(61, 217, 217, fontpage_61_217_217), // 'ộ' -- 'ộ' + FONTDATA_ITEM(61, 219, 219, fontpage_61_219_219), // 'ớ' -- 'ớ' + FONTDATA_ITEM(61, 221, 221, fontpage_61_221_221), // 'ờ' -- 'ờ' + FONTDATA_ITEM(61, 223, 223, fontpage_61_223_223), // 'ở' -- 'ở' + FONTDATA_ITEM(61, 225, 225, fontpage_61_225_225), // 'ỡ' -- 'ỡ' + FONTDATA_ITEM(61, 227, 227, fontpage_61_227_227), // 'ợ' -- 'ợ' + FONTDATA_ITEM(61, 229, 229, fontpage_61_229_229), // 'ụ' -- 'ụ' + FONTDATA_ITEM(61, 231, 231, fontpage_61_231_231), // 'ủ' -- 'ủ' + FONTDATA_ITEM(61, 233, 233, fontpage_61_233_233), // 'ứ' -- 'ứ' + FONTDATA_ITEM(61, 235, 235, fontpage_61_235_235), // 'ừ' -- 'ừ' + FONTDATA_ITEM(61, 237, 237, fontpage_61_237_237), // 'ử' -- 'ử' + FONTDATA_ITEM(61, 239, 239, fontpage_61_239_239), // 'ữ' -- 'ữ' + FONTDATA_ITEM(61, 241, 241, fontpage_61_241_241), // 'ự' -- 'ự' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h index 8d74ba4414ed..664fa5f4bfe9 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_64_157_157[26] U8G_FONT_SECTION("fontpage_64_157_157") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9D,0x9D,0x00,0x07,0x00,0x00, @@ -1462,362 +1464,361 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9A,0x9A,0x00,0x08,0x00,0x00, 0x00,0x02,0x07,0x07,0x0C,0x06,0x01,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(64, 157, 157, fontpage_64_157_157), // '”' -- '”' - FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' - FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' - FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' - FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' - FONTDATA_ITEM(156, 147, 147, fontpage_156_147_147), // '专' -- '专' - FONTDATA_ITEM(156, 157, 157, fontpage_156_157_157), // '丝' -- '丝' - FONTDATA_ITEM(156, 170, 170, fontpage_156_170_170), // '个' -- '个' - FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' - FONTDATA_ITEM(156, 186, 187, fontpage_156_186_187), // '为' -- '主' - FONTDATA_ITEM(156, 201, 201, fontpage_156_201_201), // '义' -- '义' - FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' - FONTDATA_ITEM(157, 134, 134, fontpage_157_134_134), // '了' -- '了' - FONTDATA_ITEM(157, 140, 140, fontpage_157_140_140), // '二' -- '二' - FONTDATA_ITEM(157, 142, 142, fontpage_157_142_142), // '于' -- '于' - FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' - FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' - FONTDATA_ITEM(157, 206, 206, fontpage_157_206_206), // '从' -- '从' - FONTDATA_ITEM(157, 228, 229, fontpage_157_228_229), // '令' -- '以' - FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' - FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' - FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' - FONTDATA_ITEM(158, 160, 160, fontpage_158_160_160), // '传' -- '传' - FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' - FONTDATA_ITEM(158, 211, 211, fontpage_158_211_211), // '体' -- '体' - FONTDATA_ITEM(158, 217, 217, fontpage_158_217_217), // '余' -- '余' - FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' - FONTDATA_ITEM(158, 255, 255, fontpage_158_255_255), // '使' -- '使' - FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' - FONTDATA_ITEM(159, 181, 181, fontpage_159_181_181), // '侵' -- '侵' - FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' - FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' - FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' - FONTDATA_ITEM(160, 190, 190, fontpage_160_190_190), // '倾' -- '倾' - FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' - FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' - FONTDATA_ITEM(161, 168, 168, fontpage_161_168_168), // '储' -- '储' - FONTDATA_ITEM(161, 207, 207, fontpage_161_207_207), // '像' -- '像' - FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' - FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' - FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' - FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' - FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' - FONTDATA_ITEM(162, 243, 243, fontpage_162_243_243), // '关' -- '关' - FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' - FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' - FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' - FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' - FONTDATA_ITEM(163, 250, 251, fontpage_163_250_251), // '出' -- '击' - FONTDATA_ITEM(164, 134, 135, fontpage_164_134_135), // '分' -- '切' - FONTDATA_ITEM(164, 155, 155, fontpage_164_155_155), // '创' -- '创' - FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' - FONTDATA_ITEM(164, 171, 171, fontpage_164_171_171), // '别' -- '别' - FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' - FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' - FONTDATA_ITEM(164, 242, 242, fontpage_164_242_242), // '割' -- '割' - FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' - FONTDATA_ITEM(165, 159, 160, fontpage_165_159_160), // '功' -- '加' - FONTDATA_ITEM(165, 168, 168, fontpage_165_168_168), // '动' -- '动' - FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' - FONTDATA_ITEM(166, 199, 199, fontpage_166_199_199), // '升' -- '升' - FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' - FONTDATA_ITEM(166, 207, 207, fontpage_166_207_207), // '协' -- '协' - FONTDATA_ITEM(166, 213, 213, fontpage_166_213_213), // '单' -- '单' - FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' - FONTDATA_ITEM(166, 240, 241, fontpage_166_240_241), // '印' -- '危' - FONTDATA_ITEM(166, 244, 244, fontpage_166_244_244), // '却' -- '却' - FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' - FONTDATA_ITEM(167, 139, 139, fontpage_167_139_139), // '压' -- '压' - FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' - FONTDATA_ITEM(167, 204, 205, fontpage_167_204_205), // '双' -- '反' - FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' - FONTDATA_ITEM(167, 216, 216, fontpage_167_216_216), // '变' -- '变' - FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' - FONTDATA_ITEM(168, 131, 131, fontpage_168_131_131), // '吃' -- '吃' - FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' - FONTDATA_ITEM(168, 141, 142, fontpage_168_141_142), // '名' -- '后' - FONTDATA_ITEM(168, 145, 145, fontpage_168_145_145), // '向' -- '向' - FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' - FONTDATA_ITEM(168, 175, 175, fontpage_168_175_175), // '启' -- '启' - FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' - FONTDATA_ITEM(168, 232, 232, fontpage_168_232_232), // '周' -- '周' - FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' - FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' - FONTDATA_ITEM(169, 205, 205, fontpage_169_205_205), // '响' -- '响' - FONTDATA_ITEM(171, 183, 183, fontpage_171_183_183), // '喷' -- '喷' - FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' - FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' - FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' - FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' - FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' - FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' - FONTDATA_ITEM(173, 254, 254, fontpage_173_254_254), // '图' -- '图' - FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' - FONTDATA_ITEM(174, 207, 207, fontpage_174_207_207), // '坏' -- '坏' - FONTDATA_ITEM(174, 215, 215, fontpage_174_215_215), // '块' -- '块' - FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' - FONTDATA_ITEM(175, 171, 171, fontpage_175_171_171), // '垫' -- '垫' - FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' - FONTDATA_ITEM(177, 243, 243, fontpage_177_243_243), // '壳' -- '壳' - FONTDATA_ITEM(178, 135, 135, fontpage_178_135_135), // '备' -- '备' - FONTDATA_ITEM(178, 141, 141, fontpage_178_141_141), // '复' -- '复' - FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' - FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' - FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' - FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' - FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' - FONTDATA_ITEM(178, 180, 180, fontpage_178_180_180), // '头' -- '头' - FONTDATA_ITEM(178, 253, 253, fontpage_178_253_253), // '好' -- '好' - FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' - FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' - FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' - FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' - FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' - FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' - FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' - FONTDATA_ITEM(183, 171, 171, fontpage_183_171_171), // '宫' -- '宫' - FONTDATA_ITEM(183, 249, 249, fontpage_183_249_249), // '对' -- '对' - FONTDATA_ITEM(184, 134, 134, fontpage_184_134_134), // '将' -- '将' - FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' - FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' - FONTDATA_ITEM(184, 207, 207, fontpage_184_207_207), // '屏' -- '屏' - FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' - FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' - FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' - FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' - FONTDATA_ITEM(188, 246, 246, fontpage_188_246_246), // '并' -- '并' - FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' - FONTDATA_ITEM(189, 148, 148, fontpage_189_148_148), // '应' -- '应' - FONTDATA_ITEM(189, 159, 159, fontpage_189_159_159), // '废' -- '废' - FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' - FONTDATA_ITEM(190, 128, 128, fontpage_190_128_128), // '开' -- '开' - FONTDATA_ITEM(190, 131, 131, fontpage_190_131_131), // '弃' -- '弃' - FONTDATA_ITEM(190, 143, 143, fontpage_190_143_143), // '式' -- '式' - FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' - FONTDATA_ITEM(190, 185, 185, fontpage_190_185_185), // '弹' -- '弹' - FONTDATA_ITEM(190, 210, 210, fontpage_190_210_210), // '归' -- '归' - FONTDATA_ITEM(191, 132, 133, fontpage_191_132_133), // '径' -- '待' - FONTDATA_ITEM(191, 170, 170, fontpage_191_170_170), // '循' -- '循' - FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' - FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' - FONTDATA_ITEM(191, 253, 253, fontpage_191_253_253), // '忽' -- '忽' - FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' - FONTDATA_ITEM(192, 187, 187, fontpage_192_187_187), // '总' -- '总' - FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' - FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' - FONTDATA_ITEM(194, 159, 159, fontpage_194_159_159), // '感' -- '感' - FONTDATA_ITEM(196, 143, 144, fontpage_196_143_144), // '戏' -- '成' - FONTDATA_ITEM(196, 183, 183, fontpage_196_183_183), // '户' -- '户' - FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' - FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' - FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' - FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' - FONTDATA_ITEM(196, 231, 231, fontpage_196_231_231), // '执' -- '执' - FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' - FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' - FONTDATA_ITEM(197, 165, 165, fontpage_197_165_165), // '报' -- '报' - FONTDATA_ITEM(197, 172, 172, fontpage_197_172_172), // '抬' -- '抬' - FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' - FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' - FONTDATA_ITEM(197, 233, 233, fontpage_197_233_233), // '择' -- '择' - FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' - FONTDATA_ITEM(198, 161, 161, fontpage_198_161_161), // '挡' -- '挡' - FONTDATA_ITEM(198, 164, 164, fontpage_198_164_164), // '挤' -- '挤' - FONTDATA_ITEM(198, 223, 223, fontpage_198_223_223), // '损' -- '损' - FONTDATA_ITEM(198, 226, 226, fontpage_198_226_226), // '换' -- '换' - FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' - FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' - FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' - FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' - FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' - FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' - FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' - FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' - FONTDATA_ITEM(202, 240, 240, fontpage_202_240_240), // '数' -- '数' - FONTDATA_ITEM(202, 242, 242, fontpage_202_242_242), // '敲' -- '敲' - FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' - FONTDATA_ITEM(203, 135, 135, fontpage_203_135_135), // '文' -- '文' - FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' - FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' - FONTDATA_ITEM(203, 173, 173, fontpage_203_173_173), // '断' -- '断' - FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' - FONTDATA_ITEM(203, 185, 185, fontpage_203_185_185), // '方' -- '方' - FONTDATA_ITEM(203, 224, 224, fontpage_203_224_224), // '无' -- '无' - FONTDATA_ITEM(203, 246, 246, fontpage_203_246_246), // '时' -- '时' - FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' - FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' - FONTDATA_ITEM(205, 130, 130, fontpage_205_130_130), // '暂' -- '暂' - FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' - FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' - FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' - FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' - FONTDATA_ITEM(206, 159, 159, fontpage_206_159_159), // '期' -- '期' - FONTDATA_ITEM(206, 186, 186, fontpage_206_186_186), // '机' -- '机' - FONTDATA_ITEM(206, 192, 192, fontpage_206_192_192), // '杀' -- '杀' - FONTDATA_ITEM(206, 223, 223, fontpage_206_223_223), // '束' -- '束' - FONTDATA_ITEM(206, 225, 225, fontpage_206_225_225), // '条' -- '条' - FONTDATA_ITEM(206, 229, 229, fontpage_206_229_229), // '来' -- '来' - FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' - FONTDATA_ITEM(207, 151, 151, fontpage_207_151_151), // '林' -- '林' - FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' - FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' - FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' - FONTDATA_ITEM(209, 175, 175, fontpage_209_175_175), // '梯' -- '梯' - FONTDATA_ITEM(209, 192, 192, fontpage_209_192_192), // '检' -- '检' - FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' - FONTDATA_ITEM(212, 161, 161, fontpage_212_161_161), // '模' -- '模' - FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' - FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' - FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' - FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' - FONTDATA_ITEM(217, 161, 161, fontpage_217_161_161), // '没' -- '没' - FONTDATA_ITEM(217, 226, 226, fontpage_217_226_226), // '波' -- '波' - FONTDATA_ITEM(217, 232, 232, fontpage_217_232_232), // '注' -- '注' - FONTDATA_ITEM(218, 151, 151, fontpage_218_151_151), // '洗' -- '洗' - FONTDATA_ITEM(218, 187, 187, fontpage_218_187_187), // '活' -- '活' - FONTDATA_ITEM(218, 193, 193, fontpage_218_193_193), // '流' -- '流' - FONTDATA_ITEM(218, 203, 203, fontpage_218_203_203), // '测' -- '测' - FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' - FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' - FONTDATA_ITEM(219, 247, 247, fontpage_219_247_247), // '混' -- '混' - FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' - FONTDATA_ITEM(220, 169, 169, fontpage_220_169_169), // '温' -- '温' - FONTDATA_ITEM(220, 184, 184, fontpage_220_184_184), // '游' -- '游' - FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' - FONTDATA_ITEM(221, 162, 162, fontpage_221_162_162), // '溢' -- '溢' - FONTDATA_ITEM(221, 209, 209, fontpage_221_209_209), // '滑' -- '滑' - FONTDATA_ITEM(222, 143, 143, fontpage_222_143_143), // '漏' -- '漏' - FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' - FONTDATA_ITEM(224, 239, 239, fontpage_224_239_239), // '灯' -- '灯' - FONTDATA_ITEM(225, 185, 185, fontpage_225_185_185), // '点' -- '点' - FONTDATA_ITEM(225, 237, 237, fontpage_225_237_237), // '热' -- '热' - FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' - FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' - FONTDATA_ITEM(228, 249, 249, fontpage_228_249_249), // '特' -- '特' - FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' - FONTDATA_ITEM(231, 175, 175, fontpage_231_175_175), // '环' -- '环' - FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' - FONTDATA_ITEM(234, 181, 181, fontpage_234_181_181), // '电' -- '电' - FONTDATA_ITEM(234, 229, 229, fontpage_234_229_229), // '略' -- '略' - FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' - FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' - FONTDATA_ITEM(237, 209, 209, fontpage_237_209_209), // '监' -- '监' - FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' - FONTDATA_ITEM(238, 129, 129, fontpage_238_129_129), // '省' -- '省' - FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' - FONTDATA_ITEM(240, 238, 238, fontpage_240_238_238), // '确' -- '确' - FONTDATA_ITEM(243, 187, 187, fontpage_243_187_187), // '离' -- '离' - FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' - FONTDATA_ITEM(244, 250, 250, fontpage_244_250_250), // '空' -- '空' - FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' - FONTDATA_ITEM(246, 172, 172, fontpage_246_172_172), // '第' -- '第' - FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' - FONTDATA_ITEM(247, 128, 128, fontpage_247_128_128), // '简' -- '简' - FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' - FONTDATA_ITEM(248, 251, 251, fontpage_248_251_251), // '类' -- '类' - FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' - FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' - FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' - FONTDATA_ITEM(253, 167, 167, fontpage_253_167_167), // '级' -- '级' - FONTDATA_ITEM(253, 191, 191, fontpage_253_191_191), // '线' -- '线' - FONTDATA_ITEM(253, 198, 198, fontpage_253_198_198), // '细' -- '细' - FONTDATA_ITEM(253, 200, 200, fontpage_253_200_200), // '终' -- '终' - FONTDATA_ITEM(253, 211, 211, fontpage_253_211_211), // '结' -- '结' - FONTDATA_ITEM(253, 217, 217, fontpage_253_217_217), // '给' -- '给' - FONTDATA_ITEM(253, 223, 223, fontpage_253_223_223), // '统' -- '统' - FONTDATA_ITEM(253, 231, 231, fontpage_253_231_231), // '继' -- '继' - FONTDATA_ITEM(253, 234, 234, fontpage_253_234_234), // '绪' -- '绪' - FONTDATA_ITEM(253, 237, 237, fontpage_253_237_237), // '续' -- '续' - FONTDATA_ITEM(253, 255, 255, fontpage_253_255_255), // '绿' -- '绿' - FONTDATA_ITEM(254, 150, 150, fontpage_254_150_150), // '编' -- '编' - FONTDATA_ITEM(254, 186, 186, fontpage_254_186_186), // '缺' -- '缺' - FONTDATA_ITEM(254, 209, 209, fontpage_254_209_209), // '网' -- '网' - FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' - FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' - FONTDATA_ITEM(256, 133, 133, fontpage_256_133_133), // '者' -- '者' - FONTDATA_ITEM(256, 234, 234, fontpage_256_234_234), // '聪' -- '聪' - FONTDATA_ITEM(257, 253, 253, fontpage_257_253_253), // '能' -- '能' - FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' - FONTDATA_ITEM(259, 243, 243, fontpage_259_243_243), // '至' -- '至' - FONTDATA_ITEM(263, 220, 220, fontpage_263_220_220), // '菜' -- '菜' - FONTDATA_ITEM(265, 221, 221, fontpage_265_221_221), // '蓝' -- '蓝' - FONTDATA_ITEM(269, 199, 199, fontpage_269_199_199), // '蛇' -- '蛇' - FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' - FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' - FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' - FONTDATA_ITEM(275, 129, 129, fontpage_275_129_129), // '要' -- '要' - FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' - FONTDATA_ITEM(279, 161, 161, fontpage_279_161_161), // '计' -- '计' - FONTDATA_ITEM(279, 174, 174, fontpage_279_174_174), // '议' -- '议' - FONTDATA_ITEM(279, 190, 190, fontpage_279_190_190), // '设' -- '设' - FONTDATA_ITEM(279, 213, 213, fontpage_279_213_213), // '试' -- '试' - FONTDATA_ITEM(279, 239, 239, fontpage_279_239_239), // '误' -- '误' - FONTDATA_ITEM(279, 247, 247, fontpage_279_247_247), // '请' -- '请' - FONTDATA_ITEM(279, 251, 251, fontpage_279_251_251), // '读' -- '读' - FONTDATA_ITEM(280, 131, 131, fontpage_280_131_131), // '调' -- '调' - FONTDATA_ITEM(282, 165, 165, fontpage_282_165_165), // '败' -- '败' - FONTDATA_ITEM(282, 170, 170, fontpage_282_170_170), // '贪' -- '贪' - FONTDATA_ITEM(282, 247, 247, fontpage_282_247_247), // '起' -- '起' - FONTDATA_ITEM(283, 133, 133, fontpage_283_133_133), // '超' -- '超' - FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' - FONTDATA_ITEM(286, 236, 236, fontpage_286_236_236), // '转' -- '转' - FONTDATA_ITEM(286, 239, 239, fontpage_286_239_239), // '软' -- '软' - FONTDATA_ITEM(286, 244, 244, fontpage_286_244_244), // '轴' -- '轴' - FONTDATA_ITEM(286, 253, 253, fontpage_286_253_253), // '载' -- '载' - FONTDATA_ITEM(287, 145, 145, fontpage_287_145_145), // '辑' -- '辑' - FONTDATA_ITEM(287, 147, 147, fontpage_287_147_147), // '输' -- '输' - FONTDATA_ITEM(287, 185, 185, fontpage_287_185_185), // '边' -- '边' - FONTDATA_ITEM(287, 193, 193, fontpage_287_193_193), // '迁' -- '迁' - FONTDATA_ITEM(287, 208, 209, fontpage_287_208_209), // '运' -- '近' - FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' - FONTDATA_ITEM(287, 216, 216, fontpage_287_216_216), // '还' -- '还' - FONTDATA_ITEM(287, 219, 219, fontpage_287_219_219), // '进' -- '进' - FONTDATA_ITEM(287, 222, 222, fontpage_287_222_222), // '连' -- '连' - FONTDATA_ITEM(287, 247, 247, fontpage_287_247_247), // '迷' -- '迷' - FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' - FONTDATA_ITEM(288, 137, 137, fontpage_288_137_137), // '选' -- '选' - FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' - FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' - FONTDATA_ITEM(290, 205, 205, fontpage_290_205_205), // '配' -- '配' - FONTDATA_ITEM(291, 202, 202, fontpage_291_202_202), // '释' -- '释' - FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' - FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' - FONTDATA_ITEM(297, 136, 136, fontpage_297_136_136), // '针' -- '针' - FONTDATA_ITEM(297, 174, 174, fontpage_297_174_174), // '钮' -- '钮' - FONTDATA_ITEM(298, 153, 153, fontpage_298_153_153), // '错' -- '错' - FONTDATA_ITEM(298, 220, 220, fontpage_298_220_220), // '镜' -- '镜' - FONTDATA_ITEM(298, 255, 255, fontpage_298_255_255), // '长' -- '长' - FONTDATA_ITEM(299, 237, 237, fontpage_299_237_237), // '闭' -- '闭' - FONTDATA_ITEM(299, 242, 242, fontpage_299_242_242), // '闲' -- '闲' - FONTDATA_ITEM(299, 244, 244, fontpage_299_244_244), // '间' -- '间' - FONTDATA_ITEM(300, 136, 136, fontpage_300_136_136), // '阈' -- '阈' - FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' - FONTDATA_ITEM(300, 208, 208, fontpage_300_208_208), // '限' -- '限' - FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' - FONTDATA_ITEM(300, 233, 233, fontpage_300_233_233), // '险' -- '险' - FONTDATA_ITEM(301, 246, 246, fontpage_301_246_246), // '零' -- '零' - FONTDATA_ITEM(302, 128, 128, fontpage_302_128_128), // '需' -- '需' - FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' - FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' - FONTDATA_ITEM(302, 224, 224, fontpage_302_224_224), // '靠' -- '靠' - FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' - FONTDATA_ITEM(304, 245, 245, fontpage_304_245_245), // '页' -- '页' - FONTDATA_ITEM(304, 249, 249, fontpage_304_249_249), // '项' -- '项' - FONTDATA_ITEM(305, 132, 132, fontpage_305_132_132), // '预' -- '预' - FONTDATA_ITEM(305, 145, 145, fontpage_305_145_145), // '频' -- '频' - FONTDATA_ITEM(305, 157, 157, fontpage_305_157_157), // '额' -- '额' - FONTDATA_ITEM(305, 206, 206, fontpage_305_206_206), // '风' -- '风' - FONTDATA_ITEM(306, 241, 241, fontpage_306_241_241), // '饱' -- '饱' - FONTDATA_ITEM(308, 236, 236, fontpage_308_236_236), // '马' -- '马' - FONTDATA_ITEM(308, 241, 241, fontpage_308_241_241), // '驱' -- '驱' - FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' - FONTDATA_ITEM(317, 196, 196, fontpage_317_196_196), // '黄' -- '黄' - FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' - FONTDATA_ITEM(318, 208, 208, fontpage_318_208_208), // '齐' -- '齐' - FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' +static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { + FONTDATA_ITEM(64, 157, 157, fontpage_64_157_157), // '”' -- '”' + FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' + FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' + FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' + FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' + FONTDATA_ITEM(156, 147, 147, fontpage_156_147_147), // '专' -- '专' + FONTDATA_ITEM(156, 157, 157, fontpage_156_157_157), // '丝' -- '丝' + FONTDATA_ITEM(156, 170, 170, fontpage_156_170_170), // '个' -- '个' + FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' + FONTDATA_ITEM(156, 186, 187, fontpage_156_186_187), // '为' -- '主' + FONTDATA_ITEM(156, 201, 201, fontpage_156_201_201), // '义' -- '义' + FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' + FONTDATA_ITEM(157, 134, 134, fontpage_157_134_134), // '了' -- '了' + FONTDATA_ITEM(157, 140, 140, fontpage_157_140_140), // '二' -- '二' + FONTDATA_ITEM(157, 142, 142, fontpage_157_142_142), // '于' -- '于' + FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' + FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' + FONTDATA_ITEM(157, 206, 206, fontpage_157_206_206), // '从' -- '从' + FONTDATA_ITEM(157, 228, 229, fontpage_157_228_229), // '令' -- '以' + FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' + FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' + FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' + FONTDATA_ITEM(158, 160, 160, fontpage_158_160_160), // '传' -- '传' + FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' + FONTDATA_ITEM(158, 211, 211, fontpage_158_211_211), // '体' -- '体' + FONTDATA_ITEM(158, 217, 217, fontpage_158_217_217), // '余' -- '余' + FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' + FONTDATA_ITEM(158, 255, 255, fontpage_158_255_255), // '使' -- '使' + FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' + FONTDATA_ITEM(159, 181, 181, fontpage_159_181_181), // '侵' -- '侵' + FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' + FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' + FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' + FONTDATA_ITEM(160, 190, 190, fontpage_160_190_190), // '倾' -- '倾' + FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' + FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' + FONTDATA_ITEM(161, 168, 168, fontpage_161_168_168), // '储' -- '储' + FONTDATA_ITEM(161, 207, 207, fontpage_161_207_207), // '像' -- '像' + FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' + FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' + FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' + FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' + FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' + FONTDATA_ITEM(162, 243, 243, fontpage_162_243_243), // '关' -- '关' + FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' + FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' + FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' + FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' + FONTDATA_ITEM(163, 250, 251, fontpage_163_250_251), // '出' -- '击' + FONTDATA_ITEM(164, 134, 135, fontpage_164_134_135), // '分' -- '切' + FONTDATA_ITEM(164, 155, 155, fontpage_164_155_155), // '创' -- '创' + FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' + FONTDATA_ITEM(164, 171, 171, fontpage_164_171_171), // '别' -- '别' + FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' + FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' + FONTDATA_ITEM(164, 242, 242, fontpage_164_242_242), // '割' -- '割' + FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' + FONTDATA_ITEM(165, 159, 160, fontpage_165_159_160), // '功' -- '加' + FONTDATA_ITEM(165, 168, 168, fontpage_165_168_168), // '动' -- '动' + FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' + FONTDATA_ITEM(166, 199, 199, fontpage_166_199_199), // '升' -- '升' + FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' + FONTDATA_ITEM(166, 207, 207, fontpage_166_207_207), // '协' -- '协' + FONTDATA_ITEM(166, 213, 213, fontpage_166_213_213), // '单' -- '单' + FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' + FONTDATA_ITEM(166, 240, 241, fontpage_166_240_241), // '印' -- '危' + FONTDATA_ITEM(166, 244, 244, fontpage_166_244_244), // '却' -- '却' + FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' + FONTDATA_ITEM(167, 139, 139, fontpage_167_139_139), // '压' -- '压' + FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' + FONTDATA_ITEM(167, 204, 205, fontpage_167_204_205), // '双' -- '反' + FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' + FONTDATA_ITEM(167, 216, 216, fontpage_167_216_216), // '变' -- '变' + FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' + FONTDATA_ITEM(168, 131, 131, fontpage_168_131_131), // '吃' -- '吃' + FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' + FONTDATA_ITEM(168, 141, 142, fontpage_168_141_142), // '名' -- '后' + FONTDATA_ITEM(168, 145, 145, fontpage_168_145_145), // '向' -- '向' + FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' + FONTDATA_ITEM(168, 175, 175, fontpage_168_175_175), // '启' -- '启' + FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' + FONTDATA_ITEM(168, 232, 232, fontpage_168_232_232), // '周' -- '周' + FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' + FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' + FONTDATA_ITEM(169, 205, 205, fontpage_169_205_205), // '响' -- '响' + FONTDATA_ITEM(171, 183, 183, fontpage_171_183_183), // '喷' -- '喷' + FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' + FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' + FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' + FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' + FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' + FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' + FONTDATA_ITEM(173, 254, 254, fontpage_173_254_254), // '图' -- '图' + FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' + FONTDATA_ITEM(174, 207, 207, fontpage_174_207_207), // '坏' -- '坏' + FONTDATA_ITEM(174, 215, 215, fontpage_174_215_215), // '块' -- '块' + FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' + FONTDATA_ITEM(175, 171, 171, fontpage_175_171_171), // '垫' -- '垫' + FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' + FONTDATA_ITEM(177, 243, 243, fontpage_177_243_243), // '壳' -- '壳' + FONTDATA_ITEM(178, 135, 135, fontpage_178_135_135), // '备' -- '备' + FONTDATA_ITEM(178, 141, 141, fontpage_178_141_141), // '复' -- '复' + FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' + FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' + FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' + FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' + FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' + FONTDATA_ITEM(178, 180, 180, fontpage_178_180_180), // '头' -- '头' + FONTDATA_ITEM(178, 253, 253, fontpage_178_253_253), // '好' -- '好' + FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' + FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' + FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' + FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' + FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' + FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' + FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' + FONTDATA_ITEM(183, 171, 171, fontpage_183_171_171), // '宫' -- '宫' + FONTDATA_ITEM(183, 249, 249, fontpage_183_249_249), // '对' -- '对' + FONTDATA_ITEM(184, 134, 134, fontpage_184_134_134), // '将' -- '将' + FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' + FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' + FONTDATA_ITEM(184, 207, 207, fontpage_184_207_207), // '屏' -- '屏' + FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' + FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' + FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' + FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' + FONTDATA_ITEM(188, 246, 246, fontpage_188_246_246), // '并' -- '并' + FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' + FONTDATA_ITEM(189, 148, 148, fontpage_189_148_148), // '应' -- '应' + FONTDATA_ITEM(189, 159, 159, fontpage_189_159_159), // '废' -- '废' + FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' + FONTDATA_ITEM(190, 128, 128, fontpage_190_128_128), // '开' -- '开' + FONTDATA_ITEM(190, 131, 131, fontpage_190_131_131), // '弃' -- '弃' + FONTDATA_ITEM(190, 143, 143, fontpage_190_143_143), // '式' -- '式' + FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' + FONTDATA_ITEM(190, 185, 185, fontpage_190_185_185), // '弹' -- '弹' + FONTDATA_ITEM(190, 210, 210, fontpage_190_210_210), // '归' -- '归' + FONTDATA_ITEM(191, 132, 133, fontpage_191_132_133), // '径' -- '待' + FONTDATA_ITEM(191, 170, 170, fontpage_191_170_170), // '循' -- '循' + FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' + FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' + FONTDATA_ITEM(191, 253, 253, fontpage_191_253_253), // '忽' -- '忽' + FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' + FONTDATA_ITEM(192, 187, 187, fontpage_192_187_187), // '总' -- '总' + FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' + FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' + FONTDATA_ITEM(194, 159, 159, fontpage_194_159_159), // '感' -- '感' + FONTDATA_ITEM(196, 143, 144, fontpage_196_143_144), // '戏' -- '成' + FONTDATA_ITEM(196, 183, 183, fontpage_196_183_183), // '户' -- '户' + FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' + FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' + FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' + FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' + FONTDATA_ITEM(196, 231, 231, fontpage_196_231_231), // '执' -- '执' + FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' + FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' + FONTDATA_ITEM(197, 165, 165, fontpage_197_165_165), // '报' -- '报' + FONTDATA_ITEM(197, 172, 172, fontpage_197_172_172), // '抬' -- '抬' + FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' + FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' + FONTDATA_ITEM(197, 233, 233, fontpage_197_233_233), // '择' -- '择' + FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' + FONTDATA_ITEM(198, 161, 161, fontpage_198_161_161), // '挡' -- '挡' + FONTDATA_ITEM(198, 164, 164, fontpage_198_164_164), // '挤' -- '挤' + FONTDATA_ITEM(198, 223, 223, fontpage_198_223_223), // '损' -- '损' + FONTDATA_ITEM(198, 226, 226, fontpage_198_226_226), // '换' -- '换' + FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' + FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' + FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' + FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' + FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' + FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' + FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' + FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' + FONTDATA_ITEM(202, 240, 240, fontpage_202_240_240), // '数' -- '数' + FONTDATA_ITEM(202, 242, 242, fontpage_202_242_242), // '敲' -- '敲' + FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' + FONTDATA_ITEM(203, 135, 135, fontpage_203_135_135), // '文' -- '文' + FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' + FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' + FONTDATA_ITEM(203, 173, 173, fontpage_203_173_173), // '断' -- '断' + FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' + FONTDATA_ITEM(203, 185, 185, fontpage_203_185_185), // '方' -- '方' + FONTDATA_ITEM(203, 224, 224, fontpage_203_224_224), // '无' -- '无' + FONTDATA_ITEM(203, 246, 246, fontpage_203_246_246), // '时' -- '时' + FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' + FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' + FONTDATA_ITEM(205, 130, 130, fontpage_205_130_130), // '暂' -- '暂' + FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' + FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' + FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' + FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' + FONTDATA_ITEM(206, 159, 159, fontpage_206_159_159), // '期' -- '期' + FONTDATA_ITEM(206, 186, 186, fontpage_206_186_186), // '机' -- '机' + FONTDATA_ITEM(206, 192, 192, fontpage_206_192_192), // '杀' -- '杀' + FONTDATA_ITEM(206, 223, 223, fontpage_206_223_223), // '束' -- '束' + FONTDATA_ITEM(206, 225, 225, fontpage_206_225_225), // '条' -- '条' + FONTDATA_ITEM(206, 229, 229, fontpage_206_229_229), // '来' -- '来' + FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' + FONTDATA_ITEM(207, 151, 151, fontpage_207_151_151), // '林' -- '林' + FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' + FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' + FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' + FONTDATA_ITEM(209, 175, 175, fontpage_209_175_175), // '梯' -- '梯' + FONTDATA_ITEM(209, 192, 192, fontpage_209_192_192), // '检' -- '检' + FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' + FONTDATA_ITEM(212, 161, 161, fontpage_212_161_161), // '模' -- '模' + FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' + FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' + FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' + FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' + FONTDATA_ITEM(217, 161, 161, fontpage_217_161_161), // '没' -- '没' + FONTDATA_ITEM(217, 226, 226, fontpage_217_226_226), // '波' -- '波' + FONTDATA_ITEM(217, 232, 232, fontpage_217_232_232), // '注' -- '注' + FONTDATA_ITEM(218, 151, 151, fontpage_218_151_151), // '洗' -- '洗' + FONTDATA_ITEM(218, 187, 187, fontpage_218_187_187), // '活' -- '活' + FONTDATA_ITEM(218, 193, 193, fontpage_218_193_193), // '流' -- '流' + FONTDATA_ITEM(218, 203, 203, fontpage_218_203_203), // '测' -- '测' + FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' + FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' + FONTDATA_ITEM(219, 247, 247, fontpage_219_247_247), // '混' -- '混' + FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' + FONTDATA_ITEM(220, 169, 169, fontpage_220_169_169), // '温' -- '温' + FONTDATA_ITEM(220, 184, 184, fontpage_220_184_184), // '游' -- '游' + FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' + FONTDATA_ITEM(221, 162, 162, fontpage_221_162_162), // '溢' -- '溢' + FONTDATA_ITEM(221, 209, 209, fontpage_221_209_209), // '滑' -- '滑' + FONTDATA_ITEM(222, 143, 143, fontpage_222_143_143), // '漏' -- '漏' + FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' + FONTDATA_ITEM(224, 239, 239, fontpage_224_239_239), // '灯' -- '灯' + FONTDATA_ITEM(225, 185, 185, fontpage_225_185_185), // '点' -- '点' + FONTDATA_ITEM(225, 237, 237, fontpage_225_237_237), // '热' -- '热' + FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' + FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' + FONTDATA_ITEM(228, 249, 249, fontpage_228_249_249), // '特' -- '特' + FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' + FONTDATA_ITEM(231, 175, 175, fontpage_231_175_175), // '环' -- '环' + FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' + FONTDATA_ITEM(234, 181, 181, fontpage_234_181_181), // '电' -- '电' + FONTDATA_ITEM(234, 229, 229, fontpage_234_229_229), // '略' -- '略' + FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' + FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' + FONTDATA_ITEM(237, 209, 209, fontpage_237_209_209), // '监' -- '监' + FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' + FONTDATA_ITEM(238, 129, 129, fontpage_238_129_129), // '省' -- '省' + FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' + FONTDATA_ITEM(240, 238, 238, fontpage_240_238_238), // '确' -- '确' + FONTDATA_ITEM(243, 187, 187, fontpage_243_187_187), // '离' -- '离' + FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' + FONTDATA_ITEM(244, 250, 250, fontpage_244_250_250), // '空' -- '空' + FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' + FONTDATA_ITEM(246, 172, 172, fontpage_246_172_172), // '第' -- '第' + FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' + FONTDATA_ITEM(247, 128, 128, fontpage_247_128_128), // '简' -- '简' + FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' + FONTDATA_ITEM(248, 251, 251, fontpage_248_251_251), // '类' -- '类' + FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' + FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' + FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' + FONTDATA_ITEM(253, 167, 167, fontpage_253_167_167), // '级' -- '级' + FONTDATA_ITEM(253, 191, 191, fontpage_253_191_191), // '线' -- '线' + FONTDATA_ITEM(253, 198, 198, fontpage_253_198_198), // '细' -- '细' + FONTDATA_ITEM(253, 200, 200, fontpage_253_200_200), // '终' -- '终' + FONTDATA_ITEM(253, 211, 211, fontpage_253_211_211), // '结' -- '结' + FONTDATA_ITEM(253, 217, 217, fontpage_253_217_217), // '给' -- '给' + FONTDATA_ITEM(253, 223, 223, fontpage_253_223_223), // '统' -- '统' + FONTDATA_ITEM(253, 231, 231, fontpage_253_231_231), // '继' -- '继' + FONTDATA_ITEM(253, 234, 234, fontpage_253_234_234), // '绪' -- '绪' + FONTDATA_ITEM(253, 237, 237, fontpage_253_237_237), // '续' -- '续' + FONTDATA_ITEM(253, 255, 255, fontpage_253_255_255), // '绿' -- '绿' + FONTDATA_ITEM(254, 150, 150, fontpage_254_150_150), // '编' -- '编' + FONTDATA_ITEM(254, 186, 186, fontpage_254_186_186), // '缺' -- '缺' + FONTDATA_ITEM(254, 209, 209, fontpage_254_209_209), // '网' -- '网' + FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' + FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' + FONTDATA_ITEM(256, 133, 133, fontpage_256_133_133), // '者' -- '者' + FONTDATA_ITEM(256, 234, 234, fontpage_256_234_234), // '聪' -- '聪' + FONTDATA_ITEM(257, 253, 253, fontpage_257_253_253), // '能' -- '能' + FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' + FONTDATA_ITEM(259, 243, 243, fontpage_259_243_243), // '至' -- '至' + FONTDATA_ITEM(263, 220, 220, fontpage_263_220_220), // '菜' -- '菜' + FONTDATA_ITEM(265, 221, 221, fontpage_265_221_221), // '蓝' -- '蓝' + FONTDATA_ITEM(269, 199, 199, fontpage_269_199_199), // '蛇' -- '蛇' + FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' + FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' + FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' + FONTDATA_ITEM(275, 129, 129, fontpage_275_129_129), // '要' -- '要' + FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' + FONTDATA_ITEM(279, 161, 161, fontpage_279_161_161), // '计' -- '计' + FONTDATA_ITEM(279, 174, 174, fontpage_279_174_174), // '议' -- '议' + FONTDATA_ITEM(279, 190, 190, fontpage_279_190_190), // '设' -- '设' + FONTDATA_ITEM(279, 213, 213, fontpage_279_213_213), // '试' -- '试' + FONTDATA_ITEM(279, 239, 239, fontpage_279_239_239), // '误' -- '误' + FONTDATA_ITEM(279, 247, 247, fontpage_279_247_247), // '请' -- '请' + FONTDATA_ITEM(279, 251, 251, fontpage_279_251_251), // '读' -- '读' + FONTDATA_ITEM(280, 131, 131, fontpage_280_131_131), // '调' -- '调' + FONTDATA_ITEM(282, 165, 165, fontpage_282_165_165), // '败' -- '败' + FONTDATA_ITEM(282, 170, 170, fontpage_282_170_170), // '贪' -- '贪' + FONTDATA_ITEM(282, 247, 247, fontpage_282_247_247), // '起' -- '起' + FONTDATA_ITEM(283, 133, 133, fontpage_283_133_133), // '超' -- '超' + FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' + FONTDATA_ITEM(286, 236, 236, fontpage_286_236_236), // '转' -- '转' + FONTDATA_ITEM(286, 239, 239, fontpage_286_239_239), // '软' -- '软' + FONTDATA_ITEM(286, 244, 244, fontpage_286_244_244), // '轴' -- '轴' + FONTDATA_ITEM(286, 253, 253, fontpage_286_253_253), // '载' -- '载' + FONTDATA_ITEM(287, 145, 145, fontpage_287_145_145), // '辑' -- '辑' + FONTDATA_ITEM(287, 147, 147, fontpage_287_147_147), // '输' -- '输' + FONTDATA_ITEM(287, 185, 185, fontpage_287_185_185), // '边' -- '边' + FONTDATA_ITEM(287, 193, 193, fontpage_287_193_193), // '迁' -- '迁' + FONTDATA_ITEM(287, 208, 209, fontpage_287_208_209), // '运' -- '近' + FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' + FONTDATA_ITEM(287, 216, 216, fontpage_287_216_216), // '还' -- '还' + FONTDATA_ITEM(287, 219, 219, fontpage_287_219_219), // '进' -- '进' + FONTDATA_ITEM(287, 222, 222, fontpage_287_222_222), // '连' -- '连' + FONTDATA_ITEM(287, 247, 247, fontpage_287_247_247), // '迷' -- '迷' + FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' + FONTDATA_ITEM(288, 137, 137, fontpage_288_137_137), // '选' -- '选' + FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' + FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' + FONTDATA_ITEM(290, 205, 205, fontpage_290_205_205), // '配' -- '配' + FONTDATA_ITEM(291, 202, 202, fontpage_291_202_202), // '释' -- '释' + FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' + FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' + FONTDATA_ITEM(297, 136, 136, fontpage_297_136_136), // '针' -- '针' + FONTDATA_ITEM(297, 174, 174, fontpage_297_174_174), // '钮' -- '钮' + FONTDATA_ITEM(298, 153, 153, fontpage_298_153_153), // '错' -- '错' + FONTDATA_ITEM(298, 220, 220, fontpage_298_220_220), // '镜' -- '镜' + FONTDATA_ITEM(298, 255, 255, fontpage_298_255_255), // '长' -- '长' + FONTDATA_ITEM(299, 237, 237, fontpage_299_237_237), // '闭' -- '闭' + FONTDATA_ITEM(299, 242, 242, fontpage_299_242_242), // '闲' -- '闲' + FONTDATA_ITEM(299, 244, 244, fontpage_299_244_244), // '间' -- '间' + FONTDATA_ITEM(300, 136, 136, fontpage_300_136_136), // '阈' -- '阈' + FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' + FONTDATA_ITEM(300, 208, 208, fontpage_300_208_208), // '限' -- '限' + FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' + FONTDATA_ITEM(300, 233, 233, fontpage_300_233_233), // '险' -- '险' + FONTDATA_ITEM(301, 246, 246, fontpage_301_246_246), // '零' -- '零' + FONTDATA_ITEM(302, 128, 128, fontpage_302_128_128), // '需' -- '需' + FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' + FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' + FONTDATA_ITEM(302, 224, 224, fontpage_302_224_224), // '靠' -- '靠' + FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' + FONTDATA_ITEM(304, 245, 245, fontpage_304_245_245), // '页' -- '页' + FONTDATA_ITEM(304, 249, 249, fontpage_304_249_249), // '项' -- '项' + FONTDATA_ITEM(305, 132, 132, fontpage_305_132_132), // '预' -- '预' + FONTDATA_ITEM(305, 145, 145, fontpage_305_145_145), // '频' -- '频' + FONTDATA_ITEM(305, 157, 157, fontpage_305_157_157), // '额' -- '额' + FONTDATA_ITEM(305, 206, 206, fontpage_305_206_206), // '风' -- '风' + FONTDATA_ITEM(306, 241, 241, fontpage_306_241_241), // '饱' -- '饱' + FONTDATA_ITEM(308, 236, 236, fontpage_308_236_236), // '马' -- '马' + FONTDATA_ITEM(308, 241, 241, fontpage_308_241_241), // '驱' -- '驱' + FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' + FONTDATA_ITEM(317, 196, 196, fontpage_317_196_196), // '黄' -- '黄' + FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' + FONTDATA_ITEM(318, 208, 208, fontpage_318_208_208), // '齐' -- '齐' + FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h index 51344936be2c..093629cd16fa 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_69_191_191[28] U8G_FONT_SECTION("fontpage_69_191_191") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x05,0x00,0x00, @@ -1217,305 +1219,304 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9A,0x9A,0x00,0x08,0x00,0x00, 0x00,0x02,0x07,0x07,0x0C,0x06,0x01,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' - FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' - FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' - FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' - FONTDATA_ITEM(156, 166, 166, fontpage_156_166_166), // '並' -- '並' - FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' - FONTDATA_ITEM(156, 187, 187, fontpage_156_187_187), // '主' -- '主' - FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' - FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' - FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' - FONTDATA_ITEM(157, 228, 228, fontpage_157_228_228), // '令' -- '令' - FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' - FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' - FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' - FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' - FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' - FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' - FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' - FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' - FONTDATA_ITEM(160, 139, 139, fontpage_160_139_139), // '個' -- '個' - FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' - FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' - FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' - FONTDATA_ITEM(160, 245, 245, fontpage_160_245_245), // '偵' -- '偵' - FONTDATA_ITEM(161, 153, 153, fontpage_161_153_153), // '備' -- '備' - FONTDATA_ITEM(161, 179, 179, fontpage_161_179_179), // '傳' -- '傳' - FONTDATA_ITEM(161, 190, 190, fontpage_161_190_190), // '傾' -- '傾' - FONTDATA_ITEM(162, 178, 178, fontpage_162_178_178), // '儲' -- '儲' - FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' - FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' - FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' - FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' - FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' - FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' - FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' - FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' - FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' - FONTDATA_ITEM(163, 250, 250, fontpage_163_250_250), // '出' -- '出' - FONTDATA_ITEM(164, 134, 134, fontpage_164_134_134), // '分' -- '分' - FONTDATA_ITEM(164, 151, 151, fontpage_164_151_151), // '列' -- '列' - FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' - FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' - FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' - FONTDATA_ITEM(164, 245, 245, fontpage_164_245_245), // '創' -- '創' - FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' - FONTDATA_ITEM(165, 160, 160, fontpage_165_160_160), // '加' -- '加' - FONTDATA_ITEM(165, 213, 213, fontpage_165_213_213), // '動' -- '動' - FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' - FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' - FONTDATA_ITEM(166, 212, 212, fontpage_166_212_212), // '協' -- '協' - FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' - FONTDATA_ITEM(166, 240, 240, fontpage_166_240_240), // '印' -- '印' - FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' - FONTDATA_ITEM(166, 251, 251, fontpage_166_251_251), // '卻' -- '卻' - FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' - FONTDATA_ITEM(167, 205, 205, fontpage_167_205_205), // '反' -- '反' - FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' - FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' - FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' - FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' - FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' - FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' - FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' - FONTDATA_ITEM(170, 223, 223, fontpage_170_223_223), // '啟' -- '啟' - FONTDATA_ITEM(171, 174, 174, fontpage_171_174_174), // '單' -- '單' - FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' - FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' - FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' - FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' - FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' - FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' - FONTDATA_ITEM(174, 150, 150, fontpage_174_150_150), // '圖' -- '圖' - FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' - FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' - FONTDATA_ITEM(175, 247, 247, fontpage_175_247_247), // '執' -- '執' - FONTDATA_ITEM(176, 202, 202, fontpage_176_202_202), // '塊' -- '塊' - FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' - FONTDATA_ITEM(177, 138, 138, fontpage_177_138_138), // '墊' -- '墊' - FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' - FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' - FONTDATA_ITEM(178, 160, 160, fontpage_178_160_160), // '夠' -- '夠' - FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' - FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' - FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' - FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' - FONTDATA_ITEM(181, 146, 146, fontpage_181_146_146), // '媒' -- '媒' - FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' - FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' - FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' - FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' - FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' - FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' - FONTDATA_ITEM(183, 185, 185, fontpage_183_185_185), // '容' -- '容' - FONTDATA_ITEM(184, 141, 141, fontpage_184_141_141), // '對' -- '對' - FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' - FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' - FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' - FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' - FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' - FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' - FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' - FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' - FONTDATA_ITEM(189, 226, 226, fontpage_189_226_226), // '廢' -- '廢' - FONTDATA_ITEM(189, 250, 250, fontpage_189_250_250), // '建' -- '建' - FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' - FONTDATA_ITEM(191, 133, 133, fontpage_191_133_133), // '待' -- '待' - FONTDATA_ITEM(191, 140, 140, fontpage_191_140_140), // '後' -- '後' - FONTDATA_ITEM(191, 145, 145, fontpage_191_145_145), // '徑' -- '徑' - FONTDATA_ITEM(191, 158, 158, fontpage_191_158_158), // '從' -- '從' - FONTDATA_ITEM(191, 169, 169, fontpage_191_169_169), // '復' -- '復' - FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' - FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' - FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' - FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' - FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' - FONTDATA_ITEM(195, 182, 182, fontpage_195_182_182), // '憶' -- '憶' - FONTDATA_ITEM(195, 201, 201, fontpage_195_201_201), // '應' -- '應' - FONTDATA_ITEM(196, 144, 144, fontpage_196_144_144), // '成' -- '成' - FONTDATA_ITEM(196, 182, 182, fontpage_196_182_182), // '戶' -- '戶' - FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' - FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' - FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' - FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' - FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' - FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' - FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' - FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' - FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' - FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' - FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' - FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' - FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' - FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' - FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' - FONTDATA_ITEM(199, 219, 219, fontpage_199_219_219), // '換' -- '換' - FONTDATA_ITEM(201, 199, 199, fontpage_201_199_199), // '擇' -- '擇' - FONTDATA_ITEM(201, 202, 203, fontpage_201_202_203), // '擊' -- '擋' - FONTDATA_ITEM(201, 224, 224, fontpage_201_224_224), // '擠' -- '擠' - FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' - FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' - FONTDATA_ITEM(202, 215, 215, fontpage_202_215_215), // '敗' -- '敗' - FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' - FONTDATA_ITEM(202, 248, 248, fontpage_202_248_248), // '數' -- '數' - FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' - FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' - FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' - FONTDATA_ITEM(203, 183, 183, fontpage_203_183_183), // '斷' -- '斷' - FONTDATA_ITEM(203, 188, 188, fontpage_203_188_188), // '於' -- '於' - FONTDATA_ITEM(204, 135, 135, fontpage_204_135_135), // '昇' -- '昇' - FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' - FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' - FONTDATA_ITEM(204, 194, 194, fontpage_204_194_194), // '時' -- '時' - FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' - FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' - FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' - FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' - FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' - FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' - FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' - FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' - FONTDATA_ITEM(209, 157, 157, fontpage_209_157_157), // '條' -- '條' - FONTDATA_ITEM(209, 196, 196, fontpage_209_196_196), // '棄' -- '棄' - FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' - FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' - FONTDATA_ITEM(212, 223, 223, fontpage_212_223_223), // '機' -- '機' - FONTDATA_ITEM(213, 162, 162, fontpage_213_162_162), // '檢' -- '檢' - FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' - FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' - FONTDATA_ITEM(214, 248, 248, fontpage_214_248_248), // '歸' -- '歸' - FONTDATA_ITEM(215, 188, 188, fontpage_215_188_188), // '殼' -- '殼' - FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' - FONTDATA_ITEM(217, 146, 146, fontpage_217_146_146), // '沒' -- '沒' - FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' - FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' - FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' - FONTDATA_ITEM(220, 172, 172, fontpage_220_172_172), // '測' -- '測' - FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' - FONTDATA_ITEM(221, 150, 150, fontpage_221_150_150), // '準' -- '準' - FONTDATA_ITEM(221, 171, 171, fontpage_221_171_171), // '溫' -- '溫' - FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' - FONTDATA_ITEM(226, 161, 161, fontpage_226_161_161), // '無' -- '無' - FONTDATA_ITEM(227, 177, 177, fontpage_227_177_177), // '熱' -- '熱' - FONTDATA_ITEM(227, 200, 200, fontpage_227_200_200), // '燈' -- '燈' - FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' - FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' - FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' - FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' - FONTDATA_ITEM(234, 204, 204, fontpage_234_204_204), // '界' -- '界' - FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' - FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' - FONTDATA_ITEM(237, 227, 227, fontpage_237_227_227), // '監' -- '監' - FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' - FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' - FONTDATA_ITEM(240, 141, 141, fontpage_240_141_141), // '砍' -- '砍' - FONTDATA_ITEM(241, 186, 186, fontpage_241_186_186), // '確' -- '確' - FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' - FONTDATA_ITEM(244, 205, 205, fontpage_244_205_205), // '積' -- '積' - FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' - FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' - FONTDATA_ITEM(247, 161, 161, fontpage_247_161_161), // '管' -- '管' - FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' - FONTDATA_ITEM(249, 251, 251, fontpage_249_251_251), // '系' -- '系' - FONTDATA_ITEM(250, 133, 133, fontpage_250_133_133), // '紅' -- '紅' - FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' - FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' - FONTDATA_ITEM(250, 176, 176, fontpage_250_176_176), // '細' -- '細' - FONTDATA_ITEM(250, 194, 194, fontpage_250_194_194), // '終' -- '終' - FONTDATA_ITEM(250, 241, 242, fontpage_250_241_242), // '統' -- '絲' - FONTDATA_ITEM(251, 160, 160, fontpage_251_160_160), // '綠' -- '綠' - FONTDATA_ITEM(251, 178, 178, fontpage_251_178_178), // '網' -- '網' - FONTDATA_ITEM(251, 210, 210, fontpage_251_210_210), // '緒' -- '緒' - FONTDATA_ITEM(251, 218, 218, fontpage_251_218_218), // '線' -- '線' - FONTDATA_ITEM(251, 232, 232, fontpage_251_232_232), // '編' -- '編' - FONTDATA_ITEM(252, 174, 174, fontpage_252_174_174), // '縮' -- '縮' - FONTDATA_ITEM(252, 189, 189, fontpage_252_189_189), // '總' -- '總' - FONTDATA_ITEM(252, 252, 252, fontpage_252_252_252), // '繼' -- '繼' - FONTDATA_ITEM(253, 140, 140, fontpage_253_140_140), // '續' -- '續' - FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' - FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' - FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' - FONTDATA_ITEM(256, 240, 240, fontpage_256_240_240), // '聰' -- '聰' - FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' - FONTDATA_ITEM(267, 205, 205, fontpage_267_205_205), // '藍' -- '藍' - FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' - FONTDATA_ITEM(272, 232, 232, fontpage_272_232_232), // '表' -- '表' - FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' - FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' - FONTDATA_ITEM(273, 221, 221, fontpage_273_221_221), // '裝' -- '裝' - FONTDATA_ITEM(274, 135, 135, fontpage_274_135_135), // '複' -- '複' - FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' - FONTDATA_ITEM(276, 136, 136, fontpage_276_136_136), // '計' -- '計' - FONTDATA_ITEM(276, 138, 138, fontpage_276_138_138), // '訊' -- '訊' - FONTDATA_ITEM(276, 152, 152, fontpage_276_152_152), // '記' -- '記' - FONTDATA_ITEM(276, 173, 173, fontpage_276_173_173), // '設' -- '設' - FONTDATA_ITEM(276, 230, 230, fontpage_276_230_230), // '試' -- '試' - FONTDATA_ITEM(277, 141, 141, fontpage_277_141_141), // '認' -- '認' - FONTDATA_ITEM(277, 164, 164, fontpage_277_164_164), // '誤' -- '誤' - FONTDATA_ITEM(277, 191, 191, fontpage_277_191_191), // '調' -- '調' - FONTDATA_ITEM(277, 203, 203, fontpage_277_203_203), // '請' -- '請' - FONTDATA_ITEM(278, 240, 240, fontpage_278_240_240), // '議' -- '議' - FONTDATA_ITEM(279, 128, 128, fontpage_279_128_128), // '讀' -- '讀' - FONTDATA_ITEM(279, 138, 138, fontpage_279_138_138), // '變' -- '變' - FONTDATA_ITEM(281, 199, 199, fontpage_281_199_199), // '資' -- '資' - FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' - FONTDATA_ITEM(285, 202, 202, fontpage_285_202_202), // '車' -- '車' - FONTDATA_ITEM(285, 223, 223, fontpage_285_223_223), // '軟' -- '軟' - FONTDATA_ITEM(285, 248, 248, fontpage_285_248_248), // '軸' -- '軸' - FONTDATA_ITEM(286, 137, 137, fontpage_286_137_137), // '載' -- '載' - FONTDATA_ITEM(286, 175, 175, fontpage_286_175_175), // '輯' -- '輯' - FONTDATA_ITEM(286, 184, 184, fontpage_286_184_184), // '輸' -- '輸' - FONTDATA_ITEM(286, 201, 201, fontpage_286_201_201), // '轉' -- '轉' - FONTDATA_ITEM(287, 209, 209, fontpage_287_209_209), // '近' -- '近' - FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' - FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' - FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' - FONTDATA_ITEM(288, 163, 163, fontpage_288_163_163), // '連' -- '連' - FONTDATA_ITEM(288, 178, 178, fontpage_288_178_178), // '進' -- '進' - FONTDATA_ITEM(288, 203, 203, fontpage_288_203_203), // '運' -- '運' - FONTDATA_ITEM(288, 212, 212, fontpage_288_212_212), // '達' -- '達' - FONTDATA_ITEM(288, 248, 248, fontpage_288_248_248), // '選' -- '選' - FONTDATA_ITEM(289, 132, 132, fontpage_289_132_132), // '還' -- '還' - FONTDATA_ITEM(289, 138, 138, fontpage_289_138_138), // '邊' -- '邊' - FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' - FONTDATA_ITEM(291, 203, 203, fontpage_291_203_203), // '釋' -- '釋' - FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' - FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' - FONTDATA_ITEM(291, 221, 221, fontpage_291_221_221), // '針' -- '針' - FONTDATA_ITEM(292, 149, 149, fontpage_292_149_149), // '鈕' -- '鈕' - FONTDATA_ITEM(294, 175, 175, fontpage_294_175_175), // '錯' -- '錯' - FONTDATA_ITEM(294, 245, 245, fontpage_294_245_245), // '鍵' -- '鍵' - FONTDATA_ITEM(298, 247, 247, fontpage_298_247_247), // '長' -- '長' - FONTDATA_ITEM(299, 137, 137, fontpage_299_137_137), // '閉' -- '閉' - FONTDATA_ITEM(299, 139, 139, fontpage_299_139_139), // '開' -- '開' - FONTDATA_ITEM(299, 147, 147, fontpage_299_147_147), // '間' -- '間' - FONTDATA_ITEM(299, 220, 220, fontpage_299_220_220), // '關' -- '關' - FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' - FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' - FONTDATA_ITEM(301, 142, 142, fontpage_301_142_142), // '階' -- '階' - FONTDATA_ITEM(301, 217, 217, fontpage_301_217_217), // '雙' -- '雙' - FONTDATA_ITEM(301, 226, 226, fontpage_301_226_226), // '離' -- '離' - FONTDATA_ITEM(301, 251, 251, fontpage_301_251_251), // '電' -- '電' - FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' - FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' - FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' - FONTDATA_ITEM(304, 133, 133, fontpage_304_133_133), // '項' -- '項' - FONTDATA_ITEM(304, 144, 144, fontpage_304_144_144), // '預' -- '預' - FONTDATA_ITEM(304, 205, 205, fontpage_304_205_205), // '額' -- '額' - FONTDATA_ITEM(304, 222, 222, fontpage_304_222_222), // '類' -- '類' - FONTDATA_ITEM(305, 168, 168, fontpage_305_168_168), // '風' -- '風' - FONTDATA_ITEM(305, 253, 253, fontpage_305_253_253), // '飽' -- '飽' - FONTDATA_ITEM(306, 152, 152, fontpage_306_152_152), // '餘' -- '餘' - FONTDATA_ITEM(307, 172, 172, fontpage_307_172_172), // '馬' -- '馬' - FONTDATA_ITEM(308, 197, 197, fontpage_308_197_197), // '驅' -- '驅' - FONTDATA_ITEM(309, 212, 212, fontpage_309_212_212), // '體' -- '體' - FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' - FONTDATA_ITEM(317, 195, 195, fontpage_317_195_195), // '黃' -- '黃' - FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' - FONTDATA_ITEM(318, 202, 202, fontpage_318_202_202), // '齊' -- '齊' - FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' +static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = { + FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' + FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' + FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' + FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' + FONTDATA_ITEM(156, 166, 166, fontpage_156_166_166), // '並' -- '並' + FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' + FONTDATA_ITEM(156, 187, 187, fontpage_156_187_187), // '主' -- '主' + FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' + FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' + FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' + FONTDATA_ITEM(157, 228, 228, fontpage_157_228_228), // '令' -- '令' + FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' + FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' + FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' + FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' + FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' + FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' + FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' + FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' + FONTDATA_ITEM(160, 139, 139, fontpage_160_139_139), // '個' -- '個' + FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' + FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' + FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' + FONTDATA_ITEM(160, 245, 245, fontpage_160_245_245), // '偵' -- '偵' + FONTDATA_ITEM(161, 153, 153, fontpage_161_153_153), // '備' -- '備' + FONTDATA_ITEM(161, 179, 179, fontpage_161_179_179), // '傳' -- '傳' + FONTDATA_ITEM(161, 190, 190, fontpage_161_190_190), // '傾' -- '傾' + FONTDATA_ITEM(162, 178, 178, fontpage_162_178_178), // '儲' -- '儲' + FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' + FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' + FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' + FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' + FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' + FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' + FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' + FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' + FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' + FONTDATA_ITEM(163, 250, 250, fontpage_163_250_250), // '出' -- '出' + FONTDATA_ITEM(164, 134, 134, fontpage_164_134_134), // '分' -- '分' + FONTDATA_ITEM(164, 151, 151, fontpage_164_151_151), // '列' -- '列' + FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' + FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' + FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' + FONTDATA_ITEM(164, 245, 245, fontpage_164_245_245), // '創' -- '創' + FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' + FONTDATA_ITEM(165, 160, 160, fontpage_165_160_160), // '加' -- '加' + FONTDATA_ITEM(165, 213, 213, fontpage_165_213_213), // '動' -- '動' + FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' + FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' + FONTDATA_ITEM(166, 212, 212, fontpage_166_212_212), // '協' -- '協' + FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' + FONTDATA_ITEM(166, 240, 240, fontpage_166_240_240), // '印' -- '印' + FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' + FONTDATA_ITEM(166, 251, 251, fontpage_166_251_251), // '卻' -- '卻' + FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' + FONTDATA_ITEM(167, 205, 205, fontpage_167_205_205), // '反' -- '反' + FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' + FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' + FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' + FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' + FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' + FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' + FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' + FONTDATA_ITEM(170, 223, 223, fontpage_170_223_223), // '啟' -- '啟' + FONTDATA_ITEM(171, 174, 174, fontpage_171_174_174), // '單' -- '單' + FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' + FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' + FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' + FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' + FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' + FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' + FONTDATA_ITEM(174, 150, 150, fontpage_174_150_150), // '圖' -- '圖' + FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' + FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' + FONTDATA_ITEM(175, 247, 247, fontpage_175_247_247), // '執' -- '執' + FONTDATA_ITEM(176, 202, 202, fontpage_176_202_202), // '塊' -- '塊' + FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' + FONTDATA_ITEM(177, 138, 138, fontpage_177_138_138), // '墊' -- '墊' + FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' + FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' + FONTDATA_ITEM(178, 160, 160, fontpage_178_160_160), // '夠' -- '夠' + FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' + FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' + FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' + FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' + FONTDATA_ITEM(181, 146, 146, fontpage_181_146_146), // '媒' -- '媒' + FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' + FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' + FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' + FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' + FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' + FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' + FONTDATA_ITEM(183, 185, 185, fontpage_183_185_185), // '容' -- '容' + FONTDATA_ITEM(184, 141, 141, fontpage_184_141_141), // '對' -- '對' + FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' + FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' + FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' + FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' + FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' + FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' + FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' + FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' + FONTDATA_ITEM(189, 226, 226, fontpage_189_226_226), // '廢' -- '廢' + FONTDATA_ITEM(189, 250, 250, fontpage_189_250_250), // '建' -- '建' + FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' + FONTDATA_ITEM(191, 133, 133, fontpage_191_133_133), // '待' -- '待' + FONTDATA_ITEM(191, 140, 140, fontpage_191_140_140), // '後' -- '後' + FONTDATA_ITEM(191, 145, 145, fontpage_191_145_145), // '徑' -- '徑' + FONTDATA_ITEM(191, 158, 158, fontpage_191_158_158), // '從' -- '從' + FONTDATA_ITEM(191, 169, 169, fontpage_191_169_169), // '復' -- '復' + FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' + FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' + FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' + FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' + FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' + FONTDATA_ITEM(195, 182, 182, fontpage_195_182_182), // '憶' -- '憶' + FONTDATA_ITEM(195, 201, 201, fontpage_195_201_201), // '應' -- '應' + FONTDATA_ITEM(196, 144, 144, fontpage_196_144_144), // '成' -- '成' + FONTDATA_ITEM(196, 182, 182, fontpage_196_182_182), // '戶' -- '戶' + FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' + FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' + FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' + FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' + FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' + FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' + FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' + FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' + FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' + FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' + FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' + FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' + FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' + FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' + FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' + FONTDATA_ITEM(199, 219, 219, fontpage_199_219_219), // '換' -- '換' + FONTDATA_ITEM(201, 199, 199, fontpage_201_199_199), // '擇' -- '擇' + FONTDATA_ITEM(201, 202, 203, fontpage_201_202_203), // '擊' -- '擋' + FONTDATA_ITEM(201, 224, 224, fontpage_201_224_224), // '擠' -- '擠' + FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' + FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' + FONTDATA_ITEM(202, 215, 215, fontpage_202_215_215), // '敗' -- '敗' + FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' + FONTDATA_ITEM(202, 248, 248, fontpage_202_248_248), // '數' -- '數' + FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' + FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' + FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' + FONTDATA_ITEM(203, 183, 183, fontpage_203_183_183), // '斷' -- '斷' + FONTDATA_ITEM(203, 188, 188, fontpage_203_188_188), // '於' -- '於' + FONTDATA_ITEM(204, 135, 135, fontpage_204_135_135), // '昇' -- '昇' + FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' + FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' + FONTDATA_ITEM(204, 194, 194, fontpage_204_194_194), // '時' -- '時' + FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' + FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' + FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' + FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' + FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' + FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' + FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' + FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' + FONTDATA_ITEM(209, 157, 157, fontpage_209_157_157), // '條' -- '條' + FONTDATA_ITEM(209, 196, 196, fontpage_209_196_196), // '棄' -- '棄' + FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' + FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' + FONTDATA_ITEM(212, 223, 223, fontpage_212_223_223), // '機' -- '機' + FONTDATA_ITEM(213, 162, 162, fontpage_213_162_162), // '檢' -- '檢' + FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' + FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' + FONTDATA_ITEM(214, 248, 248, fontpage_214_248_248), // '歸' -- '歸' + FONTDATA_ITEM(215, 188, 188, fontpage_215_188_188), // '殼' -- '殼' + FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' + FONTDATA_ITEM(217, 146, 146, fontpage_217_146_146), // '沒' -- '沒' + FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' + FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' + FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' + FONTDATA_ITEM(220, 172, 172, fontpage_220_172_172), // '測' -- '測' + FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' + FONTDATA_ITEM(221, 150, 150, fontpage_221_150_150), // '準' -- '準' + FONTDATA_ITEM(221, 171, 171, fontpage_221_171_171), // '溫' -- '溫' + FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' + FONTDATA_ITEM(226, 161, 161, fontpage_226_161_161), // '無' -- '無' + FONTDATA_ITEM(227, 177, 177, fontpage_227_177_177), // '熱' -- '熱' + FONTDATA_ITEM(227, 200, 200, fontpage_227_200_200), // '燈' -- '燈' + FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' + FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' + FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' + FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' + FONTDATA_ITEM(234, 204, 204, fontpage_234_204_204), // '界' -- '界' + FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' + FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' + FONTDATA_ITEM(237, 227, 227, fontpage_237_227_227), // '監' -- '監' + FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' + FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' + FONTDATA_ITEM(240, 141, 141, fontpage_240_141_141), // '砍' -- '砍' + FONTDATA_ITEM(241, 186, 186, fontpage_241_186_186), // '確' -- '確' + FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' + FONTDATA_ITEM(244, 205, 205, fontpage_244_205_205), // '積' -- '積' + FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' + FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' + FONTDATA_ITEM(247, 161, 161, fontpage_247_161_161), // '管' -- '管' + FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' + FONTDATA_ITEM(249, 251, 251, fontpage_249_251_251), // '系' -- '系' + FONTDATA_ITEM(250, 133, 133, fontpage_250_133_133), // '紅' -- '紅' + FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' + FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' + FONTDATA_ITEM(250, 176, 176, fontpage_250_176_176), // '細' -- '細' + FONTDATA_ITEM(250, 194, 194, fontpage_250_194_194), // '終' -- '終' + FONTDATA_ITEM(250, 241, 242, fontpage_250_241_242), // '統' -- '絲' + FONTDATA_ITEM(251, 160, 160, fontpage_251_160_160), // '綠' -- '綠' + FONTDATA_ITEM(251, 178, 178, fontpage_251_178_178), // '網' -- '網' + FONTDATA_ITEM(251, 210, 210, fontpage_251_210_210), // '緒' -- '緒' + FONTDATA_ITEM(251, 218, 218, fontpage_251_218_218), // '線' -- '線' + FONTDATA_ITEM(251, 232, 232, fontpage_251_232_232), // '編' -- '編' + FONTDATA_ITEM(252, 174, 174, fontpage_252_174_174), // '縮' -- '縮' + FONTDATA_ITEM(252, 189, 189, fontpage_252_189_189), // '總' -- '總' + FONTDATA_ITEM(252, 252, 252, fontpage_252_252_252), // '繼' -- '繼' + FONTDATA_ITEM(253, 140, 140, fontpage_253_140_140), // '續' -- '續' + FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' + FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' + FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' + FONTDATA_ITEM(256, 240, 240, fontpage_256_240_240), // '聰' -- '聰' + FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' + FONTDATA_ITEM(267, 205, 205, fontpage_267_205_205), // '藍' -- '藍' + FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' + FONTDATA_ITEM(272, 232, 232, fontpage_272_232_232), // '表' -- '表' + FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' + FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' + FONTDATA_ITEM(273, 221, 221, fontpage_273_221_221), // '裝' -- '裝' + FONTDATA_ITEM(274, 135, 135, fontpage_274_135_135), // '複' -- '複' + FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' + FONTDATA_ITEM(276, 136, 136, fontpage_276_136_136), // '計' -- '計' + FONTDATA_ITEM(276, 138, 138, fontpage_276_138_138), // '訊' -- '訊' + FONTDATA_ITEM(276, 152, 152, fontpage_276_152_152), // '記' -- '記' + FONTDATA_ITEM(276, 173, 173, fontpage_276_173_173), // '設' -- '設' + FONTDATA_ITEM(276, 230, 230, fontpage_276_230_230), // '試' -- '試' + FONTDATA_ITEM(277, 141, 141, fontpage_277_141_141), // '認' -- '認' + FONTDATA_ITEM(277, 164, 164, fontpage_277_164_164), // '誤' -- '誤' + FONTDATA_ITEM(277, 191, 191, fontpage_277_191_191), // '調' -- '調' + FONTDATA_ITEM(277, 203, 203, fontpage_277_203_203), // '請' -- '請' + FONTDATA_ITEM(278, 240, 240, fontpage_278_240_240), // '議' -- '議' + FONTDATA_ITEM(279, 128, 128, fontpage_279_128_128), // '讀' -- '讀' + FONTDATA_ITEM(279, 138, 138, fontpage_279_138_138), // '變' -- '變' + FONTDATA_ITEM(281, 199, 199, fontpage_281_199_199), // '資' -- '資' + FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' + FONTDATA_ITEM(285, 202, 202, fontpage_285_202_202), // '車' -- '車' + FONTDATA_ITEM(285, 223, 223, fontpage_285_223_223), // '軟' -- '軟' + FONTDATA_ITEM(285, 248, 248, fontpage_285_248_248), // '軸' -- '軸' + FONTDATA_ITEM(286, 137, 137, fontpage_286_137_137), // '載' -- '載' + FONTDATA_ITEM(286, 175, 175, fontpage_286_175_175), // '輯' -- '輯' + FONTDATA_ITEM(286, 184, 184, fontpage_286_184_184), // '輸' -- '輸' + FONTDATA_ITEM(286, 201, 201, fontpage_286_201_201), // '轉' -- '轉' + FONTDATA_ITEM(287, 209, 209, fontpage_287_209_209), // '近' -- '近' + FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' + FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' + FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' + FONTDATA_ITEM(288, 163, 163, fontpage_288_163_163), // '連' -- '連' + FONTDATA_ITEM(288, 178, 178, fontpage_288_178_178), // '進' -- '進' + FONTDATA_ITEM(288, 203, 203, fontpage_288_203_203), // '運' -- '運' + FONTDATA_ITEM(288, 212, 212, fontpage_288_212_212), // '達' -- '達' + FONTDATA_ITEM(288, 248, 248, fontpage_288_248_248), // '選' -- '選' + FONTDATA_ITEM(289, 132, 132, fontpage_289_132_132), // '還' -- '還' + FONTDATA_ITEM(289, 138, 138, fontpage_289_138_138), // '邊' -- '邊' + FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' + FONTDATA_ITEM(291, 203, 203, fontpage_291_203_203), // '釋' -- '釋' + FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' + FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' + FONTDATA_ITEM(291, 221, 221, fontpage_291_221_221), // '針' -- '針' + FONTDATA_ITEM(292, 149, 149, fontpage_292_149_149), // '鈕' -- '鈕' + FONTDATA_ITEM(294, 175, 175, fontpage_294_175_175), // '錯' -- '錯' + FONTDATA_ITEM(294, 245, 245, fontpage_294_245_245), // '鍵' -- '鍵' + FONTDATA_ITEM(298, 247, 247, fontpage_298_247_247), // '長' -- '長' + FONTDATA_ITEM(299, 137, 137, fontpage_299_137_137), // '閉' -- '閉' + FONTDATA_ITEM(299, 139, 139, fontpage_299_139_139), // '開' -- '開' + FONTDATA_ITEM(299, 147, 147, fontpage_299_147_147), // '間' -- '間' + FONTDATA_ITEM(299, 220, 220, fontpage_299_220_220), // '關' -- '關' + FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' + FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' + FONTDATA_ITEM(301, 142, 142, fontpage_301_142_142), // '階' -- '階' + FONTDATA_ITEM(301, 217, 217, fontpage_301_217_217), // '雙' -- '雙' + FONTDATA_ITEM(301, 226, 226, fontpage_301_226_226), // '離' -- '離' + FONTDATA_ITEM(301, 251, 251, fontpage_301_251_251), // '電' -- '電' + FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' + FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' + FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' + FONTDATA_ITEM(304, 133, 133, fontpage_304_133_133), // '項' -- '項' + FONTDATA_ITEM(304, 144, 144, fontpage_304_144_144), // '預' -- '預' + FONTDATA_ITEM(304, 205, 205, fontpage_304_205_205), // '額' -- '額' + FONTDATA_ITEM(304, 222, 222, fontpage_304_222_222), // '類' -- '類' + FONTDATA_ITEM(305, 168, 168, fontpage_305_168_168), // '風' -- '風' + FONTDATA_ITEM(305, 253, 253, fontpage_305_253_253), // '飽' -- '飽' + FONTDATA_ITEM(306, 152, 152, fontpage_306_152_152), // '餘' -- '餘' + FONTDATA_ITEM(307, 172, 172, fontpage_307_172_172), // '馬' -- '馬' + FONTDATA_ITEM(308, 197, 197, fontpage_308_197_197), // '驅' -- '驅' + FONTDATA_ITEM(309, 212, 212, fontpage_309_212_212), // '體' -- '體' + FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' + FONTDATA_ITEM(317, 195, 195, fontpage_317_195_195), // '黃' -- '黃' + FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' + FONTDATA_ITEM(318, 202, 202, fontpage_318_202_202), // '齊' -- '齊' + FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' }; diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index f6ed2275397f..25e943a14d14 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -79,6 +79,18 @@ U8G_CLASS u8g; #include LANGUAGE_DATA_INCL(LCD_LANGUAGE) +#ifdef LCD_LANGUAGE_2 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_2) +#endif +#ifdef LCD_LANGUAGE_3 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_3) +#endif +#ifdef LCD_LANGUAGE_4 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_4) +#endif +#ifdef LCD_LANGUAGE_5 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_5) +#endif #if HAS_LCD_CONTRAST @@ -293,7 +305,29 @@ void MarlinUI::init_lcd() { TERN_(LCD_SCREEN_ROT_180, u8g.setRot180()); TERN_(LCD_SCREEN_ROT_270, u8g.setRot270()); - uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo)); + update_language_font(); +} + +void MarlinUI::update_language_font() { + #if HAS_MULTI_LANGUAGE + switch (language) { + default: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE), COUNT(LANG_FONT_INFO(LCD_LANGUAGE))); break; + #ifdef LCD_LANGUAGE_2 + case 1: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_2), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_2))); break; + #endif + #ifdef LCD_LANGUAGE_3 + case 2: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_3), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_3))); break; + #endif + #ifdef LCD_LANGUAGE_4 + case 3: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_4), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_4))); break; + #endif + #ifdef LCD_LANGUAGE_5 + case 4: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_5), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_5))); break; + #endif + } + #else + uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE), COUNT(LANG_FONT_INFO(LCD_LANGUAGE))); + #endif } // The kill screen is displayed for unrecoverable conditions diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.h b/Marlin/src/lcd/dogm/u8g_fontutf8.h index d7ea618de008..9760ef106bd1 100644 --- a/Marlin/src/lcd/dogm/u8g_fontutf8.h +++ b/Marlin/src/lcd/dogm/u8g_fontutf8.h @@ -35,3 +35,6 @@ int uxg_GetUtf8StrPixelWidth(u8g_t *pu8g, const char *utf8_msg); int uxg_GetUtf8StrPixelWidthP(u8g_t *pu8g, PGM_P utf8_msg); #define uxg_GetFont(puxg) ((puxg)->font) + +#define _LANG_FONT_INFO(L) g_fontinfo_##L +#define LANG_FONT_INFO(L) _LANG_FONT_INFO(L) diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 39093a7c6c51..33eb7fca156e 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -31,7 +31,7 @@ namespace Language_zh_CN { using namespace Language_en; // Inherit undefined strings from English constexpr uint8_t CHARSIZE = 3; - PROGMEM Language_Str LANGUAGE = _UxGT("简体中文"); + PROGMEM Language_Str LANGUAGE = _UxGT("Simplified Chinese"); PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT("已就绪."); //" ready." PROGMEM Language_Str MSG_MARLIN = _UxGT("马林"); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 206bae925a3d..346082986d0f 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -88,6 +88,14 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #if HAS_MULTI_LANGUAGE uint8_t MarlinUI::language; // Initialized by settings.load() + void MarlinUI::set_language(const uint8_t lang) { + if (lang < NUM_LANGUAGES) { + language = lang; + TERN_(HAS_MARLINUI_U8GLIB, update_language_font()); + return_to_status(); + refresh(); + } + } #endif #if ENABLED(SOUND_MENU_ITEM) diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index bf7215d38357..4f11ded53f1a 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -200,13 +200,11 @@ class MarlinUI { #if HAS_MULTI_LANGUAGE static uint8_t language; - static inline void set_language(const uint8_t lang) { - if (lang < NUM_LANGUAGES) { - language = lang; - return_to_status(); - refresh(); - } - } + static void set_language(const uint8_t lang); + #endif + + #if HAS_MARLINUI_U8GLIB + static void update_language_font(); #endif #if ENABLED(SOUND_MENU_ITEM) From 1a0103d276696793429574bf5550034010f4303a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 19 Jul 2021 01:03:15 +0000 Subject: [PATCH 091/323] [cron] Bump distribution date (2021-07-19) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c1cd96ecac17..ea80f51d2895 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-18" +//#define STRING_DISTRIBUTION_DATE "2021-07-19" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index b88141a5b77a..29249b0b9b4c 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-18" + #define STRING_DISTRIBUTION_DATE "2021-07-19" #endif /** From 286f6ba0bd2ab4d405fc83d913399130fa063f9a Mon Sep 17 00:00:00 2001 From: Mike La Spina Date: Sun, 18 Jul 2021 20:11:24 -0500 Subject: [PATCH 092/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Ammeter=20display?= =?UTF-8?q?=20on=20DOGM=20(#22384)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/dogm/dogm_Statusscreen.h | 6 +++--- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/dogm/dogm_Statusscreen.h b/Marlin/src/lcd/dogm/dogm_Statusscreen.h index 6aa2bab0da93..dfbf7b429111 100644 --- a/Marlin/src/lcd/dogm/dogm_Statusscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Statusscreen.h @@ -624,7 +624,7 @@ #define STATUS_AMMETER_X (LCD_PIXEL_WIDTH - (STATUS_AMMETER_BYTEWIDTH + STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8) #endif #ifndef STATUS_AMMETER_HEIGHT - #define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp1) / (STATUS_AMMETER_BYTEWIDTH)) + #define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp_mA) / (STATUS_AMMETER_BYTEWIDTH)) #endif #ifndef STATUS_AMMETER_Y #define STATUS_AMMETER_Y(S) (18 - STATUS_AMMETER_HEIGHT(S)) @@ -633,8 +633,8 @@ #define STATUS_AMMETER_TEXT_X (STATUS_AMMETER_X + 7) #endif static_assert( - sizeof(status_ammeter_bmp1) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0), - "Status ammeter bitmap (status_ammeter_bmp1) dimensions don't match data." + sizeof(status_ammeter_bmp_mA) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0), + "Status ammeter bitmap (status_ammeter_bmp_mA) dimensions don't match data." ); #endif diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index d58be4dbaf5c..a66aca6d19a6 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -57,6 +57,10 @@ #include "../../feature/cooler.h" #endif +#if ENABLED(I2C_AMMETER) + #include "../../feature/ammeter.h" +#endif + #if HAS_POWER_MONITOR #include "../../feature/power_monitor.h" #endif From 273ff6fedc4701733464ff33625fba3dbdf1a53c Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Sun, 18 Jul 2021 18:24:27 -0700 Subject: [PATCH 093/323] =?UTF-8?q?=F0=9F=90=9B=20Ensure=20Software=20SPI?= =?UTF-8?q?=20pins=20for=20Max=20Thermocouple=20(#22389)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/temperature.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index fd2c260fd311..f8ccc0c0671c 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -107,6 +107,24 @@ #if (TEMP_SENSOR_0_USES_SW_SPI || TEMP_SENSOR_1_USES_SW_SPI) && !HAS_MAXTC_LIBRARIES #include "../libs/private_spi.h" #define HAS_MAXTC_SW_SPI 1 + + // Define pins for SPI-based sensors + #if TEMP_SENSOR_0_USES_SW_SPI + #define SW_SPI_SCK_PIN TEMP_0_SCK_PIN + #define SW_SPI_MISO_PIN TEMP_0_MISO_PIN + #if PIN_EXISTS(TEMP_0_MOSI) + #define SW_SPI_MOSI_PIN TEMP_0_MOSI_PIN + #endif + #else + #define SW_SPI_SCK_PIN TEMP_1_SCK_PIN + #define SW_SPI_MISO_PIN TEMP_1_MISO_PIN + #if PIN_EXISTS(TEMP_1_MOSI) + #define SW_SPI_MOSI_PIN TEMP_1_MOSI_PIN + #endif + #endif + #ifndef SW_SPI_MOSI_PIN + #define SW_SPI_MOSI_PIN SD_MOSI_PIN + #endif #endif #if ENABLED(PID_EXTRUSION_SCALING) @@ -198,7 +216,8 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, // Initialize SoftSPI for non-lib Software SPI; Libraries take care of it themselves. template SoftSPI SPIclass::softSPI; - SPIclass max_tc_spi; + SPIclass max_tc_spi; + #endif #define MAXTC_INIT(n, M) \ From 67019bc2778c00ec0ba80519078ad5ecc57f06ff Mon Sep 17 00:00:00 2001 From: Malderin <52313714+Malderin@users.noreply.github.com> Date: Mon, 19 Jul 2021 05:21:51 +0300 Subject: [PATCH 094/323] Fix MKS UI compile (#22388) Co-authored-by: Scott Lahteine --- Marlin/src/MarlinCore.cpp | 2 +- .../src/lcd/extui/mks_ui/draw_error_message.cpp | 7 +------ .../src/lcd/extui/mks_ui/draw_ready_print.cpp | 7 ++----- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 4 ++-- .../{mks_hardware_test.cpp => mks_hardware.cpp} | 7 +++---- .../{mks_hardware_test.h => mks_hardware.h} | 17 ++++++++++++----- Marlin/src/lcd/extui/mks_ui/pic_manager.cpp | 7 +------ .../lcd/extui/mks_ui/tft_lvgl_configuration.cpp | 4 ++-- 8 files changed, 24 insertions(+), 31 deletions(-) rename Marlin/src/lcd/extui/mks_ui/{mks_hardware_test.cpp => mks_hardware.cpp} (99%) rename Marlin/src/lcd/extui/mks_ui/{mks_hardware_test.h => mks_hardware.h} (80%) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 1da030b24965..07a6a31b94e3 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -70,7 +70,7 @@ #if HAS_TFT_LVGL_UI #include "lcd/extui/mks_ui/tft_lvgl_configuration.h" #include "lcd/extui/mks_ui/draw_ui.h" - #include "lcd/extui/mks_ui/mks_hardware_test.h" + #include "lcd/extui/mks_ui/mks_hardware.h" #include #endif diff --git a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp index 7ee2617326f0..48ff56253b81 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp @@ -25,15 +25,10 @@ #include "draw_ui.h" #include - #include "tft_lvgl_configuration.h" - #include "SPI_TFT.h" #include "../../../inc/MarlinConfig.h" - -#if ENABLED(MKS_TEST) - #include "mks_hardware_test.h" -#endif +#include "mks_hardware.h" static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp index 83aec7613e01..6f24d81b4931 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp @@ -39,10 +39,7 @@ #include "draw_touch_calibration.h" #endif -#if ENABLED(MKS_TEST) - #include "mks_hardware_test.h" -#endif - +#include "mks_hardware.h" #include #define ICON_POS_Y 38 @@ -129,7 +126,7 @@ void lv_draw_ready_print() { ZERO(disp_state_stack._disp_state); scr = lv_screen_create(PRINT_READY_UI, ""); - if (mks_test_flag == 0x1E) { + if (TERN0(SDSUPPORT, mks_test_flag == 0x1E)) { // Create image buttons buttonTool = lv_imgbtn_create(scr, "F:/bmp_tool.bin", event_handler, ID_TOOL); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 30e08e03ed45..1c1e5cc1f5a6 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -52,7 +52,7 @@ #endif #if ENABLED(MKS_TEST) - #include "mks_hardware_test.h" + #include "mks_hardware.h" #endif CFG_ITMES gCfgItems; @@ -1366,7 +1366,7 @@ void print_time_count() { void LV_TASK_HANDLER() { lv_task_handler(); - #if ENABLED(MKS_TEST) + #if BOTH(MKS_TEST, SDSUPPORT) if (mks_test_flag == 0x1E) mks_hardware_test(); #endif diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp similarity index 99% rename from Marlin/src/lcd/extui/mks_ui/mks_hardware_test.cpp rename to Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index 125f8be0f6c3..cf9790ea9d8c 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -37,7 +37,7 @@ #if ENABLED(MKS_TEST) - #include "mks_hardware_test.h" + #include "mks_hardware.h" bool pw_det_sta, pw_off_sta, mt_det_sta; #if PIN_EXISTS(MT_DET_2) @@ -613,10 +613,9 @@ void disp_assets_update_progress(const char *msg) { disp_string(100, 165, buf, 0xFFFF, 0x0000); } -uint8_t mks_test_flag = 0; -const char *MKSTestPath = "MKS_TEST"; - #if ENABLED(SDSUPPORT) + uint8_t mks_test_flag = 0; + const char *MKSTestPath = "MKS_TEST"; void mks_test_get() { SdFile dir, root = card.getroot(); if (dir.open(&root, MKSTestPath, O_RDONLY)) diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.h b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h similarity index 80% rename from Marlin/src/lcd/extui/mks_ui/mks_hardware_test.h rename to Marlin/src/lcd/extui/mks_ui/mks_hardware.h index 1b46d4b0e61e..de0c3a738ebd 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware_test.h +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h @@ -21,15 +21,22 @@ */ #pragma once +#include "../../../inc/MarlinConfigPre.h" + #include -void mks_gpio_test(); -void mks_hardware_test(); -void mks_test_get(); +// Functions for MKS_TEST +#if ENABLED(MKS_TEST) + void mks_gpio_test(); + void mks_hardware_test(); + void mks_test_get(); +#endif -void disp_char_1624(uint16_t x, uint16_t y, uint8_t c, uint16_t charColor, uint16_t bkColor); +// String display and assets void disp_string(uint16_t x, uint16_t y, const char * string, uint16_t charColor, uint16_t bkColor); void disp_assets_update(); void disp_assets_update_progress(const char *msg); -extern uint8_t mks_test_flag; +#if ENABLED(SDSUPPORT) + extern uint8_t mks_test_flag; +#endif diff --git a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp index 03e408e32a38..68344e770c02 100644 --- a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp @@ -27,14 +27,9 @@ #include "draw_ui.h" #include "pic_manager.h" #include "draw_ready_print.h" - -#if ENABLED(MKS_TEST) - #include "mks_hardware_test.h" -#endif - +#include "mks_hardware.h" #include "SPIFlashStorage.h" #include "../../../libs/W25Qxx.h" - #include "../../../sd/cardreader.h" #include "../../../MarlinCore.h" diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 7f84277ef07b..d8c5fbd6ec6b 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -29,7 +29,7 @@ #include "draw_ready_print.h" #include "pic_manager.h" -#include "mks_hardware_test.h" +#include "mks_hardware.h" #include "draw_ui.h" #include "SPIFlashStorage.h" #include @@ -231,7 +231,7 @@ void tft_lvgl_init() { if (ready) lv_draw_ready_print(); - #if ENABLED(MKS_TEST) + #if BOTH(MKS_TEST, SDSUPPORT) if (mks_test_flag == 0x1E) mks_gpio_test(); #endif } From c2f72cde1024538a6026b9db794fcd4f6b7ca07a Mon Sep 17 00:00:00 2001 From: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Mon, 19 Jul 2021 05:39:01 +0300 Subject: [PATCH 095/323] =?UTF-8?q?=E2=9C=A8=20Laser=20support=20for=20TFT?= =?UTF-8?q?=20GLCD=20(#22391)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 312 ++++++++++++++------ 2 files changed, 221 insertions(+), 93 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 6cf0b822418d..7e2239b3f654 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -213,7 +213,7 @@ #define LCD_PROGRESS_BAR #endif #if ENABLED(TFTGLCD_PANEL_I2C) - #define LCD_I2C_ADDRESS 0x27 // Must be equal to panel's I2C slave addres + #define LCD_I2C_ADDRESS 0x33 // Must be 0x33 for STM32 main boards and equal to panel's I2C slave addres #endif #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD, used for both I2C and SPI buses (LiquidTWI2 not required) #define STD_ENCODER_PULSES_PER_STEP 2 diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index edb17b69c08b..332481995598 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -57,6 +57,18 @@ #include "../../gcode/parser.h" #endif +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) + #include "../../feature/cooler.h" +#endif + +#if ENABLED(I2C_AMMETER) + #include "../../feature/ammeter.h" +#endif + +#if HAS_CUTTER + #include "../../feature/spindle_laser.h" +#endif + #if ENABLED(AUTO_BED_LEVELING_UBL) #include "../../feature/bedlevel/bedlevel.h" #endif @@ -64,12 +76,12 @@ TFTGLCD lcd; #define ICON_LOGO B00000001 -#define ICON_TEMP1 B00000010 //hotend 1 -#define ICON_TEMP2 B00000100 //hotend 2 -#define ICON_TEMP3 B00001000 //hotend 3 +#define ICON_TEMP1 B00000010 // Hotend 1 +#define ICON_TEMP2 B00000100 // Hotend 2 +#define ICON_TEMP3 B00001000 // Hotend 3 #define ICON_BED B00010000 #define ICON_FAN B00100000 -#define ICON_HOT B01000000 //when any T > 50deg +#define ICON_HOT B01000000 // When any T > 50deg #define PIC_MASK 0x7F // LEDs not used, for compatibility with Smoothieware @@ -433,69 +445,161 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const lcd_put_u8str(value); } -FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *prefix, const bool blink) { - uint8_t pic_hot_bits; - #if HAS_HEATED_BED - const bool isBed = heater_id < 0; - const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)), - t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id)); - #else - const celsius_t t1 = thermalManager.wholeDegHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id); - #endif +#if HAS_HOTEND || HAS_HEATED_BED - #if HOTENDS < 2 - if (heater_id == H_E0) { - lcd.setCursor(2, 5); lcd.print(prefix); //HE - lcd.setCursor(1, 6); lcd.print(i16tostr3rj(t1)); - lcd.setCursor(1, 7); - } - else { - lcd.setCursor(6, 5); lcd.print(prefix); //BED - lcd.setCursor(6, 6); lcd.print(i16tostr3rj(t1)); - lcd.setCursor(6, 7); + FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *prefix, const bool blink) { + uint8_t pic_hot_bits; + #if HAS_HEATED_BED + const bool isBed = heater_id < 0; + const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)), + t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id)); + #else + const celsius_t t1 = thermalManager.wholeDegHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id); + #endif + + #if HOTENDS < 2 + if (heater_id == H_E0) { + lcd.setCursor(2, 5); lcd.print(prefix); //HE + lcd.setCursor(1, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(1, 7); + } + else { + lcd.setCursor(6, 5); lcd.print(prefix); //BED + lcd.setCursor(6, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(6, 7); + } + #else + if (heater_id > H_BED) { + lcd.setCursor(heater_id * 4, 5); lcd.print(prefix); // HE1 or HE2 or HE3 + lcd.setCursor(heater_id * 4, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(heater_id * 4, 7); + } + else { + lcd.setCursor(13, 5); lcd.print(prefix); //BED + lcd.setCursor(13, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(13, 7); + } + #endif // HOTENDS <= 1 + + #if !HEATER_IDLE_HANDLER + UNUSED(blink); + #else + if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) { + lcd.write(' '); + if (t2 >= 10) lcd.write(' '); + if (t2 >= 100) lcd.write(' '); + } + else + #endif // !HEATER_IDLE_HANDLER + lcd.print(i16tostr3rj(t2)); + + switch (heater_id) { + case H_BED: pic_hot_bits = ICON_BED; break; + case H_E0: pic_hot_bits = ICON_TEMP1; break; + case H_E1: pic_hot_bits = ICON_TEMP2; break; + case H_E2: pic_hot_bits = ICON_TEMP3; + default: break; } - #else - if (heater_id > H_BED) { - lcd.setCursor(heater_id * 4, 5); lcd.print(prefix); // HE1 or HE2 or HE3 - lcd.setCursor(heater_id * 4, 6); lcd.print(i16tostr3rj(t1)); - lcd.setCursor(heater_id * 4, 7); + + if (t2) picBits |= pic_hot_bits; + else picBits &= ~pic_hot_bits; + + if (t1 > 50) hotBits |= pic_hot_bits; + else hotBits &= ~pic_hot_bits; + + if (hotBits) picBits |= ICON_HOT; + else picBits &= ~ICON_HOT; + } + +#endif // HAS_HOTEND || HAS_HEATED_BED + +#if HAS_COOLER + + FORCE_INLINE void _draw_cooler_status(const bool blink) { + const celsius_t t2 = thermalManager.degTargetCooler(); + + lcd.setCursor(0, 5); lcd_put_u8str_P(PSTR("COOL")); + lcd.setCursor(1, 6); lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegCooler())); + lcd.setCursor(1, 7); + + #if !HEATER_IDLE_HANDLER + UNUSED(blink); + #else + if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) { + lcd_put_wchar(' '); + if (t2 >= 10) lcd_put_wchar(' '); + if (t2 >= 100) lcd_put_wchar(' '); + } + else + #endif + lcd_put_u8str(i16tostr3left(t2)); + + lcd_put_wchar(' '); + if (t2 < 10) lcd_put_wchar(' '); + + if (t2) picBits |= ICON_TEMP1; + else picBits &= ~ICON_TEMP1; + } + +#endif // HAS_COOLER + +#if ENABLED(LASER_COOLANT_FLOW_METER) + + FORCE_INLINE void _draw_flowmeter_status() { + lcd.setCursor(5, 5); lcd_put_u8str_P(PSTR("FLOW")); + lcd.setCursor(7, 6); lcd_put_wchar('L'); + lcd.setCursor(6, 7); lcd_put_u8str(ftostr11ns(cooler.flowrate)); + + if (cooler.flowrate) picBits |= ICON_FAN; + else picBits &= ~ICON_FAN; + } + +#endif + +#if ENABLED(I2C_AMMETER) + + FORCE_INLINE void _draw_ammeter_status() { + lcd.setCursor(10, 5); lcd_put_u8str_P(PSTR("ILAZ")); + ammeter.read(); + lcd.setCursor(11, 6); + if (ammeter.current <= 0.999f) + { + lcd_put_u8str("mA"); + lcd.setCursor(10, 7); + lcd_put_wchar(' '); lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f))); } else { - lcd.setCursor(13, 5); lcd.print(prefix); //BED - lcd.setCursor(13, 6); lcd.print(i16tostr3rj(t1)); - lcd.setCursor(13, 7); + lcd_put_u8str(" A"); + lcd.setCursor(10, 7); + lcd_put_u8str(ftostr12ns(ammeter.current)); } - #endif // HOTENDS <= 1 - #if !HEATER_IDLE_HANDLER - UNUSED(blink); - #else - if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) { - lcd.write(' '); - if (t2 >= 10) lcd.write(' '); - if (t2 >= 100) lcd.write(' '); - } - else - #endif // !HEATER_IDLE_HANDLER - lcd.print(i16tostr3rj(t2)); - - switch (heater_id) { - case H_BED: pic_hot_bits = ICON_BED; break; - case H_E0: pic_hot_bits = ICON_TEMP1; break; - case H_E1: pic_hot_bits = ICON_TEMP2; break; - case H_E2: pic_hot_bits = ICON_TEMP3; - default: break; + if (ammeter.current) picBits |= ICON_BED; + else picBits &= ~ICON_BED; } - if (t2) picBits |= pic_hot_bits; - else picBits &= ~pic_hot_bits; +#endif // I2C_AMMETER - if (t1 > 50) hotBits |= pic_hot_bits; - else hotBits &= ~pic_hot_bits; +#if HAS_CUTTER - if (hotBits) picBits |= ICON_HOT; - else picBits &= ~ICON_HOT; -} + FORCE_INLINE void _draw_cutter_status() { + lcd.setCursor(15, 5); lcd_put_u8str_P(PSTR("CUTT")); + #if CUTTER_UNIT_IS(RPM) + lcd.setCursor(16, 6); lcd_put_u8str_P(PSTR("RPM")); + lcd.setCursor(15, 7); lcd_put_u8str(ftostr31ns(float(cutter.unitPower) / 1000)); + lcd_put_wchar('K'); + #elif CUTTER_UNIT_IS(PERCENT) + lcd.setCursor(17, 6); lcd_put_wchar('%'); + lcd.setCursor(18, 7); lcd_put_u8str(cutter_power2str(cutter.unitPower)); + #else + lcd.setCursor(17, 7); lcd_put_u8str(cutter_power2str(cutter.unitPower)); + #endif + + if (cutter.unitPower) picBits |= ICON_HOT; + else picBits &= ~ICON_HOT; + } + +#endif // HAS_CUTTER #if HAS_PRINT_PROGRESS @@ -533,7 +637,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *p } } -#endif +#endif // LCD_PROGRESS_BAR void MarlinUI::draw_status_message(const bool blink) { if (!PanelDetected) return; @@ -648,6 +752,19 @@ or or +|X 000 Y 000 Z 000.00| +|FR100% SD100% C--:--| +| Progress bar line | +|Status message | +| | +|COOL FLOW ILAZ CUTT | +| ttc L mA RPM | +| tts f.f aaa rr.rK| +| ICO ICO ICO ICO | +| ICO ICO ICO ICO | + +or + Equal to 24x10 text LCD |X 000 Y 000 Z 000.00 | @@ -745,50 +862,61 @@ void MarlinUI::draw_status_screen() { #endif // - // Line 6..8 Temperatures, FAN + // Line 6..8 Temperatures, FAN for printer or Cooler, Flowmetter, Ampermeter, Cutter for laser/spindle // - #if HOTENDS < 2 - _draw_heater_status(H_E0, "HE", blink); // Hotend Temperature - #else - _draw_heater_status(H_E0, "HE1", blink); // Hotend 1 Temperature - _draw_heater_status(H_E1, "HE2", blink); // Hotend 2 Temperature - #if HOTENDS > 2 - _draw_heater_status(H_E2, "HE3", blink); // Hotend 3 Temperature - #endif - #endif + #if HAS_HOTEND - #if HAS_HEATED_BED - #if HAS_LEVELING - _draw_heater_status(H_BED, (planner.leveling_active && blink ? "___" : "BED"), blink); + #if HOTENDS < 2 + _draw_heater_status(H_E0, "HE", blink); // Hotend Temperature #else - _draw_heater_status(H_BED, "BED", blink); + _draw_heater_status(H_E0, "HE1", blink); // Hotend 1 Temperature + _draw_heater_status(H_E1, "HE2", blink); // Hotend 2 Temperature + #if HOTENDS > 2 + _draw_heater_status(H_E2, "HE3", blink); // Hotend 3 Temperature + #endif #endif - #endif - #if HAS_FAN - uint16_t spd = thermalManager.fan_speed[0]; - #if ENABLED(ADAPTIVE_FAN_SLOWING) - if (!blink) spd = thermalManager.scaledFanSpeed(0, spd); + #if HAS_HEATED_BED + #if HAS_LEVELING + _draw_heater_status(H_BED, (planner.leveling_active && blink ? "___" : "BED"), blink); + #else + _draw_heater_status(H_BED, "BED", blink); + #endif #endif - uint16_t per = thermalManager.pwmToPercent(spd); - #if HOTENDS < 2 - #define FANX 11 - #else - #define FANX 17 - #endif - lcd.setCursor(FANX, 5); lcd_put_u8str_P(PSTR("FAN")); - lcd.setCursor(FANX + 1, 6); lcd.write('%'); - lcd.setCursor(FANX, 7); - lcd.print(i16tostr3rj(per)); + #if HAS_FAN + uint16_t spd = thermalManager.fan_speed[0]; + #if ENABLED(ADAPTIVE_FAN_SLOWING) + if (!blink) spd = thermalManager.scaledFanSpeed(0, spd); + #endif + uint16_t per = thermalManager.pwmToPercent(spd); - if (TERN0(HAS_FAN0, thermalManager.fan_speed[0]) || TERN0(HAS_FAN1, thermalManager.fan_speed[1]) || TERN0(HAS_FAN2, thermalManager.fan_speed[2])) - picBits |= ICON_FAN; - else - picBits &= ~ICON_FAN; + #if HOTENDS < 2 + #define FANX 11 + #else + #define FANX 17 + #endif + lcd.setCursor(FANX, 5); lcd_put_u8str_P(PSTR("FAN")); + lcd.setCursor(FANX + 1, 6); lcd.write('%'); + lcd.setCursor(FANX, 7); + lcd.print(i16tostr3rj(per)); + + if (TERN0(HAS_FAN0, thermalManager.fan_speed[0]) || TERN0(HAS_FAN1, thermalManager.fan_speed[1]) || TERN0(HAS_FAN2, thermalManager.fan_speed[2])) + picBits |= ICON_FAN; + else + picBits &= ~ICON_FAN; - #endif // HAS_FAN + #endif // HAS_FAN + + #else + + TERN_(HAS_COOLER, _draw_cooler_status(blink)); + TERN_(LASER_COOLANT_FLOW_METER, _draw_flowmeter_status()); + TERN_(I2C_AMMETER, _draw_ammeter_status()); + TERN_(HAS_CUTTER, _draw_cutter_status()); + + #endif // // Line 9, 10 - icons From 154decfc66c30808cfe7320e542fcf90427d7176 Mon Sep 17 00:00:00 2001 From: Roxy-3D Date: Mon, 19 Jul 2021 18:59:06 -0600 Subject: [PATCH 096/323] Update vector_3.cpp Fix the regression for G29 J in UBL --- Marlin/src/libs/vector_3.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/libs/vector_3.cpp b/Marlin/src/libs/vector_3.cpp index b8202217ddca..4db8fb5f2e15 100644 --- a/Marlin/src/libs/vector_3.cpp +++ b/Marlin/src/libs/vector_3.cpp @@ -104,9 +104,9 @@ matrix_3x3 matrix_3x3::create_from_rows(const vector_3 &row_0, const vector_3 &r //row_1.debug(PSTR("row_1")); //row_2.debug(PSTR("row_2")); matrix_3x3 new_matrix; - new_matrix.vectors[0].x = row_0.x; new_matrix.vectors[1].y = row_0.y; new_matrix.vectors[2].z = row_0.z; - new_matrix.vectors[3].x = row_1.x; new_matrix.vectors[4].y = row_1.y; new_matrix.vectors[5].z = row_1.z; - new_matrix.vectors[6].x = row_2.x; new_matrix.vectors[7].y = row_2.y; new_matrix.vectors[8].z = row_2.z; + new_matrix.vectors[0] = row_0; + new_matrix.vectors[1] = row_1; + new_matrix.vectors[2] = row_2; //new_matrix.debug(PSTR("new_matrix")); return new_matrix; } From 3fdf40fd29099025bd6aa81413222aaef0058439 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 20 Jul 2021 01:04:54 +0000 Subject: [PATCH 097/323] [cron] Bump distribution date (2021-07-20) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ea80f51d2895..d55991043721 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-19" +//#define STRING_DISTRIBUTION_DATE "2021-07-20" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 29249b0b9b4c..ea126d2855ca 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-19" + #define STRING_DISTRIBUTION_DATE "2021-07-20" #endif /** From da0450605a31626f423808c4842256671152c489 Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Tue, 20 Jul 2021 12:20:28 -0700 Subject: [PATCH 098/323] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor=20STM32?= =?UTF-8?q?=20ini=20files=20(#22377)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- .../boards/marlin_STEVAL_STM32F401VE.json | 2 +- .../boards/marlin_blackSTM32F407VET6.json | 2 +- ini/stm32-common.ini | 41 ++ ini/stm32f0.ini | 10 +- ini/stm32f1.ini | 392 ++++++++---------- ini/stm32f4.ini | 318 +++++++------- ini/stm32f7.ini | 26 -- ini/stm32h7.ini | 41 ++ platformio.ini | 2 + 9 files changed, 411 insertions(+), 423 deletions(-) create mode 100644 ini/stm32-common.ini create mode 100644 ini/stm32h7.ini diff --git a/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json b/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json index e89ca0af7354..e260950f25d5 100644 --- a/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json +++ b/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json @@ -2,7 +2,7 @@ "build": { "core": "stm32", "cpu": "cortex-m4", - "extra_flags": "-DSTM32F401xx", + "extra_flags": "-DSTM32F401xx -DARDUINO_STEVAL", "f_cpu": "84000000L", "hwids": [ [ diff --git a/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json b/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json index a3f130c6b174..b0fd9db9392a 100644 --- a/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json +++ b/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json @@ -2,7 +2,7 @@ "build": { "core": "stm32", "cpu": "cortex-m4", - "extra_flags": "-DSTM32F407xx", + "extra_flags": "-DSTM32F407xx -DARDUINO_BLACK_F407VE", "f_cpu": "168000000L", "hwids": [ [ diff --git a/ini/stm32-common.ini b/ini/stm32-common.ini new file mode 100644 index 000000000000..4ae068939ecd --- /dev/null +++ b/ini/stm32-common.ini @@ -0,0 +1,41 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +#################################### +# +# HAL/STM32 Common Environments +# +#################################### + +[common_stm32] +platform = ststm32@~12.1 +board_build.core = stm32 +build_flags = ${common.build_flags} + -std=gnu++14 + -DUSBCON -DUSBD_USE_CDC + -DTIM_IRQ_PRIO=13 + -DADC_RESOLUTION=12 +build_unflags = -std=gnu++11 +src_filter = ${common.default_src_filter} + + +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py + +# +# STM32 board based on a variant. +# +[stm32_variant] +extends = common_stm32 +extra_scripts = ${common_stm32.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py + buildroot/share/PlatformIO/scripts/offset_and_rename.py + +# +# USB Flash Drive mix-ins for STM32 +# +[stm_flash_drive] +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip +build_flags = ${common_stm32.build_flags} + -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED + -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4 diff --git a/ini/stm32f0.ini b/ini/stm32f0.ini index 64568e4b4c70..6aebd8829852 100644 --- a/ini/stm32f0.ini +++ b/ini/stm32f0.ini @@ -27,8 +27,8 @@ platform = ${common_stm32.platform} extends = common_stm32 board = marlin_malyanM200v2 build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED - -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing - -DCUSTOM_STARTUP_FILE + -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants + -fno-strict-aliasing -DCUSTOM_STARTUP_FILE # # Malyan M200 v2 (STM32F070CB) @@ -38,7 +38,8 @@ platform = ${common_stm32.platform} extends = common_stm32 board = malyanm200_f070cb build_flags = ${common_stm32.build_flags} - -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -DCUSTOM_STARTUP_FILE + -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED -DCUSTOM_STARTUP_FILE # # Malyan M300 (STM32F070CB) @@ -48,5 +49,6 @@ platform = ${common_stm32.platform} extends = common_stm32 board = malyanm300_f070cb build_flags = ${common_stm32.build_flags} - -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED + -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED src_filter = ${common.default_src_filter} + diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index f487dc62fc72..0f1d30866012 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -10,70 +10,48 @@ # Naming Example: STM32F103RCT6 # # F : Foundation (sometimes High Performance F2/F4) -# 1 : Cortex M1 core +# 1 : Cortex M3 core # 03 : Line/Features -# R : 64 or 66 pins (V:100, Z:144, I:176) -# C : 256KB Flash-memory (D:384KB, E:512KB, G:1024KB) +# R : 64 or 66 pins (T:36, C:48, V:100, Z:144, I:176) +# C : 256KB Flash-memory (B: 128KB, D:384KB, E:512KB, G:1024KB) # T : LQFP package # 6 : -40...85°C (7: ...105°C) # ################################# -# -# HAL/STM32 Base Environment values -# -[common_stm32] -platform = ststm32@~12.1 -build_flags = ${common.build_flags} - -std=gnu++14 - -DUSBCON -DUSBD_USE_CDC - -DTIM_IRQ_PRIO=13 - -DADC_RESOLUTION=12 -build_unflags = -std=gnu++11 -src_filter = ${common.default_src_filter} + + -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py - -[stm32f1_variant] -extra_scripts = ${common_stm32.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/offset_and_rename.py - -[common_STM32F103RC] -platform = ${common_stm32.platform} -extends = common_stm32 +[common_STM32F103RC_variant] +extends = stm32_variant board = genericSTM32F103RC -monitor_speed = 115200 -board_build.core = stm32 board_build.variant = MARLIN_F103Rx -extra_scripts = ${stm32f1_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} -DDEBUG_LEVEL=0 +monitor_speed = 115200 # # STM32F103RE # [env:STM32F103RE] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103RE -monitor_speed = 115200 +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103RE +monitor_speed = 115200 # # STM32F103VE # [env:STM32F103VE] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103VE -monitor_speed = 115200 +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103VE +monitor_speed = 115200 # # STM32F103ZE # [env:STM32F103ZE] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103ZE -monitor_speed = 115200 +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103ZE +monitor_speed = 115200 # # BigTree SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3) @@ -82,23 +60,23 @@ monitor_speed = 115200 # STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage) # [env:STM32F103RC_btt] -platform = ${common_stm32.platform} -extends = common_STM32F103RC -build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5 -board_build.offset = 0x7000 +platform = ${common_stm32.platform} +extends = common_STM32F103RC_variant +build_flags = ${common_STM32F103RC_variant.build_flags} + -DTIMER_SERVO=TIM5 +board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 [env:STM32F103RC_btt_USB] -extends = env:STM32F103RC_btt platform = ${common_stm32.platform} -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip +extends = env:STM32F103RC_btt +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${env:STM32F103RC_btt.build_flags} + -DUSE_USB_FS + -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSBD_USE_CDC_MSC build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC -build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.build_flags} - -DUSBCON - -DUSE_USB_FS - -DUSBD_IRQ_PRIO=5 - -DUSBD_IRQ_SUBPRIO=6 - -DUSBD_USE_CDC_MSC # # MKS Robin (STM32F103ZET6) @@ -106,52 +84,53 @@ build_flags = ${env:STM32F103RC_btt.build_flags} ${env:stm32_flash_drive.b # [env:mks_robin] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = genericSTM32F103ZE -board_build.core = stm32 board_build.variant = MARLIN_F103Zx -board_build.offset = 0x7000 board_build.encrypt = Robin.bin -build_flags = ${common_stm32.build_flags} - -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 -build_unflags = ${common_stm32.build_unflags} - -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${stm32f1_variant.extra_scripts} -lib_deps = +board_build.offset = 0x7000 +build_flags = ${stm32_variant.build_flags} + -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC # # MKS Robin E3/E3D (STM32F103RCT6) with TMC2209 # [env:mks_robin_e3] platform = ${common_stm32.platform} -extends = common_STM32F103RC -build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -monitor_speed = 115200 -board_build.offset = 0x5000 +extends = common_STM32F103RC_variant board_build.encrypt = Robin_e3.bin +board_build.offset = 0x5000 board_upload.offset_address = 0x08005000 +build_flags = ${common_STM32F103RC_variant.build_flags} + -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3 +build_unflags = ${common_STM32F103RC_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC +monitor_speed = 115200 debug_tool = stlink -extra_scripts = ${common_STM32F103RC.extra_scripts} # # Creality (STM32F103RET6) # [env:STM32F103RET6_creality] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 -board = genericSTM32F103RE -monitor_speed = 115200 -board_build.core = stm32 -board_build.variant = MARLIN_F103Rx -board_build.offset = 0x7000 +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RE +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${stm32f1_variant.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/random-bin.py -debug_tool = jlink -upload_protocol = jlink +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED + -DSS_TIMER=4 -DTIMER_SERVO=TIM5 + -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC +extra_scripts = ${stm32_variant.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/random-bin.py +monitor_speed = 115200 +debug_tool = jlink +upload_protocol = jlink # # BigTree SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3) @@ -160,80 +139,79 @@ upload_protocol = jlink # STM32F103RE_btt_USB ......... RET6 (USB mass storage) # [env:STM32F103RE_btt] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 -board = genericSTM32F103RE -monitor_speed = 115200 -board_build.core = stm32 -board_build.variant = MARLIN_F103Rx -board_build.offset = 0x7000 +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RE +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 -build_unflags = ${common_stm32.build_unflags} -extra_scripts = ${stm32f1_variant.extra_scripts} -debug_tool = jlink -upload_protocol = jlink +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED + -DSS_TIMER=4 -DTIMER_SERVO=TIM5 + -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 +monitor_speed = 115200 +debug_tool = jlink +upload_protocol = jlink [env:STM32F103RE_btt_USB] -extends = env:STM32F103RE_btt platform = ${common_stm32.platform} -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip -build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC -build_flags = ${env:STM32F103RE_btt.build_flags} ${env:stm32_flash_drive.build_flags} - -DUSBCON - -DUSE_USB_FS - -DUSBD_IRQ_PRIO=5 - -DUSBD_IRQ_SUBPRIO=6 - -DUSBD_USE_CDC_MSC +extends = env:STM32F103RE_btt +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${env:STM32F103RE_btt.build_flags} + -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC +build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC # # FLSUN QQS Pro (STM32F103VET6) # board Hispeedv1 # [env:flsun_hispeedv1] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -board = genericSTM32F103VE -board_build.core = stm32 -board_build.variant = MARLIN_F103Vx -board_build.offset = 0x7000 -board_build.encrypt = Robin_mini.bin +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_mini.bin +board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${stm32f1_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 + -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC # # MKS Robin Nano V1.2 and V2 # [env:mks_robin_nano35] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 -board = genericSTM32F103VE -board_build.core = stm32 -board_build.variant = MARLIN_F103Vx -board_build.offset = 0x7000 -board_build.encrypt = Robin_nano35.bin +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_nano35.bin +board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${stm32f1_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 + -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC +debug_tool = jlink +upload_protocol = jlink # # Mingda MPX_ARM_MINI # [env:mingda_mpx_arm_mini] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = genericSTM32F103ZE -board_build.core = stm32 board_build.variant = MARLIN_F103Zx board_build.offset = 0x10000 -build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${stm32f1_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} + -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC # # Malyan M200 (STM32F103CB) @@ -243,67 +221,55 @@ platform = ${common_stm32.platform} extends = common_stm32 board = malyanm200_f103cb build_flags = ${common_stm32.build_flags} - -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED + -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED src_filter = ${common.default_src_filter} + # # FLYmaker FLY Mini (STM32F103RCT6) # [env:FLY_MINI] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DSS_TIMER=4 -board = genericSTM32F103RC -board_build.core = stm32 -board_build.variant = MARLIN_F103Rx -board_build.offset = 0x5000 +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RC +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x5000 board_upload.offset_address = 0x08005000 -extra_scripts = ${stm32f1_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4 # # MKS Robin Mini (STM32F103VET6) # [env:mks_robin_mini] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103VE -board_build.core = stm32 -board_build.variant = MARLIN_F103Vx -board_build.offset = 0x7000 -board_build.encrypt = Robin_mini.bin -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_mini.bin +board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 -extra_scripts = ${stm32f1_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 # # MKS Robin Lite/Lite2 (STM32F103RCT6) # [env:mks_robin_lite] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103RC -board_build.core = stm32 -board_build.variant = MARLIN_F103Rx -board_build.offset = 0x5000 -board_build.encrypt = mksLite.bin -build_flags = ${common_stm32.build_flags} +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RC +board_build.variant = MARLIN_F103Rx +board_build.encrypt = mksLite.bin +board_build.offset = 0x5000 board_upload.offset_address = 0x08005000 -extra_scripts = ${stm32f1_variant.extra_scripts} # # MKS ROBIN LITE3 (STM32F103RCT6) # [env:mks_robin_lite3] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103RC -board_build.core = stm32 -board_build.variant = MARLIN_F103Rx -board_build.offset = 0x5000 -board_build.encrypt = mksLite3.bin -build_flags = ${common_stm32.build_flags} -board_upload.offset_address = 0x08005000 -extra_scripts = ${stm32f1_variant.extra_scripts} +platform = ${common_stm32.platform} +extends = env:mks_robin_lite +board_build.encrypt = mksLite3.bin # # MKS Robin Pro (STM32F103ZET6) @@ -318,44 +284,43 @@ board_build.encrypt = Robin_pro.bin # - LVGL UI # [env:mks_robin_e3p] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103VE -board_build.core = stm32 -board_build.variant = MARLIN_F103Vx -board_build.offset = 0x7000 -board_build.encrypt = Robin_e3p.bin -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_e3p.bin +board_build.offset = 0x7000 board_upload.offset_address = 0x08007000 -extra_scripts = ${stm32f1_variant.extra_scripts} -debug_tool = jlink -upload_protocol = jlink +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 + -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +debug_tool = jlink +upload_protocol = jlink # # JGAurora A5S A1 (STM32F103ZET6) # [env:jgaurora_a5s_a1] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103ZE -board_build.core = stm32 -board_build.variant = MARLIN_F103Zx -board_build.offset = 0xA000 -board_build.rename = firmware_for_sd_upload.bin -build_flags = ${common_stm32.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY -board_build.address = 0x0800A000 -extra_scripts = ${stm32f1_variant.extra_scripts} - buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103ZE +board_build.variant = MARLIN_F103Zx +board_build.offset = 0xA000 +board_build.rename = firmware_for_sd_upload.bin +board_upload.offset_address = 0x0800A000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F1xx -DSTM32_XL_DENSITY +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py # # FYSETC STM32F103RC # [env:STM32F103RC_fysetc] platform = ${common_stm32.platform} -extends = common_STM32F103RC -extra_scripts = ${stm32f1_variant.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py -build_flags = ${common_stm32.build_flags} -DDEBUG_LEVEL=0 +extends = common_STM32F103RC_variant +extra_scripts = ${common_STM32F103RC_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py lib_ldf_mode = chain debug_tool = stlink upload_protocol = serial @@ -364,20 +329,20 @@ upload_protocol = serial # Longer 3D board in Alfawise U20 (STM32F103VET6) # [env:STM32F103VE_longer] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103VE -board_build.core = stm32 -board_build.variant = MARLIN_F103Vx -board_build.offset = 0x10000 -board_build.address = 0x08010000 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 - -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA -UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10 - -DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED -build_unflags = ${common_stm32.build_unflags} - -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED -extra_scripts = ${stm32f1_variant.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.offset = 0x10000 +board_upload.offset_address = 0x08010000 +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DU20 -DTS_V12 -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA + -UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10 + -DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py # # TRIGORILLA PRO (STM32F103ZET6) @@ -392,15 +357,16 @@ extra_scripts = ${common_stm32.extra_scripts} # [env:chitu_f103] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = genericSTM32F103ZE -board_build.core = stm32 board_build.variant = MARLIN_F103Zx -extra_scripts = ${stm32f1_variant.extra_scripts} - buildroot/share/PlatformIO/scripts/chitu_crypt.py -build_flags = ${common_stm32.build_flags} -DSTM32_XL_DENSITY -build_unflags = ${common_stm32.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 +build_flags = ${stm32_variant.build_flags} + -DSTM32F1xx -DSTM32_XL_DENSITY +build_unflags = ${stm32_variant.build_unflags} + -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= + -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/chitu_crypt.py # # Some Chitu V5 boards have a problem with GPIO init. diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index ada6605e073d..f9c16cf455d1 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -12,8 +12,8 @@ # F : Foundation (sometimes High Performance F2/F4) # 4 : Cortex M4 core # 01 : Line/Features -# R : 64 or 66 pins (V:100, Z:144, I:176) -# G : 1024KB Flash-memory (C:256KB, D:384KB, E:512KB) +# R : 64 or 66 pins (T:36, C:48 or 49, M:81, V:100, Z:144, I:176) +# G : 1024KB Flash-memory (B:128KB, C:256KB, D:384KB, E:512KB) # T : LQFP package # 6 : -40...85°C (7: ...105°C) # @@ -27,12 +27,7 @@ platform = ${common_stm32.platform} extends = common_stm32 board = armed_v1 build_flags = ${common_stm32.build_flags} - -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing - -[stm32f4_variant] -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/offset_and_rename.py + -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing # # STM32F401VE @@ -40,49 +35,46 @@ extra_scripts = ${common.extra_scripts} # [env:STM32F401VE_STEVAL] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = marlin_STEVAL_STM32F401VE -build_flags = ${common_stm32.build_flags} - -DARDUINO_STEVAL -DSTM32F401xE - -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -extra_scripts = ${stm32f4_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} + -DSTM32F401xE -DDISABLE_GENERIC_SERIALUSB + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS # # STM32F401RC # [env:FYSETC_CHEETAH_V20] -platform = ${common_stm32.platform} -extends = common_stm32 -board = marlin_FYSETC_CHEETAH_V20 -build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000 -extra_scripts = ${stm32f4_variant.extra_scripts} +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_FYSETC_CHEETAH_V20 +board_build.offset = 0xC000 +build_flags = ${stm32_variant.build_flags} -DSTM32F401xC # # FLYF407ZG # [env:FLYF407ZG] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = marlin_STM32F407ZGT6 board_build.variant = MARLIN_FLY_F407ZG +board_build.offset = 0x8000 upload_protocol = dfu -build_flags = ${common_stm32.build_flags} - -DVECT_TAB_OFFSET=0x8000 -extra_scripts = ${stm32f4_variant.extra_scripts} # # FYSETC S6 (STM32F446RET6 ARM Cortex-M4) # [env:FYSETC_S6] -platform = ${common_stm32.platform} -extends = common_stm32 -platform_packages = tool-stm32duino -board = marlin_fysetc_s6 -build_flags = ${common_stm32.build_flags} -DVECT_TAB_OFFSET=0x10000 -DHAL_PCD_MODULE_ENABLED -extra_scripts = ${stm32f4_variant.extra_scripts} -debug_tool = stlink -upload_protocol = dfu -upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_fysetc_s6 +board_build.offset = 0x10000 +board_upload.offset_address = 0x08010000 +build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED +debug_tool = stlink +upload_protocol = dfu +upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" # # FYSETC S6 new bootloader @@ -93,8 +85,6 @@ extends = env:FYSETC_S6 board = marlin_fysetc_s6_8000 board_build.offset = 0x8000 board_upload.offset_address = 0x08008000 -build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -extra_scripts = ${stm32f4_variant.extra_scripts} upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" # @@ -104,12 +94,10 @@ upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" # [env:STM32F407VE_black] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = marlin_blackSTM32F407VET6 -build_flags = ${common_stm32.build_flags} - -DARDUINO_BLACK_F407VE - -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -extra_scripts = ${stm32f4_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS # # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4) @@ -117,120 +105,108 @@ extra_scripts = ${stm32f4_variant.extra_scripts} # Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000. # [env:Anet_ET4_OpenBLT] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED -board = marlin_STM32F407VGT6_CCM -board_build.core = stm32 -board_build.variant = MARLIN_F4x7Vx -board_build.encrypt = firmware.srec -board_build.offset = 0x10000 +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.encrypt = firmware.srec +board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${stm32f4_variant.extra_scripts} - buildroot/share/PlatformIO/scripts/openblt.py +build_flags = ${stm32_variant.build_flags} + -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/openblt.py +debug_tool = jlink +upload_protocol = jlink # # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) # [env:BIGTREE_SKR_PRO] -platform = ${common_stm32.platform} -extends = common_stm32 -board = marlin_BigTree_SKR_Pro -build_flags = ${common_stm32.build_flags} - -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000 -extra_scripts = ${stm32f4_variant.extra_scripts} -#upload_protocol = stlink -#upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run -debug_tool = stlink -debug_init_break = - -# -# USB Flash Drive mix-ins for STM32 -# -[stm_flash_drive] -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip -build_flags = ${common_stm32.build_flags} - -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED - -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4 +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_SKR_Pro +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX +debug_tool = stlink +upload_protocol = stlink # # BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support # [env:BIGTREE_SKR_PRO_usb_flash_drive] +platform = ${common_stm32.platform} extends = env:BIGTREE_SKR_PRO platform_packages = ${stm_flash_drive.platform_packages} -build_unflags = -DUSBCON -DUSBD_USE_CDC -build_flags = ${stm_flash_drive.build_flags} - -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000 +build_flags = ${stm_flash_drive.build_flags} -DSTM32F407_5ZX +build_unflags = ${env:BIGTREE_SKR_PRO.build_unflags} -DUSBCON -DUSBD_USE_CDC # # BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4) # [env:BIGTREE_E3_RRF] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = marlin_STM32F407VGT6_CCM board_build.variant = MARLIN_BIGTREE_E3_RRF -build_flags = ${common_stm32.build_flags} - -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 - -DSERIAL_RX_BUFFER_SIZE=255 -DSERIAL_TX_BUFFER_SIZE=255 -extra_scripts = ${stm32f4_variant.extra_scripts} +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F407_5VX + -DSERIAL_RX_BUFFER_SIZE=255 + -DSERIAL_TX_BUFFER_SIZE=255 # # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) # [env:BIGTREE_GTR_V1_0] -platform = ${common_stm32.platform} -extends = common_stm32 -board = marlin_BigTree_GTR_v1 -extra_scripts = ${stm32f4_variant.extra_scripts} -build_flags = ${common_stm32.build_flags} - -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000 +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_GTR_v1 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} -DSTM32F407IX # # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support # [env:BIGTREE_GTR_V1_0_usb_flash_drive] +platform = ${common_stm32.platform} extends = env:BIGTREE_GTR_V1_0 platform_packages = ${stm_flash_drive.platform_packages} -build_unflags = -DUSBCON -DUSBD_USE_CDC -build_flags = ${stm_flash_drive.build_flags} - -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000 +build_flags = ${stm_flash_drive.build_flags} -DSTM32F407IX +build_unflags = ${env:BIGTREE_GTR_V1_0.build_unflags} -DUSBCON -DUSBD_USE_CDC # # BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4) # [env:BIGTREE_BTT002] -platform = ${common_stm32.platform} -extends = common_stm32 -board = marlin_BigTree_BTT002 -build_flags = ${common_stm32.build_flags} - -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 - -DHAVE_HWSERIAL2 - -DHAVE_HWSERIAL3 - -DPIN_SERIAL2_RX=PD_6 - -DPIN_SERIAL2_TX=PD_5 -extra_scripts = ${stm32f4_variant.extra_scripts} +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_BTT002 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F407_5VX + -DHAVE_HWSERIAL2 + -DHAVE_HWSERIAL3 + -DPIN_SERIAL2_RX=PD_6 + -DPIN_SERIAL2_TX=PD_5 # # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support # [env:BIGTREE_SKR_2] -platform = ${common_stm32.platform} -platform_packages = ${stm_flash_drive.platform_packages} -extends = common_stm32 -board = marlin_STM32F407VGT6_CCM -board_build.core = stm32 -board_build.variant = MARLIN_F4x7Vx -board_build.offset = 0x8000 +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0x8000 board_upload.offset_address = 0x08008000 -extra_scripts = ${stm32f4_variant.extra_scripts} -build_flags = ${stm_flash_drive.build_flags} - -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 - -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED +build_flags = ${stm_flash_drive.build_flags} + -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS + -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 + -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED # # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support @@ -238,49 +214,50 @@ build_flags = ${stm_flash_drive.build_flags} [env:BIGTREE_SKR_2_USB] platform = ${common_stm32.platform} extends = env:BIGTREE_SKR_2 -platform_packages = ${stm_flash_drive.platform_packages} -build_unflags = -DUSBD_USE_CDC build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC +build_unflags = ${env:BIGTREE_SKR_2.build_unflags} -DUSBD_USE_CDC # # BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4) # [env:BIGTREE_OCTOPUS_V1] -platform = ${common_stm32.platform} -extends = common_stm32 -board = marlin_BigTree_Octopus_v1 -extra_scripts = ${stm32f4_variant.extra_scripts} -build_flags = ${common_stm32.build_flags} - -DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000 -DUSE_USB_HS_IN_FS +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_Octopus_v1 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F446_5VX -DUSE_USB_HS_IN_FS # # BigTreeTech Octopus V1.0/1.1 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support # [env:BIGTREE_OCTOPUS_V1_USB] +platform = ${common_stm32.platform} extends = env:BIGTREE_OCTOPUS_V1 platform_packages = ${stm_flash_drive.platform_packages} -#build_unflags = -DUSBCON -DUSBD_USE_CDC build_flags = ${stm_flash_drive.build_flags} - -DSTM32F446_5VX -DVECT_TAB_OFFSET=0x8000 - -DUSBCON -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSE_USB_HS_IN_FS -DUSBD_USE_CDC_MSC + -DSTM32F446_5VX -DUSE_USB_HS_IN_FS + -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSBD_USE_CDC_MSC # # Lerdge base # [lerdge_common] platform = ${common_stm32.platform} -extends = common_stm32 +extends = stm32_variant board = marlin_STM32F407ZGT6 board_build.variant = MARLIN_LERDGE -board_build.offset = 0x10000 board_build.encrypt = firmware.bin -extra_scripts = ${stm32f4_variant.extra_scripts} +board_build.offset = 0x10000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4 + -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE + -DHAL_SRAM_MODULE_ENABLED +build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 +extra_scripts = ${stm32_variant.extra_scripts} buildroot/share/PlatformIO/scripts/lerdge.py -build_flags = ${common_stm32.build_flags} - -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4 - -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE - -DHAL_SRAM_MODULE_ENABLED -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 # # Lerdge X @@ -339,38 +316,33 @@ build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags} # [env:rumba32] platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} - -Os - -DHAL_PCD_MODULE_ENABLED - -DDISABLE_GENERIC_SERIALUSB - -DHAL_UART_MODULE_ENABLED - -DTIMER_SERIAL=TIM9 +extends = stm32_variant board = rumba32_f446ve -upload_protocol = dfu -monitor_speed = 500000 -board_build.core = stm32 board_build.variant = MARLIN_F446VE board_build.offset = 0x0000 -extra_scripts = ${stm32f4_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} + -Os -DHAL_PCD_MODULE_ENABLED + -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED + -DTIMER_SERIAL=TIM9 +monitor_speed = 500000 +upload_protocol = dfu # # MKS Robin Pro V2 # [env:mks_robin_pro2] -platform = ${common_stm32.platform} -platform_packages = ${stm_flash_drive.platform_packages} -extends = common_stm32 -build_flags = ${stm_flash_drive.build_flags} -board = genericSTM32F407VET6 -board_build.core = stm32 -board_build.variant = MARLIN_F4x7Vx -board_build.offset = 0x0000 +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board = genericSTM32F407VET6 +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0x0000 board_upload.offset_address = 0x08000000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${stm32f4_variant.extra_scripts} +build_flags = ${stm_flash_drive.build_flags} +build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC +debug_tool = jlink +upload_protocol = jlink # # This SPI is used by Robin Nano V3 @@ -382,34 +354,31 @@ build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 # MKS Robin Nano V3 # [env:mks_robin_nano_v3] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC -board = marlin_STM32F407VGT6_CCM -board_build.core = stm32 -board_build.variant = MARLIN_F4x7Vx -board_build.rename = Robin_nano_v3.bin -board_build.offset = 0xC000 +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0xC000 +board_build.rename = Robin_nano_v3.bin board_upload.offset_address = 0x0800C000 -build_unflags = ${common_stm32.build_unflags} -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${stm32f4_variant.extra_scripts} +build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags} + -DHAL_PCD_MODULE_ENABLED +debug_tool = jlink +upload_protocol = jlink # # MKS Robin Nano V3 with USB Flash Drive Support # Currently, using a STM32duino fork, until USB Host get merged # [env:mks_robin_nano_v3_usb_flash_drive] +platform = ${common_stm32.platform} extends = env:mks_robin_nano_v3 platform_packages = ${stm_flash_drive.platform_packages} build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} - -DUSBCON - -DUSE_USBHOST_HS - -DUSBD_IRQ_PRIO=5 - -DUSBD_IRQ_SUBPRIO=6 - -DUSE_USB_HS_IN_FS - -DUSBD_USE_CDC + -DUSE_USBHOST_HS + -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSE_USB_HS_IN_FS # # MKS Robin Nano V3 with USB Flash Drive Support and Shared Media @@ -417,13 +386,6 @@ build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} # [env:mks_robin_nano_v3_usb_flash_drive_msc] platform = ${common_stm32.platform} -extends = env:mks_robin_nano_v3 -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip -build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC -build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} - -DUSBCON - -DUSE_USBHOST_HS - -DUSBD_IRQ_PRIO=5 - -DUSBD_IRQ_SUBPRIO=6 - -DUSE_USB_HS_IN_FS - -DUSBD_USE_CDC_MSC +extends = env:mks_robin_nano_v3_usb_flash_drive +build_flags = ${env:mks_robin_nano_v3_usb_flash_drive} + -DUSBD_USE_CDC_MSC diff --git a/ini/stm32f7.ini b/ini/stm32f7.ini index 76d039533c44..984b25162ed6 100644 --- a/ini/stm32f7.ini +++ b/ini/stm32f7.ini @@ -37,29 +37,3 @@ build_flags = ${common_stm32.build_flags} -DTIMER_SERIAL=TIM9 platform = ${common_stm32.platform} extends = common_stm32 board = remram_v1 -build_flags = ${common_stm32.build_flags} - -# -# BigTreeTech SKR SE BX (STM32H743IIT6 ARM Cortex-M7) -# -[env:BTT_SKR_SE_BX] -platform = ${common_stm32.platform} -platform_packages = ${stm_flash_drive.platform_packages} -extends = common_stm32 -board = marlin_BTT_SKR_SE_BX -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -build_flags = ${common_stm32.build_flags} - ${stm_flash_drive.build_flags} - -DUSE_USBHOST_HS - -DUSE_USB_HS_IN_FS - #-DUSBD_USE_CDC_MSC - -DVECT_TAB_OFFSET=0x20000 - -DHAL_DMA2D_MODULE_ENABLED - -DHAL_LTDC_MODULE_ENABLED - -DHAL_SDRAM_MODULE_ENABLED - -DHAL_QSPI_MODULE_ENABLED - -DHAL_MDMA_MODULE_ENABLED - -DHAL_SD_MODULE_ENABLED -upload_protocol = cmsis-dap -debug_tool = cmsis-dap diff --git a/ini/stm32h7.ini b/ini/stm32h7.ini new file mode 100644 index 000000000000..3d0753a235a6 --- /dev/null +++ b/ini/stm32h7.ini @@ -0,0 +1,41 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# +# STM32H7 Architecture +# +# Naming Example: STM32H743IIT6 +# +# H : High Performance +# 7 : Cortex M7 core +# 43 : Line/Features +# I : 176 pins +# I : 2048KB Flash-memory +# T : LQFP package +# 6 : -40...85°C (7: ...105°C) +# +################################# + +# +# BigTreeTech SKR SE BX (STM32H743IIT6 ARM Cortex-M7) +# +[env:BTT_SKR_SE_BX] +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board = marlin_BTT_SKR_SE_BX +board_build.offset = 0x20000 +build_flags = ${stm32_variant.build_flags} ${stm_flash_drive.build_flags} + -DUSE_USBHOST_HS + -DUSE_USB_HS_IN_FS + -DHAL_DMA2D_MODULE_ENABLED + -DHAL_LTDC_MODULE_ENABLED + -DHAL_SDRAM_MODULE_ENABLED + -DHAL_QSPI_MODULE_ENABLED + -DHAL_MDMA_MODULE_ENABLED + -DHAL_SD_MODULE_ENABLED +upload_protocol = cmsis-dap +debug_tool = cmsis-dap diff --git a/platformio.ini b/platformio.ini index afdd823f9e6f..1fb9ba55e684 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,11 +23,13 @@ extra_configs = ini/lpc176x.ini ini/native.ini ini/samd51.ini + ini/stm32-common.ini ini/stm32f0.ini ini/stm32f1-maple.ini ini/stm32f1.ini ini/stm32f4.ini ini/stm32f7.ini + ini/stm32h7.ini ini/teensy.ini # From 178f9a77a88b333470725e0e19d033859721656b Mon Sep 17 00:00:00 2001 From: ellensp Date: Wed, 21 Jul 2021 07:44:15 +1200 Subject: [PATCH 099/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20STATUS=5FCOMBINE?= =?UTF-8?q?=5FHEATERS=20compile=20(#22405)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 42 ++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index a66aca6d19a6..5fe8b61bf4cc 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -264,29 +264,33 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co #define HOTEND_BITMAP(N,S) status_hotend_a_bmp #endif - if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) { + #if DISABLED(STATUS_COMBINE_HEATERS) - #define BAR_TALL (STATUS_HEATERS_HEIGHT - 2) + if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) { - const float prop = target - 20, - perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0; - uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f); - NOMORE(tall, BAR_TALL); + #define BAR_TALL (STATUS_HEATERS_HEIGHT - 2) - // Draw hotend bitmap, either whole or split by the heating percent - const uint8_t hx = STATUS_HOTEND_X(heater_id), - bw = STATUS_HOTEND_BYTEWIDTH(heater_id); - #if ENABLED(STATUS_HEAT_PERCENT) - if (isHeat && tall <= BAR_TALL) { - const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall; - u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), false)); - u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), true) + ph * bw); - } - else - #endif - u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), isHeat)); + const float prop = target - 20, + perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0; + uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f); + NOMORE(tall, BAR_TALL); - } // PAGE_CONTAINS + // Draw hotend bitmap, either whole or split by the heating percent + const uint8_t hx = STATUS_HOTEND_X(heater_id), + bw = STATUS_HOTEND_BYTEWIDTH(heater_id); + #if ENABLED(STATUS_HEAT_PERCENT) + if (isHeat && tall <= BAR_TALL) { + const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall; + u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), false)); + u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), true) + ph * bw); + } + else + #endif + u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), isHeat)); + + } // PAGE_CONTAINS + + #endif // !STATUS_COMBINE_HEATERS if (PAGE_UNDER(7)) { #if HEATER_IDLE_HANDLER From 497541e1995db4e9890abc0951e0a77104bc62ef Mon Sep 17 00:00:00 2001 From: Yash <76577754+yash-fn@users.noreply.github.com> Date: Tue, 20 Jul 2021 14:51:41 -0500 Subject: [PATCH 100/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20G2/G3=20angular=20?= =?UTF-8?q?motion=20calculation=20(#22407)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/motion/G2_G3.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index 170789d82727..094afdb70e8f 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -83,12 +83,13 @@ void plan_arc( #endif // Angle of rotation between position and target from the circle center. - float angular_travel; + float angular_travel, abs_angular_travel; // Do a full circle if starting and ending positions are "identical" if (NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis])) { // Preserve direction for circles angular_travel = clockwise ? -RADIANS(360) : RADIANS(360); + abs_angular_travel = RADIANS(360); } else { // Calculate the angle @@ -103,8 +104,10 @@ void plan_arc( case 2: angular_travel += RADIANS(360); break; // Negative but CCW? Reverse direction. } + abs_angular_travel = ABS(angular_travel); + #ifdef MIN_ARC_SEGMENTS - min_segments = CEIL(min_segments * ABS(angular_travel) / RADIANS(360)); + min_segments = CEIL(min_segments * abs_angular_travel / RADIANS(360)); NOLESS(min_segments, 1U); #endif } @@ -117,8 +120,8 @@ void plan_arc( #endif // If circling around... - if (ENABLED(ARC_P_CIRCLES) && circles) { - const float total_angular = angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder + if (TERN0(ARC_P_CIRCLES, circles)) { + const float total_angular = abs_angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total #if HAS_Z_AXIS @@ -138,8 +141,8 @@ void plan_arc( TERN_(HAS_EXTRUDERS, extruder_travel = cart.e - current_position.e); } - const float flat_mm = radius * angular_travel, - mm_of_travel = TERN_(HAS_Z_AXIS, linear_travel ? HYPOT(flat_mm, linear_travel) :) ABS(flat_mm); + const float flat_mm = radius * abs_angular_travel, + mm_of_travel = TERN_(HAS_Z_AXIS, linear_travel ? HYPOT(flat_mm, linear_travel) :) flat_mm; if (mm_of_travel < 0.001f) return; const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s); From 2d4be74db98c8ab74b5c636cd1899bcaabd760e2 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 20 Jul 2021 12:54:02 -0700 Subject: [PATCH 101/323] =?UTF-8?q?=F0=9F=8E=A8=20Fix=20unused=20lambda=20?= =?UTF-8?q?warning=20(#22399)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/probe.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 6831d151f9ec..d585afb8b250 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -865,9 +865,11 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai #if HAS_CURRENT_HOME(Z) static int16_t saved_current_Z; #endif - auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) { - if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); } - }; + #if ((ENABLED(DELTA) && (HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(Y))) || HAS_CURRENT_HOME(Z)) + auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) { + if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); } + }; + #endif if (onoff) { #if ENABLED(DELTA) #if HAS_CURRENT_HOME(X) From a90968b0cef30f166f2f96aea526caf532a84949 Mon Sep 17 00:00:00 2001 From: Malderin <52313714+Malderin@users.noreply.github.com> Date: Tue, 20 Jul 2021 23:07:32 +0300 Subject: [PATCH 102/323] =?UTF-8?q?=F0=9F=8E=A8=20MKS=20hardware=20test=20?= =?UTF-8?q?followup=20(#22395)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 140 +++++++++--------- Marlin/src/lcd/extui/mks_ui/mks_hardware.h | 9 +- .../extui/mks_ui/tft_lvgl_configuration.cpp | 2 +- 3 files changed, 76 insertions(+), 75 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index cf9790ea9d8c..3c7eb5553218 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -127,77 +127,81 @@ delay(100); } - void mks_gpio_test() { - init_test_gpio(); - - test_gpio_readlevel_L(); - test_gpio_readlevel_H(); - test_gpio_readlevel_L(); - if (pw_det_sta && pw_off_sta && mt_det_sta - #if PIN_EXISTS(MT_DET_2) - && mt_det2_sta - #endif - #if ENABLED(MKS_HARDWARE_TEST_ONLY_E0) - && (READ(PA1) == LOW) - && (READ(PA3) == LOW) - && (READ(PC2) == LOW) - && (READ(PD8) == LOW) - && (READ(PE5) == LOW) - && (READ(PE6) == LOW) - && (READ(PE7) == LOW) - #endif - ) - disp_det_ok(); - else - disp_det_error(); - - if (endstopx1_sta && endstopy1_sta && endstopz1_sta && endstopz2_sta) - disp_Limit_ok(); - else - disp_Limit_error(); - } - - void mks_hardware_test() { - if (millis() % 2000 < 1000) { - WRITE(X_DIR_PIN, LOW); - WRITE(Y_DIR_PIN, LOW); - WRITE(Z_DIR_PIN, LOW); - WRITE(E0_DIR_PIN, LOW); - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) - WRITE(E1_DIR_PIN, LOW); - #endif - thermalManager.fan_speed[0] = 255; - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) - WRITE(HEATER_1_PIN, HIGH); // HE1 - #endif - WRITE(HEATER_0_PIN, HIGH); // HE0 - WRITE(HEATER_BED_PIN, HIGH); // HOT-BED - } - else { - WRITE(X_DIR_PIN, HIGH); - WRITE(Y_DIR_PIN, HIGH); - WRITE(Z_DIR_PIN, HIGH); - WRITE(E0_DIR_PIN, HIGH); - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) - WRITE(E1_DIR_PIN, HIGH); - #endif - thermalManager.fan_speed[0] = 0; - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) - WRITE(HEATER_1_PIN, LOW); // HE1 - #endif - WRITE(HEATER_0_PIN, LOW); // HE0 - WRITE(HEATER_BED_PIN, LOW); // HOT-BED + #if ENABLED(SDSUPPORT) + + void mks_gpio_test() { + init_test_gpio(); + + test_gpio_readlevel_L(); + test_gpio_readlevel_H(); + test_gpio_readlevel_L(); + if (pw_det_sta && pw_off_sta && mt_det_sta + #if PIN_EXISTS(MT_DET_2) + && mt_det2_sta + #endif + #if ENABLED(MKS_HARDWARE_TEST_ONLY_E0) + && (READ(PA1) == LOW) + && (READ(PA3) == LOW) + && (READ(PC2) == LOW) + && (READ(PD8) == LOW) + && (READ(PE5) == LOW) + && (READ(PE6) == LOW) + && (READ(PE7) == LOW) + #endif + ) + disp_det_ok(); + else + disp_det_error(); + + if (endstopx1_sta && endstopy1_sta && endstopz1_sta && endstopz2_sta) + disp_Limit_ok(); + else + disp_Limit_error(); } - if (endstopx1_sta && endstopx2_sta && endstopy1_sta && endstopy2_sta && endstopz1_sta && endstopz2_sta) { - // nothing here - } - else { + void mks_hardware_test() { + if (millis() % 2000 < 1000) { + WRITE(X_DIR_PIN, LOW); + WRITE(Y_DIR_PIN, LOW); + WRITE(Z_DIR_PIN, LOW); + WRITE(E0_DIR_PIN, LOW); + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(E1_DIR_PIN, LOW); + #endif + thermalManager.fan_speed[0] = 255; + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(HEATER_1_PIN, HIGH); // HE1 + #endif + WRITE(HEATER_0_PIN, HIGH); // HE0 + WRITE(HEATER_BED_PIN, HIGH); // HOT-BED + } + else { + WRITE(X_DIR_PIN, HIGH); + WRITE(Y_DIR_PIN, HIGH); + WRITE(Z_DIR_PIN, HIGH); + WRITE(E0_DIR_PIN, HIGH); + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(E1_DIR_PIN, HIGH); + #endif + thermalManager.fan_speed[0] = 0; + #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(HEATER_1_PIN, LOW); // HE1 + #endif + WRITE(HEATER_0_PIN, LOW); // HE0 + WRITE(HEATER_BED_PIN, LOW); // HOT-BED + } + + if (endstopx1_sta && endstopx2_sta && endstopy1_sta && endstopy2_sta && endstopz1_sta && endstopz2_sta) { + // nothing here + } + else { + } + + if (disp_state == PRINT_READY_UI) + mks_disp_test(); } - if (disp_state == PRINT_READY_UI) - mks_disp_test(); - } + #endif #endif // MKS_TEST @@ -613,7 +617,7 @@ void disp_assets_update_progress(const char *msg) { disp_string(100, 165, buf, 0xFFFF, 0x0000); } -#if ENABLED(SDSUPPORT) +#if BOTH(MKS_TEST, SDSUPPORT) uint8_t mks_test_flag = 0; const char *MKSTestPath = "MKS_TEST"; void mks_test_get() { diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h index de0c3a738ebd..f41c4e18ac42 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h @@ -26,17 +26,14 @@ #include // Functions for MKS_TEST -#if ENABLED(MKS_TEST) - void mks_gpio_test(); +#if BOTH(MKS_TEST, SDSUPPORT) void mks_hardware_test(); void mks_test_get(); + void mks_gpio_test(); + extern uint8_t mks_test_flag; #endif // String display and assets void disp_string(uint16_t x, uint16_t y, const char * string, uint16_t charColor, uint16_t bkColor); void disp_assets_update(); void disp_assets_update_progress(const char *msg); - -#if ENABLED(SDSUPPORT) - extern uint8_t mks_test_flag; -#endif diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index d8c5fbd6ec6b..2127b23a15de 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -139,7 +139,7 @@ void tft_lvgl_init() { #if ENABLED(SDSUPPORT) UpdateAssets(); watchdog_refresh(); // LVGL init takes time - mks_test_get(); + TERN_(MKS_TEST, mks_test_get()); #endif touch.Init(); From e4ac55089e73577968cb693924bec673bf32c575 Mon Sep 17 00:00:00 2001 From: vyacheslav-shubin Date: Tue, 20 Jul 2021 23:12:08 +0300 Subject: [PATCH 103/323] =?UTF-8?q?=F0=9F=A9=B9=20Init=20var=20to=20suppre?= =?UTF-8?q?ss=20invalid=20warning=20(#22396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 21336f0b9a54..03f2c58e81c6 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -70,7 +70,8 @@ void GcodeSuite::G29() { return; } - int8_t ix, iy = 0; + int8_t ix, iy; + ix = iy = 0; switch (state) { case MeshReport: From 86feddb75fc01fb744c9453dc4d1f5d1bfad4c4f Mon Sep 17 00:00:00 2001 From: Katelyn Schiesser Date: Tue, 20 Jul 2021 13:13:25 -0700 Subject: [PATCH 104/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20BTC=5FSAMPLE=5FRES?= =?UTF-8?q?=20sanity=20check=20(#22394)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index ae4aba14db90..9ced6e4e42ab 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -623,7 +623,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L static_assert(_test_btc_sample_start != 12.3f, "BTC_SAMPLE_START must be a whole number."); #endif #ifdef BTC_SAMPLE_RES - constexpr _btc_sample_res = BTC_SAMPLE_RES; + constexpr auto _btc_sample_res = BTC_SAMPLE_RES; constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f; static_assert(_test_btc_sample_res != 12.3f, "BTC_SAMPLE_RES must be a whole number."); #endif From 909834683a4db5ba4e16b18059dd4ae68f2129ef Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 21 Jul 2021 01:00:14 +0000 Subject: [PATCH 105/323] [cron] Bump distribution date (2021-07-21) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index d55991043721..bd8473bee353 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-20" +//#define STRING_DISTRIBUTION_DATE "2021-07-21" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index ea126d2855ca..ef569263f783 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-20" + #define STRING_DISTRIBUTION_DATE "2021-07-21" #endif /** From 50ada44e7e7e42dd8b04668242a63071300aec27 Mon Sep 17 00:00:00 2001 From: VTXtruder <87478332+VTXtruder@users.noreply.github.com> Date: Tue, 20 Jul 2021 23:27:19 -0400 Subject: [PATCH 106/323] =?UTF-8?q?=E2=9C=A8=20Chitu3D=20V9=20board=20(#22?= =?UTF-8?q?401)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/core/boards.h | 25 +-- Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f1/pins_CHITU3D.h | 7 +- Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h | 146 +-------------- Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h | 150 +-------------- Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h | 36 ++++ Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 177 ++++++++++++++++++ 7 files changed, 234 insertions(+), 309 deletions(-) create mode 100755 Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h create mode 100644 Marlin/src/pins/stm32f1/pins_CHITU3D_common.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 661a213b4bcd..b5b33692a026 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -333,18 +333,19 @@ #define BOARD_CCROBOT_MEEB_3DP 4035 // ccrobot-online.com MEEB_3DP (STM32F103RC) #define BOARD_CHITU3D_V5 4036 // Chitu3D TronXY X5SA V5 Board #define BOARD_CHITU3D_V6 4037 // Chitu3D TronXY X5SA V6 Board -#define BOARD_CREALITY_V4 4038 // Creality v4.x (STM32F103RE) -#define BOARD_CREALITY_V427 4039 // Creality v4.2.7 (STM32F103RE) -#define BOARD_CREALITY_V4210 4040 // Creality v4.2.10 (STM32F103RE) as found in the CR-30 -#define BOARD_CREALITY_V431 4041 // Creality v4.3.1 (STM32F103RE) -#define BOARD_CREALITY_V452 4042 // Creality v4.5.2 (STM32F103RE) -#define BOARD_CREALITY_V453 4043 // Creality v4.5.3 (STM32F103RE) -#define BOARD_TRIGORILLA_PRO 4044 // Trigorilla Pro (STM32F103ZET6) -#define BOARD_FLY_MINI 4045 // FLYmaker FLY MINI (STM32F103RCT6) -#define BOARD_FLSUN_HISPEED 4046 // FLSUN HiSpeedV1 (STM32F103VET6) -#define BOARD_BEAST 4047 // STM32F103RET6 Libmaple-based controller -#define BOARD_MINGDA_MPX_ARM_MINI 4048 // STM32F103ZET6 Mingda MD-16 -#define BOARD_GTM32_PRO_VD 4049 // STM32F103VET6 controller +#define BOARD_CHITU3D_V9 4038 // Chitu3D TronXY X5SA V9 Board +#define BOARD_CREALITY_V4 4039 // Creality v4.x (STM32F103RE) +#define BOARD_CREALITY_V427 4040 // Creality v4.2.7 (STM32F103RE) +#define BOARD_CREALITY_V4210 4041 // Creality v4.2.10 (STM32F103RE) as found in the CR-30 +#define BOARD_CREALITY_V431 4042 // Creality v4.3.1 (STM32F103RE) +#define BOARD_CREALITY_V452 4043 // Creality v4.5.2 (STM32F103RE) +#define BOARD_CREALITY_V453 4044 // Creality v4.5.3 (STM32F103RE) +#define BOARD_TRIGORILLA_PRO 4045 // Trigorilla Pro (STM32F103ZET6) +#define BOARD_FLY_MINI 4046 // FLYmaker FLY MINI (STM32F103RCT6) +#define BOARD_FLSUN_HISPEED 4047 // FLSUN HiSpeedV1 (STM32F103VET6) +#define BOARD_BEAST 4048 // STM32F103RET6 Libmaple-based controller +#define BOARD_MINGDA_MPX_ARM_MINI 4049 // STM32F103ZET6 Mingda MD-16 +#define BOARD_GTM32_PRO_VD 4050 // STM32F103VET6 controller // // ARM Cortex-M4F diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index b5a81c60978e..4c773d1e7657 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -537,6 +537,8 @@ #include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple env:chitu_v5_gpio_init env:chitu_v5_gpio_init_maple #elif MB(CHITU3D_V6) #include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple +#elif MB(CHITU3D_V9) + #include "stm32f1/pins_CHITU3D_V9.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple #elif MB(CREALITY_V4) #include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(CREALITY_V4210) diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index c2025ba8c08f..2d33fb9f2cc2 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -81,12 +81,7 @@ // Heaters / Fans // #define HEATER_0_PIN PD12 // HOT-END -#define HEATER_1_PIN -1 -#define HEATER_2_PIN -1 - #define HEATER_BED_PIN PG11 // HOT-BED -#define HEATER_BED2_PIN -1 // BED2 -#define HEATER_BED3_PIN -1 // BED3 #ifndef FAN_PIN #define FAN_PIN PG14 // MAIN BOARD FAN @@ -97,8 +92,8 @@ // // Temperature Sensors // -#define TEMP_BED_PIN PA0 // Analog Input #define TEMP_0_PIN PA1 // Analog Input +#define TEMP_BED_PIN PA0 // Analog Input // // LCD Pins diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h index 88dd28a40157..afe58df803d6 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h @@ -21,148 +21,8 @@ */ #pragma once -#include "env_validate.h" +#define BOARD_INFO_NAME "Chitu3D V5" -/** - * 2017 Victor Perez Marlin for stm32f1 test - */ - -#define BOARD_INFO_NAME "Chitu3D V5" -#define DEFAULT_MACHINE_NAME "STM32F103ZET6" - -#define BOARD_NO_NATIVE_USB - -#define DISABLE_JTAG - -// -// EEPROM -// -#define FLASH_EEPROM_EMULATION -#if ENABLED(FLASH_EEPROM_EMULATION) - // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) - #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) - #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) - #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE -#else - #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM -#endif - -// -// Limit Switches -// -#define X_STOP_PIN PG10 -#define Y_STOP_PIN PA12 -#define Z_STOP_PIN PA14 - -// -// Steppers -// -#define X_ENABLE_PIN PC13 -#define X_STEP_PIN PE5 -#define X_DIR_PIN PE6 - -#define Y_ENABLE_PIN PE4 -#define Y_STEP_PIN PE2 -#define Y_DIR_PIN PE3 - -#define Z_ENABLE_PIN PE1 -#define Z_STEP_PIN PB9 -#define Z_DIR_PIN PE0 - -#define E0_ENABLE_PIN PB8 -#define E0_STEP_PIN PB4 -#define E0_DIR_PIN PB5 - -#define E1_ENABLE_PIN PG8 -#define E1_STEP_PIN PC7 -#define E1_DIR_PIN PC6 - -// -// Temperature Sensors -// -#define TEMP_0_PIN PA1 // TH1 -#define TEMP_BED_PIN PA0 // TB1 - -// -// Heaters -// -#define HEATER_0_PIN PG12 // HEATER1 -#define HEATER_BED_PIN PG11 // HOT BED - -// -// Fans -// -#define CONTROLLER_FAN_PIN PD6 // BOARD FAN -#define FAN_PIN PG13 // FAN -#define FAN2_PIN PG14 - -// -// Misc -// -#define BEEPER_PIN PB0 -//#define LED_PIN -1 -//#define POWER_LOSS_PIN -1 -#define FIL_RUNOUT_PIN PA15 - -// SPI Flash -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH - #define SPI_FLASH_SIZE 0x200000 // 2MB -#endif - -// SPI 2 -#define W25QXX_CS_PIN PB12 -#define W25QXX_MOSI_PIN PB15 -#define W25QXX_MISO_PIN PB14 -#define W25QXX_SCK_PIN PB13 - -// -// TFT with FSMC interface -// -#if HAS_FSMC_TFT - #define TOUCH_CS_PIN PB7 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI - - #define TFT_RESET_PIN PF11 - #define TFT_BACKLIGHT_PIN PD13 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_CS_PIN PD7 - #define FSMC_RS_PIN PD11 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 - - #define TFT_CS_PIN FSMC_CS_PIN - #define TFT_RS_PIN FSMC_RS_PIN -#endif - -#if ENABLED(TFT_LVGL_UI) - // LVGL - #define HAS_SPI_FLASH_FONT 1 - #define HAS_GCODE_PREVIEW 1 - #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 - #define HAS_LANG_SELECT_SCREEN 1 - #define HAS_BAK_VIEW_IN_FLASH 0 - #define HAS_LOGO_IN_FLASH 0 -#elif ENABLED(TFT_COLOR_UI) - // Color UI - #define TFT_BUFFER_SIZE 14400 -#endif - -// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available -// Needs to use SPI2 -#define SPI_DEVICE 2 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 -#define SD_SS_PIN PB12 +#define Z_STOP_PIN PG9 -// -// SD Card -// -#define SDIO_SUPPORT -#define SD_DETECT_PIN -1 // PF0, but it isn't connected -#define SDIO_CLOCK 4500000 -#define SDIO_READ_RETRIES 16 +#include "pins_CHITU3D_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h index 51bd7294a9ff..b76ef52c420a 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h @@ -21,160 +21,14 @@ */ #pragma once -#include "env_validate.h" - -/** - * 2017 Victor Perez Marlin for stm32f1 test - */ - -#define BOARD_INFO_NAME "Chitu3D" -#define DEFAULT_MACHINE_NAME "STM32F103ZET6" - -#define BOARD_NO_NATIVE_USB - -#define DISABLE_JTAG - -// -// EEPROM -// - -#if NO_EEPROM_SELECTED - #define FLASH_EEPROM_EMULATION -#endif - -#if ENABLED(FLASH_EEPROM_EMULATION) - // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) - #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) - #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) - #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE -#else - #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM -#endif - -// -// Limit Switches -// -#define X_STOP_PIN PG10 -#define Y_STOP_PIN PA12 -#define Z_STOP_PIN PG9 - -// -// Steppers -// -#define X_ENABLE_PIN PC13 -#define X_STEP_PIN PE5 -#define X_DIR_PIN PE6 - -#define Y_ENABLE_PIN PE4 -#define Y_STEP_PIN PE2 -#define Y_DIR_PIN PE3 - -#define Z_ENABLE_PIN PE1 -#define Z_STEP_PIN PB9 -#define Z_DIR_PIN PE0 +#define BOARD_INFO_NAME "Chitu3D V6" #define Z2_ENABLE_PIN PF3 #define Z2_STEP_PIN PF5 #define Z2_DIR_PIN PF1 -#define E0_ENABLE_PIN PB8 -#define E0_STEP_PIN PB4 -#define E0_DIR_PIN PB5 - -#define E1_ENABLE_PIN PG8 -#define E1_STEP_PIN PC7 -#define E1_DIR_PIN PC6 - -// -// Temperature Sensors -// -#define TEMP_0_PIN PA1 // TH1 -#define TEMP_BED_PIN PA0 // TB1 - -// -// Heaters -// -#define HEATER_0_PIN PG12 // HEATER1 -#define HEATER_BED_PIN PG11 // HOT BED -//#define HEATER_BED_INVERTING true - -// -// Fans -// -#define CONTROLLER_FAN_PIN PD6 // BOARD FAN -#define FAN_PIN PG13 // FAN -#define FAN2_PIN PG14 - -// -// Misc -// -#define BEEPER_PIN PB0 -//#define LED_PIN PD3 -//#define POWER_LOSS_PIN PG2 // PG4 PW_DET - -#ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN PA15 // MT_DET -#endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN PF13 #endif -// SPI Flash -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH - #define SPI_FLASH_SIZE 0x200000 // 2MB -#endif - -// SPI 2 -#define W25QXX_CS_PIN PB12 -#define W25QXX_MOSI_PIN PB15 -#define W25QXX_MISO_PIN PB14 -#define W25QXX_SCK_PIN PB13 - -// -// TFT with FSMC interface -// -#if HAS_FSMC_TFT - #define TOUCH_CS_PIN PB7 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI - - #define TFT_RESET_PIN PF11 - #define TFT_BACKLIGHT_PIN PD13 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_CS_PIN PD7 - #define FSMC_RS_PIN PD11 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 -#endif - -#if ENABLED(TFT_LVGL_UI) - // LVGL - #define HAS_SPI_FLASH_FONT 1 - #define HAS_GCODE_PREVIEW 1 - #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 - #define HAS_LANG_SELECT_SCREEN 1 - #define HAS_BAK_VIEW_IN_FLASH 0 - #define HAS_LOGO_IN_FLASH 0 -#elif ENABLED(TFT_COLOR_UI) - // Color UI - #define TFT_BUFFER_SIZE 14400 -#endif - -// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available -// so SPI2 is required. -#define SPI_DEVICE 2 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 -#define SD_SS_PIN PB12 - -// -// SD Card -// -#define SDIO_SUPPORT -#define SD_DETECT_PIN -1 // PF0, but it isn't connected -#define SDIO_CLOCK 4500000 -#define SDIO_READ_RETRIES 16 +#include "pins_CHITU3D_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h new file mode 100755 index 000000000000..eb7f91deab96 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h @@ -0,0 +1,36 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define BOARD_INFO_NAME "Chitu3D V9" + +#define Z_STOP_PIN PA14 + +#define Z2_ENABLE_PIN PF3 +#define Z2_STEP_PIN PF5 +#define Z2_DIR_PIN PF1 + +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN PF13 +#endif + +#include "pins_CHITU3D_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h new file mode 100644 index 000000000000..b638589388ec --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -0,0 +1,177 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Chitu3D" +#endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "STM32F103ZET6" +#endif + +#define BOARD_NO_NATIVE_USB +#define DISABLE_JTAG + +// +// EEPROM +// + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) + #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) + #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE +#else + #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM +#endif + +// +// Limit Switches +// +#define X_STOP_PIN PG10 +#define Y_STOP_PIN PA12 +#ifndef Z_STOP_PIN + #define Z_STOP_PIN PG9 +#endif + +// +// Steppers +// +#define X_ENABLE_PIN PC13 +#define X_STEP_PIN PE5 +#define X_DIR_PIN PE6 + +#define Y_ENABLE_PIN PE4 +#define Y_STEP_PIN PE2 +#define Y_DIR_PIN PE3 + +#define Z_ENABLE_PIN PE1 +#define Z_STEP_PIN PB9 +#define Z_DIR_PIN PE0 + +#define E0_ENABLE_PIN PB8 +#define E0_STEP_PIN PB4 +#define E0_DIR_PIN PB5 + +#define E1_ENABLE_PIN PG8 +#define E1_STEP_PIN PC7 +#define E1_DIR_PIN PC6 + +// +// Temperature Sensors +// +#define TEMP_0_PIN PA1 // TH1 Analog Input +#define TEMP_BED_PIN PA0 // TB1 Analog Input + +// +// Heaters +// +#define HEATER_0_PIN PG12 // HEATER1 +#define HEATER_BED_PIN PG11 // HOT BED +//#define HEATER_BED_INVERTING true + +// +// Fans +// +#define CONTROLLER_FAN_PIN PD6 // BOARD FAN +#define FAN_PIN PG13 // FAN +#define FAN2_PIN PG14 + +// +// Misc +// +#define BEEPER_PIN PB0 +//#define LED_PIN PD3 +//#define POWER_LOSS_PIN PG2 // PG4 PW_DET + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PA15 // MT_DET +#endif + +// SPI Flash +#define HAS_SPI_FLASH 1 +#if HAS_SPI_FLASH + #define SPI_FLASH_SIZE 0x200000 // 2MB +#endif + +// SPI 2 +#define W25QXX_CS_PIN PB12 +#define W25QXX_MOSI_PIN PB15 +#define W25QXX_MISO_PIN PB14 +#define W25QXX_SCK_PIN PB13 + +// +// TFT with FSMC interface +// +#if HAS_FSMC_TFT + #define TOUCH_CS_PIN PB7 // SPI1_NSS + #define TOUCH_SCK_PIN PA5 // SPI1_SCK + #define TOUCH_MISO_PIN PA6 // SPI1_MISO + #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI + + #define TFT_RESET_PIN PF11 + #define TFT_BACKLIGHT_PIN PD13 + + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN +#endif + +#if ENABLED(TFT_LVGL_UI) + // LVGL + #define HAS_SPI_FLASH_FONT 1 + #define HAS_GCODE_PREVIEW 1 + #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 + #define HAS_LANG_SELECT_SCREEN 1 + #define HAS_BAK_VIEW_IN_FLASH 0 + #define HAS_LOGO_IN_FLASH 0 +#elif ENABLED(TFT_COLOR_UI) + // Color UI + #define TFT_BUFFER_SIZE 14400 +#endif + +// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available +// so SPI2 is required. +#define SPI_DEVICE 2 +#define SD_SCK_PIN PB13 +#define SD_MISO_PIN PB14 +#define SD_MOSI_PIN PB15 +#define SD_SS_PIN PB12 + +// +// SD Card +// +#define SDIO_SUPPORT +#define SD_DETECT_PIN -1 // PF0, but it isn't connected +#define SDIO_CLOCK 4500000 +#define SDIO_READ_RETRIES 16 From eb3ad3e4fe5a914921fb3878ccfaeb1905773d51 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 20 Jul 2021 23:35:56 -0500 Subject: [PATCH 107/323] =?UTF-8?q?=F0=9F=8E=A8=20BTT=20SKR=20Pro=20pins?= =?UTF-8?q?=20auto-assign=20(#22411)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: MarkusThur <83773817+MarkusThur@users.noreply.github.com> --- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 68 +++++++++++++++++-- 1 file changed, 61 insertions(+), 7 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index fe6d8740bd93..fdc6c6f6e53f 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -231,27 +231,81 @@ // // Temperature Sensors +// Use ADC pins without pullup for sensors that don't need a pullup. // -#define TEMP_0_PIN PF4 // T1 <-> E0 -#define TEMP_1_PIN PF5 // T2 <-> E1 -#define TEMP_2_PIN PF6 // T3 <-> E2 -#define TEMP_BED_PIN PF3 // T0 <-> Bed +#if TEMP_SENSOR_0_IS_AD8495 || TEMP_SENSOR_0 == 20 + #define TEMP_0_PIN PF8 +#else + #define TEMP_0_PIN PF4 // T1 <-> E0 +#endif +#if TEMP_SENSOR_1_IS_AD8495 || TEMP_SENSOR_1 == 20 + #define TEMP_1_PIN PF9 +#else + #define TEMP_1_PIN PF5 // T2 <-> E1 +#endif +#if TEMP_SENSOR_2_IS_AD8495 || TEMP_SENSOR_2 == 20 + #define TEMP_2_PIN PF10 +#else + #define TEMP_2_PIN PF6 // T3 <-> E2 +#endif +#if TEMP_SENSOR_BED_IS_AD8495 || TEMP_SENSOR_BED == 20 + #define TEMP_BED_PIN PF7 +#else + #define TEMP_BED_PIN PF3 // T0 <-> Bed +#endif + +#ifdef TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN) + #if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20 + #if HOTENDS == 2 + #define TEMP_PROBE_PIN PF10 + #elif HOTENDS < 2 + #define TEMP_PROBE_PIN PF9 + #endif + #else + #if HOTENDS == 2 + #define TEMP_PROBE_PIN TEMP_2_PIN + #elif HOTENDS < 2 + #define TEMP_PROBE_PIN TEMP_1_PIN + #endif + #endif +#endif + +#if TEMP_SENSOR_CHAMBER && !defined(TEMP_CHAMBER_PIN) + #if TEMP_SENSOR_CHAMBER_IS_AD8495 || TEMP_SENSOR_CHAMBER == 20 + #define TEMP_CHAMBER_PIN PF10 + #else + #define TEMP_CHAMBER_PIN TEMP_2_PIN + #endif +#endif // -// Heaters / Fans +// Heaters // #define HEATER_0_PIN PB1 // Heater0 #define HEATER_1_PIN PD14 // Heater1 -#define HEATER_2_PIN PB0 // Heater1 +#if TEMP_SENSOR_CHAMBER && HOTENDS < 3 + #define HEATER_CHAMBER_PIN PB0 // Heater2 +#else + #define HEATER_2_PIN PB0 // Heater2 +#endif #define HEATER_BED_PIN PD12 // Hotbed + +// +// Fans +// #define FAN_PIN PC8 // Fan0 #define FAN1_PIN PE5 // Fan1 -#define FAN2_PIN PE6 // Fan2 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif +#if ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2 + #define CONTROLLER_FAN_PIN PE6 // Fan2 +#else + #define FAN2_PIN PE6 // Fan2 +#endif + // // Misc. Functions // From af4c281af582699bd535a1da4eb2abb2c7775cba Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 21 Jul 2021 00:12:26 -0500 Subject: [PATCH 108/323] =?UTF-8?q?=F0=9F=94=A7=20Clean=20up=20PTC=5FPROBE?= =?UTF-8?q?=5FHEATING=5FOFFSET?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e99e1f7c0960..d404d0d19c4b 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2021,9 +2021,9 @@ // calibration. //#define BTC_PROBE_TEMP 30 // (°C) - // Height above Z=0.0f to raise the nozzle. Lowering this can help the probe to heat faster. - // Note: the Z=0.0f offset is determined by the probe offset which can be set using M851. - //#define PTC_PROBE_HEATING_OFFSET 0.5f + // Height above Z=0.0 to raise the nozzle. Lowering this can help the probe to heat faster. + // Note: the Z=0.0 offset is determined by the probe offset which can be set using M851. + //#define PTC_PROBE_HEATING_OFFSET 0.5 // Height to raise the Z-probe between heating and taking the next measurement. Some probes // may fail to untrigger if they have been triggered for a long time, which can be solved by From eb2f086522c0befd3628693250ba56fe56a1a7a1 Mon Sep 17 00:00:00 2001 From: Luke Harrison Date: Wed, 21 Jul 2021 07:43:33 +0200 Subject: [PATCH 109/323] =?UTF-8?q?=F0=9F=94=A7=20Octopus=20SPI=20display?= =?UTF-8?q?=20pins,=20fix=20USB=20build=20env=20(#22412)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 18 ++++++++++++++++++ ini/stm32f1.ini | 2 +- ini/stm32f4.ini | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 2cf1ee1447e7..25622bc62d87 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -500,6 +500,24 @@ #endif #endif +#if HAS_SPI_TFT + #define TFT_CS_PIN EXP2_07_PIN + #define TFT_A0_PIN EXP2_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + + #define TOUCH_INT_PIN EXP1_04_PIN + #define TOUCH_MISO_PIN EXP1_05_PIN + #define TOUCH_MOSI_PIN EXP1_08_PIN + #define TOUCH_SCK_PIN EXP1_06_PIN + #define TOUCH_CS_PIN EXP1_07_PIN + + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif + // // WIFI // diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 0f1d30866012..175d0e45b066 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -336,7 +336,7 @@ board_build.variant = MARLIN_F103Vx board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 build_flags = ${stm32_variant.build_flags} - -DMCU_STM32F103VE -DU20 -DTS_V12 -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA + -DMCU_STM32F103VE -DU20 -DTS_V12 -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA -UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10 -DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED build_unflags = ${stm32_variant.build_unflags} diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index f9c16cf455d1..901f14511306 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -129,7 +129,7 @@ platform = ${common_stm32.platform} extends = stm32_variant board = marlin_BigTree_SKR_Pro board_build.offset = 0x8000 -build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX +build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX debug_tool = stlink upload_protocol = stlink @@ -235,6 +235,7 @@ build_flags = ${stm32_variant.build_flags} platform = ${common_stm32.platform} extends = env:BIGTREE_OCTOPUS_V1 platform_packages = ${stm_flash_drive.platform_packages} +build_unflags = -DUSBD_USE_CDC build_flags = ${stm_flash_drive.build_flags} -DSTM32F446_5VX -DUSE_USB_HS_IN_FS -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 From d819de46d32d7d6f87664e4b7ecf3afb7a3ed8ce Mon Sep 17 00:00:00 2001 From: ellensp Date: Thu, 22 Jul 2021 09:31:11 +1200 Subject: [PATCH 110/323] =?UTF-8?q?=F0=9F=8E=A8=20MKS=20Hardware=20Test=20?= =?UTF-8?q?followup=20(#22414)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- .../lcd/extui/mks_ui/draw_media_select.cpp | 4 +- .../src/lcd/extui/mks_ui/draw_ready_print.cpp | 12 +- Marlin/src/lcd/extui/mks_ui/draw_tool.cpp | 4 +- .../extui/mks_ui/draw_touch_calibration.cpp | 6 +- Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp | 188 ++++++++++++++---- Marlin/src/lcd/extui/mks_ui/mks_hardware.h | 2 + .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 6 + buildroot/tests/mks_robin_nano35 | 1 + buildroot/tests/mks_robin_nano35_maple | 1 + 9 files changed, 170 insertions(+), 54 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp b/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp index 0394ed6009d6..81c82dc02dfa 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp @@ -39,7 +39,7 @@ enum { }; #if ENABLED(MKS_TEST) - extern uint8_t curent_disp_ui; + extern uint8_t current_disp_ui; #endif static void event_handler(lv_obj_t *obj, lv_event_t event) { @@ -49,7 +49,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { case ID_T_USB_DISK: card.changeMedia(&card.media_driver_usbFlash); break; case ID_T_SD_DISK: card.changeMedia(&card.media_driver_sdcard); break; case ID_T_RETURN: - TERN_(MKS_TEST, curent_disp_ui = 1); + TERN_(MKS_TEST, current_disp_ui = 1); lv_draw_ready_print(); return; } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp index 6f24d81b4931..d324d8d7befc 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp @@ -61,7 +61,7 @@ static lv_obj_t *buttonExt1, *labelExt1, *buttonFanstate, *labelFan; #endif #if ENABLED(MKS_TEST) - uint8_t curent_disp_ui = 0; + uint8_t current_disp_ui = 0; #endif enum { ID_TOOL = 1, ID_SET, ID_PRINT, ID_INFO_EXT, ID_INFO_BED, ID_INFO_FAN }; @@ -106,8 +106,10 @@ void disp_det_error() { lv_obj_t *e1, *e2, *e3, *bed; void mks_disp_test() { char buf[30] = {0}; - sprintf_P(buf, PSTR("e1:%d"), thermalManager.wholeDegHotend(0)); - lv_label_set_text(e1, buf); + #if HAS_HOTEND + sprintf_P(buf, PSTR("e1:%d"), thermalManager.wholeDegHotend(0)); + lv_label_set_text(e1, buf); + #endif #if HAS_MULTI_HOTEND sprintf_P(buf, PSTR("e2:%d"), thermalManager.wholeDegHotend(1)); lv_label_set_text(e2, buf); @@ -126,7 +128,7 @@ void lv_draw_ready_print() { ZERO(disp_state_stack._disp_state); scr = lv_screen_create(PRINT_READY_UI, ""); - if (TERN0(SDSUPPORT, mks_test_flag == 0x1E)) { + if (mks_test_flag == 0x1E) { // Create image buttons buttonTool = lv_imgbtn_create(scr, "F:/bmp_tool.bin", event_handler, ID_TOOL); @@ -147,7 +149,7 @@ void lv_draw_ready_print() { #if HAS_MULTI_HOTEND e2 = lv_label_create_empty(scr); lv_obj_set_pos(e2, 20, 45); - sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(1)); + sprintf_P(buf, PSTR("e2: %d"), thermalManager.wholeDegHotend(1)); lv_label_set_text(e2, buf); #endif #if HAS_HEATED_BED diff --git a/Marlin/src/lcd/extui/mks_ui/draw_tool.cpp b/Marlin/src/lcd/extui/mks_ui/draw_tool.cpp index 16c1448b3ca3..8b9747972d59 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_tool.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_tool.cpp @@ -45,7 +45,7 @@ enum { }; #if ENABLED(MKS_TEST) - extern uint8_t curent_disp_ui; + extern uint8_t current_disp_ui; #endif static void event_handler(lv_obj_t *obj, lv_event_t event) { @@ -75,7 +75,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { lv_draw_more(); break; case ID_T_RETURN: - TERN_(MKS_TEST, curent_disp_ui = 1); + TERN_(MKS_TEST, current_disp_ui = 1); lv_draw_ready_print(); break; } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp index a4470a4c877e..e10a07c6de40 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp @@ -34,6 +34,10 @@ static lv_obj_t *scr; static lv_obj_t *status_label; +#if ENABLED(MKS_TEST) + extern uint8_t current_disp_ui; +#endif + static void event_handler(lv_obj_t *obj, lv_event_t event); enum { @@ -93,7 +97,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; switch (obj->mks_obj_id) { case ID_TC_RETURN: - TERN_(MKS_TEST, curent_disp_ui = 1); + TERN_(MKS_TEST, current_disp_ui = 1); lv_clear_touch_calibration_screen(); draw_return_ui(); break; diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index 3c7eb5553218..5cd1a4c525e9 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -38,12 +38,44 @@ #if ENABLED(MKS_TEST) #include "mks_hardware.h" + #include "../../../module/endstops.h" bool pw_det_sta, pw_off_sta, mt_det_sta; #if PIN_EXISTS(MT_DET_2) bool mt_det2_sta; #endif - bool endstopx1_sta, endstopx2_sta, endstopy1_sta, endstopy2_sta, endstopz1_sta, endstopz2_sta; + #if HAS_X_MIN || HAS_X_MAX + bool endstopx1_sta; + #else + constexpr static bool endstopx1_sta = true; + #endif + #if HAS_X2_MIN || HAS_X2_MAX + bool endstopx2_sta; + #else + constexpr static bool endstopx2_sta = true; + #endif + #if HAS_Y_MIN || HAS_Y_MAX + bool endstopy1_sta; + #else + constexpr static bool endstopy1_sta = true; + #endif + #if HAS_Y2_MIN || HAS_Y2_MAX + bool endstopy2_sta; + #else + constexpr static bool endstopy2_sta = true; + #endif + #if HAS_Z_MIN || HAS_Z_MAX + bool endstopz1_sta; + #else + constexpr static bool endstopz1_sta = true; + #endif + #if HAS_Z2_MIN || HAS_Z2_MAX + bool endstopz2_sta; + #else + constexpr static bool endstopz2_sta = true; + #endif + + #define ESTATE(S) (READ(S##_PIN) != S##_ENDSTOP_INVERTING) void test_gpio_readlevel_L() { WRITE(WIFI_IO0_PIN, HIGH); @@ -54,10 +86,36 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == LOW); #endif - endstopx1_sta = (READ(X_MIN_PIN) == LOW); - endstopy1_sta = (READ(Y_MIN_PIN) == LOW); - endstopz1_sta = (READ(Z_MIN_PIN) == LOW); - endstopz2_sta = (READ(Z_MAX_PIN) == LOW); + #if HAS_X_MIN + endstopx1_sta = ESTATE(X_MIN); + #elif HAS_X_MAX + endstopx1_sta = ESTATE(X_MAX); + #endif + #if HAS_X2_MIN + endstopx2_sta = ESTATE(X2_MIN); + #elif HAS_X2_MAX + endstopx2_sta = ESTATE(X2_MAX); + #endif + #if HAS_Y_MIN + endstopy1_sta = ESTATE(Y_MIN); + #elif HAS_Y_MAX + endstopy1_sta = ESTATE(Y_MAX); + #endif + #if HAS_Y2_MIN + endstopy2_sta = ESTATE(Y2_MIN); + #elif HAS_Y2_MAX + endstopy2_sta = ESTATE(Y2_MAX); + #endif + #if HAS_Z_MIN + endstopz1_sta = ESTATE(Z_MIN); + #elif HAS_Z_MAX + endstopz1_sta = ESTATE(Z_MAX); + #endif + #if HAS_Z2_MIN + endstopz2_sta = ESTATE(Z2_MIN); + #elif HAS_Z2_MAX + endstopz2_sta = ESTATE(Z2_MAX); + #endif } void test_gpio_readlevel_H() { @@ -69,44 +127,66 @@ #if PIN_EXISTS(MT_DET_2) mt_det2_sta = (READ(MT_DET_2_PIN) == HIGH); #endif - endstopx1_sta = (READ(X_MIN_PIN) == HIGH); - endstopy1_sta = (READ(Y_MIN_PIN) == HIGH); - endstopz1_sta = (READ(Z_MIN_PIN) == HIGH); - endstopz2_sta = (READ(Z_MAX_PIN) == HIGH); + #if HAS_X_MIN + endstopx1_sta = !ESTATE(X_MIN); + #elif HAS_X_MAX + endstopx1_sta = !ESTATE(X_MAX); + #endif + #if HAS_X2_MIN + endstopx2_sta = !ESTATE(X2_MIN); + #elif HAS_X2_MAX + endstopx2_sta = !ESTATE(X2_MAX); + #endif + #if HAS_Y_MIN + endstopy1_sta = !ESTATE(Y_MIN); + #elif HAS_Y_MAX + endstopy1_sta = !ESTATE(Y_MAX); + #endif + #if HAS_Y2_MIN + endstopy2_sta = !ESTATE(Y2_MIN); + #elif HAS_Y2_MAX + endstopy2_sta = !ESTATE(Y2_MAX); + #endif + #if HAS_Z_MIN + endstopz1_sta = !ESTATE(Z_MIN); + #elif HAS_Z_MAX + endstopz1_sta = !ESTATE(Z_MAX); + #endif + #if HAS_Z2_MIN + endstopz2_sta = !ESTATE(Z2_MIN); + #elif HAS_Z2_MAX + endstopz2_sta = !ESTATE(Z2_MAX); + #endif } void init_test_gpio() { - SET_INPUT_PULLUP(X_MIN_PIN); - SET_INPUT_PULLUP(Y_MIN_PIN); - SET_INPUT_PULLUP(Z_MIN_PIN); - SET_INPUT_PULLUP(Z_MAX_PIN); + endstops.init(); SET_OUTPUT(WIFI_IO0_PIN); - SET_INPUT_PULLUP(MT_DET_1_PIN); + #if PIN_EXISTS(MT_DET_1) + SET_INPUT_PULLUP(MT_DET_1_PIN); + #endif #if PIN_EXISTS(MT_DET_2) SET_INPUT_PULLUP(MT_DET_2_PIN); #endif SET_INPUT_PULLUP(MKS_TEST_POWER_LOSS_PIN); SET_INPUT_PULLUP(MKS_TEST_PS_ON_PIN); - SET_INPUT_PULLUP(SERVO0_PIN); - SET_OUTPUT(X_ENABLE_PIN); - SET_OUTPUT(Y_ENABLE_PIN); - SET_OUTPUT(Z_ENABLE_PIN); - SET_OUTPUT(E0_ENABLE_PIN); - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) - SET_OUTPUT(E1_ENABLE_PIN); + OUT_WRITE(X_ENABLE_PIN, LOW); + #if HAS_Y_AXIS + OUT_WRITE(Y_ENABLE_PIN, LOW); #endif - - WRITE(X_ENABLE_PIN, LOW); - WRITE(Y_ENABLE_PIN, LOW); - WRITE(Z_ENABLE_PIN, LOW); - WRITE(E0_ENABLE_PIN, LOW); - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) - WRITE(E1_ENABLE_PIN, LOW); + #if HAS_Z_AXIS + OUT_WRITE(Z_ENABLE_PIN, LOW); + #endif + #if HAS_EXTRUDERS + OUT_WRITE(E0_ENABLE_PIN, LOW); + #endif + #if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + OUT_WRITE(E1_ENABLE_PIN, LOW); #endif #if ENABLED(MKS_HARDWARE_TEST_ONLY_E0) @@ -161,34 +241,54 @@ void mks_hardware_test() { if (millis() % 2000 < 1000) { + thermalManager.fan_speed[0] = 255; WRITE(X_DIR_PIN, LOW); - WRITE(Y_DIR_PIN, LOW); - WRITE(Z_DIR_PIN, LOW); - WRITE(E0_DIR_PIN, LOW); - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + #if HAS_Y_AXIS + WRITE(Y_DIR_PIN, LOW); + #endif + #if HAS_Z_AXIS + WRITE(Z_DIR_PIN, LOW); + #endif + #if HAS_EXTRUDERS + WRITE(E0_DIR_PIN, LOW); + #endif + #if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(E1_DIR_PIN, LOW); #endif - thermalManager.fan_speed[0] = 255; - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + #if HAS_MULTI_HOTEND && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(HEATER_1_PIN, HIGH); // HE1 #endif - WRITE(HEATER_0_PIN, HIGH); // HE0 - WRITE(HEATER_BED_PIN, HIGH); // HOT-BED + #if HAS_HOTEND + WRITE(HEATER_0_PIN, HIGH); // HE0 + #endif + #if HAS_HEATED_BED + WRITE(HEATER_BED_PIN, HIGH); // HOT-BED + #endif } else { + thermalManager.fan_speed[0] = 0; WRITE(X_DIR_PIN, HIGH); - WRITE(Y_DIR_PIN, HIGH); - WRITE(Z_DIR_PIN, HIGH); - WRITE(E0_DIR_PIN, HIGH); - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + #if HAS_Y_AXIS + WRITE(Y_DIR_PIN, HIGH); + #endif + #if HAS_Y_AXIS + WRITE(Z_DIR_PIN, HIGH); + #endif + #if HAS_EXTRUDERS + WRITE(E0_DIR_PIN, HIGH); + #endif + #if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(E1_DIR_PIN, HIGH); #endif - thermalManager.fan_speed[0] = 0; - #if DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + #if HAS_MULTI_HOTEND && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) WRITE(HEATER_1_PIN, LOW); // HE1 #endif - WRITE(HEATER_0_PIN, LOW); // HE0 - WRITE(HEATER_BED_PIN, LOW); // HOT-BED + #if HAS_HOTEND + WRITE(HEATER_0_PIN, LOW); // HE0 + #endif + #if HAS_HEATED_BED + WRITE(HEATER_BED_PIN, LOW); // HOT-BED + #endif } if (endstopx1_sta && endstopx2_sta && endstopy1_sta && endstopy2_sta && endstopz1_sta && endstopz2_sta) { diff --git a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h index f41c4e18ac42..531326566277 100644 --- a/Marlin/src/lcd/extui/mks_ui/mks_hardware.h +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h @@ -31,6 +31,8 @@ void mks_test_get(); void mks_gpio_test(); extern uint8_t mks_test_flag; +#else + #define mks_test_flag 0 #endif // String display and assets diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 178e75ab7f65..182506f11e99 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -220,6 +220,12 @@ #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN #endif +// MKS TEST +#if ENABLED(MKS_TEST) + #define MKS_TEST_POWER_LOSS_PIN PA13 // PW_DET + #define MKS_TEST_PS_ON_PIN PB2 // PW_OFF +#endif + // // Onboard SD card // diff --git a/buildroot/tests/mks_robin_nano35 b/buildroot/tests/mks_robin_nano35 index 99ff2623bb61..bd16fe48e934 100755 --- a/buildroot/tests/mks_robin_nano35 +++ b/buildroot/tests/mks_robin_nano35 @@ -22,6 +22,7 @@ use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC opt_enable TFT_INTERFACE_SPI MKS_WIFI_MODULE +opt_add MKS_TEST exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI, MKS_WIFI_MODULE" "$3" # diff --git a/buildroot/tests/mks_robin_nano35_maple b/buildroot/tests/mks_robin_nano35_maple index f1549a8103de..ebd5466ce61c 100755 --- a/buildroot/tests/mks_robin_nano35_maple +++ b/buildroot/tests/mks_robin_nano35_maple @@ -32,6 +32,7 @@ use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 SERIAL_PORT_2 opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 MKS_WIFI_MODULE +opt_add MKS_TEST exec_test $1 $2 "MKS Robin v2 nano LVGL SPI w/ WiFi" "$3" # From 21011eefa818f73d79746f7555fead94f0d3d20a Mon Sep 17 00:00:00 2001 From: Chris Pepper Date: Thu, 22 Jul 2021 01:01:23 +0100 Subject: [PATCH 111/323] =?UTF-8?q?=E2=9C=A8=20Simulator=20HAL=20and=20bui?= =?UTF-8?q?ld=20targets=20(#22418)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +- Marlin/src/HAL/NATIVE_SIM/HAL.h | 217 ++++++++++++++++++ Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h | 26 +++ Marlin/src/HAL/NATIVE_SIM/fastio.h | 111 +++++++++ .../src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h | 22 ++ .../src/HAL/NATIVE_SIM/inc/Conditionals_adv.h | 31 +++ .../HAL/NATIVE_SIM/inc/Conditionals_post.h | 22 ++ Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h | 43 ++++ Marlin/src/HAL/NATIVE_SIM/pinsDebug.h | 59 +++++ Marlin/src/HAL/NATIVE_SIM/servo_private.h | 80 +++++++ Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 55 +++++ Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h | 64 ++++++ Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h | 80 +++++++ Marlin/src/HAL/NATIVE_SIM/timers.h | 91 ++++++++ .../HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp | 52 +++++ .../src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h | 37 +++ Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h | 44 ++++ Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h | 43 ++++ .../HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp | 52 +++++ .../src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h | 46 ++++ .../NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp | 171 ++++++++++++++ .../src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp | 215 +++++++++++++++++ Marlin/src/HAL/NATIVE_SIM/watchdog.h | 27 +++ Marlin/src/HAL/platforms.h | 2 + Marlin/src/HAL/shared/Delay.h | 2 +- Marlin/src/core/serial.h | 3 + Marlin/src/lcd/dogm/HAL_LCD_com_defines.h | 5 + .../src/lcd/extui/mks_ui/draw_print_file.cpp | 4 +- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 8 +- .../extui/mks_ui/tft_lvgl_configuration.cpp | 8 +- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 62 ++++- Marlin/src/pins/pins.h | 2 +- Marlin/src/sd/SdFatUtil.cpp | 2 +- Marlin/src/sd/cardreader.cpp | 2 +- .../PlatformIO/scripts/common-dependencies.py | 10 +- .../share/PlatformIO/scripts/simulator.py | 52 +++++ ini/native.ini | 107 +++++++++ 37 files changed, 1847 insertions(+), 16 deletions(-) create mode 100644 Marlin/src/HAL/NATIVE_SIM/HAL.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/fastio.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/pinsDebug.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/servo_private.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/spi_pins.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/timers.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/watchdog.h create mode 100644 buildroot/share/PlatformIO/scripts/simulator.py diff --git a/.gitignore b/.gitignore index ac2c9b5591fd..bc603ba38b0d 100755 --- a/.gitignore +++ b/.gitignore @@ -143,7 +143,11 @@ vc-fileutils.settings .vscode/launch.json .vscode/*.db -# cmake +#Simulation +imgui.ini +eeprom.dat + +#cmake CMakeLists.txt src/CMakeLists.txt CMakeListsPrivate.txt diff --git a/Marlin/src/HAL/NATIVE_SIM/HAL.h b/Marlin/src/HAL/NATIVE_SIM/HAL.h new file mode 100644 index 000000000000..d5c5782c36c3 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/HAL.h @@ -0,0 +1,217 @@ +/** + * Marlin 3D Printer Firmware + * + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com + * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define CPU_32_BIT +#define HAL_IDLETASK +void HAL_idletask(); + +#define F_CPU 100000000 +#define SystemCoreClock F_CPU +#include +#include + +#undef min +#undef max + +#include +#include "pinmapping.h" + +void _printf (const char *format, ...); +void _putc(uint8_t c); +uint8_t _getc(); + +//extern "C" volatile uint32_t _millis; + +//arduino: Print.h +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 +//arduino: binary.h (weird defines) +#define B01 1 +#define B10 2 + +#include "../shared/Marduino.h" +#include "../shared/math_32bit.h" +#include "../shared/HAL_SPI.h" +#include "fastio.h" +#include "watchdog.h" +#include "serial.h" + +#define SHARED_SERVOS HAS_SERVOS + +extern MSerialT serial_stream_0; +extern MSerialT serial_stream_1; +extern MSerialT serial_stream_2; +extern MSerialT serial_stream_3; + +#define _MSERIAL(X) serial_stream_##X +#define MSERIAL(X) _MSERIAL(X) + +#if WITHIN(SERIAL_PORT, 0, 3) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) +#else + #error "SERIAL_PORT must be from 0 to 3. Please update your configuration." +#endif + +#ifdef SERIAL_PORT_2 + #if WITHIN(SERIAL_PORT_2, 0, 3) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) + #else + #error "SERIAL_PORT_2 must be from 0 to 3. Please update your configuration." + #endif +#endif + +#ifdef MMU2_SERIAL_PORT + #if WITHIN(MMU2_SERIAL_PORT, 0, 3) + #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) + #else + #error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration." + #endif +#endif + +#ifdef LCD_SERIAL_PORT + #if WITHIN(LCD_SERIAL_PORT, 0, 3) + #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) + #else + #error "LCD_SERIAL_PORT must be from 0 to 3. Please update your configuration." + #endif +#endif + + +#define ST7920_DELAY_1 DELAY_NS(600) +#define ST7920_DELAY_2 DELAY_NS(750) +#define ST7920_DELAY_3 DELAY_NS(750) + +// +// Interrupts +// +#define CRITICAL_SECTION_START() +#define CRITICAL_SECTION_END() +#define ISRS_ENABLED() +#define ENABLE_ISRS() +#define DISABLE_ISRS() + +inline void HAL_init() {} + +// Utility functions +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" +int freeMemory(); +#pragma GCC diagnostic pop + +// ADC +#define HAL_ADC_VREF 5.0 +#define HAL_ADC_RESOLUTION 10 +#define HAL_ANALOG_SELECT(ch) HAL_adc_enable_channel(ch) +#define HAL_START_ADC(ch) HAL_adc_start_conversion(ch) +#define HAL_READ_ADC() HAL_adc_get_result() +#define HAL_ADC_READY() true + +void HAL_adc_init(); +void HAL_adc_enable_channel(const uint8_t ch); +void HAL_adc_start_conversion(const uint8_t ch); +uint16_t HAL_adc_get_result(); + +// Reset source +inline void HAL_clear_reset_source(void) {} +inline uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; } + +/* ---------------- Delay in cycles */ + +#define DELAY_CYCLES(x) Kernel::delayCycles(x) +#define SYSTEM_YIELD() Kernel::yield() + +// Maple Compatibility +typedef void (*systickCallback_t)(void); +void systick_attach_callback(systickCallback_t cb); +extern volatile uint32_t systick_uptime_millis; + +// Marlin uses strstr in constexpr context, this is not supported, workaround by defining constexpr versions of the required functions. +#define strstr(a, b) strstr_constexpr((a), (b)) + +constexpr inline std::size_t strlen_constexpr(const char* str) { + // https://github.com/gcc-mirror/gcc/blob/5c7634a0e5f202935aa6c11b6ea953b8bf80a00a/libstdc%2B%2B-v3/include/bits/char_traits.h#L329 + if (str != nullptr) { + std::size_t i = 0; + while (str[i] != '\0') { + ++i; + } + + return i; + } + + return 0; +} + +constexpr inline int strncmp_constexpr(const char* lhs, const char* rhs, std::size_t count) { + // https://github.com/gcc-mirror/gcc/blob/13b9cbfc32fe3ac4c81c4dd9c42d141c8fb95db4/libstdc%2B%2B-v3/include/bits/char_traits.h#L655 + if (lhs == nullptr || rhs == nullptr) { + return rhs != nullptr ? -1 : 1; + } + + for (std::size_t i = 0; i < count; ++i) { + if (lhs[i] != rhs[i]) { + return lhs[i] < rhs[i] ? -1 : 1; + } else if (lhs[i] == '\0') { + return 0; + } + } + + return 0; +} + +constexpr inline const char* strstr_constexpr(const char* str, const char* target) { + // https://github.com/freebsd/freebsd/blob/master/sys/libkern/strstr.c + if (char c = target != nullptr ? *target++ : '\0'; c != '\0' && str != nullptr) { + std::size_t len = strlen_constexpr(target); + do { + char sc = {}; + do { + if ((sc = *str++) == '\0') { + return nullptr; + } + } while (sc != c); + } while (strncmp_constexpr(str, target, len) != 0); + --str; + } + + return str; +} + +constexpr inline char* strstr_constexpr(char* str, const char* target) { + // https://github.com/freebsd/freebsd/blob/master/sys/libkern/strstr.c + if (char c = target != nullptr ? *target++ : '\0'; c != '\0' && str != nullptr) { + std::size_t len = strlen_constexpr(target); + do { + char sc = {}; + do { + if ((sc = *str++) == '\0') { + return nullptr; + } + } while (sc != c); + } while (strncmp_constexpr(str, target, len) != 0); + --str; + } + return str; +} diff --git a/Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h b/Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h new file mode 100644 index 000000000000..b5cc6f02a45a --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com + * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/NATIVE_SIM/fastio.h b/Marlin/src/HAL/NATIVE_SIM/fastio.h new file mode 100644 index 000000000000..de8013b1e542 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/fastio.h @@ -0,0 +1,111 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Fast I/O Routines for X86_64 + */ + +#include "../shared/Marduino.h" +#include + +#define SET_DIR_INPUT(IO) Gpio::setDir(IO, 1) +#define SET_DIR_OUTPUT(IO) Gpio::setDir(IO, 0) + +#define SET_MODE(IO, mode) Gpio::setMode(IO, mode) + +#define WRITE_PIN_SET(IO) Gpio::set(IO) +#define WRITE_PIN_CLR(IO) Gpio::clear(IO) + +#define READ_PIN(IO) Gpio::get(IO) +#define WRITE_PIN(IO,V) Gpio::set(IO, V) + +/** + * Magic I/O routines + * + * Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW); + * + * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html + */ + +/// Read a pin +#define _READ(IO) READ_PIN(IO) + +/// Write to a pin +#define _WRITE(IO,V) WRITE_PIN(IO,V) + +/// toggle a pin +#define _TOGGLE(IO) _WRITE(IO, !READ(IO)) + +/// set pin as input +#define _SET_INPUT(IO) SET_DIR_INPUT(IO) + +/// set pin as output +#define _SET_OUTPUT(IO) SET_DIR_OUTPUT(IO) + +/// set pin as input with pullup mode +#define _PULLUP(IO,V) pinMode(IO, (V) ? INPUT_PULLUP : INPUT) + +/// set pin as input with pulldown mode +#define _PULLDOWN(IO,V) pinMode(IO, (V) ? INPUT_PULLDOWN : INPUT) + +// hg42: all pins can be input or output (I hope) +// hg42: undefined pins create compile error (IO, is no pin) +// hg42: currently not used, but was used by pinsDebug + +/// check if pin is an input +#define _IS_INPUT(IO) (IO >= 0) + +/// check if pin is an output +#define _IS_OUTPUT(IO) (IO >= 0) + +/// Read a pin wrapper +#define READ(IO) _READ(IO) + +/// Write to a pin wrapper +#define WRITE(IO,V) _WRITE(IO,V) + +/// toggle a pin wrapper +#define TOGGLE(IO) _TOGGLE(IO) + +/// set pin as input wrapper +#define SET_INPUT(IO) _SET_INPUT(IO) +/// set pin as input with pullup wrapper +#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0) +/// set pin as input with pulldown wrapper +#define SET_INPUT_PULLDOWN(IO) do{ _SET_INPUT(IO); _PULLDOWN(IO, HIGH); }while(0) +/// set pin as output wrapper - reads the pin and sets the output to that value +#define SET_OUTPUT(IO) do{ _WRITE(IO, _READ(IO)); _SET_OUTPUT(IO); }while(0) +// set pin as PWM +#define SET_PWM(IO) SET_OUTPUT(IO) + +/// check if pin is an input wrapper +#define IS_INPUT(IO) _IS_INPUT(IO) +/// check if pin is an output wrapper +#define IS_OUTPUT(IO) _IS_OUTPUT(IO) + +// Shorthand +#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0) + +// digitalRead/Write wrappers +#define extDigitalRead(IO) digitalRead(IO) +#define extDigitalWrite(IO,V) digitalWrite(IO,V) diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h new file mode 100644 index 000000000000..1ac02f118285 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h new file mode 100644 index 000000000000..69b6b4848f6e --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h @@ -0,0 +1,31 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// Add strcmp_P if missing +#ifndef strcmp_P + #define strcmp_P(a, b) strcmp((a), (b)) +#endif + +#ifndef strcat_P + #define strcat_P(dest, src) strcat((dest), (src)) +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h new file mode 100644 index 000000000000..1ac02f118285 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h b/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h new file mode 100644 index 000000000000..104af9af5b20 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Test X86_64-specific configuration values for errors at compile-time. + */ + +// Emulating RAMPS +#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) + #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +#endif + +#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX." +#endif + +#if HAS_TMC_SW_SERIAL + #error "TMC220x Software Serial is not supported on LINUX." +#endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on LINUX." +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h new file mode 100644 index 000000000000..2aeeb52e92d7 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h @@ -0,0 +1,59 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Support routines for X86_64 + */ + +/** + * Translation of routines & variables used by pinsDebug.h + */ + +#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS +#define pwm_details(pin) pin = pin // do nothing // print PWM details +#define pwm_status(pin) false //Print a pin's PWM status. Return true if it's currently a PWM pin. +#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0) +#define digitalRead_mod(p) digitalRead(p) +#define PRINT_PORT(p) +#define GET_ARRAY_PIN(p) pin_array[p].pin +#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin + +// active ADC function/mode/code values for PINSEL registers +constexpr int8_t ADC_pin_mode(pin_t pin) { + return (-1); +} + +int8_t get_pin_mode(pin_t pin) { + if (!VALID_PIN(pin)) return -1; + return 0; +} + +bool GET_PINMODE(pin_t pin) { + int8_t pin_mode = get_pin_mode(pin); + if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // found an invalid pin or active analog pin + return false; + + return (Gpio::getMode(pin) != 0); //input/output state +} + +bool GET_ARRAY_IS_DIGITAL(pin_t pin) { + return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin)); +} diff --git a/Marlin/src/HAL/NATIVE_SIM/servo_private.h b/Marlin/src/HAL/NATIVE_SIM/servo_private.h new file mode 100644 index 000000000000..06be1893f6eb --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/servo_private.h @@ -0,0 +1,80 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 + * Copyright (c) 2009 Michael Margolis. All right reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * Based on "servo.h - Interrupt driven Servo library for Arduino using 16 bit timers - + * Version 2 Copyright (c) 2009 Michael Margolis. All right reserved. + * + * The only modification was to update/delete macros to match the LPC176x. + * + */ + +#include + +// Macros +//values in microseconds +#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo +#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo +#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached +#define REFRESH_INTERVAL 20000 // minimum time to refresh servos in microseconds + +#define MAX_SERVOS 4 + +#define INVALID_SERVO 255 // flag indicating an invalid servo index + + +// Types + +typedef struct { + uint8_t nbr : 8 ; // a pin number from 0 to 254 (255 signals invalid pin) + uint8_t isActive : 1 ; // true if this channel is enabled, pin not pulsed if false +} ServoPin_t; + +typedef struct { + ServoPin_t Pin; + unsigned int pulse_width; // pulse width in microseconds +} ServoInfo_t; + +// Global variables + +extern uint8_t ServoCount; +extern ServoInfo_t servo_info[MAX_SERVOS]; diff --git a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h new file mode 100644 index 000000000000..a5138e0ccbe8 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -0,0 +1,55 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../core/macros.h" +#include "../../inc/MarlinConfigPre.h" + +#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) + #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently + // needed due to the speed and mode required for communicating with each device being different. + // This requirement can be removed if the SPI access to these devices is updated to use + // spiBeginTransaction. +#endif + +// Onboard SD +//#define SD_SCK_PIN P0_07 +//#define SD_MISO_PIN P0_08 +//#define SD_MOSI_PIN P0_09 +//#define SD_SS_PIN P0_06 + +// External SD +#ifndef SD_SCK_PIN + #define SD_SCK_PIN 50 +#endif +#ifndef SD_MISO_PIN + #define SD_MISO_PIN 51 +#endif +#ifndef SD_MOSI_PIN + #define SD_MOSI_PIN 52 +#endif +#ifndef SD_SS_PIN + #define SD_SS_PIN 53 +#endif +#ifndef SDSS + #define SDSS SD_SS_PIN +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h b/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h new file mode 100644 index 000000000000..b3e622f19ac4 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h @@ -0,0 +1,64 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../inc/MarlinConfig.h" + +#ifndef LCD_READ_ID + #define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341) +#endif +#ifndef LCD_READ_ID4 + #define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341) +#endif + +#define DATASIZE_8BIT 8 +#define DATASIZE_16BIT 16 +#define TFT_IO_DRIVER TFT_SPI + +#define DMA_MINC_ENABLE 1 +#define DMA_MINC_DISABLE 0 + +class TFT_SPI { +private: + static uint32_t ReadID(uint16_t Reg); + static void Transmit(uint16_t Data); + static void TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count); + +public: + // static SPIClass SPIx; + + static void Init(); + static uint32_t GetID(); + static bool isBusy(); + static void Abort(); + + static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT); + static void DataTransferEnd(); + static void DataTransferAbort(); + + static void WriteData(uint16_t Data); + static void WriteReg(uint16_t Reg); + + static void WriteSequence(uint16_t *Data, uint16_t Count); + // static void WriteMultiple(uint16_t Color, uint16_t Count); + static void WriteMultiple(uint16_t Color, uint32_t Count); +}; diff --git a/Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h b/Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h new file mode 100644 index 000000000000..9ef1816c7b16 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h @@ -0,0 +1,80 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(TOUCH_BUTTONS_HW_SPI) + #include +#endif + +#ifndef TOUCH_MISO_PIN + #define TOUCH_MISO_PIN SD_MISO_PIN +#endif +#ifndef TOUCH_MOSI_PIN + #define TOUCH_MOSI_PIN SD_MOSI_PIN +#endif +#ifndef TOUCH_SCK_PIN + #define TOUCH_SCK_PIN SD_SCK_PIN +#endif +#ifndef TOUCH_CS_PIN + #define TOUCH_CS_PIN SD_SS_PIN +#endif +#ifndef TOUCH_INT_PIN + #define TOUCH_INT_PIN -1 +#endif + +#define XPT2046_DFR_MODE 0x00 +#define XPT2046_SER_MODE 0x04 +#define XPT2046_CONTROL 0x80 + +enum XPTCoordinate : uint8_t { + XPT2046_X = 0x10 | XPT2046_CONTROL | XPT2046_DFR_MODE, + XPT2046_Y = 0x50 | XPT2046_CONTROL | XPT2046_DFR_MODE, + XPT2046_Z1 = 0x30 | XPT2046_CONTROL | XPT2046_DFR_MODE, + XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE, +}; + +#if !defined(XPT2046_Z1_THRESHOLD) + #define XPT2046_Z1_THRESHOLD 10 +#endif + +class XPT2046 { +private: + static bool isBusy() { return false; } + + static uint16_t getRawData(const XPTCoordinate coordinate); + static bool isTouched(); + + static inline void DataTransferBegin(); + static inline void DataTransferEnd(); + #if ENABLED(TOUCH_BUTTONS_HW_SPI) + static uint16_t HardwareIO(uint16_t data); + #endif + static uint16_t SoftwareIO(uint16_t data); + static uint16_t IO(uint16_t data = 0); + +public: + #if ENABLED(TOUCH_BUTTONS_HW_SPI) + static SPIClass SPIx; + #endif + + static void Init(); + static bool getRawPoint(int16_t *x, int16_t *y); +}; diff --git a/Marlin/src/HAL/NATIVE_SIM/timers.h b/Marlin/src/HAL/NATIVE_SIM/timers.h new file mode 100644 index 000000000000..c61eb29e76cf --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/timers.h @@ -0,0 +1,91 @@ +/** + * Marlin 3D Printer Firmware + * + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * HAL timers for Linux X86_64 + */ + +#include + +// ------------------------ +// Defines +// ------------------------ + +#define FORCE_INLINE __attribute__((always_inline)) inline + +typedef uint64_t hal_timer_t; +#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFF + +#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals + +#ifndef STEP_TIMER_NUM + #define STEP_TIMER_NUM 0 // Timer Index for Stepper +#endif +#ifndef PULSE_TIMER_NUM + #define PULSE_TIMER_NUM STEP_TIMER_NUM +#endif +#ifndef TEMP_TIMER_NUM + #define TEMP_TIMER_NUM 1 // Timer Index for Temperature +#endif +#ifndef SYSTICK_TIMER_NUM + #define SYSTICK_TIMER_NUM 2 // Timer Index for Systick +#endif +#define SYSTICK_TIMER_FREQUENCY 1000 + +#define TEMP_TIMER_RATE 1000000 +#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency + +#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) +#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs +#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US) + +#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer +#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE +#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US + +#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM) +#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM) +#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM) + +#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM) +#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM) + +#ifndef HAL_STEP_TIMER_ISR + #define HAL_STEP_TIMER_ISR() extern "C" void TIMER0_IRQHandler() +#endif +#ifndef HAL_TEMP_TIMER_ISR + #define HAL_TEMP_TIMER_ISR() extern "C" void TIMER1_IRQHandler() +#endif + +void HAL_timer_init(); +void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency); + +void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare); +hal_timer_t HAL_timer_get_compare(const uint8_t timer_num); +hal_timer_t HAL_timer_get_count(const uint8_t timer_num); + +void HAL_timer_enable_interrupt(const uint8_t timer_num); +void HAL_timer_disable_interrupt(const uint8_t timer_num); +bool HAL_timer_interrupt_enabled(const uint8_t timer_num); + +#define HAL_timer_isr_prologue(TIMER_NUM) +#define HAL_timer_isr_epilogue(TIMER_NUM) diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp new file mode 100644 index 000000000000..745454394aae --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +// adapted from I2C/master/master.c example +// https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html + +#ifdef __PLAT_NATIVE_SIM__ + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +uint8_t u8g_i2c_start(const uint8_t sla) { + return 1; +} + +void u8g_i2c_init(const uint8_t clock_option) { +} + +uint8_t u8g_i2c_send_byte(uint8_t data) { + return 1; +} + +void u8g_i2c_stop() { +} + +#ifdef __cplusplus + } +#endif + +#endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h new file mode 100644 index 000000000000..6d5f91d3ba45 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h @@ -0,0 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#ifdef __cplusplus + extern "C" { +#endif + +void u8g_i2c_init(const uint8_t clock_options); +//uint8_t u8g_i2c_wait(uint8_t mask, uint8_t pos); +uint8_t u8g_i2c_start(uint8_t sla); +uint8_t u8g_i2c_send_byte(uint8_t data); +void u8g_i2c_stop(); + +#ifdef __cplusplus + } +#endif + diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h new file mode 100644 index 000000000000..44ffbfeb90e5 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h @@ -0,0 +1,44 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +void usleep(uint64_t microsec); +// The following are optional depending on the platform. + +// definitions of HAL specific com and device drivers. +uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + +// connect U8g com generic com names to the desired driver +#define U8G_COM_SW_SPI u8g_com_sw_spi_fn +#define U8G_COM_ST7920_SW_SPI u8g_com_ST7920_sw_spi_fn + +// let these default for now +#define U8G_COM_HW_SPI u8g_com_null_fn +#define U8G_COM_ST7920_HW_SPI u8g_com_null_fn +#define U8G_COM_SSD_I2C u8g_com_null_fn +#define U8G_COM_PARALLEL u8g_com_null_fn +#define U8G_COM_T6963 u8g_com_null_fn +#define U8G_COM_FAST_PARALLEL u8g_com_null_fn +#define U8G_COM_UC_I2C u8g_com_null_fn + + diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h new file mode 100644 index 000000000000..297361cd448f --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * LCD delay routines - used by all the drivers. + * + * These are based on the LPC1768 routines. + * + * Couldn't just call exact copies because the overhead + * results in a one microsecond delay taking about 4µS. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +void U8g_delay(int msec); +void u8g_MicroDelay(); +void u8g_10MicroDelay(); + +#ifdef __cplusplus + } +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp new file mode 100644 index 000000000000..3b5acc1656cd --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Low level pin manipulation routines - used by all the drivers. + * + * These are based on the LPC1768 pinMode, digitalRead & digitalWrite routines. + * + * Couldn't just call exact copies because the overhead killed the LCD update speed + * With an intermediate level the softspi was running in the 10-20kHz range which + * resulted in using about about 25% of the CPU's time. + */ + +#ifdef __PLAT_NATIVE_SIM__ + +#include "../fastio.h" +#include "LCD_pin_routines.h" + +#ifdef __cplusplus + extern "C" { +#endif +void u8g_SetPinOutput(uint8_t internal_pin_number){SET_DIR_OUTPUT(internal_pin_number);} +void u8g_SetPinInput(uint8_t internal_pin_number){SET_DIR_INPUT(internal_pin_number);} +void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status){WRITE_PIN(pin, pin_status);} +uint8_t u8g_GetPinLevel(uint8_t pin){return READ_PIN(pin);} +void usleep(uint64_t microsec){ +assert(false); // why we here? +} +#ifdef __cplusplus + } +#endif + +#endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h new file mode 100644 index 000000000000..c27c84e8c398 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h @@ -0,0 +1,46 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Low level pin manipulation routines - used by all the drivers. + * + * These are based on the LPC1768 pinMode, digitalRead & digitalWrite routines. + * + * Couldn't just call exact copies because the overhead killed the LCD update speed + * With an intermediate level the softspi was running in the 10-20kHz range which + * resulted in using about about 25% of the CPU's time. + */ + + +#ifdef __cplusplus + extern "C" { +#endif + +void u8g_SetPinOutput(uint8_t internal_pin_number); +void u8g_SetPinInput(uint8_t internal_pin_number); +void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status); +uint8_t u8g_GetPinLevel(uint8_t pin); + +#ifdef __cplusplus + } +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp new file mode 100644 index 000000000000..e95c6ebfbd03 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp @@ -0,0 +1,171 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on u8g_com_st7920_hw_spi.c + * + * Universal 8bit Graphics Library + * + * Copyright (c) 2011, olikraus@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __PLAT_NATIVE_SIM__ + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(U8GLIB_ST7920) + +#include +#include "../../shared/Delay.h" + +#undef SPI_SPEED +#define SPI_SPEED 6 +#define SPI_DELAY_CYCLES (1 + SPI_SPEED * 10) + +static pin_t SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL; +static uint8_t SPI_speed = 0; + +static uint8_t swSpiTransfer(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin) { + for (uint8_t i = 0; i < 8; i++) { + WRITE_PIN(mosi_pin, !!(b & 0x80)); + DELAY_CYCLES(SPI_SPEED); + WRITE_PIN(sck_pin, HIGH); + DELAY_CYCLES(SPI_SPEED); + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + WRITE_PIN(sck_pin, LOW); + DELAY_CYCLES(SPI_SPEED); + } + return b; +} + +static uint8_t swSpiInit(const uint8_t spiRate, const pin_t sck_pin, const pin_t mosi_pin) { + WRITE_PIN(mosi_pin, HIGH); + WRITE_PIN(sck_pin, LOW); + return spiRate; +} + +static void u8g_com_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) { + static uint8_t rs_last_state = 255; + if (rs != rs_last_state) { + // Transfer Data (FA) or Command (F8) + swSpiTransfer(rs ? 0x0FA : 0x0F8, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); + rs_last_state = rs; + DELAY_US(40); // Give the controller time to process the data: 20 is bad, 30 is OK, 40 is safe + } + swSpiTransfer(val & 0x0F0, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); + swSpiTransfer(val << 4, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); +} +#ifdef __cplusplus + extern "C" { +#endif + +uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { + switch (msg) { + case U8G_COM_MSG_INIT: + SCK_pin_ST7920_HAL = u8g->pin_list[U8G_PI_SCK]; + MOSI_pin_ST7920_HAL_HAL = u8g->pin_list[U8G_PI_MOSI]; + + u8g_SetPIOutput(u8g, U8G_PI_CS); + u8g_SetPIOutput(u8g, U8G_PI_SCK); + u8g_SetPIOutput(u8g, U8G_PI_MOSI); + u8g_Delay(5); + + SPI_speed = swSpiInit(SPI_SPEED, SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL); + + u8g_SetPILevel(u8g, U8G_PI_CS, 0); + u8g_SetPILevel(u8g, U8G_PI_SCK, 0); + u8g_SetPILevel(u8g, U8G_PI_MOSI, 0); + + u8g->pin_list[U8G_PI_A0_STATE] = 0; /* initial RS state: command mode */ + break; + + case U8G_COM_MSG_STOP: + break; + + case U8G_COM_MSG_RESET: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val); + break; + + case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ + u8g->pin_list[U8G_PI_A0_STATE] = arg_val; + break; + + case U8G_COM_MSG_CHIP_SELECT: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_CS]) u8g_SetPILevel(u8g, U8G_PI_CS, arg_val); //note: the st7920 has an active high chip select + break; + + case U8G_COM_MSG_WRITE_BYTE: + u8g_com_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val); + break; + + case U8G_COM_MSG_WRITE_SEQ: { + uint8_t *ptr = (uint8_t*) arg_ptr; + while (arg_val > 0) { + u8g_com_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++); + arg_val--; + } + } + break; + + case U8G_COM_MSG_WRITE_SEQ_P: { + uint8_t *ptr = (uint8_t*) arg_ptr; + while (arg_val > 0) { + u8g_com_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++); + arg_val--; + } + } + break; + } + return 1; +} +#ifdef __cplusplus + } +#endif + +#endif // U8GLIB_ST7920 +#endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp new file mode 100644 index 000000000000..8e0ac9c7df35 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp @@ -0,0 +1,215 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on u8g_com_std_sw_spi.c + * + * Universal 8bit Graphics Library + * + * Copyright (c) 2015, olikraus@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __PLAT_NATIVE_SIM__ + +#include "../../../inc/MarlinConfig.h" + +#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920) + +#undef SPI_SPEED +#define SPI_SPEED 2 // About 2 MHz + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +uint8_t swSpiTransfer_mode_0(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin ) { + LOOP_L_N(i, 8) { + if (spi_speed == 0) { + WRITE_PIN(mosi_pin, !!(b & 0x80)); + WRITE_PIN(sck_pin, HIGH); + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + WRITE_PIN(sck_pin, LOW); + } + else { + const uint8_t state = (b & 0x80) ? HIGH : LOW; + LOOP_L_N(j, spi_speed) + WRITE_PIN(mosi_pin, state); + + LOOP_L_N(j, spi_speed + (miso_pin >= 0 ? 0 : 1)) + WRITE_PIN(sck_pin, HIGH); + + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + + LOOP_L_N(j, spi_speed) + WRITE_PIN(sck_pin, LOW); + } + } + + return b; +} + +uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin ) { + + LOOP_L_N(i, 8) { + const uint8_t state = (b & 0x80) ? HIGH : LOW; + if (spi_speed == 0) { + WRITE_PIN(sck_pin, LOW); + WRITE_PIN(mosi_pin, state); + WRITE_PIN(mosi_pin, state); // need some setup time + WRITE_PIN(sck_pin, HIGH); + } + else { + LOOP_L_N(j, spi_speed + (miso_pin >= 0 ? 0 : 1)) + WRITE_PIN(sck_pin, LOW); + + LOOP_L_N(j, spi_speed) + WRITE_PIN(mosi_pin, state); + + LOOP_L_N(j, spi_speed) + WRITE_PIN(sck_pin, HIGH); + } + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + } + + return b; +} + +static uint8_t SPI_speed = 0; + +static uint8_t swSpiInit(const uint8_t spi_speed, const uint8_t clk_pin, const uint8_t mosi_pin) { + return spi_speed; +} + +static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { + #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) + swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin); + #else + swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin); + #endif +} + +uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { + switch (msg) { + case U8G_COM_MSG_INIT: + u8g_SetPIOutput(u8g, U8G_PI_SCK); + u8g_SetPIOutput(u8g, U8G_PI_MOSI); + u8g_SetPIOutput(u8g, U8G_PI_CS); + u8g_SetPIOutput(u8g, U8G_PI_A0); + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPIOutput(u8g, U8G_PI_RESET); + SPI_speed = swSpiInit(SPI_SPEED, u8g->pin_list[U8G_PI_SCK], u8g->pin_list[U8G_PI_MOSI]); + u8g_SetPILevel(u8g, U8G_PI_SCK, 0); + u8g_SetPILevel(u8g, U8G_PI_MOSI, 0); + break; + + case U8G_COM_MSG_STOP: + break; + + case U8G_COM_MSG_RESET: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val); + break; + + case U8G_COM_MSG_CHIP_SELECT: + #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 + if (arg_val) { // SCK idle state needs to be set to the proper idle state before + // the next chip select goes active + u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active + u8g_SetPILevel(u8g, U8G_PI_CS, LOW); + } + else { + u8g_SetPILevel(u8g, U8G_PI_CS, HIGH); + u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive + } + #else + u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val); + #endif + break; + + case U8G_COM_MSG_WRITE_BYTE: + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], arg_val); + break; + + case U8G_COM_MSG_WRITE_SEQ: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], *ptr++); + arg_val--; + } + } + break; + + case U8G_COM_MSG_WRITE_SEQ_P: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], u8g_pgm_read(ptr)); + ptr++; + arg_val--; + } + } + break; + + case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ + u8g_SetPILevel(u8g, U8G_PI_A0, arg_val); + break; + } + return 1; +} + +#ifdef __cplusplus + } +#endif + +#elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB + #include + uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;} +#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920 +#endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/NATIVE_SIM/watchdog.h b/Marlin/src/HAL/NATIVE_SIM/watchdog.h new file mode 100644 index 000000000000..4e404c3887da --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/watchdog.h @@ -0,0 +1,27 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define WDT_TIMEOUT 4000000 // 4 second timeout + +void watchdog_init(); +void HAL_watchdog_refresh(); diff --git a/Marlin/src/HAL/platforms.h b/Marlin/src/HAL/platforms.h index e0617bdf7fa5..0b1b305f6dc4 100644 --- a/Marlin/src/HAL/platforms.h +++ b/Marlin/src/HAL/platforms.h @@ -43,6 +43,8 @@ #define HAL_PATH(PATH, NAME) XSTR(PATH/ESP32/NAME) #elif defined(__PLAT_LINUX__) #define HAL_PATH(PATH, NAME) XSTR(PATH/LINUX/NAME) +#elif defined(__PLAT_NATIVE_SIM__) + #define HAL_PATH(PATH, NAME) XSTR(PATH/NATIVE_SIM/NAME) #elif defined(__SAMD51__) #define HAL_PATH(PATH, NAME) XSTR(PATH/SAMD51/NAME) #else diff --git a/Marlin/src/HAL/shared/Delay.h b/Marlin/src/HAL/shared/Delay.h index 3174968c1be2..04df35d88d6a 100644 --- a/Marlin/src/HAL/shared/Delay.h +++ b/Marlin/src/HAL/shared/Delay.h @@ -160,7 +160,7 @@ void calibrate_delay_loop(); // Delay in microseconds #define DELAY_US(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL)) -#elif defined(__PLAT_LINUX__) || defined(ESP32) +#elif defined(ESP32) || defined(__PLAT_LINUX__) || defined(__PLAT_NATIVE_SIM__) // DELAY_CYCLES specified inside platform diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index ee6c0e6eae92..7ceb70c22c7e 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -304,6 +304,9 @@ void serial_echopair_PGM(PGM_P const s_P, unsigned int v); void serial_echopair_PGM(PGM_P const s_P, unsigned long v); inline void serial_echopair_PGM(PGM_P const s_P, bool v) { serial_echopair_PGM(s_P, (int)v); } inline void serial_echopair_PGM(PGM_P const s_P, void *v) { serial_echopair_PGM(s_P, (uintptr_t)v); } +#if __INTPTR_WIDTH__ != __SIZE_WIDTH__ + inline void serial_echopair_PGM(PGM_P const s_P, size_t v) { serial_echopair_PGM(s_P, (long int)v); } +#endif void serial_echo_start(); void serial_error_start(); diff --git a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h index 98a8f0a98a6a..a30dd4ca17f3 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h @@ -97,6 +97,11 @@ #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn #define U8G_COM_SSD_I2C_HAL u8g_com_HAL_LPC1768_ssd_hw_i2c_fn +#elif defined(__PLAT_NATIVE_SIM__) + uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #define U8G_COM_HAL_SW_SPI_FN u8g_com_sw_spi_fn + #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_ST7920_sw_spi_fn #endif #ifndef U8G_COM_HAL_SW_SPI_FN diff --git a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp index 6b973241fe18..5e1dfae5d1d1 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp @@ -360,7 +360,7 @@ void disp_gcode_icon(uint8_t file_num) { uint32_t lv_open_gcode_file(char *path) { #if ENABLED(SDSUPPORT) uint32_t *ps4; - uint32_t pre_sread_cnt = UINT32_MAX; + uintptr_t pre_sread_cnt = UINTPTR_MAX; char *cur_name; cur_name = strrchr(path, '/'); @@ -370,7 +370,7 @@ uint32_t lv_open_gcode_file(char *path) { ps4 = (uint32_t *)strstr((char *)public_buf, ";simage:"); // Ignore the beginning message of gcode file if (ps4) { - pre_sread_cnt = (uint32_t)ps4 - (uint32_t)((uint32_t *)(&public_buf[0])); + pre_sread_cnt = (uintptr_t)ps4 - (uintptr_t)((uint32_t *)(&public_buf[0])); card.setIndex(pre_sread_cnt); } return pre_sread_cnt; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 1c1e5cc1f5a6..aae6e62a6636 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -560,11 +560,11 @@ char *creat_title_text() { #if HAS_GCODE_PREVIEW - uint32_t gPicturePreviewStart = 0; + uintptr_t gPicturePreviewStart = 0; void preview_gcode_prehandle(char *path) { #if ENABLED(SDSUPPORT) - uint32_t pre_read_cnt = 0; + uintptr_t pre_read_cnt = 0; uint32_t *p1; char *cur_name; @@ -575,7 +575,7 @@ char *creat_title_text() { p1 = (uint32_t *)strstr((char *)public_buf, ";simage:"); if (p1) { - pre_read_cnt = (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0])); + pre_read_cnt = (uintptr_t)p1 - (uintptr_t)((uint32_t *)(&public_buf[0])); To_pre_view = pre_read_cnt; gcode_preview_over = true; @@ -606,7 +606,7 @@ char *creat_title_text() { uint32_t br = card.read(public_buf, 400); uint32_t *p1 = (uint32_t *)strstr((char *)public_buf, ";gimage:"); if (p1) { - gPicturePreviewStart += (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0])); + gPicturePreviewStart += (uintptr_t)p1 - (uintptr_t)((uint32_t *)(&public_buf[0])); break; } else { diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 2127b23a15de..cfd6db15fdae 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -398,7 +398,7 @@ lv_fs_res_t sd_open_cb (lv_fs_drv_t * drv, void * file_p, const char * path, lv_ // find small image size card.read(public_buf, 512); public_buf[511] = '\0'; - char* eol = strpbrk((const char*)public_buf, "\n\r"); + const char* eol = strpbrk((const char*)public_buf, "\n\r"); small_image_size = (uintptr_t)eol - (uintptr_t)((uint32_t *)(&public_buf[0])) + 1; return LV_FS_RES_OK; } @@ -530,4 +530,10 @@ void lv_encoder_pin_init() { #endif // HAS_ENCODER_ACTION +#if __PLAT_NATIVE_SIM__ + #include + typedef void (*lv_log_print_g_cb_t)(lv_log_level_t level, const char *, uint32_t, const char *); + extern "C" void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb) {} +#endif + #endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 3930279c94e7..a0f8c1648c1e 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -49,6 +49,10 @@ #define BOARD_INFO_NAME "RAMPS 1.4" #endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "SimRap 1.4" +#endif + #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif @@ -208,6 +212,7 @@ // #define SDSS 53 #define LED_PIN 13 +#define NEOPIXEL_PIN 71 #ifndef FILWIDTH_PIN #define FILWIDTH_PIN 5 // Analog Input on AUX2 @@ -215,7 +220,7 @@ // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN 4 + #define FIL_RUNOUT_PIN 21 #endif #ifndef PS_ON_PIN @@ -389,7 +394,54 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) + + #define TFT_A0_PIN 43 + #define TFT_CS_PIN 49 + #define TFT_DC_PIN 43 + #define TFT_SCK_PIN SD_SCK_PIN + #define TFT_MOSI_PIN SD_MOSI_PIN + #define TFT_MISO_PIN SD_MISO_PIN + #define LCD_USE_DMA_SPI + + #define BTN_EN1 40 + #define BTN_EN2 63 + #define BTN_ENC 59 + #define BEEPER_PIN 42 + + #define TOUCH_CS_PIN 33 + #define SD_DETECT_PIN 41 + + #define HAS_SPI_FLASH 1 + #if HAS_SPI_FLASH + #define SPI_DEVICE 1 + #define SPI_FLASH_SIZE 0x1000000 // 16MB + #define W25QXX_CS_PIN 31 + #define W25QXX_MOSI_PIN SD_MOSI_PIN + #define W25QXX_MISO_PIN SD_MISO_PIN + #define W25QXX_SCK_PIN SD_SCK_PIN + #endif + + #define TFT_BUFFER_SIZE 0xFFFF + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #ifndef XPT2046_X_CALIBRATION + #define XPT2046_X_CALIBRATION 63934 + #endif + #ifndef XPT2046_Y_CALIBRATION + #define XPT2046_Y_CALIBRATION 63598 + #endif + #ifndef XPT2046_X_OFFSET + #define XPT2046_X_OFFSET -1 + #endif + #ifndef XPT2046_Y_OFFSET + #define XPT2046_Y_OFFSET -20 + #endif + + #define BTN_BACK 70 + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -622,14 +674,18 @@ #define BTN_EN1 37 #define BTN_EN2 35 #define BTN_ENC 31 + #define SD_DETECT_PIN 41 #endif #if ENABLED(G3D_PANEL) #define SD_DETECT_PIN 49 #define KILL_PIN 41 #endif - #endif + + // CUSTOM SIMULATOR INPUTS + #define BTN_BACK 70 + #endif // IS_NEWPANEL #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 4c773d1e7657..a4ef4f080c54 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -681,7 +681,7 @@ // #elif MB(LINUX_RAMPS) - #include "linux/pins_RAMPS_LINUX.h" // Linux env:linux_native + #include "linux/pins_RAMPS_LINUX.h" // Native or Simulation lin:linux_native mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows lin:simulator_linux_debug lin:simulator_linux_release #else diff --git a/Marlin/src/sd/SdFatUtil.cpp b/Marlin/src/sd/SdFatUtil.cpp index 7d9f33dc5050..e6f7a9a01305 100644 --- a/Marlin/src/sd/SdFatUtil.cpp +++ b/Marlin/src/sd/SdFatUtil.cpp @@ -48,7 +48,7 @@ return &top - reinterpret_cast(sbrk(0)); } -#else +#elif defined(__AVR__) extern char* __brkval; extern char __bss_end; diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 90c39feaf8b6..f3a913ced3ed 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -939,7 +939,7 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, con while (atom_ptr) { // Find next subdirectory delimiter - char * const name_end = strchr(atom_ptr, '/'); + const char * const name_end = strchr(atom_ptr, '/'); // Last atom in the path? Item found. if (name_end <= atom_ptr) break; diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py index 01ee89e25e4d..83dfeca879ec 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.py +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py @@ -215,7 +215,13 @@ def search_compiler(): # Find the current platform compiler by searching the $PATH # which will be in a platformio toolchain bin folder path_regex = re.escape(env['PROJECT_PACKAGES_DIR']) - gcc = "g++" + + # See if the environment provides a default compiler + try: + gcc = env.GetProjectOption('custom_deps_gcc') + except: + gcc = "g++" + if env['PLATFORM'] == 'win32': path_separator = ';' path_regex += r'.*\\bin' @@ -241,6 +247,8 @@ def search_compiler(): return filepath filepath = env.get('CXX') + if filepath == 'CC': + filepath = gcc blab("Couldn't find a compiler! Fallback to %s" % filepath) return filepath diff --git a/buildroot/share/PlatformIO/scripts/simulator.py b/buildroot/share/PlatformIO/scripts/simulator.py new file mode 100644 index 000000000000..fb9d93ccebcc --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/simulator.py @@ -0,0 +1,52 @@ +# +# PlatformIO pre: script for simulator builds +# + +# Get the environment thus far for the build +Import("env") + +#print(env.Dump()) + +# +# Give the binary a distinctive name +# + +env['PROGNAME'] = "MarlinSimulator" + +# +# If Xcode is installed add the path to its Frameworks folder, +# or if Mesa is installed try to use its GL/gl.h. +# + +import sys +if sys.platform == 'darwin': + + # + # Silence half of the ranlib warnings. (No equivalent for 'ARFLAGS') + # + env['RANLIBFLAGS'] += [ "-no_warning_for_no_symbols" ] + + # Default paths for Xcode and a lucky GL/gl.h dropped by Mesa + xcode_path = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks" + mesa_path = "/opt/local/include/GL/gl.h" + + import os.path + + if os.path.exists(xcode_path): + + env['BUILD_FLAGS'] += [ "-F" + xcode_path ] + print("Using OpenGL framework headers from Xcode.app") + + elif os.path.exists(mesa_path): + + env['BUILD_FLAGS'] += [ '-D__MESA__' ] + print("Using OpenGL header from", mesa_path) + + else: + + print("\n\nNo OpenGL headers found. Install Xcode for matching headers, or use 'sudo port install mesa' to get a GL/gl.h.\n\n") + + # Break out of the PIO build immediately + sys.exit(1) + +env.AddCustomTarget("upload", "$BUILD_DIR/${PROGNAME}", "$BUILD_DIR/${PROGNAME}") diff --git a/ini/native.ini b/ini/native.ini index dbdfd26f8bfa..b40ea836da8d 100644 --- a/ini/native.ini +++ b/ini/native.ini @@ -21,3 +21,110 @@ build_unflags = -Wall lib_ldf_mode = off lib_deps = src_filter = ${common.default_src_filter} + + +# +# Native Simulation +# Builds with a small subset of available features +# Required system libraries: SDL2, SDL2-net, OpenGL, GLM +# +# Tested with Linux (Mint 20) : gcc [9.3.0, 10.2.0]: libsdl2-dev[2.0.10], libsdl2-net-dev[2.0.1], libglm-dev[0.9.9.7, 0.9.9.8] +# +# Debugging with gdb in vscode is as easy as adding the launch task as usual, but platformio +# will randomly remove your task when it recreates its tasks from a template. Add your gdb +# launch task to '~/.platformio/penv/lib/python{PYTHON_VERSION}/site-packages/platformio/ide/tpls/vscode/.vscode' +# to avoid this until platformio updates. +# +[simulator_common] +platform = native +framework = +build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS -I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/include -IMarlin/src/HAL/NATIVE_SIM/u8g +src_build_flags = -Wall -Wno-expansion-to-defined -Wcast-align +release_flags = -g0 -O3 -flto +debug_build_flags = -fstack-protector-strong -g -g3 -ggdb +lib_compat_mode = off +src_filter = ${common.default_src_filter} + + +lib_deps = ${common.lib_deps} + MarlinSimUI=https://github.com/p3p/MarlinSimUI.git + Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip + LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/master.zip +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/simulator.py + + +[simulator_linux] +extends = simulator_common +build_flags = ${simulator_common.build_flags} -ldl -lpthread -lSDL2 -lSDL2_net -lGL + +[env:simulator_linux_debug] +platform = ${simulator_linux.platform} +extends = simulator_linux +build_type = debug + +[env:simulator_linux_release] +platform = ${simulator_linux.platform} +extends = simulator_linux +build_type = release +build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags} + +# +# Simulator for macOS (MacPorts) +# +# sudo port install gcc10 gdb glm libsdl2 freetype +# sudo port install ld64 @3_3 +ld64_xcode +# sudo port uninstall ld64 ld64-latest +# cd /opt/local/bin +# sudo rm -f gcc g++ cc +# sudo ln gcc-mp-10 gcc ; sudo ln g++-mp-10 g++ ; sudo ln g++ cc +# cd - +# +# Use 'sudo port install mesa' to get a if no Xcode is installed. +# If Xcode is installed be sure to run `xcode-select --install` first. +# +# For VSCode debugging paste the block below near the top of launch.json. +# NOTE: The PlatformIO VSCode extension will remove it when regenerating launch.json. +# +# { "name": "Debug Sim", +# "type": "cppdbg", +# "request": "launch", +# "program": "${workspaceFolder}/.pio/build/simulator_macos/MarlinSimulator", +# "miDebuggerPath": "/opt/local/bin/ggdb", +# "MIMode": "gdb", +# "cwd": "${workspaceFolder}/.pio/build/simulator_macos" }, +# +[simulator_macos] +build_unflags = -lGL +custom_verbose = 0 +build_flags = + -I/opt/local/include + -I/opt/local/include/freetype2 + -I/opt/local/include/SDL2/ + -L/opt/local/lib + -Wl,-framework,OpenGl + -Wl,-framework,CoreFoundation + -lSDL2 + +[env:simulator_macos_debug] +platform = ${env:simulator_linux_release.platform} +extends = env:simulator_linux_debug +build_flags = ${env:simulator_linux_debug.build_flags} ${simulator_macos.build_flags} -ggdb -Og -D_THREAD_SAFE +build_unflags = ${simulator_macos.build_unflags} + +[env:simulator_macos_release] +platform = ${env:simulator_linux_release.platform} +extends = env:simulator_linux_release +build_flags = ${env:simulator_linux_release.build_flags} ${simulator_macos.build_flags} +build_unflags = ${simulator_macos.build_unflags} + +# +# Simulator for Windows 10 +# +# MSYS2 mingw-w64-x86_64 with these packages: +# pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-glm mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_net +# +[env:simulator_windows] +platform = ${simulator_common.platform} +extends = simulator_common +src_build_flags = ${simulator_common.src_build_flags} -fpermissive +build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp +build_type = debug From 6bc9c09c1fe9957d7f48cf59f12724839c143215 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 22 Jul 2021 01:00:19 +0000 Subject: [PATCH 112/323] [cron] Bump distribution date (2021-07-22) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index bd8473bee353..2daf091d26b6 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-21" +//#define STRING_DISTRIBUTION_DATE "2021-07-22" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index ef569263f783..4f655a7d2927 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-21" + #define STRING_DISTRIBUTION_DATE "2021-07-22" #endif /** From 283d70bfd3149f6f16b088f825851c8ee433182a Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 23 Jul 2021 01:14:46 +0000 Subject: [PATCH 113/323] [cron] Bump distribution date (2021-07-23) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 2daf091d26b6..aad3b0c41fcc 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-22" +//#define STRING_DISTRIBUTION_DATE "2021-07-23" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 4f655a7d2927..368f7b889fe0 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-22" + #define STRING_DISTRIBUTION_DATE "2021-07-23" #endif /** From 2c49283e97f4bb9cac9577af7c38bcf5e0e06826 Mon Sep 17 00:00:00 2001 From: chendo Date: Fri, 23 Jul 2021 13:53:00 +1000 Subject: [PATCH 114/323] =?UTF-8?q?=E2=9C=A8=20D576=20Buffer=20Monitoring?= =?UTF-8?q?=20(#19674)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 8 + Marlin/src/MarlinCore.cpp | 1 + Marlin/src/gcode/gcode.h | 2 + Marlin/src/gcode/gcode_d.cpp | 439 +++++++++++++------------ Marlin/src/gcode/queue.cpp | 75 ++++- Marlin/src/gcode/queue.h | 40 +++ buildroot/tests/STM32F103RET6_creality | 2 +- 7 files changed, 360 insertions(+), 207 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d404d0d19c4b..70346324216c 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -4174,6 +4174,14 @@ // Enable Marlin dev mode which adds some special commands //#define MARLIN_DEV_MODE +#if ENABLED(MARLIN_DEV_MODE) + /** + * D576 - Buffer Monitoring + * To help diagnose print quality issues stemming from empty command buffers. + */ + //#define BUFFER_MONITORING +#endif + /** * Postmortem Debugging captures misbehavior and outputs the CPU status and backtrace to serial. * When running in the debugger it will break for debugging. This is useful to help understand diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 07a6a31b94e3..82ef44f60674 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -868,6 +868,7 @@ void idle(bool no_stepper_sleep/*=false*/) { TERN_(AUTO_REPORT_TEMPERATURES, thermalManager.auto_reporter.tick()); TERN_(AUTO_REPORT_SD_STATUS, card.auto_reporter.tick()); TERN_(AUTO_REPORT_POSITION, position_auto_reporter.tick()); + TERN_(BUFFER_MONITORING, queue.auto_report_buffer_statistics()); } #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 6b9d0eb47d66..769b496f22dd 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -241,6 +241,7 @@ * M553 - Get or set IP netmask. (Requires enabled Ethernet port) * M554 - Get or set IP gateway. (Requires enabled Ethernet port) * M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160) + * M575 - Change the serial baud rate. (Requires BAUD_RATE_GCODE) * M600 - Pause for filament change: "M600 X Y Z E L". (Requires ADVANCED_PAUSE_FEATURE) * M603 - Configure filament change: "M603 T U L". (Requires ADVANCED_PAUSE_FEATURE) * M605 - Set Dual X-Carriage movement mode: "M605 S [X] [R]". (Requires DUAL_X_CARRIAGE) @@ -297,6 +298,7 @@ * M997 - Perform in-application firmware update * M999 - Restart after being stopped by error * D... - Custom Development G-code. Add hooks to 'gcode_D.cpp' for developers to test features. (Requires MARLIN_DEV_MODE) + * D576 - Set buffer monitoring options. (Requires BUFFER_MONITORING) * * "T" Codes * diff --git a/Marlin/src/gcode/gcode_d.cpp b/Marlin/src/gcode/gcode_d.cpp index 52a273964a81..b317a1781548 100644 --- a/Marlin/src/gcode/gcode_d.cpp +++ b/Marlin/src/gcode/gcode_d.cpp @@ -23,248 +23,279 @@ #if ENABLED(MARLIN_DEV_MODE) - #include "gcode.h" - #include "../module/settings.h" - #include "../module/temperature.h" - #include "../libs/hex_print.h" - #include "../HAL/shared/eeprom_if.h" - #include "../HAL/shared/Delay.h" - #include "../sd/cardreader.h" - #include "../MarlinCore.h" // for kill +#include "gcode.h" - extern void dump_delay_accuracy_check(); +#if ENABLED(BUFFER_MONITORING) + #include "queue.h" +#endif - /** - * Dn: G-code for development and testing - * - * See https://reprap.org/wiki/G-code#D:_Debug_codes - * - * Put whatever else you need here to test ongoing development. - */ - void GcodeSuite::D(const int16_t dcode) { - switch (dcode) { +#include "../module/settings.h" +#include "../module/temperature.h" +#include "../libs/hex_print.h" +#include "../HAL/shared/eeprom_if.h" +#include "../HAL/shared/Delay.h" +#include "../sd/cardreader.h" +#include "../MarlinCore.h" // for kill - case -1: - for (;;) { /* loop forever (watchdog reset) */ } +extern void dump_delay_accuracy_check(); - case 0: - HAL_reboot(); - break; +/** + * Dn: G-code for development and testing + * + * See https://reprap.org/wiki/G-code#D:_Debug_codes + * + * Put whatever else you need here to test ongoing development. + */ +void GcodeSuite::D(const int16_t dcode) { + switch (dcode) { - case 10: - kill(PSTR("D10"), PSTR("KILL TEST"), parser.seen_test('P')); - break; + case -1: + for (;;) { /* loop forever (watchdog reset) */ } - case 1: { - // Zero or pattern-fill the EEPROM data - #if ENABLED(EEPROM_SETTINGS) - persistentStore.access_start(); - size_t total = persistentStore.capacity(); - int pos = 0; - const uint8_t value = 0x0; - while (total--) persistentStore.write_data(pos, &value, 1); - persistentStore.access_finish(); - #else - settings.reset(); - settings.save(); - #endif - HAL_reboot(); - } break; + case 0: + HAL_reboot(); + break; - case 2: { // D2 Read / Write SRAM - #define SRAM_SIZE 8192 - uint8_t *pointer = parser.hex_adr_val('A'); - uint16_t len = parser.ushortval('C', 1); - uintptr_t addr = (uintptr_t)pointer; - NOMORE(addr, size_t(SRAM_SIZE - 1)); - NOMORE(len, SRAM_SIZE - addr); - if (parser.seenval('X')) { - // Write the hex bytes after the X - uint16_t val = parser.hex_val('X'); - while (len--) { - *pointer = val; - pointer++; - } - } - else { - while (len--) print_hex_byte(*(pointer++)); - SERIAL_EOL(); - } - } break; + case 10: + kill(PSTR("D10"), PSTR("KILL TEST"), parser.seen_test('P')); + break; + case 1: { + // Zero or pattern-fill the EEPROM data #if ENABLED(EEPROM_SETTINGS) - case 3: { // D3 Read / Write EEPROM - uint8_t *pointer = parser.hex_adr_val('A'); - uint16_t len = parser.ushortval('C', 1); - uintptr_t addr = (uintptr_t)pointer; - NOMORE(addr, size_t(persistentStore.capacity() - 1)); - NOMORE(len, persistentStore.capacity() - addr); - if (parser.seenval('X')) { - uint16_t val = parser.hex_val('X'); - #if ENABLED(EEPROM_SETTINGS) - persistentStore.access_start(); - while (len--) { - int pos = 0; - persistentStore.write_data(pos, (uint8_t *)&val, sizeof(val)); - } - SERIAL_EOL(); - persistentStore.access_finish(); - #else - SERIAL_ECHOLNPGM("NO EEPROM"); - #endif - } - else { - // Read bytes from EEPROM - #if ENABLED(EEPROM_SETTINGS) - persistentStore.access_start(); - int pos = 0; - uint8_t val; - while (len--) if (!persistentStore.read_data(pos, &val, 1)) print_hex_byte(val); - SERIAL_EOL(); - persistentStore.access_finish(); - #else - SERIAL_ECHOLNPGM("NO EEPROM"); - len = 0; - #endif - SERIAL_EOL(); - } - } break; + persistentStore.access_start(); + size_t total = persistentStore.capacity(); + int pos = 0; + const uint8_t value = 0x0; + while (total--) persistentStore.write_data(pos, &value, 1); + persistentStore.access_finish(); + #else + settings.reset(); + settings.save(); #endif + HAL_reboot(); + } break; - case 4: { // D4 Read / Write PIN - //const bool is_out = parser.boolval('F'); - //const uint8_t pin = parser.byteval('P'), - // val = parser.byteval('V', LOW); - if (parser.seenval('X')) { - // TODO: Write the hex bytes after the X - //while (len--) { - //} + case 2: { // D2 Read / Write SRAM + #define SRAM_SIZE 8192 + uint8_t *pointer = parser.hex_adr_val('A'); + uint16_t len = parser.ushortval('C', 1); + uintptr_t addr = (uintptr_t)pointer; + NOMORE(addr, size_t(SRAM_SIZE - 1)); + NOMORE(len, SRAM_SIZE - addr); + if (parser.seenval('X')) { + // Write the hex bytes after the X + uint16_t val = parser.hex_val('X'); + while (len--) { + *pointer = val; + pointer++; } - else { - //while (len--) { - //// TODO: Read bytes from EEPROM - // print_hex_byte(eeprom_read_byte(adr++)); - //} - SERIAL_EOL(); - } - } break; + } + else { + while (len--) print_hex_byte(*(pointer++)); + SERIAL_EOL(); + } + } break; - case 5: { // D5 Read / Write onboard Flash - #define FLASH_SIZE 1024 + #if ENABLED(EEPROM_SETTINGS) + case 3: { // D3 Read / Write EEPROM uint8_t *pointer = parser.hex_adr_val('A'); uint16_t len = parser.ushortval('C', 1); uintptr_t addr = (uintptr_t)pointer; - NOMORE(addr, size_t(FLASH_SIZE - 1)); - NOMORE(len, FLASH_SIZE - addr); + NOMORE(addr, size_t(persistentStore.capacity() - 1)); + NOMORE(len, persistentStore.capacity() - addr); if (parser.seenval('X')) { - // TODO: Write the hex bytes after the X - //while (len--) {} + uint16_t val = parser.hex_val('X'); + #if ENABLED(EEPROM_SETTINGS) + persistentStore.access_start(); + while (len--) { + int pos = 0; + persistentStore.write_data(pos, (uint8_t *)&val, sizeof(val)); + } + SERIAL_EOL(); + persistentStore.access_finish(); + #else + SERIAL_ECHOLNPGM("NO EEPROM"); + #endif } else { - //while (len--) { - //// TODO: Read bytes from EEPROM - // print_hex_byte(eeprom_read_byte(adr++)); - //} + // Read bytes from EEPROM + #if ENABLED(EEPROM_SETTINGS) + persistentStore.access_start(); + int pos = 0; + uint8_t val; + while (len--) if (!persistentStore.read_data(pos, &val, 1)) print_hex_byte(val); + SERIAL_EOL(); + persistentStore.access_finish(); + #else + SERIAL_ECHOLNPGM("NO EEPROM"); + len = 0; + #endif SERIAL_EOL(); } } break; + #endif - case 6: // D6 Check delay loop accuracy - dump_delay_accuracy_check(); - break; + case 4: { // D4 Read / Write PIN + //const bool is_out = parser.boolval('F'); + //const uint8_t pin = parser.byteval('P'), + // val = parser.byteval('V', LOW); + if (parser.seenval('X')) { + // TODO: Write the hex bytes after the X + //while (len--) { + //} + } + else { + //while (len--) { + //// TODO: Read bytes from EEPROM + // print_hex_byte(eeprom_read_byte(adr++)); + //} + SERIAL_EOL(); + } + } break; - case 7: // D7 dump the current serial port type (hence configuration) - SERIAL_ECHOLNPAIR("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE); - SERIAL_ECHOLN(gtn(&SERIAL_IMPL)); - break; + case 5: { // D5 Read / Write onboard Flash + #define FLASH_SIZE 1024 + uint8_t *pointer = parser.hex_adr_val('A'); + uint16_t len = parser.ushortval('C', 1); + uintptr_t addr = (uintptr_t)pointer; + NOMORE(addr, size_t(FLASH_SIZE - 1)); + NOMORE(len, FLASH_SIZE - addr); + if (parser.seenval('X')) { + // TODO: Write the hex bytes after the X + //while (len--) {} + } + else { + //while (len--) { + //// TODO: Read bytes from EEPROM + // print_hex_byte(eeprom_read_byte(adr++)); + //} + SERIAL_EOL(); + } + } break; - case 100: { // D100 Disable heaters and attempt a hard hang (Watchdog Test) - SERIAL_ECHOLNPGM("Disabling heaters and attempting to trigger Watchdog"); - SERIAL_ECHOLNPGM("(USE_WATCHDOG " TERN(USE_WATCHDOG, "ENABLED", "DISABLED") ")"); - thermalManager.disable_all_heaters(); - delay(1000); // Allow time to print - DISABLE_ISRS(); - // Use a low-level delay that does not rely on interrupts to function - // Do not spin forever, to avoid thermal risks if heaters are enabled and - // watchdog does not work. - for (int i = 10000; i--;) DELAY_US(1000UL); - ENABLE_ISRS(); - SERIAL_ECHOLNPGM("FAILURE: Watchdog did not trigger board reset."); - } break; + case 6: // D6 Check delay loop accuracy + dump_delay_accuracy_check(); + break; - #if ENABLED(SDSUPPORT) + case 7: // D7 dump the current serial port type (hence configuration) + SERIAL_ECHOLNPAIR("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE); + SERIAL_ECHOLN(gtn(&SERIAL_IMPL)); + break; - case 101: { // D101 Test SD Write - card.openFileWrite("test.gco"); - if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open test.gco to write."); - return; - } - __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; + case 100: { // D100 Disable heaters and attempt a hard hang (Watchdog Test) + SERIAL_ECHOLNPGM("Disabling heaters and attempting to trigger Watchdog"); + SERIAL_ECHOLNPGM("(USE_WATCHDOG " TERN(USE_WATCHDOG, "ENABLED", "DISABLED") ")"); + thermalManager.disable_all_heaters(); + delay(1000); // Allow time to print + DISABLE_ISRS(); + // Use a low-level delay that does not rely on interrupts to function + // Do not spin forever, to avoid thermal risks if heaters are enabled and + // watchdog does not work. + for (int i = 10000; i--;) DELAY_US(1000UL); + ENABLE_ISRS(); + SERIAL_ECHOLNPGM("FAILURE: Watchdog did not trigger board reset."); + } break; - uint16_t c; - for (c = 0; c < COUNT(buf); c++) - buf[c] = 'A' + (c % ('Z' - 'A')); + #if ENABLED(SDSUPPORT) - c = 1024 * 4; - while (c--) { - TERN_(USE_WATCHDOG, watchdog_refresh()); - card.write(buf, COUNT(buf)); - } - SERIAL_ECHOLNPGM(" done"); - card.closefile(); - } break; + case 101: { // D101 Test SD Write + card.openFileWrite("test.gco"); + if (!card.isFileOpen()) { + SERIAL_ECHOLNPAIR("Failed to open test.gco to write."); + return; + } + __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; - case 102: { // D102 Test SD Read - char testfile[] = "test.gco"; - card.openFileRead(testfile); - if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open test.gco to read."); - return; - } - __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; - uint16_t c = 1024 * 4; - while (c--) { - TERN_(USE_WATCHDOG, watchdog_refresh()); - card.read(buf, COUNT(buf)); - bool error = false; - for (uint16_t i = 0; i < COUNT(buf); i++) { - if (buf[i] != ('A' + (i % ('Z' - 'A')))) { - error = true; - break; - } - } - if (error) { - SERIAL_ECHOLNPGM(" Read error!"); + uint16_t c; + for (c = 0; c < COUNT(buf); c++) + buf[c] = 'A' + (c % ('Z' - 'A')); + + c = 1024 * 4; + while (c--) { + TERN_(USE_WATCHDOG, watchdog_refresh()); + card.write(buf, COUNT(buf)); + } + SERIAL_ECHOLNPGM(" done"); + card.closefile(); + } break; + + case 102: { // D102 Test SD Read + char testfile[] = "test.gco"; + card.openFileRead(testfile); + if (!card.isFileOpen()) { + SERIAL_ECHOLNPAIR("Failed to open test.gco to read."); + return; + } + __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; + uint16_t c = 1024 * 4; + while (c--) { + TERN_(USE_WATCHDOG, watchdog_refresh()); + card.read(buf, COUNT(buf)); + bool error = false; + for (uint16_t i = 0; i < COUNT(buf); i++) { + if (buf[i] != ('A' + (i % ('Z' - 'A')))) { + error = true; break; } } - SERIAL_ECHOLNPGM(" done"); - card.closefile(); - } break; + if (error) { + SERIAL_ECHOLNPGM(" Read error!"); + break; + } + } + SERIAL_ECHOLNPGM(" done"); + card.closefile(); + } break; - #endif // SDSUPPORT + #endif // SDSUPPORT - #if ENABLED(POSTMORTEM_DEBUGGING) + #if ENABLED(POSTMORTEM_DEBUGGING) - case 451: { // Trigger all kind of faults to test exception catcher - SERIAL_ECHOLNPGM("Disabling heaters"); - thermalManager.disable_all_heaters(); - delay(1000); // Allow time to print - volatile uint8_t type[5] = { parser.byteval('T', 1) }; + case 451: { // Trigger all kind of faults to test exception catcher + SERIAL_ECHOLNPGM("Disabling heaters"); + thermalManager.disable_all_heaters(); + delay(1000); // Allow time to print + volatile uint8_t type[5] = { parser.byteval('T', 1) }; - // The code below is obviously wrong and it's full of quirks to fool the compiler from optimizing away the code - switch (type[0]) { - case 1: default: *(int*)0 = 451; break; // Write at bad address - case 2: { volatile int a = 0; volatile int b = 452 / a; *(int*)&a = b; } break; // Divide by zero (some CPUs accept this, like ARM) - case 3: { *(uint32_t*)&type[1] = 453; volatile int a = *(int*)&type[1]; type[0] = a / 255; } break; // Unaligned access (some CPUs accept this) - case 4: { volatile void (*func)() = (volatile void (*)()) 0xE0000000; func(); } break; // Invalid instruction - } - break; + // The code below is obviously wrong and it's full of quirks to fool the compiler from optimizing away the code + switch (type[0]) { + case 1: default: *(int*)0 = 451; break; // Write at bad address + case 2: { volatile int a = 0; volatile int b = 452 / a; *(int*)&a = b; } break; // Divide by zero (some CPUs accept this, like ARM) + case 3: { *(uint32_t*)&type[1] = 453; volatile int a = *(int*)&type[1]; type[0] = a / 255; } break; // Unaligned access (some CPUs accept this) + case 4: { volatile void (*func)() = (volatile void (*)()) 0xE0000000; func(); } break; // Invalid instruction } + break; + } - #endif - } + #endif + + #if ENABLED(BUFFER_MONITORING) + + /** + * D576: Return buffer stats or set the auto-report interval. + * Usage: D576 [S] + * + * With no parameters emits the following output: + * "D576 P B PU PD BU BD" + * Where: + * P : Planner buffers free + * B : Command buffers free + * PU: Planner buffer underruns (since the last report) + * PD: Longest duration (ms) the planner buffer was empty (since the last report) + * BU: Command buffer underruns (since the last report) + * BD: Longest duration (ms) command buffer was empty (since the last report) + */ + case 576: { + if (parser.seenval('S')) + queue.set_auto_report_interval((uint8_t)parser.value_byte()); + else + queue.report_buffer_statistics(); + break; + } + + #endif // BUFFER_MONITORING } +} -#endif +#endif // MARLIN_DEV_MODE diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 09755fbf21a8..fa83c82ddc87 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -67,6 +67,23 @@ GCodeQueue::RingBuffer GCodeQueue::ring_buffer = { 0 }; static millis_t last_command_time = 0; #endif +/** + * Track buffer underruns + */ +#if ENABLED(BUFFER_MONITORING) + uint32_t GCodeQueue::command_buffer_underruns = 0, + GCodeQueue::planner_buffer_underruns = 0; + bool GCodeQueue::command_buffer_empty = false, + GCodeQueue::planner_buffer_empty = false; + millis_t GCodeQueue::max_command_buffer_empty_duration = 0, + GCodeQueue::max_planner_buffer_empty_duration = 0, + GCodeQueue::command_buffer_empty_at = 0, + GCodeQueue::planner_buffer_empty_at = 0; + + uint8_t GCodeQueue::auto_buffer_report_interval; + millis_t GCodeQueue::next_buffer_report_ms; +#endif + /** * Serial command injection */ @@ -82,7 +99,6 @@ PGM_P GCodeQueue::injected_commands_P; // = nullptr */ char GCodeQueue::injected_commands[64]; // = { 0 } - void GCodeQueue::RingBuffer::commit_command(bool skip_ok OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind/*=-1*/) ) { @@ -621,7 +637,24 @@ void GCodeQueue::advance() { if (process_injected_command_P() || process_injected_command()) return; // Return if the G-code buffer is empty - if (ring_buffer.empty()) return; + if (ring_buffer.empty()) { + #if ENABLED(BUFFER_MONITORING) + if (!command_buffer_empty) { + command_buffer_empty = true; + command_buffer_underruns++; + command_buffer_empty_at = millis(); + } + #endif + return; + } + + #if ENABLED(BUFFER_MONITORING) + if (command_buffer_empty) { + command_buffer_empty = false; + const millis_t command_buffer_empty_duration = millis() - command_buffer_empty_at; + NOLESS(max_command_buffer_empty_duration, command_buffer_empty_duration); + } + #endif #if ENABLED(SDSUPPORT) @@ -664,3 +697,41 @@ void GCodeQueue::advance() { // The queue may be reset by a command handler or by code invoked by idle() within a handler ring_buffer.advance_pos(ring_buffer.index_r, -1); } + +#if ENABLED(BUFFER_MONITORING) + + void GCodeQueue::report_buffer_statistics() { + SERIAL_ECHOLNPAIR("D576" + " P:", planner.moves_free(), " ", -queue.planner_buffer_underruns, " (", queue.max_planner_buffer_empty_duration, ")" + " B:", BUFSIZE - ring_buffer.length, " ", -queue.command_buffer_underruns, " (", queue.max_command_buffer_empty_duration, ")" + ); + command_buffer_underruns = planner_buffer_underruns = 0; + max_command_buffer_empty_duration = max_planner_buffer_empty_duration = 0; + } + + void GCodeQueue::auto_report_buffer_statistics() { + // Bit of a hack to try to catch planner buffer underruns without having logic + // running inside Stepper::block_phase_isr + const millis_t ms = millis(); + if (planner.movesplanned() == 0) { + if (!planner_buffer_empty) { // the planner buffer wasn't empty, but now it is + planner_buffer_empty = true; + planner_buffer_underruns++; + planner_buffer_empty_at = ms; + } + } + else if (planner_buffer_empty) { // the planner buffer was empty, but now it's not + planner_buffer_empty = false; + const millis_t planner_buffer_empty_duration = ms - planner_buffer_empty_at; + NOLESS(max_planner_buffer_empty_duration, planner_buffer_empty_duration); // if it's longer than the currently tracked max duration, replace it + } + + if (queue.auto_buffer_report_interval && ELAPSED(ms, queue.next_buffer_report_ms)) { + queue.next_buffer_report_ms = ms + 1000UL * queue.auto_buffer_report_interval; + PORT_REDIRECT(SERIAL_BOTH); + report_buffer_statistics(); + PORT_RESTORE(); + } + } + +#endif // BUFFER_MONITORING diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index 3474a402c38d..6bcf4a97e4be 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -197,6 +197,46 @@ class GCodeQueue { */ static inline void set_current_line_number(long n) { serial_state[ring_buffer.command_port().index].last_N = n; } + #if ENABLED(BUFFER_MONITORING) + + private: + + /** + * Track buffer underruns + */ + static uint32_t command_buffer_underruns, planner_buffer_underruns; + static bool command_buffer_empty, planner_buffer_empty; + static millis_t max_command_buffer_empty_duration, max_planner_buffer_empty_duration, + command_buffer_empty_at, planner_buffer_empty_at; + + /** + * Report buffer statistics to the host to be able to detect buffer underruns + * + * Returns "D576 " followed by: + * P Planner space remaining + * B Command buffer space remaining + * PU Number of planner buffer underruns since last report + * PD Max time in ms the planner buffer was empty since last report + * BU Number of command buffer underruns since last report + * BD Max time in ms the command buffer was empty since last report + */ + static void report_buffer_statistics(); + + static uint8_t auto_buffer_report_interval; + static millis_t next_buffer_report_ms; + + public: + + static void auto_report_buffer_statistics(); + + static inline void set_auto_report_interval(uint8_t v) { + NOMORE(v, 60); + auto_buffer_report_interval = v; + next_buffer_report_ms = millis() + 1000UL * v; + } + + #endif // BUFFER_MONITORING + private: static void get_serial_commands(); diff --git a/buildroot/tests/STM32F103RET6_creality b/buildroot/tests/STM32F103RET6_creality index a3f885147e6e..8348b6347df0 100755 --- a/buildroot/tests/STM32F103RET6_creality +++ b/buildroot/tests/STM32F103RET6_creality @@ -10,7 +10,7 @@ set -e # Build with configs included in the PR # use_example_configs "Creality/Ender-3 V2" -opt_enable MARLIN_DEV_MODE +opt_enable MARLIN_DEV_MODE BUFFER_MONITORING exec_test $1 $2 "Ender 3 v2" "$3" use_example_configs "Creality/Ender-3 V2" From 78be63b8a4ee91acab29888c8b1455917c170cce Mon Sep 17 00:00:00 2001 From: tome9111991 <57866234+tome9111991@users.noreply.github.com> Date: Fri, 23 Jul 2021 23:47:38 +0200 Subject: [PATCH 115/323] =?UTF-8?q?=F0=9F=93=9D=20SKR=20E3=20Turbo=20custo?= =?UTF-8?q?m=20cable=20description=20(#22426)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index e99c15e70e99..f37028f15a65 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -182,13 +182,13 @@ #endif /** - * _____ - * 5V | 1 2 | GND - * (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) - * (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) - * RESET | 7 8 | P0_19 (BTN_EN1) - * (BTN_ENC) P0_16 | 9 10| P2_08 (BEEPER) - * ----- + * ______ + * 5V | 1 2 | GND + * (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) + * (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) + * RESET | 7 8 | P0_19 (BTN_EN1) + * (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER) + * ------ * EXP */ @@ -204,6 +204,17 @@ #if ENABLED(DWIN_CREALITY_LCD) #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue." + /** + * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo + * ______ ______ RX 8 --> 5 P0_15 + * 5V | 1 2 | GND 5V | 1 2 | GND TX 7 --> 9 P0_16 + * (BTN_E1) A | 3 4 | B (BTN_E2) (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) BEEPER 5 --> 10 P2_08 + * BEEPER | 5 6 ENT (BTN_ENC) (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) + * (SKR_RX1) TX | 7 8 | RX (SKR_TX1) Reset | 7 8 | P0_19 (BTN_EN1) + * NC | 9 10 | NC (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER) + * ------ ------ + */ + #define BEEPER_PIN EXP1_10_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_04_PIN From b925130db13409ba1ee671dea151c81990668d8b Mon Sep 17 00:00:00 2001 From: Marcio T Date: Fri, 23 Jul 2021 16:02:39 -0600 Subject: [PATCH 116/323] =?UTF-8?q?=F0=9F=93=BA=20Fix=20and=20optimize=20F?= =?UTF-8?q?TDI=20Eve=20Touch=20Interface=20(#22427)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/basic/commands.cpp | 26 ++++++++-- .../ftdi_eve_lib/basic/commands.h | 1 + .../ftdi_eve_lib/extended/text_box.cpp | 50 +++++++++---------- .../ftdi_eve_lib/extended/unicode/unicode.cpp | 17 ++++--- .../ftdi_eve_lib/extended/unicode/unicode.h | 4 +- .../generic/about_screen.cpp | 10 ++-- .../confirm_user_request_alert_box.cpp | 9 +--- .../generic/confirm_user_request_alert_box.h | 1 - 8 files changed, 66 insertions(+), 52 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp index 47ce1c700d19..48d60a37ac58 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp @@ -902,6 +902,7 @@ bool CLCD::CommandFifo::has_fault() { } #if FTDI_API_LEVEL == 800 + void CLCD::CommandFifo::start() { if (command_write_ptr == 0xFFFFFFFFul) { command_write_ptr = mem_read_32(REG::CMD_WRITE) & 0x0FFF; @@ -979,12 +980,13 @@ template bool CLCD::CommandFifo::_write_unaligned(T data, uint16_t len template bool CLCD::CommandFifo::write(T data, uint16_t len) { const uint8_t padding = MULTIPLE_OF_4(len) - len; - - uint8_t pad_bytes[] = {0, 0, 0, 0}; + const uint8_t pad_bytes[] = { 0, 0, 0, 0 }; return _write_unaligned(data, len) && _write_unaligned(pad_bytes, padding); } -#else + +#else // FTDI_API_LEVEL != 800 ... + void CLCD::CommandFifo::start() { } @@ -1042,13 +1044,29 @@ template bool CLCD::CommandFifo::write(T data, uint16_t len) { mem_write_bulk(REG::CMDB_WRITE, data, len, padding); return true; } -#endif + +#endif // ... FTDI_API_LEVEL != 800 template bool CLCD::CommandFifo::write(const void*, uint16_t); template bool CLCD::CommandFifo::write(progmem_str, uint16_t); // CO_PROCESSOR COMMANDS +void CLCD::CommandFifo::str(const char * data, size_t maxlen) { + // Write the string without the terminating '\0' + const size_t len = strnlen(data, maxlen); + write(data, len); + + // If padding was added by the previous write, then + // the string is terminated. Otherwise write four + // more zeros. + const uint8_t padding = MULTIPLE_OF_4(len) - len; + if (padding == 0) { + const uint8_t pad_bytes[] = {0, 0, 0, 0}; + write(pad_bytes, 4); + } +} + void CLCD::CommandFifo::str(const char * data) { write(data, strlen(data)+1); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h index eea24b06bdc4..5ce628fd36dc 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h @@ -248,6 +248,7 @@ class CLCD::CommandFifo { void keys (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t options); // Sends the string portion of text, button, toggle and keys. + void str (const char * data, size_t maxlen); void str (const char * data); void str (progmem_str data); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp index f3f518359c30..0701e7d68251 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp @@ -29,31 +29,31 @@ namespace FTDI { * be broken so that the display width is less than w. The line will also * be broken after a '\n'. Returns the display width of the line. */ - static uint16_t find_line_break(const FontMetrics &utf8_fm, const CLCD::FontMetrics &clcd_fm, const uint16_t w, const char *str, const char *&end, bool use_utf8) { - const char *p = str; - end = str; + static uint16_t find_line_break(const FontMetrics &utf8_fm, const CLCD::FontMetrics &clcd_fm, const uint16_t w, const char *start, const char *&end, bool use_utf8) { + const char *p = start; + end = start; uint16_t lw = 0, result = 0; for (;;) { const char *next = p; - utf8_char_t c = get_utf8_char_and_inc(next); + const utf8_char_t c = get_utf8_char_and_inc(next); // Decide whether to break the string at this location if (c == '\n' || c == '\0' || c == ' ') { end = p; result = lw; } if (c == '\n' || c == '\0') break; - // Now add the length of the current character to the tally. - lw += use_utf8 ? utf8_fm.get_char_width(c) : clcd_fm.char_widths[(uint8_t)c]; + // Measure the next character + const uint16_t cw = use_utf8 ? utf8_fm.get_char_width(c) : clcd_fm.char_widths[(uint8_t)c]; // Stop processing once string exceeds the display width - if (lw >= w) { - if (end == str) { - end = p; - result = lw; - } - break; - } + if (lw + cw > w) break; + // Now add the length of the current character to the tally. + lw += cw; p = next; } + if (end == start) { + end = p; + result = lw; + } return result; } @@ -66,12 +66,13 @@ namespace FTDI { const uint16_t wrap_width = width; width = height = 0; for (;;) { - uint16_t line_width = find_line_break(utf8_fm, clcd_fm, wrap_width, line_start, line_end, use_utf8); + const uint16_t line_width = find_line_break(utf8_fm, clcd_fm, wrap_width, line_start, line_end, use_utf8); + if (line_end == line_start) break; width = max(width, line_width); height += utf8_fm.get_height(); line_start = line_end; - if (line_start[0] == '\n' || line_start[0] == ' ') line_start++; - if (line_start[0] == '\0') break; + if (*line_start == '\n' || *line_start == ' ') line_start++; + if (*line_start == '\0') break; } } @@ -108,28 +109,25 @@ namespace FTDI { const char *line_start = str, *line_end; for (;;) { find_line_break(utf8_fm, clcd_fm, w, line_start, line_end, use_utf8); + if (line_end == line_start) break; const size_t line_len = line_end - line_start; if (line_len) { - char line[line_len + 1]; - strncpy(line, line_start, line_len); - line[line_len] = 0; - #if ENABLED(TOUCH_UI_USE_UTF8) - if (use_utf8) { - draw_utf8_text(cmd, x + dx, y + dy, line, utf8_fm.fs, options & ~(OPT_CENTERY | OPT_BOTTOMY)); - } else + if (use_utf8) + draw_utf8_text(cmd, x + dx, y + dy, line_start, utf8_fm.fs, options & ~(OPT_CENTERY | OPT_BOTTOMY), line_len); + else #endif { cmd.CLCD::CommandFifo::text(x + dx, y + dy, font, options & ~(OPT_CENTERY | OPT_BOTTOMY)); - cmd.CLCD::CommandFifo::str(line); + cmd.CLCD::CommandFifo::str(line_start, line_len); } } y += utf8_fm.get_height(); line_start = line_end; - if (line_start[0] == '\n' || line_start[0] == ' ') line_start++; - if (line_start[0] == '\0') break; + if (*line_start == '\n' || *line_start == ' ') line_start++; + if (*line_start == '\0') break; } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp index 55dd496e1c9c..2bb44e81d0b4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp @@ -95,9 +95,9 @@ * fs - A scaling object used to specify the font size. */ - static uint16_t render_utf8_text(CommandProcessor* cmd, int x, int y, const char *str, font_size_t fs) { + static uint16_t render_utf8_text(CommandProcessor* cmd, int x, int y, const char *str, font_size_t fs, size_t maxlen=SIZE_MAX) { const int start_x = x; - while (*str) { + while (*str && maxlen--) { const utf8_char_t c = get_utf8_char_and_inc(str); #ifdef TOUCH_UI_UTF8_CYRILLIC_CHARSET CyrillicCharSet::render_glyph(cmd, x, y, fs, c) || @@ -185,8 +185,8 @@ * Returns: A width in pixels */ - uint16_t FTDI::get_utf8_text_width(const char *str, font_size_t fs) { - return render_utf8_text(nullptr, 0, 0, str, fs); + uint16_t FTDI::get_utf8_text_width(const char *str, font_size_t fs, size_t maxlen) { + return render_utf8_text(nullptr, 0, 0, str, fs, maxlen); } uint16_t FTDI::get_utf8_text_width(progmem_str pstr, font_size_t fs) { @@ -210,9 +210,10 @@ * * options - Text alignment options (i.e. OPT_CENTERX, OPT_CENTERY, OPT_CENTER or OPT_RIGHTX) * + * maxlen - Maximum characters to draw */ - void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, const char *str, font_size_t fs, uint16_t options) { + void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, const char *str, font_size_t fs, uint16_t options, size_t maxlen) { cmd.cmd(SAVE_CONTEXT()); cmd.cmd(BITMAP_TRANSFORM_A(fs.get_coefficient())); cmd.cmd(BITMAP_TRANSFORM_E(fs.get_coefficient())); @@ -220,14 +221,14 @@ // Apply alignment options if (options & OPT_CENTERX) - x -= get_utf8_text_width(str, fs) / 2; + x -= get_utf8_text_width(str, fs, maxlen) / 2; else if (options & OPT_RIGHTX) - x -= get_utf8_text_width(str, fs); + x -= get_utf8_text_width(str, fs, maxlen); if (options & OPT_CENTERY) y -= fs.get_height()/2; // Render the text - render_utf8_text(&cmd, x, y, str, fs); + render_utf8_text(&cmd, x, y, str, fs, maxlen); cmd.cmd(RESTORE_CONTEXT()); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h index 5bb87d96843c..3ca6dfd563ea 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h @@ -67,10 +67,10 @@ namespace FTDI { uint16_t get_utf8_char_width(utf8_char_t, font_size_t); uint16_t get_utf8_text_width(progmem_str, font_size_t); - uint16_t get_utf8_text_width(const char *, font_size_t); + uint16_t get_utf8_text_width(const char *, font_size_t, size_t maxlen=SIZE_MAX); void draw_utf8_text(CommandProcessor&, int x, int y, progmem_str, font_size_t, uint16_t options = 0); - void draw_utf8_text(CommandProcessor&, int x, int y, const char *, font_size_t, uint16_t options = 0); + void draw_utf8_text(CommandProcessor&, int x, int y, const char *, font_size_t, uint16_t options = 0, size_t maxlen=SIZE_MAX); // Similar to CLCD::FontMetrics, but can be used with UTF8 encoded strings. diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp index 3e07735edf55..d2aec0baf77c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp @@ -76,7 +76,9 @@ void AboutScreen::onRedraw(draw_mode_t) { #endif , OPT_CENTER, font_xlarge ); - cmd.tag(3); + #if BOTH(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) + cmd.tag(3); + #endif draw_text_box(cmd, FW_VERS_POS, #ifdef TOUCH_UI_VERSION F(TOUCH_UI_VERSION) @@ -89,7 +91,7 @@ void AboutScreen::onRedraw(draw_mode_t) { draw_text_box(cmd, LICENSE_POS, GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); cmd.font(font_medium); - #if ENABLED(PRINTCOUNTER) && defined(FTDI_STATISTICS_SCREEN) + #if BOTH(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) cmd.colors(normal_btn) .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU)); #endif @@ -100,10 +102,10 @@ void AboutScreen::onRedraw(draw_mode_t) { bool AboutScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; - #if ENABLED(PRINTCOUNTER) && defined(FTDI_STATISTICS_SCREEN) + #if BOTH(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) case 2: GOTO_SCREEN(StatisticsScreen); break; #endif - #if ENABLED(TOUCH_UI_DEVELOPER_MENU) && defined(FTDI_DEVELOPER_MENU) + #if BOTH(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) case 3: GOTO_SCREEN(DeveloperMenu); break; #endif default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp index c10d37274389..8c06fa9a9e0e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp @@ -53,17 +53,12 @@ bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) { } } -void ConfirmUserRequestAlertBox::onIdle() { - if (!ExtUI::awaitingUserConfirm()) { - hide(); - } -} - void ConfirmUserRequestAlertBox::show(const char *msg) { drawMessage(msg); storeBackground(); screen_data.AlertDialogBox.isError = false; - GOTO_SCREEN(ConfirmUserRequestAlertBox); + if (!AT_SCREEN(ConfirmUserRequestAlertBox)) + GOTO_SCREEN(ConfirmUserRequestAlertBox); } void ConfirmUserRequestAlertBox::hide() { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h index d9a6c4a4fe35..f83b1a24f5d5 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h @@ -31,5 +31,4 @@ class ConfirmUserRequestAlertBox : public AlertDialogBox { static bool onTouchEnd(uint8_t); static void hide(); static void show(const char*); - static void onIdle(); }; From c56109c7a484fda3daada3e49f77aae8cdfdd80f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 24 Jul 2021 05:00:51 +0000 Subject: [PATCH 117/323] [cron] Bump distribution date (2021-07-24) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index aad3b0c41fcc..384c20981647 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-23" +//#define STRING_DISTRIBUTION_DATE "2021-07-24" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 368f7b889fe0..3c22da21d135 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-23" + #define STRING_DISTRIBUTION_DATE "2021-07-24" #endif /** From 27f5e64acf0a8b087c899db677618785028bb06f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Jul 2021 15:55:45 -0500 Subject: [PATCH 118/323] =?UTF-8?q?=F0=9F=8E=A8=20NULL=20=3D>=20nullptr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp | 4 ++-- Marlin/src/HAL/STM32F1/SPI.h | 4 ++-- .../src/lcd/extui/mks_ui/draw_cloud_bind.cpp | 18 +++++++++--------- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 4 ++-- .../src/lcd/extui/mks_ui/draw_move_motor.cpp | 6 +++--- Marlin/src/lcd/tft/tft_queue.h | 2 +- Marlin/src/lcd/tft/touch.h | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp index 05f859a4af5c..55e807f94ee0 100644 --- a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp +++ b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp @@ -290,13 +290,13 @@ static bool SDIO_ReadWriteBlock_DMA(uint32_t block, const uint8_t *src, uint8_t bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) { uint8_t retries = SDIO_READ_RETRIES; - while (retries--) if (SDIO_ReadWriteBlock_DMA(block, NULL, dst)) return true; + while (retries--) if (SDIO_ReadWriteBlock_DMA(block, nullptr, dst)) return true; return false; } bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { uint8_t retries = SDIO_READ_RETRIES; - while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, NULL)) return true; + while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, nullptr)) return true; return false; } diff --git a/Marlin/src/HAL/STM32F1/SPI.h b/Marlin/src/HAL/STM32F1/SPI.h index 828644f1ddb5..2467432e0718 100644 --- a/Marlin/src/HAL/STM32F1/SPI.h +++ b/Marlin/src/HAL/STM32F1/SPI.h @@ -138,8 +138,8 @@ class SPISettings { spi_dev *spi_d; dma_channel spiRxDmaChannel, spiTxDmaChannel; dma_dev* spiDmaDev; - void (*receiveCallback)() = NULL; - void (*transmitCallback)() = NULL; + void (*receiveCallback)() = nullptr; + void (*transmitCallback)() = nullptr; friend class SPIClass; }; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp index 55cfe4491d49..56b0e8f5caf6 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp @@ -33,8 +33,8 @@ extern lv_group_t * g; static lv_obj_t * scr; -static lv_obj_t *button_bind_or_not = NULL, *label_bind_or_not = NULL; -static lv_obj_t *buttonReleaseBind = NULL, *label_ReleaseBind = NULL; +static lv_obj_t *button_bind_or_not = nullptr, *label_bind_or_not = nullptr; +static lv_obj_t *buttonReleaseBind = nullptr, *label_ReleaseBind = nullptr; static lv_obj_t * text_id; static uint8_t unbinding_flag = 0; @@ -61,29 +61,29 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) { } void lv_draw_cloud_bind() { - lv_obj_t *buttonBack = NULL, *label_Back = NULL; + lv_obj_t *buttonBack = nullptr, *label_Back = nullptr; scr = lv_screen_create(BIND_UI); - button_bind_or_not = lv_btn_create(scr, NULL); + button_bind_or_not = lv_btn_create(scr, nullptr); lv_obj_set_pos(button_bind_or_not, TFT_WIDTH - 130, TFT_HEIGHT - 80 * 3); lv_obj_set_size(button_bind_or_not, PARA_UI_VALUE_BTN_X_SIZE + 15, PARA_UI_VALUE_BTN_Y_SIZE + 15); - lv_obj_set_event_cb_mks(button_bind_or_not, event_handler, ID_CLOUD_BIND_OR_NOT, NULL, 0); + lv_obj_set_event_cb_mks(button_bind_or_not, event_handler, ID_CLOUD_BIND_OR_NOT, nullptr, 0); lv_btn_set_style(button_bind_or_not, LV_BTN_STYLE_REL, &style_para_value); lv_btn_set_style(button_bind_or_not, LV_BTN_STYLE_PR, &style_para_value); label_bind_or_not = lv_label_create_empty(button_bind_or_not); - buttonReleaseBind = lv_btn_create(scr, NULL); + buttonReleaseBind = lv_btn_create(scr, nullptr); lv_obj_set_pos(buttonReleaseBind, TFT_WIDTH - 130, TFT_HEIGHT - 80 * 2); lv_obj_set_size(buttonReleaseBind, PARA_UI_VALUE_BTN_X_SIZE + 15, PARA_UI_VALUE_BTN_Y_SIZE + 15); - lv_obj_set_event_cb_mks(buttonReleaseBind, event_handler, ID_CLOUD_RELEASE_BIND, NULL, 0); + lv_obj_set_event_cb_mks(buttonReleaseBind, event_handler, ID_CLOUD_RELEASE_BIND, nullptr, 0); label_ReleaseBind = lv_label_create_empty(buttonReleaseBind); lv_label_set_text(label_ReleaseBind, cloud_menu.unbind); lv_obj_align(label_ReleaseBind, buttonReleaseBind, LV_ALIGN_CENTER, 0, 0); - buttonBack = lv_btn_create(scr, NULL); + buttonBack = lv_btn_create(scr, nullptr); lv_obj_set_pos(buttonBack, TFT_WIDTH - 130, TFT_HEIGHT - 80); lv_obj_set_size(buttonBack, PARA_UI_VALUE_BTN_X_SIZE + 15, PARA_UI_VALUE_BTN_Y_SIZE + 15); - lv_obj_set_event_cb_mks(buttonBack, event_handler, ID_CLOUD_BIND_RETURN, NULL, 0); + lv_obj_set_event_cb_mks(buttonBack, event_handler, ID_CLOUD_BIND_RETURN, nullptr, 0); lv_btn_set_style(buttonBack, LV_BTN_STYLE_REL, &style_para_back); lv_btn_set_style(buttonBack, LV_BTN_STYLE_PR, &style_para_back); label_Back = lv_label_create_empty(buttonBack); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index 3f2cd32c7377..44cee6cb603c 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -431,7 +431,7 @@ void lv_draw_dialog(uint8_t type) { } else if (DIALOG_IS(TYPE_UPDATE_ESP_FIRMWARE)) { lv_label_set_text(labelDialog, DIALOG_UPDATE_WIFI_FIRMWARE_EN); - lv_obj_align(labelDialog, NULL, LV_ALIGN_CENTER, 0, -20); + lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } #endif // MKS_WIFI_MODULE else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT)) { @@ -469,7 +469,7 @@ void lv_draw_dialog(uint8_t type) { #if ENABLED(MKS_WIFI_MODULE) else if (DIALOG_IS(TYPE_UNBIND)) { lv_label_set_text(labelDialog, common_menu.unbind_printer_tips); - lv_obj_align(labelDialog, NULL, LV_ALIGN_CENTER, 0, -70); + lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -70); } #endif #if HAS_ROTARY_ENCODER diff --git a/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp index 4b413c5c6214..19abb855f544 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp @@ -119,10 +119,10 @@ void lv_draw_move_motor() { lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_M_RETURN); // We need to patch the title to leave some space on the right for displaying the status - lv_obj_t * title = lv_obj_get_child_back(scr, NULL); - if (title != NULL) lv_obj_set_width(title, TFT_WIDTH - 101); + lv_obj_t * title = lv_obj_get_child_back(scr, nullptr); + if (title != nullptr) lv_obj_set_width(title, TFT_WIDTH - 101); labelP = lv_label_create(scr, TFT_WIDTH - 100, TITLE_YPOS, "Z:0.0mm"); - if (labelP != NULL) + if (labelP != nullptr) updatePosTask = lv_task_create(refresh_pos, 300, LV_TASK_PRIO_LOWEST, 0); disp_move_dist(); diff --git a/Marlin/src/lcd/tft/tft_queue.h b/Marlin/src/lcd/tft/tft_queue.h index 7eaa0c01c1a2..51387254c55d 100644 --- a/Marlin/src/lcd/tft/tft_queue.h +++ b/Marlin/src/lcd/tft/tft_queue.h @@ -134,7 +134,7 @@ class TFT_Queue { public: static void reset(); static void async(); - static void sync() { while (current_task != NULL) async(); } + static void sync() { while (current_task != nullptr) async(); } static void fill(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color); static void canvas(uint16_t x, uint16_t y, uint16_t width, uint16_t height); diff --git a/Marlin/src/lcd/tft/touch.h b/Marlin/src/lcd/tft/touch.h index 8d6001b8d895..54dfb420d8d6 100644 --- a/Marlin/src/lcd/tft/touch.h +++ b/Marlin/src/lcd/tft/touch.h @@ -109,7 +109,7 @@ class Touch { public: static void init(); - static void reset() { controls_count = 0; touch_time = 0; current_control = NULL; } + static void reset() { controls_count = 0; touch_time = 0; current_control = nullptr; } static void clear() { controls_count = 0; } static void idle(); static bool is_clicked() { From a66d85c7e50197f744a9bfb97dba762e25c1f54c Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat, 24 Jul 2021 17:08:47 -0400 Subject: [PATCH 119/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20delta=20calibrate?= =?UTF-8?q?=20manual=20move=20scale=20(#22430)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index e6d23b1fae2f..810f376f827b 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -31,6 +31,7 @@ #include "menu_item.h" #include "../../module/delta.h" #include "../../module/motion.h" +#include "../../module/planner.h" #if HAS_LEVELING #include "../../feature/bedlevel/bedlevel.h" @@ -46,7 +47,7 @@ void _man_probe_pt(const xy_pos_t &xy) { do_blocking_move_to_xy_z(xy, Z_CLEARANCE_BETWEEN_PROBES); ui.wait_for_move = false; ui.synchronize(); - ui.manual_move.menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT)); + ui.manual_move.menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / planner.settings.axis_steps_per_mm[0]); // Use first axis as for delta XYZ should always match ui.goto_screen(lcd_move_z); } } From 4b94fb7558918d9ce38ef97d808887108b356066 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 25 Jul 2021 01:00:36 +0000 Subject: [PATCH 120/323] [cron] Bump distribution date (2021-07-25) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 384c20981647..0f8d2956bc81 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-24" +//#define STRING_DISTRIBUTION_DATE "2021-07-25" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 3c22da21d135..9ecb34c27fdd 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-24" + #define STRING_DISTRIBUTION_DATE "2021-07-25" #endif /** From e1907a99e2404ae9a0d1c1115978bc9640aa96f1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Jul 2021 21:41:09 -0500 Subject: [PATCH 121/323] =?UTF-8?q?=F0=9F=8E=A8=20Fix=20some=20formatting,?= =?UTF-8?q?=20F()=20versus=20PSTR()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/LINUX/hardware/Gpio.h | 2 +- Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp | 2 +- Marlin/src/HAL/LINUX/hardware/Timer.h | 2 +- Marlin/src/feature/leds/pca9533.cpp | 4 ++-- Marlin/src/feature/power.cpp | 2 +- Marlin/src/gcode/calibrate/G28.cpp | 2 +- .../extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp | 2 +- .../ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp | 4 ++-- .../extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp | 2 +- .../extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp | 2 +- .../extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp | 2 +- .../ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp | 6 +++--- .../src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp | 2 +- .../extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp | 8 ++++---- Marlin/src/libs/hex_print.cpp | 2 +- 18 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Marlin/src/HAL/LINUX/hardware/Gpio.h b/Marlin/src/HAL/LINUX/hardware/Gpio.h index 2d9b1f29ebad..f946be648466 100644 --- a/Marlin/src/HAL/LINUX/hardware/Gpio.h +++ b/Marlin/src/HAL/LINUX/hardware/Gpio.h @@ -40,7 +40,7 @@ struct GpioEvent { pin_type pin_id; GpioEvent::Type event; - GpioEvent(uint64_t timestamp, pin_type pin_id, GpioEvent::Type event){ + GpioEvent(uint64_t timestamp, pin_type pin_id, GpioEvent::Type event) { this->timestamp = timestamp; this->pin_id = pin_id; this->event = event; diff --git a/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp b/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp index c5b3ccc98656..e122ef3666c5 100644 --- a/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp +++ b/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp @@ -51,7 +51,7 @@ void LinearAxis::update() { } void LinearAxis::interrupt(GpioEvent ev) { - if (ev.pin_id == step_pin && !Gpio::pin_map[enable_pin].value){ + if (ev.pin_id == step_pin && !Gpio::pin_map[enable_pin].value) { if (ev.event == GpioEvent::RISE) { last_update = ev.timestamp; position += -1 + 2 * Gpio::pin_map[dir_pin].value; diff --git a/Marlin/src/HAL/LINUX/hardware/Timer.h b/Marlin/src/HAL/LINUX/hardware/Timer.h index 757efdcdbd7e..1b3b800dca3d 100644 --- a/Marlin/src/HAL/LINUX/hardware/Timer.h +++ b/Marlin/src/HAL/LINUX/hardware/Timer.h @@ -52,7 +52,7 @@ class Timer { return (*(intptr_t*)timerid); } - static void handler(int sig, siginfo_t *si, void *uc){ + static void handler(int sig, siginfo_t *si, void *uc) { Timer* _this = (Timer*)si->si_value.sival_ptr; _this->avg_error += (Clock::nanos() - _this->start_time) - _this->period; //high_resolution_clock is also limited in precision, but best we have _this->avg_error /= 2; //very crude precision analysis (actually within +-500ns usually) diff --git a/Marlin/src/feature/leds/pca9533.cpp b/Marlin/src/feature/leds/pca9533.cpp index 0fd4d6675771..914db21ba31c 100644 --- a/Marlin/src/feature/leds/pca9533.cpp +++ b/Marlin/src/feature/leds/pca9533.cpp @@ -36,7 +36,7 @@ void PCA9533_init() { PCA9533_reset(); } -static void PCA9533_writeAllRegisters(uint8_t psc0, uint8_t pwm0, uint8_t psc1, uint8_t pwm1, uint8_t ls0){ +static void PCA9533_writeAllRegisters(uint8_t psc0, uint8_t pwm0, uint8_t psc1, uint8_t pwm1, uint8_t ls0) { uint8_t data[6] = { PCA9533_REG_PSC0 | PCA9533_REGM_AI, psc0, pwm0, psc1, pwm1, ls0 }; Wire.beginTransmission(PCA9533_Addr >> 1); Wire.write(data, 6); @@ -44,7 +44,7 @@ static void PCA9533_writeAllRegisters(uint8_t psc0, uint8_t pwm0, uint8_t psc1, delayMicroseconds(1); } -static void PCA9533_writeRegister(uint8_t reg, uint8_t val){ +static void PCA9533_writeRegister(uint8_t reg, uint8_t val) { uint8_t data[2] = { reg, val }; Wire.beginTransmission(PCA9533_Addr >> 1); Wire.write(data, 2); diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index 30bf0d764d2d..b86249fbc052 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -57,7 +57,7 @@ bool Power::psu_on; * Initialize pins & state for the power manager. * */ -void Power::init(){ +void Power::init() { psu_on = ENABLED(PSU_DEFAULT_OFF); // Set opposite state to get full power_off/on TERN(PSU_DEFAULT_OFF, power_off(), power_on()); } diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index ca9cbb8cc9b8..6baef030bfba 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -268,7 +268,7 @@ void GcodeSuite::G28() { #endif #if HAS_HOMING_CURRENT - auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b){ + auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); }; #if HAS_CURRENT_HOME(X) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp index dedda6d215b7..21788c7f86d6 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp @@ -36,7 +36,7 @@ bool BioConfirmHomeE::onTouchEnd(uint8_t tag) { switch (tag) { case 1: #if defined(AXIS_LEVELING_COMMANDS) && defined(PARK_AND_RELEASE_COMMANDS) - SpinnerDialogBox::enqueueAndWait_P(F( + SpinnerDialogBox::enqueueAndWait_P(PSTR( "G28 E\n" AXIS_LEVELING_COMMANDS "\n" PARK_AND_RELEASE_COMMANDS diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp index bff1808d0dc4..f3d7cdcbe4fa 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp @@ -36,7 +36,7 @@ bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) { switch (tag) { case 1: #ifdef PARK_AND_RELEASE_COMMANDS - SpinnerDialogBox::enqueueAndWait_P(F( + SpinnerDialogBox::enqueueAndWait_P(PSTR( "G28\n" PARK_AND_RELEASE_COMMANDS )); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp index 8109ecef7685..c7e18e2718e0 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp @@ -69,10 +69,10 @@ bool MainMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: GOTO_SCREEN(BioConfirmHomeXYZ); break; - case 3: SpinnerDialogBox::enqueueAndWait_P(e_homed ? F("G0 E0 F120") : F("G112")); break; + case 3: SpinnerDialogBox::enqueueAndWait_P(e_homed ? PSTR("G0 E0 F120") : PSTR("G112")); break; case 4: StatusScreen::unlockMotors(); break; #ifdef AXIS_LEVELING_COMMANDS - case 5: SpinnerDialogBox::enqueueAndWait_P(F(AXIS_LEVELING_COMMANDS)); break; + case 5: SpinnerDialogBox::enqueueAndWait_P(PSTR(AXIS_LEVELING_COMMANDS)); break; #endif case 6: GOTO_SCREEN(TemperatureScreen); break; case 7: GOTO_SCREEN(InterfaceSettingsScreen); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp index 6fa4d761f678..a349e0417321 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp @@ -316,7 +316,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { case 9: GOTO_SCREEN(FilesScreen); break; case 10: GOTO_SCREEN(MainMenu); break; case 13: GOTO_SCREEN(BioConfirmHomeE); break; - case 14: SpinnerDialogBox::enqueueAndWait_P(F("G28Z")); break; + case 14: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28Z")); break; case 15: GOTO_SCREEN(TemperatureScreen); break; case 16: fine_motion = !fine_motion; break; default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp index 2f94555784dd..4c4875a6030c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp @@ -67,7 +67,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { case 3: GOTO_SCREEN(TemperatureScreen); break; case 4: GOTO_SCREEN(NudgeNozzleScreen); break; case 5: GOTO_SCREEN(BioConfirmHomeXYZ); break; - case 6: SpinnerDialogBox::enqueueAndWait_P(F("G0 E0 F120")); break; + case 6: SpinnerDialogBox::enqueueAndWait_P(PSTR("G0 E0 F120")); break; case 7: StatusScreen::unlockMotors(); break; default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index d3950a7c6ccb..6d3037da4be4 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -82,7 +82,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { case 3: BedMeshViewScreen::show(); break; case 4: BedMeshEditScreen::show(); break; case 5: injectCommands_P(PSTR("M280 P0 S60")); break; - case 6: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; + case 6: SpinnerDialogBox::enqueueAndWait_P(PSTR("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; default: return false; } return true; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp index 467d3b9119de..96572e053804 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp @@ -233,7 +233,7 @@ bool StatusScreen::onTouchStart(uint8_t) { bool StatusScreen::onTouchEnd(uint8_t tag) { switch (tag) { - case 1: SpinnerDialogBox::enqueueAndWait_P(F("G28 O\nG27")); break; + case 1: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28 O\nG27")); break; case 2: GOTO_SCREEN(LoadChocolateScreen); break; case 3: GOTO_SCREEN(PreheatMenu); break; case 4: GOTO_SCREEN(MainMenu); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp index 30b9d1c78a41..27611eefab3c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp @@ -191,7 +191,7 @@ bool BedMeshEditScreen::onTouchEnd(uint8_t tag) { void BedMeshEditScreen::show() { // On entry, always home (to account for possible Z offset changes) and save current mesh - SpinnerDialogBox::enqueueAndWait_P(F("G28\nG29 S1")); + SpinnerDialogBox::enqueueAndWait_P(PSTR("G28\nG29 S1")); // After the spinner, go to this screen. current_screen.forget(); PUSH_SCREEN(BedMeshEditScreen); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index e693bfb05c76..29b9f47ddd7d 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -104,7 +104,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) - case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break; + case 2: SpinnerDialogBox::enqueueAndWait_P(PSTR("G34")); break; #endif #if HAS_BED_PROBE case 3: @@ -114,7 +114,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { #if ENABLED(AUTO_BED_LEVELING_UBL) BedMeshViewScreen::doProbe(); #else - SpinnerDialogBox::enqueueAndWait_P(F(BED_LEVELING_COMMANDS)); + SpinnerDialogBox::enqueueAndWait_P(PSTR(BED_LEVELING_COMMANDS)); #endif break; #endif @@ -127,7 +127,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { #endif #if ENABLED(BLTOUCH) case 7: injectCommands_P(PSTR("M280 P0 S60")); break; - case 8: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; + case 8: SpinnerDialogBox::enqueueAndWait_P(PSTR("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; #endif default: return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp index 3f614ec34425..f02bfac99f3c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp @@ -104,7 +104,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; - case 2: SpinnerDialogBox::enqueueAndWait_P(F("G28")); break; + case 2: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28")); break; #if ENABLED(NOZZLE_CLEAN_FEATURE) case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break; #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp index 3bfe1784fc24..6fbfd258e620 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp @@ -98,10 +98,10 @@ bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) { case 14: UI_DECREMENT_AXIS(E3); mydata.e_rel[3] -= increment; break; case 15: UI_INCREMENT_AXIS(E3); mydata.e_rel[3] += increment; break; #endif - case 20: SpinnerDialogBox::enqueueAndWait_P(F("G28X")); break; - case 21: SpinnerDialogBox::enqueueAndWait_P(F("G28Y")); break; - case 22: SpinnerDialogBox::enqueueAndWait_P(F("G28Z")); break; - case 23: SpinnerDialogBox::enqueueAndWait_P(F("G28")); break; + case 20: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28X")); break; + case 21: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28Y")); break; + case 22: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28Z")); break; + case 23: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28")); break; case 24: raiseZtoTop(); break; default: return false; diff --git a/Marlin/src/libs/hex_print.cpp b/Marlin/src/libs/hex_print.cpp index 0f746d628470..1958084abb2d 100644 --- a/Marlin/src/libs/hex_print.cpp +++ b/Marlin/src/libs/hex_print.cpp @@ -80,7 +80,7 @@ void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); } void print_hex_long(const uint32_t w, const char delimiter) { SERIAL_ECHOPGM("0x"); - for (int B = 24; B >= 8; B -= 8){ + for (int B = 24; B >= 8; B -= 8) { print_hex_byte(w >> B); SERIAL_CHAR(delimiter); } From a76d8c70dd5924ec52e82c05a8fd5d219e1af7e1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 25 Jul 2021 02:07:34 -0500 Subject: [PATCH 122/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20some=20board=20nam?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_CREALITY_V452.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V453.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h index ad4ddff0cea2..64e07a0bc832 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h @@ -29,7 +29,7 @@ #error "Creality v4.5.2 only supports one hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_NAME "Creality v4.5.2" +#define BOARD_INFO_NAME "Creality v4.5.2" #define HEATER_0_PIN PA1 // HEATER1 #define HEATER_BED_PIN PA2 // HOT BED diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h index cdb87adece47..ca437312c8e1 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h @@ -29,7 +29,7 @@ #error "Creality v4.5.3 only supports one hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_NAME "Creality v4.5.3" +#define BOARD_INFO_NAME "Creality v4.5.3" #define HEATER_0_PIN PB14 // HEATER1 #define HEATER_BED_PIN PB13 // HOT BED From 3b57c3316a7024223ed4d00173e38206cabe4f8b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 25 Jul 2021 02:19:30 -0500 Subject: [PATCH 123/323] Misc. Cleanup --- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/feature/pause.cpp | 4 ++-- Marlin/src/lcd/language/language_en.h | 1 + Marlin/src/lcd/menu/menu_bed_corners.cpp | 6 ++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 82ef44f60674..96c4d829486a 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1593,7 +1593,7 @@ void setup() { HMI_Init(); DWIN_JPG_CacheTo1(Language_English); HMI_StartFrame(true); - DWIN_StatusChanged(GET_TEXT(WELCOME_MSG)); + DWIN_StatusChanged_P(GET_TEXT(WELCOME_MSG)); #endif #if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 2bd30338085a..94c564a9aaf7 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -535,8 +535,8 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep const millis_t nozzle_timeout = SEC_TO_MS(PAUSE_PARK_NOZZLE_TIMEOUT); HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout); - TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), CONTINUE_STR)); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Reheat finished."))); + TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_REHEATDONE), CONTINUE_STR)); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_REHEATDONE))); wait_for_user = true; nozzle_timed_out = false; diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 6920f00d36b5..acd45e48208f 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -727,6 +727,7 @@ namespace Language_en { #endif PROGMEM Language_Str MSG_REHEAT = _UxGT("Reheat"); PROGMEM Language_Str MSG_REHEATING = _UxGT("Reheating..."); + PROGMEM Language_Str MSG_REHEATDONE = _UxGT("Reheat Done"); PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Z Probe Wizard"); PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Probing Z Reference"); diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index 0ab82a9b1600..4811e2c60cd8 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -201,7 +201,7 @@ static void _lcd_level_bed_corners_get_next_position() { void _lcd_draw_raise() { if (!ui.should_draw()) return; MenuItem_confirm::select_screen( - GET_TEXT(MSG_BUTTON_DONE), GET_TEXT(MSG_BUTTON_SKIP) + GET_TEXT(MSG_BUTTON_DONE), GET_TEXT(MSG_BUTTON_SKIP) , []{ corner_probing_done = true; wait_for_probe = false; } , []{ wait_for_probe = false; } , GET_TEXT(MSG_LEVEL_CORNERS_RAISE) @@ -212,9 +212,7 @@ static void _lcd_level_bed_corners_get_next_position() { void _lcd_draw_level_prompt() { if (!ui.should_draw()) return; MenuItem_confirm::confirm_screen( - []{ queue.inject_P(TERN(HAS_LEVELING, PSTR("G29N"), G28_STR)); - ui.return_to_status(); - } + []{ queue.inject_P(TERN(HAS_LEVELING, PSTR("G29N"), G28_STR)); ui.return_to_status(); } , []{ ui.goto_previous_screen_no_defer(); } , GET_TEXT(MSG_LEVEL_CORNERS_IN_RANGE) , (const char*)nullptr, PSTR("?") From b1bc2e80036131cde58b4fbc02b76ac08b5a7924 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 25 Jul 2021 02:12:48 -0500 Subject: [PATCH 124/323] =?UTF-8?q?=F0=9F=8C=90=20Level=20Corners=20=3D>?= =?UTF-8?q?=20Bed=20Tramming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_cz.h | 2 +- Marlin/src/lcd/language/language_de.h | 3 +-- Marlin/src/lcd/language/language_en.h | 11 +++++------ Marlin/src/lcd/language/language_es.h | 3 +-- Marlin/src/lcd/language/language_eu.h | 2 +- Marlin/src/lcd/language/language_fr.h | 7 +++---- Marlin/src/lcd/language/language_gl.h | 2 +- Marlin/src/lcd/language/language_hu.h | 11 +++++------ Marlin/src/lcd/language/language_it.h | 11 +++++------ Marlin/src/lcd/language/language_pl.h | 11 +++++------ Marlin/src/lcd/language/language_pt_br.h | 2 +- Marlin/src/lcd/language/language_ro.h | 2 +- Marlin/src/lcd/language/language_ru.h | 14 +++++++------- Marlin/src/lcd/language/language_sk.h | 11 +++++------ Marlin/src/lcd/language/language_sv.h | 11 +++++------ Marlin/src/lcd/language/language_tr.h | 2 +- Marlin/src/lcd/language/language_uk.h | 14 +++++++------- Marlin/src/lcd/language/language_vi.h | 2 +- Marlin/src/lcd/language/language_zh_CN.h | 2 +- Marlin/src/lcd/language/language_zh_TW.h | 2 +- Marlin/src/lcd/menu/menu_bed_corners.cpp | 8 ++++---- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 2 +- Marlin/src/lcd/menu/menu_motion.cpp | 2 +- Marlin/src/lcd/menu/menu_tramming.cpp | 2 +- 24 files changed, 65 insertions(+), 74 deletions(-) diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index ab2aaa943f8d..fa6a8e21a3ac 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -109,7 +109,7 @@ namespace Language_cz { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Posunout osy"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Vyrovnat podložku"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Vyrovnat podložku"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Vyrovnat rohy"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Vyrovnat rohy"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Další roh"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor sítě"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Upravit síť bodů"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 7e40d4266562..f06370078a4b 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -62,7 +62,6 @@ namespace Language_de { PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Home Y"); PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Home Z"); PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Z-Achsen ausgleichen"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Bett ausrichten"); // Bettausrichtung PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("XYZ homen"); PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Klick zum Starten"); PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Nächste Koordinate"); @@ -103,7 +102,7 @@ namespace Language_de { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Achsen bewegen"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bett-Nivellierung"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Bett nivellieren"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Ecken nivellieren"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Bett ausrichten"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Nächste Ecke"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Netz Editor"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Netz bearbeiten"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index acd45e48208f..cd204eef5915 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -93,7 +93,6 @@ namespace Language_en { PROGMEM Language_Str MSG_HOME_OFFSET_K = _UxGT("Home Offset ") LCD_STR_K; PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets Applied"); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Set Origin"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assisted Tramming"); PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Tramming Wizard"); PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Select Origin"); PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Last value "); @@ -139,11 +138,11 @@ namespace Language_en { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Move Axis"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bed Leveling"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Level Bed"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Level Corners"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Raise Bed Until Probe Triggered"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("All Corners Within Tolerance. Level Bed"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Good Points: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Last Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Bed Tramming"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Raise Bed Until Probe Triggered"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("All Corners Within Tolerance. Level Bed"); + PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Good Points: "); + PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Last Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Next Corner"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Mesh Editor"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Edit Mesh"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index f34273216133..8fdf0bd47ed2 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -62,7 +62,6 @@ namespace Language_es { PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Origen Y"); PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Origen Z"); PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto alineado Z"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Recorrido asistido"); PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Iteración: %i"); PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("¡Precisión disminuyendo!"); PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Precisión conseguida"); @@ -106,7 +105,7 @@ namespace Language_es { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover ejes"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelando Cama"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar Cama"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivelar Esquinas"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Recorrido asistido"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Siguente Esquina"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mallado"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Mallado"); diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index 2be6f399d8d3..530742d6d3a2 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -82,7 +82,7 @@ namespace Language_eu { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Ardatzak mugitu"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Ohe berdinketa"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Ohea berdindu"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Ertzak berdindu"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Ertzak berdindu"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Hurrengo ertza"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Sarea editatu"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index 78a649f62676..6032937e0f18 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -78,7 +78,6 @@ namespace Language_fr { PROGMEM Language_Str MSG_HOME_OFFSET_K = _UxGT("Décal. origine ") LCD_STR_K; PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Décalages appliqués"); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Régler origine"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assistant Molettes"); PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Assistant Molettes"); PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Molette du lit"); // Not a selection of the origin PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Ecart origine "); @@ -111,9 +110,9 @@ namespace Language_fr { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Déplacer un axe"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Régler Niv. lit"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveau du lit"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Niveau des coins"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Relever le coin jusqu'à la sonde"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Coins dans la tolérance. Niveau lit "); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Assistant Molettes"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Relever le coin jusqu'à la sonde"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Coins dans la tolérance. Niveau lit "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Coin suivant"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Modif. maille"); // 13 car. max PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Modifier grille"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index 3eec75e138f9..8defd2b01f37 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -103,7 +103,7 @@ namespace Language_gl { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover eixe"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelando Cama"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar Cama"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivelar Cantos"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Nivelar Cantos"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Seguinte Canto"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mallado"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Mallado"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index d4ff151f579e..6fb41f90ff2d 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -87,7 +87,6 @@ namespace Language_hu { PROGMEM Language_Str MSG_HOME_OFFSET_K = _UxGT("Kezdö eltol. ") LCD_STR_K; PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Eltolás beállítva."); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Eredeti Be"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Elektromos segéd"); PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Elektromos varázsló"); PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Eredeti választása"); PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Utolsó érték "); @@ -133,11 +132,11 @@ namespace Language_hu { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Tengelyek mozgatása"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Ágy szintezés"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Ágy szintezése"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Sarok szint"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Ágy emelése a szonda váltásig"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Minden sarok tolerancián belül. Szint jó."); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Jó pontok: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Utolsó Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Elektromos segéd"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Ágy emelése a szonda váltásig"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Minden sarok tolerancián belül. Szint jó."); + PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Jó pontok: "); + PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Utolsó Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Következö sarok"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Háló szerkesztö"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Háló szerkesztése"); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 85b9d3f399f5..32bc7ff7c708 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -91,7 +91,6 @@ namespace Language_it { PROGMEM Language_Str MSG_HOME_OFFSET_K = _UxGT("Offset home ") LCD_STR_K; PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset applicato"); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Imposta Origine"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Tramming assistito"); PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Wizard Tramming"); PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Selez. origine"); PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Ultimo valore "); @@ -137,11 +136,11 @@ namespace Language_it { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Muovi Asse"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Livella piano"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Livella piano"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Calibra piano"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Regola la vite finche' la sonda non rileva il piano."); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Tolleranza raggiunta su tutti gli angoli. Piano livellato!"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Punti buoni: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Ultimo Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Tramming piano"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Regola la vite finche' la sonda non rileva il piano."); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Tolleranza raggiunta su tutti gli angoli. Piano livellato!"); + PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Punti buoni: "); + PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Ultimo Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Prossimo punto"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mesh"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Modifica Mesh"); diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index fee627b2fee0..e467178f6a98 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -85,7 +85,6 @@ namespace Language_pl { //PROGMEM Language_Str MSG_HOME_OFFSET_Z = _UxGT("Home Offset Z"); PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Poz. zerowa ust."); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Ustaw punkt zero"); - //PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assisted Tramming"); //PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Tramming Wizard"); PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Wybierz punkt zero"); PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Poprzednia wartość "); @@ -131,11 +130,11 @@ namespace Language_pl { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Ruch osi"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Poziomowanie stołu"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Wypoziomuj stół"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Narożniki poziomowania"); - //PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Raise Bed Until Probe Triggered"); - //PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("All Corners Within Tolerance. Level Bed"); - //PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Good Points: "); - //PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Last Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Narożniki poziomowania"); + //PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Raise Bed Until Probe Triggered"); + //PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("All Corners Within Tolerance. Level Bed"); + //PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Good Points: "); + //PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Last Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Nastepny narożnik"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Edytor siatki"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Edycja siatki"); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index 88135f5e2845..12904aa7ea79 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -94,7 +94,7 @@ namespace Language_pt_br { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover eixo"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelação Mesa"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar Mesa"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivelar Cantos"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Nivelar Cantos"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Próximo Canto"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor de Malha"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Malha"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index 9313adf3f6e9..3d21e1a58d7a 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -102,7 +102,7 @@ namespace Language_ro { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Muta Axa"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelarea Patului"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveleaza Patul"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Niveleaza Colturile"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Niveleaza Colturile"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Urmatorul Colt"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mesh"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editeaza Mesh"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index bf2bb02ba349..6ccfe5f47a12 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -159,17 +159,17 @@ namespace Language_ru { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Движение по осям"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Выравнивание стола"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Выровнять стол"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Выровнять углы"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Выровнять углы"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Следующий угол"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Вверх до срабатыв. зонда"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Углы в норме. Вырав.стола"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Вверх до срабатыв. зонда"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Углы в норме. Вырав.стола"); #else - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Вверх до сраб. зонда"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Углы в норме. Вырав."); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Вверх до сраб. зонда"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Углы в норме. Вырав."); #endif - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Хорошие точки: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Последняя Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Хорошие точки: "); + PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Последняя Z: "); #if LCD_WIDTH > 21 PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Смещение по Z"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Правка сетки окончена"); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 96f1bc7ee5de..717fa49b3375 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -87,7 +87,6 @@ namespace Language_sk { PROGMEM Language_Str MSG_HOME_OFFSET_Z = _UxGT("Z Ofset"); PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofsety nastavené"); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Nastaviť začiatok"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Asist. vyrovnanie"); PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Spriev. vyrovn."); PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Vyberte začiatok"); PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Posl. hodnota "); @@ -133,11 +132,11 @@ namespace Language_sk { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Posunúť osy"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Vyrovnanie podložky"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Vyrovnať podložku"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Vyrovnať rohy"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Zdvyhnite podl., kým sa nezopne sonda"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Rohy sú vrámci odchyl. Vyrovnajte podl."); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Dobré body: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Posl. Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Asist. vyrovnanie"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Zdvyhnite podl., kým sa nezopne sonda"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Rohy sú vrámci odchyl. Vyrovnajte podl."); + PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Dobré body: "); + PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Posl. Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Ďalší roh"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor sieťe bodov"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Upraviť sieť bodov"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index f7b0f0676910..baa0f645062c 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -75,7 +75,6 @@ namespace Language_sv { PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Sätt Hem Offset"); PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset Tillämpad"); PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Sätt Origo"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assisterad justering"); PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Justerings Wizard"); PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Välj Origo"); PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Senaste värde "); @@ -122,11 +121,11 @@ namespace Language_sv { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Flytta Axel"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bädd Nivellering"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivellera Bädd"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivellera Hörn"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Höj Bädd tills nästa Sond Triggad"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Alla Hörn inom Tolerans. Nivellering Bädd"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Bra Punkter: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Senaste Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Bädd Justering"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Höj Bädd tills nästa Sond Triggad"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Alla Hörn inom Tolerans. Nivellering Bädd"); + PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Bra Punkter: "); + PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Senaste Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Nästa Hörn"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Nät Redigerare"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Redigera Nät"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 6858616b4d5e..bf218f136fac 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -105,7 +105,7 @@ namespace Language_tr { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Eksen Hareketleri"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Tabla Hizalama"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Tabla Hizası"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Hizalama Köşeleri"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Hizalama Köşeleri"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Sonraki Köşe"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Mesh Editörü"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Mesh Düzenle"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index cee795745cb6..2e4a1b068caf 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -161,16 +161,16 @@ namespace Language_uk { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Рух по осям"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Вирівнювання столу"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Вирівняти стіл"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Вирівняти кути"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Вирівняти кути"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Вгору до спрацюв. зонду"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Кути в межах. Вирів.столу"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Вгору до спрацюв. зонду"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Кути в межах. Вирів.столу"); #else - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Вгору до спрац.зонду"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Кути в межах. Вирівн"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Вгору до спрац.зонду"); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Кути в межах. Вирівн"); #endif - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Хороші точки: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Остання Z: "); + PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Хороші точки: "); + PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Остання Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Наступний кут"); #if LCD_WIDTH > 21 PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Зміщення по Z"); diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h index 825666d1e1d7..013a9159214a 100644 --- a/Marlin/src/lcd/language/language_vi.h +++ b/Marlin/src/lcd/language/language_vi.h @@ -90,7 +90,7 @@ namespace Language_vi { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Di chuyển trục"); // Move axis PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("San Lấp Bàn"); // Bed Leveling PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Làm bằng mặt bàn"); // Level bed - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Làm bằng góc bàn"); // Level corners + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Làm bằng góc bàn"); // Level corners PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Góc tiếp theo"); // Next corner PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Chỉnh lưới đã dừng"); // Mesh Editing Stopped PROGMEM Language_Str MSG_MESH_X = _UxGT("Mục lục X"); // Index X diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 33eb7fca156e..31d262360489 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -100,7 +100,7 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移动轴"); //"Move axis" PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("调平热床"); //"Bed leveling" PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("调平热床"); //"Level bed" - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("调平边角"); // "Level corners" + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("调平边角"); // "Bed Tramming" PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("下个边角"); // "Next corner" PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("网格编辑器"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("编辑网格"); // "Edit Mesh" diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index 2061a66ad8bd..f162536132bd 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -98,7 +98,7 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移動軸"); //"Move axis" PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("調平熱床"); //"Bed leveling" PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("調平熱床"); //"Level bed" - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("調平邊角"); // "Level corners" + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("調平邊角"); // "Bed Tramming" PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("下個邊角"); // "Next corner" PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("網格編輯器"); //"Mesh Editor" PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("編輯網格"); // "Edit Mesh" diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index 4811e2c60cd8..767c8188519a 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -179,7 +179,7 @@ static void _lcd_level_bed_corners_get_next_position() { // Display # of good points found vs total needed if (PAGE_CONTAINS(y - (MENU_FONT_HEIGHT), y)) { SETCURSOR(TERN(TFT_COLOR_UI, 2, 0), cy); - lcd_put_u8str_P(GET_TEXT(MSG_LEVEL_CORNERS_GOOD_POINTS)); + lcd_put_u8str_P(GET_TEXT(MSG_BED_TRAMMING_GOOD_POINTS)); IF_ENABLED(TFT_COLOR_UI, lcd_moveto(12, cy)); lcd_put_u8str(GOOD_POINTS_TO_STR(good_points)); lcd_put_wchar('/'); @@ -192,7 +192,7 @@ static void _lcd_level_bed_corners_get_next_position() { // Display the Last Z value if (PAGE_CONTAINS(y - (MENU_FONT_HEIGHT), y)) { SETCURSOR(TERN(TFT_COLOR_UI, 2, 0), cy); - lcd_put_u8str_P(GET_TEXT(MSG_LEVEL_CORNERS_LAST_Z)); + lcd_put_u8str_P(GET_TEXT(MSG_BED_TRAMMING_LAST_Z)); IF_ENABLED(TFT_COLOR_UI, lcd_moveto(12, 2)); lcd_put_u8str(LAST_Z_TO_STR(last_z)); } @@ -204,7 +204,7 @@ static void _lcd_level_bed_corners_get_next_position() { GET_TEXT(MSG_BUTTON_DONE), GET_TEXT(MSG_BUTTON_SKIP) , []{ corner_probing_done = true; wait_for_probe = false; } , []{ wait_for_probe = false; } - , GET_TEXT(MSG_LEVEL_CORNERS_RAISE) + , GET_TEXT(MSG_BED_TRAMMING_RAISE) , (const char*)nullptr, NUL_STR ); } @@ -214,7 +214,7 @@ static void _lcd_level_bed_corners_get_next_position() { MenuItem_confirm::confirm_screen( []{ queue.inject_P(TERN(HAS_LEVELING, PSTR("G29N"), G28_STR)); ui.return_to_status(); } , []{ ui.goto_previous_screen_no_defer(); } - , GET_TEXT(MSG_LEVEL_CORNERS_IN_RANGE) + , GET_TEXT(MSG_BED_TRAMMING_IN_RANGE) , (const char*)nullptr, PSTR("?") ); } diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index 62cf8cf1c16b..c03b93301424 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -288,7 +288,7 @@ void menu_bed_leveling() { #endif #if ENABLED(LEVEL_BED_CORNERS) - SUBMENU(MSG_LEVEL_CORNERS, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); #endif #if ENABLED(EEPROM_SETTINGS) diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 70f7acd54738..45e751e29adb 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -419,7 +419,7 @@ void menu_motion() { #endif #if ENABLED(LEVEL_BED_CORNERS) && DISABLED(LCD_BED_LEVELING) - SUBMENU(MSG_LEVEL_CORNERS, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); #endif #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index 7ccb320f31e9..b5868f40566c 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -61,7 +61,7 @@ static void _menu_single_probe(const uint8_t point) { tram_index = point; DEBUG_ECHOLNPAIR("Screen: single probe screen Arg:", point); START_MENU(); - STATIC_ITEM(MSG_LEVEL_CORNERS, SS_LEFT); + STATIC_ITEM(MSG_BED_TRAMMING, SS_LEFT); STATIC_ITEM(MSG_LAST_VALUE_SP, SS_LEFT, ftostr42_52(z_measured[0] - z_measured[point])); // Print diff ACTION_ITEM(MSG_UBL_BC_INSERT2, []{ if (probe_single_point()) ui.refresh(); }); ACTION_ITEM(MSG_BUTTON_DONE, []{ ui.goto_previous_screen(); }); // Back From 91db6038930528b06913a40884355d85c7550d70 Mon Sep 17 00:00:00 2001 From: George Fu Date: Sun, 25 Jul 2021 16:40:43 +0800 Subject: [PATCH 125/323] =?UTF-8?q?=F0=9F=94=A8=20Fix=20FYSETC=20S6=20envs?= =?UTF-8?q?=20(#22421)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- .../PlatformIO/boards/marlin_fysetc_s6.json | 2 +- .../boards/marlin_fysetc_s6_8000.json | 35 ------------------- .../variants/MARLIN_FYSETC_S6/ldscript.ld | 4 +-- ini/stm32f4.ini | 2 +- 4 files changed, 4 insertions(+), 39 deletions(-) delete mode 100644 buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json diff --git a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json index 42a203786d8a..286e46ffbd20 100644 --- a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json +++ b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6.json @@ -21,7 +21,7 @@ "name": "3D Printer control board", "upload": { "maximum_ram_size": 131072, - "maximum_size": 458752, + "maximum_size": 524288, "protocol": "stlink", "protocols": [ "jlink", diff --git a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json b/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json deleted file mode 100644 index 1d808a23d7c3..000000000000 --- a/buildroot/share/PlatformIO/boards/marlin_fysetc_s6_8000.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "build": { - "cpu": "cortex-m4", - "extra_flags": "-DSTM32F446xx", - "f_cpu": "180000000L", - "mcu": "stm32f446ret6", - "variant": "MARLIN_FYSETC_S6" - }, - "connectivity": [ - "can" - ], - "debug": { - "jlink_device": "STM32F446RE", - "openocd_target": "stm32f4x", - "svd_path": "STM32F446x.svd" - }, - "frameworks": [ - "arduino", - "stm32cube" - ], - "name": "3D Printer control board", - "upload": { - "maximum_ram_size": 131072, - "maximum_size": 491520, - "protocol": "stlink", - "protocols": [ - "jlink", - "stlink", - "blackmagic", - "serial" - ] - }, - "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html", - "vendor": "FYSETC" -} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld index 2a61072cb17e..fee7418b0410 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld @@ -60,8 +60,8 @@ _Min_Stack_Size = 0x400;; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -FLASH (rx) : ORIGIN = 0x8010000, LENGTH = 512K -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET } /* Define output sections */ diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 901f14511306..04fd03bf7269 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -82,7 +82,7 @@ upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" [env:FYSETC_S6_8000] platform = ${common_stm32.platform} extends = env:FYSETC_S6 -board = marlin_fysetc_s6_8000 +board = marlin_fysetc_s6 board_build.offset = 0x8000 board_upload.offset_address = 0x08008000 upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" From 52718f3385fd663fc573c551b2dfb8123141a591 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 25 Jul 2021 03:58:16 -0500 Subject: [PATCH 126/323] =?UTF-8?q?=F0=9F=8E=A8=20Add=20DWIN=5FStatusChang?= =?UTF-8?q?ed=5FP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 6 ++++++ Marlin/src/lcd/dwin/e3v2/dwin.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index 114590a04373..38017b64d697 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -4128,6 +4128,12 @@ void DWIN_StatusChanged(const char *text) { DWIN_UpdateLCD(); } +void DWIN_StatusChanged_P(PGM_P const pstr) { + char str[strlen_P((const char*)pstr) + 1]; + strcpy_P(str, (const char*)pstr); + DWIN_StatusChanged(str); +} + // GUI extension void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode=false) { DWIN_Draw_String(false,true,font8x16,Select_Color,bcolor,x+4,y,F(mode ? "x" : " ")); diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.h b/Marlin/src/lcd/dwin/e3v2/dwin.h index 0272748cd5d5..4b3460aae5c5 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.h +++ b/Marlin/src/lcd/dwin/e3v2/dwin.h @@ -404,6 +404,7 @@ void DWIN_Update(); void EachMomentUpdate(); void DWIN_HandleScreen(); void DWIN_StatusChanged(const char *text); +void DWIN_StatusChanged_P(PGM_P const pstr); void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode /* = false*/); inline void DWIN_StartHoming() { HMI_flag.home_flag = true; } From fc4f4ab5f5e47b5ac764ca6c2fe127dc9ecbf55d Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 26 Jul 2021 00:58:34 +0000 Subject: [PATCH 127/323] [cron] Bump distribution date (2021-07-26) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 0f8d2956bc81..ef5cdcb464b7 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-25" +//#define STRING_DISTRIBUTION_DATE "2021-07-26" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 9ecb34c27fdd..a3f7dbfca96d 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-25" + #define STRING_DISTRIBUTION_DATE "2021-07-26" #endif /** From 70038a9961d45c91f4d30e7bfb8ca69af6646dcd Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 27 Jul 2021 01:00:06 +0000 Subject: [PATCH 128/323] [cron] Bump distribution date (2021-07-27) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ef5cdcb464b7..71bbff479f0e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-26" +//#define STRING_DISTRIBUTION_DATE "2021-07-27" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index a3f7dbfca96d..59260d252bcf 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-26" + #define STRING_DISTRIBUTION_DATE "2021-07-27" #endif /** From bf39c66d340fc34e111840554a5f644576c6447c Mon Sep 17 00:00:00 2001 From: ellensp Date: Wed, 28 Jul 2021 09:05:44 +1200 Subject: [PATCH 129/323] =?UTF-8?q?=F0=9F=92=9A=20Specify=20compatible=20T?= =?UTF-8?q?eensy=20@4.12=20(#22448)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/teensy.ini | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ini/teensy.ini b/ini/teensy.ini index ae33cc7a02e8..ef1ad766bcbb 100644 --- a/ini/teensy.ini +++ b/ini/teensy.ini @@ -9,11 +9,20 @@ # # ################################# +# +# Teensy++ 2.0 +# +[env:teensy20] +platform = teensy +extends = common_avr8 +board = teensy2pp +lib_ignore = ${env:common_avr8.lib_ignore}, NativeEthernet + # # Teensy 3.1 / 3.2 (ARM Cortex-M4) # [env:teensy31] -platform = teensy +platform = teensy@~4.12.0 board = teensy31 src_filter = ${common.default_src_filter} + lib_ignore = NativeEthernet @@ -22,13 +31,13 @@ lib_ignore = NativeEthernet # Teensy 3.5 / 3.6 (ARM Cortex-M4) # [env:teensy35] -platform = teensy +platform = teensy@~4.12.0 board = teensy35 src_filter = ${common.default_src_filter} + lib_ignore = NativeEthernet [env:teensy36] -platform = teensy +platform = teensy@~4.12.0 board = teensy36 src_filter = ${common.default_src_filter} + lib_ignore = NativeEthernet @@ -37,6 +46,6 @@ lib_ignore = NativeEthernet # Teensy 4.0 / 4.1 (ARM Cortex-M7) # [env:teensy41] -platform = teensy +platform = teensy@~4.12.0 board = teensy41 src_filter = ${common.default_src_filter} + From 284d0bf5a0ec141d31a7c52634236c29700116a2 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 28 Jul 2021 01:01:06 +0000 Subject: [PATCH 130/323] [cron] Bump distribution date (2021-07-28) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 71bbff479f0e..5c2494d2323a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-27" +//#define STRING_DISTRIBUTION_DATE "2021-07-28" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 59260d252bcf..9260d359febf 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-27" + #define STRING_DISTRIBUTION_DATE "2021-07-28" #endif /** From 4942cb796c24a669e6d9d177eb21e5b2f71fbde0 Mon Sep 17 00:00:00 2001 From: ellensp Date: Wed, 28 Jul 2021 16:28:15 +1200 Subject: [PATCH 131/323] =?UTF-8?q?=F0=9F=90=9B=20SAV=5F3DGLCD=20condition?= =?UTF-8?q?als=20(#22447)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 7e2239b3f654..4d6055b435bc 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -141,6 +141,13 @@ #define IS_RRD_SC 1 #define IS_U8GLIB_SSD1306 +#elif ENABLED(SAV_3DGLCD) + + #ifdef U8GLIB_SSD1306 + #define IS_U8GLIB_SSD1306 + #endif + #define IS_NEWPANEL 1 + #elif ENABLED(FYSETC_242_OLED_12864) #define IS_RRD_SC 1 From 296d0d495cad942cccd611b74a6b8a414a089a65 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Wed, 28 Jul 2021 06:30:41 +0200 Subject: [PATCH 132/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Longer3D=20SDSS=20?= =?UTF-8?q?/=20SD=5FSS=20(#22444)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index 391610522d04..f9ec42b68efe 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -140,6 +140,10 @@ #define TFT_BUFFER_SIZE 3200 #endif +#if ENABLED(SDIO_SUPPORT) + #define SD_SS_PIN -1 // else SDSS set to PA4 in M43 (spi_pins.h) +#endif + /** * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer * mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins @@ -148,7 +152,7 @@ #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PB12 // pin 51 SPI2_NSS #define TOUCH_SCK_PIN PB13 // pin 52 - #define TOUCH_MOSI_PIN PB14 // pin 53 + #define TOUCH_MOSI_PIN PB14 // pin 53 (Inverted MOSI/MISO = No HW SPI2) #define TOUCH_MISO_PIN PB15 // pin 54 #define TOUCH_INT_PIN PC6 // pin 63 (PenIRQ coming from ADS7843) #endif @@ -159,6 +163,7 @@ // #if NO_EEPROM_SELECTED //#define SPI_EEPROM + //#define HAS_SPI_FLASH 1 // need MARLIN_DEV_MODE for M993/M994 eeprom backup tests #define FLASH_EEPROM_EMULATION #endif @@ -171,6 +176,12 @@ #define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32 #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now... +#elif HAS_SPI_FLASH + #define SPI_FLASH_SIZE 0x40000U // limit to 256KB (M993 will reboot with 512) + #define W25QXX_CS_PIN PC5 + #define W25QXX_MOSI_PIN PA7 + #define W25QXX_MISO_PIN PA6 + #define W25QXX_SCK_PIN PA5 #elif ENABLED(FLASH_EEPROM_EMULATION) // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) #define EEPROM_PAGE_SIZE (0x800U) // 2KB From 4ca5f6da3f8c0248fdf1c1572b1fa0c04a7e550d Mon Sep 17 00:00:00 2001 From: vyacheslav-shubin Date: Wed, 28 Jul 2021 22:55:04 +0300 Subject: [PATCH 133/323] =?UTF-8?q?=F0=9F=90=9B=20Reset=20workDirDepth=20i?= =?UTF-8?q?n=20cdroot()=20(#22441)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/sd/cardreader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index f3a913ced3ed..61b2b72bb6b8 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -1024,6 +1024,7 @@ int8_t CardReader::cdup() { void CardReader::cdroot() { workDir = root; flag.workDirIsRoot = true; + workDirDepth = 0; TERN_(SDCARD_SORT_ALPHA, presort()); } From d5a9a04abecf6eaf819e9ccabd6702dccd984a9a Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed, 28 Jul 2021 12:56:26 -0700 Subject: [PATCH 134/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20SKR=20Pro=20bad=20?= =?UTF-8?q?directive=20(#22438)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index fdc6c6f6e53f..231dd9f59478 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -254,7 +254,7 @@ #define TEMP_BED_PIN PF3 // T0 <-> Bed #endif -#ifdef TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN) +#if TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN) #if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20 #if HOTENDS == 2 #define TEMP_PROBE_PIN PF10 From eacf1e33c468457bdcb26c8f6b7febd7133f769e Mon Sep 17 00:00:00 2001 From: charlespick <17918019+charlespick@users.noreply.github.com> Date: Wed, 28 Jul 2021 14:09:33 -0700 Subject: [PATCH 135/323] M76 Host Pause Feature (#21738) --- Marlin/Configuration_adv.h | 1 + Marlin/src/gcode/stats/M75-M78.cpp | 4 ++++ buildroot/tests/rambo | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 70346324216c..d32b61cbfa83 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3819,6 +3819,7 @@ */ //#define HOST_ACTION_COMMANDS #if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PAUSE_M76 //#define HOST_PROMPT_SUPPORT //#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start #endif diff --git a/Marlin/src/gcode/stats/M75-M78.cpp b/Marlin/src/gcode/stats/M75-M78.cpp index 568d9b0e2707..f74d9204bde0 100644 --- a/Marlin/src/gcode/stats/M75-M78.cpp +++ b/Marlin/src/gcode/stats/M75-M78.cpp @@ -23,6 +23,9 @@ #include "../gcode.h" #include "../../module/printcounter.h" #include "../../lcd/marlinui.h" +#if ENABLED(HOST_PAUSE_M76) + #include "../../feature/host_actions.h" +#endif #include "../../MarlinCore.h" // for startOrResumeJob @@ -38,6 +41,7 @@ void GcodeSuite::M75() { */ void GcodeSuite::M76() { print_job_timer.pause(); + TERN_(HOST_PAUSE_M76, host_action_pause()); } /** diff --git a/buildroot/tests/rambo b/buildroot/tests/rambo index 6b87d01a5e8a..e755f81cf1e0 100755 --- a/buildroot/tests/rambo +++ b/buildroot/tests/rambo @@ -120,7 +120,7 @@ opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \ ENDSTOP_NOISE_THRESHOLD FAN_SOFT_PWM \ FIX_MOUNTED_PROBE PROBING_ESTEPPERS_OFF AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE PROBE_OFFSET_WIZARD \ Z_SAFE_HOMING SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \ - SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT ADVANCED_OK M114_DETAIL \ + SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT HOST_PAUSE_M76 ADVANCED_OK M114_DETAIL \ VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_USE_Z_ONLY exec_test $1 $2 "Rambo | CoreXY, Gradient Mix | Endstop Int. | Home Y > X | FW Retract ..." "$3" From 885c63c35fdf41bdb91b67266be09cae93910787 Mon Sep 17 00:00:00 2001 From: borland1 Date: Wed, 28 Jul 2021 15:45:32 -0700 Subject: [PATCH 136/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20LCD=20Menu=20MBL?= =?UTF-8?q?=20Z-Offset=20Adjustment=20(#22450)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index c03b93301424..f01c7899fbe3 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -278,7 +278,12 @@ void menu_bed_leveling() { // Mesh Bed Leveling Z-Offset // #if ENABLED(MESH_BED_LEVELING) - EDIT_ITEM(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); + #if WITHIN(Z_PROBE_OFFSET_RANGE_MIN, -9, 9) + #define LCD_Z_OFFSET_TYPE float43 // Values from -9.000 to +9.000 + #else + #define LCD_Z_OFFSET_TYPE float42_52 // Values from -99.99 to 99.99 + #endif + EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_BED_Z, &mbl.z_offset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); #endif #if ENABLED(BABYSTEP_ZPROBE_OFFSET) From 4111d1d5add6290ff02da668b0a024b06f189694 Mon Sep 17 00:00:00 2001 From: Marcio T Date: Wed, 28 Jul 2021 17:15:01 -0600 Subject: [PATCH 137/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20FTDI=20Eve=20Touch?= =?UTF-8?q?=20UI=20progmem=20strings=20(#22439)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bioprinter/confirm_home_e.cpp | 2 +- .../bioprinter/confirm_home_xyz.cpp | 2 +- .../ftdi_eve_touch_ui/bioprinter/main_menu.cpp | 18 +++++++++--------- .../bioprinter/status_screen.cpp | 2 +- .../ftdi_eve_touch_ui/bioprinter/tune_menu.cpp | 2 +- .../cocoa_press/leveling_menu.cpp | 2 +- .../ftdi_eve_touch_ui/cocoa_press/screens.h | 2 +- .../cocoa_press/status_screen.cpp | 2 +- .../generic/alert_dialog_box.cpp | 8 ++++---- .../generic/bed_mesh_edit_screen.cpp | 2 +- .../generic/dialog_box_base_class.cpp | 8 ++++++-- .../generic/dialog_box_base_class.h | 4 ++-- .../generic/leveling_menu.cpp | 6 +++--- .../ftdi_eve_touch_ui/generic/main_menu.cpp | 2 +- .../generic/move_axis_screen.cpp | 8 ++++---- .../generic/spinner_dialog_box.cpp | 13 ++++++++----- .../generic/spinner_dialog_box.h | 10 +++++++--- .../generic/z_offset_screen.cpp | 2 +- 18 files changed, 53 insertions(+), 42 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp index 21788c7f86d6..a5511f94b9eb 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp @@ -36,7 +36,7 @@ bool BioConfirmHomeE::onTouchEnd(uint8_t tag) { switch (tag) { case 1: #if defined(AXIS_LEVELING_COMMANDS) && defined(PARK_AND_RELEASE_COMMANDS) - SpinnerDialogBox::enqueueAndWait_P(PSTR( + SpinnerDialogBox::enqueueAndWait(F( "G28 E\n" AXIS_LEVELING_COMMANDS "\n" PARK_AND_RELEASE_COMMANDS diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp index f3d7cdcbe4fa..e34df42b84d3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp @@ -36,7 +36,7 @@ bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) { switch (tag) { case 1: #ifdef PARK_AND_RELEASE_COMMANDS - SpinnerDialogBox::enqueueAndWait_P(PSTR( + SpinnerDialogBox::enqueueAndWait(F( "G28\n" PARK_AND_RELEASE_COMMANDS )); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp index c7e18e2718e0..adc84dfa25ff 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp @@ -67,17 +67,17 @@ bool MainMenu::onTouchEnd(uint8_t tag) { const bool e_homed = isAxisPositionKnown(E0); switch (tag) { - case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; - case 2: GOTO_SCREEN(BioConfirmHomeXYZ); break; - case 3: SpinnerDialogBox::enqueueAndWait_P(e_homed ? PSTR("G0 E0 F120") : PSTR("G112")); break; - case 4: StatusScreen::unlockMotors(); break; + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; + case 2: GOTO_SCREEN(BioConfirmHomeXYZ); break; + case 3: SpinnerDialogBox::enqueueAndWait(e_homed ? F("G0 E0 F120") : F("G112")); break; + case 4: StatusScreen::unlockMotors(); break; #ifdef AXIS_LEVELING_COMMANDS - case 5: SpinnerDialogBox::enqueueAndWait_P(PSTR(AXIS_LEVELING_COMMANDS)); break; + case 5: SpinnerDialogBox::enqueueAndWait(F(AXIS_LEVELING_COMMANDS)); break; #endif - case 6: GOTO_SCREEN(TemperatureScreen); break; - case 7: GOTO_SCREEN(InterfaceSettingsScreen); break; - case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; - case 9: GOTO_SCREEN(AboutScreen); break; + case 6: GOTO_SCREEN(TemperatureScreen); break; + case 7: GOTO_SCREEN(InterfaceSettingsScreen); break; + case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; + case 9: GOTO_SCREEN(AboutScreen); break; default: return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp index a349e0417321..1382a13bf86e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp @@ -316,7 +316,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { case 9: GOTO_SCREEN(FilesScreen); break; case 10: GOTO_SCREEN(MainMenu); break; case 13: GOTO_SCREEN(BioConfirmHomeE); break; - case 14: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28Z")); break; + case 14: SpinnerDialogBox::enqueueAndWait(F("G28Z")); break; case 15: GOTO_SCREEN(TemperatureScreen); break; case 16: fine_motion = !fine_motion; break; default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp index 4c4875a6030c..48eff0a66149 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp @@ -67,7 +67,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { case 3: GOTO_SCREEN(TemperatureScreen); break; case 4: GOTO_SCREEN(NudgeNozzleScreen); break; case 5: GOTO_SCREEN(BioConfirmHomeXYZ); break; - case 6: SpinnerDialogBox::enqueueAndWait_P(PSTR("G0 E0 F120")); break; + case 6: SpinnerDialogBox::enqueueAndWait(F("G0 E0 F120")); break; case 7: StatusScreen::unlockMotors(); break; default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index 6d3037da4be4..2e3472987eb3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -82,7 +82,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { case 3: BedMeshViewScreen::show(); break; case 4: BedMeshEditScreen::show(); break; case 5: injectCommands_P(PSTR("M280 P0 S60")); break; - case 6: SpinnerDialogBox::enqueueAndWait_P(PSTR("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; + case 6: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; default: return false; } return true; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h index 87d31da6f63b..8481e446c425 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h @@ -108,7 +108,6 @@ enum { #include "../generic/display_tuning_screen.h" #include "../generic/statistics_screen.h" #include "../generic/stepper_current_screen.h" -#include "../generic/leveling_menu.h" #include "../generic/z_offset_screen.h" #include "../generic/bed_mesh_base.h" #include "../generic/bed_mesh_view_screen.h" @@ -130,5 +129,6 @@ enum { #include "preheat_menu.h" #include "preheat_screen.h" #include "load_chocolate.h" +#include "leveling_menu.h" #include "move_xyz_screen.h" #include "move_e_screen.h" diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp index 96572e053804..af3875967d60 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp @@ -233,7 +233,7 @@ bool StatusScreen::onTouchStart(uint8_t) { bool StatusScreen::onTouchEnd(uint8_t tag) { switch (tag) { - case 1: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28 O\nG27")); break; + case 1: SpinnerDialogBox::enqueueAndWait(F("G28 O\nG27")); break; case 2: GOTO_SCREEN(LoadChocolateScreen); break; case 3: GOTO_SCREEN(PreheatMenu); break; case 4: GOTO_SCREEN(MainMenu); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp index ccdfa89419d7..0d309bff7552 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp @@ -43,7 +43,7 @@ void AlertDialogBox::onRedraw(draw_mode_t what) { } template -void AlertDialogBox::show(const T message) { +void AlertDialogBox::show(T message) { drawMessage(message); storeBackground(); mydata.isError = false; @@ -51,7 +51,7 @@ void AlertDialogBox::show(const T message) { } template -void AlertDialogBox::showError(const T message) { +void AlertDialogBox::showError(T message) { drawMessage(message); storeBackground(); mydata.isError = true; @@ -64,8 +64,8 @@ void AlertDialogBox::hide() { } template void AlertDialogBox::show(const char *); -template void AlertDialogBox::show(const progmem_str); +template void AlertDialogBox::show(progmem_str); template void AlertDialogBox::showError(const char *); -template void AlertDialogBox::showError(const progmem_str); +template void AlertDialogBox::showError(progmem_str); #endif // FTDI_ALERT_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp index 27611eefab3c..c7d0cc3f7314 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp @@ -191,7 +191,7 @@ bool BedMeshEditScreen::onTouchEnd(uint8_t tag) { void BedMeshEditScreen::show() { // On entry, always home (to account for possible Z offset changes) and save current mesh - SpinnerDialogBox::enqueueAndWait_P(PSTR("G28\nG29 S1")); + SpinnerDialogBox::enqueueAndWait(F("G28\nG29 S1")); // After the spinner, go to this screen. current_screen.forget(); PUSH_SCREEN(BedMeshEditScreen); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp index 0d604751f16b..500551e862ba 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp @@ -32,7 +32,7 @@ using namespace Theme; #define GRID_ROWS 8 template -void DialogBoxBaseClass::drawMessage(const T message, int16_t font) { +void DialogBoxBaseClass::drawMessage(T message, int16_t font) { CommandProcessor cmd; cmd.cmd(CMD_DLSTART) .cmd(CLEAR_COLOR_RGB(bg_color)) @@ -59,12 +59,16 @@ void DialogBoxBaseClass::drawOkayButton() { .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_OKAY)); } -void DialogBoxBaseClass::drawButton(const progmem_str label) { +template +void DialogBoxBaseClass::drawButton(T label) { CommandProcessor cmd; cmd.font(font_medium) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), label); } +template void DialogBoxBaseClass::drawButton(const char *); +template void DialogBoxBaseClass::drawButton(progmem_str); + void DialogBoxBaseClass::drawSpinner() { CommandProcessor cmd; cmd.cmd(COLOR_RGB(bg_text_enabled)) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h index ef5e6b569beb..d48f3a03b3e3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h @@ -27,11 +27,11 @@ class DialogBoxBaseClass : public BaseScreen { protected: - template static void drawMessage(const T, int16_t font = 0); + template static void drawMessage(T, int16_t font = 0); + template static void drawButton(T); static void drawYesNoButtons(uint8_t default_btn = 0); static void drawOkayButton(); static void drawSpinner(); - static void drawButton(const progmem_str); static void onRedraw(draw_mode_t) {}; public: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index 29b9f47ddd7d..fe5324ae6226 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -104,7 +104,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) - case 2: SpinnerDialogBox::enqueueAndWait_P(PSTR("G34")); break; + case 2: SpinnerDialogBox::enqueueAndWait(F("G34")); break; #endif #if HAS_BED_PROBE case 3: @@ -114,7 +114,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { #if ENABLED(AUTO_BED_LEVELING_UBL) BedMeshViewScreen::doProbe(); #else - SpinnerDialogBox::enqueueAndWait_P(PSTR(BED_LEVELING_COMMANDS)); + SpinnerDialogBox::enqueueAndWait(F(BED_LEVELING_COMMANDS)); #endif break; #endif @@ -127,7 +127,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { #endif #if ENABLED(BLTOUCH) case 7: injectCommands_P(PSTR("M280 P0 S60")); break; - case 8: SpinnerDialogBox::enqueueAndWait_P(PSTR("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; + case 8: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; #endif default: return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp index f02bfac99f3c..a6c39db79606 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp @@ -104,7 +104,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; - case 2: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28")); break; + case 2: SpinnerDialogBox::enqueueAndWait(F("G28")); break; #if ENABLED(NOZZLE_CLEAN_FEATURE) case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break; #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp index 6fbfd258e620..ae396c4ec5dd 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp @@ -98,10 +98,10 @@ bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) { case 14: UI_DECREMENT_AXIS(E3); mydata.e_rel[3] -= increment; break; case 15: UI_INCREMENT_AXIS(E3); mydata.e_rel[3] += increment; break; #endif - case 20: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28X")); break; - case 21: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28Y")); break; - case 22: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28Z")); break; - case 23: SpinnerDialogBox::enqueueAndWait_P(PSTR("G28")); break; + case 20: SpinnerDialogBox::enqueueAndWait(F("G28X")); break; + case 21: SpinnerDialogBox::enqueueAndWait(F("G28Y")); break; + case 22: SpinnerDialogBox::enqueueAndWait(F("G28Z")); break; + case 23: SpinnerDialogBox::enqueueAndWait(F("G28")); break; case 24: raiseZtoTop(); break; default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp index 489beabe6b74..1b267698c37e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp @@ -34,7 +34,7 @@ constexpr static SpinnerDialogBoxData &mydata = screen_data.SpinnerDialogBox; void SpinnerDialogBox::onRedraw(draw_mode_t) { } -void SpinnerDialogBox::show(const progmem_str message) { +void SpinnerDialogBox::show(progmem_str message) { drawMessage(message); drawSpinner(); storeBackground(); @@ -46,14 +46,17 @@ void SpinnerDialogBox::hide() { cmd.stop().execute(); } -void SpinnerDialogBox::enqueueAndWait_P(const progmem_str commands) { - enqueueAndWait_P(GET_TEXT_F(MSG_PLEASE_WAIT), commands); +void SpinnerDialogBox::enqueueAndWait(progmem_str message, progmem_str commands) { + show(message); + GOTO_SCREEN(SpinnerDialogBox); + ExtUI::injectCommands_P((const char*)commands); + mydata.auto_hide = true; } -void SpinnerDialogBox::enqueueAndWait_P(const progmem_str message, const progmem_str commands) { +void SpinnerDialogBox::enqueueAndWait(progmem_str message, char *commands) { show(message); GOTO_SCREEN(SpinnerDialogBox); - ExtUI::injectCommands_P((const char*)commands); + ExtUI::injectCommands(commands); mydata.auto_hide = true; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h index c5f0ae8e9f22..deb07285a9b9 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h @@ -34,8 +34,12 @@ class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen + static void enqueueAndWait(T commands) {enqueueAndWait(GET_TEXT_F(MSG_PLEASE_WAIT), commands);} + + static void enqueueAndWait(progmem_str message, char *commands); + static void enqueueAndWait(progmem_str message, progmem_str commands); }; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp index 2a75596a034c..eb367987940e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp @@ -84,7 +84,7 @@ void ZOffsetScreen::runWizard() { strcat(cmd, str); injectCommands(cmd); // Show instructions for user. - AlertDialogBox::show(PSTR("After the printer finishes homing, adjust the Z Offset so that a sheet of paper can pass between the nozzle and bed with slight resistance.")); + AlertDialogBox::show(F("After the printer finishes homing, adjust the Z Offset so that a sheet of paper can pass between the nozzle and bed with slight resistance.")); } bool ZOffsetScreen::wizardRunning() { From b37e851f3664f6b349f609115ffe55ef5b5b9280 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 29 Jul 2021 00:57:39 +0000 Subject: [PATCH 138/323] [cron] Bump distribution date (2021-07-29) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 5c2494d2323a..a53db6aea8c2 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-28" +//#define STRING_DISTRIBUTION_DATE "2021-07-29" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 9260d359febf..86b87a033c76 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-28" + #define STRING_DISTRIBUTION_DATE "2021-07-29" #endif /** From a70d0726caf0c3a235c1bf9047833d60b45189ed Mon Sep 17 00:00:00 2001 From: mks-viva <1224833100@qq.com> Date: Wed, 28 Jul 2021 21:56:22 -0500 Subject: [PATCH 139/323] =?UTF-8?q?=F0=9F=93=BA=20MKS=20MINI12864=20V3=20f?= =?UTF-8?q?or=20Robin=20E3P,=20etc.=20(#22453)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 4 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 78 +++++++++++++------ .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 1 + Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 2 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 3 +- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 4 +- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 1 + Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 4 +- 8 files changed, 66 insertions(+), 31 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index bdf3f48c3ab6..31b03f6b0767 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -41,7 +41,7 @@ #define BOARD_NO_NATIVE_USB // Avoid conflict with TIMER_SERVO when using the STM32 HAL -#define TEMP_TIMER 5 +#define TEMP_TIMER 5 // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -65,7 +65,7 @@ #define SD_SCK_PIN PB13 // SPI2 #define SD_MISO_PIN PB14 // SPI2 #define SD_MOSI_PIN PB15 // SPI2 -#define SPI_DEVICE 2 +#define SPI_DEVICE 2 // SPI Flash #define HAS_SPI_FLASH 1 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index c7850903e7bf..b32d0aa0b8b0 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -38,6 +38,9 @@ #define BOARD_NO_NATIVE_USB #define MKS_HARDWARE_TEST_ONLY_E0 +// Avoid conflict with TIMER_SERVO when using the STM32 HAL +#define TEMP_TIMER 5 + // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role // @@ -214,17 +217,23 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define SDIO_SUPPORT -#define SDIO_CLOCK 4500000 // 4.5 MHz -#define SD_DETECT_PIN PD12 -#define ONBOARD_SD_CS_PIN PC11 +#if SD_CONNECTION_IS(ONBOARD) + #define SDIO_SUPPORT + #define SDIO_CLOCK 4500000 // 4.5 MHz + #define SD_DETECT_PIN PD12 + #define ONBOARD_SD_CS_PIN PC11 +#elif SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS PE10 + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PE12 +#endif // // LCD / Controller // -#ifndef BEEPER_PIN - #define BEEPER_PIN PC5 -#endif /** * Note: MKS Robin TFT screens use various TFT controllers. @@ -261,33 +270,29 @@ #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - #ifndef TFT_WIDTH - #define TFT_WIDTH 480 - #endif - #ifndef TFT_HEIGHT - #define TFT_HEIGHT 320 - #endif - - #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #endif -#if HAS_SPI_GRAPHICAL_TFT +#if ENABLED(TFT_CLASSIC_UI) // Emulated DOGM SPI #define LCD_PINS_ENABLE PD13 #define LCD_PINS_RS PC6 #define BTN_ENC PE13 #define BTN_EN1 PE8 #define BTN_EN2 PE11 -#elif ENABLED(TFT_480x320_SPI) - #define TFT_DRIVER ST7796 +#elif ENABLED(TFT_COLOR_UI) #define TFT_BUFFER_SIZE 14400 #endif #if HAS_WIRED_LCD && !HAS_SPI_TFT - - // NON TFT Displays + #define BEEPER_PIN PC5 + #define BTN_ENC PE13 + #define LCD_PINS_ENABLE PD13 + #define LCD_PINS_RS PC6 + #define BTN_EN1 PE8 + #define BTN_EN2 PE11 + #define LCD_BACKLIGHT_PIN -1 #if ENABLED(MKS_MINI_12864) @@ -301,9 +306,32 @@ #define DOGLCD_SCK PA5 #define DOGLCD_MOSI PA7 - // Required for MKS_MINI_12864 with this board - #define MKS_LCD12864B - #undef SHOW_BOOTSCREEN + #elif IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define PIN_SPI_SCK PA5 + #define PIN_TFT_MISO PA6 + #define PIN_TFT_MOSI PA7 + #define TFTGLCD_CS PE8 + #endif + + #ifndef BEEPER_PIN + #define BEEPER_PIN -1 + #endif + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS PD13 + #define DOGLCD_A0 PC6 + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN PE14 + #define NEOPIXEL_PIN PE15 + #define DOGLCD_MOSI PA7 + #define DOGLCD_SCK PA5 + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + //#define LCD_SCREEN_ROT_180 #else // !MKS_MINI_12864 @@ -342,6 +370,10 @@ #define W25QXX_SCK_PIN PB13 #endif +#ifndef BEEPER_PIN + #define BEEPER_PIN PC5 +#endif + #if ENABLED(SPEAKER) && BEEPER_PIN == PC5 #error "MKS Robin nano default BEEPER_PIN is not a SPEAKER." #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index b5d02942f3c6..44c35b9d0446 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -166,6 +166,7 @@ #define DOGLCD_SCK PB13 #define FORCE_SOFT_SPI #define SOFTWARE_SPI + //#define LCD_SCREEN_ROT_180 #else diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 95d62f05a4c0..147aec5e9f83 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -37,7 +37,7 @@ #define BOARD_NO_NATIVE_USB // Avoid conflict with TIMER_SERVO when using the STM32 HAL -#define TEMP_TIMER 5 +#define TEMP_TIMER 5 // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 7bbc2b26da7f..4b0ba2fdab9a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -38,7 +38,7 @@ #define BOARD_NO_NATIVE_USB // Avoid conflict with TIMER_SERVO when using the STM32 HAL -#define TEMP_TIMER 5 +#define TEMP_TIMER 5 // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -345,6 +345,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif + //#define LCD_SCREEN_ROT_180 #else // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 34124a9b02e9..77257f818a5b 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -33,8 +33,8 @@ #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // Avoid conflict with fans and TIMER_TONE -#define TEMP_TIMER 3 -#define STEP_TIMER 5 +#define TEMP_TIMER 3 +#define STEP_TIMER 5 // // EEPROM Emulation diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 182506f11e99..6795b9289229 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -365,6 +365,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif + //#define LCD_SCREEN_ROT_180 #else // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index be6e4f8a3422..7bf148874c3f 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -45,8 +45,8 @@ // This will be difficult to solve from the Arduino IDE, without modifying the RUMBA32 variant // included with the STM32 framework. -#define STEP_TIMER 10 -#define TEMP_TIMER 14 +#define STEP_TIMER 10 +#define TEMP_TIMER 14 // // Limit Switches From 363e83731f7b045d7b3e9842882b1f53e032ca89 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 28 Jul 2021 23:24:30 -0500 Subject: [PATCH 140/323] =?UTF-8?q?=F0=9F=94=A7=20HAS=5FCUSTOM=5FPROBE=5FP?= =?UTF-8?q?IN=20=3D>=20USES=5FZ=5FMIN=5FPROBE=5FPIN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/LPC1768/inc/SanityCheck.h | 4 ++-- Marlin/src/inc/Conditionals_LCD.h | 4 ++-- Marlin/src/inc/Conditionals_post.h | 4 ++-- Marlin/src/module/endstops.cpp | 16 ++++++++-------- Marlin/src/module/endstops.h | 2 +- Marlin/src/module/probe.h | 2 +- Marlin/src/pins/pins_postprocess.h | 2 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 2 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h index 46a876a836ca..23d797b2ab76 100644 --- a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h +++ b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h @@ -146,7 +146,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #error "Serial port pins (2) conflict with other pins!" #elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN) #error "Serial port pins (2) conflict with Y endstop pin!" - #elif HAS_CUSTOM_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN) + #elif USES_Z_MIN_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN) #error "Serial port pins (2) conflict with probe pin!" #elif ANY_TX(2, X_ENABLE_PIN, Y_ENABLE_PIN) || ANY_RX(2, X_DIR_PIN, Y_DIR_PIN) #error "Serial port pins (2) conflict with X/Y stepper pins!" @@ -237,7 +237,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #define PIN_IS_SCL2(P) (P##_PIN == P0_11) #if PIN_IS_SDA2(Y_STOP) #error "i2c SDA2 overlaps with Y endstop pin!" - #elif HAS_CUSTOM_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE) + #elif USES_Z_MIN_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE) #error "i2c SDA2 overlaps with Z probe pin!" #elif PIN_IS_SDA2(X_ENABLE) || PIN_IS_SDA2(Y_ENABLE) #error "i2c SDA2 overlaps with X/Y ENABLE pin!" diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 4d6055b435bc..cd9f127e2859 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -911,9 +911,9 @@ #define HAS_PROBE_XY_OFFSET 1 #endif #if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && !BOTH(DELTA, SENSORLESS_PROBING) - #define HAS_CUSTOM_PROBE_PIN 1 + #define USES_Z_MIN_PROBE_PIN 1 #endif - #if Z_HOME_TO_MIN && (!HAS_CUSTOM_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING)) + #if Z_HOME_TO_MIN && (!USES_Z_MIN_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING)) #define HOMING_Z_WITH_PROBE 1 #endif #ifndef Z_PROBE_LOW_POINT diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index b6cf8eccb6bc..da17d18af197 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2092,7 +2092,7 @@ // // Is an endstop plug used for extra Z endstops or the probe? -#define IS_PROBE_PIN(A,M) (HAS_CUSTOM_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN) +#define IS_PROBE_PIN(A,M) (USES_Z_MIN_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN) #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_) #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_) #define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_) @@ -2166,7 +2166,7 @@ #if PIN_EXISTS(Z4_MAX) #define HAS_Z4_MAX 1 #endif -#if BOTH(HAS_BED_PROBE, HAS_CUSTOM_PROBE_PIN) && PIN_EXISTS(Z_MIN_PROBE) +#if BOTH(HAS_BED_PROBE, USES_Z_MIN_PROBE_PIN) && PIN_EXISTS(Z_MIN_PROBE) #define HAS_Z_MIN_PROBE_PIN 1 #endif diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 420acccb58b0..39aefd21d83c 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -329,7 +329,7 @@ void Endstops::init() { #endif #endif - #if HAS_CUSTOM_PROBE_PIN + #if USES_Z_MIN_PROBE_PIN #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE) SET_INPUT_PULLUP(Z_MIN_PROBE_PIN); #elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE) @@ -453,7 +453,7 @@ void Endstops::event_handler() { _ENDSTOP_HIT_TEST(K,'K') ); - #if HAS_CUSTOM_PROBE_PIN + #if USES_Z_MIN_PROBE_PIN #define P_AXIS Z_AXIS if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P'); #endif @@ -566,7 +566,7 @@ void _O2 Endstops::report_states() { #if BOTH(MARLIN_DEV_MODE, PROBE_ACTIVATION_SWITCH) print_es_state(probe_switch_activated(), PSTR(STR_PROBE_EN)); #endif - #if HAS_CUSTOM_PROBE_PIN + #if USES_Z_MIN_PROBE_PIN print_es_state(PROBE_TRIGGERED(), PSTR(STR_Z_PROBE)); #endif #if MULTI_FILAMENT_SENSOR @@ -720,7 +720,7 @@ void Endstops::update() { #if HAS_BED_PROBE // When closing the gap check the enabled probe if (probe_switch_activated()) - UPDATE_ENDSTOP_BIT(Z, TERN(HAS_CUSTOM_PROBE_PIN, MIN_PROBE, MIN)); + UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN)); #endif #if HAS_Z_MAX && !Z_SPI_SENSORLESS @@ -746,7 +746,7 @@ void Endstops::update() { COPY_LIVE_STATE(Z_MAX, Z4_MAX); #endif #endif - #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN + #elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // If this pin isn't the bed probe it's the Z endstop UPDATE_ENDSTOP_BIT(Z, MAX); #endif @@ -1021,7 +1021,7 @@ void Endstops::update() { #if HAS_Z_MIN || (Z_SPI_SENSORLESS && Z_HOME_TO_MIN) if ( TERN1(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, z_probe_enabled) - && TERN1(HAS_CUSTOM_PROBE_PIN, !z_probe_enabled) + && TERN1(USES_Z_MIN_PROBE_PIN, !z_probe_enabled) ) PROCESS_ENDSTOP_Z(MIN); #if CORE_DIAG(XZ, X, MIN) PROCESS_CORE_ENDSTOP(X,MIN,Z,MIN); @@ -1035,7 +1035,7 @@ void Endstops::update() { #endif // When closing the gap check the enabled probe - #if HAS_CUSTOM_PROBE_PIN + #if USES_Z_MIN_PROBE_PIN if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE); #endif } @@ -1043,7 +1043,7 @@ void Endstops::update() { #if HAS_Z_MAX || (Z_SPI_SENSORLESS && Z_HOME_TO_MAX) #if ENABLED(Z_MULTI_ENDSTOPS) PROCESS_ENDSTOP_Z(MAX); - #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // No probe or probe is Z_MIN || Probe is not Z_MAX + #elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // No probe or probe is Z_MIN || Probe is not Z_MAX PROCESS_ENDSTOP(Z, MAX); #endif #if CORE_DIAG(XZ, X, MIN) diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index e8365ce1ede3..f4532ca1a0f7 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -69,7 +69,7 @@ enum EndstopEnum : char { #endif // Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop) - _ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(HAS_CUSTOM_PROBE_PIN, = Z_MIN)) + _ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(USES_Z_MIN_PROBE_PIN, = Z_MIN)) // The total number of states NUM_ENDSTOP_STATES diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 62880c865f71..ce690593f229 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -38,7 +38,7 @@ }; #endif -#if HAS_CUSTOM_PROBE_PIN +#if USES_Z_MIN_PROBE_PIN #define PROBE_TRIGGERED() (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING) #else #define PROBE_TRIGGERED() (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING) diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index ac4459bd028c..f7152770e5b5 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -1134,7 +1134,7 @@ #define USE_ZMIN_PLUG #endif #undef _STOP_IN_USE -#if !HAS_CUSTOM_PROBE_PIN +#if !USES_Z_MIN_PROBE_PIN #undef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN -1 #endif diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index b21742891152..b5569c810d90 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -117,7 +117,7 @@ //#define E3_MS2_PIN ? //#define E3_MS3_PIN ? -#if HAS_CUSTOM_PROBE_PIN +#if USES_Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN 49 #endif diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 700288690817..b06de1bc696b 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -105,7 +105,7 @@ #define E2_CS_PIN 61 #endif -#if HAS_CUSTOM_PROBE_PIN +#if USES_Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN 49 #endif From cdcb45b87eef8a590ea3f7adef24a10f8dce8e9e Mon Sep 17 00:00:00 2001 From: Marcio T Date: Thu, 29 Jul 2021 17:19:49 -0600 Subject: [PATCH 141/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20FTDI=20Eve=20unico?= =?UTF-8?q?de=20and=20spinner=20dialog=20(#22459)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/extended/unicode/unicode.cpp | 10 ++++++---- .../ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp | 9 +++++---- .../ftdi_eve_touch_ui/generic/spinner_dialog_box.h | 1 + 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp index 2bb44e81d0b4..bb622c3cc563 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp @@ -68,15 +68,17 @@ utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) { utf8_char_t val = *(uint8_t*)c++; - while ((*c & 0xC0) == 0x80) - val = (val << 8) | *(uint8_t*)c++; + if ((val & 0xC0) == 0x80) + while ((*c & 0xC0) == 0x80) + val = (val << 8) | *(uint8_t*)c++; return val; } utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) { utf8_char_t val = *(uint8_t*)c++; - while ((*c & 0xC0) == 0x80) - val = (val << 8) | *(uint8_t*)c++; + if ((val & 0xC0) == 0x80) + while ((*c & 0xC0) == 0x80) + val = (val << 8) | *(uint8_t*)c++; return val; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp index 1b267698c37e..fecf407285b5 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp @@ -31,6 +31,10 @@ using namespace ExtUI; constexpr static SpinnerDialogBoxData &mydata = screen_data.SpinnerDialogBox; +void SpinnerDialogBox::onEntry() { + mydata.auto_hide = true; +} + void SpinnerDialogBox::onRedraw(draw_mode_t) { } @@ -38,6 +42,7 @@ void SpinnerDialogBox::show(progmem_str message) { drawMessage(message); drawSpinner(); storeBackground(); + GOTO_SCREEN(SpinnerDialogBox); mydata.auto_hide = false; } @@ -48,16 +53,12 @@ void SpinnerDialogBox::hide() { void SpinnerDialogBox::enqueueAndWait(progmem_str message, progmem_str commands) { show(message); - GOTO_SCREEN(SpinnerDialogBox); ExtUI::injectCommands_P((const char*)commands); - mydata.auto_hide = true; } void SpinnerDialogBox::enqueueAndWait(progmem_str message, char *commands) { show(message); - GOTO_SCREEN(SpinnerDialogBox); ExtUI::injectCommands(commands); - mydata.auto_hide = true; } void SpinnerDialogBox::onIdle() { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h index deb07285a9b9..4a561980c0ec 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h @@ -31,6 +31,7 @@ struct SpinnerDialogBoxData { class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen { public: + static void onEntry(); static void onRedraw(draw_mode_t); static void onIdle(); From 543d834a254544671bbeee937601704fc2dfad7a Mon Sep 17 00:00:00 2001 From: ellensp Date: Fri, 30 Jul 2021 11:25:06 +1200 Subject: [PATCH 142/323] =?UTF-8?q?=F0=9F=93=9D=20Document=20DGUS=20displa?= =?UTF-8?q?y=20options=20(#22443)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4adc40a19f83..1b4d6306816e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2535,11 +2535,33 @@ // DGUS Touch Display with DWIN OS. (Choose one.) // ORIGIN : https://www.aliexpress.com/item/32993409517.html // FYSETC : https://www.aliexpress.com/item/32961471929.html +// MKS : https://www.aliexpress.com/item/1005002008179262.html +// +// Flash display with DGUS Displays for Marlin: +// - Format the SD card to FAT32 with an allocation size of 4kb. +// - Download files as specified for your type of display. +// - Plug the microSD card into the back of the display. +// - Boot the display and wait for the update to complete. +// +// ORIGIN (Marlin DWIN_SET) +// - Download https://github.com/coldtobi/Marlin_DGUS_Resources +// - Copy the downloaded DWIN_SET folder to the SD card. +// +// FYSETC (Supplier default) +// - Download https://github.com/FYSETC/FYSTLCD-2.0 +// - Copy the downloaded SCREEN folder to the SD card. +// +// HIPRECY (Supplier default) +// - Download https://github.com/HiPrecy/Touch-Lcd-LEO +// - Copy the downloaded DWIN_SET folder to the SD card. +// +// MKS (MKS-H43) (Supplier default) +// - Download https://github.com/makerbase-mks/MKS-H43 +// - Copy the downloaded DWIN_SET folder to the SD card. // //#define DGUS_LCD_UI_ORIGIN //#define DGUS_LCD_UI_FYSETC //#define DGUS_LCD_UI_HIPRECY - //#define DGUS_LCD_UI_MKS #if ENABLED(DGUS_LCD_UI_MKS) #define USE_MKS_GREEN_UI From 46dc8e916f2b235dfcc73d258e66acf530cb51ee Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jul 2021 19:34:49 -0500 Subject: [PATCH 143/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=203-point=20leveling?= =?UTF-8?q?=20position?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #22457. Fixes a G29 regression from #19112. --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 729bca93a600..0c0fb0776016 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -568,7 +568,7 @@ G29_TYPE GcodeSuite::G29() { // Probe at 3 arbitrary points if (abl.abl_probe_index < abl.abl_points) { - abl.probePos = points[abl.abl_probe_index]; + abl.probePos = xy_pos_t(points[abl.abl_probe_index]); _manual_goto_xy(abl.probePos); // Disable software endstops to allow manual adjustment // If G29 is not completed, they will not be re-enabled From 99a53e2c86e95cea0427742b267b244870526304 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jul 2021 19:55:04 -0500 Subject: [PATCH 144/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=205-axis=20no=20extr?= =?UTF-8?q?uder=20compile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #22446 --- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/module/planner.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index cd9f127e2859..d47bfcb81a1b 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1060,7 +1060,7 @@ #endif // E jerk exists with JD disabled (of course) but also when Linear Advance is disabled on Delta/SCARA -#if ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE)) +#if HAS_EXTRUDERS && (ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE))) #define HAS_CLASSIC_E_JERK 1 #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index e48d05b09f6d..52ca76308cc2 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2684,7 +2684,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #ifndef TRAVEL_EXTRA_XYJERK #define TRAVEL_EXTRA_XYJERK 0 #endif - const float extra_xyjerk = (de <= 0) ? TRAVEL_EXTRA_XYJERK : 0; + const float extra_xyjerk = TERN0(HAS_EXTRUDERS, de <= 0) ? TRAVEL_EXTRA_XYJERK : 0; uint8_t limited = 0; TERN(HAS_LINEAR_E_JERK, LOOP_LINEAR_AXES, LOOP_LOGICAL_AXES)(i) { From 2b8ef7416208488dde3ff9f75912eef58bb3996b Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 30 Jul 2021 01:01:02 +0000 Subject: [PATCH 145/323] [cron] Bump distribution date (2021-07-30) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index a53db6aea8c2..7ef779ac8489 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-29" +//#define STRING_DISTRIBUTION_DATE "2021-07-30" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 86b87a033c76..264777d3a88d 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-29" + #define STRING_DISTRIBUTION_DATE "2021-07-30" #endif /** From 6eae68c402d13237e020c0b358003e618e1ecec3 Mon Sep 17 00:00:00 2001 From: George Fu Date: Fri, 30 Jul 2021 09:09:38 +0800 Subject: [PATCH 146/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Larger=20FYSETC=20?= =?UTF-8?q?S6=20I2C=20EEPROM=20size=20(#22424)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 504a86d7d08f..492383048e0d 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -50,7 +50,7 @@ // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #elif ENABLED(I2C_EEPROM) - #define MARLIN_EEPROM_SIZE 0x0800 // 2KB + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif // From 6efd7285ccbacc55402ca7b704be0f051af34097 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jul 2021 22:23:06 -0500 Subject: [PATCH 147/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20PAUSE=5FPROBE=5FDE?= =?UTF-8?q?PLOY=5FWHEN=5FTRIGGERED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #22295. Regression from #20241. --- Marlin/src/module/probe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index d585afb8b250..d0f32a32c072 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -287,7 +287,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) do { #if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED) - if (deploy == PROBE_TRIGGERED()) break; + if (deploy != PROBE_TRIGGERED()) break; #endif BUZZ(100, 659); From 14d40fb95721f0e95099f2aafea196290b218d6c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jul 2021 22:59:33 -0500 Subject: [PATCH 148/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20PAUSE=5FMESSAGE=5F?= =?UTF-8?q?PAUSING=3D>PARKING?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #22250. Regression from #17460. --- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 4 ++-- Marlin/src/lcd/extui/mks_ui/draw_dialog.h | 2 +- Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index 44cee6cb603c..a1bfb7fc8641 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -238,7 +238,7 @@ void lv_draw_dialog(uint8_t type) { lv_obj_t *labelOk = lv_label_create_empty(btnOk); // Add a label to the button lv_label_set_text(labelOk, print_file_dialog_menu.confirm); // Set the labels text } - else if (DIALOG_IS(PAUSE_MESSAGE_PAUSING, PAUSE_MESSAGE_CHANGING, PAUSE_MESSAGE_UNLOAD, PAUSE_MESSAGE_LOAD, PAUSE_MESSAGE_PURGE, PAUSE_MESSAGE_RESUME, PAUSE_MESSAGE_HEATING)) { + else if (DIALOG_IS(PAUSE_MESSAGE_PARKING, PAUSE_MESSAGE_CHANGING, PAUSE_MESSAGE_UNLOAD, PAUSE_MESSAGE_LOAD, PAUSE_MESSAGE_PURGE, PAUSE_MESSAGE_RESUME, PAUSE_MESSAGE_HEATING)) { // nothing to do } else if (DIALOG_IS(WIFI_ENABLE_TIPS)) { @@ -324,7 +324,7 @@ void lv_draw_dialog(uint8_t type) { lv_label_set_text(labelDialog, print_file_dialog_menu.print_finish); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } - else if (DIALOG_IS(PAUSE_MESSAGE_PAUSING)) { + else if (DIALOG_IS(PAUSE_MESSAGE_PARKING)) { lv_label_set_text(labelDialog, pause_msg_menu.pausing); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.h b/Marlin/src/lcd/extui/mks_ui/draw_dialog.h index e53d48a2b8b1..7e98a80c0a2b 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.h @@ -54,7 +54,7 @@ enum { DIALOG_WIFI_ENABLE_TIPS, - DIALOG_PAUSE_MESSAGE_PAUSING, + DIALOG_PAUSE_MESSAGE_PARKING, DIALOG_PAUSE_MESSAGE_CHANGING, DIALOG_PAUSE_MESSAGE_UNLOAD, DIALOG_PAUSE_MESSAGE_WAITING, diff --git a/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp index 608b3366b191..485e010251dc 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp @@ -31,7 +31,7 @@ void lv_draw_pause_message(const PauseMessage msg) { switch (msg) { - case PAUSE_MESSAGE_PAUSING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_PAUSING); break; + case PAUSE_MESSAGE_PARKING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_PARKING); break; case PAUSE_MESSAGE_CHANGING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_CHANGING); break; case PAUSE_MESSAGE_UNLOAD: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_UNLOAD); break; case PAUSE_MESSAGE_WAITING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_WAITING); break; From 84ca21edf76d1e2e4830b5fcc3b454db05cbe871 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jul 2021 23:40:27 -0500 Subject: [PATCH 149/323] =?UTF-8?q?=F0=9F=8E=A8=20abs=20=3D>=20ABS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/probe_temp_comp.cpp | 4 ++-- Marlin/src/gcode/bedlevel/G35.cpp | 6 +++--- Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp | 2 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 20 +++++++++---------- .../generic/move_axis_screen.cpp | 2 +- .../lcd/extui/mks_ui/draw_baby_stepping.cpp | 4 ++-- Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp | 4 ++-- .../src/lcd/extui/mks_ui/draw_extrusion.cpp | 2 +- .../lcd/extui/mks_ui/draw_filament_change.cpp | 4 ++-- .../src/lcd/extui/mks_ui/draw_move_motor.cpp | 2 +- Marlin/src/lcd/menu/menu_bed_corners.cpp | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Marlin/src/feature/probe_temp_comp.cpp b/Marlin/src/feature/probe_temp_comp.cpp index c9d6c6cb3fc2..e39896d4dc09 100644 --- a/Marlin/src/feature/probe_temp_comp.cpp +++ b/Marlin/src/feature/probe_temp_comp.cpp @@ -143,13 +143,13 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) { // Sanity check for (calib_idx = 0; calib_idx < measurements; ++calib_idx) { // Restrict the max. offset - if (abs(data[calib_idx]) > 2000) { + if (ABS(data[calib_idx]) > 2000) { SERIAL_ECHOLNPGM("!Invalid Z-offset detected (0-2)."); clear_offsets(tsi); return false; } // Restrict the max. offset difference between two probings - if (calib_idx > 0 && abs(data[calib_idx - 1] - data[calib_idx]) > 800) { + if (calib_idx > 0 && ABS(data[calib_idx - 1] - data[calib_idx]) > 800) { SERIAL_ECHOLNPGM("!Invalid Z-offset between two probings detected (0-0.8)."); clear_offsets(TSI_PROBE); return false; diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 44df6d9273bf..12b6f4793b24 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -130,7 +130,7 @@ void GcodeSuite::G35() { // Calculate adjusts LOOP_S_L_N(i, 1, G35_PROBE_COUNT) { const float diff = z_measured[0] - z_measured[i], - adjust = abs(diff) < 0.001f ? 0 : diff / threads_factor[(screw_thread - 30) / 10]; + adjust = ABS(diff) < 0.001f ? 0 : diff / threads_factor[(screw_thread - 30) / 10]; const int full_turns = trunc(adjust); const float decimal_part = adjust - float(full_turns); @@ -138,8 +138,8 @@ void GcodeSuite::G35() { SERIAL_ECHOPGM("Turn "); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); - SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", abs(full_turns), " turns"); - if (minutes) SERIAL_ECHOPAIR(" and ", abs(minutes), " minutes"); + SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns"); + if (minutes) SERIAL_ECHOPAIR(" and ", ABS(minutes), " minutes"); if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)"); SERIAL_EOL(); } diff --git a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp b/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp index 6c229b7aca22..97e516e70a9e 100644 --- a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp +++ b/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp @@ -121,7 +121,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze() { lastEncoderBits = newbutton; } - if (abs(temp_diff) >= ENCODER_PULSES_PER_STEP) { + if (ABS(temp_diff) >= ENCODER_PULSES_PER_STEP) { if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CW; else temp_diffState = ENCODER_DIFF_CCW; diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 0ee382838770..0c022d3e8853 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -624,25 +624,25 @@ void DGUSScreenHandler::ManualAssistLeveling(DGUS_VP_Variable &var, void *val_pt switch (point_value) { case 0x0001: - enqueue_corner_move(X_MIN_POS + abs(mks_corner_offsets[0].x), - Y_MIN_POS + abs(mks_corner_offsets[0].y), level_speed); + enqueue_corner_move(X_MIN_POS + ABS(mks_corner_offsets[0].x), + Y_MIN_POS + ABS(mks_corner_offsets[0].y), level_speed); queue.enqueue_now_P(PSTR("G28Z")); break; case 0x0002: - enqueue_corner_move(X_MAX_POS - abs(mks_corner_offsets[1].x), - Y_MIN_POS + abs(mks_corner_offsets[1].y), level_speed); + enqueue_corner_move(X_MAX_POS - ABS(mks_corner_offsets[1].x), + Y_MIN_POS + ABS(mks_corner_offsets[1].y), level_speed); break; case 0x0003: - enqueue_corner_move(X_MAX_POS - abs(mks_corner_offsets[2].x), - Y_MAX_POS - abs(mks_corner_offsets[2].y), level_speed); + enqueue_corner_move(X_MAX_POS - ABS(mks_corner_offsets[2].x), + Y_MAX_POS - ABS(mks_corner_offsets[2].y), level_speed); break; case 0x0004: - enqueue_corner_move(X_MIN_POS + abs(mks_corner_offsets[3].x), - Y_MAX_POS - abs(mks_corner_offsets[3].y), level_speed); + enqueue_corner_move(X_MIN_POS + ABS(mks_corner_offsets[3].x), + Y_MAX_POS - ABS(mks_corner_offsets[3].y), level_speed); break; case 0x0005: - enqueue_corner_move(abs(mks_corner_offsets[4].x), - abs(mks_corner_offsets[4].y), level_speed); + enqueue_corner_move(ABS(mks_corner_offsets[4].x), + ABS(mks_corner_offsets[4].y), level_speed); break; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp index ae396c4ec5dd..a3c3b503d89c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp @@ -121,7 +121,7 @@ float BaseMoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) { // being held down, this allows enough margin for the planner to // connect segments and even out the motion. constexpr xyze_feedrate_t max_manual_feedrate = MANUAL_FEEDRATE; - return min(max_manual_feedrate[axis] / 60.0f, abs(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); + return min(max_manual_feedrate[axis] / 60.0f, ABS(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); } void BaseMoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) { diff --git a/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.cpp b/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.cpp index 312353f47ed9..316519057952 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.cpp @@ -93,9 +93,9 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { has_adjust_z = 1; break; case ID_BABY_STEP_DIST: - if (abs((int)(100 * babystep_dist)) == 1) + if (ABS((int)(100 * babystep_dist)) == 1) babystep_dist = 0.05; - else if (abs((int)(100 * babystep_dist)) == 5) + else if (ABS((int)(100 * babystep_dist)) == 5) babystep_dist = 0.1; else babystep_dist = 0.01; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index a1bfb7fc8641..638d0c5ec359 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -519,7 +519,7 @@ void filament_dialog_handle() { if (uiCfg.filament_load_heat_flg) { const celsius_t diff = thermalManager.wholeDegHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp; - if (abs(diff) < 2 || diff > 0) { + if (ABS(diff) < 2 || diff > 0) { uiCfg.filament_load_heat_flg = false; lv_clear_dialog(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_LOAD_COMPLETED); @@ -535,7 +535,7 @@ void filament_dialog_handle() { if (uiCfg.filament_unload_heat_flg) { const celsius_t diff = thermalManager.wholeDegHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp; - if (abs(diff) < 2 || diff > 0) { + if (ABS(diff) < 2 || diff > 0) { uiCfg.filament_unload_heat_flg = false; lv_clear_dialog(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp index d070d249f399..2f9009bcdbdd 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp @@ -89,7 +89,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { disp_extru_amount(); break; case ID_E_STEP: - switch (abs(uiCfg.extruStep)) { + switch (ABS(uiCfg.extruStep)) { case 1: uiCfg.extruStep = 5; break; case 5: uiCfg.extruStep = 10; break; case 10: uiCfg.extruStep = 1; break; diff --git a/Marlin/src/lcd/extui/mks_ui/draw_filament_change.cpp b/Marlin/src/lcd/extui/mks_ui/draw_filament_change.cpp index a3da638be625..311894825daa 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_filament_change.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_filament_change.cpp @@ -50,7 +50,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_FILAMNT_IN: uiCfg.filament_load_heat_flg = true; - if (abs(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1 + if (ABS(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1 || gCfgItems.filament_limit_temp <= thermalManager.wholeDegHotend(uiCfg.extruderIndex)) { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_LOAD_COMPLETED); @@ -67,7 +67,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { case ID_FILAMNT_OUT: uiCfg.filament_unload_heat_flg = true; if (thermalManager.degTargetHotend(uiCfg.extruderIndex) - && (abs(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1 + && (ABS(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1 || thermalManager.wholeDegHotend(uiCfg.extruderIndex) >= gCfgItems.filament_limit_temp) ) { lv_clear_filament_change(); diff --git a/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp index 19abb855f544..7a37dc6a1556 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp @@ -75,7 +75,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_M_STEP: - if (abs(10 * (int)uiCfg.move_dist) == 100) + if (ABS(10 * (int)uiCfg.move_dist) == 100) uiCfg.move_dist = 0.1; else uiCfg.move_dist *= 10.0f; diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index 767c8188519a..e0c694673e2a 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -87,7 +87,7 @@ constexpr int lco[] = LEVEL_CORNERS_LEVELING_ORDER; constexpr bool level_corners_3_points = COUNT(lco) == 2; static_assert(level_corners_3_points || COUNT(lco) == 4, "LEVEL_CORNERS_LEVELING_ORDER must have exactly 2 or 4 corners."); -constexpr int lcodiff = abs(lco[0] - lco[1]); +constexpr int lcodiff = ABS(lco[0] - lco[1]); static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two LEVEL_CORNERS_LEVELING_ORDER corners must be on the same edge."); constexpr int nr_edge_points = level_corners_3_points ? 3 : 4; From 5ecef6e584d71c2a5cbe983a2c7424c0fcffdf93 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jul 2021 23:41:48 -0500 Subject: [PATCH 150/323] =?UTF-8?q?=F0=9F=90=9B=20One-based=20G35=20point?= =?UTF-8?q?=20index=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/bedlevel/G35.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 12b6f4793b24..3d75a7691537 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -106,7 +106,7 @@ void GcodeSuite::G35() { const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true); if (isnan(z_probed_height)) { - SERIAL_ECHOPAIR("G35 failed at point ", i, " ("); + SERIAL_ECHOPAIR("G35 failed at point ", i + 1, " ("); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); SERIAL_CHAR(')'); SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y); @@ -115,7 +115,7 @@ void GcodeSuite::G35() { } if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPAIR("Probing point ", i, " ("); + DEBUG_ECHOPAIR("Probing point ", i + 1, " ("); DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); DEBUG_CHAR(')'); DEBUG_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height); From 39e5c865444000fa22f12b9ff1593dc48afb21e1 Mon Sep 17 00:00:00 2001 From: Marcio T Date: Fri, 30 Jul 2021 17:57:50 -0600 Subject: [PATCH 151/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20FTDI=20Eve=20unico?= =?UTF-8?q?de=20and=20spinner=20dialog=20(#22468)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/extended/unicode/unicode.cpp | 4 ++-- .../extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp index bb622c3cc563..2da5d55ff0c8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp @@ -68,7 +68,7 @@ utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) { utf8_char_t val = *(uint8_t*)c++; - if ((val & 0xC0) == 0x80) + if ((val & 0xC0) == 0xC0) while ((*c & 0xC0) == 0x80) val = (val << 8) | *(uint8_t*)c++; return val; @@ -76,7 +76,7 @@ utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) { utf8_char_t val = *(uint8_t*)c++; - if ((val & 0xC0) == 0x80) + if ((val & 0xC0) == 0xC0) while ((*c & 0xC0) == 0x80) val = (val << 8) | *(uint8_t*)c++; return val; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp index fecf407285b5..47bb0eebdba9 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp @@ -49,6 +49,7 @@ void SpinnerDialogBox::show(progmem_str message) { void SpinnerDialogBox::hide() { CommandProcessor cmd; cmd.stop().execute(); + GOTO_PREVIOUS(); } void SpinnerDialogBox::enqueueAndWait(progmem_str message, progmem_str commands) { @@ -66,7 +67,6 @@ void SpinnerDialogBox::onIdle() { if (mydata.auto_hide && !commandsInQueue()) { mydata.auto_hide = false; hide(); - GOTO_PREVIOUS(); } } From 1fed25c44020224c9499eac73422657b53783e74 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 30 Jul 2021 19:39:38 -0500 Subject: [PATCH 152/323] =?UTF-8?q?=F0=9F=94=A8=20Fix:=20BIGTREE=5FE3=5FRR?= =?UTF-8?q?F=20doesn't=20use=20user=20RX/TX=20sizes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #22466. Regression from #22377. --- ini/stm32f4.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 04fd03bf7269..2b77bf2e3c91 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -152,6 +152,7 @@ extends = stm32_variant board = marlin_STM32F407VGT6_CCM board_build.variant = MARLIN_BIGTREE_E3_RRF board_build.offset = 0x8000 +extra_scripts = ${common.extra_scripts} build_flags = ${stm32_variant.build_flags} -DSTM32F407_5VX -DSERIAL_RX_BUFFER_SIZE=255 From 9e68aea8a14339d71aac5ab2274905af29e44464 Mon Sep 17 00:00:00 2001 From: ellensp Date: Sat, 31 Jul 2021 12:50:22 +1200 Subject: [PATCH 153/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20DGUS=20displays=20?= =?UTF-8?q?compile=20(#22464)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/dgus/DGUSDisplay.h | 6 +- .../lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp | 49 ++++++++------- .../extui/dgus/fysetc/DGUSScreenHandler.cpp | 13 +++- .../lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp | 60 +++++++++---------- .../extui/dgus/hiprecy/DGUSScreenHandler.cpp | 6 +- .../lcd/extui/dgus/origin/DGUSDisplayDef.cpp | 20 +++---- .../lcd/extui/dgus/origin/DGUSDisplayDef.h | 22 +++---- .../extui/dgus/origin/DGUSScreenHandler.cpp | 7 ++- 8 files changed, 100 insertions(+), 83 deletions(-) diff --git a/Marlin/src/lcd/extui/dgus/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus/DGUSDisplay.h index f1071f6b0a13..ed8178449d17 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSDisplay.h +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplay.h @@ -108,14 +108,14 @@ class DGUSDisplay { static bool Initialized, no_reentrance; }; -#define GET_VARIABLE(f, t, V...) (&DGUSDisplay::GetVariable) -#define SET_VARIABLE(f, t, V...) (&DGUSDisplay::SetVariable) - extern DGUSDisplay dgusdisplay; // compile-time x^y constexpr float cpow(const float x, const int y) { return y == 0 ? 1.0 : x * cpow(x, y - 1); } +/// +const uint16_t* DGUSLCD_FindScreenVPMapList(uint8_t screen); + /// Find the flash address of a DGUS_VP_Variable for the VP. const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp); diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp index 79f39f93d80b..39cb6e2bef02 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp @@ -41,7 +41,10 @@ uint16_t distanceToMove = 10; #endif -const uint16_t VPList_Boot[] PROGMEM = { VP_MARLIN_VERSION, 0x0000 }; +const uint16_t VPList_Boot[] PROGMEM = { + VP_MARLIN_VERSION, + 0x0000 +}; const uint16_t VPList_Main[] PROGMEM = { // VP_M117, for completeness, but it cannot be auto-uploaded. @@ -101,7 +104,7 @@ const uint16_t VPList_Status[] PROGMEM = { }; const uint16_t VPList_Status2[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ + // VP_M117, for completeness, but it cannot be auto-uploaded #if HAS_HOTEND VP_Flowrate_E0, #if HAS_MULTI_EXTRUDER @@ -286,28 +289,28 @@ const uint16_t VPList_Z_Offset[] PROGMEM = { }; const struct VPMapping VPMap[] PROGMEM = { - { DGUSLCD_SCREEN_BOOT, VPList_Boot }, - { DGUSLCD_SCREEN_MAIN, VPList_Main }, - { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, - { DGUSLCD_SCREEN_STATUS, VPList_Status }, - { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, - { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, - { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, - { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, - { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, - { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, - { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_BOOT, VPList_Boot }, + { DGUSLCD_SCREEN_MAIN, VPList_Main }, + { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, + { DGUSLCD_SCREEN_STATUS, VPList_Status }, + { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, + { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, + { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, + { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, + { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, + { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, { DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation }, - { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, - { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, - { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, - { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, - { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, - { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, - { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, - { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, - { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, - { DGUSLCD_SCREEN_INFOS, VPList_Infos }, + { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, + { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, + { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, + { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, + { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, + { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, + { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, + { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, + { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, + { DGUSLCD_SCREEN_INFOS, VPList_Infos }, { 0 , nullptr } // List is terminated with an nullptr as table entry. }; diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp index 78828e14c50b..0012a0e5e07f 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -42,6 +42,8 @@ #if ENABLED(SDSUPPORT) + static ExtUI::FileList filelist; + void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; if (touched_nr > filelist.count()) return; @@ -83,7 +85,7 @@ case 1: // Pause - GotoScreen(MKSLCD_SCREEN_PAUSE); + GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION); if (!ExtUI::isPrintingFromMediaPaused()) { ExtUI::pausePrint(); //ExtUI::mks_pausePrint(); @@ -409,8 +411,15 @@ bool DGUSScreenHandler::loop() { if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid())) booted = true; - if (!booted && ELAPSED(ms, TERN(USE_MKS_GREEN_UI, 1000, BOOTSCREEN_TIMEOUT))) + if (!booted && ELAPSED(ms, BOOTSCREEN_TIMEOUT)) { booted = true; + + if (TERN0(POWER_LOSS_RECOVERY, recovery.valid())) + GotoScreen(DGUSLCD_SCREEN_POWER_LOSS); + else + GotoScreen(DGUSLCD_SCREEN_MAIN); + } + #endif return IsScreenComplete(); } diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp index 3d0e073e5c3a..f1f4308d2261 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp @@ -47,7 +47,7 @@ const uint16_t VPList_Boot[] PROGMEM = { }; const uint16_t VPList_Main[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded. */ + // VP_M117, for completeness, but it cannot be auto-uploaded. #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS, #if HOTENDS >= 2 @@ -83,7 +83,7 @@ const uint16_t VPList_Temp[] PROGMEM = { }; const uint16_t VPList_Status[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ + // VP_M117, for completeness, but it cannot be auto-uploaded #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #if HOTENDS >= 2 @@ -104,7 +104,7 @@ const uint16_t VPList_Status[] PROGMEM = { }; const uint16_t VPList_Status2[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ + // VP_M117, for completeness, but it cannot be auto-uploaded #if HAS_HOTEND VP_Flowrate_E0, #if HOTENDS >= 2 @@ -292,28 +292,28 @@ const uint16_t VPList_Z_Offset[] PROGMEM = { }; const struct VPMapping VPMap[] PROGMEM = { - { DGUSLCD_SCREEN_BOOT, VPList_Boot }, - { DGUSLCD_SCREEN_MAIN, VPList_Main }, - { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, - { DGUSLCD_SCREEN_STATUS, VPList_Status }, - { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, - { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, - { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, - { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, - { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, - { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, - { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, - { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_BOOT, VPList_Boot }, + { DGUSLCD_SCREEN_MAIN, VPList_Main }, + { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, + { DGUSLCD_SCREEN_STATUS, VPList_Status }, + { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, + { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, + { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, + { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, + { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, + { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, + { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, { DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation }, - { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, - { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, - { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, - { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, - { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, - { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, - { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, - { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, - { DGUSLCD_SCREEN_INFOS, VPList_Infos }, + { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, + { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, + { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, + { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, + { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, + { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, + { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, + { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, + { DGUSLCD_SCREEN_INFOS, VPList_Infos }, { 0 , nullptr } // List is terminated with an nullptr as table entry. }; @@ -395,7 +395,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr), VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), - #if ENABLED(PIDTEMP) + #if ENABLED(PIDTEMPBED) VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), @@ -445,11 +445,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), - VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), + VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr), VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr), VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr), diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp index eab5e2750737..2100febc3279 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -22,7 +22,7 @@ #include "../../../../inc/MarlinConfigPre.h" -#if ENABLED(DGUS_LCD_UI_HYPRECY) +#if ENABLED(DGUS_LCD_UI_HIPRECY) #include "../DGUSScreenHandler.h" @@ -42,6 +42,8 @@ #if ENABLED(SDSUPPORT) + static ExtUI::FileList filelist; + void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; if (touched_nr > filelist.count()) return; @@ -415,4 +417,4 @@ bool DGUSScreenHandler::loop() { return IsScreenComplete(); } -#endif // DGUS_LCD_UI_HYPRECY +#endif // DGUS_LCD_UI_HIPRECY diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp index af57f3dccc47..39d89fc174c0 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp @@ -50,7 +50,7 @@ const uint16_t VPList_Boot[] PROGMEM = { }; const uint16_t VPList_Main[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded. */ + // VP_M117, for completeness, but it cannot be auto-uploaded. 0x0000 }; @@ -68,7 +68,7 @@ const uint16_t VPList_Temp[] PROGMEM = { }; const uint16_t VPList_Status[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ + // VP_M117, for completeness, but it cannot be auto-uploaded #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #if HOTENDS >= 2 @@ -162,8 +162,8 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Temperature Data #if HAS_HOTEND - VPHELPER(VP_T_E0_Is, nullptr, nullptr, SET_VARIABLE(getActualTemp_celsius, E0, long)), - VPHELPER(VP_T_E0_Set, nullptr, GET_VARIABLE(setTargetTemp_celsius, E0), SET_VARIABLE(getTargetTemp_celsius, E0)), + VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), + VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), VPHELPER(VP_Flowrate_E0, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr), @@ -194,7 +194,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { #endif #endif #if HAS_HEATED_BED - VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr), VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), @@ -247,11 +247,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), - VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), + VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr), VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr), VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr), diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h index 7885621d0b1b..06f0dcf00159 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h @@ -24,17 +24,17 @@ #include "../DGUSDisplayDef.h" enum DGUSLCD_Screens : uint8_t { - DGUSLCD_SCREEN_BOOT = 0, - DGUSLCD_SCREEN_MAIN = 10, - DGUSLCD_SCREEN_TEMPERATURE = 20, - DGUSLCD_SCREEN_STATUS = 30, - DGUSLCD_SCREEN_STATUS2 = 32, - DGUSLCD_SCREEN_MANUALMOVE = 40, - DGUSLCD_SCREEN_MANUALEXTRUDE = 42, - DGUSLCD_SCREEN_FANANDFEEDRATE = 44, - DGUSLCD_SCREEN_FLOWRATES = 46, - DGUSLCD_SCREEN_SDFILELIST = 50, - DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52, + DGUSLCD_SCREEN_BOOT = 0, + DGUSLCD_SCREEN_MAIN = 10, + DGUSLCD_SCREEN_TEMPERATURE = 20, + DGUSLCD_SCREEN_STATUS = 30, + DGUSLCD_SCREEN_STATUS2 = 32, + DGUSLCD_SCREEN_MANUALMOVE = 40, + DGUSLCD_SCREEN_MANUALEXTRUDE = 42, + DGUSLCD_SCREEN_FANANDFEEDRATE = 44, + DGUSLCD_SCREEN_FLOWRATES = 46, + DGUSLCD_SCREEN_SDFILELIST = 50, + DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52, DGUSLCD_SCREEN_POWER_LOSS = 100, DGUSLCD_SCREEN_PREHEAT = 120, DGUSLCD_SCREEN_UTILITY = 110, diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp index 70efb355fcda..827d74967a19 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -85,7 +85,7 @@ case 1: // Pause - GotoScreen(MKSLCD_SCREEN_PAUSE); + GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION); if (!ExtUI::isPrintingFromMediaPaused()) { ExtUI::pausePrint(); //ExtUI::mks_pausePrint(); @@ -411,9 +411,12 @@ bool DGUSScreenHandler::loop() { if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid())) booted = true; - if (!booted && ELAPSED(ms, TERN(USE_MKS_GREEN_UI, 1000, BOOTSCREEN_TIMEOUT))) + if (!booted && ELAPSED(ms, BOOTSCREEN_TIMEOUT)) { booted = true; + GotoScreen(TERN0(POWER_LOSS_RECOVERY, recovery.valid()) ? DGUSLCD_SCREEN_POWER_LOSS : DGUSLCD_SCREEN_MAIN); + } #endif + return IsScreenComplete(); } From d9ab20ec27599d99f0a7fa901086687a6d9139d5 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 31 Jul 2021 01:01:28 +0000 Subject: [PATCH 154/323] [cron] Bump distribution date (2021-07-31) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 7ef779ac8489..25cd5410adff 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-30" +//#define STRING_DISTRIBUTION_DATE "2021-07-31" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 264777d3a88d..d2999cde5e93 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-30" + #define STRING_DISTRIBUTION_DATE "2021-07-31" #endif /** From b6f720ca1ae1fb3a9998db168cbb4e87e14df9e8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 30 Jul 2021 22:43:58 -0500 Subject: [PATCH 155/323] =?UTF-8?q?=E2=9C=85=20Custom=20logging=20for=20MB?= =?UTF-8?q?L?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 14 +++++--------- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 13 +++++++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 0c0fb0776016..a88e08947922 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -217,6 +217,8 @@ class G29_State { * There's no extra effect if you have a fixed Z probe. */ G29_TYPE GcodeSuite::G29() { + DEBUG_SECTION(log_G29, "G29", DEBUGGING(LEVELING)); + TERN_(PROBE_MANUALLY, static) G29_State abl; TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE)); @@ -227,11 +229,7 @@ G29_TYPE GcodeSuite::G29() { // G29 Q is also available if debugging #if ENABLED(DEBUG_LEVELING_FEATURE) - const uint8_t old_debug_flags = marlin_debug_flags; - if (seenQ) marlin_debug_flags |= MARLIN_DEBUG_LEVELING; - DEBUG_SECTION(log_G29, "G29", DEBUGGING(LEVELING)); - if (DEBUGGING(LEVELING)) log_machine_info(); - marlin_debug_flags = old_debug_flags; + if (seenQ || DEBUGGING(LEVELING)) log_machine_info(); if (DISABLED(PROBE_MANUALLY) && seenQ) G29_RETURN(false); #endif @@ -472,10 +470,8 @@ G29_TYPE GcodeSuite::G29() { // Query G29 status if (abl.verbose_level || seenQ) { SERIAL_ECHOPGM("Manual G29 "); - if (g29_in_progress) { - SERIAL_ECHOPAIR("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points)); - SERIAL_ECHOLNPAIR(" of ", abl.abl_points); - } + if (g29_in_progress) + SERIAL_ECHOLNPAIR("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points); else SERIAL_ECHOLNPGM("idle"); } diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 03f2c58e81c6..984e008d2782 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -42,6 +42,9 @@ #include "../../../lcd/extui/ui_api.h" #endif +#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) +#include "../../../core/debug_out.h" + // Save 130 bytes with non-duplication of PSTR inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM(" not entered."); } @@ -59,6 +62,16 @@ inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM(" * S5 Reset and disable mesh */ void GcodeSuite::G29() { + DEBUG_SECTION(log_G29, "G29", true); + + // G29 Q is also available if debugging + #if ENABLED(DEBUG_LEVELING_FEATURE) + const bool seenQ = parser.seen_test('Q'); + if (seenQ || DEBUGGING(LEVELING)) { + log_machine_info(); + if (seenQ) return; + } + #endif TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE)); From 35b0083dfee0f5508d1ecfd4756ebcac8892b067 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 30 Jul 2021 23:05:53 -0500 Subject: [PATCH 156/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20custom=20menus=20o?= =?UTF-8?q?n=20TFT=20LVGL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #21423. Regression from #18177. --- Marlin/src/inc/Conditionals_adv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 55ae6ec535ab..c259750c6f6e 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -969,7 +969,7 @@ #endif #if BOTH(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN) - #define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N)) + #define _HAS_1(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE)) #define HAS_USER_ITEM(V...) DO(HAS,||,V) #else #define HAS_USER_ITEM(N) 0 From 002c500b7185284b0644b3ccbd60d95f7c4bb713 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 31 Jul 2021 06:49:12 +0200 Subject: [PATCH 157/323] =?UTF-8?q?=F0=9F=94=A8=20Update=20Longer=20and=20?= =?UTF-8?q?Chitu=20envs=20(#22467)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/stm32f1.ini | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 175d0e45b066..029763b9eddd 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -333,6 +333,7 @@ platform = ${common_stm32.platform} extends = stm32_variant board = genericSTM32F103VE board_build.variant = MARLIN_F103Vx +board_build.rename = project.bin board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 build_flags = ${stm32_variant.build_flags} @@ -342,7 +343,6 @@ build_flags = ${stm32_variant.build_flags} build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED extra_scripts = ${stm32_variant.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py # # TRIGORILLA PRO (STM32F103ZET6) @@ -363,8 +363,6 @@ board_build.variant = MARLIN_F103Zx build_flags = ${stm32_variant.build_flags} -DSTM32F1xx -DSTM32_XL_DENSITY build_unflags = ${stm32_variant.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= - -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 extra_scripts = ${stm32_variant.extra_scripts} buildroot/share/PlatformIO/scripts/chitu_crypt.py From 332dde935d58906e31a2e5f6d03e280f7c9c0919 Mon Sep 17 00:00:00 2001 From: mks-viva <1224833100@qq.com> Date: Sat, 31 Jul 2021 00:47:30 -0500 Subject: [PATCH 158/323] =?UTF-8?q?=E2=9C=A8=20MKS=20Monster8=20board=20(#?= =?UTF-8?q?22455)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 8 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 4 +- Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 372 ++++++++++++++++++ ini/stm32f4.ini | 50 ++- 5 files changed, 428 insertions(+), 8 deletions(-) create mode 100644 Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index b5b33692a026..ba3c9f978c63 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -385,10 +385,10 @@ #define BOARD_MKS_ROBIN2 4224 // MKS_ROBIN2 (STM32F407ZE) #define BOARD_MKS_ROBIN_PRO_V2 4225 // MKS Robin Pro V2 (STM32F407VE) #define BOARD_MKS_ROBIN_NANO_V3 4226 // MKS Robin Nano V3 (STM32F407VG) -#define BOARD_ANET_ET4 4227 // ANET ET4 V1.x (STM32F407VGT6) -#define BOARD_ANET_ET4P 4228 // ANET ET4P V1.x (STM32F407VGT6) -#define BOARD_FYSETC_CHEETAH_V20 4229 // FYSETC Cheetah V2.0 - +#define BOARD_MKS_MONSTER8 4227 // MKS Monster8 (STM32F407VGT6) +#define BOARD_ANET_ET4 4228 // ANET ET4 V1.x (STM32F407VGT6) +#define BOARD_ANET_ET4P 4229 // ANET ET4P V1.x (STM32F407VGT6) +#define BOARD_FYSETC_CHEETAH_V20 4230 // FYSETC Cheetah V2.0 // // ARM Cortex M7 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index f37028f15a65..d648b25efb13 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -204,8 +204,8 @@ #if ENABLED(DWIN_CREALITY_LCD) #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue." - /** - * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo + /** + * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo * ______ ______ RX 8 --> 5 P0_15 * 5V | 1 2 | GND 5V | 1 2 | GND TX 7 --> 9 P0_16 * (BTN_E1) A | 3 4 | B (BTN_E2) (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) BEEPER 5 --> 10 P2_08 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index a4ef4f080c54..b3e16056136f 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -631,6 +631,8 @@ #include "stm32f4/pins_ANET_ET4P.h" // STM32F4 env:Anet_ET4_OpenBLT #elif MB(FYSETC_CHEETAH_V20) #include "stm32f4/pins_FYSETC_CHEETAH_V20.h" // STM32F4 env:FYSETC_CHEETAH_V20 +#elif MB(MKS_MONSTER8) + #include "stm32f4/pins_MKS_MONSTER8.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc // // ARM Cortex M7 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h new file mode 100644 index 000000000000..939edc60522c --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -0,0 +1,372 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 3 || E_STEPPERS > 5 + #error "MKS Monster supports up to 3 hotends and 5 E-steppers." +#elif HAS_FSMC_TFT + #error "MKS Monster doesn't support FSMC-based TFT displays." +#endif + +#define BOARD_INFO_NAME "MKS Monster8 V1.x" + +// USB Flash Drive support +#define HAS_OTG_USB_HOST_SUPPORT + +//#define DISABLE_DEBUG + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 10 + +// Use one of these or SDCard-based Emulation will be used +//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation +//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation +#define I2C_EEPROM // Need use jumpers set i2c for EEPROM +#define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#define I2C_SCL_PIN PB8 // I2C_SCL and CAN_RX +#define I2C_SDA_PIN PB9 // I2C_SDA and CAN_TX + +// +// Servos +// +#define SERVO0_PIN PA8 // Enable BLTOUCH + +// +// Limit Switches for diag signal +// +#define X_DIAG_PIN PA14 // Driver0 diag signal is connect to X- +#define Y_DIAG_PIN PA15 // Driver1 diag signal is connect to Y- +#define Z_DIAG_PIN PB13 // Driver2 diag signal is connect to Z- +#define E0_DIAG_PIN PA13 // Driver3 diag signal is connect to X+ +#define E1_DIAG_PIN PC5 // Driver4 diag signal is connect to Y+ +#define E2_DIAG_PIN PB12 // Driver5 diag signal is connect to Z+ +#define E3_DIAG_PIN -1 // Driver6 diag signal is not connect +#define E4_DIAG_PIN -1 // Driver7 diag signal is not connect + +// Limit Switches for endstop +#define X_MIN_PIN PA14 +#define X_MAX_PIN PA13 +#define Y_MIN_PIN PA15 +#define Y_MAX_PIN PC5 +#define Z_MIN_PIN PB13 +#define Z_MAX_PIN PB12 + +// +// Steppers +// Driver 0 1 2 3 4 5 6 7 +// For X Y Z E0 E1 E2 E3 E4(default pin settings) +// +//Driver0 +#define X_ENABLE_PIN PC15 +#define X_STEP_PIN PC14 +#define X_DIR_PIN PC13 +#ifndef X_CS_PIN + #define X_CS_PIN PE6 +#endif +//Driver1 +#define Y_ENABLE_PIN PC15 +#define Y_STEP_PIN PE5 +#define Y_DIR_PIN PE4 +#ifndef Y_CS_PIN + #define Y_CS_PIN PE3 +#endif +//Driver2 +#define Z_ENABLE_PIN PE2 +#define Z_STEP_PIN PE1 +#define Z_DIR_PIN PE0 +#ifndef Z_CS_PIN + #define Z_CS_PIN PB7 +#endif +//Driver3 +#define E0_ENABLE_PIN PB6 +#define E0_STEP_PIN PB5 +#define E0_DIR_PIN PB4 +#ifndef E0_CS_PIN + #define E0_CS_PIN PB3 +#endif +//Driver4 +#define E1_ENABLE_PIN PD7 +#define E1_STEP_PIN PD6 +#define E1_DIR_PIN PD5 +#ifndef E1_CS_PIN + #define E1_CS_PIN PD4 +#endif +//Driver5 +#define E2_ENABLE_PIN PD3 +#define E2_STEP_PIN PD2 +#define E2_DIR_PIN PD1 +#ifndef E2_CS_PIN + #define E2_CS_PIN PD0 +#endif +//Driver6 +#define E3_ENABLE_PIN PC8 +#define E3_STEP_PIN PC7 +#define E3_DIR_PIN PC6 +#ifndef E3_CS_PIN + #define E3_CS_PIN PD15 +#endif +//Driver7 +#define E4_ENABLE_PIN PD14 +#define E4_STEP_PIN PD13 +#define E4_DIR_PIN PD12 +#ifndef E4_CS_PIN + #define E4_CS_PIN PD11 +#endif + +// +// Software SPI pins for TMC2130 stepper drivers +// This board only supports SW SPI for stepper drivers +// +#if HAS_TMC_SPI + #define TMC_USE_SW_SPI +#endif +#if ENABLED(TMC_USE_SW_SPI) + #if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 + #define TMC_SW_MOSI PE14 + #endif + #if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 + #define TMC_SW_MISO PE13 + #endif + #if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 + #define TMC_SW_SCK PE12 + #endif +#endif + +#if HAS_TMC_UART + // + // Software serial + // No Hardware serial for steppers + // + #define X_SERIAL_TX_PIN PE6 + #define X_SERIAL_RX_PIN PE6 + + #define Y_SERIAL_TX_PIN PE3 + #define Y_SERIAL_RX_PIN PE3 + + #define Z_SERIAL_TX_PIN PB7 + #define Z_SERIAL_RX_PIN PB7 + + #define E0_SERIAL_TX_PIN PB3 + #define E0_SERIAL_RX_PIN PB3 + + #define E1_SERIAL_TX_PIN PD4 + #define E1_SERIAL_RX_PIN PD4 + + #define E2_SERIAL_TX_PIN PD0 + #define E2_SERIAL_RX_PIN PD0 + + #define E3_SERIAL_TX_PIN PD15 + #define E3_SERIAL_RX_PIN PD15 + + #define E4_SERIAL_TX_PIN PD11 + #define E4_SERIAL_RX_PIN PD11 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC1 // TH0 +#define TEMP_1_PIN PC2 // TH1 +#define TEMP_2_PIN PC3 // TH2 +#define TEMP_BED_PIN PC0 // TB + +// +// Heaters / Fans +// +#define HEATER_0_PIN PB1 // HE0 +#define HEATER_1_PIN PB0 // HE1 +#define HEATER_2_PIN PA3 // HE2 +#define HEATER_BED_PIN PB10 // H-BED + +#define FAN_PIN PA2 // FAN0 +#define FAN1_PIN PA1 // FAN1 +#define FAN2_PIN PA0 // FAN2 + +// +// Misc. Functions +// +#define MT_DET_1 Y_MAX_PIN +#define MT_DET_2 Z_MAX_PIN +#define PW_DET Y_MAX_PIN +#define PW_OFF Z_MAX_PIN + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN MT_DET_1 +#endif +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN MT_DET_2 +#endif + +#define POWER_LOSS_PIN PW_DET +#define PS_ON_PIN PW_OFF + +// Random Info +#define USB_SERIAL -1 // USB Serial + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +// +// Onboard SD card +// +// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled +#if SD_CONNECTION_IS(ONBOARD) + #define ENABLE_SPI3 + #define SD_SS_PIN -1 + #define SDSS PC9 + #define SD_SCK_PIN PC10 + #define SD_MISO_PIN PC11 + #define SD_MOSI_PIN PC12 + #define SD_DETECT_PIN PC4 +// +// LCD SD +// +#elif SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS PA4 + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PB11 +#endif + +/** + * _____ _____ + * (BEEPER)PB2 | · · | PE10(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) + * (LCD_EN)PE11 | · · | PD10(LCD_RS) (BTN_EN1) PE9 | · · | PA4 (SPI1 CS) + * (LCD_D4)PD9 | · · PD8(LCD_D5) (BTN_EN2) PE8 | · · PA7 (SPI1 MOSI) + * (LCD_D6)PE15 | · · | PE7(LCD_D7) (SPI1_RS) PB11 | · · | RESET + * GND | · · | 5V GND | · · | 3.3V + *  ̄ ̄ ̄  ̄ ̄ ̄ + * EXP1 EXP2 + */ + +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -17253 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11579 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 514 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -24 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + + #define TFT_CS_PIN PE15 + #define TFT_SCK_PIN PA5 + #define TFT_MISO_PIN PA6 + #define TFT_MOSI_PIN PA7 + #define TFT_DC_PIN PE7 + #define TFT_RST_PIN PD10 + #define TFT_A0_PIN TFT_DC_PIN + + #define TFT_RESET_PIN PD10 + #define TFT_BACKLIGHT_PIN PE11 + + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + + #define LCD_BACKLIGHT_PIN PE11 + #ifndef TFT_WIDTH + #define TFT_WIDTH 480 + #endif + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #define TOUCH_CS_PIN PD9 // SPI1_NSS + #define TOUCH_SCK_PIN PA5 // SPI1_SCK + #define TOUCH_MISO_PIN PA6 // SPI1_MISO + #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI + + #define BTN_EN1 PE9 + #define BTN_EN2 PE8 + #define BEEPER_PIN PB2 + #define BTN_ENC PE10 + + #define LCD_READ_ID 0xD3 + #define LCD_USE_DMA_SPI + + #define TFT_BUFFER_SIZE 14400 + +#elif HAS_WIRED_LCD + + #define BEEPER_PIN PB2 + #define BTN_ENC PE10 + #define LCD_PINS_ENABLE PE11 + #define LCD_PINS_RS PD10 + #define BTN_EN1 PE9 + #define BTN_EN2 PE8 + #define LCD_BACKLIGHT_PIN -1 + + // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) + #if ENABLED(MKS_MINI_12864) + //#define LCD_BACKLIGHT_PIN -1 + //#define LCD_RESET_PIN -1 + #define DOGLCD_A0 PD11 + #define DOGLCD_CS PE15 + //#define DOGLCD_SCK PA5 + //#define DOGLCD_MOSI PA7 + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS PE11 + #define DOGLCD_A0 PD10 + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN PD9 + #define NEOPIXEL_PIN PD8 + #define DOGLCD_MOSI PA7 + #define DOGLCD_SCK PA5 + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + //#define LCD_SCREEN_ROT_180 + + #else + + #define LCD_PINS_D4 PD9 + #if ENABLED(ULTIPANEL) + #define LCD_PINS_D5 PD8 + #define LCD_PINS_D6 PE15 + #define LCD_PINS_D7 PE7 + #endif + + #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + + #endif // !MKS_MINI_12864 + +#endif // HAS_WIRED_LCD diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 2b77bf2e3c91..2d3b5a0f32b0 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -347,7 +347,7 @@ debug_tool = jlink upload_protocol = jlink # -# This SPI is used by Robin Nano V3 +# This I2C1(PB6:I2C1_SCL PB7:I2C1_SDA) is used by Robin Nano V3 # [stm32f4_I2C1] build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 @@ -361,8 +361,8 @@ extends = stm32_variant board = marlin_STM32F407VGT6_CCM board_build.variant = MARLIN_F4x7Vx board_build.offset = 0xC000 -board_build.rename = Robin_nano_v3.bin board_upload.offset_address = 0x0800C000 +board_build.rename = Robin_nano_v3.bin build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags} -DHAL_PCD_MODULE_ENABLED debug_tool = jlink @@ -391,3 +391,49 @@ platform = ${common_stm32.platform} extends = env:mks_robin_nano_v3_usb_flash_drive build_flags = ${env:mks_robin_nano_v3_usb_flash_drive} -DUSBD_USE_CDC_MSC + +# +# This I2C1(PB8:I2C1_SCL PB9:I2C1_SDA) is used by MKS Monster8 +# +[stm32f4_I2C1_CAN] +build_flags = -DPIN_WIRE_SCL=PB8 -DPIN_WIRE_SDA=PB9 + +# +# MKS Monster8 +# +[env:mks_monster8] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0xC000 +board_upload.offset_address = 0x0800C000 +board_build.rename = mks_monster8.bin +build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1_CAN.build_flags} + -DHAL_PCD_MODULE_ENABLED +debug_tool = jlink +upload_protocol = jlink + +# +# MKS Monster8 with USB Flash Drive Support +# Currently, using a STM32duino fork, until USB Host get merged +# +[env:mks_monster8_usb_flash_drive] +platform = ${common_stm32.platform} +extends = env:mks_monster8 +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1_CAN.build_flags} + -DUSE_USBHOST_HS + -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSE_USB_HS_IN_FS + +# +# MKS Monster8 with USB Flash Drive Support and Shared Media +# Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged +# +[env:mks_monster8_usb_flash_drive_msc] +platform = ${common_stm32.platform} +extends = env:mks_monster8_usb_flash_drive +build_flags = ${env:mks_monster8_usb_flash_drive} + -DUSBD_USE_CDC_MSC From 9bb5b10c0c9cf5a61d2bfb9dfdb6cfe210b6002b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 31 Jul 2021 05:32:13 -0500 Subject: [PATCH 159/323] =?UTF-8?q?=F0=9F=9A=9A=20Relocate=20and=20adjust?= =?UTF-8?q?=20DWIN=20E3V2=20(#22471)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 13 +- Marlin/src/MarlinCore.cpp | 10 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 2 +- Marlin/src/gcode/calibrate/G28.cpp | 2 +- Marlin/src/inc/Conditionals_LCD.h | 8 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 7 +- .../{dwin/e3v2 => e3v2/creality}/README.md | 0 .../lcd/{dwin/e3v2 => e3v2/creality}/dwin.cpp | 131 +++++++------- .../lcd/{dwin/e3v2 => e3v2/creality}/dwin.h | 147 +-------------- .../lcd/{dwin => e3v2/creality}/dwin_lcd.cpp | 29 ++- .../lcd/{dwin => e3v2/creality}/dwin_lcd.h | 168 +++++++++++++++++- .../e3v2 => e3v2/creality}/rotary_encoder.cpp | 2 +- .../e3v2 => e3v2/creality}/rotary_encoder.h | 2 +- .../ftdi_eve_touch_ui/generic/lock_screen.h | 4 +- Marlin/src/lcd/fontutils.cpp | 2 +- Marlin/src/lcd/lcdprint.h | 12 +- Marlin/src/lcd/marlinui.cpp | 13 +- Marlin/src/lcd/marlinui.h | 11 ++ Marlin/src/lcd/menu/menu_bed_corners.cpp | 2 +- Marlin/src/module/temperature.cpp | 2 +- Marlin/src/sd/cardreader.cpp | 2 +- ini/features.ini | 2 +- platformio.ini | 2 +- 23 files changed, 305 insertions(+), 268 deletions(-) rename Marlin/src/lcd/{dwin/e3v2 => e3v2/creality}/README.md (100%) rename Marlin/src/lcd/{dwin/e3v2 => e3v2/creality}/dwin.cpp (96%) rename Marlin/src/lcd/{dwin/e3v2 => e3v2/creality}/dwin.h (54%) rename Marlin/src/lcd/{dwin => e3v2/creality}/dwin_lcd.cpp (93%) rename Marlin/src/lcd/{dwin => e3v2/creality}/dwin_lcd.h (55%) rename Marlin/src/lcd/{dwin/e3v2 => e3v2/creality}/rotary_encoder.cpp (99%) rename Marlin/src/lcd/{dwin/e3v2 => e3v2/creality}/rotary_encoder.h (98%) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index d32b61cbfa83..67c875e81f6b 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1304,11 +1304,14 @@ //#define LCD_SHOW_E_TOTAL #endif -#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, EXTENSIBLE_UI) - //#define SHOW_REMAINING_TIME // Display estimated time to completion - #if ENABLED(SHOW_REMAINING_TIME) - //#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation - //#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time +// LCD Print Progress options +#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) + #if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) + //#define SHOW_REMAINING_TIME // Display estimated time to completion + #if ENABLED(SHOW_REMAINING_TIME) + //#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation + //#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time + #endif #endif #if EITHER(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 96c4d829486a..6134699aa101 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -75,8 +75,8 @@ #endif #if ENABLED(DWIN_CREALITY_LCD) - #include "lcd/dwin/e3v2/dwin.h" - #include "lcd/dwin/e3v2/rotary_encoder.h" + #include "lcd/e3v2/creality/dwin.h" + #include "lcd/e3v2/creality/rotary_encoder.h" #endif #if ENABLED(EXTENSIBLE_UI) @@ -1310,11 +1310,7 @@ void setup() { // (because EEPROM code calls the UI). #if ENABLED(DWIN_CREALITY_LCD) - delay(800); // Required delay (since boot?) - SERIAL_ECHOPGM("\nDWIN handshake "); - if (DWIN_Handshake()) SERIAL_ECHOLNPGM("ok."); else SERIAL_ECHOLNPGM("error."); - DWIN_Frame_SetDir(1); // Orientation 90° - DWIN_UpdateLCD(); // Show bootscreen (first image) + SETUP_RUN(DWIN_Startup()); #else SETUP_RUN(ui.init()); #if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index a88e08947922..29009c6e2d9a 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -61,7 +61,7 @@ #endif #if ENABLED(DWIN_CREALITY_LCD) - #include "../../../lcd/dwin/e3v2/dwin.h" + #include "../../../lcd/e3v2/creality/dwin.h" #endif #if HAS_MULTI_HOTEND diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 6baef030bfba..89ad20d906c7 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -47,7 +47,7 @@ #include "../../lcd/marlinui.h" #if ENABLED(DWIN_CREALITY_LCD) - #include "../../lcd/dwin/e3v2/dwin.h" + #include "../../lcd/e3v2/creality/dwin.h" #endif #if ENABLED(EXTENSIBLE_UI) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index d47bfcb81a1b..0ebe8e265a51 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -482,10 +482,6 @@ #endif // Aliases for LCD features -#if EITHER(IS_ULTRA_LCD, EXTENSIBLE_UI) - #define HAS_DISPLAY 1 -#endif - #if IS_ULTRA_LCD #define HAS_WIRED_LCD 1 #if ENABLED(DOGLCD) @@ -497,6 +493,10 @@ #endif #endif +#if EITHER(HAS_WIRED_LCD, EXTENSIBLE_UI) + #define HAS_DISPLAY 1 +#endif + #if ANY(HAS_DISPLAY, DWIN_CREALITY_LCD, GLOBAL_STATUS_MESSAGE) #define HAS_STATUS_MESSAGE 1 #endif diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 332481995598..5991fc3b8b73 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -791,9 +791,10 @@ void MarlinUI::draw_status_screen() { // lcd.setCursor(0, 0); - _draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position.x)), blink); lcd.write(' '); - _draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position.y)), blink); lcd.write(' '); - _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink); + const xyz_pos_t lpos = current_position.asLogical(); + _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink); lcd.write(' '); + _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink); lcd.write(' '); + _draw_axis_value(Z_AXIS, ftostr52sp(lpos.z), blink); #if HAS_LEVELING && !HAS_HEATED_BED lcd.write(planner.leveling_active || blink ? '_' : ' '); diff --git a/Marlin/src/lcd/dwin/e3v2/README.md b/Marlin/src/lcd/e3v2/creality/README.md similarity index 100% rename from Marlin/src/lcd/dwin/e3v2/README.md rename to Marlin/src/lcd/e3v2/creality/README.md diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp similarity index 96% rename from Marlin/src/lcd/dwin/e3v2/dwin.cpp rename to Marlin/src/lcd/e3v2/creality/dwin.cpp index 38017b64d697..05da343f9e43 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -42,10 +42,6 @@ #define JUST_BABYSTEP 1 #endif -#include -#include -#include - #include "../../fontutils.h" #include "../../marlinui.h" @@ -85,6 +81,10 @@ #include "../../../feature/powerloss.h" #endif +#include +#include +#include + #ifndef MACHINE_SIZE #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) #endif @@ -97,10 +97,6 @@ #define USE_STRING_HEADINGS //#define USE_STRING_TITLES -#define DWIN_FONT_MENU font8x16 -#define DWIN_FONT_STAT font10x20 -#define DWIN_FONT_HEAD font10x20 - #define MENU_CHAR_LIMIT 24 #define STATUS_Y 360 @@ -135,6 +131,9 @@ constexpr uint16_t TROWS = 6, MROWS = TROWS - 1, // Total rows, and other #define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, dwin_zoffset) +#define DWIN_BOTTOM (DWIN_HEIGHT-1) +#define DWIN_RIGHT (DWIN_WIDTH-1) + /* Value Init */ HMI_value_t HMI_ValueStruct; HMI_Flag_t HMI_flag{0}; @@ -220,11 +219,11 @@ void HMI_ToggleLanguage() { void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { if (value < 0) { - DWIN_Draw_String(false, true, size, Color_White, bColor, x - 6, y, F("-")); + DWIN_Draw_String(true, size, Color_White, bColor, x - 6, y, F("-")); DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, -value); } else { - DWIN_Draw_String(false, true, size, Color_White, bColor, x - 6, y, F(" ")); + DWIN_Draw_String(true, size, Color_White, bColor, x - 6, y, F(" ")); DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value); } } @@ -391,20 +390,20 @@ void ICON_Stop() { } } -void Clear_Title_Bar() { - DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, 0, DWIN_WIDTH, 30); +inline void Clear_Title_Bar() { + DWIN_Draw_Box(1, Color_Bg_Blue, 0, 0, DWIN_WIDTH, TITLE_HEIGHT); } void Draw_Title(const char * const title) { - DWIN_Draw_String(false, false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title); + DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title); } void Draw_Title(const __FlashStringHelper * title) { - DWIN_Draw_String(false, false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title); + DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title); } -void Clear_Menu_Area() { - DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y - 1); +inline void Clear_Menu_Area() { + DWIN_Draw_Box(1, Color_Bg_Black, 0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - TITLE_HEIGHT); } void Clear_Main_Window() { @@ -465,7 +464,7 @@ void Erase_Menu_Text(const uint8_t line) { } void Draw_Menu_Item(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) { - if (label) DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, (char*)label); + if (label) DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, (char*)label); if (icon) Draw_Menu_Icon(line, icon); if (more) Draw_More_Icon(line); } @@ -494,7 +493,8 @@ void Draw_Back_First(const bool is_sel=true) { if (is_sel) Draw_Menu_Cursor(0); } -inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, auto &valref) { +template +inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, T &valref) { if (encoder_diffState == ENCODER_DIFF_CW) valref += EncoderRate.encoderMoveValue; else if (encoder_diffState == ENCODER_DIFF_CCW) @@ -563,7 +563,7 @@ inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, auto &valr // void DWIN_Draw_Label(const uint16_t y, char *string) { - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, y, string); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, LBLX, y, string); } void DWIN_Draw_Label(const uint16_t y, const __FlashStringHelper *title) { DWIN_Draw_Label(y, (char*)title); @@ -577,7 +577,9 @@ void draw_move_en(const uint16_t line) { #endif } -void DWIN_Frame_TitleCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { DWIN_Frame_AreaCopy(id, x1, y1, x2, y2, 14, 8); } +inline void DWIN_Frame_TitleCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { + DWIN_Frame_AreaCopy(id, x1, y1, x2, y2, 14, 8); +} void Item_Prepare_Move(const uint8_t row) { if (HMI_IsChinese()) @@ -703,7 +705,7 @@ void Item_Prepare_Lang(const uint8_t row) { DWIN_Frame_AreaCopy(1, 0, 194, 121, 207, LBLX, MBASE(row)); // "Language selection" #endif } - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 226, MBASE(row), HMI_IsChinese() ? F("CN") : F("EN")); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 226, MBASE(row), HMI_IsChinese() ? F("CN") : F("EN")); Draw_Menu_Icon(row, ICON_Language); } @@ -849,7 +851,7 @@ void Draw_Tune_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 73, 2, 100, 13, 14, 9); + DWIN_Frame_TitleCopy(1, 73, 2, 100, 13); DWIN_Frame_AreaCopy(1, 116, 164, 171, 176, LBLX, MBASE(TUNE_CASE_SPEED)); #if HAS_HOTEND DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX, MBASE(TUNE_CASE_TEMP)); @@ -883,6 +885,7 @@ void Draw_Tune_Menu() { #endif DWIN_Draw_Label(MBASE(TUNE_CASE_ZOFF), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); #else + DWIN_Frame_TitleCopy(1, 94, 2, 126, 12); DWIN_Frame_AreaCopy(1, 1, 179, 92, 190, LBLX, MBASE(TUNE_CASE_SPEED)); // Print speed #if HAS_HOTEND DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX, MBASE(TUNE_CASE_TEMP)); // Hotend... @@ -1008,6 +1011,7 @@ void Draw_Motion_Menu() { // // Draw Popup Windows // + #if HAS_HOTEND || HAS_HEATED_BED void DWIN_Popup_Temperature(const bool toohigh) { @@ -1021,8 +1025,8 @@ void Draw_Motion_Menu() { DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); } else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too high")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too high")); } } else { @@ -1032,8 +1036,8 @@ void Draw_Motion_Menu() { DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); } else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too low")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too low")); } } } @@ -1052,11 +1056,11 @@ void Draw_Popup_Bkgd_60() { DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105); if (HMI_IsChinese()) { DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); - DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240); + DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 69 + 33, 240); DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280); } else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 20, 235, F("Nozzle is too cold")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 20, 235, F("Nozzle is too cold")); DWIN_ICON_Show(ICON, ICON_Confirm_E, 86, 280); } } @@ -1073,9 +1077,9 @@ void Popup_Window_Resume() { DWIN_ICON_Show(ICON, ICON_Continue_C, 146, 307); } else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 14) / 2, 115, F("Continue Print")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 192, F("It looks like the last")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 212, F("file was interrupted.")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 14) / 2, 115, F("Continue Print")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 192, F("It looks like the last")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 212, F("file was interrupted.")); DWIN_ICON_Show(ICON, ICON_Cancel_E, 26, 307); DWIN_ICON_Show(ICON, ICON_Continue_E, 146, 307); } @@ -1091,8 +1095,8 @@ void Popup_Window_Home(const bool parking/*=false*/) { DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); } else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * (parking ? 7 : 10)) / 2, 230, parking ? F("Parking") : F("Homing XYZ")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * (parking ? 7 : 10)) / 2, 230, parking ? F("Parking") : F("Homing XYZ")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); } } @@ -1107,8 +1111,8 @@ void Popup_Window_Home(const bool parking/*=false*/) { DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); } else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 13) / 2, 230, GET_TEXT_F(MSG_BED_LEVELING)); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 13) / 2, 230, GET_TEXT_F(MSG_BED_LEVELING)); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); } } @@ -1135,8 +1139,8 @@ void Popup_window_PauseOrStop() { DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280); } else { - if (select_print.now == 1) DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 11) / 2, 150, GET_TEXT_F(MSG_PAUSE_PRINT)); - else if (select_print.now == 2) DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 10) / 2, 150, GET_TEXT_F(MSG_STOP_PRINT)); + if (select_print.now == 1) DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 11) / 2, 150, GET_TEXT_F(MSG_PAUSE_PRINT)); + else if (select_print.now == 2) DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 10) / 2, 150, GET_TEXT_F(MSG_STOP_PRINT)); DWIN_ICON_Show(ICON, ICON_Confirm_E, 26, 280); DWIN_ICON_Show(ICON, ICON_Cancel_E, 146, 280); } @@ -1160,19 +1164,19 @@ void Draw_Print_ProgressBar() { DWIN_ICON_Show(ICON, ICON_Bar, 15, 93); DWIN_Draw_Rectangle(1, BarFill_Color, 16 + _card_percent * 240 / 100, 93, 256, 113); DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, 133, _card_percent); - DWIN_Draw_String(false, false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%")); + DWIN_Draw_String(false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%")); } void Draw_Print_ProgressElapsed() { duration_t elapsed = print_job_timer.duration(); // print timer DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 42, 212, elapsed.value / 3600); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 58, 212, F(":")); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 58, 212, F(":")); DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 66, 212, (elapsed.value % 3600) / 60); } void Draw_Print_ProgressRemain() { DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 176, 212, _remain_time / 3600); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":")); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":")); DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 200, 212, (_remain_time % 3600) / 60); } @@ -1189,7 +1193,7 @@ void Goto_PrintProcess() { // Copy into filebuf string before entry char * const name = card.longest_filename(); const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * MENU_CHR_W) / 2; - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, npos, 60, name); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, npos, 60, name); DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 193); DWIN_ICON_Show(ICON, ICON_RemainTime, 150, 191); @@ -1204,14 +1208,13 @@ void Goto_MainMenu() { Clear_Main_Window(); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 2, 2, 27, 14, 14, 9); // "Home" - } + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(1, 2, 2, 27, 14); // "Home" else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_MAIN)); #else - DWIN_Frame_AreaCopy(1, 0, 2, 39, 12, 14, 9); + DWIN_Frame_TitleCopy(1, 0, 2, 39, 12); #endif } @@ -1588,9 +1591,9 @@ void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y, if (force || changed || draw_qmark || draw_empty) { if (blink && draw_qmark) - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, x, y, F("???.?")); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x, y, F("???.?")); else if (blink && draw_empty) - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, x, y, F(" ")); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x, y, F(" ")); else DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, x, y, p * 10); } @@ -1706,11 +1709,11 @@ void update_variable() { _offset = BABY_Z_VAR; if (BABY_Z_VAR < 0) { DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, -_offset * 100); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); } else { DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, _offset * 100); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); } } @@ -1853,7 +1856,7 @@ void Redraw_SD_List() { } else { DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4)); - DWIN_Draw_String(false, false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media")); + DWIN_Draw_String(false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media")); } } @@ -1911,24 +1914,24 @@ void Draw_Status_Area(const bool with_update) { #if HAS_HOTEND DWIN_ICON_Show(ICON, ICON_HotendTemp, 10, 383); DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 384, thermalManager.wholeDegHotend(0)); - DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0)); DWIN_ICON_Show(ICON, ICON_StepE, 112, 417); DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); - DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); #endif #if HAS_HEATED_BED DWIN_ICON_Show(ICON, ICON_BedTemp, 10, 416); DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 417, thermalManager.wholeDegBed()); - DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed()); #endif DWIN_ICON_Show(ICON, ICON_Speed, 113, 383); DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 384, feedrate_percentage); - DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); #if HAS_FAN DWIN_ICON_Show(ICON, ICON_FanSpeed, 187, 383); @@ -1941,11 +1944,11 @@ void Draw_Status_Area(const bool with_update) { if (BABY_Z_VAR < 0) { DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, -BABY_Z_VAR * 100); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); } else { DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, BABY_Z_VAR * 100); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); } DWIN_Draw_Rectangle(1, Line_Color, 0, 449, DWIN_WIDTH, 451); @@ -1969,8 +1972,8 @@ void HMI_StartFrame(const bool with_update) { void Draw_Info_Menu() { Clear_Main_Window(); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, F(MACHINE_SIZE)); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, F(SHORT_BUILD_VERSION)); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, F(MACHINE_SIZE)); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, F(SHORT_BUILD_VERSION)); if (HMI_IsChinese()) { DWIN_Frame_TitleCopy(1, 30, 17, 57, 29); // "Info" @@ -1990,7 +1993,7 @@ void Draw_Info_Menu() { DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); DWIN_Frame_AreaCopy(1, 0, 165, 94, 175, 89, 248); } - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE)); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE)); Draw_Back_First(); LOOP_L_N(i, 3) { @@ -4007,7 +4010,7 @@ void EachMomentUpdate() { //(void)recovery.interrupted_file_exists(); char * const name = card.longest_filename(); const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * (MENU_CHR_W)) / 2; - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name); DWIN_UpdateLCD(); while (recovery_flag) { @@ -4033,7 +4036,7 @@ void EachMomentUpdate() { Goto_PrintProcess(); Draw_Status_Area(true); } - #endif + #endif // POWER_LOSS_RECOVERY DWIN_UpdateLCD(); } @@ -4124,7 +4127,7 @@ void DWIN_CompletedLeveling() { void DWIN_StatusChanged(const char *text) { DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20); const int8_t x = _MAX(0U, DWIN_WIDTH - strlen_P(text) * MENU_CHR_W) / 2; - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 2, F(text)); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 2, F(text)); DWIN_UpdateLCD(); } @@ -4136,8 +4139,8 @@ void DWIN_StatusChanged_P(PGM_P const pstr) { // GUI extension void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode=false) { - DWIN_Draw_String(false,true,font8x16,Select_Color,bcolor,x+4,y,F(mode ? "x" : " ")); - DWIN_Draw_Rectangle(0,color,x+2,y+2,x+17,y+17); + DWIN_Draw_String(true, font8x16, Select_Color, bcolor, x + 4, y, F(mode ? "x" : " ")); + DWIN_Draw_Rectangle(0, color, x + 2, y + 2, x + 17, y + 17); } #endif // DWIN_CREALITY_LCD diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.h b/Marlin/src/lcd/e3v2/creality/dwin.h similarity index 54% rename from Marlin/src/lcd/dwin/e3v2/dwin.h rename to Marlin/src/lcd/e3v2/creality/dwin.h index 4b3460aae5c5..36948678aade 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.h +++ b/Marlin/src/lcd/e3v2/creality/dwin.h @@ -25,7 +25,7 @@ * DWIN by Creality3D */ -#include "../dwin_lcd.h" +#include "dwin_lcd.h" #include "rotary_encoder.h" #include "../../../libs/BL24CXX.h" @@ -103,151 +103,6 @@ enum processID : uint8_t { Popup_Window }; -// Picture ID -#define Start_Process 0 -#define Language_English 1 -#define Language_Chinese 2 - -// ICON ID -#define ICON 0x09 -#define ICON_LOGO 0 -#define ICON_Print_0 1 -#define ICON_Print_1 2 -#define ICON_Prepare_0 3 -#define ICON_Prepare_1 4 -#define ICON_Control_0 5 -#define ICON_Control_1 6 -#define ICON_Leveling_0 7 -#define ICON_Leveling_1 8 -#define ICON_HotendTemp 9 -#define ICON_BedTemp 10 -#define ICON_Speed 11 -#define ICON_Zoffset 12 -#define ICON_Back 13 -#define ICON_File 14 -#define ICON_PrintTime 15 -#define ICON_RemainTime 16 -#define ICON_Setup_0 17 -#define ICON_Setup_1 18 -#define ICON_Pause_0 19 -#define ICON_Pause_1 20 -#define ICON_Continue_0 21 -#define ICON_Continue_1 22 -#define ICON_Stop_0 23 -#define ICON_Stop_1 24 -#define ICON_Bar 25 -#define ICON_More 26 - -#define ICON_Axis 27 -#define ICON_CloseMotor 28 -#define ICON_Homing 29 -#define ICON_SetHome 30 -#define ICON_PLAPreheat 31 -#define ICON_ABSPreheat 32 -#define ICON_Cool 33 -#define ICON_Language 34 - -#define ICON_MoveX 35 -#define ICON_MoveY 36 -#define ICON_MoveZ 37 -#define ICON_Extruder 38 - -#define ICON_Temperature 40 -#define ICON_Motion 41 -#define ICON_WriteEEPROM 42 -#define ICON_ReadEEPROM 43 -#define ICON_ResumeEEPROM 44 -#define ICON_Info 45 - -#define ICON_SetEndTemp 46 -#define ICON_SetBedTemp 47 -#define ICON_FanSpeed 48 -#define ICON_SetPLAPreheat 49 -#define ICON_SetABSPreheat 50 - -#define ICON_MaxSpeed 51 -#define ICON_MaxAccelerated 52 -#define ICON_MaxJerk 53 -#define ICON_Step 54 -#define ICON_PrintSize 55 -#define ICON_Version 56 -#define ICON_Contact 57 -#define ICON_StockConfiguraton 58 -#define ICON_MaxSpeedX 59 -#define ICON_MaxSpeedY 60 -#define ICON_MaxSpeedZ 61 -#define ICON_MaxSpeedE 62 -#define ICON_MaxAccX 63 -#define ICON_MaxAccY 64 -#define ICON_MaxAccZ 65 -#define ICON_MaxAccE 66 -#define ICON_MaxSpeedJerkX 67 -#define ICON_MaxSpeedJerkY 68 -#define ICON_MaxSpeedJerkZ 69 -#define ICON_MaxSpeedJerkE 70 -#define ICON_StepX 71 -#define ICON_StepY 72 -#define ICON_StepZ 73 -#define ICON_StepE 74 -#define ICON_Setspeed 75 -#define ICON_SetZOffset 76 -#define ICON_Rectangle 77 -#define ICON_BLTouch 78 -#define ICON_TempTooLow 79 -#define ICON_AutoLeveling 80 -#define ICON_TempTooHigh 81 -#define ICON_NoTips_C 82 -#define ICON_NoTips_E 83 -#define ICON_Continue_C 84 -#define ICON_Continue_E 85 -#define ICON_Cancel_C 86 -#define ICON_Cancel_E 87 -#define ICON_Confirm_C 88 -#define ICON_Confirm_E 89 -#define ICON_Info_0 90 -#define ICON_Info_1 91 - -#define ICON_AdvSet ICON_Language -#define ICON_HomeOff ICON_AdvSet -#define ICON_HomeOffX ICON_StepX -#define ICON_HomeOffY ICON_StepY -#define ICON_HomeOffZ ICON_StepZ -#define ICON_ProbeOff ICON_AdvSet -#define ICON_ProbeOffX ICON_StepX -#define ICON_ProbeOffY ICON_StepY -#define ICON_PIDNozzle ICON_SetEndTemp -#define ICON_PIDbed ICON_SetBedTemp - -/** - * 3-.0:The font size, 0x00-0x09, corresponds to the font size below: - * 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28 - * 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64 - */ -#define font6x12 0x00 -#define font8x16 0x01 -#define font10x20 0x02 -#define font12x24 0x03 -#define font14x28 0x04 -#define font16x32 0x05 -#define font20x40 0x06 -#define font24x48 0x07 -#define font28x56 0x08 -#define font32x64 0x09 - -// Color -#define Color_White 0xFFFF -#define Color_Yellow 0xFF0F -#define Color_Bg_Window 0x31E8 // Popup background color -#define Color_Bg_Blue 0x1125 // Dark blue background color -#define Color_Bg_Black 0x0841 // Black background color -#define Color_Bg_Red 0xF00F // Red background color -#define Popup_Text_Color 0xD6BA // Popup font background color -#define Line_Color 0x3A6A // Split line color -#define Rectangle_Color 0xEE2F // Blue square cursor color -#define Percent_Color 0xFE29 // Percentage color -#define BarFill_Color 0x10E4 // Fill color of progress bar -#define Select_Color 0x33BB // Selected color - extern uint8_t checkkey; extern float zprobe_zoffset; extern char print_filename[16]; diff --git a/Marlin/src/lcd/dwin/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp similarity index 93% rename from Marlin/src/lcd/dwin/dwin_lcd.cpp rename to Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp index 59bc46925ad4..1ce95bd7296e 100644 --- a/Marlin/src/lcd/dwin/dwin_lcd.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp @@ -21,24 +21,24 @@ */ /******************************************************************************** - * @file dwin_lcd.cpp + * @file lcd/e3v2/creality/dwin_lcd.cpp * @author LEO / Creality3D * @date 2019/07/18 * @version 2.0.1 * @brief DWIN screen control functions ********************************************************************************/ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if ENABLED(DWIN_CREALITY_LCD) -#include "../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #include "dwin_lcd.h" #include // for memset //#define DEBUG_OUT 1 -#include "../../core/debug_out.h" +#include "../../../core/debug_out.h" // Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail. // Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters. @@ -122,6 +122,17 @@ bool DWIN_Handshake(void) { && databuf[3] == 'K' ); } +void DWIN_Startup(void) { + DEBUG_ECHOPGM("\r\nDWIN handshake "); + delay(750); // Delay here or init later in the boot process + if (DWIN_Handshake()) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error."); + DWIN_Frame_SetDir(1); + #if DISABLED(SHOW_BOOTSCREEN) + DWIN_Frame_Clear(Color_Bg_Black); // MarlinUI handles the bootscreen so just clear here + #endif + DWIN_UpdateLCD(); +} + // Set the backlight luminance // luminance: (0x00-0xFF) void DWIN_Backlight_SetLuminance(const uint8_t luminance) { @@ -164,9 +175,10 @@ void DWIN_Frame_Clear(const uint16_t color) { // width: point width 0x01-0x0F // height: point height 0x01-0x0F // x,y: upper left point -void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y) { +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y) { size_t i = 0; DWIN_Byte(i, 0x02); + DWIN_Word(i, color); DWIN_Byte(i, width); DWIN_Byte(i, height); DWIN_Word(i, x); @@ -238,8 +250,8 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, // bColor: Background color // x/y: Upper-left coordinate of the string // *string: The string -void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, - uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string) { +void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string) { + uint8_t widthAdjust = 0; size_t i = 0; DWIN_Byte(i, 0x11); // Bit 7: widthAdjust @@ -356,6 +368,7 @@ void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { DWIN_Word(i, x); DWIN_Word(i, y); DWIN_Byte(i, 0x80 | libID); + //DWIN_Byte(i, libID); DWIN_Byte(i, picID); DWIN_Send(i); } @@ -421,7 +434,7 @@ void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t pi // state: 16 bits, each bit is the state of an animation id void DWIN_ICON_AnimationControl(uint16_t state) { size_t i = 0; - DWIN_Byte(i, 0x28); + DWIN_Byte(i, 0x29); DWIN_Word(i, state); DWIN_Send(i); } diff --git a/Marlin/src/lcd/dwin/dwin_lcd.h b/Marlin/src/lcd/e3v2/creality/dwin_lcd.h similarity index 55% rename from Marlin/src/lcd/dwin/dwin_lcd.h rename to Marlin/src/lcd/e3v2/creality/dwin_lcd.h index 9ae6d076d502..e5e79df0fdb4 100644 --- a/Marlin/src/lcd/dwin/dwin_lcd.h +++ b/Marlin/src/lcd/e3v2/creality/dwin_lcd.h @@ -42,6 +42,163 @@ #define DWIN_WIDTH 272 #define DWIN_HEIGHT 480 +// Character matrix width x height +//#define LCD_WIDTH ((DWIN_WIDTH) / 8) +//#define LCD_HEIGHT ((DWIN_HEIGHT) / 12) + +// Picture ID +#define DWIN_Boot_Screen 0 +#define Language_English 1 +#define Language_Chinese 2 + +// ICON ID +#define ICON 0x09 + +#define ICON_LOGO 0 +#define ICON_Print_0 1 +#define ICON_Print_1 2 +#define ICON_Prepare_0 3 +#define ICON_Prepare_1 4 +#define ICON_Control_0 5 +#define ICON_Control_1 6 +#define ICON_Leveling_0 7 +#define ICON_Leveling_1 8 +#define ICON_HotendTemp 9 +#define ICON_BedTemp 10 +#define ICON_Speed 11 +#define ICON_Zoffset 12 +#define ICON_Back 13 +#define ICON_File 14 +#define ICON_PrintTime 15 +#define ICON_RemainTime 16 +#define ICON_Setup_0 17 +#define ICON_Setup_1 18 +#define ICON_Pause_0 19 +#define ICON_Pause_1 20 +#define ICON_Continue_0 21 +#define ICON_Continue_1 22 +#define ICON_Stop_0 23 +#define ICON_Stop_1 24 +#define ICON_Bar 25 +#define ICON_More 26 + +#define ICON_Axis 27 +#define ICON_CloseMotor 28 +#define ICON_Homing 29 +#define ICON_SetHome 30 +#define ICON_PLAPreheat 31 +#define ICON_ABSPreheat 32 +#define ICON_Cool 33 +#define ICON_Language 34 + +#define ICON_MoveX 35 +#define ICON_MoveY 36 +#define ICON_MoveZ 37 +#define ICON_Extruder 38 + +#define ICON_Temperature 40 +#define ICON_Motion 41 +#define ICON_WriteEEPROM 42 +#define ICON_ReadEEPROM 43 +#define ICON_ResumeEEPROM 44 +#define ICON_Info 45 + +#define ICON_SetEndTemp 46 +#define ICON_SetBedTemp 47 +#define ICON_FanSpeed 48 +#define ICON_SetPLAPreheat 49 +#define ICON_SetABSPreheat 50 + +#define ICON_MaxSpeed 51 +#define ICON_MaxAccelerated 52 +#define ICON_MaxJerk 53 +#define ICON_Step 54 +#define ICON_PrintSize 55 +#define ICON_Version 56 +#define ICON_Contact 57 +#define ICON_StockConfiguraton 58 +#define ICON_MaxSpeedX 59 +#define ICON_MaxSpeedY 60 +#define ICON_MaxSpeedZ 61 +#define ICON_MaxSpeedE 62 +#define ICON_MaxAccX 63 +#define ICON_MaxAccY 64 +#define ICON_MaxAccZ 65 +#define ICON_MaxAccE 66 +#define ICON_MaxSpeedJerkX 67 +#define ICON_MaxSpeedJerkY 68 +#define ICON_MaxSpeedJerkZ 69 +#define ICON_MaxSpeedJerkE 70 +#define ICON_StepX 71 +#define ICON_StepY 72 +#define ICON_StepZ 73 +#define ICON_StepE 74 +#define ICON_Setspeed 75 +#define ICON_SetZOffset 76 +#define ICON_Rectangle 77 +#define ICON_BLTouch 78 +#define ICON_TempTooLow 79 +#define ICON_AutoLeveling 80 +#define ICON_TempTooHigh 81 +#define ICON_NoTips_C 82 +#define ICON_NoTips_E 83 +#define ICON_Continue_C 84 +#define ICON_Continue_E 85 +#define ICON_Cancel_C 86 +#define ICON_Cancel_E 87 +#define ICON_Confirm_C 88 +#define ICON_Confirm_E 89 +#define ICON_Info_0 90 +#define ICON_Info_1 91 + +#define ICON_AdvSet ICON_Language +#define ICON_HomeOff ICON_AdvSet +#define ICON_HomeOffX ICON_StepX +#define ICON_HomeOffY ICON_StepY +#define ICON_HomeOffZ ICON_StepZ +#define ICON_ProbeOff ICON_AdvSet +#define ICON_ProbeOffX ICON_StepX +#define ICON_ProbeOffY ICON_StepY +#define ICON_PIDNozzle ICON_SetEndTemp +#define ICON_PIDbed ICON_SetBedTemp + +/** + * 3-.0:The font size, 0x00-0x09, corresponds to the font size below: + * 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28 + * 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64 + */ +#define font6x12 0x00 +#define font8x16 0x01 +#define font10x20 0x02 +#define font12x24 0x03 +#define font14x28 0x04 +#define font16x32 0x05 +#define font20x40 0x06 +#define font24x48 0x07 +#define font28x56 0x08 +#define font32x64 0x09 + +#define DWIN_FONT_MENU font10x20 +#define DWIN_FONT_STAT font10x20 +#define DWIN_FONT_HEAD font10x20 +#define DWIN_FONT_ALERT font14x28 + +// Color +#define Color_White 0xFFFF +#define Color_Yellow 0xFF0F +#define Color_Error_Red 0xB000 // Error! +#define Color_Bg_Red 0xF00F // Red background color +#define Color_Bg_Window 0x31E8 // Popup background color +#define Color_Bg_Blue 0x1125 // Dark blue background color +#define Color_Bg_Black 0x0841 // Black background color +#define Color_IconBlue 0x45FA // Lighter blue that matches icons/accents +#define Popup_Text_Color 0xD6BA // Popup font background color +#define Line_Color 0x3A6A // Split line color +#define Rectangle_Color 0xEE2F // Blue square cursor color +#define Percent_Color 0xFE29 // Percentage color +#define BarFill_Color 0x10E4 // Fill color of progress bar +#define Select_Color 0x33BB // Selected color + /*-------------------------------------- System variable function --------------------------------------*/ // Handshake (1: Success, 0: Fail) @@ -68,10 +225,11 @@ void DWIN_UpdateLCD(void); void DWIN_Frame_Clear(const uint16_t color); // Draw a point +// color: point color // width: point width 0x01-0x0F // height: point height 0x01-0x0F // x,y: upper left point -void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y); +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y); // Draw a line // color: Line segment color @@ -125,20 +283,18 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, /*---------------------------------------- Text related functions ----------------------------------------*/ // Draw a string -// widthAdjust: true=self-adjust character width; false=no adjustment // bShow: true=display background color; false=don't display background color // size: Font size // color: Character color // bColor: Background color // x/y: Upper-left coordinate of the string // *string: The string -void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, - uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string); +void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string); class __FlashStringHelper; -inline void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { - DWIN_Draw_String(widthAdjust, bShow, size, color, bColor, x, y, (char *)title); +inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(bShow, size, color, bColor, x, y, (char *)title); } // Draw a positive integer diff --git a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp b/Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp similarity index 99% rename from Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp rename to Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp index 97e516e70a9e..4fc10393b974 100644 --- a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp +++ b/Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp @@ -21,7 +21,7 @@ */ /***************************************************************************** - * @file rotary_encoder.cpp + * @file lcd/e3v2/creality/rotary_encoder.cpp * @author LEO / Creality3D * @date 2019/07/06 * @version 2.0.1 diff --git a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.h b/Marlin/src/lcd/e3v2/creality/rotary_encoder.h similarity index 98% rename from Marlin/src/lcd/dwin/e3v2/rotary_encoder.h rename to Marlin/src/lcd/e3v2/creality/rotary_encoder.h index 7de80dfe01ca..f73577b3b031 100644 --- a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.h +++ b/Marlin/src/lcd/e3v2/creality/rotary_encoder.h @@ -22,7 +22,7 @@ #pragma once /***************************************************************************** - * @file rotary_encoder.h + * @file lcd/e3v2/creality/rotary_encoder.h * @author LEO / Creality3D * @date 2019/07/06 * @version 2.0.1 diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h index 05ab8bf80fca..b73424fc5a5f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h @@ -44,8 +44,8 @@ class LockScreen : public BaseScreen, public CachedScreen { static void enable(); static void disable(); - static void set_hash(uint16_t pass) {passcode = pass;}; - static uint16_t get_hash() {return passcode;}; + static void set_hash(uint16_t pass) { passcode = pass; } + static uint16_t get_hash() { return passcode; } static void onEntry(); static void onRedraw(draw_mode_t); diff --git a/Marlin/src/lcd/fontutils.cpp b/Marlin/src/lcd/fontutils.cpp index 65c8c06409a1..90fcb2ae7c47 100644 --- a/Marlin/src/lcd/fontutils.cpp +++ b/Marlin/src/lcd/fontutils.cpp @@ -149,7 +149,7 @@ uint8_t* get_utf8_value_cb(uint8_t *pstart, read_byte_cb_t cb_read_byte, wchar_t static inline uint8_t utf8_strlen_cb(const char *pstart, read_byte_cb_t cb_read_byte) { uint8_t cnt = 0; uint8_t *p = (uint8_t *)pstart; - for (;;) { + if (p) for (;;) { const uint8_t b = cb_read_byte(p); if (!b) break; if (utf8_is_start_byte_of_char(b)) cnt++; diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index 105a66085f3a..8bfd72e9f520 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -76,8 +76,10 @@ #define INFO_FONT_HEIGHT (INFO_FONT_ASCENT + INFO_FONT_DESCENT) #define INFO_FONT_WIDTH 6 + // Graphical LCD uses the menu font size for cursor positioning #define LCD_COL_X(col) (( (col)) * (MENU_FONT_WIDTH)) - #define LCD_ROW_Y(row) ((1 + (row)) * (MENU_FONT_HEIGHT)) + #define LCD_ROW_Y(row) ((1 + (row)) * (MENU_LINE_HEIGHT)) + #define LCD_COL_X_RJ(len) (LCD_WIDTH - LCD_COL_X(len)) #else @@ -94,13 +96,17 @@ #define LCD_PIXEL_WIDTH LCD_WIDTH #define LCD_PIXEL_HEIGHT LCD_HEIGHT + // Character LCD uses direct cursor positioning #define LCD_COL_X(col) (col) #define LCD_ROW_Y(row) (row) + #define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) #endif -#define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) -#define LCD_BOTTOM_ROW (LCD_PIXEL_HEIGHT - 1) +#ifndef MENU_LINE_HEIGHT + #define MENU_LINE_HEIGHT MENU_FONT_HEIGHT +#endif + #define SETCURSOR(col, row) lcd_moveto(LCD_COL_X(col), LCD_ROW_Y(row)) #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_COL_X_RJ(len), LCD_ROW_Y(row)) #define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 346082986d0f..1e38a2025072 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -47,7 +47,7 @@ MarlinUI ui; #endif #if ENABLED(DWIN_CREALITY_LCD) - #include "dwin/e3v2/dwin.h" + #include "e3v2/creality/dwin.h" #endif #if ENABLED(LCD_PROGRESS_BAR) && !IS_TFTGLCD_PANEL @@ -65,15 +65,8 @@ MarlinUI ui; constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #if HAS_STATUS_MESSAGE - #if HAS_WIRED_LCD - #if ENABLED(STATUS_MESSAGE_SCROLLING) - uint8_t MarlinUI::status_scroll_offset; // = 0 - constexpr uint8_t MAX_MESSAGE_LENGTH = _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)); - #else - constexpr uint8_t MAX_MESSAGE_LENGTH = MAX_LANG_CHARSIZE * (LCD_WIDTH); - #endif - #else - constexpr uint8_t MAX_MESSAGE_LENGTH = 63; + #if BOTH(HAS_WIRED_LCD, STATUS_MESSAGE_SCROLLING) + uint8_t MarlinUI::status_scroll_offset; // = 0 #endif char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1]; uint8_t MarlinUI::alert_level; // = 0 diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 4f11ded53f1a..dfa49b0fa287 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -296,6 +296,17 @@ class MarlinUI { #endif #if HAS_STATUS_MESSAGE + + #if HAS_WIRED_LCD + #if ENABLED(STATUS_MESSAGE_SCROLLING) + #define MAX_MESSAGE_LENGTH _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)) + #else + #define MAX_MESSAGE_LENGTH (MAX_LANG_CHARSIZE * (LCD_WIDTH)) + #endif + #else + #define MAX_MESSAGE_LENGTH 63 + #endif + static char status_message[]; static uint8_t alert_level; // Higher levels block lower levels diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index e0c694673e2a..82f25ea6f359 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -187,7 +187,7 @@ static void _lcd_level_bed_corners_get_next_position() { } --cy; - y -= MENU_FONT_HEIGHT; + y -= MENU_LINE_HEIGHT; // Display the Last Z value if (PAGE_CONTAINS(y - (MENU_FONT_HEIGHT), y)) { diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index f8ccc0c0671c..20b070e71283 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -46,7 +46,7 @@ #endif #if ENABLED(DWIN_CREALITY_LCD) - #include "../lcd/dwin/e3v2/dwin.h" + #include "../lcd/e3v2/creality/dwin.h" #endif #if ENABLED(EXTENSIBLE_UI) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 61b2b72bb6b8..d7aca6cdc795 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -32,7 +32,7 @@ #include "../lcd/marlinui.h" #if ENABLED(DWIN_CREALITY_LCD) - #include "../lcd/dwin/e3v2/dwin.h" + #include "../lcd/e3v2/creality/dwin.h" #endif #include "../module/planner.h" // for synchronize diff --git a/ini/features.ini b/ini/features.ini index e397ea31e92e..e663d80802d0 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -44,8 +44,8 @@ HAS_SPI_TFT = src_filter=+ SOFT_I2C_EEPROM = SlowSoftI2CMaster, SlowSoftWire=https://github.com/felias-fogg/SlowSoftWire/archive/master.zip SPI_EEPROM = src_filter=+ +DWIN_CREALITY_LCD = src_filter=+ HAS_GRAPHICAL_TFT = src_filter=+ -DWIN_CREALITY_LCD = src_filter=+ IS_TFTGLCD_PANEL = src_filter=+ HAS_TOUCH_BUTTONS = src_filter=+ HAS_LCD_MENU = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 1fb9ba55e684..3938b9f8b154 100644 --- a/platformio.ini +++ b/platformio.ini @@ -48,7 +48,7 @@ extra_scripts = post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py lib_deps = default_src_filter = + - - + - - - - - - - + - - - - - - - - - - - - From 0085ebce4d36165278922e5c31636262f46d0889 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 1 Aug 2021 01:06:23 +0000 Subject: [PATCH 160/323] [cron] Bump distribution date (2021-08-01) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 25cd5410adff..3e1c22e8a623 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-07-31" +//#define STRING_DISTRIBUTION_DATE "2021-08-01" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index d2999cde5e93..ee17e8d71c2a 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-07-31" + #define STRING_DISTRIBUTION_DATE "2021-08-01" #endif /** From b8cc0667bb7c5a67b2267cd86422b2485f364ac6 Mon Sep 17 00:00:00 2001 From: Malderin <52313714+Malderin@users.noreply.github.com> Date: Sun, 1 Aug 2021 06:00:18 +0300 Subject: [PATCH 161/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20custom=20menus=20o?= =?UTF-8?q?n=20MKS=20UI=20(#22470)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/mks_ui/draw_more.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_more.cpp b/Marlin/src/lcd/extui/mks_ui/draw_more.cpp index d6f1c9ccca00..e89e2f3e8ae0 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_more.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_more.cpp @@ -61,22 +61,22 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_GCODE: lv_clear_more(); lv_draw_gcode(true); break; #if HAS_USER_ITEM(1) - case ID_CUSTOM_1: queue.inject_P(PSTR(USER_GCODE_1)); break; + case ID_CUSTOM_1: queue.inject_P(PSTR(MAIN_MENU_ITEM_1_GCODE)); break; #endif #if HAS_USER_ITEM(2) - case ID_CUSTOM_2: queue.inject_P(PSTR(USER_GCODE_2)); break; + case ID_CUSTOM_2: queue.inject_P(PSTR(MAIN_MENU_ITEM_2_GCODE)); break; #endif #if HAS_USER_ITEM(3) - case ID_CUSTOM_3: queue.inject_P(PSTR(USER_GCODE_3)); break; + case ID_CUSTOM_3: queue.inject_P(PSTR(MAIN_MENU_ITEM_3_GCODE)); break; #endif #if HAS_USER_ITEM(4) - case ID_CUSTOM_4: queue.inject_P(PSTR(USER_GCODE_4)); break; + case ID_CUSTOM_4: queue.inject_P(PSTR(MAIN_MENU_ITEM_4_GCODE)); break; #endif #if HAS_USER_ITEM(5) - case ID_CUSTOM_5: queue.inject_P(PSTR(USER_GCODE_5)); break; + case ID_CUSTOM_5: queue.inject_P(PSTR(MAIN_MENU_ITEM_5_GCODE)); break; #endif #if HAS_USER_ITEM(6) - case ID_CUSTOM_6: queue.inject_P(PSTR(USER_GCODE_6)); break; + case ID_CUSTOM_6: queue.inject_P(PSTR(MAIN_MENU_ITEM_6_GCODE)); break; #endif case ID_M_RETURN: lv_clear_more(); From 381a23773b5be40cf221c42b3139e7ee5f07687b Mon Sep 17 00:00:00 2001 From: ldursw <37294448+ldursw@users.noreply.github.com> Date: Sun, 1 Aug 2021 00:42:26 -0300 Subject: [PATCH 162/323] =?UTF-8?q?=F0=9F=94=A8=20Fix=20(RRF=20E3)=20RX/TX?= =?UTF-8?q?=20buffer=20size=20override=20(#22475)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformIO/scripts/stm32_serialbuffer.py | 67 ++++++++++++++----- ini/stm32f4.ini | 5 +- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py b/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py index fecce47db307..c3779289e0f3 100644 --- a/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py +++ b/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py @@ -3,26 +3,57 @@ # Import("env") -# Marlin has `RX_BUFFER_SIZE` and `TX_BUFFER_SIZE` to configure the -# buffer size for receiving and transmitting data respectively. -# Stm32duino uses another set of defines for the same purpose, -# so we get the values from the Marlin configuration and set -# them in `SERIAL_RX_BUFFER_SIZE` and `SERIAL_TX_BUFFER_SIZE`. -# It is not possible to change the values at runtime, they must -# be set with build flags. +# Marlin uses the `RX_BUFFER_SIZE` \ `TX_BUFFER_SIZE` options to +# configure buffer sizes for receiving \ transmitting serial data. +# Stm32duino uses another set of defines for the same purpose, so this +# script gets the values from the configuration and uses them to define +# `SERIAL_RX_BUFFER_SIZE` and `SERIAL_TX_BUFFER_SIZE` as global build +# flags so they are available for use by the platform. # # The script will set the value as the default one (64 bytes) # or the user-configured one, whichever is higher. # -# Marlin has 128 and 32 as default values for RX_BUFFER_SIZE and -# TX_BUFFER_SIZE respectively. We use the highest value. +# Marlin's default buffer sizes are 128 for RX and 32 for TX. +# The highest value is taken (128/64). +# +# If MF_*_BUFFER_SIZE, SERIAL_*_BUFFER_SIZE, USART_*_BUF_SIZE, are +# defined, the first of these values will be used as the minimum. +build_flags = env.ParseFlags(env.get('BUILD_FLAGS'))["CPPDEFINES"] mf = env["MARLIN_FEATURES"] -rxBuf = str(max(128, int(mf["RX_BUFFER_SIZE"]) if "RX_BUFFER_SIZE" in mf else 0)) -txBuf = str(max(64, int(mf["TX_BUFFER_SIZE"]) if "TX_BUFFER_SIZE" in mf else 0)) - -build_flags = env.get('BUILD_FLAGS') -build_flags.append("-DSERIAL_RX_BUFFER_SIZE=" + rxBuf) -build_flags.append("-DSERIAL_TX_BUFFER_SIZE=" + txBuf) -build_flags.append("-DUSART_RX_BUF_SIZE=" + rxBuf) -build_flags.append("-DUSART_TX_BUF_SIZE=" + txBuf) -env.Replace(BUILD_FLAGS=build_flags) + +# Get a build flag's value or None +def getBuildFlagValue(name): + for flag in build_flags: + if isinstance(flag, list) and flag[0] == name: + return flag[1] + + return None + +# Get an overriding buffer size for RX or TX from the build flags +def getInternalSize(side): + return getBuildFlagValue(f"MF_{side}_BUFFER_SIZE") or \ + getBuildFlagValue(f"SERIAL_{side}_BUFFER_SIZE") or \ + getBuildFlagValue(f"USART_{side}_BUF_SIZE") + +# Get the largest defined buffer size for RX or TX +def getBufferSize(side, default): + # Get a build flag value or fall back to the given default + internal = int(getInternalSize(side) or default) + flag = side + "_BUFFER_SIZE" + # Return the largest value + return max(int(mf[flag]), internal) if flag in mf else internal + +# Add a build flag if it's not already defined +def tryAddFlag(name, value): + if getBuildFlagValue(name) is None: + env.Append(BUILD_FLAGS=[f"-D{name}={value}"]) + +# Get the largest defined buffer sizes for RX or TX, using defaults for undefined +rxBuf = getBufferSize("RX", 128) +txBuf = getBufferSize("TX", 64) + +# Provide serial buffer sizes to the stm32duino platform +tryAddFlag("SERIAL_RX_BUFFER_SIZE", rxBuf) +tryAddFlag("SERIAL_TX_BUFFER_SIZE", txBuf) +tryAddFlag("USART_RX_BUF_SIZE", rxBuf) +tryAddFlag("USART_TX_BUF_SIZE", txBuf) diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 2d3b5a0f32b0..d2332630a100 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -152,11 +152,10 @@ extends = stm32_variant board = marlin_STM32F407VGT6_CCM board_build.variant = MARLIN_BIGTREE_E3_RRF board_build.offset = 0x8000 -extra_scripts = ${common.extra_scripts} build_flags = ${stm32_variant.build_flags} -DSTM32F407_5VX - -DSERIAL_RX_BUFFER_SIZE=255 - -DSERIAL_TX_BUFFER_SIZE=255 + -DMF_RX_BUFFER_SIZE=255 + -DMF_TX_BUFFER_SIZE=255 # # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) From a90c8b762c8b8ca06093d6e62f4355e8a5726115 Mon Sep 17 00:00:00 2001 From: Grayson Date: Sat, 31 Jul 2021 22:55:22 -0500 Subject: [PATCH 163/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20G38=20with=20probe?= =?UTF-8?q?=20on=20Z=5FMIN=20(#22452)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 4 ++-- Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/module/endstops.cpp | 34 ++++++++++++++---------------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 0ebe8e265a51..1025a8153b79 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -771,7 +771,7 @@ #endif /** - * Set flags for enabled probes + * Set a flag for any type of bed probe, including the paper-test */ #if ANY(HAS_Z_SERVO_PROBE, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE) #define HAS_BED_PROBE 1 @@ -913,7 +913,7 @@ #if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && !BOTH(DELTA, SENSORLESS_PROBING) #define USES_Z_MIN_PROBE_PIN 1 #endif - #if Z_HOME_TO_MIN && (!USES_Z_MIN_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING)) + #if Z_HOME_TO_MIN && TERN1(USES_Z_MIN_PROBE_PIN, ENABLED(USE_PROBE_FOR_Z_HOMING)) #define HOMING_Z_WITH_PROBE 1 #endif #ifndef Z_PROBE_LOW_POINT diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index da17d18af197..26f28f483355 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2166,7 +2166,7 @@ #if PIN_EXISTS(Z4_MAX) #define HAS_Z4_MAX 1 #endif -#if BOTH(HAS_BED_PROBE, USES_Z_MIN_PROBE_PIN) && PIN_EXISTS(Z_MIN_PROBE) +#if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE) #define HAS_Z_MIN_PROBE_PIN 1 #endif diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 39aefd21d83c..25c26aa7b599 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -596,14 +596,15 @@ void _O2 Endstops::report_states() { // endstop ISR or the Stepper ISR. #if BOTH(DELTA, SENSORLESS_PROBING) - #define _ENDSTOP(AXIS, MINMAX) AXIS ##_MAX - #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_MAX_PIN - #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_MAX_ENDSTOP_INVERTING + #define __ENDSTOP(AXIS, ...) AXIS ##_MAX + #define _ENDSTOP_PIN(AXIS, ...) AXIS ##_MAX_PIN + #define _ENDSTOP_INVERTING(AXIS, ...) AXIS ##_MAX_ENDSTOP_INVERTING #else - #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX + #define __ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING #endif +#define _ENDSTOP(AXIS, MINMAX) __ENDSTOP(AXIS, MINMAX) // Check endstops - Could be called from Temperature ISR! void Endstops::update() { @@ -615,9 +616,10 @@ void Endstops::update() { #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) #define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT)) - #if BOTH(G38_PROBE_TARGET, HAS_Z_MIN_PROBE_PIN) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY) - // If G38 command is active check Z_MIN_PROBE for ALL movement - if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE); + #if ENABLED(G38_PROBE_TARGET) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY) + #define HAS_G38_PROBE 1 + // For G38 moves check the probe's pin for ALL movement + if (G38_move) UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN)); #endif // With Dual X, endstops are only checked in the homing direction for the active extruder @@ -746,7 +748,7 @@ void Endstops::update() { COPY_LIVE_STATE(Z_MAX, Z4_MAX); #endif #endif - #elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN + #elif TERN1(USES_Z_MIN_PROBE_PIN, Z_MAX_PIN != Z_MIN_PROBE_PIN) // If this pin isn't the bed probe it's the Z endstop UPDATE_ENDSTOP_BIT(Z, MAX); #endif @@ -930,15 +932,11 @@ void Endstops::update() { #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX) #endif - #if BOTH(G38_PROBE_TARGET, HAS_Z_MIN_PROBE_PIN) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY) - #if ENABLED(G38_PROBE_AWAY) - #define _G38_OPEN_STATE (G38_move >= 4) - #else - #define _G38_OPEN_STATE LOW - #endif - // If G38 command is active check Z_MIN_PROBE for ALL movement - if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE)) != _G38_OPEN_STATE) { - if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, TERN(X_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(X_AXIS); } + #if HAS_G38_PROBE + #define _G38_OPEN_STATE TERN(G38_PROBE_AWAY, (G38_move >= 4), LOW) + // For G38 moves check the probe's pin for ALL movement + if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) != _G38_OPEN_STATE) { + if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, TERN(X_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(X_AXIS); } #if HAS_Y_AXIS else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, TERN(Y_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Y_AXIS); } #endif @@ -1043,7 +1041,7 @@ void Endstops::update() { #if HAS_Z_MAX || (Z_SPI_SENSORLESS && Z_HOME_TO_MAX) #if ENABLED(Z_MULTI_ENDSTOPS) PROCESS_ENDSTOP_Z(MAX); - #elif !USES_Z_MIN_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // No probe or probe is Z_MIN || Probe is not Z_MAX + #elif TERN1(USES_Z_MIN_PROBE_PIN, Z_MAX_PIN != Z_MIN_PROBE_PIN) // No probe or probe is Z_MIN || Probe is not Z_MAX PROCESS_ENDSTOP(Z, MAX); #endif #if CORE_DIAG(XZ, X, MIN) From ab96ada2e240e7861c6dc5a1cbff4bdab66f2b26 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 31 Jul 2021 23:27:10 -0500 Subject: [PATCH 164/323] =?UTF-8?q?=F0=9F=8E=A8=20Adjust=20settings.cpp=20?= =?UTF-8?q?indent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/settings.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index cc4d69f58192..33e6b15f9aea 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -1331,12 +1331,12 @@ void MarlinSettings::postprocess() { // Extensible UI User Data // #if ENABLED(EXTENSIBLE_UI) - { - char extui_data[ExtUI::eeprom_data_size] = { 0 }; - ExtUI::onStoreSettings(extui_data); - _FIELD_TEST(extui_data); - EEPROM_WRITE(extui_data); - } + { + char extui_data[ExtUI::eeprom_data_size] = { 0 }; + ExtUI::onStoreSettings(extui_data); + _FIELD_TEST(extui_data); + EEPROM_WRITE(extui_data); + } #endif // @@ -2200,13 +2200,12 @@ void MarlinSettings::postprocess() { // Extensible UI User Data // #if ENABLED(EXTENSIBLE_UI) - // This is a significant hardware change; don't reserve EEPROM space when not present - { - const char extui_data[ExtUI::eeprom_data_size] = { 0 }; - _FIELD_TEST(extui_data); - EEPROM_READ(extui_data); - if (!validating) ExtUI::onLoadSettings(extui_data); - } + { // This is a significant hardware change; don't reserve EEPROM space when not present + const char extui_data[ExtUI::eeprom_data_size] = { 0 }; + _FIELD_TEST(extui_data); + EEPROM_READ(extui_data); + if (!validating) ExtUI::onLoadSettings(extui_data); + } #endif // From 7110c4562e69f4a1ca992d8fae4a5fe948494d3d Mon Sep 17 00:00:00 2001 From: ellensp Date: Sun, 1 Aug 2021 19:09:29 +1200 Subject: [PATCH 165/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20sprintf=5FP=20comp?= =?UTF-8?q?ile=20error=20(Maple)=20(#22479)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index 57ecc4bb65d6..5c108d07092a 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -559,7 +559,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo #endif #if ENABLED(PIDTEMPBED) case VP_PID_AUTOTUNE_BED: - sprintf_P(buf, PSTR("M303 E-1 C5 S70 U1")); + strcpy_P(buf, PSTR("M303 E-1 C5 S70 U1")); break; #endif } From 1e33c1a2a78392e9182442db043384b0f96cca20 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 1 Aug 2021 14:28:53 -0500 Subject: [PATCH 166/323] M256 LCD brightness (#22478) --- Marlin/src/gcode/gcode.cpp | 4 +++ Marlin/src/gcode/gcode.h | 5 +++ Marlin/src/gcode/lcd/M256.cpp | 37 +++++++++++++++++++++ Marlin/src/gcode/lcd/M73.cpp | 4 +-- Marlin/src/lcd/marlinui.cpp | 11 +++++++ Marlin/src/lcd/marlinui.h | 16 +++++++++ Marlin/src/module/settings.cpp | 45 ++++++++++++++++++++------ Marlin/src/module/stepper/trinamic.cpp | 2 +- ini/features.ini | 1 + platformio.ini | 2 +- 10 files changed, 114 insertions(+), 13 deletions(-) create mode 100644 Marlin/src/gcode/lcd/M256.cpp diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 12fd231ca8e4..7933c3141a11 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -729,6 +729,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 250: M250(); break; // M250: Set LCD contrast #endif + #if HAS_LCD_BRIGHTNESS + case 256: M256(); break; // M256: Set LCD brightness + #endif + #if ENABLED(EXPERIMENTAL_I2CBUS) case 260: M260(); break; // M260: Send data to an i2c slave case 261: M261(); break; // M261: Request data from an i2c slave diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 769b496f22dd..ccbeda64747b 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -191,6 +191,7 @@ * M226 - Wait until a pin is in a given state: "M226 P S" (Requires DIRECT_PIN_CONTROL) * M240 - Trigger a camera to take a photograph. (Requires PHOTO_GCODE) * M250 - Set LCD contrast: "M250 C" (0-63). (Requires LCD support) + * M256 - Set LCD brightness: "M256 B" (0-255). (Requires an LCD with brightness control) * M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS) * M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS) * M280 - Set servo position absolute: "M280 P S". (Requires servos) @@ -820,6 +821,10 @@ class GcodeSuite { static void M250(); #endif + #if HAS_LCD_BRIGHTNESS + static void M256(); + #endif + #if ENABLED(EXPERIMENTAL_I2CBUS) static void M260(); static void M261(); diff --git a/Marlin/src/gcode/lcd/M256.cpp b/Marlin/src/gcode/lcd/M256.cpp new file mode 100644 index 000000000000..e292acc4ed44 --- /dev/null +++ b/Marlin/src/gcode/lcd/M256.cpp @@ -0,0 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../inc/MarlinConfig.h" + +#if HAS_LCD_BRIGHTNESS + +#include "../gcode.h" +#include "../../lcd/marlinui.h" + +/** + * M256: Set the LCD brightness + */ +void GcodeSuite::M256() { + if (parser.seenval('B')) ui.set_brightness(parser.value_int()); + SERIAL_ECHOLNPAIR("LCD Brightness: ", ui.brightness); +} + +#endif // HAS_LCD_BRIGHTNESS diff --git a/Marlin/src/gcode/lcd/M73.cpp b/Marlin/src/gcode/lcd/M73.cpp index 5b135bdff8bd..e94a2825f7b8 100644 --- a/Marlin/src/gcode/lcd/M73.cpp +++ b/Marlin/src/gcode/lcd/M73.cpp @@ -35,13 +35,13 @@ * M73 P25 ; Set progress to 25% */ void GcodeSuite::M73() { - if (parser.seen('P')) + if (parser.seenval('P')) ui.set_progress((PROGRESS_SCALE) > 1 ? parser.value_float() * (PROGRESS_SCALE) : parser.value_byte() ); #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) - if (parser.seen('R')) ui.set_remaining_time(60 * parser.value_ulong()); + if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong()); #endif } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 1e38a2025072..cf8d7343c6b3 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -91,6 +91,17 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; } #endif +#if HAS_LCD_BRIGHTNESS + uint8_t MarlinUI::brightness = DEFAULT_LCD_BRIGHTNESS; + bool MarlinUI::backlight = true; + + void MarlinUI::set_brightness(const uint8_t value) { + backlight = !!value; + if (backlight) brightness = constrain(value, MIN_LCD_BRIGHTNESS, MAX_LCD_BRIGHTNESS); + // Set brightness on enabled LCD here + } +#endif + #if ENABLED(SOUND_MENU_ITEM) bool MarlinUI::buzzer_enabled = true; #endif diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index dfa49b0fa287..9930796a01c8 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -239,6 +239,22 @@ class MarlinUI { static void media_changed(const uint8_t old_stat, const uint8_t stat); #endif + #if HAS_LCD_BRIGHTNESS + #ifndef MIN_LCD_BRIGHTNESS + #define MIN_LCD_BRIGHTNESS 1 + #endif + #ifndef MAX_LCD_BRIGHTNESS + #define MAX_LCD_BRIGHTNESS 255 + #endif + #ifndef DEFAULT_LCD_BRIGHTNESS + #define DEFAULT_LCD_BRIGHTNESS MAX_LCD_BRIGHTNESS + #endif + static uint8_t brightness; + static bool backlight; + static void set_brightness(const uint8_t value); + FORCE_INLINE static void refresh_brightness() { set_brightness(brightness); } + #endif + #if ENABLED(DWIN_CREALITY_LCD) static void refresh(); #else diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 33e6b15f9aea..b30c82260fe6 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -36,7 +36,7 @@ */ // Change EEPROM version if the structure changes -#define EEPROM_VERSION "V83" +#define EEPROM_VERSION "V84" #define EEPROM_OFFSET 100 // Check the integrity of data offsets. @@ -353,6 +353,11 @@ typedef struct SettingsDataStruct { // int16_t lcd_contrast; // M250 C + // + // HAS_LCD_BRIGHTNESS + // + uint8_t lcd_brightness; // M256 B + // // Controller fan settings // @@ -999,17 +1004,19 @@ void MarlinSettings::postprocess() { // { _FIELD_TEST(lcd_contrast); - - const int16_t lcd_contrast = - #if HAS_LCD_CONTRAST - ui.contrast - #else - 127 - #endif - ; + const int16_t lcd_contrast = TERN(HAS_LCD_CONTRAST, ui.contrast, 127); EEPROM_WRITE(lcd_contrast); } + // + // LCD Brightness + // + { + _FIELD_TEST(lcd_brightness); + const uint8_t lcd_brightness = TERN(HAS_LCD_BRIGHTNESS, ui.brightness, 255); + EEPROM_WRITE(lcd_brightness); + } + // // Controller Fan // @@ -1846,6 +1853,16 @@ void MarlinSettings::postprocess() { } } + // + // LCD Brightness + // + { + _FIELD_TEST(lcd_brightness); + uint8_t lcd_brightness; + EEPROM_READ(lcd_brightness); + TERN_(HAS_LCD_BRIGHTNESS, if (!validating) ui.set_brightness(lcd_brightness)); + } + // // Controller Fan // @@ -2829,6 +2846,11 @@ void MarlinSettings::reset() { // TERN_(HAS_LCD_CONTRAST, ui.set_contrast(DEFAULT_LCD_CONTRAST)); + // + // LCD Brightness + // + TERN_(HAS_LCD_BRIGHTNESS, ui.set_brightness(DEFAULT_LCD_BRIGHTNESS)); + // // Controller Fan // @@ -3406,6 +3428,11 @@ void MarlinSettings::reset() { CONFIG_ECHO_MSG(" M250 C", ui.contrast); #endif + #if HAS_LCD_BRIGHTNESS + CONFIG_ECHO_HEADING("LCD Brightness:"); + CONFIG_ECHO_MSG(" M256 B", ui.brightness); + #endif + TERN_(CONTROLLER_FAN_EDITABLE, M710_report(forReplay)); #if ENABLED(POWER_LOSS_RECOVERY) diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index a5d7e5ad6b3d..f9ed43acbfe2 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -1008,7 +1008,7 @@ void reset_trinamic_drivers() { TMC_SW_DETAIL(Y), TMC_SW_DETAIL(Y2), TMC_SW_DETAIL(Z), TMC_SW_DETAIL(Z2), TMC_SW_DETAIL(Z3), TMC_SW_DETAIL(Z4), TMC_SW_DETAIL(I), TMC_SW_DETAIL(J), TMC_SW_DETAIL(K), - TMC_SW_DETAIL(E0), TMC_SW_DETAIL(E1), TMC_SW_DETAIL(E2), TMC_SW_DETAIL(E3), TMC_SW_DETAIL(E4), TMC_SW_DETAIL(E5), TMC_SW_DETAIL(E6), TMC_SW_DETAIL(E7) + TMC_SW_DETAIL(E0), TMC_SW_DETAIL(E1), TMC_SW_DETAIL(E2), TMC_SW_DETAIL(E3), TMC_SW_DETAIL(E4), TMC_SW_DETAIL(E5), TMC_SW_DETAIL(E6), TMC_SW_DETAIL(E7) }; constexpr bool sc_sw_done(size_t start, size_t end) { return start == end; } diff --git a/ini/features.ini b/ini/features.ini index e663d80802d0..250540797df9 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -189,6 +189,7 @@ HAS_GCODE_M876 = src_filter=+ HAS_RESUME_CONTINUE = src_filter=+ HAS_STATUS_MESSAGE = src_filter=+ HAS_LCD_CONTRAST = src_filter=+ +HAS_LCD_BRIGHTNESS = src_filter=+ HAS_BUZZER = src_filter=+ LCD_SET_PROGRESS_MANUALLY = src_filter=+ TOUCH_SCREEN_CALIBRATION = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 3938b9f8b154..db4d12ea7fb3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -206,7 +206,7 @@ default_src_filter = + - - + - - - - - + - - - - - From 5a72a39706d4fc4bbcb2093d51963f2a2720847c Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sun, 1 Aug 2021 21:43:31 +0200 Subject: [PATCH 167/323] =?UTF-8?q?=F0=9F=94=A8=20Offset/encrypt/rename=20?= =?UTF-8?q?for=20Maple=20STM32F1=20(#22477)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformIO/scripts/STM32F103VE_longer.py | 22 ------------------- ini/stm32-common.ini | 2 +- ini/stm32f1-maple.ini | 3 ++- 3 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py diff --git a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py b/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py deleted file mode 100644 index c98059729fe8..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py +++ /dev/null @@ -1,22 +0,0 @@ -# -# buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py -# Customizations for env:STM32F103VE_longer -# -import os,marlin - -# Rename ${PROGNAME}.bin and save it as 'project.bin' (No encryption on the Longer3D) -def encrypt(source, target, env): - firmware = open(target[0].path, "rb") - renamed = open(target[0].dir.path + '/project.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - renamed.write(byte) - position += 1 - finally: - firmware.close() - renamed.close() - -marlin.add_post_action(encrypt); diff --git a/ini/stm32-common.ini b/ini/stm32-common.ini index 4ae068939ecd..08b0f70b4d66 100644 --- a/ini/stm32-common.ini +++ b/ini/stm32-common.ini @@ -29,7 +29,7 @@ extra_scripts = ${common.extra_scripts} extends = common_stm32 extra_scripts = ${common_stm32.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/offset_and_rename.py + buildroot/share/PlatformIO/scripts/offset_and_rename.py # # USB Flash Drive mix-ins for STM32 diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index 2a9ba8349470..0258fb3b7cc7 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -36,6 +36,7 @@ platform_packages = tool-stm32duino extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py + buildroot/share/PlatformIO/scripts/offset_and_rename.py # # STM32F103RC @@ -178,10 +179,10 @@ platform = ${common_stm32f1.platform} extends = common_stm32f1 board = genericSTM32F103VE board_build.address = 0x08010000 +board_build.rename = project.bin board_build.ldscript = STM32F103VE_longer.ld extra_scripts = ${common_stm32f1.extra_scripts} buildroot/share/PlatformIO/scripts/custom_board.py - buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py build_flags = ${common_stm32f1.build_flags} -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 build_unflags = ${common_stm32f1.build_unflags} From 1e4470484ad08ec1e2744650d52df56c409db353 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 2 Aug 2021 00:58:08 +0000 Subject: [PATCH 168/323] [cron] Bump distribution date (2021-08-02) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 3e1c22e8a623..01daff2d8231 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-01" +//#define STRING_DISTRIBUTION_DATE "2021-08-02" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index ee17e8d71c2a..2cb2a8fa112d 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-01" + #define STRING_DISTRIBUTION_DATE "2021-08-02" #endif /** From 0eda34e07d6b15ac889d21d84457401683c0345f Mon Sep 17 00:00:00 2001 From: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Mon, 2 Aug 2021 07:13:57 +0200 Subject: [PATCH 169/323] =?UTF-8?q?=F0=9F=90=9B=20Followup=20to=206=20line?= =?UTF-8?q?ar=20axes=20(#22482)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/serial.h | 1 + Marlin/src/inc/Conditionals_post.h | 26 ++++++++++++++++++++++++-- Marlin/src/lcd/menu/menu_motion.cpp | 6 +++--- Marlin/src/module/endstops.cpp | 12 ++++++------ Marlin/src/module/endstops.h | 9 +++++++++ 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index 7ceb70c22c7e..7f96a30d6f71 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -37,6 +37,7 @@ extern const char NUL_STR[], SP_I_LBL[], SP_J_LBL[], SP_K_LBL[], SP_P_STR[], SP_T_STR[], X_STR[], Y_STR[], Z_STR[], E_STR[], + I_STR[], J_STR[], K_STR[], X_LBL[], Y_LBL[], Z_LBL[], E_LBL[], I_LBL[], J_LBL[], K_LBL[]; diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 26f28f483355..532602ed4429 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1784,6 +1784,15 @@ #if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4) #define Z4_SENSORLESS 1 #endif + #if defined(I_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(I) + #define I_SENSORLESS 1 + #endif + #if defined(J_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(J) + #define J_SENSORLESS 1 + #endif + #if defined(K_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(K) + #define K_SENSORLESS 1 + #endif #if AXIS_HAS_STEALTHCHOP(X) #define X_HAS_STEALTHCHOP 1 @@ -1845,8 +1854,21 @@ #if ENABLED(SPI_ENDSTOPS) #define X_SPI_SENSORLESS X_SENSORLESS - #define Y_SPI_SENSORLESS Y_SENSORLESS - #define Z_SPI_SENSORLESS Z_SENSORLESS + #if HAS_Y_AXIS + #define Y_SPI_SENSORLESS Y_SENSORLESS + #endif + #if HAS_Z_AXIS + #define Z_SPI_SENSORLESS Z_SENSORLESS + #endif + #if LINEAR_AXES >= 4 + #define I_SPI_SENSORLESS I_SENSORLESS + #endif + #if LINEAR_AXES >= 5 + #define J_SPI_SENSORLESS J_SENSORLESS + #endif + #if LINEAR_AXES >= 6 + #define K_SPI_SENSORLESS K_SENSORLESS + #endif #endif #ifndef X_INTERPOLATE #define X_INTERPOLATE INTERPOLATE diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 45e751e29adb..3e7977bac6ed 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -357,13 +357,13 @@ void menu_motion() { GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z")); #endif #if LINEAR_AXES >= 4 - GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" I_STR)); + GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR)); #endif #if LINEAR_AXES >= 5 - GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" J_STR)); + GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR)); #endif #if LINEAR_AXES >= 6 - GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" K_STR)); + GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR)); #endif #endif diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 25c26aa7b599..523e1337137a 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -754,7 +754,7 @@ void Endstops::update() { #endif #endif - #if HAS_I_MIN + #if HAS_I_MIN && !I_SPI_SENSORLESS #if ENABLED(I_DUAL_ENDSTOPS) UPDATE_ENDSTOP_BIT(I, MIN); #if HAS_I2_MIN @@ -767,7 +767,7 @@ void Endstops::update() { #endif #endif - #if HAS_I_MAX + #if HAS_I_MAX && !I_SPI_SENSORLESS #if ENABLED(I_DUAL_ENDSTOPS) UPDATE_ENDSTOP_BIT(I, MAX); #if HAS_I2_MAX @@ -780,7 +780,7 @@ void Endstops::update() { #endif #endif - #if HAS_J_MIN + #if HAS_J_MIN && !J_SPI_SENSORLESS #if ENABLED(J_DUAL_ENDSTOPS) UPDATE_ENDSTOP_BIT(J, MIN); #if HAS_J2_MIN @@ -793,7 +793,7 @@ void Endstops::update() { #endif #endif - #if HAS_J_MAX + #if HAS_J_MAX && !J_SPI_SENSORLESS #if ENABLED(J_DUAL_ENDSTOPS) UPDATE_ENDSTOP_BIT(J, MAX); #if HAS_J2_MAX @@ -806,7 +806,7 @@ void Endstops::update() { #endif #endif - #if HAS_K_MIN + #if HAS_K_MIN && !K_SPI_SENSORLESS #if ENABLED(K_DUAL_ENDSTOPS) UPDATE_ENDSTOP_BIT(K, MIN); #if HAS_K2_MIN @@ -819,7 +819,7 @@ void Endstops::update() { #endif #endif - #if HAS_K_MAX + #if HAS_K_MAX && !K_SPI_SENSORLESS #if ENABLED(K_DUAL_ENDSTOPS) UPDATE_ENDSTOP_BIT(K, MAX); #if HAS_K2_MAX diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index f4532ca1a0f7..a90eb1503d98 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -84,6 +84,15 @@ enum EndstopEnum : char { #if HAS_Z_MIN || HAS_Z_MAX || HOMING_Z_WITH_PROBE , Z_ENDSTOP = TERN(Z_HOME_TO_MAX, Z_MAX, TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, Z_MIN)) #endif + #if HAS_I_MIN || HAS_I_MAX + , I_ENDSTOP = TERN(I_HOME_TO_MAX, I_MAX, I_MIN) + #endif + #if HAS_J_MIN || HAS_J_MAX + , J_ENDSTOP = TERN(J_HOME_TO_MAX, J_MAX, J_MIN) + #endif + #if HAS_K_MIN || HAS_K_MAX + , K_ENDSTOP = TERN(K_HOME_TO_MAX, K_MAX, K_MIN) + #endif }; #undef __ES_ITEM From 0060dbc49e32cd5015b0bf2e42c2667e07eb7b72 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 2 Aug 2021 17:08:35 -0500 Subject: [PATCH 170/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20up=20endstop=20fla?= =?UTF-8?q?gs=20(#22487)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 71 ++++++++++++++++-------------- Marlin/src/module/endstops.h | 30 +++++-------- buildroot/tests/teensy35 | 2 +- buildroot/tests/teensy41 | 2 +- 4 files changed, 51 insertions(+), 54 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 532602ed4429..e25229c19853 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2122,72 +2122,79 @@ #define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_) #define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M)) -#if _HAS_STOP(X,MIN) +#if BOTH(X_HOME_TO_MIN, USE_XMIN_PLUG) && _HAS_STOP(X,MIN) #define HAS_X_MIN 1 #endif -#if _HAS_STOP(X,MAX) +#if (BOTH(X_HOME_TO_MAX, USE_XMAX_PLUG) || ENABLED(DUAL_X_CARRIAGE)) && _HAS_STOP(X,MAX) #define HAS_X_MAX 1 #endif -#if HAS_Y_AXIS && _HAS_STOP(Y,MIN) +#if ALL(HAS_Y_AXIS, Y_HOME_TO_MIN, USE_YMIN_PLUG) && _HAS_STOP(Y,MIN) #define HAS_Y_MIN 1 #endif -#if HAS_Y_AXIS && _HAS_STOP(Y,MAX) +#if ALL(HAS_Y_AXIS, Y_HOME_TO_MAX, USE_YMAX_PLUG) && _HAS_STOP(Y,MAX) #define HAS_Y_MAX 1 #endif #if BOTH(HAS_Z_AXIS, USE_ZMIN_PLUG) && _HAS_STOP(Z,MIN) #define HAS_Z_MIN 1 #endif -#if BOTH(HAS_Z_AXIS, USE_ZMAX_PLUG) && _HAS_STOP(Z,MAX) +#if ALL(HAS_Z_AXIS, Z_HOME_TO_MAX, USE_ZMAX_PLUG) && _HAS_STOP(Z,MAX) #define HAS_Z_MAX 1 #endif -#if _HAS_STOP(I,MIN) +#if LINEAR_AXES >= 4 && BOTH(I_HOME_TO_MIN, USE_IMIN_PLUG) && _HAS_STOP(I,MIN) #define HAS_I_MIN 1 #endif -#if _HAS_STOP(I,MAX) +#if LINEAR_AXES >= 4 && BOTH(I_HOME_TO_MAX, USE_IMAX_PLUG) && _HAS_STOP(I,MAX) #define HAS_I_MAX 1 #endif -#if _HAS_STOP(J,MIN) +#if LINEAR_AXES >= 5 && BOTH(J_HOME_TO_MIN, USE_JMIN_PLUG) && _HAS_STOP(J,MIN) #define HAS_J_MIN 1 #endif -#if _HAS_STOP(J,MAX) +#if LINEAR_AXES >= 5 && BOTH(J_HOME_TO_MAX, USE_JMAX_PLUG) && _HAS_STOP(J,MAX) #define HAS_J_MAX 1 #endif -#if _HAS_STOP(K,MIN) +#if LINEAR_AXES >= 6 && BOTH(K_HOME_TO_MIN, USE_KMIN_PLUG) && _HAS_STOP(K,MIN) #define HAS_K_MIN 1 #endif -#if _HAS_STOP(K,MAX) +#if LINEAR_AXES >= 6 && BOTH(K_HOME_TO_MAX, USE_KMAX_PLUG) && _HAS_STOP(K,MAX) #define HAS_K_MAX 1 #endif -#if PIN_EXISTS(X2_MIN) +#if BOTH(X_HOME_TO_MIN, X_DUAL_ENDSTOPS) && PIN_EXISTS(X2_MIN) #define HAS_X2_MIN 1 #endif -#if PIN_EXISTS(X2_MAX) +#if BOTH(X_HOME_TO_MAX, X_DUAL_ENDSTOPS) && PIN_EXISTS(X2_MAX) #define HAS_X2_MAX 1 #endif -#if PIN_EXISTS(Y2_MIN) +#if BOTH(Y_HOME_TO_MIN, Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y2_MIN) #define HAS_Y2_MIN 1 #endif -#if PIN_EXISTS(Y2_MAX) +#if BOTH(Y_HOME_TO_MAX, Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y2_MAX) #define HAS_Y2_MAX 1 #endif -#if PIN_EXISTS(Z2_MIN) - #define HAS_Z2_MIN 1 -#endif -#if PIN_EXISTS(Z2_MAX) - #define HAS_Z2_MAX 1 -#endif -#if PIN_EXISTS(Z3_MIN) - #define HAS_Z3_MIN 1 -#endif -#if PIN_EXISTS(Z3_MAX) - #define HAS_Z3_MAX 1 -#endif -#if PIN_EXISTS(Z4_MIN) - #define HAS_Z4_MIN 1 -#endif -#if PIN_EXISTS(Z4_MAX) - #define HAS_Z4_MAX 1 +#if ENABLED(Z_MULTI_ENDSTOPS) + #if Z_HOME_TO_MIN && PIN_EXISTS(Z2_MIN) + #define HAS_Z2_MIN 1 + #endif + #if Z_HOME_TO_MAX && PIN_EXISTS(Z2_MAX) + #define HAS_Z2_MAX 1 + #endif + #if NUM_Z_STEPPER_DRIVERS >= 3 + #if Z_HOME_TO_MIN && PIN_EXISTS(Z3_MIN) + #define HAS_Z3_MIN 1 + #endif + #if Z_HOME_TO_MAX && PIN_EXISTS(Z3_MAX) + #define HAS_Z3_MAX 1 + #endif + #if NUM_Z_STEPPER_DRIVERS >= 4 + #if Z_HOME_TO_MIN && PIN_EXISTS(Z4_MIN) + #define HAS_Z4_MIN 1 + #endif + #if Z_HOME_TO_MAX && PIN_EXISTS(Z4_MAX) + #define HAS_Z4_MAX 1 + #endif + #endif + #endif #endif + #if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE) #define HAS_Z_MIN_PROBE_PIN 1 #endif diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index a90eb1503d98..e688d3a78844 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -47,26 +47,16 @@ enum EndstopEnum : char { _ES_ITEM(HAS_K_MAX, K_MAX) // Extra Endstops for XYZ - #if ENABLED(X_DUAL_ENDSTOPS) - _ES_ITEM(HAS_X_MIN, X2_MIN) - _ES_ITEM(HAS_X_MAX, X2_MAX) - #endif - #if ENABLED(Y_DUAL_ENDSTOPS) - _ES_ITEM(HAS_Y_MIN, Y2_MIN) - _ES_ITEM(HAS_Y_MAX, Y2_MAX) - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - _ES_ITEM(HAS_Z_MIN, Z2_MIN) - _ES_ITEM(HAS_Z_MAX, Z2_MAX) - #if NUM_Z_STEPPER_DRIVERS >= 3 - _ES_ITEM(HAS_Z_MIN, Z3_MIN) - _ES_ITEM(HAS_Z_MAX, Z3_MAX) - #endif - #if NUM_Z_STEPPER_DRIVERS >= 4 - _ES_ITEM(HAS_Z_MIN, Z4_MIN) - _ES_ITEM(HAS_Z_MAX, Z4_MAX) - #endif - #endif + _ES_ITEM(HAS_X2_MIN, X2_MIN) + _ES_ITEM(HAS_X2_MAX, X2_MAX) + _ES_ITEM(HAS_Y2_MIN, Y2_MIN) + _ES_ITEM(HAS_Y2_MAX, Y2_MAX) + _ES_ITEM(HAS_Z2_MIN, Z2_MIN) + _ES_ITEM(HAS_Z2_MAX, Z2_MAX) + _ES_ITEM(HAS_Z3_MIN, Z3_MIN) + _ES_ITEM(HAS_Z3_MAX, Z3_MAX) + _ES_ITEM(HAS_Z4_MIN, Z4_MIN) + _ES_ITEM(HAS_Z4_MAX, Z4_MAX) // Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop) _ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(USES_Z_MIN_PROBE_PIN, = Z_MIN)) diff --git a/buildroot/tests/teensy35 b/buildroot/tests/teensy35 index 3352c05525dc..4bfa64f1db69 100755 --- a/buildroot/tests/teensy35 +++ b/buildroot/tests/teensy35 @@ -100,7 +100,7 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3" # Enable Dual Z with Dual Z endstops # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_Z_STEPPER_DRIVERS 2 Z2_MAX_PIN 2 +opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG pins_set ramps/RAMPS X_MAX_PIN -1 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" diff --git a/buildroot/tests/teensy41 b/buildroot/tests/teensy41 index 55e7e6eae2b4..017b81b3c12b 100755 --- a/buildroot/tests/teensy41 +++ b/buildroot/tests/teensy41 @@ -103,7 +103,7 @@ exec_test $1 $2 "Teensy 4.0/4.1 COREXZ" "$3" # Enable Dual Z with Dual Z endstops # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY41 NUM_Z_STEPPER_DRIVERS 2 Z2_MAX_PIN 2 +opt_set MOTHERBOARD BOARD_TEENSY41 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG pins_set ramps/RAMPS X_MAX_PIN -1 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" From 444992c12fa8c6fb6b8fd3f759173259d7875345 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 3 Aug 2021 01:02:55 +0000 Subject: [PATCH 171/323] [cron] Bump distribution date (2021-08-03) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 01daff2d8231..22151ed234bb 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-02" +//#define STRING_DISTRIBUTION_DATE "2021-08-03" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2cb2a8fa112d..a090c0c5edc0 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-02" + #define STRING_DISTRIBUTION_DATE "2021-08-03" #endif /** From 6a25e4e56f0863e3abee50cad35e3ef89ed270df Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 3 Aug 2021 18:29:20 -0500 Subject: [PATCH 172/323] =?UTF-8?q?=F0=9F=90=9B=20Allow=20SKR=20Pro=20CONT?= =?UTF-8?q?ROLLER=5FFAN=5FPIN=20override?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #22411 --- Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 231dd9f59478..eb3ce730a696 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -300,7 +300,7 @@ #define E0_AUTO_FAN_PIN FAN1_PIN #endif -#if ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2 +#if !defined(CONTROLLER_FAN_PIN) && ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2 #define CONTROLLER_FAN_PIN PE6 // Fan2 #else #define FAN2_PIN PE6 // Fan2 From afca6e745932d295b88d37fa9bd4274e22705b0b Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 3 Aug 2021 20:02:34 -0400 Subject: [PATCH 173/323] =?UTF-8?q?=F0=9F=90=9B=20Spellcheck=20comments=20?= =?UTF-8?q?(#22496)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit codespell -q 3 --builtin=clear,rare,informal,code -S ./Marlin/src/lcd/language -L alo,amin,endcode,stdio,uint --- Marlin/Configuration.h | 2 +- Marlin/Configuration_adv.h | 2 +- Marlin/Makefile | 2 +- Marlin/src/HAL/AVR/fastio.h | 2 +- Marlin/src/HAL/DUE/HAL_SPI.cpp | 2 +- Marlin/src/HAL/DUE/usb/arduino_due_x.h | 2 +- Marlin/src/HAL/DUE/usb/udd.h | 6 +-- Marlin/src/HAL/DUE/usb/udi_cdc.c | 4 +- Marlin/src/HAL/DUE/usb/udi_cdc_conf.h | 2 +- Marlin/src/HAL/DUE/usb/udi_msc.c | 10 ++-- Marlin/src/HAL/DUE/usb/uotghs_device_due.c | 46 +++++++++---------- Marlin/src/HAL/DUE/usb/usb_protocol_msc.h | 2 +- Marlin/src/HAL/LINUX/hardware/Heater.cpp | 2 +- Marlin/src/HAL/LINUX/include/pinmapping.h | 2 +- Marlin/src/HAL/SAMD51/HAL.cpp | 2 +- Marlin/src/HAL/SAMD51/fastio.h | 2 +- Marlin/src/HAL/SAMD51/timers.cpp | 2 +- Marlin/src/HAL/STM32/HAL_MinSerial.cpp | 2 +- Marlin/src/HAL/STM32/Servo.cpp | 2 +- Marlin/src/HAL/STM32/eeprom_flash.cpp | 2 +- Marlin/src/HAL/STM32/msc_sd.cpp | 4 +- Marlin/src/HAL/STM32F1/HAL.cpp | 2 +- Marlin/src/HAL/STM32F1/SPI.cpp | 4 +- Marlin/src/HAL/STM32F1/onboard_sd.h | 6 +-- Marlin/src/HAL/STM32F1/timers.h | 2 +- Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp | 2 +- Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp | 2 +- Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp | 2 +- Marlin/src/HAL/shared/backtrace/unwarm.h | 2 +- Marlin/src/HAL/shared/backtrace/unwarmbytab.h | 2 +- Marlin/src/HAL/shared/backtrace/unwarmmem.cpp | 2 +- Marlin/src/HAL/shared/backtrace/unwarmmem.h | 2 +- Marlin/src/HAL/shared/backtrace/unwinder.cpp | 2 +- Marlin/src/HAL/shared/backtrace/unwinder.h | 2 +- .../src/HAL/shared/backtrace/unwmemaccess.h | 2 +- .../shared/cpu_exception/exception_arm.cpp | 2 +- Marlin/src/core/macros.h | 2 +- Marlin/src/core/serial_hook.h | 2 +- Marlin/src/feature/bedlevel/hilbert_curve.cpp | 2 +- Marlin/src/feature/dac/dac_mcp4728.cpp | 6 +-- Marlin/src/feature/encoder_i2c.cpp | 2 +- Marlin/src/gcode/calibrate/G76_M192_M871.cpp | 2 +- Marlin/src/gcode/config/M43.cpp | 4 +- Marlin/src/gcode/feature/L6470/M906.cpp | 2 +- Marlin/src/gcode/feature/L6470/M916-918.cpp | 2 +- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 2 +- Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 6 +-- .../lcd/dogm/status_screen_lite_ST7920.cpp | 2 +- .../lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp | 2 +- .../lcd/extui/anycubic_chiron/chiron_tft.cpp | 6 +-- Marlin/src/lcd/extui/dgus/DGUSDisplay.h | 2 +- .../lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp | 2 +- .../lcd/extui/dgus/fysetc/DGUSDisplayDef.h | 2 +- .../extui/dgus/fysetc/DGUSScreenHandler.cpp | 2 +- .../lcd/extui/dgus/fysetc/DGUSScreenHandler.h | 2 +- .../lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp | 2 +- .../lcd/extui/dgus/hiprecy/DGUSDisplayDef.h | 2 +- .../extui/dgus/hiprecy/DGUSScreenHandler.cpp | 2 +- .../extui/dgus/hiprecy/DGUSScreenHandler.h | 2 +- .../src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp | 2 +- .../src/lcd/extui/dgus/mks/DGUSDisplayDef.h | 2 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 2 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.h | 2 +- .../lcd/extui/dgus/origin/DGUSDisplayDef.cpp | 2 +- .../lcd/extui/dgus/origin/DGUSDisplayDef.h | 2 +- .../extui/dgus/origin/DGUSScreenHandler.cpp | 2 +- .../lcd/extui/dgus/origin/DGUSScreenHandler.h | 2 +- .../archim2-flash/flash_storage.cpp | 2 +- .../ftdi_eve_lib/basic/commands.cpp | 2 +- .../ftdi_eve_lib/basic/commands.h | 2 +- .../ftdi_eve_lib/extended/command_processor.h | 4 +- .../ftdi_eve_lib/extended/event_loop.cpp | 2 +- .../ftdi_eve_lib/extended/poly_ui.h | 2 +- .../ftdi_eve_lib/extended/polygon.h | 2 +- .../ftdi_eve_lib/extended/screen_types.h | 2 +- .../ftdi_eve_lib/extended/tiny_timer.h | 2 +- .../ftdi_eve_lib/scripts/svg2cpp.py | 2 +- .../src/lcd/extui/mks_ui/SPIFlashStorage.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h | 2 +- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 4 +- Marlin/src/lcd/extui/mks_ui/pic_manager.cpp | 2 +- .../lcd/extui/mks_ui/printer_operation.cpp | 2 +- .../src/lcd/extui/mks_ui/wifiSerial_STM32.cpp | 2 +- Marlin/src/lcd/marlinui.cpp | 2 +- Marlin/src/lcd/tft/canvas.cpp | 2 +- Marlin/src/libs/MAX31865.cpp | 4 +- Marlin/src/libs/MAX31865.h | 2 +- Marlin/src/libs/W25Qxx.cpp | 4 +- Marlin/src/libs/buzzer.h | 2 +- Marlin/src/libs/duration_t.h | 4 +- Marlin/src/module/endstops.cpp | 6 +-- Marlin/src/module/planner.h | 2 +- Marlin/src/module/stepper/trinamic.cpp | 2 +- Marlin/src/module/temperature.cpp | 2 +- Marlin/src/module/thermistor/thermistor_61.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 2 +- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 2 +- Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 2 +- Marlin/src/pins/sam/pins_ADSK.h | 10 ++-- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 2 +- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 2 +- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 2 +- Marlin/src/sd/disk_io_driver.h | 2 +- .../src/sd/usb_flashdrive/lib-uhs2/UsbCore.h | 2 +- .../usb_flashdrive/lib-uhs2/confdescparser.h | 2 +- .../lib-uhs3/UHS_host/UHS_UsbCore.h | 2 +- .../lib-uhs3/UHS_host/UHS_macros.h | 2 +- .../MARLIN_BIGTREE_BTT002/ldscript.ld | 2 +- .../MARLIN_BIGTREE_E3_RRF/ldscript.ld | 2 +- .../MARLIN_BIGTREE_GTR_V1/ldscript.ld | 2 +- .../variants/MARLIN_BIGTREE_GTR_V1/variant.h | 2 +- .../MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld | 2 +- .../MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld | 2 +- .../MARLIN_BIGTREE_SKR_PRO_11/variant.h | 2 +- .../variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld | 2 +- .../variants/MARLIN_F103Rx/ldscript.ld | 2 +- .../variants/MARLIN_F103Vx/ldscript.ld | 2 +- .../variants/MARLIN_F103Zx/ldscript.ld | 2 +- .../variants/MARLIN_F407VE/ldscript.ld | 2 +- .../variants/MARLIN_F446VE/ldscript.ld | 2 +- .../variants/MARLIN_F4x7Vx/ldscript.ld | 2 +- .../variants/MARLIN_FLY_F407ZG/ldscript.ld | 2 +- .../MARLIN_FYSETC_CHEETAH_V20/ldscript.ld | 2 +- .../MARLIN_FYSETC_CHEETAH_V20/variant.h | 2 +- .../variants/MARLIN_FYSETC_S6/ldscript.ld | 2 +- .../variants/MARLIN_LERDGE/ldscript.ld | 2 +- .../variants/MARLIN_STEVAL_F401VE/ldscript.ld | 2 +- .../marlin_CHITU_F103/wirish/boards.cpp | 2 +- .../marlin_MEEB_3DP/wirish/boards.cpp | 2 +- .../scripts/createTemperatureLookupMarlin.py | 2 +- buildroot/share/scripts/g29_auto.py | 2 +- buildroot/tests/mega2560 | 2 +- 135 files changed, 186 insertions(+), 186 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 1b4d6306816e..239ee220b2f6 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1109,7 +1109,7 @@ #endif // Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J -// When the pin is defined you can use M672 to set/reset the probe sensivity. +// When the pin is defined you can use M672 to set/reset the probe sensitivity. //#define DUET_SMART_EFFECTOR #if ENABLED(DUET_SMART_EFFECTOR) #define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 67c875e81f6b..054a14161c23 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -3912,7 +3912,7 @@ */ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. - // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + // Use a rolling average to identify persistent errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE #endif // I2C_POSITION_ENCODERS diff --git a/Marlin/Makefile b/Marlin/Makefile index 5ff183082210..d09e5828f5b2 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -110,7 +110,7 @@ LIQUID_TWI2 ?= 0 WIRE ?= 0 # This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h) -# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory. +# Disabling this (and SPEAKER) saves approximately 350 bytes of memory. TONE ?= 1 # This defines if U8GLIB is needed (may require RELOC_WORKAROUND) diff --git a/Marlin/src/HAL/AVR/fastio.h b/Marlin/src/HAL/AVR/fastio.h index cf704179c896..f77d4f666c7d 100644 --- a/Marlin/src/HAL/AVR/fastio.h +++ b/Marlin/src/HAL/AVR/fastio.h @@ -284,7 +284,7 @@ enum ClockSource2 : char { * PWM availability macros */ -// Determine which harware PWMs are already in use +// Determine which hardware PWMs are already in use #define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN) #if PIN_EXISTS(CONTROLLER_FAN) #define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN) diff --git a/Marlin/src/HAL/DUE/HAL_SPI.cpp b/Marlin/src/HAL/DUE/HAL_SPI.cpp index 758640285b76..d3d76e94e5dd 100644 --- a/Marlin/src/HAL/DUE/HAL_SPI.cpp +++ b/Marlin/src/HAL/DUE/HAL_SPI.cpp @@ -437,7 +437,7 @@ } while (--todo); } - // Pointers to generic functions for block tranfers + // Pointers to generic functions for block transfers static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX; static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX; diff --git a/Marlin/src/HAL/DUE/usb/arduino_due_x.h b/Marlin/src/HAL/DUE/usb/arduino_due_x.h index d3b333fb349a..e7b6f3dcb303 100644 --- a/Marlin/src/HAL/DUE/usb/arduino_due_x.h +++ b/Marlin/src/HAL/DUE/usb/arduino_due_x.h @@ -71,7 +71,7 @@ /* ------------------------------------------------------------------------ */ /** - * \page arduino_due_x_board_info "Arduino Due/X - Board informations" + * \page arduino_due_x_board_info "Arduino Due/X - Board information" * This page lists several definition related to the board description. * */ diff --git a/Marlin/src/HAL/DUE/usb/udd.h b/Marlin/src/HAL/DUE/usb/udd.h index 7ec8c03dee63..461d98513b04 100644 --- a/Marlin/src/HAL/DUE/usb/udd.h +++ b/Marlin/src/HAL/DUE/usb/udd.h @@ -90,7 +90,7 @@ typedef struct { //! This buffer must be word align for DATA IN phase (use prefix COMPILER_WORD_ALIGNED for buffer) uint8_t *payload; - //! Size of buffer to send or fill, and content the number of byte transfered + //! Size of buffer to send or fill, and content the number of byte transferred uint16_t payload_size; //! Callback called after reception of ZLP from setup request @@ -132,7 +132,7 @@ typedef void (*udd_callback_halt_cleared_t)(void); * * \param status UDD_EP_TRANSFER_OK, if transfer is complete * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted - * \param n number of data transfered + * \param n number of data transferred */ typedef void (*udd_callback_trans_t) (udd_ep_status_t status, iram_size_t nb_transfered, udd_ep_id_t ep); @@ -303,7 +303,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep, * The driver uses a specific DMA USB to transfer data * from internal RAM to endpoint, if this one is available. * When the transfer is finished or aborted (stall, reset, ...), the \a callback is called. - * The \a callback returns the transfer status and eventually the number of byte transfered. + * The \a callback returns the transfer status and eventually the number of byte transferred. * Note: The control endpoint is not authorized. * * \param ep The ID of the endpoint to use diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc.c b/Marlin/src/HAL/DUE/usb/udi_cdc.c index cbe23dbb68fb..89debe57f130 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc.c +++ b/Marlin/src/HAL/DUE/usb/udi_cdc.c @@ -162,7 +162,7 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep); * * \param status UDD_EP_TRANSFER_OK, if transfer finished * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted - * \param n number of data transfered + * \param n number of data transferred */ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep); @@ -200,7 +200,7 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_ * * \param status UDD_EP_TRANSFER_OK, if transfer finished * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted - * \param n number of data transfered + * \param n number of data transferred */ static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep); diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h b/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h index d406a87743f3..e61b8cbaadf4 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h +++ b/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h @@ -106,7 +106,7 @@ extern "C" { */ //@{ # if UDI_CDC_PORT_NB > 2 -# error USBB, UDP, UDPHS and UOTGHS interfaces have not enought endpoints. +# error USBB, UDP, UDPHS and UOTGHS interfaces have not enough endpoints. # endif #define UDI_CDC_DATA_EP_IN_0 (1 | USB_EP_DIR_IN) // TX #define UDI_CDC_DATA_EP_OUT_0 (2 | USB_EP_DIR_OUT) // RX diff --git a/Marlin/src/HAL/DUE/usb/udi_msc.c b/Marlin/src/HAL/DUE/usb/udi_msc.c index b7c3bb5ea016..dd3404877210 100644 --- a/Marlin/src/HAL/DUE/usb/udi_msc.c +++ b/Marlin/src/HAL/DUE/usb/udi_msc.c @@ -173,7 +173,7 @@ static void udi_msc_cbw_wait(void); * * \param status UDD_EP_TRANSFER_OK, if transfer is finished * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted - * \param nb_received number of data transfered + * \param nb_received number of data transferred */ static void udi_msc_cbw_received(udd_ep_status_t status, iram_size_t nb_received, udd_ep_id_t ep); @@ -211,7 +211,7 @@ static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size); * * \param status UDD_EP_TRANSFER_OK, if transfer finish * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted - * \param nb_sent number of data transfered + * \param nb_sent number of data transferred */ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); @@ -244,7 +244,7 @@ void udi_msc_csw_send(void); * * \param status UDD_EP_TRANSFER_OK, if transfer is finished * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted - * \param nb_sent number of data transfered + * \param nb_sent number of data transferred */ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); @@ -463,7 +463,7 @@ uint8_t udi_msc_getsetting(void) static void udi_msc_cbw_invalid(void) { if (!udi_msc_b_cbw_invalid) - return; // Don't re-stall endpoint if error reseted by setup + return; // Don't re-stall endpoint if error reset by setup udd_ep_set_halt(UDI_MSC_EP_OUT); // If stall cleared then re-stall it. Only Setup MSC Reset can clear it udd_ep_wait_stall_clear(UDI_MSC_EP_OUT, udi_msc_cbw_invalid); @@ -472,7 +472,7 @@ static void udi_msc_cbw_invalid(void) static void udi_msc_csw_invalid(void) { if (!udi_msc_b_cbw_invalid) - return; // Don't re-stall endpoint if error reseted by setup + return; // Don't re-stall endpoint if error reset by setup udd_ep_set_halt(UDI_MSC_EP_IN); // If stall cleared then re-stall it. Only Setup MSC Reset can clear it udd_ep_wait_stall_clear(UDI_MSC_EP_IN, udi_msc_csw_invalid); diff --git a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c index e13232a39c7d..c7e8f8d99135 100644 --- a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c +++ b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c @@ -325,7 +325,7 @@ static void udd_sleep_mode(bool b_idle) /** * \name Control endpoint low level management routine. * - * This function performs control endpoint mangement. + * This function performs control endpoint management. * It handle the SETUP/DATA/HANDSHAKE phases of a control transaction. */ //@{ @@ -397,9 +397,9 @@ static void udd_ctrl_endofrequest(void); /** * \brief Main interrupt routine for control endpoint * - * This switchs control endpoint events to correct sub function. + * This switches control endpoint events to correct sub function. * - * \return \c 1 if an event about control endpoint is occured, otherwise \c 0. + * \return \c 1 if an event about control endpoint is occurred, otherwise \c 0. */ static bool udd_ctrl_interrupt(void); @@ -410,7 +410,7 @@ static bool udd_ctrl_interrupt(void); * \name Management of bulk/interrupt/isochronous endpoints * * The UDD manages the data transfer on endpoints: - * - Start data tranfer on endpoint with USB Device DMA + * - Start data transfer on endpoint with USB Device DMA * - Send a ZLP packet if requested * - Call callback registered to signal end of transfer * The transfer abort and stall feature are supported. @@ -431,7 +431,7 @@ typedef struct { uint8_t *buf; //! Size of buffer to send or fill iram_size_t buf_size; - //!< Size of data transfered + //!< Size of data transferred iram_size_t buf_cnt; //!< Size of data loaded (or prepared for DMA) last time iram_size_t buf_load; @@ -486,7 +486,7 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n #ifdef UDD_EP_DMA_SUPPORTED /** - * \brief Start the next transfer if necessary or complet the job associated. + * \brief Start the next transfer if necessary or complete the job associated. * * \param ep endpoint number without direction flag */ @@ -496,9 +496,9 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n /** * \brief Main interrupt routine for bulk/interrupt/isochronous endpoints * - * This switchs endpoint events to correct sub function. + * This switches endpoint events to correct sub function. * - * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured, otherwise \c 0. + * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occurred, otherwise \c 0. */ static bool udd_ep_interrupt(void); @@ -520,7 +520,7 @@ static bool udd_ep_interrupt(void); * * Note: * Here, the global interrupt mask is not clear when an USB interrupt is enabled - * because this one can not be occured during the USB ISR (=during INTX is masked). + * because this one can not be occurred during the USB ISR (=during INTX is masked). * See Technical reference $3.8.3 Masking interrupt requests in peripheral modules. */ #ifdef UHD_ENABLE @@ -787,7 +787,7 @@ void udd_attach(void) udd_sleep_mode(true); otg_unfreeze_clock(); - // This section of clock check can be improved with a chek of + // This section of clock check can be improved with a check of // USB clock source via sysclk() // Check USB clock because the source can be a PLL while (!Is_otg_clock_usable()); @@ -803,7 +803,7 @@ void udd_attach(void) #ifdef USB_DEVICE_HS_SUPPORT udd_enable_msof_interrupt(); #endif - // Reset following interupts flag + // Reset following interrupts flag udd_ack_reset(); udd_ack_sof(); udd_ack_msof(); @@ -902,7 +902,7 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes, } dbg_print("alloc(%x, %d) ", ep, MaxEndpointSize); - // Bank choise + // Bank choice switch (bmAttributes & USB_EP_TYPE_MASK) { case USB_EP_TYPE_ISOCHRONOUS: nb_bank = UDD_ISOCHRONOUS_NB_BANK(ep); @@ -1228,7 +1228,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep, if (Is_udd_endpoint_stall_requested(ep) || ptr_job->stall_requested) { - // Endpoint halted then registes the callback + // Endpoint halted then registers the callback ptr_job->busy = true; ptr_job->call_nohalt = callback; } else { @@ -1386,7 +1386,7 @@ static void udd_ctrl_setup_received(void) // Decode setup request if (udc_process_setup() == false) { - // Setup request unknow then stall it + // Setup request unknown then stall it udd_ctrl_stall_data(); udd_ack_setup_received(0); return; @@ -1447,7 +1447,7 @@ static void udd_ctrl_in_sent(void) udd_ctrl_prev_payload_buf_cnt += udd_ctrl_payload_buf_cnt; if ((udd_g_ctrlreq.req.wLength == udd_ctrl_prev_payload_buf_cnt) || b_shortpacket) { - // All data requested are transfered or a short packet has been sent + // All data requested are transferred or a short packet has been sent // then it is the end of data phase. // Generate an OUT ZLP for handshake phase. udd_ctrl_send_zlp_out(); @@ -1516,7 +1516,7 @@ static void udd_ctrl_out_received(void) // End of SETUP request: // - Data IN Phase aborted, // - or last Data IN Phase hidden by ZLP OUT sending quiclky, - // - or ZLP OUT received normaly. + // - or ZLP OUT received normally. udd_ctrl_endofrequest(); } else { // Protocol error during SETUP request @@ -1544,7 +1544,7 @@ static void udd_ctrl_out_received(void) (udd_ctrl_prev_payload_buf_cnt + udd_ctrl_payload_buf_cnt))) { // End of reception because it is a short packet - // Before send ZLP, call intermediat calback + // Before send ZLP, call intermediate callback // in case of data receiv generate a stall udd_g_ctrlreq.payload_size = udd_ctrl_payload_buf_cnt; if (NULL != udd_g_ctrlreq.over_under_run) { @@ -1565,7 +1565,7 @@ static void udd_ctrl_out_received(void) if (udd_g_ctrlreq.payload_size == udd_ctrl_payload_buf_cnt) { // Overrun then request a new payload buffer if (!udd_g_ctrlreq.over_under_run) { - // No callback availabled to request a new payload buffer + // No callback available to request a new payload buffer udd_ctrl_stall_data(); // Ack reception of OUT to replace NAK by a STALL udd_ack_out_received(0); @@ -1805,7 +1805,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep) // transfer size of UDD_ENDPOINT_MAX_TRANS Bytes next_trans = UDD_ENDPOINT_MAX_TRANS; - // Set 0 to tranfer the maximum + // Set 0 to transfer the maximum udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(0); } else { udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(next_trans); @@ -1850,7 +1850,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep) } cpu_irq_restore(flags); - // Here a ZLP has been recieved + // Here a ZLP has been received // and the DMA transfer must be not started. // It is the end of transfer ptr_job->buf_size = ptr_job->buf_cnt; @@ -1991,13 +1991,13 @@ static bool udd_ep_interrupt(void) } dbg_print("dma%x: ", ep); udd_disable_endpoint_dma_interrupt(ep); - // Save number of data no transfered + // Save number of data no transferred nb_remaining = (udd_endpoint_dma_get_status(ep) & UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk) >> UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos; if (nb_remaining) { // Transfer no complete (short packet or ZLP) then: - // Update number of data transfered + // Update number of data transferred ptr_job->buf_cnt -= nb_remaining; // Set transfer complete to stop the transfer ptr_job->buf_size = ptr_job->buf_cnt; @@ -2056,7 +2056,7 @@ static bool udd_ep_interrupt(void) udd_disable_endpoint_interrupt(ep); Assert(ptr_job->stall_requested); - // A stall has been requested during backgound transfer + // A stall has been requested during background transfer ptr_job->stall_requested = false; udd_disable_endpoint_bank_autoswitch(ep); udd_enable_stall_handshake(ep); diff --git a/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h b/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h index 0fef30804662..e1e59237d823 100644 --- a/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h +++ b/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h @@ -130,7 +130,7 @@ struct usb_msc_cbw { struct usb_msc_csw { le32_t dCSWSignature; //!< Must contain 'USBS' le32_t dCSWTag; //!< Same as dCBWTag - le32_t dCSWDataResidue; //!< Number of bytes not transfered + le32_t dCSWDataResidue; //!< Number of bytes not transferred uint8_t bCSWStatus; //!< Status code }; diff --git a/Marlin/src/HAL/LINUX/hardware/Heater.cpp b/Marlin/src/HAL/LINUX/hardware/Heater.cpp index 70df8161829a..44f11986c98b 100644 --- a/Marlin/src/HAL/LINUX/hardware/Heater.cpp +++ b/Marlin/src/HAL/LINUX/hardware/Heater.cpp @@ -54,7 +54,7 @@ void Heater::update() { } void Heater::interrupt(GpioEvent ev) { - // ununsed + // unused } #endif // __PLAT_LINUX__ diff --git a/Marlin/src/HAL/LINUX/include/pinmapping.h b/Marlin/src/HAL/LINUX/include/pinmapping.h index 3751ae0027c7..cfac5e3b48e4 100644 --- a/Marlin/src/HAL/LINUX/include/pinmapping.h +++ b/Marlin/src/HAL/LINUX/include/pinmapping.h @@ -55,7 +55,7 @@ constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); // Test whether the pin is PWM constexpr bool PWM_PIN(const pin_t p) { return false; } -// Test whether the pin is interruptable +// Test whether the pin is interruptible constexpr bool INTERRUPT_PIN(const pin_t p) { return false; } // Get the pin number at the given index diff --git a/Marlin/src/HAL/SAMD51/HAL.cpp b/Marlin/src/HAL/SAMD51/HAL.cpp index 5aa23cdaebe8..8baad31bc751 100644 --- a/Marlin/src/HAL/SAMD51/HAL.cpp +++ b/Marlin/src/HAL/SAMD51/HAL.cpp @@ -98,7 +98,7 @@ // Struct must be 32 bits aligned because of DMA accesses but fields needs to be 8 bits packed typedef struct __attribute__((aligned(4), packed)) { ADC_INPUTCTRL_Type INPUTCTRL; - } HAL_DMA_DAC_Registers; // DMA transfered registers + } HAL_DMA_DAC_Registers; // DMA transferred registers #endif diff --git a/Marlin/src/HAL/SAMD51/fastio.h b/Marlin/src/HAL/SAMD51/fastio.h index a95b7cac0ce9..79aede579044 100644 --- a/Marlin/src/HAL/SAMD51/fastio.h +++ b/Marlin/src/HAL/SAMD51/fastio.h @@ -131,7 +131,7 @@ */ #define PWM_PIN(P) (WITHIN(P, 2, 13) || WITHIN(P, 22, 23) || WITHIN(P, 44, 45) || P == 48) - // Return fullfilled ADCx->INPUTCTRL.reg + // Return fulfilled ADCx->INPUTCTRL.reg #define PIN_TO_INPUTCTRL(P) ( (PIN_TO_AIN(P) == 0) ? ADC_INPUTCTRL_MUXPOS_AIN0 \ : (PIN_TO_AIN(P) == 1) ? ADC_INPUTCTRL_MUXPOS_AIN1 \ : (PIN_TO_AIN(P) == 2) ? ADC_INPUTCTRL_MUXPOS_AIN2 \ diff --git a/Marlin/src/HAL/SAMD51/timers.cpp b/Marlin/src/HAL/SAMD51/timers.cpp index 5c55d324079a..7a535299db9a 100644 --- a/Marlin/src/HAL/SAMD51/timers.cpp +++ b/Marlin/src/HAL/SAMD51/timers.cpp @@ -107,7 +107,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { tc->COUNT32.INTENCLR.reg = TC_INTENCLR_OVF; // disable overflow interrupt // TCn clock setup - const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceeded by TCC ones + const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceded by TCC ones GCLK->PCHCTRL[clockID].bit.CHEN = false; SYNC(GCLK->PCHCTRL[clockID].bit.CHEN); GCLK->PCHCTRL[clockID].reg = GCLK_PCHCTRL_GEN_GCLK0 | GCLK_PCHCTRL_CHEN; // 120MHz startup code programmed diff --git a/Marlin/src/HAL/STM32/HAL_MinSerial.cpp b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp index 44fb93337d4a..c780a50c57fc 100644 --- a/Marlin/src/HAL/STM32/HAL_MinSerial.cpp +++ b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp @@ -123,7 +123,7 @@ static void TX(char c) { } regs->DR = c; #else - // Let's hope a mystical guru will fix this, one day by writting interrupt-free USB CDC ACM code (or, at least, by polling the registers since interrupt will be queued but will never trigger) + // Let's hope a mystical guru will fix this, one day by writing interrupt-free USB CDC ACM code (or, at least, by polling the registers since interrupt will be queued but will never trigger) // For now, it's completely lost to oblivion. #endif } diff --git a/Marlin/src/HAL/STM32/Servo.cpp b/Marlin/src/HAL/STM32/Servo.cpp index c0a64c5ea949..54b1fbe670c4 100644 --- a/Marlin/src/HAL/STM32/Servo.cpp +++ b/Marlin/src/HAL/STM32/Servo.cpp @@ -37,7 +37,7 @@ static_assert(COUNT(servoDelay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM // This allows all timer interrupt priorities to be managed from a single location in the HAL. static uint32_t servo_interrupt_priority = NVIC_EncodePriority(NVIC_GetPriorityGrouping(), TIM_IRQ_PRIO, TIM_IRQ_SUBPRIO); -// This must be called after the STM32 Servo class has intialized the timer. +// This must be called after the STM32 Servo class has initialized the timer. // It may only be needed after the first call to attach(), but it is possible // that is is necessary after every detach() call. To be safe this is currently // called after every call to attach(). diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index 05e0d4c42015..0c37abfcbb08 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -121,7 +121,7 @@ bool PersistentStore::access_start() { address += sizeof(uint32_t); } if (current_slot == -1) { - // We didn't find anything, so we'll just intialize to empty + // We didn't find anything, so we'll just initialize to empty for (int i = 0; i < MARLIN_EEPROM_SIZE; i++) ram_eeprom[i] = EMPTY_UINT8; current_slot = EEPROM_SLOTS; } diff --git a/Marlin/src/HAL/STM32/msc_sd.cpp b/Marlin/src/HAL/STM32/msc_sd.cpp index 70a719d665ca..f95f75c5fcf6 100644 --- a/Marlin/src/HAL/STM32/msc_sd.cpp +++ b/Marlin/src/HAL/STM32/msc_sd.cpp @@ -60,7 +60,7 @@ class Sd2CardUSBMscHandler : public USBMscHandler { return true; } - // multi block optmization + // multi block optimization sd2card->writeStart(blkAddr, blkLen); while (blkLen--) { watchdog_refresh(); @@ -80,7 +80,7 @@ class Sd2CardUSBMscHandler : public USBMscHandler { return true; } - // multi block optmization + // multi block optimization sd2card->readStart(blkAddr); while (blkLen--) { watchdog_refresh(); diff --git a/Marlin/src/HAL/STM32F1/HAL.cpp b/Marlin/src/HAL/STM32F1/HAL.cpp index dcfdc88555bb..73014945a156 100644 --- a/Marlin/src/HAL/STM32F1/HAL.cpp +++ b/Marlin/src/HAL/STM32F1/HAL.cpp @@ -253,7 +253,7 @@ static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */ reg_value = (reg_value | ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << 8)); /* Insert write key and priorty group */ + (PriorityGroupTmp << 8)); /* Insert write key & priority group */ SCB->AIRCR = reg_value; } diff --git a/Marlin/src/HAL/STM32F1/SPI.cpp b/Marlin/src/HAL/STM32F1/SPI.cpp index c0a35b88d1a2..8bfa3d236a7c 100644 --- a/Marlin/src/HAL/STM32F1/SPI.cpp +++ b/Marlin/src/HAL/STM32F1/SPI.cpp @@ -363,8 +363,8 @@ uint16_t SPIClass::transfer16(uint16_t data) const { /** * Roger Clark and Victor Perez, 2015 * Performs a DMA SPI transfer with at least a receive buffer. - * If a TX buffer is not provided, FF is sent over and over for the lenght of the transfer. - * On exit TX buffer is not modified, and RX buffer cotains the received data. + * If a TX buffer is not provided, FF is sent over and over for the length of the transfer. + * On exit TX buffer is not modified, and RX buffer contains the received data. * Still in progress. */ void SPIClass::dmaTransferSet(const void *transmitBuf, void *receiveBuf) { diff --git a/Marlin/src/HAL/STM32F1/onboard_sd.h b/Marlin/src/HAL/STM32F1/onboard_sd.h index 1c0a1c5b845b..f228d068c9db 100644 --- a/Marlin/src/HAL/STM32F1/onboard_sd.h +++ b/Marlin/src/HAL/STM32F1/onboard_sd.h @@ -7,8 +7,8 @@ #pragma once #define _DISKIO_WRITE 1 /* 1: Enable disk_write function */ -#define _DISKIO_IOCTL 1 /* 1: Enable disk_ioctl fucntion */ -#define _DISKIO_ISDIO 0 /* 1: Enable iSDIO control fucntion */ +#define _DISKIO_IOCTL 1 /* 1: Enable disk_ioctl function */ +#define _DISKIO_ISDIO 0 /* 1: Enable iSDIO control function */ typedef unsigned char BYTE; typedef unsigned short WORD; @@ -56,7 +56,7 @@ DRESULT disk_read(BYTE pdrv, BYTE* buff, DWORD sector, UINT count); #define STA_NODISK 0x02 /* No medium in the drive */ #define STA_PROTECT 0x04 /* Write protected */ -/* Command code for disk_ioctrl fucntion */ +/* Command code for disk_ioctrl function */ /* Generic command (Used by FatFs) */ #define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */ diff --git a/Marlin/src/HAL/STM32F1/timers.h b/Marlin/src/HAL/STM32F1/timers.h index 38a0fc7fa1e9..c89d55a134b4 100644 --- a/Marlin/src/HAL/STM32F1/timers.h +++ b/Marlin/src/HAL/STM32F1/timers.h @@ -166,7 +166,7 @@ FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const ha case STEP_TIMER_NUM: // NOTE: WE have set ARPE = 0, which means the Auto reload register is not preloaded // and there is no need to use any compare, as in the timer mode used, setting ARR to the compare value - // will result in exactly the same effect, ie trigerring an interrupt, and on top, set counter to 0 + // will result in exactly the same effect, ie triggering an interrupt, and on top, set counter to 0 timer_set_reload(STEP_TIMER_DEV, compare); // We reload direct ARR as needed during counting up break; case TEMP_TIMER_NUM: diff --git a/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp b/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp index b6f01e6c0ea0..ff84e91f79d7 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp +++ b/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp @@ -65,7 +65,7 @@ void spiInit(uint8_t spiRate) { case SPI_EIGHTH_SPEED: clock = 1250000; break; case SPI_SPEED_5: clock = 625000; break; case SPI_SPEED_6: clock = 312500; break; - default: clock = 4000000; // Default from the SPI libarary + default: clock = 4000000; // Default from the SPI library } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); SPI.begin(); diff --git a/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp b/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp index 28bca65af5da..e63ab1c0e3ed 100644 --- a/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp +++ b/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp @@ -65,7 +65,7 @@ void spiInit(uint8_t spiRate) { case SPI_SPEED_5: clock = 625000; break; case SPI_SPEED_6: clock = 312500; break; default: - clock = 4000000; // Default from the SPI libarary + clock = 4000000; // Default from the SPI library } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); SPI.begin(); diff --git a/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp b/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp index 7e202d724edc..610765ad49c7 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp +++ b/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp @@ -82,7 +82,7 @@ void spiInit(uint8_t spiRate) { case SPI_SPEED_5: clock = 625000; break; case SPI_SPEED_6: clock = 312500; break; default: - clock = 4000000; // Default from the SPI libarary + clock = 4000000; // Default from the SPI library } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); SPI.begin(); diff --git a/Marlin/src/HAL/shared/backtrace/unwarm.h b/Marlin/src/HAL/shared/backtrace/unwarm.h index 86dc98c073e1..edae90650e29 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarm.h +++ b/Marlin/src/HAL/shared/backtrace/unwarm.h @@ -4,7 +4,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwarmbytab.h b/Marlin/src/HAL/shared/backtrace/unwarmbytab.h index e2f80db2a5b8..53aeca259439 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarmbytab.h +++ b/Marlin/src/HAL/shared/backtrace/unwarmbytab.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp b/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp index a40d8540ec38..24023200e155 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwarmmem.h b/Marlin/src/HAL/shared/backtrace/unwarmmem.h index 1340bbdf0a25..eb4579a76107 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarmmem.h +++ b/Marlin/src/HAL/shared/backtrace/unwarmmem.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwinder.cpp b/Marlin/src/HAL/shared/backtrace/unwinder.cpp index 0f88e2a7f75b..aedfa2404d65 100644 --- a/Marlin/src/HAL/shared/backtrace/unwinder.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwinder.cpp @@ -28,7 +28,7 @@ extern "C" const UnwTabEntry __exidx_end[]; // Detect if unwind information is present or not static int HasUnwindTableInfo() { - // > 16 because there are default entries we can't supress + // > 16 because there are default entries we can't suppress return ((char*)(&__exidx_end) - (char*)(&__exidx_start)) > 16 ? 1 : 0; } diff --git a/Marlin/src/HAL/shared/backtrace/unwinder.h b/Marlin/src/HAL/shared/backtrace/unwinder.h index 8692c7a1aa50..9280e2f36e89 100644 --- a/Marlin/src/HAL/shared/backtrace/unwinder.h +++ b/Marlin/src/HAL/shared/backtrace/unwinder.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. **************************************************************************/ diff --git a/Marlin/src/HAL/shared/backtrace/unwmemaccess.h b/Marlin/src/HAL/shared/backtrace/unwmemaccess.h index 562ab3f05da9..b911e343dc46 100644 --- a/Marlin/src/HAL/shared/backtrace/unwmemaccess.h +++ b/Marlin/src/HAL/shared/backtrace/unwmemaccess.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp index 124f0b7c43c6..9a1b4caf8d8c 100644 --- a/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp +++ b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp @@ -345,7 +345,7 @@ void hook_cpu_exceptions() { // We failed to find a valid vector table size, let's abort hooking up if (vec_size == VECTOR_TABLE_SENTINEL) return; // Poor method that's wasting RAM here, but allocating with malloc and alignment would be worst - // 128 bytes alignement is required for writing the VTOR register + // 128 bytes alignment is required for writing the VTOR register alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL]; SERIAL_ECHOPGM("Detected vector table size: "); diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index abcd7b9480cb..86368bf5e718 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -399,7 +399,7 @@ template struct first_type_of { typedef T type; }; template struct first_type_of { typedef T type; }; } - // C++11 solution using SFINAE to detect the existance of a member in a class at compile time. + // C++11 solution using SFINAE to detect the existence of a member in a class at compile time. // It creates a HasMember structure containing 'value' set to true if the member exists #define HAS_MEMBER_IMPL(Member) \ namespace Private { \ diff --git a/Marlin/src/core/serial_hook.h b/Marlin/src/core/serial_hook.h index d56cb55a66be..2019b389e497 100644 --- a/Marlin/src/core/serial_hook.h +++ b/Marlin/src/core/serial_hook.h @@ -109,7 +109,7 @@ struct ConditionalSerial : public SerialBase< ConditionalSerial > { ConditionalSerial(bool & conditionVariable, SerialT & out, const bool e) : BaseClassT(e), condition(conditionVariable), out(out) {} }; -// A simple foward class that taking a reference to an existing serial instance (likely created in their respective framework) +// A simple forward class that taking a reference to an existing serial instance (likely created in their respective framework) template struct ForwardSerial : public SerialBase< ForwardSerial > { typedef SerialBase< ForwardSerial > BaseClassT; diff --git a/Marlin/src/feature/bedlevel/hilbert_curve.cpp b/Marlin/src/feature/bedlevel/hilbert_curve.cpp index e4bc3aa61819..7474123e3fe1 100644 --- a/Marlin/src/feature/bedlevel/hilbert_curve.cpp +++ b/Marlin/src/feature/bedlevel/hilbert_curve.cpp @@ -35,7 +35,7 @@ constexpr uint8_t dim = _BV(ord); static inline bool eval_candidate(int8_t x, int8_t y, hilbert_curve::callback_ptr func, void *data) { // The print bed likely has fewer points than the full Hilbert - // curve, so cull unecessary points + // curve, so cull unnecessary points return x < (GRID_MAX_POINTS_X) && y < (GRID_MAX_POINTS_Y) ? func(x, y, data) : false; } diff --git a/Marlin/src/feature/dac/dac_mcp4728.cpp b/Marlin/src/feature/dac/dac_mcp4728.cpp index 1278d1bec857..6f5a9ee691ac 100644 --- a/Marlin/src/feature/dac/dac_mcp4728.cpp +++ b/Marlin/src/feature/dac/dac_mcp4728.cpp @@ -81,7 +81,7 @@ uint8_t MCP4728::eepromWrite() { } /** - * Write Voltage reference setting to all input regiters + * Write Voltage reference setting to all input registers */ uint8_t MCP4728::setVref_all(const uint8_t value) { Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS)); @@ -89,7 +89,7 @@ uint8_t MCP4728::setVref_all(const uint8_t value) { return Wire.endTransmission(); } /** - * Write Gain setting to all input regiters + * Write Gain setting to all input registers */ uint8_t MCP4728::setGain_all(const uint8_t value) { Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS)); @@ -129,7 +129,7 @@ void MCP4728::setDrvPct(xyze_uint_t &pct) { } /** - * FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1 + * FastWrite input register values - All DAC output update. refer to DATASHEET 5.6.1 * DAC Input and PowerDown bits update. * No EEPROM update */ diff --git a/Marlin/src/feature/encoder_i2c.cpp b/Marlin/src/feature/encoder_i2c.cpp index c6881591b6b9..283092e3447f 100644 --- a/Marlin/src/feature/encoder_i2c.cpp +++ b/Marlin/src/feature/encoder_i2c.cpp @@ -94,7 +94,7 @@ void I2CPositionEncoder::update() { SERIAL_ECHOLNPAIR("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction."); - //the encoder likely lost its place when the error occured, so we'll reset and use the printer's + //the encoder likely lost its place when the error occurred, so we'll reset and use the printer's //idea of where it the axis is to re-initialize const float pos = planner.get_axis_position_mm(encoderAxis); int32_t positionInTicks = pos * get_ticks_unit(); diff --git a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp index d5266179c7b1..2d1b9443bf17 100644 --- a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp @@ -47,7 +47,7 @@ * Compensation values are deltas to first probe measurement at bed temp. = 60°C. * - The hotend will not be heated at any time. * - On my Průša MK3S clone I put a piece of paper between the probe and the hotend - * so the hotend fan would not cool my probe constantly. Alternativly you could just + * so the hotend fan would not cool my probe constantly. Alternatively you could just * make sure the fan is not running while running the calibration process. * * Probe calibration: diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 4009721a57ed..84757e740370 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -288,8 +288,8 @@ inline void servo_probe_test() { * S - Start Pin number. If not given, will default to 0 * L - End Pin number. If not given, will default to last pin defined for this board * I - Flag to ignore Marlin's pin protection. Use with caution!!!! - * R - Repeat pulses on each pin this number of times before continueing to next pin - * W - Wait time (in miliseconds) between pulses. If not given will default to 500 + * R - Repeat pulses on each pin this number of times before continuing to next pin + * W - Wait time (in milliseconds) between pulses. If not given will default to 500 * * M43 S - Servo probe test * P - Probe index (optional - defaults to 0 diff --git a/Marlin/src/gcode/feature/L6470/M906.cpp b/Marlin/src/gcode/feature/L6470/M906.cpp index dddf7f8aeed1..b1beed068a7b 100644 --- a/Marlin/src/gcode/feature/L6470/M906.cpp +++ b/Marlin/src/gcode/feature/L6470/M906.cpp @@ -212,7 +212,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { * L6474 - current in mA (4A max) * All others - 0-255 * - * Sets KVAL_HOLD wich affects the current being driven through the stepper. + * Sets KVAL_HOLD which affects the current being driven through the stepper. * * L6470 is used in the STEP-CLOCK mode. KVAL_HOLD is the only KVAL_xxx * that affects the effective voltage seen by the stepper. diff --git a/Marlin/src/gcode/feature/L6470/M916-918.cpp b/Marlin/src/gcode/feature/L6470/M916-918.cpp index 8a1ea4830606..3dd21ef98527 100644 --- a/Marlin/src/gcode/feature/L6470/M916-918.cpp +++ b/Marlin/src/gcode/feature/L6470/M916-918.cpp @@ -177,7 +177,7 @@ void GcodeSuite::M916() { if ((status_composite & (sh.STATUS_AXIS_TH_WRN | sh.STATUS_AXIS_TH_SD))) DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Thermal warning/shutdown has occurred"); else if (status_composite) - DEBUG_ECHOLNPGM(".\n.\nTest completed abnormally - non-thermal error has occured"); + DEBUG_ECHOLNPGM(".\n.\nTest completed abnormally - non-thermal error has occurred"); else DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Unable to get to thermal warning/shutdown"); diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 1025a8153b79..137b9fce3ec1 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -220,7 +220,7 @@ #define LCD_PROGRESS_BAR #endif #if ENABLED(TFTGLCD_PANEL_I2C) - #define LCD_I2C_ADDRESS 0x33 // Must be 0x33 for STM32 main boards and equal to panel's I2C slave addres + #define LCD_I2C_ADDRESS 0x33 // Must be 0x33 for STM32 main boards and equal to panel's I2C slave address #endif #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD, used for both I2C and SPI buses (LiquidTWI2 not required) #define STD_ENCODER_PULSES_PER_STEP 2 diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 0c87c3dc3fa1..f4d765e2d303 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -1321,7 +1321,7 @@ void MarlinUI::draw_status_screen() { y_map_pixels = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y); // Directions fit nicely right_edge = pixels_per_x_mesh_pnt * (GRID_MAX_POINTS_X) + 1; // Find location of right edge within the character cell - bottom_line = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y) + 1; // Find location of bottome line within the character cell + bottom_line = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y) + 1; // Find location of bottom line within the character cell n_rows = bottom_line / (HD44780_CHAR_HEIGHT) + 1; n_cols = right_edge / (HD44780_CHAR_WIDTH) + 1; diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 5991fc3b8b73..712e76e86f21 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -98,7 +98,7 @@ TFTGLCD lcd; #define COLOR_EDIT '#' #define COLOR_ERROR '!' -#ifdef CONVERT_TO_EXT_ASCII //use standart pseudographic symbols in ASCII table +#ifdef CONVERT_TO_EXT_ASCII //use standard pseudographic symbols in ASCII table #define LR 179 //vertical line #define TRC 191 //top right corner #define BLC 192 //bottom left corner @@ -401,7 +401,7 @@ static void center_text_P(PGM_P pstart, uint8_t y) { // uint8_t indent = (LCD_WIDTH - 8) / 2; // symbols 217 (bottom right corner) and 218 (top left corner) are using for letters in some languages - // and they should be moved to begining ASCII table as spetial symbols + // and they should be moved to beginning ASCII table as special symbols lcd.setCursor(indent, 0); lcd.write(TLC); lcd_put_u8str_P(PSTR("------")); lcd.write(TRC); lcd.setCursor(indent, 1); lcd.write(LR); lcd_put_u8str_P(PSTR("Marlin")); lcd.write(LR); lcd.setCursor(indent, 2); lcd.write(BLC); lcd_put_u8str_P(PSTR("------")); lcd.write(BRC); @@ -733,7 +733,7 @@ Equal to 20x10 text LCD | | | HE BED FAN | | ttc ttc % | ttc - current temperature -| tts tts %%% | tts - setted temperature, %%% - percent for FAN +| tts tts %%% | tts - set temperature, %%% - percent for FAN | ICO ICO ICO ICO | ICO - icon 48x48, placed in 2 text lines | ICO ICO ICO ICO | ICO diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index c76857b6bb40..be112c8d549e 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -447,7 +447,7 @@ void ST7920_Lite_Status_Screen::draw_static_elements() { * data buffer (DDRAM) to be used in conjunction with the graphics * bitmap buffer (CGRAM). The contents of the graphics buffer is * XORed with the data from the character generator. This allows - * us to make the progess bar out of graphical data (the bar) and + * us to make the progress bar out of graphical data (the bar) and * text data (the percentage). */ void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) { diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index aa5f990898f6..fde6e41792dc 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -73,7 +73,7 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = { 0x038, // 8 Bit interface (DL=1), basic instruction set (RE=0) 0x00C, // display on, cursor & blink off; 0x08: all off 0x006, // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift - 0x002, // disable scroll, enable CGRAM adress + 0x002, // disable scroll, enable CGRAM address 0x001, // clear RAM, needs 1.6 ms U8G_ESC_DLY(100), // delay 100 ms diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp index 14d394db72c6..0ecb138bd5f5 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -208,7 +208,7 @@ void ChironTFT::ConfirmationRequest(const char * const msg) { case AC_printer_resuming_from_power_outage: case AC_printer_printing: case AC_printer_paused: { - // Heater timout, send acknowledgement + // Heater timeout, send acknowledgement if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) { pause_state = AC_paused_heater_timed_out; SendtoTFTLN(AC_msg_paused); // enable continue button @@ -248,7 +248,7 @@ void ChironTFT::StatusChange(const char * const msg) { printer_state = AC_printer_idle; msg_matched = true; } - // If probing fails dont save the mesh raise the probe above the bad point + // If probing fails don't save the mesh raise the probe above the bad point if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { PlayTune(BEEPER_PIN, BeepBeepBeeep, 1); injectCommands_P(PSTR("G1 Z50 F500")); @@ -622,7 +622,7 @@ void ChironTFT::PanelAction(uint8_t req) { break; case 14: { // A14 Start Printing - // Allows printer to restart the job if we dont want to recover + // Allows printer to restart the job if we don't want to recover if (printer_state == AC_printer_resuming_from_power_outage) { injectCommands_P(PSTR("M1000 C")); // Cancel recovery printer_state = AC_printer_idle; diff --git a/Marlin/src/lcd/extui/dgus/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus/DGUSDisplay.h index ed8178449d17..e486a0014570 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSDisplay.h +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplay.h @@ -93,7 +93,7 @@ class DGUSDisplay { // Helper for users of this class to estimate if an interaction would be blocking. static size_t GetFreeTxBuffer(); - // Checks two things: Can we confirm the presence of the display and has we initiliazed it. + // Checks two things: Can we confirm the presence of the display and has we initialized it. // (both boils down that the display answered to our chatting) static inline bool isInitialized() { return Initialized; } diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp index 39cb6e2bef02..d73a7ea552a6 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp @@ -466,7 +466,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), #endif - // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content. + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h index 79aee9a57647..2543d20b7688 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h @@ -282,7 +282,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710; constexpr uint16_t VP_BED_PID_I = 0x3712; constexpr uint16_t VP_BED_PID_D = 0x3714; -// Wating screen status +// Waiting screen status constexpr uint16_t VP_WAITING_STATUS = 0x3800; // SPs for certain variables... diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp index 0012a0e5e07f..ae6a31fb0571 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -161,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } #endif char axiscode; - unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode. + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. switch (var.VP) { default: return; diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h index d8e25a8f7740..ee0af013a855 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h @@ -36,7 +36,7 @@ class DGUSScreenHandler { static bool loop(); // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen - // The bools specifing whether the strings are in RAM or FLASH. + // The bools specifying whether the strings are in RAM or FLASH. static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp index f1f4308d2261..bdcff47ae812 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp @@ -465,7 +465,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), #endif - // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content. + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h index 0c3a6aa35278..e9581553817b 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h @@ -278,7 +278,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710; constexpr uint16_t VP_BED_PID_I = 0x3712; constexpr uint16_t VP_BED_PID_D = 0x3714; -// Wating screen status +// Waiting screen status constexpr uint16_t VP_WAITING_STATUS = 0x3800; // SPs for certain variables... diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp index 2100febc3279..c67ec73f6192 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -161,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } #endif char axiscode; - unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode. + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. switch (var.VP) { default: return; diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h index d8e25a8f7740..ee0af013a855 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h @@ -36,7 +36,7 @@ class DGUSScreenHandler { static bool loop(); // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen - // The bools specifing whether the strings are in RAM or FLASH. + // The bools specifying whether the strings are in RAM or FLASH. static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp index c60d6e8bc4b3..9ecfb57397b9 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp @@ -785,7 +785,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), #endif - // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content. + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. //{.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, //{.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, //{.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h index 5c9ff02bfed9..c78e35e75b56 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h @@ -266,7 +266,7 @@ constexpr uint16_t VP_MOVE_OPTION = 0x3500; // constexpr uint16_t VP_BED_PID_I = 0x3712; // constexpr uint16_t VP_BED_PID_D = 0x3714; -// Wating screen status +// Waiting screen status constexpr uint16_t VP_WAITING_STATUS = 0x3800; // SPs for certain variables... diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 0c022d3e8853..8c806f0ecd10 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -762,7 +762,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; char axiscode; - unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode. + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. switch (var.VP) { // switch X Y Z or Home default: return; diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h index 7d5263c6b830..8d5d9066f4c8 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h @@ -36,7 +36,7 @@ class DGUSScreenHandler { static bool loop(); // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen - // The bools specifing whether the strings are in RAM or FLASH. + // The bools specifying whether the strings are in RAM or FLASH. static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp index 39d89fc174c0..2f5e2787d615 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp @@ -267,7 +267,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), #endif - // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content. + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h index 06f0dcf00159..f5fb986bde51 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h @@ -268,7 +268,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710; constexpr uint16_t VP_BED_PID_I = 0x3712; constexpr uint16_t VP_BED_PID_D = 0x3714; -// Wating screen status +// Waiting screen status constexpr uint16_t VP_WAITING_STATUS = 0x3800; // SPs for certain variables... diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp index 827d74967a19..b0759c63afaf 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -161,7 +161,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } #endif char axiscode; - unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode. + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. switch (var.VP) { default: return; diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h index d8e25a8f7740..ee0af013a855 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h @@ -36,7 +36,7 @@ class DGUSScreenHandler { static bool loop(); // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen - // The bools specifing whether the strings are in RAM or FLASH. + // The bools specifying whether the strings are in RAM or FLASH. static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp index 1d4711c0e262..a28318335c59 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp @@ -206,7 +206,7 @@ bool UIFlashStorage::is_present = false; /* In order to provide some degree of wear leveling, each data write to the * SPI Flash chip is appended to data that was already written before, until - * the data storage area is completely filled. New data is written preceeded + * the data storage area is completely filled. New data is written preceded * with a 32-bit delimiter 'LULZ', so that we can distinguish written and * unwritten data: * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp index 48d60a37ac58..a10fdc3ede35 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp @@ -1079,7 +1079,7 @@ void CLCD::CommandFifo::str(progmem_str data) { void CLCD::init() { spi_init(); // Set Up I/O Lines for SPI and FT800/810 Control - ftdi_reset(); // Power down/up the FT8xx with the apropriate delays + ftdi_reset(); // Power down/up the FT8xx with the appropriate delays host_cmd(Use_Crystal ? CLKEXT : CLKINT, 0); host_cmd(FTDI::ACTIVE, 0); // Activate the System Clock diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h index 5ce628fd36dc..9fc5195fd4d3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h @@ -70,7 +70,7 @@ * * CommandFifo::fgcolor Set Graphic Item Foreground Color * * CommandFifo::bgcolor Set Graphic Item Background Color * - * CommandFifo::begin() Begin Drawing a Primative * + * CommandFifo::begin() Begin Drawing a Primitive * * CommandFifo::mem_copy() Copy a Block of Memory * * CommandFifo::append() Append Commands to Current DL * * CommandFifo::gradient_color() Set 3D Button Highlight Color * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h index 9a83e9ee09c1..309c1927c8cb 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h @@ -65,7 +65,7 @@ class CommandProcessor : public CLCD::CommandFifo { uint8_t _style = 0; protected: - // Returns the cannonical thickness of a widget (i.e. the height of a toggle element) + // Returns the canonical thickness of a widget (i.e. the height of a toggle element) uint16_t widget_thickness() { CLCD::FontMetrics fm(_font); return fm.height * 20.0/16; @@ -251,7 +251,7 @@ class CommandProcessor : public CLCD::CommandFifo { return toggle(x, y, w, h, text, state, options); } - // Contrained drawing routines. These constrain the widget inside a box for easier layout. + // Constrained drawing routines. These constrain the widget inside a box for easier layout. // The FORCEDINLINE ensures that the code is inlined so that all the math is done at compile time. FORCEDINLINE CommandProcessor& track_linear(int16_t x, int16_t y, int16_t w, int16_t h, int16_t tag) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp index ac8f49a055c4..7fccb309f56b 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp @@ -108,7 +108,7 @@ namespace FTDI { * - Dispatches onTouchStart and onTouchEnd events to the active screen. * - Handles auto-repetition by sending onTouchHeld to the active screen periodically. * - Plays touch feedback "click" sounds when appropriate. - * - Performs debouncing to supress spurious touch events. + * - Performs debouncing to suppress spurious touch events. */ void EventLoop::process_events() { // If the LCD is processing commands, don't check diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h index 2e74ec3a4776..809e729a8f69 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h @@ -272,7 +272,7 @@ class GenericPolyUI { if (clip) { // Clipping reduces the number of pixels that are // filled, allowing more complex shapes to be drawn - // in the alloted time. + // in the allotted time. bounds(r, x, y, w, h); cmd.cmd(SAVE_CONTEXT()); cmd.cmd(SCISSOR_XY(x, y)); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h index 6aa52f09c9bd..3dc80bb3bba0 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h @@ -41,7 +41,7 @@ * ... * p.end_fill(); * - * Based on the example from "Applicaton Note AN_334, FT801 Polygon Application": + * Based on the example from "Application Note AN_334, FT801 Polygon Application": * * https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_334-FT801_Polygon_Application.pdf */ diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h index 94d6d4e26cf6..486c4fe562a3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h @@ -152,7 +152,7 @@ class UIScreen { #define AT_SCREEN(screen) (current_screen.getType() == current_screen.lookupScreen(screen::onRedraw)) #define IS_PARENT_SCREEN(screen) (current_screen.peek() == current_screen.lookupScreen(screen::onRedraw)) -/************************** CACHED VS UNCHACHED SCREENS ***************************/ +/************************** CACHED VS UNCACHED SCREENS ***************************/ class UncachedScreen { public: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h index f64d033d524b..576567cf4dee 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h @@ -28,7 +28,7 @@ /* tiny_interval_t downsamples a 32-bit millis() value into a 8-bit value which can record periods of - a few seconds with a rougly 1/16th of second + a few seconds with a roughly 1/16th of second resolution. This allows us to measure small intervals without needing to use four-byte counters. */ diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py index aa702ca4b4d5..cfc262545356 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py @@ -164,7 +164,7 @@ def process_svg_path_L_or_M(self, cmd, x, y): def process_svg_path_data_cmd(self, id, cmd, a, b): """Converts the various types of moves into L or M commands - and dispatches to process_svg_path_L_or_M for futher processing.""" + and dispatches to process_svg_path_L_or_M for further processing.""" if cmd == "Z" or cmd == "z": self.process_svg_path_L_or_M("L", self.initial_x, self.initial_y) elif cmd == "H": diff --git a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp index 5f5608472c78..6f3d6bbb6b66 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp @@ -204,7 +204,7 @@ void SPIFlashStorage::flushPage() { return; } - // Part of the m_pageData was compressed, so ajust the pointers, freeing what was processed, shift the buffer + // Part of the m_pageData was compressed, so adjust the pointers, freeing what was processed, shift the buffer // TODO: To avoid this copy, use a circular buffer memmove(m_pageData, m_pageData + inputProcessed, m_pageDataUsed - inputProcessed); m_pageDataUsed -= inputProcessed; diff --git a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h index f2ce8e44bac3..4683ff935187 100644 --- a/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h @@ -55,7 +55,7 @@ * * When reading, it loads a full page from SPI Flash at once and * keeps it in a private SRAM buffer. Data is loaded as needed to - * fullfill requests. Sequential reads are optimal. + * fulfill requests. Sequential reads are optimal. * * SPIFlashStorage.beginRead(myStartAddress); * while (there is data to read) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index aae6e62a6636..7dfbea5bae18 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -237,7 +237,7 @@ void update_spi_flash() { uint8_t command_buf[512]; W25QXX.init(SPI_QUARTER_SPEED); - //read back the gcode command befor erase spi flash + //read back the gcode command before erase spi flash W25QXX.SPI_FLASH_BufferRead((uint8_t *)&command_buf, GCODE_COMMAND_ADDR, sizeof(command_buf)); W25QXX.SPI_FLASH_SectorErase(VAR_INF_ADDR); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&gCfgItems, VAR_INF_ADDR, sizeof(gCfgItems)); @@ -248,7 +248,7 @@ void update_gcode_command(int addr,uint8_t *s) { uint8_t command_buf[512]; W25QXX.init(SPI_QUARTER_SPEED); - //read back the gcode command befor erase spi flash + //read back the gcode command before erase spi flash W25QXX.SPI_FLASH_BufferRead((uint8_t *)&command_buf, GCODE_COMMAND_ADDR, sizeof(command_buf)); W25QXX.SPI_FLASH_SectorErase(VAR_INF_ADDR); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&gCfgItems, VAR_INF_ADDR, sizeof(gCfgItems)); diff --git a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp index 68344e770c02..0a5f5cd550a7 100644 --- a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp @@ -503,7 +503,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { disp_assets_update_progress("Reading files..."); dir_t d; while (dir.readDir(&d, card.longFilename) > 0) { - // If we dont get a long name, but gets a short one, try it + // If we don't get a long name, but gets a short one, try it if (card.longFilename[0] == 0 && d.name[0] != 0) dosName2LongName((const char*)d.name, card.longFilename); if (card.longFilename[0] == 0) continue; diff --git a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp index 5e359c409182..1bb17bb4f224 100644 --- a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp @@ -54,7 +54,7 @@ void printer_state_polling() { gcode.process_subcommands_now_P(PSTR("M25")); - //save the positon + //save the position uiCfg.current_x_position_bak = current_position.x; uiCfg.current_y_position_bak = current_position.y; uiCfg.current_z_position_bak = current_position.z; diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp index 39d85626761f..37fd2a81dc46 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp @@ -198,7 +198,7 @@ void WifiSerial::flush() { // nop, the interrupt handler will free up space for us } // If we get here, nothing is queued anymore (DRIE is disabled) and - // the hardware finished tranmission (TXC is set). + // the hardware finished transmission (TXC is set). } bool WifiSerial::isHalfDuplex() const { return _serial.pin_rx == NC; } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index cf8d7343c6b3..f4938722e3e2 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -716,7 +716,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; * This is used to achieve more rapid stepping on kinematic machines. * * Currently used by the _lcd_move_xyz function in menu_motion.cpp - * and the ubl_map_move_to_xy funtion in menu_ubl.cpp. + * and the ubl_map_move_to_xy function in menu_ubl.cpp. */ void ManualMove::task() { diff --git a/Marlin/src/lcd/tft/canvas.cpp b/Marlin/src/lcd/tft/canvas.cpp index 3c2cda4fd52d..e8b89bad7060 100644 --- a/Marlin/src/lcd/tft/canvas.cpp +++ b/Marlin/src/lcd/tft/canvas.cpp @@ -50,7 +50,7 @@ bool CANVAS::ToScreen() { } void CANVAS::SetBackground(uint16_t color) { - /* TODO: test and optimize perfomance */ + /* TODO: test and optimize performance */ /* uint32_t count = (endLine - startLine) * width; uint16_t *pixel = buffer; diff --git a/Marlin/src/libs/MAX31865.cpp b/Marlin/src/libs/MAX31865.cpp index 590dea5ca5d9..909adb3807c8 100644 --- a/Marlin/src/libs/MAX31865.cpp +++ b/Marlin/src/libs/MAX31865.cpp @@ -257,7 +257,7 @@ void MAX31865::oneShot() { // From the datasheet: // Note that a single conversion requires approximately 52ms in 60Hz filter // mode or 62.5ms in 50Hz filter mode to complete. 1-Shot is a self-clearing bit. - // TODO: switch this out depeding on the filter mode. + // TODO: switch this out depending on the filter mode. DELAY_US(65000); // 65ms } @@ -301,7 +301,7 @@ uint16_t MAX31865::readRaw() { } /** - * Calulate and return the resistance value of the connected RTD. + * Calculate and return the resistance value of the connected RTD. * * @param refResistor The value of the matching reference resistor, usually 430 or 4300 * @return The raw RTD resistance value, NOT temperature! diff --git a/Marlin/src/libs/MAX31865.h b/Marlin/src/libs/MAX31865.h index 2ab78ecbe8cf..5d50e870ecd2 100644 --- a/Marlin/src/libs/MAX31865.h +++ b/Marlin/src/libs/MAX31865.h @@ -72,7 +72,7 @@ #define MAX31865_FAULT_OVUV 0x04 // D2 // http://www.analog.com/media/en/technical-documentation/application-notes/AN709_0.pdf -// constants for calulating temperature from the measured RTD resistance. +// constants for calculating temperature from the measured RTD resistance. #define RTD_Z1 -0.0039083 #define RTD_Z2 0.00001758480889 #define RTD_Z3 -0.0000000231 diff --git a/Marlin/src/libs/W25Qxx.cpp b/Marlin/src/libs/W25Qxx.cpp index fd7804cb2770..56581ed46eb7 100644 --- a/Marlin/src/libs/W25Qxx.cpp +++ b/Marlin/src/libs/W25Qxx.cpp @@ -157,8 +157,8 @@ void W25QXXFlash::SPI_FLASH_WriteEnable(void) { /******************************************************************************* * Function Name : SPI_FLASH_WaitForWriteEnd * Description : Polls the status of the Write In Progress (WIP) flag in the -* FLASH's status register and loop until write opertaion -* has completed. +* FLASH's status register and loop until write operation has +* completed. * Input : None * Output : None * Return : None diff --git a/Marlin/src/libs/buzzer.h b/Marlin/src/libs/buzzer.h index b86fe998fa05..21b69002ffd3 100644 --- a/Marlin/src/libs/buzzer.h +++ b/Marlin/src/libs/buzzer.h @@ -56,7 +56,7 @@ static CircularQueue buffer; /** - * @brief Inverts the sate of a digital PIN + * @brief Inverts the state of a digital PIN * @details This will invert the current state of an digital IO pin. */ FORCE_INLINE static void invert() { TOGGLE(BEEPER_PIN); } diff --git a/Marlin/src/libs/duration_t.h b/Marlin/src/libs/duration_t.h index 148aa23211b5..4d722a296c92 100644 --- a/Marlin/src/libs/duration_t.h +++ b/Marlin/src/libs/duration_t.h @@ -113,7 +113,7 @@ struct duration_t { /** * @brief Formats the duration as a string - * @details String will be formated using a "full" representation of duration + * @details String will be formatted using a "full" representation of duration * * @param buffer The array pointed to must be able to accommodate 22 bytes * (21 for the string, 1 more for the terminating nul) @@ -143,7 +143,7 @@ struct duration_t { /** * @brief Formats the duration as a string - * @details String will be formated using a "digital" representation of duration + * @details String will be formatted using a "digital" representation of duration * * @param buffer The array pointed to must be able to accommodate 10 bytes * diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 523e1337137a..0f4716ed870e 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -884,7 +884,7 @@ void Endstops::update() { const byte dual_hit = TEST_ENDSTOP(_ENDSTOP(A, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(A##2, MINMAX)) << 1); \ if (dual_hit) { \ _ENDSTOP_HIT(A, MINMAX); \ - /* if not performing home or if both endstops were trigged during homing... */ \ + /* if not performing home or if both endstops were triggered during homing... */ \ if (!stepper.separate_multi_axis || dual_hit == 0b11) \ planner.endstop_triggered(_AXIS(A)); \ } \ @@ -894,7 +894,7 @@ void Endstops::update() { const byte triple_hit = TEST_ENDSTOP(_ENDSTOP(A, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(A##2, MINMAX)) << 1) | (TEST_ENDSTOP(_ENDSTOP(A##3, MINMAX)) << 2); \ if (triple_hit) { \ _ENDSTOP_HIT(A, MINMAX); \ - /* if not performing home or if both endstops were trigged during homing... */ \ + /* if not performing home or if both endstops were triggered during homing... */ \ if (!stepper.separate_multi_axis || triple_hit == 0b111) \ planner.endstop_triggered(_AXIS(A)); \ } \ @@ -904,7 +904,7 @@ void Endstops::update() { const byte quad_hit = TEST_ENDSTOP(_ENDSTOP(A, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(A##2, MINMAX)) << 1) | (TEST_ENDSTOP(_ENDSTOP(A##3, MINMAX)) << 2) | (TEST_ENDSTOP(_ENDSTOP(A##4, MINMAX)) << 3); \ if (quad_hit) { \ _ENDSTOP_HIT(A, MINMAX); \ - /* if not performing home or if both endstops were trigged during homing... */ \ + /* if not performing home or if both endstops were triggered during homing... */ \ if (!stepper.separate_multi_axis || quad_hit == 0b1111) \ planner.endstop_triggered(_AXIS(A)); \ } \ diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 9b104615f6f9..5e3922c8979c 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -857,7 +857,7 @@ class Planner { static void quick_resume(); #endif - // Called when an endstop is triggered. Causes the machine to stop inmediately + // Called when an endstop is triggered. Causes the machine to stop immediately static void endstop_triggered(const AxisEnum axis); // Triggered position of an axis in mm (not core-savvy) diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index f9ed43acbfe2..fd630279748b 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -955,7 +955,7 @@ void reset_trinamic_drivers() { // TMC Slave Address Conflict Detection // // Conflict detection is performed in the following way. Similar methods are used for -// hardware and software serial, but the implementations are indepenent. +// hardware and software serial, but the implementations are independent. // // 1. Populate a data structure with UART parameters and addresses for all possible axis. // If an axis is not in use, populate it with recognizable placeholder data. diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 20b070e71283..1e91511f5a15 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1522,7 +1522,7 @@ void Temperature::manage_heater() { #endif #if ENABLED(PIDTEMPCHAMBER) - // PIDTEMPCHAMBER doens't support a CHAMBER_VENT yet. + // PIDTEMPCHAMBER doesn't support a CHAMBER_VENT yet. temp_chamber.soft_pwm_amount = WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP) ? (int)get_pid_output_chamber() >> 1 : 0; #else if (ELAPSED(ms, next_chamber_check_ms)) { diff --git a/Marlin/src/module/thermistor/thermistor_61.h b/Marlin/src/module/thermistor/thermistor_61.h index deeec356a1d6..2916bffd3bc8 100644 --- a/Marlin/src/module/thermistor/thermistor_61.h +++ b/Marlin/src/module/thermistor/thermistor_61.h @@ -31,7 +31,7 @@ // B Value 3950K at 25/50 deg. C // B Value Tolerance + / - 1% constexpr temp_entry_t temptable_61[] PROGMEM = { - { OV( 2.00), 420 }, // Guestimate to ensure we dont lose a reading and drop temps to -50 when over + { OV( 2.00), 420 }, // Guestimate to ensure we don't lose a reading and drop temps to -50 when over { OV( 12.07), 350 }, { OV( 12.79), 345 }, { OV( 13.59), 340 }, diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index 9066b24390c5..c6a44123a02b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -140,7 +140,7 @@ // Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately // the SKR does not have many free pins (especially if a display is in use). The SPI-based devices // will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver. - // The UART-based devices require 2 pis per deriver (one of which must be interrupt capable). + // The UART-based devices require 2 pis per driver (one of which must be interrupt capable). // The same SPI pins can be shared with the display/SD card reader, meaning SPI-based devices are // probably a good choice for this board. // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index b262212b7ea5..42c6f4d0299b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -265,7 +265,7 @@ #elif HAS_ADC_BUTTONS - #error "ADC BUTTONS do not work unmodifed on SKR 1.3, The ADC ports cannot take more than 3.3v." + #error "ADC BUTTONS do not work unmodified on SKR 1.3, The ADC ports cannot take more than 3.3v." #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 73b4d3e63ddf..43e954a4f1b0 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -494,7 +494,7 @@ #endif // HAS_WIRED_LCD #if HAS_ADC_BUTTONS - #error "ADC BUTTONS do not work unmodifed on SKR 1.4, The ADC ports cannot take more than 3.3v." + #error "ADC BUTTONS do not work unmodified on SKR 1.4, The ADC ports cannot take more than 3.3v." #endif // diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index cbf6ca2d3c3f..1ec1131b45ff 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -25,7 +25,7 @@ #define BOARD_INFO_NAME "GMARSH X6 REV1" -// Ignore temp readings during develpment. +// Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index de8db60847f5..b884fcbfc7c1 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -138,7 +138,7 @@ #define HEATER_BED_PIN 8 #define FAN_PIN 9 -#define FAN1_PIN 5 // Normall this would be a servo pin +#define FAN1_PIN 5 // Normally this would be a servo pin // XXX Runout support unknown? //#define NUM_RUNOUT_SENSORS 0 diff --git a/Marlin/src/pins/sam/pins_ADSK.h b/Marlin/src/pins/sam/pins_ADSK.h index 6fe0520f810b..425d6d45afb3 100644 --- a/Marlin/src/pins/sam/pins_ADSK.h +++ b/Marlin/src/pins/sam/pins_ADSK.h @@ -47,10 +47,10 @@ A stepper for E0 extruder Vcc (now "5V" on the board but actual 3.3V because of jumper)) (Hold)&(GND) - Bed thermistor (also require pullup resistor 4.7K between "Hold" and Vcc (now "5V" on the board but actual 3.3V because of jumper)) -(CoolEn) - 3.3v signal to controll extruder heater MOSFET +(CoolEn) - 3.3v signal to control extruder heater MOSFET (Resume) - 3.3v signal to control heatbed MOSFET -(SDA) - 3.3v signal to controll extruder fan -(SCL) - 3.3v signal to controll extruder cooling fan +(SDA) - 3.3v signal to control extruder fan +(SCL) - 3.3v signal to control extruder cooling fan */ /* CNC Shield pinout @@ -137,7 +137,7 @@ A stepper for E0 extruder * The 2004 LCD should be powered with 5V. * The next LCD pins RS,D4,D5,D6,D7 have internal pull-ups to 5V and as result the 5V will be on these pins. * Luckily these internal pull-ups have really high resistance and adding 33K pull-down resistors will create - * simple voltage divider that will bring the voltage down just slightly bellow 3.3V. + * simple voltage divider that will bring the voltage down just slightly below 3.3V. * * This LCD also has buttons that connected to the same ADC pin with different voltage divider combinations. * On the LCD panel there is internal pull-up resistor of the 4.7K connected to 5V. @@ -175,7 +175,7 @@ A stepper for E0 extruder #define ADC_BUTTONS_VALUE_SCALE (5.0/AREF_VOLTS) // The LCD module pullup voltage is 5.0V but ADC reference voltage is 3.3V - #define ADC_BUTTONS_R_PULLDOWN 4.7 // Moves voltage down to be bellow 3.3V instead of 5V + #define ADC_BUTTONS_R_PULLDOWN 4.7 // Moves voltage down to be below 3.3V instead of 5V // the resistors values will be scaled because of 4.7K pulldown parallel resistor #define _ADC_BUTTONS_R_SCALED(R) ((R) * (ADC_BUTTONS_R_PULLDOWN) / ((R) + ADC_BUTTONS_R_PULLDOWN)) diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index 939edc60522c..b7fd7222c8e4 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -235,7 +235,7 @@ // // Onboard SD card // -// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled +// detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled #if SD_CONNECTION_IS(ONBOARD) #define ENABLE_SPI3 #define SD_SS_PIN -1 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 6795b9289229..882b9601acfc 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -229,7 +229,7 @@ // // Onboard SD card // -// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled +// detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled #if SD_CONNECTION_IS(ONBOARD) #define ENABLE_SPI3 #define SD_SS_PIN -1 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 0b9512a1cbe5..aa65eaa799ff 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -212,7 +212,7 @@ // Onboard SD card // NOT compatible with LCD // -// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled +// detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled #if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD #if USE_NEW_SPI_API #define SD_SPI MARLIN_SPI(HardwareSPI3, PC9) diff --git a/Marlin/src/sd/disk_io_driver.h b/Marlin/src/sd/disk_io_driver.h index 73c12efcfab0..02e2b3c73991 100644 --- a/Marlin/src/sd/disk_io_driver.h +++ b/Marlin/src/sd/disk_io_driver.h @@ -24,7 +24,7 @@ #include /** - * DiskIO Interace + * DiskIO Interface * * Interface for low level disk io */ diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h index 5c76ffb758dd..2b6e1be52274 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h @@ -114,7 +114,7 @@ typedef MAX3421e MAX3421E; // Official Arduinos (UNO, Duemilanove, Mega #define USB_NUMDEVICES 16 //number of USB devices //#define HUB_MAX_HUBS 7 // maximum number of hubs that can be attached to the host controller -#define HUB_PORT_RESET_DELAY 20 // hub port reset delay 10 ms recomended, can be up to 20 ms +#define HUB_PORT_RESET_DELAY 20 // hub port reset delay 10 ms recommended, can be up to 20 ms /* USB state machine states */ #define USB_STATE_MASK 0xF0 diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h index 9ed35fff65c8..19d3756535f9 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h @@ -57,7 +57,7 @@ class ConfigDescParser : public USBReadParser { uint8_t dscrLen; // Descriptor length uint8_t dscrType; // Descriptor type - bool isGoodInterface; // Apropriate interface flag + bool isGoodInterface; // Appropriate interface flag uint8_t confValue; // Configuration value uint8_t protoValue; // Protocol value uint8_t ifaceNumber; // Interface number diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h index 1591f3b74b8a..58d7ba200cb5 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h @@ -248,7 +248,7 @@ e-mail : support@circuitsathome.com #define UHS_HOST_TRANSFER_MAX_MS 10000 // USB transfer timeout in ms, per section 9.2.6.1 of USB 2.0 spec #define UHS_HOST_TRANSFER_RETRY_MAXIMUM 3 // 3 retry limit for a transfer #define UHS_HOST_DEBOUNCE_DELAY_MS 500 // settle delay in milliseconds -#define UHS_HUB_RESET_DELAY_MS 20 // hub port reset delay, 10ms recomended, but can be up to 20ms +#define UHS_HUB_RESET_DELAY_MS 20 // hub port reset delay, 10ms recommended, but can be up to 20ms // // We only provide the minimum needed information for enumeration. diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h index fb2e8b38718c..bb2a87cf0382 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h @@ -150,7 +150,7 @@ e-mail : support@circuitsathome.com // HANDY MACROS //////////////////////////////////////////////////////////////////////////////// -// Atmoically set/clear single bits using bitbands. +// Atomically set/clear single bits using bitbands. // Believe it or not, this boils down to a constant, // and is less code than using |= &= operators. // Bonus, it makes code easier to read too. diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld index 0c060d175180..6af296a521ff 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld index 0c060d175180..6af296a521ff 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld index 0c060d175180..6af296a521ff 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h index 2da195c6cff0..732e0c51f182 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h @@ -280,7 +280,7 @@ extern "C" { #define PIN_SERIAL_TX PA9 // Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number -// Used when user instanciate a hardware Serial using its peripheral name. +// Used when user instantiate a hardware Serial using its peripheral name. // Example: HardwareSerial mySerial(USART3); // will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined. #define PIN_SERIAL1_RX PA10 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld index 5ced01158fbc..ca21498cd2d9 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld @@ -150,7 +150,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld index 0c060d175180..6af296a521ff 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h index 1ba0a18d6af6..f9091a4f9182 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h @@ -280,7 +280,7 @@ extern "C" { #define PIN_SERIAL_TX PA9 // Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number -// Used when user instanciate a hardware Serial using its peripheral name. +// Used when user instantiate a hardware Serial using its peripheral name. // Example: HardwareSerial mySerial(USART3); // will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined. #define PIN_SERIAL1_RX PA10 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld index 5e01911d82c1..006c87a17a18 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld @@ -173,7 +173,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld index f8eb971a6ced..cd7503b3a51d 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld @@ -162,7 +162,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld index c9197c8b451a..a65b07d61c5f 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld @@ -162,7 +162,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld index 09088b622c87..cc4b323f763a 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld @@ -162,7 +162,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld index efe2db5cd472..68b65973226f 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld index 503472806e2f..a375232d5981 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld @@ -149,7 +149,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld index aa685e81118e..8b38135a2a51 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld @@ -167,7 +167,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld index 40abfe19b574..d644d49beb1d 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld index 2dbc5177aca0..9565cd89c69b 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld @@ -150,7 +150,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h index d0fb0d9db05c..bcd5aa378edf 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h @@ -112,7 +112,7 @@ extern "C" { #define PIN_SERIAL_RX PA10 #define PIN_SERIAL_TX PA9 -// Used when user instanciate a hardware Serial using its peripheral name. +// Used when user instantiate a hardware Serial using its peripheral name. // Example: HardwareSerial mySerial(USART3); // will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined. #define PIN_SERIAL1_RX PA10 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld index fee7418b0410..900ef0639101 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld @@ -150,7 +150,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld index f36ebcdea133..ef151075b779 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld @@ -149,7 +149,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld index f20a047c6574..c5788dbebe6c 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld @@ -148,7 +148,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp index 2210e9844c53..f22cf354e208 100644 --- a/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp +++ b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp @@ -156,7 +156,7 @@ static void setup_nvic(void) { nvic_init((uint32)VECT_TAB_ADDR, 0); -/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect paramater +/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect parameter #ifdef VECT_TAB_FLASH nvic_init(USER_ADDR_ROM, 0); #elif defined VECT_TAB_RAM diff --git a/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp index 12321229defb..77dcbcf848d3 100644 --- a/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp +++ b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp @@ -156,7 +156,7 @@ static void setup_nvic(void) { nvic_init((uint32)VECT_TAB_ADDR, 0); -/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect paramater +/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect parameter #ifdef VECT_TAB_FLASH nvic_init(USER_ADDR_ROM, 0); #elif defined VECT_TAB_RAM diff --git a/buildroot/share/scripts/createTemperatureLookupMarlin.py b/buildroot/share/scripts/createTemperatureLookupMarlin.py index b3343de1a0f3..02981f1015aa 100755 --- a/buildroot/share/scripts/createTemperatureLookupMarlin.py +++ b/buildroot/share/scripts/createTemperatureLookupMarlin.py @@ -73,7 +73,7 @@ def resist(self, adc): return r def temp(self, adc): - "Convert ADC reading into a temperature in Celcius" + "Convert ADC reading into a temperature in Celsius" l = log(self.resist(adc)) Tinv = self.c1 + self.c2*l + self.c3* l**3 # inverse temperature return (1/Tinv) - ZERO # temperature diff --git a/buildroot/share/scripts/g29_auto.py b/buildroot/share/scripts/g29_auto.py index ffcb0d9f316c..ca36346dd9dd 100755 --- a/buildroot/share/scripts/g29_auto.py +++ b/buildroot/share/scripts/g29_auto.py @@ -119,7 +119,7 @@ def z_parse(gcode, start_at_line=0, end_at_line=0): # last_z = z last_i = i if 0 < end_at_line <= i or temp_line >= min_g1: - # print('break at line {} at heigth {}'.format(i, z)) + # print('break at line {} at height {}'.format(i, z)) break line_between_z = line_between_z[1:] diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index edae6d24aeb8..0af551329490 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -127,7 +127,7 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" "$3" # # REPRAPWORLD_KEYPAD # -# Cant find configuration details to get it to compile +# Can't find configuration details to get it to compile #restore_configs #opt_enable ULTRA_LCD REPRAPWORLD_KEYPAD REPRAPWORLD_KEYPAD_MOVE_STEP #exec_test $1 $2 "Stuff" "$3" From 092b5942c1cc569a85e0d0e4a1f50b20a5485d63 Mon Sep 17 00:00:00 2001 From: Marcio T Date: Tue, 3 Aug 2021 18:06:16 -0600 Subject: [PATCH 174/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20FTDI=20Eve=20Touch?= =?UTF-8?q?=20UI=20(#22500)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/extended/command_processor.h | 4 +- .../ftdi_eve_lib/extended/text_box.cpp | 12 ++--- .../ftdi_eve_lib/extended/text_ellipsis.cpp | 40 +++++++------- .../generic/dialog_box_base_class.cpp | 8 +-- .../generic/dialog_box_base_class.h | 1 - .../generic/interface_settings_screen.cpp | 2 +- .../generic/interface_sounds_screen.cpp | 54 ++++--------------- .../generic/interface_sounds_screen.h | 2 - .../generic/spinner_dialog_box.cpp | 48 ++++++++++++++--- .../generic/spinner_dialog_box.h | 4 +- 10 files changed, 83 insertions(+), 92 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h index 309c1927c8cb..7504a1387dda 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h @@ -232,13 +232,11 @@ class CommandProcessor : public CLCD::CommandFifo { FORCEDINLINE CommandProcessor& toggle(int16_t x, int16_t y, int16_t w, int16_t h, T text, bool state, uint16_t options = FTDI::OPT_3D) { CLCD::FontMetrics fm(_font); const int16_t widget_h = fm.height * 20.0 / 16; - //const int16_t outer_bar_r = widget_h / 2; - //const int16_t knob_r = outer_bar_r - 1.5; // The y coordinate of the toggle is the baseline of the text, // so we must introduce a fudge factor based on the line height to // actually center the control. const int16_t fudge_y = fm.height * 5 / 16; - CLCD::CommandFifo::toggle(x + h / 2, y + (h - widget_h) / 2 + fudge_y, w - h, _font, options, state); + CLCD::CommandFifo::toggle(x + widget_h, y + (h - widget_h) / 2 + fudge_y, w - widget_h, _font, options, state); CLCD::CommandFifo::str(text); return *this; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp index 0701e7d68251..544c5fed050e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp @@ -67,12 +67,12 @@ namespace FTDI { width = height = 0; for (;;) { const uint16_t line_width = find_line_break(utf8_fm, clcd_fm, wrap_width, line_start, line_end, use_utf8); - if (line_end == line_start) break; width = max(width, line_width); height += utf8_fm.get_height(); + if (*line_end == '\n' || *line_end == ' ') line_end++; + if (*line_end == '\0') break; + if (line_end == line_start) break; line_start = line_end; - if (*line_start == '\n' || *line_start == ' ') line_start++; - if (*line_start == '\0') break; } } @@ -109,7 +109,6 @@ namespace FTDI { const char *line_start = str, *line_end; for (;;) { find_line_break(utf8_fm, clcd_fm, w, line_start, line_end, use_utf8); - if (line_end == line_start) break; const size_t line_len = line_end - line_start; if (line_len) { @@ -125,9 +124,10 @@ namespace FTDI { } y += utf8_fm.get_height(); + if (*line_end == '\n' || *line_end == ' ') line_end++; + if (*line_end == '\0') break; + if (line_end == line_start) break; line_start = line_end; - if (*line_start == '\n' || *line_start == ' ') line_start++; - if (*line_start == '\0') break; } } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp index 6a58dd2e497a..4262dd115576 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp @@ -29,30 +29,30 @@ namespace FTDI { * Helper function for drawing text with ellipses. The str buffer may be modified and should have space for up to two extra characters. */ static void _draw_text_with_ellipsis(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, char *str, uint16_t options, uint8_t font) { - FontMetrics fm(font); - const int16_t ellipsisWidth = fm.get_char_width('.') * 3; + #if ENABLED(TOUCH_UI_USE_UTF8) + const bool use_utf8 = has_utf8_chars(str); + #define CHAR_WIDTH(c) use_utf8 ? utf8_fm.get_char_width(c) : clcd_fm.char_widths[(uint8_t)c] + #else + #define CHAR_WIDTH(c) utf8_fm.get_char_width(c) + constexpr bool use_utf8 = false; + #endif + FontMetrics utf8_fm(font); + CLCD::FontMetrics clcd_fm; + clcd_fm.load(font); + const int16_t ellipsisWidth = utf8_fm.get_char_width('.') * 3; // Compute the total line length, as well as // the location in the string where it can // split and still allow the ellipsis to fit. int16_t lineWidth = 0; - char *breakPoint = str; - #ifdef TOUCH_UI_USE_UTF8 - char *tstr = str; - while (*tstr) { - breakPoint = tstr; - const utf8_char_t c = get_utf8_char_and_inc(tstr); - lineWidth += fm.get_char_width(c); - if (lineWidth + ellipsisWidth < w) - break; - } - #else - for (char *c = str; *c; c++) { - lineWidth += fm.get_char_width(*c); - if (lineWidth + ellipsisWidth < w) - breakPoint = c; - } - #endif + char *breakPoint = str; + char *next = str; + while (*next) { + const utf8_char_t c = get_utf8_char_and_inc(next); + lineWidth += CHAR_WIDTH(c); + if (lineWidth + ellipsisWidth < w) + breakPoint = next; + } if (lineWidth > w) { *breakPoint = '\0'; @@ -61,7 +61,7 @@ namespace FTDI { cmd.apply_text_alignment(x, y, w, h, options); #if ENABLED(TOUCH_UI_USE_UTF8) - if (has_utf8_chars(str)) { + if (use_utf8) { draw_utf8_text(cmd, x, y, str, font_size_t::from_romfont(font), options); } else #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp index 500551e862ba..1811779297e3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp @@ -39,7 +39,7 @@ void DialogBoxBaseClass::drawMessage(T message, int16_t font) { .cmd(CLEAR(true,true,true)) .cmd(COLOR_RGB(bg_text_enabled)) .tag(0); - draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,3), message, OPT_CENTER, font ? font : font_large); + draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,6), message, OPT_CENTER, font ? font : font_large); cmd.colors(normal_btn); } @@ -69,12 +69,6 @@ void DialogBoxBaseClass::drawButton(T label) { template void DialogBoxBaseClass::drawButton(const char *); template void DialogBoxBaseClass::drawButton(progmem_str); -void DialogBoxBaseClass::drawSpinner() { - CommandProcessor cmd; - cmd.cmd(COLOR_RGB(bg_text_enabled)) - .spinner(BTN_POS(1,4), BTN_SIZE(2,3)).execute(); -} - bool DialogBoxBaseClass::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); return true; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h index d48f3a03b3e3..c87640992866 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h @@ -31,7 +31,6 @@ class DialogBoxBaseClass : public BaseScreen { template static void drawButton(T); static void drawYesNoButtons(uint8_t default_btn = 0); static void drawOkayButton(); - static void drawSpinner(); static void onRedraw(draw_mode_t) {}; public: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp index ebefea2dcd52..5b160c80dfa6 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp @@ -104,8 +104,8 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { #endif #undef EDGE_R #define EDGE_R 0 - #if ENABLED(TOUCH_UI_PORTRAIT) .colors(normal_btn) + #if ENABLED(TOUCH_UI_PORTRAIT) .tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_SOUNDS)) .colors(action_btn) .tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp index b951844196f5..889fd606840c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp @@ -74,8 +74,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) { #undef EDGE_R #define EDGE_R 30 .font(font_small) - .tag(0).text (BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY) - .text (BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_CLICK_SOUNDS), OPT_RIGHTX | OPT_CENTERY) + .tag(0).text (BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_CLICK_SOUNDS), OPT_RIGHTX | OPT_CENTERY) .text (BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_STARTING), OPT_RIGHTX | OPT_CENTERY) .text (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_FINISHED), OPT_RIGHTX | OPT_CENTERY) .text (BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_ERROR), OPT_RIGHTX | OPT_CENTERY); @@ -89,18 +88,16 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) { constexpr uint8_t w = 1; #endif - cmd.font(font_medium) - .colors(ui_slider) + cmd.font(font_small) #define EDGE_R 30 - .tag(2).slider (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF) .colors(ui_toggle) - .tag(3).toggle2 (BTN_POS(3,3), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::touch_sounds_enabled()) + .tag(2).toggle2 (BTN_POS(3,3), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::touch_sounds_enabled()) #undef EDGE_R .colors(normal_btn) #define EDGE_R 0 - .tag(4).button (BTN_POS(3,5), BTN_SIZE(2,1), getSoundSelection(PRINTING_STARTED)) - .tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED)) - .tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED)) + .tag(3).button (BTN_POS(3,5), BTN_SIZE(2,1), getSoundSelection(PRINTING_STARTED)) + .tag(4).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED)) + .tag(5).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED)) .colors(action_btn) .tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); } @@ -114,10 +111,10 @@ void InterfaceSoundsScreen::onEntry() { bool InterfaceSoundsScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); return true; - case 3: UIData::enable_touch_sounds(!UIData::touch_sounds_enabled()); break; - case 4: toggleSoundSelection(PRINTING_STARTED); break; - case 5: toggleSoundSelection(PRINTING_FINISHED); break; - case 6: toggleSoundSelection(PRINTING_FAILED); break; + case 2: UIData::enable_touch_sounds(!UIData::touch_sounds_enabled()); break; + case 3: toggleSoundSelection(PRINTING_STARTED); break; + case 4: toggleSoundSelection(PRINTING_FINISHED); break; + case 5: toggleSoundSelection(PRINTING_FAILED); break; default: return false; } @@ -125,35 +122,4 @@ bool InterfaceSoundsScreen::onTouchEnd(uint8_t tag) { return true; } -bool InterfaceSoundsScreen::onTouchStart(uint8_t tag) { - CommandProcessor cmd; - #undef EDGE_R - #define EDGE_R 30 - switch (tag) { - case 2: cmd.track_linear(BTN_POS(3,2), BTN_SIZE(2,1), 2).execute(); break; - default: break; - } - return true; -} - -void InterfaceSoundsScreen::onIdle() { - if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) { - refresh_timer.start(); - - uint16_t value; - CommandProcessor cmd; - switch (cmd.track_tag(value)) { - case 2: - screen_data.InterfaceSettingsScreen.volume = value >> 8; - SoundPlayer::set_volume(screen_data.InterfaceSettingsScreen.volume); - SaveSettingsDialogBox::settingsChanged(); - break; - default: - return; - } - onRefresh(); - } - BaseScreen::onIdle(); -} - #endif // FTDI_INTERFACE_SOUNDS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h index 046d7390fe32..258fc77c26c0 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h @@ -51,7 +51,5 @@ class InterfaceSoundsScreen : public BaseScreen, public CachedScreen { +class SpinnerDialogBox : public BaseScreen { public: static void onEntry(); + static void onExit(); static void onRedraw(draw_mode_t); + static void onRefresh(); static void onIdle(); static void show(progmem_str); From 8d454fd6f1241e23f70f7b5fc3fa668d20ee8a20 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 4 Aug 2021 01:04:15 +0000 Subject: [PATCH 175/323] [cron] Bump distribution date (2021-08-04) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 22151ed234bb..32fee40e2533 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-03" +//#define STRING_DISTRIBUTION_DATE "2021-08-04" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index a090c0c5edc0..22a5f8e6e904 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-03" + #define STRING_DISTRIBUTION_DATE "2021-08-04" #endif /** From 53a5cd0c380851ceab9545c652d67d3d688cf693 Mon Sep 17 00:00:00 2001 From: Bob Anthony <42719046+bob-anthony@users.noreply.github.com> Date: Tue, 3 Aug 2021 23:45:08 -0500 Subject: [PATCH 176/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20extra=20E=20move?= =?UTF-8?q?=20in=20toolchange=20with=20...=5FNO=5FRETURN=20(#22504)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/tool_change.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 5b478caa1a99..6d69b8722dde 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -954,11 +954,11 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. #if ENABLED(TOOLCHANGE_PARK) if (ok) { #if ENABLED(TOOLCHANGE_NO_RETURN) - destination.set(current_position.x, current_position.y); - prepare_internal_move_to_destination(planner.settings.max_feedrate_mm_s[Z_AXIS]); - #else - prepare_internal_move_to_destination(MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)); + const float temp = destination.z; + destination = current_position; + destination.z = temp.z; #endif + prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE))); } #endif From 0e065579aa81e1b285b12c5d8a8f579698ce47e7 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Wed, 4 Aug 2021 08:14:54 +0200 Subject: [PATCH 177/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Longer3D=20STM32?= =?UTF-8?q?=20boot,=20add=20Maple=20test=20(#22473)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-builds.yml | 3 +- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 9 +- .../MARLIN_F103VE_LONGER/PeripheralPins.c | 289 +++++++++++++++ .../MARLIN_F103VE_LONGER/PinNamesVar.h | 32 ++ .../MARLIN_F103VE_LONGER/hal_conf_custom.h | 348 ++++++++++++++++++ .../variants/MARLIN_F103VE_LONGER/ldscript.ld | 189 ++++++++++ .../variants/MARLIN_F103VE_LONGER/variant.cpp | 249 +++++++++++++ .../variants/MARLIN_F103VE_LONGER/variant.h | 175 +++++++++ ini/stm32f1.ini | 14 +- 9 files changed, 1299 insertions(+), 9 deletions(-) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 5429f3eb95ce..e45bf42f29a7 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -61,7 +61,7 @@ jobs: - STM32F103RC_fysetc - STM32F103RC_meeb - jgaurora_a5s_a1 - - STM32F103VE_longer + - STM32F103VE_longer_maple #- mks_robin_maple - mks_robin_lite - mks_robin_pro @@ -75,6 +75,7 @@ jobs: - STM32F103RE_btt - STM32F103RE_btt_USB - STM32F103RET6_creality + - STM32F103VE_longer - STM32F407VE_black - STM32F401VE_STEVAL - BIGTREE_BTT002 diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index f9ec42b68efe..bdf215fa8e4a 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -99,12 +99,19 @@ // Avoid nozzle heat and fan start before serial init #define BOARD_OPENDRAIN_MOSFETS -#define BOARD_PREINIT() { \ +#define BOARD_INIT_OD_PINS() { \ OUT_WRITE_OD(HEATER_0_PIN, 0); \ OUT_WRITE_OD(HEATER_BED_PIN, 0); \ OUT_WRITE_OD(FAN_PIN, 0); \ } +#ifdef MAPLE_STM32F1 + // Only Maple Framework allow that early + #define BOARD_PREINIT BOARD_INIT_OD_PINS +#else + #define BOARD_INIT BOARD_INIT_OD_PINS +#endif + // // PWM for a servo probe // Other servo devices are not supported on this board! diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c new file mode 100644 index 000000000000..ba4046d5f988 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c @@ -0,0 +1,289 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + * Automatically generated from STM32F103V(F-G)Tx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 +//{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 +//{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 +//{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 +//{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#if defined(STM32F103xE) || defined(STM32F103xG) +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { +//{PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 +//{PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 + {NC, NP, 0} +}; +#endif +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { +#if 0 + {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 1, 0)}, // TIM2_CH1 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM5_CH1 +#endif + {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM2_CH2 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 2, 0)}, // TIM2_CH2 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM5_CH2 +#endif + {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM2_CH3 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 +#endif +#ifdef STM32F103xG + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM9_CH1 +#endif + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 + {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM5_CH4 +#else + {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 +#endif +#if defined(STM32F103xG) + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM9_CH2 +#endif + {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM3_CH1 +#if defined(STM32F103xG) + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM13_CH1 +#endif + {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM8_CH1N +#if defined(STM32F103xG) + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM14_CH1 +#endif + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM1_CH1 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 + {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM1_CH2 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 0)}, // TIM1_CH2 + {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM1_CH3 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 0)}, // TIM1_CH3 + {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM1_CH4 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 4, 0)}, // TIM1_CH4 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 1)}, // TIM1_CH2N + {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 3, 0)}, // TIM3_CH3 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM8_CH2N +#endif + {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 4, 0)}, // TIM3_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM8_CH3N +#endif + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 2, 0)}, // TIM2_CH2 + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 2, 0)}, // TIM2_CH2 + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 1, 0)}, // TIM3_CH1 + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 2, 0)}, // TIM3_CH2 + {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM4_CH1 + {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM4_CH2 + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM4_CH3 +#if defined(STM32F103xG) + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM10_CH1 +#endif + {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM4_CH4 +#if defined(STM32F103xG) + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM11_CH1 +#endif + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 3, 0)}, // TIM2_CH3 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 3, 0)}, // TIM2_CH3 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 4, 0)}, // TIM2_CH4 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 4, 0)}, // TIM2_CH4 + {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM1_CH1N + {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM1_CH2N +#if defined(STM32F103xG) + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM12_CH1 +#endif + {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM1_CH3N +#if defined(STM32F103xG) + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM12_CH2 +#endif + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 1, 0)}, // TIM3_CH1 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM8_CH1 +#endif + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 2, 0)}, // TIM3_CH2 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM8_CH2 +#endif + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 3, 0)}, // TIM3_CH3 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM8_CH3 + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 4, 0)}, // TIM3_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM8_CH4 +#endif + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 4, 0)}, // TIM4_CH4 +#if defined(STM32F103xG) + {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM9_ENABLE, 1, 0)}, // TIM9_CH1 + {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM9_ENABLE, 2, 0)}, // TIM9_CH2 +#endif + {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 1, 1)}, // TIM1_CH1N + {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 1, 0)}, // TIM1_CH1 + {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 2, 1)}, // TIM1_CH2N + {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 2, 0)}, // TIM1_CH2 + {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 3, 1)}, // TIM1_CH3N + {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 4, 0)}, // TIM1_CH4 +#endif // if 0 + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + {PA_3, USART2, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, +//{PB_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { +//{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +//*** No CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_RD[] = { + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_CAN_TD[] = { + {NC, NP, 0} +}; +#endif + +//*** No ETHERNET *** + +//*** No QUADSPI *** + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB[] = { + {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_NONE)}, // USB_DM + {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_NONE)}, // USB_DP + {NC, NP, 0} +}; +#endif + +//*** No USB_OTG_FS *** + +//*** No USB_OTG_HS *** + +//*** SD *** + +#if defined(STM32F103xE) || defined(STM32F103xG) +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { +//{PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D4 +//{PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D5 +//{PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D6 +//{PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h new file mode 100644 index 000000000000..9c07918364a5 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h @@ -0,0 +1,32 @@ +/* SYS_WKUP */ +#if defined(PWR_WAKEUP_PIN1) && defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY) + #error PA0 is used by thermal sensor, disable low power wake with -DHAL_PWR_MODULE_ONLY + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + #warning USB feature is not required with a CH340 chip + USB_DM = PA_11, + USB_DP = PA_12, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h new file mode 100644 index 000000000000..e2247addb964 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h @@ -0,0 +1,348 @@ +/** + ****************************************************************************** + * @file hal_conf_custom.h for Longer3D STM32F103VE board + * @brief Overrides HAL default configuration file. + ****************************************************************************** + */ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" + +#ifdef HAL_PWR_MODULE_ENABLED + #undef HAL_PWR_MODULE_ENABLED // only way to disable it +#endif + +#if defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY) + #define HAL_PWR_MODULE_ONLY // disable low power & PA0 wakeup pin (its T°c pin) +#endif + +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG +#endif + +#ifdef HAL_PCD_MODULE_ENABLED + #warning No direct STM32 USB pins on Longer3D board + #undef HAL_PCD_MODULE_ENABLED // USB Device +#endif + +#ifdef HAL_HCD_MODULE_ENABLED + #warning No direct STM32 USB pins on Longer3D board + #undef HAL_HCD_MODULE_ENABLED // USB Host +#endif + +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED // Useless.... UART_MODULE do it +#endif + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #undef HAL_CAN_LEGACY_MODULE_ENABLED +#endif + +#ifdef HAL_CAN_MODULE_ENABLED + #undef HAL_CAN_MODULE_ENABLED +#endif + +#ifdef HAL_DAC_MODULE_ENABLED + #undef HAL_DAC_MODULE_ENABLED +#endif + +#ifdef HAL_RTC_MODULE_ENABLED + #undef HAL_RTC_MODULE_ENABLED +#endif + +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // for ENDSTOP_INTERRUPTS_FEATURE +#endif + +/** + * @brief List of modules in the framework (first ones enabled by default) + */ +//#define HAL_MODULE_ENABLED +//#define HAL_ADC_MODULE_ENABLED +//#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_DMA_MODULE_ENABLED +//#define HAL_FLASH_MODULE_ENABLED +//#define HAL_GPIO_MODULE_ENABLED +//#define HAL_I2C_MODULE_ENABLED +//#define HAL_PCD_MODULE_ENABLED +//#define HAL_PWR_MODULE_ENABLED +//#define HAL_RCC_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED +//#define HAL_SD_MODULE_ENABLED +//#define HAL_SPI_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_TIM_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED + +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRC_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_EXTI_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_USART_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED + +/* ########################## Oscillator Values adaptation ####################*/ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#ifndef HSE_VALUE + #define HSE_VALUE 8000000U // Value of the External oscillator in Hz (8 MHz) +#endif + +#ifndef HSE_STARTUP_TIMEOUT + #define HSE_STARTUP_TIMEOUT 100U // Time out for HSE start up, in ms +#endif + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#ifndef HSI_VALUE + #define HSI_VALUE 8000000U // Value of the Internal oscillator in Hz +#endif + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#ifndef LSI_VALUE + #define LSI_VALUE 40000U // LSI Typical Value in Hz +#endif /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + * This value is used by the UART, RTC HAL module to compute the system frequency + */ +#ifndef LSE_VALUE + #define LSE_VALUE 32768U // Value of the External Low Speed oscillator in Hz +#endif + +#ifndef LSE_STARTUP_TIMEOUT + #define LSE_STARTUP_TIMEOUT 50U // No 32.7KHz LSE on this board, reduced to avoid delays +#endif + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#ifndef VDD_VALUE + #define VDD_VALUE 3300U // Value of VDD in mv +#endif +#ifndef TICK_INT_PRIORITY + #define TICK_INT_PRIORITY 0x00U // tick interrupt priority +#endif +#ifndef USE_RTOS + #define USE_RTOS 0U +#endif +#ifndef PREFETCH_ENABLE + #define PREFETCH_ENABLE 1U +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined(USE_SPI_CRC) +#define USE_SPI_CRC 0 +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32f1xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32f1xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32f1xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32f1xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED + #include "stm32f1xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED + #include "stm32f1xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #include "Legacy/stm32f1xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED + #include "stm32f1xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32f1xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32f1xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32f1xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32f1xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32f1xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED + #include "stm32f1xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED + #include "stm32f1xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32f1xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32f1xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32f1xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32f1xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32f1xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED + #include "stm32f1xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED + #include "stm32f1xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED + #include "stm32f1xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32f1xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32f1xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32f1xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32f1xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32f1xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32f1xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32f1xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32f1xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED + #include "stm32f1xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32f1xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + + +#define assert_param(expr) ((void)0U) + +#ifdef __cplusplus +} +#endif + diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld new file mode 100644 index 000000000000..6bc577236a9c --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld @@ -0,0 +1,189 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld +** +** Author : Auto-generated by STM32CubeIDE +** +** Abstract : Linker script for STM32F103V(8/B/C/E/F/GTx Device from STM32F1 series +** 64/128/256/512/768/1024Kbytes FLASH +** 20/20/48/64/64/96/96Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2019 STMicroelectronics

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of STMicroelectronics nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Memories definition */ +MEMORY +{ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data into "FLASH" Rom type memory */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data into "FLASH" Rom type memory */ + .rodata : { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + } >FLASH + + .ARM : { + . = ALIGN(4); + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + . = ALIGN(4); + } >FLASH + + .preinit_array : { + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + . = ALIGN(4); + } >FLASH + + .init_array : { + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + . = ALIGN(4); + } >FLASH + + .fini_array : { + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(4); + } >FLASH + + /* Used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections into "RAM" Ram type memory */ + .data : { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + /* Uninitialized data section into "RAM" Ram type memory */ + . = ALIGN(4); + .bss : { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ + ._user_heap_stack : { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the compiler libraries */ + /DISCARD/ : { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp new file mode 100644 index 000000000000..007ef81065bf --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp @@ -0,0 +1,249 @@ +/* + ******************************************************************************* + * Copyright (c) 2019, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, //D0 + PA_1, //D1 + PA_2, //D2 + PA_3, //D3 + PA_4, //D4 + PA_5, //D5 + PA_6, //D6 + PA_7, //D7 + PA_8, //D8 + PA_9, //D9 + PA_10, //D10 + PA_11, //D11 + PA_12, //D12 + PA_13, //D13 + PA_14, //D14 + PA_15, //D15 + + PB_0, //D16 + PB_1, //D17 + PB_2, //D18 + PB_3, //D19 + PB_4, //D20 + PB_5, //D21 + PB_6, //D22 + PB_7, //D23 + PB_8, //D24 + PB_9, //D25 + PB_10, //D26 + PB_11, //D27 + PB_12, //D28 + PB_13, //D29 + PB_14, //D30 + PB_15, //D31 + + PC_0, //D32 + PC_1, //D33 + PC_2, //D34 + PC_3, //D35 + PC_4, //D36 + PC_5, //D37 + PC_6, //D38 + PC_7, //D39 + PC_8, //D40 + PC_9, //D41 + PC_10, //D42 + PC_11, //D43 + PC_12, //D44 + PC_13, //D45 + PC_14, //D46 + PC_15, //D47 + + PD_0, //D48 + PD_1, //D49 + PD_2, //D50 + PD_3, //D51 + PD_4, //D52 + PD_5, //D53 + PD_6, //D54 + PD_7, //D55 + PD_8, //D56 + PD_9, //D57 + PD_10, //D58 + PD_11, //D59 + PD_12, //D60 + PD_13, //D61 + PD_14, //D62 + PD_15, //D63 + + PE_0, //D64 + PE_1, //D65 + PE_2, //D66 + PE_3, //D67 + PE_4, //D68 + PE_5, //D69 + PE_6, //D70 + PE_7, //D71 + PE_8, //D72 + PE_9, //D73 + PE_10, //D74 + PE_11, //D75 + PE_12, //D76 + PE_13, //D77 + PE_14, //D78 + PE_15, //D79 +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17, // A9, PB1 + 32, // A10, PC0 + 33, // A11, PC1 + 34, // A12, PC2 + 35, // A13, PC3 + 36, // A14, PC4 + 37, // A15, PC5 +}; + +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ +static bool SetSysClock_PLL_HSE(bool bypass) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {}; + bool ret = false; + + // Initializes the CPU, AHB and APB busses clocks + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + if (bypass == false) { + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + } else { + RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; + } + RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; // 8Mhz x 9 = 72MHz + + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK) { + // Initializes the CPU, AHB and APB busses clocks + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) == HAL_OK) { + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_USB; + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL_DIV1_5; // 72/1.5 = 48MHz + #ifndef USBCON + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC; + #endif + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) == HAL_OK) { + ret = true; + } + } + } + return ret; +} + +/******************************************************************************/ +/* PLL (clocked by HSI) used as System clock source (64MHz max) */ +/******************************************************************************/ +bool SetSysClock_PLL_HSI(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {}; + bool ret = false; + + // Initializes the CPU, AHB and APB busses clocks + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.HSEState = RCC_HSE_OFF; + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI_DIV2; // 4 MHz + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12; // 48 MHz + #ifndef USBCON + // When the HSI is used as a PLL clock input, the maximum + // system clock frequency that can be achieved is 64 MHz. + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16; // 64 MHz, stay close to 72 for delay() + #endif + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK) { + // Initializes the CPU, AHB and APB busses clocks + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + // FLASH_LATENCY_1 may cause boot loops + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) == HAL_OK) { + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_USB; + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV4; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL; // requires 48 MHz + #ifndef USBCON + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;// No USB, RTC nor I2S + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; // 2 4 6 8 + #endif + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) == HAL_OK) { + ret = true; + } + } + } + return ret; +} + +void SystemClock_Config(void) +{ + /* + * If HSE_VALUE is not 8MHz and you want use it, then: + * - Redefine HSE_VALUE to the correct HSE_VALUE + * - Redefine SystemClock_Config() with the correct settings + */ +#if HSE_VALUE == 8000000U + // 1- Try to start with HSE and external 8MHz xtal + if (SetSysClock_PLL_HSE(false) == false) { + // 2- If fail try to start with HSE and external clock + if (SetSysClock_PLL_HSE(true) == false) { +#endif + // 3- If fail start with HSI clock + if (SetSysClock_PLL_HSI() == false) { + Error_Handler(); + } +#if HSE_VALUE == 8000000U + } + } +#endif +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h new file mode 100644 index 000000000000..b0f2ddf0c22c --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h @@ -0,0 +1,175 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// STM32F103VET6 | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | +//------------------|-------------|---------------|------------|-----------|----------------------|------------| +#define PA0 0 // | | A0 Nozzle T°c | | | | | +#define PA1 1 // | | A1 Bed T°c | | | | | +#define PA2 2 // | | | USART2_TX | | | | +#define PA3 3 // | | DAC_OUT1** | USART2_RX | | | | +#define PA4 4 // | | DAC_OUT2** | | | SPI1_SS*(wired?) | | +#define PA5 5 // | O | | | | SPI1_SCK EEPROM | | +#define PA6 6 // | I | | | | SPI1_MISO EEPROM | | +#define PA7 7 // | O | | | | SPI1_MOSI EEPROM | | +#define PA8 8 // | Od BED | | | | | | +#define PA9 9 // | | | USART1_TX | | | | +#define PA10 10 // | | | USART1_RX | | | | +#define PA11 11 // | I | | | | | USB_DM | +#define PA12 12 // | I | | | | | USB_DP | +#define PA13 13 // | I | | | | | SWD_SWDIO | +#define PA14 14 // | I | | | | | SWD_SWCLK | +#define PA15 15 // | Od FAN | | | | | | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PB0 16 // | | | | | | | +#define PB1 17 // | | | | | | | +#define PB2 18 // | I+ | | | | | BOOT1 | +#define PB3 19 // | O X_DIR | | | | | | +#define PB4 20 // | O X_STEP | | | | | | +#define PB5 21 // | O X_EN | | | | | | +#define PB6 22 // | O Y_DIR | | | | | | +#define PB7 23 // | O Y_STEP | | | | | | +#define PB8 24 // | O Y_EN | | | | | | +#define PB9 25 // | O Z_DIR | | | | | | +#define PB10 26 // | I+ | | USART3_TX* | TWI2_SCL* | | | +#define PB11 27 // | I+ | | USART3_RX* | TWI2_SDA* | | | +#define PB12 28 // | O TFT | | | | SPI2_SS | TOUCH_CS | +#define PB13 29 // | O TFT | | | | SPI2_SCK | TOUCH_SCK | +#define PB14 30 // | O TFT | | | | SPI2_MISO (bad>MOSI) | TOUCH_MOSI | +#define PB15 31 // | I TFT | | | | SPI2_MOSI (bad>MISO) | TOUCH_MISO | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PC0 32 // | I E_OUT | | | | | | +#define PC1 33 // | I+ X_MIN | | | | | | +#define PC2 34 // | O LED | | | | | | +#define PC3 35 // | I+ | | | | | | +#define PC4 36 // | O TFT | | | | | TFT RESET | +#define PC5 37 // | O CS1 | | | | for SPI1 EEPROM CS | | +#define PC6 38 // | I TFT | | | | | TOUCH_INT | +#define PC7 39 // | | | | | | | +#define PC8 40 // | x SDIO | | | | | SD_D0 | +#define PC9 41 // | x SDIO | | | | | SD_D1 | +#define PC10 42 // | x SDIO | | | | | SD_D2 | +#define PC11 43 // | x SDIO | | | | | SD_D3 | +#define PC12 44 // | O SDIO | | | | | SD_CLK | +#define PC13 45 // | I | | | | | | +#define PC14 46 // | I+ Y_MAX | | | | | | +#define PC15 47 // | I+ Y_MIN | | | | | | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PD0 48 // | O TFT | | | | | OSC_IN D2 | +#define PD1 49 // | O TFT | | | | | OSC_OUT D3 | +#define PD2 50 // | O SDIO | | | | | SD_CMD | +#define PD3 51 // | Od NOZZLE | | | | | | +#define PD4 52 // | O TFT | | | | | FSMC_NOE | +#define PD5 53 // | O TFT | | | | | FSMC_NWE | +#define PD6 54 // | I wired?* | | | | | FSMC_NWAIT*| +#define PD7 55 // | O TFT | | | | | FSMC_NE1/CS| +#define PD8 56 // | O TFT | | | | | FSMC_D13 | +#define PD9 57 // | O TFT | | | | | FSMC_D14 | +#define PD10 58 // | O TFT | | | | | FSMC_D15 | +#define PD11 59 // | O TFT | | | | | FSMC_A16 | +#define PD12 60 // | O TFT | | | | | TFT BL | +#define PD13 61 // | Od PWM* | | | | | SERVO0 | +#define PD14 62 // | O TFT | | | | | FSMC_D00 | +#define PD15 63 // | O TFT | | | | | FSMC_D01 | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PE0 64 // | O Z_STEP | | | | | | +#define PE1 65 // | O Z_EN | | | | | | +#define PE2 66 // | O E0_DIR | | | | | | +#define PE3 67 // | O E0_STEP | | | | | | +#define PE4 68 // | O E0_EN | | | | | | +#define PE5 69 // | I+ Z_MAX | | | | | | +#define PE6 70 // | I+ Z_MIN | | | | | | +#define PE7 71 // | O TFT | | | | | FSMC_D04 | +#define PE8 72 // | O TFT | | | | | FSMC_D05 | +#define PE9 73 // | O TFT | | | | | FSMC_D06 | +#define PE10 74 // | O TFT | | | | | FSMC_D07 | +#define PE11 75 // | O TFT | | | | | FSMC_D08 | +#define PE12 76 // | O TFT | | | | | FSMC_D09 | +#define PE13 77 // | O TFT | | | | | FSMC_D10 | +#define PE14 78 // | O TFT | | | | | FSMC_D11 | +#define PE15 79 // | O TFT | | | | | FSMC_D12 | +//------------------|-------------|---------------|------------|-----------|----------------------|------------| + +// This must be a literal +#define NUM_DIGITAL_PINS 80 +#define NUM_ANALOG_INPUTS 16 // 2 first are used, but cant be reduced to 2... + +// On-board LED pin number +#ifndef LED_BUILTIN +#define LED_BUILTIN PC2 +#endif + +// On-board user button (not wired) +#ifndef USER_BTN +#define USER_BTN PC13 +#endif + +// SPI Definition (SPI1 EEPROM) +#define PIN_SPI_SS PC5 +#define PIN_SPI_MOSI PA7 +#define PIN_SPI_MISO PA6 +#define PIN_SPI_SCK PA5 + +// I2C Definition (Unused) +#define PIN_WIRE_SDA PB11 +#define PIN_WIRE_SCL PB10 + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif + +// UART Definitions +// Define here Serial instance number to map on Serial generic name +#define SERIAL_UART_INSTANCE 1 + +// Default pin used for 'Serial' instance (linked to CH340 USB port) +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 +#define PIN_SERIAL1_RX PA10 +#define PIN_SERIAL1_TX PA9 +// Default pin used for 'Serial2' instance (connector exists but unsoldered) +#define PIN_SERIAL2_RX PA3 +#define PIN_SERIAL2_TX PA2 + +// Extra HAL modules +#if defined(STM32F103xE) +//#define HAL_DAC_MODULE_ENABLED (unused or maybe for the eeprom write?) +#define HAL_SD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#endif + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial1 + #define SERIAL_PORT_HARDWARE Serial1 + #define SERIAL_PORT_HARDWARE_OPEN Serial2 +#endif + diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 029763b9eddd..1185e8f84d8a 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -330,19 +330,19 @@ upload_protocol = serial # [env:STM32F103VE_longer] platform = ${common_stm32.platform} +lib_deps = ${common.lib_deps} + https://github.com/tpruvot/STM32_Servo_OpenDrain/archive/2.0.zip extends = stm32_variant board = genericSTM32F103VE -board_build.variant = MARLIN_F103Vx +board_build.variant = MARLIN_F103VE_LONGER board_build.rename = project.bin board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 -build_flags = ${stm32_variant.build_flags} - -DMCU_STM32F103VE -DU20 -DTS_V12 -DLED_BUILTIN=PC2 -UPIN_WIRE_SDA - -UPIN_WIRE_SCL -DPIN_WIRE_SDA=PB11 -DPIN_WIRE_SCL=PB10 - -DHAL_DAC_MODULE_DISABLED -DHAL_I2S_MODULE_DISABLED -build_unflags = ${stm32_variant.build_unflags} - -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED +build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 +build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED extra_scripts = ${stm32_variant.extra_scripts} +monitor_speed = 250000 +debug_tool = stlink # # TRIGORILLA PRO (STM32F103ZET6) From 9130f58f3f553584278ec716c617005b9e03cb49 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 4 Aug 2021 16:37:02 -0500 Subject: [PATCH 178/323] =?UTF-8?q?=F0=9F=90=9B=20Prevent=20ABL=20G29=20se?= =?UTF-8?q?tting=20a=20funky=20feedrate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #22472 --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 2 ++ Marlin/src/module/motion.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 29009c6e2d9a..18e386212845 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -363,6 +363,8 @@ G29_TYPE GcodeSuite::G29() { #if ABL_USES_GRID xy_probe_feedrate_mm_s = MMM_TO_MMS(parser.linearval('S', XY_PROBE_FEEDRATE)); + if (!xy_probe_feedrate_mm_s) xy_probe_feedrate_mm_s = PLANNER_XY_FEEDRATE(); + NOLESS(xy_probe_feedrate_mm_s, planner.settings.min_feedrate_mm_s); const float x_min = probe.min_x(), x_max = probe.max_x(), y_min = probe.min_y(), y_max = probe.max_y(); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index eb6dc6597ce4..838605cd549f 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -483,7 +483,7 @@ void do_blocking_move_to(LINEAR_AXIS_ARGS(const float), const_feedRate_t fr_mm_s DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING)); if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", LINEAR_AXIS_ARGS()); - const feedRate_t xy_feedrate = fr_mm_s ?: feedRate_t(XY_PROBE_FEEDRATE_MM_S); + const feedRate_t xy_feedrate = fr_mm_s ?: PLANNER_XY_FEEDRATE(); #if HAS_Z_AXIS const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS); From c2c7a03706e54d1ce4441a39ca8343755bceac06 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 4 Aug 2021 17:01:42 -0500 Subject: [PATCH 179/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20report=5Fa=5Fposit?= =?UTF-8?q?ion=20ABC=20criteria?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 0ff909d7ccab..b8fdaa5f7609 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2825,19 +2825,22 @@ int32_t Stepper::triggered_position(const AxisEnum axis) { return v; } -#if ANY(CORE_IS_XZ, CORE_IS_YZ, DELTA) - #define USES_ABC 1 +#if ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, IS_SCARA, DELTA) + #define SAYS_A 1 +#endif +#if ANY(CORE_IS_XY, CORE_IS_YZ, MARKFORGED_XY, IS_SCARA, DELTA) + #define SAYS_B 1 #endif -#if ANY(USES_ABC, MARKFORGED_XY, IS_SCARA) - #define USES_AB 1 +#if ANY(CORE_IS_XZ, CORE_IS_YZ, DELTA) + #define SAYS_C 1 #endif void Stepper::report_a_position(const xyz_long_t &pos) { SERIAL_ECHOLNPAIR_P( LIST_N(DOUBLE(LINEAR_AXES), - TERN(USES_AB, PSTR(STR_COUNT_A), PSTR(STR_COUNT_X)), pos.x, - TERN(USES_AB, PSTR("B:"), SP_Y_LBL), pos.y, - TERN(USES_ABC, PSTR("C:"), SP_Z_LBL), pos.z, + TERN(SAYS_A, PSTR(STR_COUNT_A), PSTR(STR_COUNT_X)), pos.x, + TERN(SAYS_B, PSTR("B:"), SP_Y_LBL), pos.y, + TERN(SAYS_C, PSTR("C:"), SP_Z_LBL), pos.z, SP_I_LBL, pos.i, SP_J_LBL, pos.j, SP_K_LBL, pos.k From b06d2f789b4a36da47869268c297c409c13b8889 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 5 Aug 2021 00:58:49 +0000 Subject: [PATCH 180/323] [cron] Bump distribution date (2021-08-05) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 32fee40e2533..b287939d5849 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-04" +//#define STRING_DISTRIBUTION_DATE "2021-08-05" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 22a5f8e6e904..c6add72a503b 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-04" + #define STRING_DISTRIBUTION_DATE "2021-08-05" #endif /** From 5cb961e98b6d659a9acad3a88126baa14faec35f Mon Sep 17 00:00:00 2001 From: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Thu, 5 Aug 2021 00:45:49 -0400 Subject: [PATCH 181/323] =?UTF-8?q?=E2=9C=A8=20Mixer=20Presets=20(#21562)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 1 + Marlin/src/feature/mixing.cpp | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 239ee220b2f6..d01fc98b40ef 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -342,6 +342,7 @@ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + //#define MIXING_PRESETS // Assign 8 default V-tool presets for 2 or 3 MIXING_STEPPERS #if ENABLED(GRADIENT_MIX) //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias #endif diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index 4823ac2c608b..332a4f374014 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -106,11 +106,32 @@ void Mixer::reset_vtools() { MIXER_STEPPER_LOOP(i) color[t][i] = (i == 0) ? COLOR_A_MASK : 0; #endif + + // MIXING_PRESETS: Set a variety of obvious mixes as presets + #if ENABLED(MIXING_PRESETS) && WITHIN(MIXING_STEPPERS, 2, 3) + #if MIXING_STEPPERS == 2 + if (MIXING_VIRTUAL_TOOLS > 2) { collector[0] = 1; collector[1] = 1; mixer.normalize(2); } // 1:1 + if (MIXING_VIRTUAL_TOOLS > 3) { collector[0] = 3; mixer.normalize(3); } // 3:1 + if (MIXING_VIRTUAL_TOOLS > 4) { collector[0] = 1; collector[1] = 3; mixer.normalize(4); } // 1:3 + if (MIXING_VIRTUAL_TOOLS > 5) { collector[1] = 2; mixer.normalize(5); } // 1:2 + if (MIXING_VIRTUAL_TOOLS > 6) { collector[0] = 2; collector[1] = 1; mixer.normalize(6); } // 2:1 + if (MIXING_VIRTUAL_TOOLS > 7) { collector[0] = 3; collector[1] = 2; mixer.normalize(7); } // 3:2 + #else + if (MIXING_VIRTUAL_TOOLS > 3) { collector[0] = 1; collector[1] = 1; collector[2] = 1; mixer.normalize(3); } // 1:1:1 + if (MIXING_VIRTUAL_TOOLS > 4) { collector[1] = 3; collector[2] = 0; mixer.normalize(4); } // 1:3:0 + if (MIXING_VIRTUAL_TOOLS > 5) { collector[0] = 0; collector[2] = 1; mixer.normalize(5); } // 0:3:1 + if (MIXING_VIRTUAL_TOOLS > 6) { collector[1] = 1; mixer.normalize(6); } // 0:1:1 + if (MIXING_VIRTUAL_TOOLS > 7) { collector[0] = 1; collector[2] = 0; mixer.normalize(7); } // 1:1:0 + #endif + ZERO(collector); + #endif } // called at boot void Mixer::init() { + ZERO(collector); + reset_vtools(); #if HAS_MIXER_SYNC_CHANNEL @@ -119,8 +140,6 @@ void Mixer::init() { color[MIXER_AUTORETRACT_TOOL][i] = COLOR_A_MASK; #endif - ZERO(collector); - #if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX) update_mix_from_vtool(); #endif From f35e0b9382c6df1f98a4c3ba34b10a8077432e56 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 5 Aug 2021 06:47:31 +0200 Subject: [PATCH 182/323] =?UTF-8?q?=F0=9F=9A=B8=20Prevent=20M42=20unintend?= =?UTF-8?q?ed=20pin=20change=20to=20output=20(#22493)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/control/M42.cpp | 36 ++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/Marlin/src/gcode/control/M42.cpp b/Marlin/src/gcode/control/M42.cpp index 6ef8455e0b5c..908260ed25dd 100644 --- a/Marlin/src/gcode/control/M42.cpp +++ b/Marlin/src/gcode/control/M42.cpp @@ -31,6 +31,13 @@ #include "../../module/temperature.h" #endif +#ifdef MAPLE_STM32F1 + // these are enums on the F1... + #define INPUT_PULLDOWN INPUT_PULLDOWN + #define INPUT_ANALOG INPUT_ANALOG + #define OUTPUT_OPEN_DRAIN OUTPUT_OPEN_DRAIN +#endif + void protected_pin_err() { SERIAL_ERROR_MSG(STR_ERR_PROTECTED_PIN); } @@ -55,13 +62,20 @@ void GcodeSuite::M42() { if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err(); + bool avoidWrite = false; if (parser.seenval('M')) { switch (parser.value_byte()) { - case 0: pinMode(pin, INPUT); break; + case 0: pinMode(pin, INPUT); avoidWrite = true; break; case 1: pinMode(pin, OUTPUT); break; - case 2: pinMode(pin, INPUT_PULLUP); break; + case 2: pinMode(pin, INPUT_PULLUP); avoidWrite = true; break; #ifdef INPUT_PULLDOWN - case 3: pinMode(pin, INPUT_PULLDOWN); break; + case 3: pinMode(pin, INPUT_PULLDOWN); avoidWrite = true; break; + #endif + #ifdef INPUT_ANALOG + case 4: pinMode(pin, INPUT_ANALOG); avoidWrite = true; break; + #endif + #ifdef OUTPUT_OPEN_DRAIN + case 5: pinMode(pin, OUTPUT_OPEN_DRAIN); break; #endif default: SERIAL_ECHOLNPGM("Invalid Pin Mode"); return; } @@ -99,8 +113,22 @@ void GcodeSuite::M42() { } #endif - pinMode(pin, OUTPUT); + if (avoidWrite) { + SERIAL_ECHOLNPGM("?Cannot write to INPUT"); + return; + } + + // An OUTPUT_OPEN_DRAIN should not be changed to normal OUTPUT (STM32) + // Use M42 Px M1/5 S0/1 to set the output type and then set value + #ifndef OUTPUT_OPEN_DRAIN + pinMode(pin, OUTPUT); + #endif extDigitalWrite(pin, pin_status); + + #ifdef ARDUINO_ARCH_STM32 + // A simple I/O will be set to 0 by analogWrite() + if (pin_status <= 1) return; + #endif analogWrite(pin, pin_status); } From b55cf3c9f6f6199d665f9db424b28f7395f158f4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 5 Aug 2021 00:19:21 -0500 Subject: [PATCH 183/323] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20BLTouch=20spelling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/mks_ui/tft_Language_en.h | 2 +- Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h | 2 +- Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/tft_Language_en.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_en.h index b6eef183682a..e1a2a256d947 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_Language_en.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_en.h @@ -105,7 +105,7 @@ #define LEVELING_PARA_CONF_TITLE_EN "leveling setting" #define AUTO_LEVELING_ENABLE_EN "Enable auto leveling" -#define BLTOUCH_LEVELING_ENABLE_EN "Enable BLtouch" +#define BLTOUCH_LEVELING_ENABLE_EN "Enable BLTouch" #define PROBE_PORT_EN "Probe connector" #define PROBE_X_OFFSET_EN "Probe X-axis offset" #define PROBE_Y_OFFSET_EN "Probe Y-axis offset" diff --git a/Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h index b50761fde040..59de8c7db93e 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h @@ -90,7 +90,7 @@ #define LEVELING_PARA_CONF_TITLE_CN "调平参数" #define AUTO_LEVELING_ENABLE_CN "自动调平" -#define BLTOUCH_LEVELING_ENABLE_CN "启动BLtouch" +#define BLTOUCH_LEVELING_ENABLE_CN "启动BLTouch" #define PROBE_PORT_CN "调平探针接口" #define PROBE_X_OFFSET_CN "探针X方向偏移" #define PROBE_Y_OFFSET_CN "探针Y方向偏移" diff --git a/Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h index 3f58a9afd27a..c9607187ef78 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h @@ -90,7 +90,7 @@ #define LEVELING_PARA_CONF_TITLE_T_CN "調平參數" #define AUTO_LEVELING_ENABLE_T_CN "自動調平" -#define BLTOUCH_LEVELING_ENABLE_T_CN "啟動BLtouch" +#define BLTOUCH_LEVELING_ENABLE_T_CN "啟動BLTouch" #define PROBE_PORT_T_CN "調平探針接口" #define PROBE_X_OFFSET_T_CN "探針X方向偏移" #define PROBE_Y_OFFSET_T_CN "探针Y方向偏移" From 03b0a6371dcdee90846c5838a5b59a7e5ce57505 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 5 Aug 2021 15:03:26 -0500 Subject: [PATCH 184/323] =?UTF-8?q?=F0=9F=8E=A8=20Simplify=20endstops=20fl?= =?UTF-8?q?ags=20(#22525)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 73 ++++++++++++++---------------- 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index e25229c19853..0f33b4799ddd 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2122,83 +2122,78 @@ #define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_) #define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M)) -#if BOTH(X_HOME_TO_MIN, USE_XMIN_PLUG) && _HAS_STOP(X,MIN) +#if _HAS_STOP(X,MIN) #define HAS_X_MIN 1 #endif -#if (BOTH(X_HOME_TO_MAX, USE_XMAX_PLUG) || ENABLED(DUAL_X_CARRIAGE)) && _HAS_STOP(X,MAX) +#if _HAS_STOP(X,MAX) #define HAS_X_MAX 1 #endif -#if ALL(HAS_Y_AXIS, Y_HOME_TO_MIN, USE_YMIN_PLUG) && _HAS_STOP(Y,MIN) +#if _HAS_STOP(Y,MIN) #define HAS_Y_MIN 1 #endif -#if ALL(HAS_Y_AXIS, Y_HOME_TO_MAX, USE_YMAX_PLUG) && _HAS_STOP(Y,MAX) +#if _HAS_STOP(Y,MAX) #define HAS_Y_MAX 1 #endif -#if BOTH(HAS_Z_AXIS, USE_ZMIN_PLUG) && _HAS_STOP(Z,MIN) +#if _HAS_STOP(Z,MIN) #define HAS_Z_MIN 1 #endif -#if ALL(HAS_Z_AXIS, Z_HOME_TO_MAX, USE_ZMAX_PLUG) && _HAS_STOP(Z,MAX) +#if _HAS_STOP(Z,MAX) #define HAS_Z_MAX 1 #endif -#if LINEAR_AXES >= 4 && BOTH(I_HOME_TO_MIN, USE_IMIN_PLUG) && _HAS_STOP(I,MIN) +#if _HAS_STOP(I,MIN) #define HAS_I_MIN 1 #endif -#if LINEAR_AXES >= 4 && BOTH(I_HOME_TO_MAX, USE_IMAX_PLUG) && _HAS_STOP(I,MAX) +#if _HAS_STOP(I,MAX) #define HAS_I_MAX 1 #endif -#if LINEAR_AXES >= 5 && BOTH(J_HOME_TO_MIN, USE_JMIN_PLUG) && _HAS_STOP(J,MIN) +#if _HAS_STOP(J,MIN) #define HAS_J_MIN 1 #endif -#if LINEAR_AXES >= 5 && BOTH(J_HOME_TO_MAX, USE_JMAX_PLUG) && _HAS_STOP(J,MAX) +#if _HAS_STOP(J,MAX) #define HAS_J_MAX 1 #endif -#if LINEAR_AXES >= 6 && BOTH(K_HOME_TO_MIN, USE_KMIN_PLUG) && _HAS_STOP(K,MIN) +#if _HAS_STOP(K,MIN) #define HAS_K_MIN 1 #endif -#if LINEAR_AXES >= 6 && BOTH(K_HOME_TO_MAX, USE_KMAX_PLUG) && _HAS_STOP(K,MAX) +#if _HAS_STOP(K,MAX) #define HAS_K_MAX 1 #endif -#if BOTH(X_HOME_TO_MIN, X_DUAL_ENDSTOPS) && PIN_EXISTS(X2_MIN) +#if PIN_EXISTS(X2_MIN) #define HAS_X2_MIN 1 #endif -#if BOTH(X_HOME_TO_MAX, X_DUAL_ENDSTOPS) && PIN_EXISTS(X2_MAX) +#if PIN_EXISTS(X2_MAX) #define HAS_X2_MAX 1 #endif -#if BOTH(Y_HOME_TO_MIN, Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y2_MIN) +#if PIN_EXISTS(Y2_MIN) #define HAS_Y2_MIN 1 #endif -#if BOTH(Y_HOME_TO_MAX, Y_DUAL_ENDSTOPS) && PIN_EXISTS(Y2_MAX) +#if PIN_EXISTS(Y2_MAX) #define HAS_Y2_MAX 1 #endif -#if ENABLED(Z_MULTI_ENDSTOPS) - #if Z_HOME_TO_MIN && PIN_EXISTS(Z2_MIN) - #define HAS_Z2_MIN 1 - #endif - #if Z_HOME_TO_MAX && PIN_EXISTS(Z2_MAX) - #define HAS_Z2_MAX 1 - #endif - #if NUM_Z_STEPPER_DRIVERS >= 3 - #if Z_HOME_TO_MIN && PIN_EXISTS(Z3_MIN) - #define HAS_Z3_MIN 1 - #endif - #if Z_HOME_TO_MAX && PIN_EXISTS(Z3_MAX) - #define HAS_Z3_MAX 1 - #endif - #if NUM_Z_STEPPER_DRIVERS >= 4 - #if Z_HOME_TO_MIN && PIN_EXISTS(Z4_MIN) - #define HAS_Z4_MIN 1 - #endif - #if Z_HOME_TO_MAX && PIN_EXISTS(Z4_MAX) - #define HAS_Z4_MAX 1 - #endif - #endif - #endif +#if PIN_EXISTS(Z2_MIN) + #define HAS_Z2_MIN 1 +#endif +#if PIN_EXISTS(Z2_MAX) + #define HAS_Z2_MAX 1 +#endif +#if PIN_EXISTS(Z3_MIN) + #define HAS_Z3_MIN 1 +#endif +#if PIN_EXISTS(Z3_MAX) + #define HAS_Z3_MAX 1 +#endif +#if PIN_EXISTS(Z4_MIN) + #define HAS_Z4_MIN 1 +#endif +#if PIN_EXISTS(Z4_MAX) + #define HAS_Z4_MAX 1 #endif #if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE) #define HAS_Z_MIN_PROBE_PIN 1 #endif +#undef _HAS_STOP #undef IS_PROBE_PIN #undef IS_X2_ENDSTOP #undef IS_Y2_ENDSTOP From ff3db550ee397286c7b9f3bf546c0f4fba161682 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 6 Aug 2021 01:02:27 +0000 Subject: [PATCH 185/323] [cron] Bump distribution date (2021-08-06) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index b287939d5849..c65e3c3f44e6 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-05" +//#define STRING_DISTRIBUTION_DATE "2021-08-06" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c6add72a503b..d87990ca67b5 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-05" + #define STRING_DISTRIBUTION_DATE "2021-08-06" #endif /** From 526b6cdf5b429cf05579bd203a9d72cd057bf0a1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 5 Aug 2021 23:24:20 -0500 Subject: [PATCH 186/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20fan=20index=20for?= =?UTF-8?q?=20Singlenozzle,=20chamber=20fan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #22512 Followup to #19152, #19519 --- Marlin/src/inc/SanityCheck.h | 2 +- Marlin/src/module/temperature.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 9ced6e4e42ab..a2fdc9856ee3 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2002,7 +2002,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #if REDUNDANT_TEMP_MATCH(SOURCE, E0) && HAS_HOTEND - #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be 0 if a hotend is used. E0 always uses TEMP_SENSOR_0." + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be E0 if a hotend is used. E0 always uses TEMP_SENSOR_0." #elif REDUNDANT_TEMP_MATCH(SOURCE, COOLER) && HAS_TEMP_COOLER #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be COOLER. TEMP_SENSOR_COOLER is in use." #elif REDUNDANT_TEMP_MATCH(SOURCE, PROBE) && HAS_TEMP_PROBE diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 1e91511f5a15..52d0dfb56e20 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -369,7 +369,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, } #endif - TERN_(SINGLENOZZLE, fan = 0); // Always use fan index 0 with SINGLENOZZLE + TERN_(SINGLENOZZLE, if (fan < EXTRUDERS) fan = 0); // Always fan 0 for SINGLENOZZLE E fan if (fan >= FAN_COUNT) return; @@ -1481,7 +1481,7 @@ void Temperature::manage_heater() { fan_chamber_pwm = CHAMBER_FAN_BASE + _MAX((CHAMBER_FAN_FACTOR) * (temp_chamber.celsius - temp_chamber.target), 0); #endif NOMORE(fan_chamber_pwm, 225); - set_fan_speed(2, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan + set_fan_speed(CHAMBER_FAN_INDEX, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan #endif #if ENABLED(CHAMBER_VENT) @@ -1512,7 +1512,7 @@ void Temperature::manage_heater() { else if (!flag_chamber_off) { #if ENABLED(CHAMBER_FAN) flag_chamber_off = true; - set_fan_speed(2, 0); + set_fan_speed(CHAMBER_FAN_INDEX, 0); #endif #if ENABLED(CHAMBER_VENT) flag_chamber_excess_heat = false; From 9a8c9d4ed0f1ab26736fda469eefcbdaeeb90969 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 6 Aug 2021 22:51:10 +0200 Subject: [PATCH 187/323] =?UTF-8?q?=F0=9F=8E=A8=20Fix=20"'EEPROM'=20unused?= =?UTF-8?q?"=20warning=20(#22511)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/eeprom_flash.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index 0c37abfcbb08..c3efec6062f0 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -104,6 +104,8 @@ size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } bool PersistentStore::access_start() { + EEPROM.begin(); // Avoid STM32 EEPROM.h warning (do nothing) + #if ENABLED(FLASH_EEPROM_LEVELING) if (current_slot == -1 || eeprom_data_written) { From e7c33840dca804c5c41ca6ce8888bfa16f8c1a47 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat, 7 Aug 2021 08:54:02 +1200 Subject: [PATCH 188/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20MKS=20'USB=20Flash?= =?UTF-8?q?=20MSC'=20environments=20(#22515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/stm32f4.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index d2332630a100..b32efb83a908 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -388,8 +388,9 @@ build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} [env:mks_robin_nano_v3_usb_flash_drive_msc] platform = ${common_stm32.platform} extends = env:mks_robin_nano_v3_usb_flash_drive -build_flags = ${env:mks_robin_nano_v3_usb_flash_drive} +build_flags = ${env:mks_robin_nano_v3_usb_flash_drive.build_flags} -DUSBD_USE_CDC_MSC +build_unflags = -DUSBD_USE_CDC # # This I2C1(PB8:I2C1_SCL PB9:I2C1_SDA) is used by MKS Monster8 @@ -434,5 +435,6 @@ build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1_CAN.build_flag [env:mks_monster8_usb_flash_drive_msc] platform = ${common_stm32.platform} extends = env:mks_monster8_usb_flash_drive -build_flags = ${env:mks_monster8_usb_flash_drive} +build_flags = ${env:mks_monster8_usb_flash_drive.build_flags} -DUSBD_USE_CDC_MSC +build_unflags = -DUSBD_USE_CDC From f732cb1a7f499e83f5a43344a54fb19cbbc9dab0 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 7 Aug 2021 00:53:48 +0000 Subject: [PATCH 189/323] [cron] Bump distribution date (2021-08-07) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c65e3c3f44e6..08adb046a036 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-06" +//#define STRING_DISTRIBUTION_DATE "2021-08-07" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index d87990ca67b5..679ccbe76786 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-06" + #define STRING_DISTRIBUTION_DATE "2021-08-07" #endif /** From f4ab0a0c918f4db514e981c18f737e2752a2fc01 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 7 Aug 2021 15:59:00 -0500 Subject: [PATCH 190/323] =?UTF-8?q?=F0=9F=94=A7=20Sanity-check=20Mixing=20?= =?UTF-8?q?plus=20Disable=20Inactive=20Extruder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #22166 --- Marlin/src/inc/SanityCheck.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a2fdc9856ee3..9dfc24b064be 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1182,6 +1182,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "Please select either MIXING_EXTRUDER or SWITCHING_EXTRUDER, not both." #elif ENABLED(SINGLENOZZLE) #error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE." + #elif ENABLED(DISABLE_INACTIVE_EXTRUDER) + #error "MIXING_EXTRUDER is incompatible with DISABLE_INACTIVE_EXTRUDER." #endif #endif From 22ae09ace498e735c216bbb726f2c3f39d5d714a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 7 Aug 2021 16:06:51 -0500 Subject: [PATCH 191/323] =?UTF-8?q?=F0=9F=94=A7=20Sanity-check=20DEFAULT?= =?UTF-8?q?=5FEJERK=20with=20LIN=5FADVANCE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #20649 --- Marlin/src/inc/SanityCheck.h | 11 ++++------- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 9dfc24b064be..da51f5ca9eb1 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1210,6 +1210,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS ); #if ENABLED(S_CURVE_ACCELERATION) && DISABLED(EXPERIMENTAL_SCURVE) #error "LIN_ADVANCE and S_CURVE_ACCELERATION may not play well together! Enable EXPERIMENTAL_SCURVE to continue." + #elif ENABLED(DIRECT_STEPPING) + #error "DIRECT_STEPPING is incompatible with LIN_ADVANCE. Enable in external planner if possible." + #elif !HAS_JUNCTION_DEVIATION && defined(DEFAULT_EJERK) + static_assert(DEFAULT_EJERK >= 10, "It is strongly recommended to set DEFAULT_EJERK >= 10 when using LIN_ADVANCE."); #endif #endif @@ -3600,13 +3604,6 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "SAVED_POSITIONS must be an integer from 0 to 256." #endif -/** - * Stepper Chunk support - */ -#if BOTH(DIRECT_STEPPING, LIN_ADVANCE) - #error "DIRECT_STEPPING is incompatible with LIN_ADVANCE. Enable in external planner if possible." -#endif - /** * Touch Screen Calibration */ diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index bb4c0e80001f..cb3d3242e28c 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -126,11 +126,10 @@ #endif #endif - #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #if SD_CONNECTION_IS(LCD) && ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS) - #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_PINS_FOR_CS." + #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS." #endif #if SD_CONNECTION_IS(LCD) From 0f3e938c9b398dafa09ba39d98c4c461e883068e Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 8 Aug 2021 00:58:57 +0000 Subject: [PATCH 192/323] [cron] Bump distribution date (2021-08-08) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 08adb046a036..c34cb52361b5 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-07" +//#define STRING_DISTRIBUTION_DATE "2021-08-08" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 679ccbe76786..ad1dff604c0a 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-07" + #define STRING_DISTRIBUTION_DATE "2021-08-08" #endif /** From c1a533b45e21c43eda6fedb9679976747bca6845 Mon Sep 17 00:00:00 2001 From: mks-viva <1224833100@qq.com> Date: Sat, 7 Aug 2021 22:17:43 -0500 Subject: [PATCH 193/323] =?UTF-8?q?=F0=9F=93=8C=20MKS=20pins=20for=20PSU?= =?UTF-8?q?=5FCONTROL=20(#22528)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/lcd/M995.cpp | 4 +-- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 12 +++++-- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 13 +++++++ Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 13 +++++++ Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 2 +- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 5 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 11 +++--- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 19 ++++++++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 27 +++++++++----- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 26 ++++++++++---- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 24 +++++++++++-- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 25 +++++++++---- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 35 ++++++++++++++----- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 17 ++++++--- 14 files changed, 179 insertions(+), 54 deletions(-) diff --git a/Marlin/src/gcode/lcd/M995.cpp b/Marlin/src/gcode/lcd/M995.cpp index 5e9fddbe8c35..d5f825c0c8d7 100644 --- a/Marlin/src/gcode/lcd/M995.cpp +++ b/Marlin/src/gcode/lcd/M995.cpp @@ -26,7 +26,7 @@ #include "../gcode.h" -#if ENABLED(TFT_LVGL_UI) +#if HAS_TFT_LVGL_UI #include "../../lcd/extui/mks_ui/draw_touch_calibration.h" #else #include "../../lcd/menu/menu.h" @@ -37,7 +37,7 @@ */ void GcodeSuite::M995() { - #if ENABLED(TFT_LVGL_UI) + #if HAS_TFT_LVGL_UI lv_draw_touch_calibration_screen(); #else ui.goto_screen(touch_screen_calibration); diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 71d7ad30370c..4c2b606929f4 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -136,9 +136,17 @@ #endif // -// Misc. Functions +// Power Supply Control // -#define PS_ON_PIN P0_25 // TH3 Connector +#if ENABLED(PSU_CONTROL) // MKSPWC + #ifndef PS_ON_PIN + #define PS_ON_PIN P0_25 // SERVO + #endif + #ifndef KILL_PIN + #define KILL_PIN P1_29 // Z+ + #define KILL_PIN_STATE HIGH + #endif +#endif // // Ethernet pins diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 68e138984199..0c3f44ceb721 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -215,6 +215,19 @@ #define FAN_PIN P2_04 #endif +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + #ifndef PS_ON_PIN + #define PS_ON_PIN P2_00 // SERVO + #endif + #ifndef KILL_PIN + #define KILL_PIN P1_24 // Z+ + #define KILL_PIN_STATE HIGH + #endif +#endif + // // Misc. Functions // diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 10571474982d..4020ac23c637 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -226,6 +226,19 @@ // #define LED_PIN P1_18 // Used as a status indicator +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + #ifndef PS_ON_PIN + #define PS_ON_PIN P2_00 // Suggestion (SERVO) + #endif + #ifndef KILL_PIN + #define KILL_PIN P1_24 // Suggestion (Z+) + #define KILL_PIN_STATE HIGH + #endif +#endif + // // RGB LED // diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h index b638589388ec..0319afa5e990 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -147,7 +147,7 @@ #define TFT_RS_PIN FSMC_RS_PIN #endif -#if ENABLED(TFT_LVGL_UI) +#if HAS_TFT_LVGL_UI // LVGL #define HAS_SPI_FLASH_FONT 1 #define HAS_GCODE_PREVIEW 1 diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 31b03f6b0767..2dea59ef4180 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -195,9 +195,10 @@ // // Misc. Functions // -//#define POWER_LOSS_PIN PA1 // PW_SO #if ENABLED(BACKUP_POWER_SUPPLY) #define POWER_LOSS_PIN PA2 // PW_DET (UPS) MKSPWC +#else + //#define POWER_LOSS_PIN PA1 // PW_SO #endif /** @@ -217,7 +218,7 @@ // #if ENABLED(PSU_CONTROL) #define KILL_PIN PA2 // PW_DET - #define KILL_PIN_INVERTING true + #define KILL_PIN_STATE HIGH //#define PS_ON_PIN PA3 // PW_CN /PW_OFF #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index b32d0aa0b8b0..7aa308f7b309 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -183,12 +183,11 @@ // Misc. Functions // #if HAS_TFT_LVGL_UI - //#define MKSPWC - #ifdef MKSPWC - #define SUICIDE_PIN PB2 // Enable MKSPWC SUICIDE PIN - #define SUICIDE_PIN_INVERTING false // Enable MKSPWC PIN STATE - #define KILL_PIN PA2 // Enable MKSPWC DET PIN - #define KILL_PIN_STATE true // Enable MKSPWC PIN STATE + #if ENABLED(PSU_CONTROL) // MKSPWC + #define SUICIDE_PIN PB2 // PW_OFF + #define SUICIDE_PIN_INVERTING false + #define KILL_PIN PA2 // PW_DET + #define KILL_PIN_STATE HIGH #endif #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 44c35b9d0446..da7ba05795a9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -126,6 +126,19 @@ #define FIL_RUNOUT_PIN PB10 // MT_DET +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + #ifndef PS_ON_PIN + #define PS_ON_PIN PA14 // PW_OFF + #endif + #ifndef KILL_PIN + #define KILL_PIN PB10 // PW_DET + #define KILL_PIN_STATE HIGH + #endif +#endif + /** * _____ _____ _____ * (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK) 5V | 1 2 | GND @@ -158,7 +171,7 @@ #elif ENABLED(MKS_MINI_12864_V3) #define DOGLCD_CS PA4 #define DOGLCD_A0 PA5 - #define LCD_PINS_DC DOGLCD_A0 + #define LCD_PINS_DC DOGLCD_A0 #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN PA6 #define NEOPIXEL_PIN PA7 @@ -189,8 +202,8 @@ // // SD Card // -#define SPI_DEVICE 2 -#define ONBOARD_SPI_DEVICE 2 +#define SPI_DEVICE 2 +#define ONBOARD_SPI_DEVICE 2 #define SDSS SD_SS_PIN #define SDCARD_CONNECTION ONBOARD #define SD_DETECT_PIN PC10 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 147aec5e9f83..368c0a24582e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -128,17 +128,28 @@ //#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // -// Misc. Functions +// Power Supply Control // -#if HAS_TFT_LVGL_UI - //#define MKSPWC - #ifdef MKSPWC - #define SUICIDE_PIN PB2 // Enable MKSPWC SUICIDE PIN - #define SUICIDE_PIN_INVERTING false // Enable MKSPWC PIN STATE - #define KILL_PIN PA2 // Enable MKSPWC DET PIN - #define KILL_PIN_STATE true // Enable MKSPWC PIN STATE +#if ENABLED(PSU_CONTROL) // MKSPWC + #if HAS_TFT_LVGL_UI + #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." + #endif + #ifndef PS_ON_PIN + #define PS_ON_PIN PB2 // SUICIDE #endif + #ifndef KILL_PIN + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH + #endif +#else + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_INVERTING false +#endif +// +// Misc. Functions +// +#if HAS_TFT_LVGL_UI #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN #define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 4b0ba2fdab9a..cdb9448410d9 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -191,17 +191,29 @@ //#define TEMP_0_CS_PIN PE5 // TC1 - CS1 //#define TEMP_0_CS_PIN PE6 // TC2 - CS2 +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + #if HAS_TFT_LVGL_UI + #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." + #endif + #ifndef PS_ON_PIN + #define PS_ON_PIN PB2 // SUICIDE + #endif + #ifndef KILL_PIN + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH + #endif +#else + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_INVERTING false +#endif + // // Misc. Functions // #if HAS_TFT_LVGL_UI - //#define MKSPWC - #ifdef MKSPWC - #define SUICIDE_PIN PB2 // Enable MKSPWC SUICIDE PIN - #define SUICIDE_PIN_INVERTING false // Enable MKSPWC PIN STATE - #define KILL_PIN PA2 // Enable MKSPWC DET PIN - #define KILL_PIN_STATE true // Enable MKSPWC PIN STATE - #endif #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN #define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 7ff22cc1ced1..2f62563edbee 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -179,10 +179,28 @@ //#define TEMP_0_CS_PIN PF11 // TC2 - CS2 #define POWER_LOSS_PIN PA2 // PW_DET -#define PS_ON_PIN PG11 // PW_OFF #define FIL_RUNOUT_PIN PA4 // MT_DET1 -//#define FIL_RUNOUT_PIN PE6 // MT_DET2 -//#define FIL_RUNOUT_PIN PG14 // MT_DET3 +#define FIL_RUNOUT2_PIN PE6 // MT_DET2 +#define FIL_RUNOUT3_PIN PG14 // MT_DET3 + +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + #if HAS_TFT_LVGL_UI + #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." + #endif + #ifndef PS_ON_PIN + #define PS_ON_PIN PG11 // SUICIDE + #endif + #ifndef KILL_PIN + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH + #endif +#else + #define SUICIDE_PIN PG11 + #define SUICIDE_PIN_INVERTING false +#endif // // SD Card diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index b7fd7222c8e4..2db558410977 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -210,10 +210,8 @@ // // Misc. Functions // -#define MT_DET_1 Y_MAX_PIN -#define MT_DET_2 Z_MAX_PIN -#define PW_DET Y_MAX_PIN -#define PW_OFF Z_MAX_PIN +#define MT_DET_1 PC5 // Y+ +#define MT_DET_2 PB12 // Z+ #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN MT_DET_1 @@ -222,8 +220,23 @@ #define FIL_RUNOUT2_PIN MT_DET_2 #endif -#define POWER_LOSS_PIN PW_DET -#define PS_ON_PIN PW_OFF +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + #ifndef PS_ON_PIN + #define PS_ON_PIN MT_DET_2 // Z+ + #endif + #ifndef KILL_PIN + #define KILL_PIN MT_DET_1 // Y+ + #define KILL_PIN_STATE HIGH + #endif +#else + #define PW_DET MT_DET_1 + #define PW_OFF MT_DET_2 + #define POWER_LOSS_PIN PW_DET + #define PS_ON_PIN PW_OFF +#endif // Random Info #define USB_SERIAL -1 // USB Serial diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 882b9601acfc..eff941b957a0 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -189,19 +189,36 @@ #define FIL_RUNOUT2_PIN MT_DET_2_PIN #endif -#ifndef POWER_LOSS_PIN - #define POWER_LOSS_PIN PA13 // PW_DET -#endif -#define PS_ON_PIN PB2 // PW_OFF - // // Enable MKSPWC support // //#define SUICIDE_PIN PB2 +//#define LED_PIN PB2 //#define KILL_PIN PA2 -//#define KILL_PIN_INVERTING true +//#define KILL_PIN_STATE HIGH -//#define LED_PIN PB2 +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + #if HAS_TFT_LVGL_UI + #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." + #endif + #ifndef PS_ON_PIN + #define PS_ON_PIN PB2 // SUICIDE + #endif + #ifndef KILL_PIN + #define KILL_PIN PA13 // PW_DET + #define KILL_PIN_STATE HIGH + #endif +#else + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_INVERTING false +#endif + +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PA13 // PW_DET +#endif // Random Info #define USB_SERIAL -1 // USB Serial @@ -222,8 +239,8 @@ // MKS TEST #if ENABLED(MKS_TEST) - #define MKS_TEST_POWER_LOSS_PIN PA13 // PW_DET - #define MKS_TEST_PS_ON_PIN PB2 // PW_OFF + #define MKS_TEST_POWER_LOSS_PIN PA13 // PW_DET + #define MKS_TEST_PS_ON_PIN PB2 // PW_OFF #endif // diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index aa65eaa799ff..2e47f98e9f93 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -195,12 +195,19 @@ // // Misc. Functions // -//#define POWER_LOSS_PIN PA2 // PW_DET //#define PS_ON_PIN PA3 // PW_OFF -//#define SUICIDE_PIN PB2 // Enable MKSPWC support -//#define KILL_PIN PA2 // Enable MKSPWC support -//#define KILL_PIN_INVERTING true // Enable MKSPWC support -//#define LED_PIN PB2 + +// +// Power Supply Control +// +#if ENABLED(PSU_CONTROL) // MKSPWC + //#define SUICIDE_PIN PB2 // LED + //#define KILL_PIN PA2 // PW_DET + //#define KILL_PIN_STATE HIGH +#else + //#define POWER_LOSS_PIN PA2 // PW_DET + //#define LED_PIN PB2 +#endif #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD From 26b1ed7c2a95d14af22ba7f78a62cff551aa34ea Mon Sep 17 00:00:00 2001 From: Marcio T Date: Sat, 7 Aug 2021 21:23:06 -0600 Subject: [PATCH 194/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20FTDI=20Eve=20Touch?= =?UTF-8?q?=20UI=20(#22530)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/extended/adjuster_widget.cpp | 2 +- .../lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp | 3 ++- .../lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp index 26be9f4e59a3..3ef71f573f7d 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp @@ -42,7 +42,7 @@ namespace FTDI { strcat_P(str, (const char*) units); } - cmd.text(VAL_POS, str); + cmd.tag(0).text(VAL_POS, str); } void draw_adjuster(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t tag, float value, progmem_str units, int8_t width, uint8_t precision, draw_mode_t what) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp index 5712ad0f0b91..830a0238fef3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp @@ -36,6 +36,7 @@ using namespace Theme; constexpr static SpinnerDialogBoxData &mydata = screen_data.SpinnerDialogBox; void SpinnerDialogBox::onEntry() { + UIScreen::onEntry(); mydata.auto_hide = true; } @@ -98,7 +99,7 @@ void SpinnerDialogBox::enqueueAndWait(progmem_str message, char *commands) { } void SpinnerDialogBox::onIdle() { - if (mydata.auto_hide && !commandsInQueue()) { + if (mydata.auto_hide && !commandsInQueue() && TERN1(HOST_KEEPALIVE_FEATURE, GcodeSuite::busy_state == GcodeSuite::NOT_BUSY)) { mydata.auto_hide = false; hide(); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h index 9ecc33e5c4b2..23e31d1a91ab 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h @@ -29,7 +29,7 @@ struct SpinnerDialogBoxData { bool auto_hide; }; -class SpinnerDialogBox : public BaseScreen { +class SpinnerDialogBox : public UIScreen { public: static void onEntry(); static void onExit(); From a63e0477da38801a4952ae2fae6c44bf35d6fc3f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 8 Aug 2021 01:24:15 -0500 Subject: [PATCH 195/323] =?UTF-8?q?=F0=9F=92=9A=20Fix=20tests=20for=20new?= =?UTF-8?q?=20sanity-checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/tests/mega2560 | 5 +++-- buildroot/tests/rambo | 1 + buildroot/tests/teensy35 | 1 + buildroot/tests/teensy41 | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index 0af551329490..723d13308114 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -16,7 +16,7 @@ set -e # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders # use_example_configs AnimationExample -opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE fr SAVED_POSITIONS 4 \ +opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE fr SAVED_POSITIONS 4 DEFAULT_EJERK 10 \ EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 5 TEMP_SENSOR_3 20 TEMP_SENSOR_4 1000 TEMP_SENSOR_BED 1 opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \ REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \ @@ -31,7 +31,7 @@ exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE ..." # Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language # use_example_configs AnimationExample -opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE jp_kana \ +opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE jp_kana DEFAULT_EJERK 10 \ EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 5 TEMP_SENSOR_3 20 TEMP_SENSOR_4 1000 TEMP_SENSOR_BED 1 opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \ LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES \ @@ -73,6 +73,7 @@ opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \ opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z \ FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" "$3" # diff --git a/buildroot/tests/rambo b/buildroot/tests/rambo index e755f81cf1e0..a563bd4ed375 100755 --- a/buildroot/tests/rambo +++ b/buildroot/tests/rambo @@ -123,6 +123,7 @@ opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \ SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT HOST_PAUSE_M76 ADVANCED_OK M114_DETAIL \ VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_USE_Z_ONLY +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Rambo | CoreXY, Gradient Mix | Endstop Int. | Home Y > X | FW Retract ..." "$3" # clean up diff --git a/buildroot/tests/teensy35 b/buildroot/tests/teensy35 index 4bfa64f1db69..09e8cee58ef3 100755 --- a/buildroot/tests/teensy35 +++ b/buildroot/tests/teensy35 @@ -67,6 +67,7 @@ exec_test $1 $2 "PARKING_EXTRUDER with LCD" "$3" restore_configs opt_set MOTHERBOARD BOARD_TEENSY35_36 MIXING_STEPPERS 2 opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1 GRADIENT_MIX GRADIENT_VTOOL REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Mixing Extruder" "$3" # diff --git a/buildroot/tests/teensy41 b/buildroot/tests/teensy41 index 017b81b3c12b..fd89512ea57b 100755 --- a/buildroot/tests/teensy41 +++ b/buildroot/tests/teensy41 @@ -70,6 +70,7 @@ exec_test $1 $2 "Ethernet, EEPROM, Magnetic Parking Extruder, No LCD" "$3" restore_configs opt_set MOTHERBOARD BOARD_TEENSY41 MIXING_STEPPERS 2 opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1 GRADIENT_MIX GRADIENT_VTOOL +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Mixing Extruder" "$3" # From 8a7673ac1e4df933cfe1a0254af03af4118e66e4 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sun, 8 Aug 2021 03:26:54 -0400 Subject: [PATCH 196/323] =?UTF-8?q?=F0=9F=8E=A8=20Spellcheck=20code=20(#22?= =?UTF-8?q?531)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h | 4 ++-- Marlin/src/HAL/DUE/usb/udd.h | 2 +- Marlin/src/HAL/STM32/tft/tft_ltdc.cpp | 4 ++-- Marlin/src/feature/binary_stream.h | 4 ++-- Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h | 2 +- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 4 ++-- Marlin/src/lcd/extui/mks_ui/wifi_module.h | 2 +- .../src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h | 2 +- Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h index d77e4f95232b..553fd3c29a88 100644 --- a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h +++ b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h @@ -74,7 +74,7 @@ #define SD_MMC_REMOVING 2 -//---- CONTROL FONCTIONS ---- +//---- CONTROL FUNCTIONS ---- //! //! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI. //!/ @@ -134,7 +134,7 @@ extern bool sd_mmc_spi_wr_protect(void); extern bool sd_mmc_spi_removal(void); -//---- ACCESS DATA FONCTIONS ---- +//---- ACCESS DATA FUNCTIONS ---- #if ACCESS_USB == true // Standard functions for open in read/write mode the device diff --git a/Marlin/src/HAL/DUE/usb/udd.h b/Marlin/src/HAL/DUE/usb/udd.h index 461d98513b04..319d8842f744 100644 --- a/Marlin/src/HAL/DUE/usb/udd.h +++ b/Marlin/src/HAL/DUE/usb/udd.h @@ -135,7 +135,7 @@ typedef void (*udd_callback_halt_cleared_t)(void); * \param n number of data transferred */ typedef void (*udd_callback_trans_t) (udd_ep_status_t status, - iram_size_t nb_transfered, udd_ep_id_t ep); + iram_size_t nb_transferred, udd_ep_id_t ep); /** * \brief Authorizes the VBUS event diff --git a/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp index 53e5bd83e027..5b0c27e412b3 100644 --- a/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp @@ -181,7 +181,7 @@ void LTDC_Config() { hltdc_F.Init.AccumulatedVBP = (LTDC_LCD_VSYNC + LTDC_LCD_VBP - 1); hltdc_F.Init.AccumulatedActiveH = (TFT_HEIGHT + LTDC_LCD_VSYNC + LTDC_LCD_VBP - 1); hltdc_F.Init.AccumulatedActiveW = (TFT_WIDTH + LTDC_LCD_HSYNC + LTDC_LCD_HBP - 1); - hltdc_F.Init.TotalHeigh = (TFT_HEIGHT + LTDC_LCD_VSYNC + LTDC_LCD_VBP + LTDC_LCD_VFP - 1); + hltdc_F.Init.TotalHeight = (TFT_HEIGHT + LTDC_LCD_VSYNC + LTDC_LCD_VBP + LTDC_LCD_VFP - 1); hltdc_F.Init.TotalWidth = (TFT_WIDTH + LTDC_LCD_HSYNC + LTDC_LCD_HBP + LTDC_LCD_HFP - 1); /* Configure R,G,B component values for LCD background color : all black background */ @@ -203,7 +203,7 @@ void LTDC_Config() { pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565; /* Start Address configuration : frame buffer is located at SDRAM memory */ - pLayerCfg.FBStartAdress = (uint32_t)(FRAME_BUFFER_ADDRESS); + pLayerCfg.FBStartAddress = (uint32_t)(FRAME_BUFFER_ADDRESS); /* Alpha constant (255 == totally opaque) */ pLayerCfg.Alpha = 255; diff --git a/Marlin/src/feature/binary_stream.h b/Marlin/src/feature/binary_stream.h index 2ad7f236a174..cef8a3c90211 100644 --- a/Marlin/src/feature/binary_stream.h +++ b/Marlin/src/feature/binary_stream.h @@ -148,9 +148,9 @@ class SDFileTransferProtocol { case FileTransfer::QUERY: SERIAL_ECHOPAIR("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); #if ENABLED(BINARY_STREAM_COMPRESSION) - SERIAL_ECHOLNPAIR(":compresion:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS); + SERIAL_ECHOLNPAIR(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS); #else - SERIAL_ECHOLNPGM(":compresion:none"); + SERIAL_ECHOLNPGM(":compression:none"); #endif break; case FileTransfer::OPEN: diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h index 49f6ea0900fe..e2786fd452cf 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h @@ -44,7 +44,7 @@ bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); void LCD_Clear(uint16_t Color); void tft_set_point(uint16_t x, uint16_t y, uint16_t point); -void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t heigh); +void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t height); void LCD_WriteRAM_Prepare(); void lcd_draw_logo(); void lv_encoder_pin_init(); diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index 1d136a407549..b53586c75672 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -225,7 +225,7 @@ static bool longName2DosName(const char *longName, char *dosName) { else if (status_bits & 0x2) { // DMA transmit complete if (esp_state == TRANSFER_IDLE) - esp_state = TRANSFERING; + esp_state = TRANSFERRING; if (storeRcvData(WIFISERIAL.usart_device->rb->buf, UART_RX_BUFFER_SIZE)) { esp_dma_pre(); @@ -1819,7 +1819,7 @@ void wifi_rcv_handle() { #ifdef __STM32F1__ if (esp_state == TRANSFER_STORE) { if (storeRcvData(WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE)) { - esp_state = TRANSFERING; + esp_state = TRANSFERRING; esp_dma_pre(); if (wifiTransError.flag != 0x1) WIFI_IO1_RESET(); } diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.h b/Marlin/src/lcd/extui/mks_ui/wifi_module.h index 709d3d17190f..d02716e43549 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.h +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.h @@ -137,7 +137,7 @@ typedef enum { typedef enum { TRANSFER_IDLE, - TRANSFERING, + TRANSFERRING, TRANSFER_STORE, } TRANSFER_STATE; extern volatile TRANSFER_STATE esp_state; diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h index 3f758e771270..f78a3bb8f0fa 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h @@ -90,7 +90,7 @@ uint8_t UHS_USB_HOST_BASE::setEpInfoEntry(uint8_t addr, uint8_t iface, uint8_t e } /** - * sets all enpoint addresses to zero. + * sets all endpoint addresses to zero. * Sets all max packet sizes to defaults * Clears all endpoint attributes * Sets bmNakPower to USB_NAK_DEFAULT diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h index 0ac90f0df3a6..eeaa4f81d9fe 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h @@ -140,7 +140,7 @@ AJK_IIF(AJK_BITAND(AJK_IS_COMPARABLE(x))(AJK_IS_COMPARABLE(y)) ) \ #define AJK_MAKE_FUNS(AJK_v, AJK_args, AJK_count, AJK_body) AJK_EVAL(AJK_REPEAT(AJK_count, AJK_FUN, AJK_v, AJK_args, AJK_body)) #ifdef AJK_TEST_MACRO_LOGIC -#define BODY(AJKindex) some(C, statement); contaning(a, test[AJKindex]); +#define BODY(AJKindex) some(C, statement); containing(a, test[AJKindex]); #define ZERO_TIMES_TEST 0 #define THREE_TIMES_TEST 3 blank > AJK_MAKE_LIST(VARIABLE_, ZERO_TIMES_TEST) < because zero repeats From 5756f8898e8868704516385bae17e65f367aa140 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 8 Aug 2021 19:45:51 +1200 Subject: [PATCH 197/323] =?UTF-8?q?=E2=9C=A8=20Zonestar=20ZM3E2,=20ZM3E4?= =?UTF-8?q?=20V1,=20ZM3E4=20V2=20(#22498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-builds.yml | 9 +- Marlin/src/core/boards.h | 3 + Marlin/src/lcd/tft_io/touch_calibration.cpp | 2 +- Marlin/src/lcd/tft_io/touch_calibration.h | 2 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 +- Marlin/src/pins/pins.h | 6 + .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h | 2 +- .../src/pins/stm32f1/pins_JGAURORA_A5S_A1.h | 17 +- .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 2 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 2 +- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 2 +- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 235 ++++++++++++ Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 355 ++++++++++++++++++ Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 328 ++++++++++++++++ Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h | 5 +- .../ldscripts/ZONESTAR_ZM3E_256K.ld | 14 + .../ldscripts/ZONESTAR_ZM3E_512K.ld | 14 + ...F103RC_fysetc => STM32F103RC_fysetc_maple} | 0 buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple | 14 + ...{jgaurora_a5s_a1 => jgaurora_a5s_a1_maple} | 0 .../{mks_robin_lite => mks_robin_lite_maple} | 0 .../{mks_robin_pro => mks_robin_pro_maple} | 0 ini/stm32f1-maple.ini | 43 +++ ini/stm32f1.ini | 40 ++ 28 files changed, 1083 insertions(+), 22 deletions(-) create mode 100644 Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h create mode 100644 Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h create mode 100644 Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h create mode 100644 buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld create mode 100644 buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld rename buildroot/tests/{STM32F103RC_fysetc => STM32F103RC_fysetc_maple} (100%) create mode 100755 buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple rename buildroot/tests/{jgaurora_a5s_a1 => jgaurora_a5s_a1_maple} (100%) rename buildroot/tests/{mks_robin_lite => mks_robin_lite_maple} (100%) rename buildroot/tests/{mks_robin_pro => mks_robin_pro_maple} (100%) diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index e45bf42f29a7..c6afaffebf7a 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -58,15 +58,16 @@ jobs: #- STM32F103RC_btt_maple - STM32F103RC_btt_USB_maple - - STM32F103RC_fysetc + - STM32F103RC_fysetc_maple - STM32F103RC_meeb - - jgaurora_a5s_a1 + - jgaurora_a5s_a1_maple - STM32F103VE_longer_maple #- mks_robin_maple - - mks_robin_lite - - mks_robin_pro + - mks_robin_lite_maple + - mks_robin_pro_maple #- mks_robin_nano35_maple #- STM32F103RET6_creality_maple + - STM32F103VE_ZM3E4V2_USB_maple # STM32 (ST) Environments diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index ba3c9f978c63..2ed585919966 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -346,6 +346,9 @@ #define BOARD_BEAST 4048 // STM32F103RET6 Libmaple-based controller #define BOARD_MINGDA_MPX_ARM_MINI 4049 // STM32F103ZET6 Mingda MD-16 #define BOARD_GTM32_PRO_VD 4050 // STM32F103VET6 controller +#define BOARD_ZONESTAR_ZM3E2 4051 // Zonestar ZM3E2 (STM32F103RCT6) +#define BOARD_ZONESTAR_ZM3E4 4052 // Zonestar ZM3E4 V1 (STM32F103VCT6) +#define BOARD_ZONESTAR_ZM3E4V2 4053 // Zonestar ZM3E4 V2 (STM32F103VCT6) // // ARM Cortex-M4F diff --git a/Marlin/src/lcd/tft_io/touch_calibration.cpp b/Marlin/src/lcd/tft_io/touch_calibration.cpp index 0f9d25caeb62..2a54d2af4005 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.cpp +++ b/Marlin/src/lcd/tft_io/touch_calibration.cpp @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * 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 diff --git a/Marlin/src/lcd/tft_io/touch_calibration.h b/Marlin/src/lcd/tft_io/touch_calibration.h index f8cbf99bf000..112fbdca301e 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.h +++ b/Marlin/src/lcd/tft_io/touch_calibration.h @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * 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 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index d648b25efb13..cecb44efbe18 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -212,7 +212,7 @@ * BEEPER | 5 6 ENT (BTN_ENC) (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) * (SKR_RX1) TX | 7 8 | RX (SKR_TX1) Reset | 7 8 | P0_19 (BTN_EN1) * NC | 9 10 | NC (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER) - * ------ ------ + * ------ ------ */ #define BEEPER_PIN EXP1_10_PIN diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index b3e16056136f..f1c431cf048b 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -561,6 +561,12 @@ #include "stm32f1/pins_BEAST.h" // STM32F103VE? env:STM32F103VE env:STM32F103RE_maple #elif MB(MINGDA_MPX_ARM_MINI) #include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1 env:mingda_mpx_arm_mini +#elif MB(ZONESTAR_ZM3E2) + #include "stm32f1/pins_ZM3E2_V1_0.h" // STM32F1 env:STM32F103RC_ZM3E2_USB env:STM32F103RC_ZM3E2_USB_maple +#elif MB(ZONESTAR_ZM3E4) + #include "stm32f1/pins_ZM3E4_V1_0.h" // STM32F1 env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple +#elif MB(ZONESTAR_ZM3E4V2) + #include "stm32f1/pins_ZM3E4_V2_0.h" // STM32F1 env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple // // ARM Cortex-M4F diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h index c51e7f48d94a..9dc02c495b45 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h @@ -23,7 +23,7 @@ #define SKR_MINI_E3_V2 -#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 +#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 // Onboard I2C EEPROM #if NO_EEPROM_SELECTED diff --git a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h index bded0edd3a7b..98465a86073e 100644 --- a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h @@ -45,14 +45,19 @@ #endif //#define MCU_STM32F103ZE // not yet required -// Enable EEPROM Emulation for this board, so that we don't overwrite factory data -//#define I2C_EEPROM // AT24C64 -//#define MARLIN_EEPROM_SIZE 0x8000UL // 64KB +// Enable EEPROM Emulation for this board, so that we don't overwrite factory data +#if NO_EEPROM_SELECTED + //#define I2C_EEPROM // AT24C64 + //#define FLASH_EEPROM_EMULATION +#endif -//#define FLASH_EEPROM_EMULATION -//#define MARLIN_EEPROM_SIZE 0x1000UL // 4KB -//#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL) +#if ENABLED(I2C_EEPROM) + //#define MARLIN_EEPROM_SIZE 0x8000UL // 32KB +#elif ENABLED(FLASH_EEPROM_EMULATION) + //#define MARLIN_EEPROM_SIZE 0x1000UL // 4KB + //#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL) +#endif // // Limit Switches diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index 14f2ad981ac5..3fed0adac336 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin mini (STM32F130VET6) board pin assignments + * MKS Robin mini (STM32F103VET6) board pin assignments */ #if NOT_TARGET(STM32F1, STM32F1xx) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index f91297805150..4d798ffe282b 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin (STM32F130ZET6) board pin assignments + * MKS Robin (STM32F103ZET6) board pin assignments * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware */ diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 7aa308f7b309..2fc99f297104 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin nano (STM32F130VET6) board pin assignments + * MKS Robin nano (STM32F103VET6) board pin assignments */ #include "env_validate.h" diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index be23394af7ab..d4a2f59b4256 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin mini (STM32F130VET6) board pin assignments + * MKS Robin mini (STM32F103VET6) board pin assignments */ #include "env_validate.h" diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 368c0a24582e..2a5c9f727372 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin nano (STM32F130VET6) board pin assignments + * MKS Robin nano (STM32F103VET6) board pin assignments * https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X/tree/master/hardware */ diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index cdb9448410d9..31ce016e67a1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin nano (STM32F130VET6) board pin assignments + * MKS Robin nano (STM32F103VET6) board pin assignments */ #if NOT_TARGET(__STM32F1__, STM32F1) diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index 1de3729dcc58..5b59a157f163 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -22,7 +22,7 @@ #pragma once /** - * ANYCUBIC Trigorilla Pro (STM32F130ZET6) board pin assignments. + * ANYCUBIC Trigorilla Pro (STM32F103ZET6) board pin assignments. * It is the same used by the Tronxy X5SA thanks to ftoz1 for sharing it * https://github.com/MarlinFirmware/Marlin/issues/14655 * https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h new file mode 100644 index 000000000000..bad5db7125e1 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -0,0 +1,235 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#define BOARD_INFO_NAME "ZONESTAR ZM3E2 V1.0" + +#define DISABLE_DEBUG +//#define DISABLE_JTAG + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION + #define EEPROM_PAGE_SIZE (0x800) // 2KB + #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB +#endif + +//============================================================================= +// Zonestar ZM3E2 V1.0 (STM32F103RCT6) board pin assignments +//============================================================================= +// PA0 PWR_HOLD | PB0 BEEP | PC0 HEATER_0 +// PA1 FAN_PIN | PB1 KILL | PC1 HEATER_BED +// PA2 TX2 | PB2 LCD_SDA | PC2 TEMP_BED +// PA3 RX2 | PB3 E1_EN | PC3 TEMP_E0 +// PA4 SD_CS | PB4 Z_STOP | PC4 SD_DETECT +// PA5 SD_SCK | PB5 Z_DIR | PC5 BTN_EN2 +// PA6 SD_MISO | PB6 Z_STEP | PC6 FAN1 +// PA7 SD_MOSI | PB7 Z_EN | PC7 FIL_RUNOUT +// PA8 X_DIR | PB8 Y_STEP | PC8 X_EN +// PA9 LCD_RS | PB9 Y_DIR | PC9 X_STEP +// PA10 LCD_SCK | PB10 BTN_ENC | PC10 Z_MIN_PROBE_PIN +// PA11 USB_D- | PB11 BTN_EN1 | PC11 FIL_RUNOUT2 +// PA12 USB_D+ | PB12 LED | PC12 E1_DIR +// PA13 MS1 | PB13 E0_EN | PC13 Y_STOP +// PA14 MS2 | PB14 E0_STEP | PC14 Y_EN +// PA15 PWM | PB15 E0_DIR | PC15 X_STOP +// PD0 NC +// PD1 NC +// PD2 E1_STEP + +//============================================================================= +// EXP1 connector +// MARK I/O ZONESTAR_12864LCD ZONESTAR_12864OLED +// 10 MOSI PB1 KILL SDA +// 9 SCK PB0 BEEP SCK +// 8 TX1 PA9 DOGLCD_CS CS +// 7 RX1 PA10 DOGLCD_SCK DC +// 6 ENA PC5 BTN_EN2 KNOB_ENB +// 5 DAT PB2 DOGLCD_MOSI RESET +// 4 TX3 PB10 BTN_ENC KNOB_ENC +// 3 RX3 PB11 BTN_EN1 KNOB_ENA +// 2 +5V +// 1 GND + +#define EXP1_03_PIN PB11 +#define EXP1_04_PIN PB10 +#define EXP1_05_PIN PB2 +#define EXP1_06_PIN PC5 +#define EXP1_07_PIN PA10 +#define EXP1_08_PIN PA9 +#define EXP1_09_PIN PB0 +#define EXP1_10_PIN PB1 + +// AUX1 connector +// 1 +5V +// 2 TX2 PA2 UART2_TX +// 3 RX2 PA3 UART2_RX +// 4 GND + +// AUX2 connector to BLTouch +// 1 +5V +// 2 SEN PC10 +// 3 PWM PA15 +// 4 GND +//============================================================================= + +// +// Servos +// +#define SERVO0_PIN PA15 + +// +// Limit Switches +// +#define X_STOP_PIN PC15 +#define Y_STOP_PIN PC13 +#define Z_STOP_PIN PB4 + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PC10 // BLTouch (3DTouch) +#endif + +// +// Filament Runout Sensor +// +#define FIL_RUNOUT_PIN PC7 // E0_SW +//#define FIL_RUNOUT2_PIN PC11 // E1_SW + +// +// Steppers +// +#define MS1_PIN PA13 +#define MS2_PIN PA14 + +#define X_STEP_PIN PC9 +#define X_DIR_PIN PA8 +#define X_ENABLE_PIN PC8 + +#define Y_STEP_PIN PB8 +#define Y_DIR_PIN PB9 +#define Y_ENABLE_PIN PC14 + +#define Z_STEP_PIN PB6 +#define Z_DIR_PIN PB5 +#define Z_ENABLE_PIN PB7 + +#define E0_STEP_PIN PB14 +#define E0_DIR_PIN PB15 +#define E0_ENABLE_PIN PB13 + +#define E1_STEP_PIN PD2 +#define E1_DIR_PIN PC12 +#define E1_ENABLE_PIN PB3 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PC0 // EXTRUDER 1 +#define HEATER_BED_PIN PC1 // BED + +#define FAN1_PIN PC6 +#define FAN_PIN PA1 + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PC2 // Analog Input +#define TEMP_0_PIN PC3 // Analog Input + +#define LED_PIN PB12 +//#define KILL_PIN PB1 // @EXP1 +#define SUICIDE_PIN PA0 + +// +// SD card +// +#define ENABLE_SPI1 +#define SD_DETECT_PIN PC4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN PA4 + +// +// LCD Pins +// +#if ENABLED(ZONESTAR_12864LCD) + + //================================================================================ + // LCD 128x64 + //================================================================================ + // EXP1 connector + // MARK I/O ZONESTAR_12864LCD + // 10 MOSI PB1 KILL + // 9 SCK PB0 BEEP + // 8 TX1 PA9 LCD_PINS_RS + // 7 RX1 PA10 LCD_PINS_D4 + // 6 ENA PC5 BTN_EN2 + // 5 DAT PB2 LCD_PINS_ENABLE + // 4 TX3 PB10 BTN_ENC + // 3 RX3 PB11 BTN_EN1 + // 2 +5V + // 1 GND + + #define LCDSCREEN_NAME "ZONESTAR LCD12864" + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_ENABLE EXP1_05_PIN + #define LCD_PINS_D4 EXP1_07_PIN + //#define KILL_PIN EXP1_10_PIN + #define BEEPER_PIN EXP1_09_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_04_PIN + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(200) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + +#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) + + //================================================================================ + // OLED 128x64 + //================================================================================ + // 10 MOSI PB1 OLED_SDA + // 9 SCK PB0 OLED_SCK + // 8 TX1 PA9 OLED_CS + // 7 RX1 PA10 OLED_DC + // 6 ENA PC5 KNOB_ENA + // 5 DAT PB2 OLED_RESET + // 4 TX3 PB10 KNOB_ENC + // 3 RX3 PB11 KNOB_ENB + + #define FORCE_SOFT_SPI + #define LCDSCREEN_NAME "ZONESTAR 12864OLED" + #define LCD_PINS_RS EXP1_05_PIN // = LCD_RESET_PIN + #define LCD_PINS_DC EXP1_07_PIN // DC + #define DOGLCD_CS EXP1_08_PIN // CS + #define DOGLCD_A0 LCD_PINS_DC // A0 = DC + #define DOGLCD_MOSI EXP1_10_PIN // SDA + #define DOGLCD_SCK EXP1_09_PIN // SCK + // Encoder + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_04_PIN + +#endif diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h new file mode 100644 index 000000000000..8a6bb4b5f87b --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -0,0 +1,355 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#define BOARD_INFO_NAME "ZONESTAR ZM3E4 V1.0" + +//#define DISABLE_DEBUG +#define DISABLE_JTAG + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION + #define EEPROM_PAGE_SIZE (0x800) // 2KB + #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB +#endif + +//#define OPTION_DUALZ_DRIVE +//#define OPTION_Z2_ENDSTOP +//#define SWITCH_EXTRUDER_SEQUENCE + +//============================================================================= +// Zonestar ZM3E4 V1.0 (STM32F103VCT6) board pin assignments +//============================================================================= +// PA0 | PB0 HEAT_1 | PC0 AXU_SDA +// PA1 | PB1 FAN1 | PC1 TEMP_E1 +// PA2 HEAT_BED | PB2 BOOT1 | PC2 TEMP_E0 +// PA3 PWR_HOLD | PB3 SPI3_SCK | PC3 TEMP_BED +// PA4 SD_CS | PB4 SPI3_MISO | PC4 SD_DETECT +// PA5 SD_SCK | PB5 SPI3_MOSI | PC5 HEAT_0 +// PA6 SD_MISO | PB6 SERVO3 | PC6 E1_STEP +// PA7 SD_MOSI | PB7 SERVO2 | PC7 E1_EN +// PA8 X_DIR | PB8 FAN2/SERVO1 | PC8 FIL_RUNOUT_PIN +// PA9 UART1_RX | PB9 SERVO0 | PC9 E0_DIR +// PA10 UART1_TX | PB10 TX3 | PC10 E0_EN +// PA11 USB_D- | PB11 RX3 | PC11 Z2_EN +// PA12 USB_D+ | PB12 LED | PC12 Z2_STEP +// PA13 SWD_SDO | PB13 Z1_MAX | PC13 X_MIN +// PA14 SWD_SCK | PB14 Y_MAX | PC14 WIFI_RST +// PA15 SPI3_CS | PB15 PWR_DET | PC15 WIFI_CS +// PD0 Z2_DIR | PE0 Y_EN +// PD1 Z2_MIN | PE1 Y_STEP +// PD2 Z1_EN | PE2 Y_DIR +// PD3 Z1_STEP | PE3 Y_MIN +// PD4 Z1_DIR | PE4 X_DIR +// PD5 WIFI_RXD | PE5 X_STEP +// PD6 WIFI_TXD | PE6 X_EN +// PD7 Z1_MIN | PE7 AXU_SCL +// PD8 X_MAX | PE8 BTN_EN1 +// PD9 E3_DIR | PE9 LCD_SCK +// PD10 E3_STEP | PE10 LCD_MOSI +// PD11 E3_EN | PE11 BEEPER +// PD12 E2_DIR | PE12 LCD_EN +// PD13 E2_STEP | PE13 KILL +// PD14 E2_EN | PE14 BTN_EN2 +// PD15 E1_DIR | PE15 BTN_ENC +//============================================================================= + +// EXP1 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 RS PE13 KILL BTN_ENC +// 9 BP PE11 BEEP BEEP +// 8 EN PE12 DOGLCD_CS LCDRS +// 7 MOSI PE10 DOGLCD_SCK LCDE +// 6 EN1 PE8 BTN_EN1 NC +// 5 SCK PE9 DOGLCD_MOSI LCD4 +// 4 ENC PE15 BTN_ENC NC +// 3 EN2 PE14 BTN_EN2 NC +// 2 +5V +5V +// 1 GND GND + +#define EXP1_03_PIN PE14 +#define EXP1_04_PIN PE15 +#define EXP1_05_PIN PE9 +#define EXP1_06_PIN PE8 +#define EXP1_07_PIN PE10 +#define EXP1_08_PIN PE12 +#define EXP1_09_PIN PE11 +#define EXP1_10_PIN PE13 + +// EXP2 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 +// 9 +// 8 RX0 PA9 UART1_RX +// 7 TX0 PA10 UART1_TX BTN_EN2 +// 6 CS3 PA15 +// 5 MISO3 PB4 BTN_EN1 +// 4 MOSI3 PB5 KILL +// 3 SCK3 PB3 +// 2 +5V +5V +// 1 GND GND + +#define EXP2_03_PIN PB3 +#define EXP2_04_PIN PB5 +#define EXP2_05_PIN PB4 +#define EXP2_06_PIN PA15 +#define EXP2_07_PIN PA10 +#define EXP2_08_PIN PA9 + +// AUX1 connector +// 1 +5V +// 2 GND +// 3 RX3 PB11 UART3_RX +// 4 TX3 PB10 UART3_TX +// 5 SCL PE7 +// 6 SDA PC0 + +// WiFi +// 1 +5V +// 2 GND +// 3 WIFI_TXD PD5 UART2_RX +// 4 WIFI_RXD PD6 UART2_TX +// 5 WIFI_RST PC14 +// 6 WIFI_CS PC15 +//============================================================================= + +// +// Servos +// +#define SERVO0_PIN PB9 +#define SERVO2_PIN PB7 +#define SERVO3_PIN PB6 + +// +// Limit Switches +// +#define X_MIN_PIN PC13 +#define X_MAX_PIN PD8 +#define Y_MIN_PIN PE3 +#define Y_MAX_PIN PB14 +#define Z_MIN_PIN PD7 +#define Z_MAX_PIN PB13 + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PC8 +#endif + +// +// Steppers +// +#if ENABLED(COREXY) + #define X_ENABLE_PIN PE0 + #define X_STEP_PIN PE1 + #define X_DIR_PIN PE2 + + #define Y_ENABLE_PIN PE6 + #define Y_STEP_PIN PE5 + #define Y_DIR_PIN PE4 +#else + #define X_ENABLE_PIN PE6 + #define X_STEP_PIN PE5 + #define X_DIR_PIN PE4 + + #define Y_ENABLE_PIN PE0 + #define Y_STEP_PIN PE1 + #define Y_DIR_PIN PE2 +#endif + +#define Z_ENABLE_PIN PD2 +#define Z_STEP_PIN PD3 +#define Z_DIR_PIN PD4 + +#ifdef OPTION_DUALZ_DRIVE + #define Z2_ENABLE_PIN PC11 + #define Z2_STEP_PIN PC12 + #define Z2_DIR_PIN PD0 +#endif + +#ifdef OPTION_Z2_ENDSTOP + #define Z2_MIN_PIN PD1 + #define Z2_MAX_PIN PB12 +#endif + +#ifdef SWITCH_EXTRUDER_SEQUENCE + #define E3_ENABLE_PIN PC10 + #define E3_STEP_PIN PA8 + #define E3_DIR_PIN PC9 + + #define E2_STEP_PIN PC6 + #define E2_DIR_PIN PD15 + #define E2_ENABLE_PIN PC7 + + #define E1_STEP_PIN PD13 + #define E1_DIR_PIN PD12 + #define E1_ENABLE_PIN PD14 + + #define E0_STEP_PIN PD10 + #define E0_DIR_PIN PD9 + #define E0_ENABLE_PIN PD11 +#else + #define E0_ENABLE_PIN PC10 + #define E0_STEP_PIN PA8 + #define E0_DIR_PIN PC9 + + #define E1_STEP_PIN PC6 + #define E1_DIR_PIN PD15 + #define E1_ENABLE_PIN PC7 + + #define E2_STEP_PIN PD13 + #define E2_DIR_PIN PD12 + #define E2_ENABLE_PIN PD14 + + #define E3_STEP_PIN PD10 + #define E3_DIR_PIN PD9 + #define E3_ENABLE_PIN PD11 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC2 // TH0 +#define TEMP_BED_PIN PC3 // TB1 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PC5 // HEATER0 +#define HEATER_BED_PIN PA2 // HOT BED + +#if ENABLED(OPTION_CHAMBER) + #define TEMP_CHAMBER_PIN PC1 + #define HEATER_CHAMBER_PIN PB0 +#else + #define TEMP_1_PIN PC1 // TH1 + #define HEATER_1_PIN PB0 // HEATER1 +#endif + +#define FAN_PIN PB1 // FAN1 +#define FAN1_PIN PB8 // FAN2 + +// +// Misc. Functions +// + +//#define POWER_LOSS_PIN PB15 +#define LED_PIN PA0 +#define SUICIDE_PIN PA3 + +// +// SD card +// +#define ENABLE_SPI1 +#define SD_DETECT_PIN PC4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN PA4 + +// WiFi Functions +#define WIFI_RST PC15 +#define WIFI_EN PC14 + +// +// LCD / Controller +// +#if ENABLED(ZONESTAR_12864LCD) + #define LCDSCREEN_NAME "ZONESTAR LCD12864" + #define LCD_PINS_RS EXP1_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP1_05_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP1_07_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN -1 // EXP1_10_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_03_PIN + #define BTN_ENC EXP1_04_PIN +#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" + #define LCD_PINS_RS EXP1_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP1_07_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP1_05_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN EXP2_04_PIN + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_07_PIN + #define BTN_ENC EXP1_10_PIN +#elif ENABLED(ZONESTAR_DWIN_LCD) + // Connect to EXP2 connector + #define LCDSCREEN_NAME "ZONESTAR DWIN LCD" + #define BEEPER_PIN EXP2_06_PIN + #define KILL_PIN PC0 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_04_PIN + #define BTN_ENC EXP2_05_PIN +#endif + +#if ENABLED(ZONESTAR_LCD2004_KNOB) + #define LCDSCREEN_NAME "LCD2004 KNOB" + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_ENABLE EXP1_07_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_03_PIN + #define LCD_PINS_D7 EXP1_04_PIN + #define BTN_EN1 EXP2_07_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_10_PIN + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN EXP2_04_PIN +#elif ENABLED(ZONESTAR_LCD2004_ADCKEY) + #define LCDSCREEN_NAME "LCD2004 5KEY" + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_ENABLE EXP1_07_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_03_PIN + #define LCD_PINS_D7 EXP1_04_PIN + #define ADC_KEYPAD_PIN PC0 // PIN6 of AUX1 +#endif + +#if HAS_MARLINUI_U8GLIB + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) +#endif + +// Remap SERVO0 PIN for BLTouch +#if ENABLED(BLTOUCH_ON_EXP1) + // BLTouch connected to EXP1 + #define BLTOUCH_PROBE_PIN EXP1_06_PIN + #define BLTOUCH_GND_PIN EXP1_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP1_03_PIN +#elif ENABLED(BLTOUCH_ON_EXP2) + // BLTouch connected to EXP2 + #define BLTOUCH_PROBE_PIN EXP2_03_PIN + #define BLTOUCH_GND_PIN EXP2_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP2_06_PIN +#else + #define BLTOUCH_PROBE_PIN PB13 +#endif diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h new file mode 100644 index 000000000000..5bbf43bbfac3 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -0,0 +1,328 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#define BOARD_INFO_NAME "ZONESTAR ZM3E4 V2.0" + +//#define DISABLE_DEBUG +#define DISABLE_JTAG + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION + #define EEPROM_PAGE_SIZE (0x800) // 2KB + #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB +#endif + +//#define OPTION_DUALZ_DRIVE +//#define OPTION_Z2_ENDSTOP +//#define OPTION_REPEAT_PRINTING +//#define SWITCH_EXTRUDER_SEQUENCE + +//============================================================================= +// Zonestar ZM3E4 V2.0 (STM32F103VET6) board pin assignments +//============================================================================= +// PA0 | PB0 HEAT_1 | PC0 AUX_SDA +// PA1 | PB1 FAN1 | PC1 TEMP_E1 +// PA2 HEAT_BED | PB2 BOOT1 | PC2 TEMP_E0 +// PA3 PWR_HOLD | PB3 SPI3_SCK | PC3 TEMP_BED +// PA4 SD_CS | PB4 SPI3_MISO | PC4 SD_DETECT +// PA5 SD_SCK | PB5 SPI3_MOSI | PC5 HEAT_0 +// PA6 SD_MISO | PB6 SERVO3 | PC6 E1_STEP +// PA7 SD_MOSI | PB7 SERVO2 | PC7 E1_EN +// PA8 X_DIR | PB8 FAN2/SERVO1 | PC8 FIL_RUNOUT_PIN +// PA9 UART1_RX | PB9 SERVO0 | PC9 E0_DIR +// PA10 UART1_TX | PB10 TX3 | PC10 E0_EN +// PA11 USB_D- | PB11 RX3 | PC11 Z2_EN +// PA12 USB_D+ | PB12 LED | PC12 Z2_STEP +// PA13 SWD_SDO | PB13 Z1_MAX | PC13 X_MIN +// PA14 SWD_SCK | PB14 Y_MAX | PC14 WIFI_RST +// PA15 SPI3_CS | PB15 PWR_DET | PC15 WIFI_CS +// PD0 Z2_DIR | PE0 Y_EN +// PD1 Z2_MIN | PE1 Y_STEP +// PD2 Z1_EN | PE2 Y_DIR +// PD3 Z1_STEP | PE3 Y_MIN +// PD4 Z1_DIR | PE4 X_DIR +// PD5 WIFI_RXD | PE5 X_STEP +// PD6 WIFI_TXD | PE6 X_EN +// PD7 Z1_MIN | PE7 AUX_SCL +// PD8 X_MAX | PE8 BTN_EN1 +// PD9 E3_DIR | PE9 LCD_SCK +// PD10 E3_STEP | PE10 LCD_MOSI +// PD11 E3_EN | PE11 BEEPER +// PD12 E2_DIR | PE12 LCD_EN +// PD13 E2_STEP | PE13 KILL +// PD14 E2_EN | PE14 BTN_EN2 +// PD15 E1_DIR | PE15 BTN_ENC + +//============================================================================= +// EXP1 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 RS PE13 KILL BTN_ENC +// 9 BP PE11 BEEP BEEP +// 8 EN PE12 DOGLCD_CS LCDRS +// 7 MOSI PE10 DOGLCD_SCK LCDE +// 6 EN1 PE8 BTN_EN1 NC +// 5 SCK PE9 DOGLCD_MOSI LCD4 +// 4 ENC PE15 BTN_ENC NC +// 3 EN2 PE14 BTN_EN2 NC +// 2 +5V +// 1 GND + +#define EXP1_03_PIN PE14 +#define EXP1_04_PIN PE15 +#define EXP1_05_PIN PE9 +#define EXP1_06_PIN PE8 +#define EXP1_07_PIN PE10 +#define EXP1_08_PIN PE12 +#define EXP1_09_PIN PE11 +#define EXP1_10_PIN PE13 + +// EXP2 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 SDA PC0 +// 9 SCL PE7 +// 8 RX1 PA9 UART1_RX +// 7 TX1 PA10 UART1_TX BTN_EN2 +// 6 CS3 PA15 +// 5 MISO3 PB4 BTN_EN1 +// 4 MOSI3 PB5 KILL +// 3 SCK3 PB3 +// 2 +5V +// 1 GND + +#define EXP2_03_PIN PB3 +#define EXP2_04_PIN PB5 +#define EXP2_05_PIN PB4 +#define EXP2_06_PIN PA15 +#define EXP2_07_PIN PA10 +#define EXP2_08_PIN PA9 +#define EXP2_09_PIN PE7 +#define EXP2_10_PIN PC0 + +// AUX1 connector +// 1 +5V +// 2 GND +// 3 RX3 PB11 UART3_RX +// 4 TX3 PB10 UART3_TX +// 5 SCL PE7 +// 6 SDA PC0 + +// WiFi +// 1 +5V +// 2 GND +// 3 WIFI_TXD PD5 UART2_RX +// 4 WIFI_RXD PD6 UART2_TX +// 5 WIFI_RST PC14 +// 6 WIFI_CS PC15 +//============================================================================= + +// +// Servos +// +#define SERVO0_PIN PB9 +//#define SERVO1_PIN PB8 +#define SERVO2_PIN PB7 +#define SERVO3_PIN PB6 + +// +// Limit Switches +// +#define X_MIN_PIN PC13 +#define Y_MIN_PIN PE3 +#define Z_MIN_PIN PD7 +#define X_MAX_PIN PD8 +#define Y_MAX_PIN PB14 +#define Z_MAX_PIN PB13 + +#ifdef OPTION_Z2_ENDSTOP + #define Z2_MIN_PIN PD1 + #define Z2_MAX_PIN PB12 +#endif + +// +// Steppers +// +#if ENABLED(COREXY) + #define X_ENABLE_PIN PE0 + #define X_STEP_PIN PE1 + #define X_DIR_PIN PE2 + + #define Y_ENABLE_PIN PE6 + #define Y_STEP_PIN PE5 + #define Y_DIR_PIN PE4 +#else + #define X_ENABLE_PIN PE6 + #define X_STEP_PIN PE5 + #define X_DIR_PIN PE4 + + #define Y_ENABLE_PIN PE0 + #define Y_STEP_PIN PE1 + #define Y_DIR_PIN PE2 +#endif + +#define Z_ENABLE_PIN PD2 +#define Z_STEP_PIN PD3 +#define Z_DIR_PIN PD4 + +#ifdef OPTION_DUALZ_DRIVE + #define Z2_ENABLE_PIN PC11 + #define Z2_STEP_PIN PC12 + #define Z2_DIR_PIN PD0 +#endif + +#ifdef OPTION_REPEAT_PRINTING + #define REPRINT_STOP_PIN PD8 // X_MAX_PIN + #define FORWARD_PIN PA13 + #define BACK_PIN PA14 +#endif + +#ifdef SWITCH_EXTRUDER_SEQUENCE + #define E3_ENABLE_PIN PC10 + #define E3_STEP_PIN PA8 + #define E3_DIR_PIN PC9 + + #define E2_STEP_PIN PC6 + #define E2_DIR_PIN PD15 + #define E2_ENABLE_PIN PC7 + + #define E1_STEP_PIN PD13 + #define E1_DIR_PIN PD12 + #define E1_ENABLE_PIN PD14 + + #define E0_STEP_PIN PD10 + #define E0_DIR_PIN PD9 + #define E0_ENABLE_PIN PD11 +#else + #define E0_ENABLE_PIN PC10 + #define E0_STEP_PIN PA8 + #define E0_DIR_PIN PC9 + + #define E1_STEP_PIN PC6 + #define E1_DIR_PIN PD15 + #define E1_ENABLE_PIN PC7 + + #define E2_STEP_PIN PD13 + #define E2_DIR_PIN PD12 + #define E2_ENABLE_PIN PD14 + + #define E3_STEP_PIN PD10 + #define E3_DIR_PIN PD9 + #define E3_ENABLE_PIN PD11 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC2 // TH0 +//#define TEMP_1_PIN PC1 // TH1 +#define TEMP_BED_PIN PC3 // TB1 + +// +// Heaters +// +#define HEATER_0_PIN PC5 // HEATER0 +//#define HEATER_1_PIN PB0 // HEATER1 +#define HEATER_BED_PIN PA2 // HOT BED + +// +// Fans +// +#define FAN_PIN PB1 // FAN1 +#define FAN1_PIN PB8 // FAN2 + +// +// Misc. Functions +// +//#define POWER_LOSS_PIN PB15 +#define LED_PIN PA0 +#define SUICIDE_PIN PA3 +#define FIL_RUNOUT_PIN PC8 + +// +// SD card +// +#define ENABLE_SPI1 +#define SD_DETECT_PIN PC4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN PA4 + +// WiFi Functions +#define WIFI_RST PC15 +#define WIFI_EN PC14 + +#if ENABLED(ZONESTAR_12864LCD) + #define LCDSCREEN_NAME "ZONESTAR LCD12864" + #define LCD_PINS_RS EXP1_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP1_05_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP1_07_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN -1 // EXP1_10_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_03_PIN + #define BTN_ENC EXP1_04_PIN +#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" + #define LCD_PINS_RS EXP2_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP2_05_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP2_07_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP2_10_PIN + #define KILL_PIN EXP2_09_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP2_04_PIN +#elif ENABLED(ZONESTAR_DWIN_LCD) + // Connect to EXP2 connector + #define LCDSCREEN_NAME "ZONESTAR DWIN LCD" + #define BEEPER_PIN EXP2_06_PIN // PE11 + #define KILL_PIN -1 // EXP1_10_PIN + #define BTN_EN2 EXP2_04_PIN // PE8 + #define BTN_EN1 EXP2_03_PIN // PE14 + #define BTN_ENC EXP2_05_PIN // PE15 +#endif + +#if HAS_MARLINUI_U8GLIB + #define BOARD_ST7920_DELAY_1 DELAY_NS(200) // Tclk_fall <200ns + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) // Tdata_width >200ns + #define BOARD_ST7920_DELAY_3 DELAY_NS(200) // Tclk_rise <200ns +#endif + +// Remap SERVO0 PIN for BLTouch +#if ENABLED(BLTOUCH_ON_EXP1) + // BLTouch connected to EXP1 + #define BLTOUCH_PROBE_PIN EXP1_06_PIN + #define BLTOUCH_GND_PIN EXP1_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP1_03_PIN +#elif ENABLED(BLTOUCH_ON_EXP2) + // BLTouch connected to EXP2 + #define BLTOUCH_PROBE_PIN EXP2_03_PIN + #define BLTOUCH_GND_PIN EXP2_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP2_06_PIN +#else + #define BLTOUCH_PROBE_PIN PB13 // Z1_MAX +#endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h index c4349d182bf9..d85bbf7bed95 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h @@ -223,13 +223,16 @@ #define BTN_ENC PH8 #endif +// +// SD card +// #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif #define SOFTWARE_SPI #define SDSS PA15 -#define SS_PIN SDSS +#define SD_SS_PIN SDSS #define SD_SCK_PIN PC10 #define SD_MISO_PIN PC11 #define SD_MOSI_PIN PC12 diff --git a/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld new file mode 100644 index 000000000000..2404e7cac9bc --- /dev/null +++ b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld @@ -0,0 +1,14 @@ +MEMORY +{ + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40 + rom (rx) : ORIGIN = 0x08005000, LENGTH = 256K - 20K - 4K +} + +/* Provide memory region aliases for common.inc */ +REGION_ALIAS("REGION_TEXT", rom); +REGION_ALIAS("REGION_DATA", ram); +REGION_ALIAS("REGION_BSS", ram); +REGION_ALIAS("REGION_RODATA", rom); + +/* Let common.inc handle the real work. */ +INCLUDE common.inc diff --git a/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld new file mode 100644 index 000000000000..821c8ebbfe38 --- /dev/null +++ b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld @@ -0,0 +1,14 @@ +MEMORY +{ + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40 + rom (rx) : ORIGIN = 0x08005000, LENGTH = 512K - 20K - 4K +} + +/* Provide memory region aliases for common.inc */ +REGION_ALIAS("REGION_TEXT", rom); +REGION_ALIAS("REGION_DATA", ram); +REGION_ALIAS("REGION_BSS", ram); +REGION_ALIAS("REGION_RODATA", rom); + +/* Let common.inc handle the real work. */ +INCLUDE common.inc diff --git a/buildroot/tests/STM32F103RC_fysetc b/buildroot/tests/STM32F103RC_fysetc_maple similarity index 100% rename from buildroot/tests/STM32F103RC_fysetc rename to buildroot/tests/STM32F103RC_fysetc_maple diff --git a/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple b/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple new file mode 100755 index 000000000000..8cbb84fb807d --- /dev/null +++ b/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103VE_ZM3E4V2_USB +# + +# exit on first failure +set -e + +restore_configs +opt_set MOTHERBOARD BOARD_ZONESTAR_ZM3E4V2 SERIAL_PORT 1 +exec_test $1 $2 "Zonestar ZM3E4 V2.0" "$3" + +# cleanup +restore_configs diff --git a/buildroot/tests/jgaurora_a5s_a1 b/buildroot/tests/jgaurora_a5s_a1_maple similarity index 100% rename from buildroot/tests/jgaurora_a5s_a1 rename to buildroot/tests/jgaurora_a5s_a1_maple diff --git a/buildroot/tests/mks_robin_lite b/buildroot/tests/mks_robin_lite_maple similarity index 100% rename from buildroot/tests/mks_robin_lite rename to buildroot/tests/mks_robin_lite_maple diff --git a/buildroot/tests/mks_robin_pro b/buildroot/tests/mks_robin_pro_maple similarity index 100% rename from buildroot/tests/mks_robin_pro rename to buildroot/tests/mks_robin_pro_maple diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index 0258fb3b7cc7..c184dc247c4a 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -357,3 +357,46 @@ extra_scripts = ${common_stm32f1.extra_scripts} buildroot/share/PlatformIO/scripts/custom_board.py build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 + +# +# Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0 +# +# STM32F103RC_ZM3E2_USB_maple ........... RCT6 with 256K +# STM32F103VC_ZM3E4_USB_maple ........... VCT6 with 256K +# STM32F103VE_ZM3E4V2_USB_maple ......... VET6 with 512K +# +[ZONESTAR_ZM3E_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +platform_packages = tool-stm32duino +board_build.address = 0x08005000 +board_build.offset = 0x5000 +board_upload.maximum_size = 237568 +extra_scripts = ${common.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py + buildroot/share/PlatformIO/scripts/offset_and_rename.py +build_flags = ${common_stm32f1.build_flags} + -D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB +lib_deps = USBComposite for STM32F1@0.91 +lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper + +[env:STM32F103RC_ZM3E2_USB_maple] +platform = ${ZONESTAR_ZM3E_maple.platform} +extends = ZONESTAR_ZM3E_maple +board = genericSTM32F103RC +board_build.ldscript = ZONESTAR_ZM3E_256K.ld + +[env:STM32F103VC_ZM3E4_USB_maple] +platform = ${ZONESTAR_ZM3E_maple.platform} +extends = ZONESTAR_ZM3E_maple +board = genericSTM32F103VC +board_build.ldscript = ZONESTAR_ZM3E_256K.ld +build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2 + +[env:STM32F103VE_ZM3E4V2_USB_maple] +platform = ${ZONESTAR_ZM3E_maple.platform} +extends = ZONESTAR_ZM3E_maple +board = genericSTM32F103VE +board_build.ldscript = ZONESTAR_ZM3E_512K.ld +build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2 +board_upload.maximum_size = 499712 diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index 1185e8f84d8a..d03898a12ee1 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -374,3 +374,43 @@ extra_scripts = ${stm32_variant.extra_scripts} platform = ${common_stm32.platform} extends = env:chitu_f103 build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX + +# +# Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0 +# +# STM32F103RC_ZM3E2_USB ........... RCT6 with 256K +# STM32F103VC_ZM3E4_USB ........... VCT6 with 256K +# STM32F103VE_ZM3E4V2_USB ......... VET6 with 512K +# +[ZONESTAR_ZM3E] +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board_upload.offset_address = 0x08005000 +board_build.offset = 0x5000 +board_upload.maximum_size = 237568 +extra_scripts = ${stm32_variant.extra_scripts} +build_flags = ${common_stm32.build_flags} + -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC +build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC + +[env:STM32F103RC_ZM3E2_USB] +platform = ${ZONESTAR_ZM3E.platform} +extends = ZONESTAR_ZM3E +board = genericSTM32F103RC +board_build.variant = MARLIN_F103Rx + +[env:STM32F103VC_ZM3E4_USB] +platform = ${ZONESTAR_ZM3E.platform} +extends = ZONESTAR_ZM3E +board = genericSTM32F103VC +board_build.variant = MARLIN_F103Vx +build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=1 + +[env:STM32F103VE_ZM3E4V2_USB] +platform = ${ZONESTAR_ZM3E.platform} +extends = ZONESTAR_ZM3E +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=1 +board_upload.maximum_size = 499712 From 47281012d9c7940206b8c7587c35b05c1288733d Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 9 Aug 2021 00:59:01 +0000 Subject: [PATCH 198/323] [cron] Bump distribution date (2021-08-09) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c34cb52361b5..4020a3ae4ca1 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-08" +//#define STRING_DISTRIBUTION_DATE "2021-08-09" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index ad1dff604c0a..e869278c761b 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-08" + #define STRING_DISTRIBUTION_DATE "2021-08-09" #endif /** From 331cc5fd6a044e568dbe789ecd0b732b6eba454f Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Sun, 8 Aug 2021 19:25:17 -0700 Subject: [PATCH 199/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20some=20Simulator?= =?UTF-8?q?=20on=20Windows=20issues=20(#22516)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/NATIVE_SIM/pinsDebug.h | 10 +- .../NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp | 2 +- .../src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp | 4 +- .../shared/cpu_exception/exception_arm.cpp | 4 +- Marlin/src/core/serial.cpp | 11 -- Marlin/src/core/serial.h | 27 ++--- Marlin/src/core/serial_base.h | 114 ++++++++++-------- Marlin/src/feature/tmc_util.cpp | 2 +- Marlin/src/feature/tmc_util.h | 2 +- ini/native.ini | 4 +- 10 files changed, 94 insertions(+), 86 deletions(-) diff --git a/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h index 2aeeb52e92d7..7ba14574d0c7 100644 --- a/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h +++ b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h @@ -21,6 +21,8 @@ * Support routines for X86_64 */ +#pragma once + /** * Translation of routines & variables used by pinsDebug.h */ @@ -37,16 +39,16 @@ #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin // active ADC function/mode/code values for PINSEL registers -constexpr int8_t ADC_pin_mode(pin_t pin) { +inline constexpr int8_t ADC_pin_mode(pin_t pin) { return (-1); } -int8_t get_pin_mode(pin_t pin) { +inline int8_t get_pin_mode(pin_t pin) { if (!VALID_PIN(pin)) return -1; return 0; } -bool GET_PINMODE(pin_t pin) { +inline bool GET_PINMODE(pin_t pin) { int8_t pin_mode = get_pin_mode(pin); if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // found an invalid pin or active analog pin return false; @@ -54,6 +56,6 @@ bool GET_PINMODE(pin_t pin) { return (Gpio::getMode(pin) != 0); //input/output state } -bool GET_ARRAY_IS_DIGITAL(pin_t pin) { +inline bool GET_ARRAY_IS_DIGITAL(pin_t pin) { return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin)); } diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp index e95c6ebfbd03..c77c3d30f09a 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp @@ -59,7 +59,7 @@ #if ENABLED(U8GLIB_ST7920) -#include +#include #include "../../shared/Delay.h" #undef SPI_SPEED diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp index 8e0ac9c7df35..085954803cf2 100644 --- a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp @@ -63,7 +63,7 @@ #define SPI_SPEED 2 // About 2 MHz #include -#include +#include #ifdef __cplusplus extern "C" { @@ -209,7 +209,7 @@ uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_pt #endif #elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB - #include + #include uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;} #endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920 #endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp index 9a1b4caf8d8c..0f0f7c480727 100644 --- a/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp +++ b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp @@ -322,7 +322,7 @@ void hook_cpu_exceptions() { unsigned long *vecAddr = (unsigned long*)get_vtor(); SERIAL_ECHOPGM("Vector table addr: "); - SERIAL_PRINTLN(get_vtor(), HEX); + SERIAL_PRINTLN(get_vtor(), PrintBase::Hex); #ifdef VECTOR_TABLE_SIZE uint32_t vec_size = VECTOR_TABLE_SIZE; @@ -349,7 +349,7 @@ void hook_cpu_exceptions() { alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL]; SERIAL_ECHOPGM("Detected vector table size: "); - SERIAL_PRINTLN(vec_size, HEX); + SERIAL_PRINTLN(vec_size, PrintBase::Hex); #endif uint32_t defaultFaultHandler = vecAddr[(unsigned)7]; diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp index 2e3a39b66a72..50cc50ad574a 100644 --- a/Marlin/src/core/serial.cpp +++ b/Marlin/src/core/serial.cpp @@ -76,17 +76,6 @@ void serialprintPGM(PGM_P str) { void serial_echo_start() { static PGMSTR(echomagic, "echo:"); serialprintPGM(echomagic); } void serial_error_start() { static PGMSTR(errormagic, "Error:"); serialprintPGM(errormagic); } -void serial_echopair_PGM(PGM_P const s_P, serial_char_t v) { serialprintPGM(s_P); SERIAL_CHAR(v.c); } -void serial_echopair_PGM(PGM_P const s_P, const char *v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, char v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, int v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, float v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } -void serial_echopair_PGM(PGM_P const s_P, double v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } -void serial_echopair_PGM(PGM_P const s_P, unsigned char v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, unsigned int v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } - void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); } void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post/*=nullptr*/) { diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index 7f96a30d6f71..dfcf23ddb60f 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -177,8 +177,8 @@ void SERIAL_ECHOLN(T x) { SERIAL_IMPL.println(x); } template void SERIAL_PRINT(T x, U y) { SERIAL_IMPL.print(x, y); } -template -void SERIAL_PRINTLN(T x, U y) { SERIAL_IMPL.println(x, y); } +template +void SERIAL_PRINTLN(T x, PrintBase y) { SERIAL_IMPL.println(x, y); } // Flush the serial port inline void SERIAL_FLUSH() { SERIAL_IMPL.flush(); } @@ -293,21 +293,18 @@ void serialprintPGM(PGM_P str); // // Functions for serial printing from PROGMEM. (Saves loads of SRAM.) // -void serial_echopair_PGM(PGM_P const s_P, serial_char_t v); -void serial_echopair_PGM(PGM_P const s_P, const char *v); -void serial_echopair_PGM(PGM_P const s_P, char v); -void serial_echopair_PGM(PGM_P const s_P, int v); -void serial_echopair_PGM(PGM_P const s_P, long v); -void serial_echopair_PGM(PGM_P const s_P, float v); -void serial_echopair_PGM(PGM_P const s_P, double v); -void serial_echopair_PGM(PGM_P const s_P, unsigned char v); -void serial_echopair_PGM(PGM_P const s_P, unsigned int v); -void serial_echopair_PGM(PGM_P const s_P, unsigned long v); +inline void serial_echopair_PGM(PGM_P const s_P, serial_char_t v) { serialprintPGM(s_P); SERIAL_CHAR(v.c); } + +inline void serial_echopair_PGM(PGM_P const s_P, float v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } +inline void serial_echopair_PGM(PGM_P const s_P, double v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } +inline void serial_echopair_PGM(PGM_P const s_P, const char *v) { serialprintPGM(s_P); SERIAL_ECHO(v); } + +// Default implementation for types without a specialization. Handles integers. +template +void serial_echopair_PGM(PGM_P const s_P, T v) { serialprintPGM(s_P); SERIAL_ECHO(v); } + inline void serial_echopair_PGM(PGM_P const s_P, bool v) { serial_echopair_PGM(s_P, (int)v); } inline void serial_echopair_PGM(PGM_P const s_P, void *v) { serial_echopair_PGM(s_P, (uintptr_t)v); } -#if __INTPTR_WIDTH__ != __SIZE_WIDTH__ - inline void serial_echopair_PGM(PGM_P const s_P, size_t v) { serial_echopair_PGM(s_P, (long int)v); } -#endif void serial_echo_start(); void serial_error_start(); diff --git a/Marlin/src/core/serial_base.h b/Marlin/src/core/serial_base.h index d8090eb83ad9..a5abd67d8727 100644 --- a/Marlin/src/core/serial_base.h +++ b/Marlin/src/core/serial_base.h @@ -74,12 +74,12 @@ CALL_IF_EXISTS_IMPL(SerialFeature, features, SerialFeature::None); // for any type other than double/float. For double/float, a conversion exists so the call will be invisible. struct EnsureDouble { double a; - FORCE_INLINE operator double() { return a; } + operator double() { return a; } // If the compiler breaks on ambiguity here, it's likely because print(X, base) is called with X not a double/float, and // a base that's not a PrintBase value. This code is made to detect the error. You MUST set a base explicitly like this: // SERIAL_PRINT(v, PrintBase::Hex) - FORCE_INLINE EnsureDouble(double a) : a(a) {} - FORCE_INLINE EnsureDouble(float a) : a(a) {} + EnsureDouble(double a) : a(a) {} + EnsureDouble(float a) : a(a) {} }; // Using Curiously-Recurring Template Pattern here to avoid virtual table cost when compiling. @@ -136,70 +136,90 @@ struct SerialBase { void flushTX() { CALL_IF_EXISTS(void, SerialChild, flushTX); } // Glue code here - FORCE_INLINE void write(const char *str) { while (*str) write(*str++); } - FORCE_INLINE void write(const uint8_t *buffer, size_t size) { while (size--) write(*buffer++); } - FORCE_INLINE void print(const char *str) { write(str); } + void write(const char *str) { while (*str) write(*str++); } + void write(const uint8_t *buffer, size_t size) { while (size--) write(*buffer++); } + void print(char *str) { write(str); } + void print(const char *str) { write(str); } // No default argument to avoid ambiguity - NO_INLINE void print(char c, PrintBase base) { printNumber((signed long)c, (uint8_t)base); } - NO_INLINE void print(unsigned char c, PrintBase base) { printNumber((unsigned long)c, (uint8_t)base); } - NO_INLINE void print(int c, PrintBase base) { printNumber((signed long)c, (uint8_t)base); } - NO_INLINE void print(unsigned int c, PrintBase base) { printNumber((unsigned long)c, (uint8_t)base); } - void print(unsigned long c, PrintBase base) { printNumber((unsigned long)c, (uint8_t)base); } - void print(long c, PrintBase base) { printNumber((signed long)c, (uint8_t)base); } - void print(EnsureDouble c, int digits) { printFloat(c, digits); } + + // Define print for every fundamental integer type, to ensure that all redirect properly + // to the correct underlying implementation. + + // Prints are performed with a single size, to avoid needing multiple print functions. + // The fixed integer size used for prints will be the larger of long or a pointer. + #if __LONG_WIDTH__ >= __INTPTR_WIDTH__ + typedef long int_fixed_print_t; + typedef unsigned long uint_fixed_print_t; + #else + typedef intptr_t int_fixed_print_t; + typedef uintptr_t uint_fixed_print_t; + + FORCE_INLINE void print(intptr_t c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(uintptr_t c, PrintBase base) { printNumber_unsigned(c, base); } + #endif + + FORCE_INLINE void print(char c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(short c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(int c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(long c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(unsigned char c, PrintBase base) { printNumber_unsigned(c, base); } + FORCE_INLINE void print(unsigned short c, PrintBase base) { printNumber_unsigned(c, base); } + FORCE_INLINE void print(unsigned int c, PrintBase base) { printNumber_unsigned(c, base); } + FORCE_INLINE void print(unsigned long c, PrintBase base) { printNumber_unsigned(c, base); } + + + void print(EnsureDouble c, int digits) { printFloat(c, digits); } // Forward the call to the former's method - FORCE_INLINE void print(char c) { print(c, PrintBase::Dec); } - FORCE_INLINE void print(unsigned char c) { print(c, PrintBase::Dec); } - FORCE_INLINE void print(int c) { print(c, PrintBase::Dec); } - FORCE_INLINE void print(unsigned int c) { print(c, PrintBase::Dec); } - FORCE_INLINE void print(unsigned long c) { print(c, PrintBase::Dec); } - FORCE_INLINE void print(long c) { print(c, PrintBase::Dec); } - FORCE_INLINE void print(double c) { print(c, 2); } - - FORCE_INLINE void println(const char s[]) { print(s); println(); } - FORCE_INLINE void println(char c, PrintBase base) { print(c, base); println(); } - FORCE_INLINE void println(unsigned char c, PrintBase base) { print(c, base); println(); } - FORCE_INLINE void println(int c, PrintBase base) { print(c, base); println(); } - FORCE_INLINE void println(unsigned int c, PrintBase base) { print(c, base); println(); } - FORCE_INLINE void println(long c, PrintBase base) { print(c, base); println(); } - FORCE_INLINE void println(unsigned long c, PrintBase base) { print(c, base); println(); } - FORCE_INLINE void println(double c, int digits) { print(c, digits); println(); } - FORCE_INLINE void println() { write('\r'); write('\n'); } + + // Default implementation for anything without a specialization + // This handles integers since they are the most common + template + void print(T c) { print(c, PrintBase::Dec); } + + void print(float c) { print(c, 2); } + void print(double c) { print(c, 2); } + + void println(char *s) { print(s); println(); } + void println(const char *s) { print(s); println(); } + void println(float c, int digits) { print(c, digits); println(); } + void println(double c, int digits) { print(c, digits); println(); } + void println() { write('\r'); write('\n'); } + + // Default implementations for types without a specialization. Handles integers. + template + void println(T c, PrintBase base) { print(c, base); println(); } + + template + void println(T c) { println(c, PrintBase::Dec); } // Forward the call to the former's method - FORCE_INLINE void println(char c) { println(c, PrintBase::Dec); } - FORCE_INLINE void println(unsigned char c) { println(c, PrintBase::Dec); } - FORCE_INLINE void println(int c) { println(c, PrintBase::Dec); } - FORCE_INLINE void println(unsigned int c) { println(c, PrintBase::Dec); } - FORCE_INLINE void println(unsigned long c) { println(c, PrintBase::Dec); } - FORCE_INLINE void println(long c) { println(c, PrintBase::Dec); } - FORCE_INLINE void println(double c) { println(c, 2); } + void println(float c) { println(c, 2); } + void println(double c) { println(c, 2); } // Print a number with the given base - NO_INLINE void printNumber(unsigned long n, const uint8_t base) { - if (!base) return; // Hopefully, this should raise visible bug immediately - + NO_INLINE void printNumber_unsigned(uint_fixed_print_t n, PrintBase base) { if (n) { unsigned char buf[8 * sizeof(long)]; // Enough space for base 2 int8_t i = 0; while (n) { - buf[i++] = n % base; - n /= base; + buf[i++] = n % (uint_fixed_print_t)base; + n /= (uint_fixed_print_t)base; } while (i--) write((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10))); } else write('0'); } - void printNumber(signed long n, const uint8_t base) { - if (base == 10 && n < 0) { + + NO_INLINE void printNumber_signed(int_fixed_print_t n, PrintBase base) { + if (base == PrintBase::Dec && n < 0) { n = -n; // This works because all platforms Marlin's builds on are using 2-complement encoding for negative number // On such CPU, changing the sign of a number is done by inverting the bits and adding one, so if n = 0x80000000 = -2147483648 then // -n = 0x7FFFFFFF + 1 => 0x80000000 = 2147483648 (if interpreted as unsigned) or -2147483648 if interpreted as signed. // On non 2-complement CPU, there would be no possible representation for 2147483648. write('-'); } - printNumber((unsigned long)n , base); + printNumber_unsigned((uint_fixed_print_t)n , base); } // Print a decimal number @@ -218,7 +238,7 @@ struct SerialBase { // Extract the integer part of the number and print it unsigned long int_part = (unsigned long)number; double remainder = number - (double)int_part; - printNumber(int_part, 10); + printNumber_unsigned(int_part, PrintBase::Dec); // Print the decimal point, but only if there are digits beyond if (digits) { @@ -227,7 +247,7 @@ struct SerialBase { while (digits--) { remainder *= 10.0; unsigned long toPrint = (unsigned long)remainder; - printNumber(toPrint, 10); + printNumber_unsigned(toPrint, PrintBase::Dec); remainder -= toPrint; } } diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index 48b26cc101de..99cfd996c843 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -208,7 +208,7 @@ #if ENABLED(STOP_ON_ERROR) void report_driver_error(const TMC_driver_data &data) { SERIAL_ECHOPGM(" driver error detected: 0x"); - SERIAL_PRINTLN(data.drv_status, HEX); + SERIAL_PRINTLN(data.drv_status, PrintBase::Hex); if (data.is_ot) SERIAL_ECHOLNPGM("overtemperature"); if (data.is_s2g) SERIAL_ECHOLNPGM("coil short circuit"); TERN_(TMC_DEBUG, tmc_report_all()); diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index c878d86faedd..87780486ebaa 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -330,7 +330,7 @@ void tmc_print_current(TMC &st) { void tmc_print_sgt(TMC &st) { st.printLabel(); SERIAL_ECHOPGM(" homing sensitivity: "); - SERIAL_PRINTLN(st.homing_threshold(), DEC); + SERIAL_PRINTLN(st.homing_threshold(), PrintBase::Dec); } #endif diff --git a/ini/native.ini b/ini/native.ini index b40ea836da8d..548e791f5a02 100644 --- a/ini/native.ini +++ b/ini/native.ini @@ -120,11 +120,11 @@ build_unflags = ${simulator_macos.build_unflags} # Simulator for Windows 10 # # MSYS2 mingw-w64-x86_64 with these packages: -# pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-glm mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_net +# pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-glm mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-dlfcn # [env:simulator_windows] platform = ${simulator_common.platform} extends = simulator_common src_build_flags = ${simulator_common.src_build_flags} -fpermissive -build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp +build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp build_type = debug From 76c10b3e02aa5a699ee68a36663337de60fea4e8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 8 Aug 2021 21:31:10 -0500 Subject: [PATCH 200/323] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Define=20HAL=5F?= =?UTF-8?q?STM32=20for=20HAL/STM32=20(#22537)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/HAL.cpp | 6 ++++-- Marlin/src/HAL/STM32/HAL_MinSerial.cpp | 6 ++++-- Marlin/src/HAL/STM32/HAL_SPI.cpp | 6 ++++-- Marlin/src/HAL/STM32/MarlinSPI.cpp | 4 ++-- Marlin/src/HAL/STM32/MarlinSerial.cpp | 6 ++++-- Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp | 6 ++++-- Marlin/src/HAL/STM32/Servo.cpp | 6 ++++-- Marlin/src/HAL/STM32/eeprom_flash.cpp | 6 ++++-- Marlin/src/HAL/STM32/eeprom_sdcard.cpp | 6 ++++-- Marlin/src/HAL/STM32/eeprom_sram.cpp | 6 ++++-- Marlin/src/HAL/STM32/eeprom_wired.cpp | 6 ++++-- Marlin/src/HAL/STM32/fast_pwm.cpp | 6 ++++-- Marlin/src/HAL/STM32/fastio.cpp | 6 ++++-- Marlin/src/HAL/STM32/msc_sd.cpp | 6 ++++-- Marlin/src/HAL/STM32/tft/gt911.cpp | 6 ++++-- Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 6 ++++-- Marlin/src/HAL/STM32/tft/tft_ltdc.cpp | 6 ++++-- Marlin/src/HAL/STM32/tft/tft_spi.cpp | 6 ++++-- Marlin/src/HAL/STM32/tft/xpt2046.cpp | 6 ++++-- Marlin/src/HAL/STM32/timers.cpp | 6 ++++-- Marlin/src/HAL/STM32/usb_host.cpp | 5 +++-- Marlin/src/HAL/STM32/usb_serial.cpp | 6 ++++-- Marlin/src/HAL/STM32/watchdog.cpp | 6 ++++-- Marlin/src/HAL/platforms.h | 3 +++ .../src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h | 2 +- Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp | 6 ++++-- ini/features.ini | 2 +- ini/stm32-common.ini | 2 +- ini/stm32f0.ini | 2 +- ini/stm32f1-maple.ini | 2 +- ini/stm32f1.ini | 2 +- ini/stm32f4.ini | 2 +- ini/stm32f7.ini | 2 +- ini/stm32h7.ini | 2 +- 34 files changed, 105 insertions(+), 57 deletions(-) diff --git a/Marlin/src/HAL/STM32/HAL.cpp b/Marlin/src/HAL/STM32/HAL.cpp index d8035a979ded..9e7922e3a403 100644 --- a/Marlin/src/HAL/STM32/HAL.cpp +++ b/Marlin/src/HAL/STM32/HAL.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "HAL.h" #include "usb_serial.h" @@ -165,4 +167,4 @@ void HAL_SYSTICK_Callback() { if (systick_user_callback) systick_user_callback(); } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/HAL_MinSerial.cpp b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp index c780a50c57fc..29826a890de4 100644 --- a/Marlin/src/HAL/STM32/HAL_MinSerial.cpp +++ b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -149,4 +151,4 @@ extern "C" { #endif #endif // POSTMORTEM_DEBUGGING -#endif // ARDUINO_ARCH_STM32 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/HAL_SPI.cpp b/Marlin/src/HAL/STM32/HAL_SPI.cpp index ba8e6bef197e..85a5238b54af 100644 --- a/Marlin/src/HAL/STM32/HAL_SPI.cpp +++ b/Marlin/src/HAL/STM32/HAL_SPI.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -224,4 +226,4 @@ static SPISettings spiConfig; #endif // SOFTWARE_SPI -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/MarlinSPI.cpp b/Marlin/src/HAL/STM32/MarlinSPI.cpp index 41081dfb80ca..330c8956978d 100644 --- a/Marlin/src/HAL/STM32/MarlinSPI.cpp +++ b/Marlin/src/HAL/STM32/MarlinSPI.cpp @@ -19,7 +19,7 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) && !defined(STM32H7xx) +#if defined(HAL_STM32) && !defined(STM32H7xx) #include "MarlinSPI.h" @@ -165,4 +165,4 @@ uint8_t MarlinSPI::dmaSend(const void * transmitBuf, uint16_t length, bool minc) return 1; } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 && !STM32H7xx +#endif // HAL_STM32 && !STM32H7xx diff --git a/Marlin/src/HAL/STM32/MarlinSerial.cpp b/Marlin/src/HAL/STM32/MarlinSerial.cpp index d990d2f428a1..3caedc72eb26 100644 --- a/Marlin/src/HAL/STM32/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32/MarlinSerial.cpp @@ -16,7 +16,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" #include "MarlinSerial.h" @@ -101,4 +103,4 @@ void MarlinSerial::_rx_complete_irq(serial_t *obj) { } } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp index 55e807f94ee0..914969f10cd2 100644 --- a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp +++ b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -320,4 +322,4 @@ extern "C" void SDIO_IRQHandler(void) { HAL_SD_IRQHandler(&hsd); } extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); } #endif // SDIO_SUPPORT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/Servo.cpp b/Marlin/src/HAL/STM32/Servo.cpp index 54b1fbe670c4..a00186e0e79e 100644 --- a/Marlin/src/HAL/STM32/Servo.cpp +++ b/Marlin/src/HAL/STM32/Servo.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -107,4 +109,4 @@ void libServo::setInterruptPriority(uint32_t preemptPriority, uint32_t subPriori } #endif // HAS_SERVOS -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index c3efec6062f0..e785e5924988 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -272,4 +274,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // FLASH_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp index 9cab90f10909..77563b2ae502 100644 --- a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 /** * Implementation of EEPROM settings in SD Card @@ -88,4 +90,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uin } #endif // SDCARD_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_sram.cpp b/Marlin/src/HAL/STM32/eeprom_sram.cpp index c39178523472..687e7f55c226 100644 --- a/Marlin/src/HAL/STM32/eeprom_sram.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sram.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -65,4 +67,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // SRAM_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_wired.cpp b/Marlin/src/HAL/STM32/eeprom_wired.cpp index 3346abbe4ac3..cf0468151e5e 100644 --- a/Marlin/src/HAL/STM32/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32/eeprom_wired.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -75,4 +77,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // USE_WIRED_EEPROM -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/fast_pwm.cpp b/Marlin/src/HAL/STM32/fast_pwm.cpp index eaffb8cfa40f..a8fcbe5f82b3 100644 --- a/Marlin/src/HAL/STM32/fast_pwm.cpp +++ b/Marlin/src/HAL/STM32/fast_pwm.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -56,4 +58,4 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255 } #endif // NEEDS_HARDWARE_PWM -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/fastio.cpp b/Marlin/src/HAL/STM32/fastio.cpp index 5056e99d35f0..9e6a2fb658c3 100644 --- a/Marlin/src/HAL/STM32/fastio.cpp +++ b/Marlin/src/HAL/STM32/fastio.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -31,4 +33,4 @@ void FastIO_init() { FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i])); } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/msc_sd.cpp b/Marlin/src/HAL/STM32/msc_sd.cpp index f95f75c5fcf6..4f85af0d446a 100644 --- a/Marlin/src/HAL/STM32/msc_sd.cpp +++ b/Marlin/src/HAL/STM32/msc_sd.cpp @@ -13,7 +13,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -125,4 +127,4 @@ void MSC_SD_init() { } #endif // HAS_SD_HOST_DRIVE -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/gt911.cpp b/Marlin/src/HAL/STM32/tft/gt911.cpp index 8c59a60f92d5..92e14edb2057 100644 --- a/Marlin/src/HAL/STM32/tft/gt911.cpp +++ b/Marlin/src/HAL/STM32/tft/gt911.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" @@ -199,4 +201,4 @@ bool GT911::getPoint(int16_t *x, int16_t *y) { } #endif // TFT_TOUCH_DEVICE_GT911 -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index f349eacac31c..e9e712d5a362 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" @@ -178,4 +180,4 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou } #endif // HAS_FSMC_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp index 5b0c27e412b3..0549dbf10845 100644 --- a/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" @@ -384,4 +386,4 @@ void TFT_LTDC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou } #endif // HAS_LTDC_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/tft_spi.cpp b/Marlin/src/HAL/STM32/tft/tft_spi.cpp index 4e3f894a52e0..29a309f40e7b 100644 --- a/Marlin/src/HAL/STM32/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_spi.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" @@ -240,4 +242,4 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun } #endif // HAS_SPI_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/xpt2046.cpp b/Marlin/src/HAL/STM32/tft/xpt2046.cpp index d50c24d1777d..912e6c2db761 100644 --- a/Marlin/src/HAL/STM32/tft/xpt2046.cpp +++ b/Marlin/src/HAL/STM32/tft/xpt2046.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" @@ -167,4 +169,4 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) { } #endif // HAS_TFT_XPT2046 -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/timers.cpp b/Marlin/src/HAL/STM32/timers.cpp index 78061981803d..9b69323ef543 100644 --- a/Marlin/src/HAL/STM32/timers.cpp +++ b/Marlin/src/HAL/STM32/timers.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -319,4 +321,4 @@ static constexpr bool verify_no_timer_conflicts() { // when hovering over it, making it easy to identify the conflicting timers. static_assert(verify_no_timer_conflicts(), "One or more timer conflict detected. Examine \"timers_in_use\" to help identify conflict."); -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/usb_host.cpp b/Marlin/src/HAL/STM32/usb_host.cpp index e45ab560e662..d2d1d69a1a8d 100644 --- a/Marlin/src/HAL/STM32/usb_host.cpp +++ b/Marlin/src/HAL/STM32/usb_host.cpp @@ -19,8 +19,9 @@ * along with this program. If not, see . * */ +#include "../platforms.h" -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -114,4 +115,4 @@ uint8_t BulkStorage::Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t b } #endif // USE_OTG_USB_HOST && USBHOST -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/usb_serial.cpp b/Marlin/src/HAL/STM32/usb_serial.cpp index 0e23175fc060..959ca4ff4319 100644 --- a/Marlin/src/HAL/STM32/usb_serial.cpp +++ b/Marlin/src/HAL/STM32/usb_serial.cpp @@ -16,7 +16,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -51,4 +53,4 @@ void USB_Hook_init() { } #endif // EMERGENCY_PARSER && USBD_USE_CDC -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/watchdog.cpp b/Marlin/src/HAL/STM32/watchdog.cpp index 09b403e7f237..72c74a2e3b5b 100644 --- a/Marlin/src/HAL/STM32/watchdog.cpp +++ b/Marlin/src/HAL/STM32/watchdog.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -46,4 +48,4 @@ void HAL_watchdog_refresh() { } #endif // USE_WATCHDOG -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/platforms.h b/Marlin/src/HAL/platforms.h index 0b1b305f6dc4..28fe28e1094f 100644 --- a/Marlin/src/HAL/platforms.h +++ b/Marlin/src/HAL/platforms.h @@ -38,6 +38,9 @@ #elif defined(__STM32F1__) || defined(TARGET_STM32F1) #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32F1/NAME) #elif defined(ARDUINO_ARCH_STM32) + #ifndef HAL_STM32 + #define HAL_STM32 + #endif #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32/NAME) #elif defined(ARDUINO_ARCH_ESP32) #define HAL_PATH(PATH, NAME) XSTR(PATH/ESP32/NAME) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h index 339b337e5533..b4438a92b976 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h @@ -288,7 +288,7 @@ // Remove compiler warning on an unused variable #ifndef UNUSED - #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) + #ifdef HAL_STM32 #define UNUSED(X) (void)X #else #define UNUSED(x) ((void)(x)) diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp index 37fd2a81dc46..6607e7531f0e 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) +#include "../../../HAL/platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfigPre.h" @@ -349,4 +351,4 @@ int WifiSerial::write(uint8_t c) { } #endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE -#endif // !__STM32F1__ +#endif // HAL_STM32 diff --git a/ini/features.ini b/ini/features.ini index 250540797df9..e5b0fb3f66ec 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -31,7 +31,7 @@ LIB_INTERNAL_MAX31865 = src_filter=+ NEOPIXEL_LED = adafruit/Adafruit NeoPixel@~1.8.0 src_filter=+ I2C_AMMETER = peterus/INA226Lib@1.1.2 -USES_LIQUIDCRYSTAL = fmalpartida/LiquidCrystal@1.5.0 +USES_LIQUIDCRYSTAL = LiquidCrystal=https://github.com/MarlinFirmware/New-LiquidCrystal/archive/1.5.1.zip USES_LIQUIDCRYSTAL_I2C = marcoschwartz/LiquidCrystal_I2C@1.1.4 USES_LIQUIDTWI2 = LiquidTWI2@1.2.7 HAS_WIRED_LCD = src_filter=+ diff --git a/ini/stm32-common.ini b/ini/stm32-common.ini index 08b0f70b4d66..1d3f858bf8e9 100644 --- a/ini/stm32-common.ini +++ b/ini/stm32-common.ini @@ -13,7 +13,7 @@ platform = ststm32@~12.1 board_build.core = stm32 build_flags = ${common.build_flags} - -std=gnu++14 + -std=gnu++14 -DHAL_STM32 -DUSBCON -DUSBD_USE_CDC -DTIM_IRQ_PRIO=13 -DADC_RESOLUTION=12 diff --git a/ini/stm32f0.ini b/ini/stm32f0.ini index 6aebd8829852..4559f115bd8e 100644 --- a/ini/stm32f0.ini +++ b/ini/stm32f0.ini @@ -10,7 +10,7 @@ # Naming Example: STM32F070CBT6 # # F : Foundation -# 0 : Cortex M0 core +# 0 : Cortex M0 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) # 70 : Line/Features # C : 48 pins (R:64 or 66, F:20) # B : 128KB Flash-memory (C:256KB, D:384KB, E:512KB, G:1024KB) diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini index c184dc247c4a..00ba93aa6359 100644 --- a/ini/stm32f1-maple.ini +++ b/ini/stm32f1-maple.ini @@ -10,7 +10,7 @@ # Naming Example: STM32F103RCT6 # # F : Foundation (sometimes High Performance F2/F4) -# 1 : Cortex M1 core +# 1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) # 03 : Line/Features # R : 64 or 66 pins (V:100, Z:144, I:176) # C : 256KB Flash-memory (D:384KB, E:512KB, G:1024KB) diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index d03898a12ee1..f1cb078fd81c 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -10,7 +10,7 @@ # Naming Example: STM32F103RCT6 # # F : Foundation (sometimes High Performance F2/F4) -# 1 : Cortex M3 core +# 1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) # 03 : Line/Features # R : 64 or 66 pins (T:36, C:48, V:100, Z:144, I:176) # C : 256KB Flash-memory (B: 128KB, D:384KB, E:512KB, G:1024KB) diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index b32efb83a908..62ac89d9faca 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -10,7 +10,7 @@ # Naming Example: STM32F401RGT6 # # F : Foundation (sometimes High Performance F2/F4) -# 4 : Cortex M4 core +# 4 : Cortex M4 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) # 01 : Line/Features # R : 64 or 66 pins (T:36, C:48 or 49, M:81, V:100, Z:144, I:176) # G : 1024KB Flash-memory (B:128KB, C:256KB, D:384KB, E:512KB) diff --git a/ini/stm32f7.ini b/ini/stm32f7.ini index 984b25162ed6..200740589b1a 100644 --- a/ini/stm32f7.ini +++ b/ini/stm32f7.ini @@ -10,7 +10,7 @@ # Naming Example: STM32F767ZIT6 # # F : Foundation (sometimes High Performance F2/F4) -# 7 : Cortex M7 core +# 7 : Cortex M7 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) # 67 : Line/Features # Z : 144 pins # I : 4096KB Flash-memory diff --git a/ini/stm32h7.ini b/ini/stm32h7.ini index 3d0753a235a6..fb39d4cc6b73 100644 --- a/ini/stm32h7.ini +++ b/ini/stm32h7.ini @@ -10,7 +10,7 @@ # Naming Example: STM32H743IIT6 # # H : High Performance -# 7 : Cortex M7 core +# 7 : Cortex M7 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) # 43 : Line/Features # I : 176 pins # I : 2048KB Flash-memory From ae846c2cb2cdd9c57d62253dfddcf6dba15ab14a Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Mon, 9 Aug 2021 04:37:27 +0200 Subject: [PATCH 201/323] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20Init=20FastIO?= =?UTF-8?q?=20before=20anything=20else=20(#22508)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/HAL.cpp | 2 -- Marlin/src/HAL/STM32/fastio.cpp | 2 +- Marlin/src/HAL/STM32/fastio.h | 1 + Marlin/src/HAL/STM32F1/pinsDebug.h | 6 +++--- Marlin/src/MarlinCore.cpp | 4 ++++ Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 9 +-------- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Marlin/src/HAL/STM32/HAL.cpp b/Marlin/src/HAL/STM32/HAL.cpp index 9e7922e3a403..a04a24c1123c 100644 --- a/Marlin/src/HAL/STM32/HAL.cpp +++ b/Marlin/src/HAL/STM32/HAL.cpp @@ -63,8 +63,6 @@ TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial()); // HAL initialization task void HAL_init() { - FastIO_init(); - // Ensure F_CPU is a constant expression. // If the compiler breaks here, it means that delay code that should compute at compile time will not work. // So better safe than sorry here. diff --git a/Marlin/src/HAL/STM32/fastio.cpp b/Marlin/src/HAL/STM32/fastio.cpp index 9e6a2fb658c3..b34555b8c841 100644 --- a/Marlin/src/HAL/STM32/fastio.cpp +++ b/Marlin/src/HAL/STM32/fastio.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" -GPIO_TypeDef* FastIOPortMap[LastPort + 1]; +GPIO_TypeDef* FastIOPortMap[LastPort + 1] = { 0 }; void FastIO_init() { LOOP_L_N(i, NUM_DIGITAL_PINS) diff --git a/Marlin/src/HAL/STM32/fastio.h b/Marlin/src/HAL/STM32/fastio.h index 17751c44dd8d..4a489544716f 100644 --- a/Marlin/src/HAL/STM32/fastio.h +++ b/Marlin/src/HAL/STM32/fastio.h @@ -38,6 +38,7 @@ extern GPIO_TypeDef * FastIOPortMap[]; // ------------------------ void FastIO_init(); // Must be called before using fast io macros +#define FASTIO_INIT() FastIO_init() // ------------------------ // Defines diff --git a/Marlin/src/HAL/STM32F1/pinsDebug.h b/Marlin/src/HAL/STM32F1/pinsDebug.h index 8e7a3d8135fd..b018a0fc8c0a 100644 --- a/Marlin/src/HAL/STM32F1/pinsDebug.h +++ b/Marlin/src/HAL/STM32F1/pinsDebug.h @@ -19,15 +19,15 @@ #pragma once /** - * Support routines for STM32GENERIC (Maple) + * Support routines for MAPLE_STM32F1 */ /** * Translation of routines & variables used by pinsDebug.h */ -#ifndef BOARD_NR_GPIO_PINS // Only in STM32GENERIC (Maple) - #error "Expected BOARD_NR_GPIO_PINS not found" +#ifndef BOARD_NR_GPIO_PINS // Only in MAPLE_STM32F1 + #error "Expected BOARD_NR_GPIO_PINS not found" #endif #include "fastio.h" diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 6134699aa101..e8f9f16a8f9a 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1131,6 +1131,10 @@ inline void tmc_standby_setup() { * - Set Marlin to RUNNING State */ void setup() { + #ifdef FASTIO_INIT + FASTIO_INIT(); + #endif + #ifdef BOARD_PREINIT BOARD_PREINIT(); // Low-level init (before serial init) #endif diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index bdf215fa8e4a..f9ec42b68efe 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -99,19 +99,12 @@ // Avoid nozzle heat and fan start before serial init #define BOARD_OPENDRAIN_MOSFETS -#define BOARD_INIT_OD_PINS() { \ +#define BOARD_PREINIT() { \ OUT_WRITE_OD(HEATER_0_PIN, 0); \ OUT_WRITE_OD(HEATER_BED_PIN, 0); \ OUT_WRITE_OD(FAN_PIN, 0); \ } -#ifdef MAPLE_STM32F1 - // Only Maple Framework allow that early - #define BOARD_PREINIT BOARD_INIT_OD_PINS -#else - #define BOARD_INIT BOARD_INIT_OD_PINS -#endif - // // PWM for a servo probe // Other servo devices are not supported on this board! From cc109c1802193ac2830791e8dbce269a1edb4a3b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 9 Aug 2021 16:07:15 -0500 Subject: [PATCH 202/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20CoreXY=20plus=20ex?= =?UTF-8?q?tra=20axes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #22490 --- Marlin/src/inc/SanityCheck.h | 18 ++++++++++++++++++ Marlin/src/module/planner.cpp | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index da51f5ca9eb1..94f1f010c5bc 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1383,6 +1383,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #if LINEAR_AXES >= 4 #if AXIS4_NAME != 'A' && AXIS4_NAME != 'B' && AXIS4_NAME != 'C' && AXIS4_NAME != 'U' && AXIS4_NAME != 'V' && AXIS4_NAME != 'W' #error "AXIS4_NAME can only be one of 'A', 'B', 'C', 'U', 'V', or 'W'." + #elif !defined(I_MIN_POS) || !defined(I_MAX_POS) + #error "I_MIN_POS and I_MAX_POS are required with LINEAR_AXES >= 4." + #elif !defined(I_HOME_DIR) + #error "I_HOME_DIR is required with LINEAR_AXES >= 4." + #elif HAS_I_ENABLE && !defined(I_ENABLE_ON) + #error "I_ENABLE_ON is required for your I driver with LINEAR_AXES >= 4." #endif #endif #if LINEAR_AXES >= 5 @@ -1390,6 +1396,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "AXIS5_NAME must be different from AXIS4_NAME and AXIS6_NAME" #elif AXIS5_NAME != 'A' && AXIS5_NAME != 'B' && AXIS5_NAME != 'C' && AXIS5_NAME != 'U' && AXIS5_NAME != 'V' && AXIS5_NAME != 'W' #error "AXIS5_NAME can only be one of 'A', 'B', 'C', 'U', 'V', or 'W'." + #elif !defined(J_MIN_POS) || !defined(J_MAX_POS) + #error "J_MIN_POS and J_MAX_POS are required with LINEAR_AXES >= 5." + #elif !defined(J_HOME_DIR) + #error "J_HOME_DIR is required with LINEAR_AXES >= 5." + #elif HAS_J_ENABLE && !defined(J_ENABLE_ON) + #error "J_ENABLE_ON is required for your J driver with LINEAR_AXES >= 5." #endif #endif #if LINEAR_AXES >= 6 @@ -1397,6 +1409,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "AXIS6_NAME must be different from AXIS5_NAME and AXIS4_NAME." #elif AXIS6_NAME != 'A' && AXIS6_NAME != 'B' && AXIS6_NAME != 'C' && AXIS6_NAME != 'U' && AXIS6_NAME != 'V' && AXIS6_NAME != 'W' #error "AXIS6_NAME can only be one of 'A', 'B', 'C', 'U', 'V', or 'W'." + #elif !defined(K_MIN_POS) || !defined(K_MAX_POS) + #error "K_MIN_POS and K_MAX_POS are required with LINEAR_AXES >= 6." + #elif !defined(K_HOME_DIR) + #error "K_HOME_DIR is required with LINEAR_AXES >= 6." + #elif HAS_K_ENABLE && !defined(K_ENABLE_ON) + #error "K_ENABLE_ON is required for your K driver with LINEAR_AXES >= 6." #endif #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 52ca76308cc2..7bf672a85d60 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1877,6 +1877,15 @@ bool Planner::_populate_block(block_t * const block, bool split_move, " A:", target.a, " (", da, " steps)" " B:", target.b, " (", db, " steps)" " C:", target.c, " (", dc, " steps)" + #if LINEAR_AXES >= 4 + " " AXIS4_STR ":", target.i, " (", di, " steps)" + #endif + #if LINEAR_AXES >= 5 + " " AXIS5_STR ":", target.j, " (", dj, " steps)" + #endif + #if LINEAR_AXES >= 6 + " " AXIS6_STR ":", target.k, " (", dk, " steps)" + #endif #if HAS_EXTRUDERS " E:", target.e, " (", de, " steps)" #endif @@ -1953,6 +1962,19 @@ bool Planner::_populate_block(block_t * const block, bool split_move, if (dk < 0) SBI(dm, K_AXIS) ); #endif + + #if IS_CORE + #if LINEAR_AXES >= 4 + if (di < 0) SBI(dm, I_AXIS); + #endif + #if LINEAR_AXES >= 5 + if (dj < 0) SBI(dm, J_AXIS); + #endif + #if LINEAR_AXES >= 6 + if (dk < 0) SBI(dm, K_AXIS); + #endif + #endif + #if HAS_EXTRUDERS if (de < 0) SBI(dm, E_AXIS); #endif @@ -2004,7 +2026,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, */ struct DistanceMM : abce_float_t { #if EITHER(IS_CORE, MARKFORGED_XY) - xyz_pos_t head; + struct { float x, y, z; } head; #endif } steps_dist_mm; #if IS_CORE @@ -2027,6 +2049,15 @@ bool Planner::_populate_block(block_t * const block, bool split_move, steps_dist_mm.b = (db + dc) * steps_to_mm[B_AXIS]; steps_dist_mm.c = CORESIGN(db - dc) * steps_to_mm[C_AXIS]; #endif + #if LINEAR_AXES >= 4 + steps_dist_mm.i = di * steps_to_mm[I_AXIS]; + #endif + #if LINEAR_AXES >= 5 + steps_dist_mm.j = dj * steps_to_mm[J_AXIS]; + #endif + #if LINEAR_AXES >= 6 + steps_dist_mm.k = dk * steps_to_mm[K_AXIS]; + #endif #elif ENABLED(MARKFORGED_XY) steps_dist_mm.head.x = da * steps_to_mm[A_AXIS]; steps_dist_mm.head.y = db * steps_to_mm[B_AXIS]; From 1ed59fef9305fe1784dfe3d180a56ed4e0d0f6d9 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 10 Aug 2021 01:01:05 +0000 Subject: [PATCH 203/323] [cron] Bump distribution date (2021-08-10) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 4020a3ae4ca1..11b2688647a2 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-09" +//#define STRING_DISTRIBUTION_DATE "2021-08-10" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index e869278c761b..31122f7ec33f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-09" + #define STRING_DISTRIBUTION_DATE "2021-08-10" #endif /** From 13e4e24e21514f5d55322af0ff2b6337be0775f9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 10 Aug 2021 02:39:50 -0500 Subject: [PATCH 204/323] =?UTF-8?q?=F0=9F=90=9B=20Use=20delete=20[]=20for?= =?UTF-8?q?=20new=20[]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/sd/cardreader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index d7aca6cdc795..c0bc81a3ef3c 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -1219,7 +1219,7 @@ void CardReader::cdroot() { #if ENABLED(SDSORT_USES_RAM) && DISABLED(SDSORT_CACHE_NAMES) #if ENABLED(SDSORT_DYNAMIC_RAM) for (uint16_t i = 0; i < fileCnt; ++i) free(sortnames[i]); - TERN_(HAS_FOLDER_SORTING, free(isDir)); + TERN_(HAS_FOLDER_SORTING, delete [] isDir); #endif #endif } @@ -1245,14 +1245,14 @@ void CardReader::cdroot() { void CardReader::flush_presort() { if (sort_count > 0) { #if ENABLED(SDSORT_DYNAMIC_RAM) - delete sort_order; + delete [] sort_order; #if ENABLED(SDSORT_CACHE_NAMES) LOOP_L_N(i, sort_count) { free(sortshort[i]); // strdup free(sortnames[i]); // strdup } - delete sortshort; - delete sortnames; + delete [] sortshort; + delete [] sortnames; #endif #endif sort_count = 0; From 25d5d2ab507075f282787c6e5c9d57f1a3972e1e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 10 Aug 2021 02:53:28 -0500 Subject: [PATCH 205/323] =?UTF-8?q?=F0=9F=9A=B8=20Set=20M122=20interval=20?= =?UTF-8?q?only=20with=20S0=20or=20Pn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/trinamic/M122.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Marlin/src/gcode/feature/trinamic/M122.cpp b/Marlin/src/gcode/feature/trinamic/M122.cpp index 52a6920f0512..fdab54877433 100644 --- a/Marlin/src/gcode/feature/trinamic/M122.cpp +++ b/Marlin/src/gcode/feature/trinamic/M122.cpp @@ -43,10 +43,13 @@ void GcodeSuite::M122() { #if ENABLED(TMC_DEBUG) #if ENABLED(MONITOR_DRIVER_STATUS) - uint16_t interval = MONITOR_DRIVER_STATUS_INTERVAL_MS; - if (parser.seen('S') && !parser.value_bool()) interval = 0; - if (parser.seenval('P')) NOMORE(interval, parser.value_ushort()); - tmc_set_report_interval(interval); + const bool sflag = parser.seen_test('S'), sval = sflag && parser.value_bool(); + if (sflag && !sval) + tmc_set_report_interval(0); + else if (parser.seenval('P')) + tmc_set_report_interval(_MAX(250, parser.value_ushort())); + else if (sval) + tmc_set_report_interval(MONITOR_DRIVER_STATUS_INTERVAL_MS); #endif if (parser.seen_test('V')) From cad142ab1be311f568ce69a5faaf3706d2f2f244 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 11 Aug 2021 00:59:26 +0000 Subject: [PATCH 206/323] [cron] Bump distribution date (2021-08-11) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 11b2688647a2..64eaee30848c 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-10" +//#define STRING_DISTRIBUTION_DATE "2021-08-11" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 31122f7ec33f..6a07a4c04970 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-10" + #define STRING_DISTRIBUTION_DATE "2021-08-11" #endif /** From c657fe2112fcd0dec1fb7012819b19a538fa8f21 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 12 Aug 2021 00:58:28 +0200 Subject: [PATCH 207/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20M575=20port=20inde?= =?UTF-8?q?x=20output=20(#22553)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/config/M575.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Marlin/src/gcode/config/M575.cpp b/Marlin/src/gcode/config/M575.cpp index ce5f8fda0e2b..7739510cf3cf 100644 --- a/Marlin/src/gcode/config/M575.cpp +++ b/Marlin/src/gcode/config/M575.cpp @@ -52,19 +52,25 @@ void GcodeSuite::M575() { case 2400: case 9600: case 19200: case 38400: case 57600: case 115200: case 250000: case 500000: case 1000000: { const int8_t port = parser.intval('P', -99); - const bool set0 = (port == -99 || port == 0); - if (set0) SERIAL_ECHO_MSG(" Serial ", '0', " baud rate set to ", baud); + const bool set1 = (port == -99 || port == 0); + if (set1) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('0'), " baud rate set to ", baud); #if HAS_MULTI_SERIAL - const bool set1 = (port == -99 || port == 1); - if (set1) SERIAL_ECHO_MSG(" Serial ", '1', " baud rate set to ", baud); + const bool set2 = (port == -99 || port == 1); + if (set2) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('1'), " baud rate set to ", baud); + #ifdef SERIAL_PORT_3 + const bool set3 = (port == -99 || port == 2); + if (set3) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('2'), " baud rate set to ", baud); + #endif #endif SERIAL_FLUSH(); - if (set0) { MYSERIAL1.end(); MYSERIAL1.begin(baud); } - + if (set1) { MYSERIAL1.end(); MYSERIAL1.begin(baud); } #if HAS_MULTI_SERIAL - if (set1) { MYSERIAL2.end(); MYSERIAL2.begin(baud); } + if (set2) { MYSERIAL2.end(); MYSERIAL2.begin(baud); } + #ifdef SERIAL_PORT_3 + if (set3) { MYSERIAL3.end(); MYSERIAL3.begin(baud); } + #endif #endif } break; From 5c610b2c18fdbf84f9707ef3a81553c2e130befc Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu, 12 Aug 2021 11:06:09 +1200 Subject: [PATCH 208/323] =?UTF-8?q?=F0=9F=9A=B8=20Better=20error=20for=20M?= =?UTF-8?q?OTHERBOARD=20not=20defined=20(#22551)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/pins.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index f1c431cf048b..28c7ed007170 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -769,8 +769,10 @@ #error "BOARD_RAMPS_LONGER3D_LK4PRO is now BOARD_LONGER3D_LKx_PRO. Please update your configuration." #elif MB(BTT_SKR_V2_0) #error "BTT_SKR_V2_0 is now BTT_SKR_V2_0_REV_A or BTT_SKR_V2_0_REV_B. See https://bit.ly/3t5d9JQ for more information. Please update your configuration." + #elif defined(MOTHERBOARD) + #error "Unknown MOTHERBOARD value set in Configuration.h." #else - #error "Unknown MOTHERBOARD value set in Configuration.h" + #error "MOTHERBOARD not defined! Use '#define MOTHERBOARD BOARD_...' in Configuration.h." #endif #undef BOARD_MKS_13 From bf9cd90cc4e70f9cebd129376580c4c6ffa5dff2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 10 Aug 2021 23:49:56 -0500 Subject: [PATCH 209/323] =?UTF-8?q?=F0=9F=8E=A8=20Tweak=20M73=20condition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/lcd/M73.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/lcd/M73.cpp b/Marlin/src/gcode/lcd/M73.cpp index e94a2825f7b8..8996e5c88ecb 100644 --- a/Marlin/src/gcode/lcd/M73.cpp +++ b/Marlin/src/gcode/lcd/M73.cpp @@ -40,7 +40,7 @@ void GcodeSuite::M73() { ? parser.value_float() * (PROGRESS_SCALE) : parser.value_byte() ); - #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) + #if ENABLED(USE_M73_REMAINING_TIME) if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong()); #endif } From 4d3cb95bd8fbe325254d3885b5c648b6ca5dfa19 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 11 Aug 2021 18:19:55 -0500 Subject: [PATCH 210/323] =?UTF-8?q?=F0=9F=94=A8=20Use=20zip=20link=20for?= =?UTF-8?q?=20MarlinSimUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/native.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ini/native.ini b/ini/native.ini index 548e791f5a02..2f38e715edfe 100644 --- a/ini/native.ini +++ b/ini/native.ini @@ -45,7 +45,7 @@ lib_compat_mode = off src_filter = ${common.default_src_filter} + lib_deps = ${common.lib_deps} - MarlinSimUI=https://github.com/p3p/MarlinSimUI.git + MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/master.zip Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/master.zip extra_scripts = ${common.extra_scripts} From 534da44e1f824543c22f81d8f65ba9b86dd9aa98 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 12 Aug 2021 00:57:35 +0000 Subject: [PATCH 211/323] [cron] Bump distribution date (2021-08-12) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 64eaee30848c..c8d8b3b3fb68 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-11" +//#define STRING_DISTRIBUTION_DATE "2021-08-12" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 6a07a4c04970..6a1dd60ee180 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-11" + #define STRING_DISTRIBUTION_DATE "2021-08-12" #endif /** From 59324a411f022cbe6757f15924120ad1976e850b Mon Sep 17 00:00:00 2001 From: Miguel Risco-Castillo Date: Wed, 11 Aug 2021 21:00:47 -0500 Subject: [PATCH 212/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Ender-3=20v2=20lan?= =?UTF-8?q?guage=20init=20(#22550)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/lcd/e3v2/creality/dwin.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index e8f9f16a8f9a..3a1ac6fd045c 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1591,7 +1591,7 @@ void setup() { #if ENABLED(DWIN_CREALITY_LCD) Encoder_Configuration(); HMI_Init(); - DWIN_JPG_CacheTo1(Language_English); + HMI_SetLanguageCache(); HMI_StartFrame(true); DWIN_StatusChanged_P(GET_TEXT(WELCOME_MSG)); #endif diff --git a/Marlin/src/lcd/e3v2/creality/dwin.h b/Marlin/src/lcd/e3v2/creality/dwin.h index 36948678aade..2808fea99ce1 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.h +++ b/Marlin/src/lcd/e3v2/creality/dwin.h @@ -215,6 +215,7 @@ void HMI_MaxFeedspeedXYZE(); void HMI_MaxAccelerationXYZE(); void HMI_MaxJerkXYZE(); void HMI_StepXYZE(); +void HMI_SetLanguageCache(); void update_variable(); void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); From b028df4228a9eb93d4e111ee8dcffb0d1aac7ff3 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 13 Aug 2021 00:58:12 +0000 Subject: [PATCH 213/323] [cron] Bump distribution date (2021-08-13) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c8d8b3b3fb68..d9db58bfa677 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-12" +//#define STRING_DISTRIBUTION_DATE "2021-08-13" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 6a1dd60ee180..c661bd2b91b8 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-12" + #define STRING_DISTRIBUTION_DATE "2021-08-13" #endif /** From 1555db237e841c754931cbe43e48ebae14c6fdc5 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 13 Aug 2021 05:40:52 +0200 Subject: [PATCH 214/323] =?UTF-8?q?=F0=9F=9A=B8=20Fewer=20CRs=20in=20setti?= =?UTF-8?q?ngs=20report=20(#22560)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/settings.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index b30c82260fe6..47c1314e2851 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -2320,7 +2320,6 @@ void MarlinSettings::postprocess() { ubl.report_state(); if (!ubl.sanity_check()) { - SERIAL_EOL(); #if BOTH(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) ubl.echo_name(); DEBUG_ECHOLNPGM(" initialized.\n"); @@ -3266,7 +3265,6 @@ void MarlinSettings::reset() { if (!forReplay) { SERIAL_EOL(); ubl.report_state(); - SERIAL_EOL(); config_heading(false, PSTR("Active Mesh Slot: "), false); SERIAL_ECHOLN(ubl.storage_slot); config_heading(false, PSTR("EEPROM can hold "), false); @@ -3886,7 +3884,7 @@ void MarlinSettings::reset() { #if HAS_MULTI_LANGUAGE CONFIG_ECHO_HEADING("UI Language:"); - SERIAL_ECHO_MSG(" M414 S", ui.language); + CONFIG_ECHO_MSG(" M414 S", ui.language); #endif } From feb6d2887eee1b31713ef0ad665b166c8fe6e70b Mon Sep 17 00:00:00 2001 From: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:26:26 +0800 Subject: [PATCH 215/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20some=20BTT=20SKR2?= =?UTF-8?q?=20pins=20(#22558)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 14 +++++++------- ini/stm32f4.ini | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index a9dfc367bf33..e5d6b6891b5b 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -153,13 +153,6 @@ #define POWER_LOSS_PIN PC15 // PWRDET #endif -// -// NeoPixel LED -// -#ifndef NEOPIXEL_PIN - #define NEOPIXEL_PIN PE6 -#endif - // // Control pin of driver/heater/fan power supply // @@ -511,6 +504,13 @@ #endif #endif +// +// NeoPixel LED +// +#ifndef NEOPIXEL_PIN + #define NEOPIXEL_PIN PE6 +#endif + // // WIFI // diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 62ac89d9faca..e2e93eaa4327 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -207,6 +207,7 @@ build_flags = ${stm_flash_drive.build_flags} -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED + -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8 # # BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support From c161a46112debd280dc1ed6945d50f971ff505e6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 13 Aug 2021 16:32:25 -0500 Subject: [PATCH 216/323] =?UTF-8?q?=F0=9F=8E=A8=20Update=20MKSPWC,=20some?= =?UTF-8?q?=20other=20pins=20(#22557)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 1 + Marlin/src/HAL/DUE/HAL_SPI.cpp | 16 ++--- Marlin/src/HAL/STM32F1/eeprom_wired.cpp | 2 +- Marlin/src/HAL/shared/eeprom_if_spi.cpp | 12 ++-- Marlin/src/MarlinCore.cpp | 2 +- Marlin/src/MarlinCore.h | 2 +- Marlin/src/feature/dac/dac_dac084s085.cpp | 42 +++++++------- Marlin/src/gcode/control/M80_M81.cpp | 2 +- Marlin/src/inc/SanityCheck.h | 7 +++ .../src/lcd/extui/dgus/mks/DGUSDisplayDef.h | 6 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 6 +- .../lcd/extui/mks_ui/printer_operation.cpp | 6 +- Marlin/src/libs/W25Qxx.cpp | 48 ++++++--------- Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 8 +-- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 12 ++-- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 12 ++-- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 12 ++-- Marlin/src/pins/pinsDebug_list.h | 20 +++---- Marlin/src/pins/pins_postprocess.h | 4 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 2 +- Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h | 4 +- Marlin/src/pins/sam/pins_ALLIGATOR_R2.h | 10 ++-- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 6 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 6 +- Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h | 8 +-- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 4 +- Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 8 +-- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 6 +- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 16 ++--- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 16 ++--- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 8 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 26 ++++----- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 12 ++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 14 +++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 43 +++++++------- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 44 +++++++------- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 31 +++++----- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 8 +-- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 28 ++++----- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 58 +++++++++---------- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 22 +++---- 41 files changed, 279 insertions(+), 321 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index d01fc98b40ef..763c143158c6 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -367,6 +367,7 @@ //#define PSU_NAME "Power Supply" #if ENABLED(PSU_CONTROL) + //#define MKS_PWC // Using the MKS PWC add-on //#define PS_OFF_CONFIRM // Confirm dialog when power off //#define PS_OFF_SOUND // Beep 1s when power off #define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box diff --git a/Marlin/src/HAL/DUE/HAL_SPI.cpp b/Marlin/src/HAL/DUE/HAL_SPI.cpp index d3d76e94e5dd..c5e8f2433d7d 100644 --- a/Marlin/src/HAL/DUE/HAL_SPI.cpp +++ b/Marlin/src/HAL/DUE/HAL_SPI.cpp @@ -594,18 +594,14 @@ SPI_Configure(SPI0, ID_SPI0, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PS); SPI_Enable(SPI0); - SET_OUTPUT(DAC0_SYNC); + SET_OUTPUT(DAC0_SYNC_PIN); #if HAS_MULTI_EXTRUDER - SET_OUTPUT(DAC1_SYNC); - WRITE(DAC1_SYNC, HIGH); + OUT_WRITE(DAC1_SYNC_PIN, HIGH); #endif - SET_OUTPUT(SPI_EEPROM1_CS); - SET_OUTPUT(SPI_EEPROM2_CS); - SET_OUTPUT(SPI_FLASH_CS); - WRITE(DAC0_SYNC, HIGH); - WRITE(SPI_EEPROM1_CS, HIGH); - WRITE(SPI_EEPROM2_CS, HIGH); - WRITE(SPI_FLASH_CS, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); + OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH); + OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH); + OUT_WRITE(SPI_FLASH_CS_PIN, HIGH); WRITE(SD_SS_PIN, HIGH); OUT_WRITE(SDSS, LOW); diff --git a/Marlin/src/HAL/STM32F1/eeprom_wired.cpp b/Marlin/src/HAL/STM32F1/eeprom_wired.cpp index 0ad69065cf9c..4cac36554f15 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_wired.cpp @@ -44,7 +44,7 @@ bool PersistentStore::access_start() { SET_OUTPUT(BOARD_SPI1_SCK_PIN); SET_OUTPUT(BOARD_SPI1_MOSI_PIN); SET_INPUT(BOARD_SPI1_MISO_PIN); - SET_OUTPUT(SPI_EEPROM1_CS); + SET_OUTPUT(SPI_EEPROM1_CS_PIN); #endif spiInit(0); #endif diff --git a/Marlin/src/HAL/shared/eeprom_if_spi.cpp b/Marlin/src/HAL/shared/eeprom_if_spi.cpp index 6aa6e0909623..72c35addcb45 100644 --- a/Marlin/src/HAL/shared/eeprom_if_spi.cpp +++ b/Marlin/src/HAL/shared/eeprom_if_spi.cpp @@ -49,8 +49,8 @@ static void _eeprom_begin(uint8_t * const pos, const uint8_t cmd) { (unsigned(pos) >> 8) & 0xFF, // Address High unsigned(pos) & 0xFF // Address Low }; - WRITE(SPI_EEPROM1_CS, HIGH); // Usually free already - WRITE(SPI_EEPROM1_CS, LOW); // Activate the Bus + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Usually free already + WRITE(SPI_EEPROM1_CS_PIN, LOW); // Activate the Bus spiSend(SPI_CHAN_EEPROM1, eeprom_temp, 3); // Leave the Bus in-use } @@ -60,23 +60,23 @@ uint8_t eeprom_read_byte(uint8_t *pos) { const uint8_t v = spiRec(SPI_CHAN_EEPROM1); // After READ a value sits on the Bus - WRITE(SPI_EEPROM1_CS, HIGH); // Done with device + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Done with device return v; } void eeprom_write_byte(uint8_t *pos, uint8_t value) { const uint8_t eeprom_temp = CMD_WREN; - WRITE(SPI_EEPROM1_CS, LOW); + WRITE(SPI_EEPROM1_CS_PIN, LOW); spiSend(SPI_CHAN_EEPROM1, &eeprom_temp, 1); // Write Enable - WRITE(SPI_EEPROM1_CS, HIGH); // Done with the Bus + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Done with the Bus delay(1); // For a small amount of time _eeprom_begin(pos, CMD_WRITE); // Set write address and begin transmission spiSend(SPI_CHAN_EEPROM1, value); // Send the value to be written - WRITE(SPI_EEPROM1_CS, HIGH); // Done with the Bus + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Done with the Bus delay(EEPROM_WRITE_DELAY); // Give page write time to complete } diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 3a1ac6fd045c..39ff4393d79c 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1192,7 +1192,7 @@ void setup() { #if HAS_SUICIDE SETUP_LOG("SUICIDE_PIN"); - OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING); + OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_STATE); #endif #ifdef JTAGSWD_RESET diff --git a/Marlin/src/MarlinCore.h b/Marlin/src/MarlinCore.h index d7ab11d046a3..6147d43f177d 100644 --- a/Marlin/src/MarlinCore.h +++ b/Marlin/src/MarlinCore.h @@ -84,7 +84,7 @@ extern bool wait_for_heatup; bool pin_is_protected(const pin_t pin); #if HAS_SUICIDE - inline void suicide() { OUT_WRITE(SUICIDE_PIN, SUICIDE_PIN_INVERTING); } + inline void suicide() { OUT_WRITE(SUICIDE_PIN, SUICIDE_PIN_STATE); } #endif #if HAS_KILL diff --git a/Marlin/src/feature/dac/dac_dac084s085.cpp b/Marlin/src/feature/dac/dac_dac084s085.cpp index 649aa5561bfa..b88aaf802bdf 100644 --- a/Marlin/src/feature/dac/dac_dac084s085.cpp +++ b/Marlin/src/feature/dac/dac_dac084s085.cpp @@ -20,35 +20,35 @@ void dac084s085::begin() { uint8_t externalDac_buf[] = { 0x20, 0x00 }; // all off // All SPI chip-select HIGH - SET_OUTPUT(DAC0_SYNC); + SET_OUTPUT(DAC0_SYNC_PIN); #if HAS_MULTI_EXTRUDER - SET_OUTPUT(DAC1_SYNC); + SET_OUTPUT(DAC1_SYNC_PIN); #endif cshigh(); spiBegin(); //init onboard DAC DELAY_US(2); - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf)); - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); #if HAS_MULTI_EXTRUDER //init Piggy DAC DELAY_US(2); - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf)); - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); #endif return; @@ -66,18 +66,18 @@ void dac084s085::setValue(const uint8_t channel, const uint8_t value) { cshigh(); if (channel > 3) { // DAC Piggy E1,E2,E3 - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); } else { // DAC onboard X,Y,Z,E0 - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); } DELAY_US(2); @@ -85,13 +85,13 @@ void dac084s085::setValue(const uint8_t channel, const uint8_t value) { } void dac084s085::cshigh() { - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); #if HAS_MULTI_EXTRUDER - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); #endif - WRITE(SPI_EEPROM1_CS, HIGH); - WRITE(SPI_EEPROM2_CS, HIGH); - WRITE(SPI_FLASH_CS, HIGH); + WRITE(SPI_EEPROM1_CS_PIN, HIGH); + WRITE(SPI_EEPROM2_CS_PIN, HIGH); + WRITE(SPI_FLASH_CS_PIN, HIGH); WRITE(SD_SS_PIN, HIGH); } diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index 9640c72006d7..149613ee15c8 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -60,7 +60,7 @@ * a print without suicide... */ #if HAS_SUICIDE - OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING); + OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_STATE); #endif TERN_(HAS_LCD_MENU, ui.reset_status()); diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 94f1f010c5bc..f1204532fec1 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -3473,6 +3473,13 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #endif +/** + * Validate MKS_PWC + */ +#if ENABLED(MKS_PWC) && PSU_ACTIVE_STATE != HIGH + #error "MKS_PWC requires PSU_ACTIVE_STATE to be set HIGH." +#endif + /** * Ensure this option is set intentionally */ diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h index c78e35e75b56..407782f5595e 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h @@ -28,9 +28,9 @@ #define LOGO_TIME_DELAY TERN(USE_MKS_GREEN_UI, 8000, 1500) #if ENABLED(DGUS_MKS_RUNOUT_SENSOR) - #define MT_DET_1_PIN 1 - #define MT_DET_2_PIN 2 - #define MT_DET_PIN_INVERTING false + #define MT_DET_1_PIN 1 + #define MT_DET_2_PIN 2 + #define MT_DET_PIN_STATE LOW #endif #define MKS_FINSH diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 8c806f0ecd10..c80191c8e54f 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -1495,17 +1495,17 @@ void DGUSScreenHandler::DGUS_Runout_Idle(void) { break; case UNRUNOUT_STATUS: - if (READ(MT_DET_1_PIN) == LOW) + if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE) runout_mks.runout_status = RUNOUT_STATUS; break; case RUNOUT_BEGIN_STATUS: - if (READ(MT_DET_1_PIN) == HIGH) + if (READ(MT_DET_1_PIN) != MT_DET_PIN_STATE) runout_mks.runout_status = RUNOUT_WAITTING_STATUS; break; case RUNOUT_WAITTING_STATUS: - if (READ(MT_DET_1_PIN) == LOW) + if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE) runout_mks.runout_status = RUNOUT_BEGIN_STATUS; break; diff --git a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp index 1bb17bb4f224..362fdeb43df2 100644 --- a/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp @@ -163,7 +163,7 @@ void filament_check() { #endif #if PIN_EXISTS(MT_DET_1) static int fil_det_count_1 = 0; - if (READ(MT_DET_1_PIN) == MT_DET_PIN_INVERTING) + if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE) fil_det_count_1++; else if (fil_det_count_1 > 0) fil_det_count_1--; @@ -171,7 +171,7 @@ void filament_check() { #if PIN_EXISTS(MT_DET_2) static int fil_det_count_2 = 0; - if (READ(MT_DET_2_PIN) == MT_DET_PIN_INVERTING) + if (READ(MT_DET_2_PIN) == MT_DET_PIN_STATE) fil_det_count_2++; else if (fil_det_count_2 > 0) fil_det_count_2--; @@ -179,7 +179,7 @@ void filament_check() { #if PIN_EXISTS(MT_DET_3) static int fil_det_count_3 = 0; - if (READ(MT_DET_3_PIN) == MT_DET_PIN_INVERTING) + if (READ(MT_DET_3_PIN) == MT_DET_PIN_STATE) fil_det_count_3++; else if (fil_det_count_3 > 0) fil_det_count_3--; diff --git a/Marlin/src/libs/W25Qxx.cpp b/Marlin/src/libs/W25Qxx.cpp index 56581ed46eb7..b458a7c965ef 100644 --- a/Marlin/src/libs/W25Qxx.cpp +++ b/Marlin/src/libs/W25Qxx.cpp @@ -28,26 +28,14 @@ W25QXXFlash W25QXX; -#ifndef SPI_FLASH_MISO_PIN - #define SPI_FLASH_MISO_PIN W25QXX_MISO_PIN -#endif -#ifndef SPI_FLASH_MOSI_PIN - #define SPI_FLASH_MOSI_PIN W25QXX_MOSI_PIN -#endif -#ifndef SPI_FLASH_SCK_PIN - #define SPI_FLASH_SCK_PIN W25QXX_SCK_PIN -#endif -#ifndef SPI_FLASH_CS_PIN - #define SPI_FLASH_CS_PIN W25QXX_CS_PIN -#endif #ifndef NC #define NC -1 #endif MarlinSPI W25QXXFlash::mySPI(SPI_FLASH_MOSI_PIN, SPI_FLASH_MISO_PIN, SPI_FLASH_SCK_PIN, NC); -#define W25QXX_CS_H OUT_WRITE(SPI_FLASH_CS_PIN, HIGH) -#define W25QXX_CS_L OUT_WRITE(SPI_FLASH_CS_PIN, LOW) +#define SPI_FLASH_CS_H() OUT_WRITE(SPI_FLASH_CS_PIN, HIGH) +#define SPI_FLASH_CS_L() OUT_WRITE(SPI_FLASH_CS_PIN, LOW) bool flash_dma_mode = true; @@ -134,24 +122,24 @@ void W25QXXFlash::spi_flash_SendBlock(uint8_t token, const uint8_t *buf) { uint16_t W25QXXFlash::W25QXX_ReadID(void) { uint16_t Temp = 0; - W25QXX_CS_L; + SPI_FLASH_CS_L(); spi_flash_Send(0x90); spi_flash_Send(0x00); spi_flash_Send(0x00); spi_flash_Send(0x00); Temp |= spi_flash_Rec() << 8; Temp |= spi_flash_Rec(); - W25QXX_CS_H; + SPI_FLASH_CS_H(); return Temp; } void W25QXXFlash::SPI_FLASH_WriteEnable(void) { // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Write Enable" instruction spi_flash_Send(W25X_WriteEnable); // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); } /******************************************************************************* @@ -167,7 +155,7 @@ void W25QXXFlash::SPI_FLASH_WaitForWriteEnd(void) { uint8_t FLASH_Status = 0; // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Read Status Register" instruction spi_flash_Send(W25X_ReadStatusReg); @@ -179,7 +167,7 @@ void W25QXXFlash::SPI_FLASH_WaitForWriteEnd(void) { while ((FLASH_Status & WIP_Flag) == 0x01); // Write in progress // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); } void W25QXXFlash::SPI_FLASH_SectorErase(uint32_t SectorAddr) { @@ -188,7 +176,7 @@ void W25QXXFlash::SPI_FLASH_SectorErase(uint32_t SectorAddr) { // Sector Erase // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send Sector Erase instruction spi_flash_Send(W25X_SectorErase); // Send SectorAddr high nybble address byte @@ -199,14 +187,14 @@ void W25QXXFlash::SPI_FLASH_SectorErase(uint32_t SectorAddr) { spi_flash_Send(SectorAddr & 0xFF); // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); // Wait the end of Flash writing SPI_FLASH_WaitForWriteEnd(); } void W25QXXFlash::SPI_FLASH_BlockErase(uint32_t BlockAddr) { SPI_FLASH_WriteEnable(); - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send Sector Erase instruction spi_flash_Send(W25X_BlockErase); // Send SectorAddr high nybble address byte @@ -216,7 +204,7 @@ void W25QXXFlash::SPI_FLASH_BlockErase(uint32_t BlockAddr) { // Send SectorAddr low nybble address byte spi_flash_Send(BlockAddr & 0xFF); - W25QXX_CS_H; + SPI_FLASH_CS_H(); SPI_FLASH_WaitForWriteEnd(); } @@ -234,12 +222,12 @@ void W25QXXFlash::SPI_FLASH_BulkErase(void) { // Bulk Erase // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send Bulk Erase instruction spi_flash_Send(W25X_ChipErase); // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); // Wait the end of Flash writing SPI_FLASH_WaitForWriteEnd(); } @@ -262,7 +250,7 @@ void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint SPI_FLASH_WriteEnable(); // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Write to Memory " instruction spi_flash_Send(W25X_PageProgram); // Send WriteAddr high nybble address byte to write to @@ -283,7 +271,7 @@ void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint } // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); // Wait the end of Flash writing SPI_FLASH_WaitForWriteEnd(); @@ -366,7 +354,7 @@ void W25QXXFlash::SPI_FLASH_BufferWrite(uint8_t *pBuffer, uint32_t WriteAddr, ui *******************************************************************************/ void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead) { // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Read from Memory " instruction spi_flash_Send(W25X_ReadData); @@ -389,7 +377,7 @@ void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint else spi_flash_Read(pBuffer, NumByteToRead); - W25QXX_CS_H; + SPI_FLASH_CS_H(); } #endif // HAS_SPI_FLASH diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index a0f8c1648c1e..1b3cf15e5afe 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -416,10 +416,10 @@ #if HAS_SPI_FLASH #define SPI_DEVICE 1 #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN 31 - #define W25QXX_MOSI_PIN SD_MOSI_PIN - #define W25QXX_MISO_PIN SD_MISO_PIN - #define W25QXX_SCK_PIN SD_SCK_PIN + #define SPI_FLASH_CS_PIN 31 + #define SPI_FLASH_MOSI_PIN SD_MOSI_PIN + #define SPI_FLASH_MISO_PIN SD_MISO_PIN + #define SPI_FLASH_SCK_PIN SD_SCK_PIN #endif #define TFT_BUFFER_SIZE 0xFFFF diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 4c2b606929f4..44dbaacb7301 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -138,14 +138,10 @@ // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #ifndef PS_ON_PIN - #define PS_ON_PIN P0_25 // SERVO - #endif - #ifndef KILL_PIN - #define KILL_PIN P1_29 // Z+ - #define KILL_PIN_STATE HIGH - #endif +#if ENABLED(MKS_PWC) + #define PS_ON_PIN P0_25 // SERVO + #define KILL_PIN P1_29 // Z+ + #define KILL_PIN_STATE HIGH #endif // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 0c3f44ceb721..8808c3a22806 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -218,14 +218,10 @@ // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #ifndef PS_ON_PIN - #define PS_ON_PIN P2_00 // SERVO - #endif - #ifndef KILL_PIN - #define KILL_PIN P1_24 // Z+ - #define KILL_PIN_STATE HIGH - #endif +#if ENABLED(MKS_PWC) + #define PS_ON_PIN P2_00 // SERVO + #define KILL_PIN P1_24 // Z+ + #define KILL_PIN_STATE HIGH #endif // diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 4020ac23c637..7547279bbda3 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -229,14 +229,10 @@ // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #ifndef PS_ON_PIN - #define PS_ON_PIN P2_00 // Suggestion (SERVO) - #endif - #ifndef KILL_PIN - #define KILL_PIN P1_24 // Suggestion (Z+) - #define KILL_PIN_STATE HIGH - #endif +#if ENABLED(MKS_PWC) + #define PS_ON_PIN P2_00 // SERVO + #define KILL_PIN P1_24 // Z+ + #define KILL_PIN_STATE HIGH #endif // diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 8b1cad3a7c97..78ee71749d11 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -291,11 +291,11 @@ #if PIN_EXISTS(DAC_DISABLE) REPORT_NAME_DIGITAL(__LINE__, DAC_DISABLE_PIN) #endif -#if defined(DAC0_SYNC) && DAC0_SYNC >= 0 - REPORT_NAME_DIGITAL(__LINE__, DAC0_SYNC) +#if PIN_EXISTS(DAC0_SYNC) + REPORT_NAME_DIGITAL(__LINE__, DAC0_SYNC_PIN) #endif -#if defined(DAC1_SYNC) && DAC1_SYNC >= 0 - REPORT_NAME_DIGITAL(__LINE__, DAC1_SYNC) +#if PIN_EXISTS(DAC1_SYNC) + REPORT_NAME_DIGITAL(__LINE__, DAC1_SYNC_PIN) #endif #if PIN_EXISTS(DEBUG) REPORT_NAME_DIGITAL(__LINE__, DEBUG_PIN) @@ -974,14 +974,14 @@ #if defined(SPARE_IO) && SPARE_IO >= 0 REPORT_NAME_DIGITAL(__LINE__, SPARE_IO) #endif -#if defined(SPI_EEPROM1_CS) && SPI_EEPROM1_CS >= 0 - REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM1_CS) +#if PIN_EXISTS(SPI_EEPROM1_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM1_CS_PIN) #endif -#if defined(SPI_EEPROM2_CS) && SPI_EEPROM2_CS >= 0 - REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM2_CS) +#if PIN_EXISTS(SPI_EEPROM2_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM2_CS_PIN) #endif -#if defined(SPI_FLASH_CS) && SPI_FLASH_CS >= 0 - REPORT_NAME_DIGITAL(__LINE__, SPI_FLASH_CS) +#if PIN_EXISTS(SPI_FLASH_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_FLASH_CS_PIN) #endif #if PIN_EXISTS(SPINDLE_DIR) REPORT_NAME_DIGITAL(__LINE__, SPINDLE_DIR_PIN) diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index f7152770e5b5..fc82e600df04 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -391,8 +391,8 @@ #ifndef SUICIDE_PIN #define SUICIDE_PIN -1 #endif -#ifndef SUICIDE_PIN_INVERTING - #define SUICIDE_PIN_INVERTING false +#ifndef SUICIDE_PIN_STATE + #define SUICIDE_PIN_STATE LOW #endif #ifndef NUM_SERVO_PLUGS diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 6133a6417e01..8756a3321806 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -34,7 +34,7 @@ #endif #define RESET_PIN 30 -#define SPI_FLASH_CS 83 +#define SPI_FLASH_CS_PIN 83 // // Servos diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h index 05de208ca1e9..def71fefc13e 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h @@ -63,6 +63,6 @@ #define EXP4_PIN 12 // PS_ON_PIN #define SUICIDE_PIN 12 // Used by CR2020 Industrial series -#ifndef SUICIDE_PIN_INVERTING - #define SUICIDE_PIN_INVERTING true +#ifndef SUICIDE_PIN_STATE + #define SUICIDE_PIN_STATE HIGH #endif diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h index c273edfc6b4d..70c3853dc941 100644 --- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h +++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h @@ -123,20 +123,20 @@ #define SPI_CHAN_DAC 1 -#define DAC0_SYNC 53 // PB14 -#define DAC1_SYNC 6 // PC24 +#define DAC0_SYNC_PIN 53 // PB14 +#define DAC1_SYNC_PIN 6 // PC24 // 64K SPI EEPROM #define SPI_EEPROM #define SPI_CHAN_EEPROM1 2 -#define SPI_EEPROM1_CS 25 // PD0 +#define SPI_EEPROM1_CS_PIN 25 // PD0 // 2K SPI EEPROM -#define SPI_EEPROM2_CS 26 // PD1 +#define SPI_EEPROM2_CS_PIN 26 // PD1 // FLASH SPI // 32Mb -#define SPI_FLASH_CS 23 // PA14 +#define SPI_FLASH_CS_PIN 23 // PA14 // // LCD / Controller diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index b5569c810d90..5e612d3e8c22 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -190,11 +190,11 @@ //#define EEPROM_SD // EEPROM on SDCARD //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? -//#define SPI_EEPROM1_CS ? +//#define SPI_EEPROM1_CS_PIN ? // 2K EEPROM -//#define SPI_EEPROM2_CS ? +//#define SPI_EEPROM2_CS_PIN ? // 32Mb FLASH -//#define SPI_FLASH_CS ? +//#define SPI_FLASH_CS_PIN ? // // LCD / Controller diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index b06de1bc696b..37a76c527821 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -176,11 +176,11 @@ //#define EEPROM_SD // EEPROM on SDCARD //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? -//#define SPI_EEPROM1_CS ? +//#define SPI_EEPROM1_CS_PIN ? // 2K EEPROM -//#define SPI_EEPROM2_CS ? +//#define SPI_EEPROM2_CS_PIN ? // 32Mb FLASH -//#define SPI_FLASH_CS ? +//#define SPI_FLASH_CS_PIN ? // // LCD / Controller diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index a655d0121c84..fd30c2b69a86 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -137,13 +137,13 @@ // SPI Buses // -#define DAC0_SYNC 53 // PB14 +#define DAC0_SYNC_PIN 53 // PB14 #define SPI_CHAN_DAC 1 #define SPI_CHAN_EEPROM1 -1 -#define SPI_EEPROM1_CS -1 -#define SPI_EEPROM2_CS -1 -#define SPI_FLASH_CS -1 +#define SPI_EEPROM1_CS_PIN -1 +#define SPI_EEPROM2_CS_PIN -1 +#define SPI_FLASH_CS_PIN -1 #define SD_SCK_PIN 76 #define SD_MISO_PIN 74 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 63ad06dc577a..bd5f2068f1a4 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -179,6 +179,6 @@ #endif #define SUICIDE_PIN PC13 -#ifndef SUICIDE_PIN_INVERTING - #define SUICIDE_PIN_INVERTING false +#ifndef SUICIDE_PIN_STATE + #define SUICIDE_PIN_STATE LOW #endif diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h index 0319afa5e990..989b7eec6f65 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -120,10 +120,10 @@ #endif // SPI 2 -#define W25QXX_CS_PIN PB12 -#define W25QXX_MOSI_PIN PB15 -#define W25QXX_MISO_PIN PB14 -#define W25QXX_SCK_PIN PB13 +#define SPI_FLASH_CS_PIN PB12 +#define SPI_FLASH_MOSI_PIN PB15 +#define SPI_FLASH_MISO_PIN PB14 +#define SPI_FLASH_SCK_PIN PB13 // // TFT with FSMC interface diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index d106c98e1360..f971f6562801 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -61,13 +61,13 @@ // SPI //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? - //#define SPI_EEPROM1_CS ? + //#define SPI_EEPROM1_CS_PIN ? // 2K EEPROM - //#define SPI_EEPROM2_CS ? + //#define SPI_EEPROM2_CS_PIN ? // 32Mb FLASH - //#define SPI_FLASH_CS ? + //#define SPI_FLASH_CS_PIN ? #endif // diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 2dea59ef4180..21bbd23ca9f6 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -73,10 +73,10 @@ #if HAS_SPI_FLASH // SPI 2 - #define W25QXX_CS_PIN PB12 // SPI2_NSS / Flash chip-select - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 // SPI2_NSS / Flash chip-select + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif // @@ -222,9 +222,11 @@ //#define PS_ON_PIN PA3 // PW_CN /PW_OFF #endif -#define MT_DET_1_PIN PA4 // MT_DET -#define MT_DET_2_PIN PE6 // FALA_CRTL -#define MT_DET_PIN_INVERTING false +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 // MT_DET + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW +#endif // // LED / NEOPixel diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index f9ec42b68efe..c9d16b16b0cc 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -170,18 +170,18 @@ #if ENABLED(SPI_EEPROM) // SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits) #define SPI_CHAN_EEPROM1 1 - #define SPI_EEPROM1_CS PC5 // pin 34 - #define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30 - #define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31 - #define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32 + #define SPI_EEPROM1_CS_PIN PC5 // pin 34 + #define EEPROM_SCK_PIN BOARD_SPI1_SCK_PIN // PA5 pin 30 + #define EEPROM_MISO_PIN BOARD_SPI1_MISO_PIN // PA6 pin 31 + #define EEPROM_MOSI_PIN BOARD_SPI1_MOSI_PIN // PA7 pin 32 #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now... #elif HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x40000U // limit to 256KB (M993 will reboot with 512) - #define W25QXX_CS_PIN PC5 - #define W25QXX_MOSI_PIN PA7 - #define W25QXX_MISO_PIN PA6 - #define W25QXX_SCK_PIN PA5 + #define SPI_FLASH_CS_PIN PC5 + #define SPI_FLASH_MOSI_PIN PA7 + #define SPI_FLASH_MISO_PIN PA6 + #define SPI_FLASH_SCK_PIN PA5 #elif ENABLED(FLASH_EEPROM_EMULATION) // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) #define EEPROM_PAGE_SIZE (0x800U) // 2KB diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 4d798ffe282b..889e1f5e07bf 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -275,8 +275,8 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x800000 // 8MB - #define W25QXX_CS_PIN PG9 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PG9 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 2fc99f297104..ba5198006512 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -183,19 +183,19 @@ // Misc. Functions // #if HAS_TFT_LVGL_UI - #if ENABLED(PSU_CONTROL) // MKSPWC - #define SUICIDE_PIN PB2 // PW_OFF - #define SUICIDE_PIN_INVERTING false - #define KILL_PIN PA2 // PW_DET + #if ENABLED(MKS_PWC) + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #define KILL_PIN PA2 #define KILL_PIN_STATE HIGH #endif - #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN - #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE + #define MT_DET_1_PIN PA4 + #define MT_DET_PIN_STATE LOW - #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN - #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN - #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PE9 #if ENABLED(MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET @@ -363,10 +363,10 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif #ifndef BEEPER_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index da7ba05795a9..5a359328014e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -129,14 +129,10 @@ // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #ifndef PS_ON_PIN - #define PS_ON_PIN PA14 // PW_OFF - #endif - #ifndef KILL_PIN - #define KILL_PIN PB10 // PW_DET - #define KILL_PIN_STATE HIGH - #endif +#if ENABLED(MKS_PWC) + #define PS_ON_PIN PA14 // PW_OFF + #define KILL_PIN PB10 // PW_DET + #define KILL_PIN_STATE HIGH #endif /** diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index d4a2f59b4256..ae45d8b6d150 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -119,8 +119,10 @@ #define POWER_LOSS_PIN PA2 // PW_DET #define PS_ON_PIN PA3 // PW_OFF -#define MT_DET_1_PIN PA4 -#define MT_DET_PIN_INVERTING false +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 // MT_DET + #define MT_DET_PIN_STATE LOW +#endif #define WIFI_IO0_PIN PC13 @@ -194,8 +196,8 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 // Flash chip-select - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 // Flash chip-select + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index 2a5c9f727372..975ecb8bd53e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -130,33 +130,30 @@ // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #if HAS_TFT_LVGL_UI - #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PB2 // PW_OFF #endif - #ifndef PS_ON_PIN - #define PS_ON_PIN PB2 // SUICIDE - #endif - #ifndef KILL_PIN - #define KILL_PIN PA2 - #define KILL_PIN_STATE HIGH - #endif -#else - #define SUICIDE_PIN PB2 - #define SUICIDE_PIN_INVERTING false + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH #endif // // Misc. Functions // #if HAS_TFT_LVGL_UI - #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN - #define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN - #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE + #define MT_DET_1_PIN PA4 + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW - #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN - #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN - #define WIFI_RESET_PIN PA5 // MKS ESP WIFI RESET PIN + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PA5 #else //#define POWER_LOSS_PIN PA2 // PW_DET //#define PS_ON_PIN PB2 // PW_OFF @@ -221,8 +218,8 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 31ce016e67a1..49d5476fecda 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -194,34 +194,30 @@ // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #if HAS_TFT_LVGL_UI - #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PB2 // PW_OFF #endif - #ifndef PS_ON_PIN - #define PS_ON_PIN PB2 // SUICIDE - #endif - #ifndef KILL_PIN - #define KILL_PIN PA2 - #define KILL_PIN_STATE HIGH - #endif -#else - #define SUICIDE_PIN PB2 - #define SUICIDE_PIN_INVERTING false + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH #endif // // Misc. Functions // #if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW - #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN - #define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN - #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE - - #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN - #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN - #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PE9 #if ENABLED(MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET @@ -390,10 +386,10 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif #ifndef BEEPER_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 2f62563edbee..d752d52a3a3e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -186,20 +186,17 @@ // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #if HAS_TFT_LVGL_UI - #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." - #endif - #ifndef PS_ON_PIN - #define PS_ON_PIN PG11 // SUICIDE - #endif - #ifndef KILL_PIN - #define KILL_PIN PA2 - #define KILL_PIN_STATE HIGH +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PG11 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PG11 // PW_OFF #endif -#else - #define SUICIDE_PIN PG11 - #define SUICIDE_PIN_INVERTING false + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH #endif // @@ -318,8 +315,8 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 // Flash chip-select - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 // Flash chip-select + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index 65db99025c8b..4707a16e1432 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -179,10 +179,10 @@ #if ENABLED(SPI_EEPROM) // Lerdge has an SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf #define SPI_CHAN_EEPROM1 1 - #define SPI_EEPROM1_CS PB12 // datasheet: /CS pin, found with multimeter, not tested - #define EEPROM_SCK PB13 // datasheet: CLK pin, found with multimeter, not tested - #define EEPROM_MISO PB14 // datasheet: DO pin, found with multimeter, not tested - #define EEPROM_MOSI PB15 // datasheet: DI pin, found with multimeter, not tested + #define SPI_EEPROM1_CS_PIN PB12 // datasheet: /CS pin, found with multimeter, not tested + #define EEPROM_SCK_PIN PB13 // datasheet: CLK pin, found with multimeter, not tested + #define EEPROM_MISO_PIN PB14 // datasheet: DO pin, found with multimeter, not tested + #define EEPROM_MOSI_PIN PB15 // datasheet: DI pin, found with multimeter, not tested #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now... #else diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index 2db558410977..5c6668562995 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -210,32 +210,24 @@ // // Misc. Functions // -#define MT_DET_1 PC5 // Y+ -#define MT_DET_2 PB12 // Z+ - +#define PW_DET PC5 // Y+ +#define PW_OFF PB12 // Z+ +#define MT_DET_1_PIN PW_DET +#define MT_DET_2_PIN PW_OFF #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN MT_DET_1 + #define FIL_RUNOUT_PIN MT_DET_1_PIN #endif #ifndef FIL_RUNOUT2_PIN - #define FIL_RUNOUT2_PIN MT_DET_2 + #define FIL_RUNOUT2_PIN MT_DET_2_PIN #endif // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #ifndef PS_ON_PIN - #define PS_ON_PIN MT_DET_2 // Z+ - #endif - #ifndef KILL_PIN - #define KILL_PIN MT_DET_1 // Y+ - #define KILL_PIN_STATE HIGH - #endif -#else - #define PW_DET MT_DET_1 - #define PW_OFF MT_DET_2 - #define POWER_LOSS_PIN PW_DET - #define PS_ON_PIN PW_OFF +#if ENABLED(MKS_PWC) + #define PS_ON_PIN PW_OFF + #define KILL_PIN PW_DET + #define KILL_PIN_STATE HIGH #endif // Random Info diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index eff941b957a0..9193a8551171 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -178,9 +178,11 @@ // // Misc. Functions // -#define MT_DET_1_PIN PA4 -#define MT_DET_2_PIN PE6 -#define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 // MT_DET + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW +#endif #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN MT_DET_1_PIN @@ -189,35 +191,29 @@ #define FIL_RUNOUT2_PIN MT_DET_2_PIN #endif -// -// Enable MKSPWC support -// +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PA13 // PW_DET +#endif + //#define SUICIDE_PIN PB2 //#define LED_PIN PB2 //#define KILL_PIN PA2 -//#define KILL_PIN_STATE HIGH +//#define KILL_PIN_STATE LOW // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - #if HAS_TFT_LVGL_UI - #error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue." +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PB2 // PW_OFF #endif - #ifndef PS_ON_PIN - #define PS_ON_PIN PB2 // SUICIDE - #endif - #ifndef KILL_PIN - #define KILL_PIN PA13 // PW_DET - #define KILL_PIN_STATE HIGH - #endif -#else - #define SUICIDE_PIN PB2 - #define SUICIDE_PIN_INVERTING false -#endif - -#ifndef POWER_LOSS_PIN - #define POWER_LOSS_PIN PA13 // PW_DET + #define KILL_PIN PA13 // PW_DET + #define KILL_PIN_STATE HIGH #endif // Random Info @@ -232,9 +228,9 @@ // MKS WIFI MODULE #if ENABLED(MKS_WIFI_MODULE) - #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN - #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN - #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PE9 #endif // MKS TEST @@ -276,10 +272,10 @@ #define SPI_DEVICE 2 #define SPI_FLASH_SIZE 0x1000000 #if ENABLED(SPI_FLASH) - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PC3 - #define W25QXX_MISO_PIN PC2 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PC3 + #define SPI_FLASH_MISO_PIN PC2 + #define SPI_FLASH_SCK_PIN PB13 #endif /** diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 2e47f98e9f93..c2809c855329 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -195,18 +195,18 @@ // // Misc. Functions // +//#define POWER_LOSS_PIN PA2 // PW_DET //#define PS_ON_PIN PA3 // PW_OFF // // Power Supply Control // -#if ENABLED(PSU_CONTROL) // MKSPWC - //#define SUICIDE_PIN PB2 // LED - //#define KILL_PIN PA2 // PW_DET - //#define KILL_PIN_STATE HIGH +#if ENABLED(MKS_PWC) + #define SUICIDE_PIN PB2 + #define KILL_PIN PA2 + #define KILL_PIN_STATE LOW #else - //#define POWER_LOSS_PIN PA2 // PW_DET - //#define LED_PIN PB2 + #define LED_PIN PB2 #endif #ifndef SDCARD_CONNECTION @@ -251,14 +251,14 @@ // // LCD / Controller #define SPI_FLASH -#define HAS_SPI_FLASH 1 +#define HAS_SPI_FLASH 1 #define SPI_DEVICE 2 #define SPI_FLASH_SIZE 0x1000000 #if ENABLED(SPI_FLASH) - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif /** From fc817feee3ddfb652e370aa38e723e74b319a0bc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 13 Aug 2021 18:49:27 -0500 Subject: [PATCH 217/323] =?UTF-8?q?=F0=9F=8E=A8=20Update=20HAL/STM32=20wra?= =?UTF-8?q?ppers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #22537 --- Marlin/src/HAL/STM32/MarlinSPI.cpp | 2 ++ Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp | 6 ++++-- Marlin/src/HAL/STM32/eeprom_if_iic.cpp | 7 ++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Marlin/src/HAL/STM32/MarlinSPI.cpp b/Marlin/src/HAL/STM32/MarlinSPI.cpp index 330c8956978d..e1be50820f65 100644 --- a/Marlin/src/HAL/STM32/MarlinSPI.cpp +++ b/Marlin/src/HAL/STM32/MarlinSPI.cpp @@ -19,6 +19,8 @@ * along with this program. If not, see . * */ +#include "../platforms.h" + #if defined(HAL_STM32) && !defined(STM32H7xx) #include "MarlinSPI.h" diff --git a/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp b/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp index 165b3c6bab2e..5bd4c18577b4 100644 --- a/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp +++ b/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#ifdef STM32F1 +#include "../platforms.h" + +#ifdef HAL_STM32 /** * PersistentStore for Arduino-style EEPROM interface @@ -79,4 +81,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // IIC_BL24CXX_EEPROM -#endif // STM32F1 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_if_iic.cpp b/Marlin/src/HAL/STM32/eeprom_if_iic.cpp index 5c6cc802a6d0..26b3d9044e1f 100644 --- a/Marlin/src/HAL/STM32/eeprom_if_iic.cpp +++ b/Marlin/src/HAL/STM32/eeprom_if_iic.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ +#include "../platforms.h" + +#ifdef HAL_STM32 /** * Platform-independent Arduino functions for I2C EEPROM. * Enable USE_SHARED_EEPROM if not supplied by the framework. */ -#ifdef STM32F1 - #include "../../inc/MarlinConfig.h" #if ENABLED(IIC_BL24CXX_EEPROM) @@ -51,4 +52,4 @@ uint8_t eeprom_read_byte(uint8_t *pos) { } #endif // IIC_BL24CXX_EEPROM -#endif // STM32F1 +#endif // HAL_STM32 From 8fe84fcf870967d755b1bb884e380b75559f0bec Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 14 Aug 2021 00:54:13 +0000 Subject: [PATCH 218/323] [cron] Bump distribution date (2021-08-14) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index d9db58bfa677..9713c478801a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-13" +//#define STRING_DISTRIBUTION_DATE "2021-08-14" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c661bd2b91b8..eed4860c36d8 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-13" + #define STRING_DISTRIBUTION_DATE "2021-08-14" #endif /** From a307348b898f2d2a61c2a348a9e53034679bfe62 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 15 Aug 2021 00:57:42 +0000 Subject: [PATCH 219/323] [cron] Bump distribution date (2021-08-15) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 9713c478801a..16b613b1398e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-14" +//#define STRING_DISTRIBUTION_DATE "2021-08-15" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index eed4860c36d8..c9357a26bc0c 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-14" + #define STRING_DISTRIBUTION_DATE "2021-08-15" #endif /** From af0cd400bebdfd77baa068ab27b091611de1b20d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 15 Aug 2021 19:02:08 -0500 Subject: [PATCH 220/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20LCD=5FCOL=5FX=5FRJ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #22471 --- Marlin/src/lcd/lcdprint.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index 8bfd72e9f520..32d958bf7f33 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -79,7 +79,6 @@ // Graphical LCD uses the menu font size for cursor positioning #define LCD_COL_X(col) (( (col)) * (MENU_FONT_WIDTH)) #define LCD_ROW_Y(row) ((1 + (row)) * (MENU_LINE_HEIGHT)) - #define LCD_COL_X_RJ(len) (LCD_WIDTH - LCD_COL_X(len)) #else @@ -99,7 +98,6 @@ // Character LCD uses direct cursor positioning #define LCD_COL_X(col) (col) #define LCD_ROW_Y(row) (row) - #define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) #endif @@ -107,6 +105,7 @@ #define MENU_LINE_HEIGHT MENU_FONT_HEIGHT #endif +#define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) #define SETCURSOR(col, row) lcd_moveto(LCD_COL_X(col), LCD_ROW_Y(row)) #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_COL_X_RJ(len), LCD_ROW_Y(row)) #define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr) From d586340655b30362f4790cc1aa8082c7f37b902c Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 16 Aug 2021 00:57:32 +0000 Subject: [PATCH 221/323] [cron] Bump distribution date (2021-08-16) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 16b613b1398e..5324f841e5cb 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-15" +//#define STRING_DISTRIBUTION_DATE "2021-08-16" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c9357a26bc0c..684f606daf46 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-15" + #define STRING_DISTRIBUTION_DATE "2021-08-16" #endif /** From 510f8d3e0ccb07911c6d57f5c29f16cad86f6c02 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 15 Aug 2021 21:31:00 -0500 Subject: [PATCH 222/323] =?UTF-8?q?=F0=9F=92=9A=20Update=20STM32F103RET6?= =?UTF-8?q?=5Fcreality=20test=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/tests/STM32F103RET6_creality | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot/tests/STM32F103RET6_creality b/buildroot/tests/STM32F103RET6_creality index 8348b6347df0..8c4177b90746 100755 --- a/buildroot/tests/STM32F103RET6_creality +++ b/buildroot/tests/STM32F103RET6_creality @@ -9,11 +9,11 @@ set -e # # Build with configs included in the PR # -use_example_configs "Creality/Ender-3 V2" +use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_enable MARLIN_DEV_MODE BUFFER_MONITORING exec_test $1 $2 "Ender 3 v2" "$3" -use_example_configs "Creality/Ender-3 V2" +use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_disable CLASSIC_JERK opt_add SDCARD_EEPROM_EMULATION opt_set TEMP_SENSOR_BED 0 From 3e0d8e16aacfbf85f1254d4fb2229e9da66c8cac Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 17 Aug 2021 00:57:07 +0000 Subject: [PATCH 223/323] [cron] Bump distribution date (2021-08-17) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 5324f841e5cb..092d76f71d7c 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-16" +//#define STRING_DISTRIBUTION_DATE "2021-08-17" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 684f606daf46..4cc068511ebc 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-16" + #define STRING_DISTRIBUTION_DATE "2021-08-17" #endif /** From 09af42e1af38b441d44ddcc71b9d6906ce68b51d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 17 Aug 2021 06:18:19 -0500 Subject: [PATCH 224/323] Clean up CrealityUI and MarlinUI (#22586) --- Marlin/Configuration_adv.h | 2 +- Marlin/src/inc/SanityCheck.h | 2 + Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 7 +- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 24 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 1689 +++++++++++--------- Marlin/src/lcd/e3v2/creality/dwin.h | 13 - Marlin/src/lcd/e3v2/creality/dwin_lcd.h | 13 +- Marlin/src/lcd/language/language_en.h | 18 +- Marlin/src/lcd/menu/menu_media.cpp | 2 +- buildroot/tests/STM32F103RET6_creality | 2 +- 10 files changed, 948 insertions(+), 824 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 054a14161c23..2eecc0adb354 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1580,7 +1580,7 @@ */ #if HAS_MARLINUI_U8GLIB // Show SD percentage next to the progress bar - //#define DOGM_SD_PERCENT + //#define SHOW_SD_PERCENT // Save many cycles by drawing a hollow frame or no frame on the Info Screen //#define XYZ_NO_FRAME diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f1204532fec1..817bce28bc42 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -577,6 +577,8 @@ #error "CUSTOM_USER_MENUS has been replaced by CUSTOM_MENU_MAIN and CUSTOM_MENU_CONFIG." #elif defined(MKS_LCD12864) #error "MKS_LCD12864 is now MKS_LCD12864A or MKS_LCD12864B." +#elif defined(DOGM_SD_PERCENT) + #error "DOGM_SD_PERCENT is now SHOW_SD_PERCENT." #elif defined(NEOPIXEL_BKGD_LED_INDEX) #error "NEOPIXEL_BKGD_LED_INDEX is now NEOPIXEL_BKGD_INDEX_FIRST." #elif defined(TEMP_SENSOR_1_AS_REDUNDANT) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 25e943a14d14..33bb3e4b9212 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -354,12 +354,11 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop #if ENABLED(ADVANCED_PAUSE_FEATURE) void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) { - row_y1 = row * (MENU_FONT_HEIGHT) + 1; - row_y2 = row_y1 + MENU_FONT_HEIGHT - 1; + u8g_uint_t y1 = row * (MENU_FONT_HEIGHT) + 1, y2 = y1 + MENU_FONT_HEIGHT - 1; - if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return; + if (!PAGE_CONTAINS(y1 + 1, y2 + 2)) return; - lcd_put_wchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), row_y2, 'E'); + lcd_put_wchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), y2, 'E'); lcd_put_wchar((char)('1' + extruder)); lcd_put_wchar(' '); lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 5fe8b61bf4cc..8b707ba7c78a 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -456,13 +456,13 @@ void MarlinUI::draw_status_screen() { #endif #if HAS_PRINT_PROGRESS - #if DISABLED(DOGM_SD_PERCENT) + #if DISABLED(SHOW_SD_PERCENT) #define _SD_INFO_X(len) (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH) / 2 - (len) * (MENU_FONT_WIDTH) / 2) #else #define _SD_INFO_X(len) (LCD_PIXEL_WIDTH - (len) * (MENU_FONT_WIDTH)) #endif - #if ENABLED(DOGM_SD_PERCENT) + #if ENABLED(SHOW_SD_PERCENT) static char progress_string[5]; #endif static uint8_t lastElapsed = 0xFF, lastProgress = 0xFF; @@ -471,7 +471,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(SHOW_REMAINING_TIME) static u8g_uint_t estimation_x_pos = 0; static char estimation_string[10]; - #if BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY) + #if BOTH(SHOW_SD_PERCENT, ROTATE_PROGRESS_DISPLAY) static u8g_uint_t progress_x_pos = 0; static uint8_t progress_state = 0; static bool prev_blink = 0; @@ -526,7 +526,7 @@ void MarlinUI::draw_status_screen() { progress_bar_solid_width = u8g_uint_t((PROGRESS_BAR_WIDTH - 2) * (progress / (PROGRESS_SCALE)) * 0.01f); - #if ENABLED(DOGM_SD_PERCENT) + #if ENABLED(SHOW_SD_PERCENT) if (progress == 0) { progress_string[0] = '\0'; #if ENABLED(SHOW_REMAINING_TIME) @@ -543,7 +543,7 @@ void MarlinUI::draw_status_screen() { #endif } - constexpr bool can_show_days = DISABLED(DOGM_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY); + constexpr bool can_show_days = DISABLED(SHOW_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY); if (ev != lastElapsed) { lastElapsed = ev; const uint8_t len = elapsed.toDigital(elapsed_string, can_show_days && elapsed.value >= 60*60*24L); @@ -564,11 +564,7 @@ void MarlinUI::draw_status_screen() { else { duration_t estimation = timeval; const uint8_t len = estimation.toDigital(estimation_string, can_show_days && estimation.value >= 60*60*24L); - estimation_x_pos = _SD_INFO_X(len - #if !BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY) - + 1 - #endif - ); + estimation_x_pos = _SD_INFO_X(len + !BOTH(SHOW_SD_PERCENT, ROTATE_PROGRESS_DISPLAY)); } } #endif @@ -767,7 +763,7 @@ void MarlinUI::draw_status_screen() { if (PAGE_CONTAINS(EXTRAS_BASELINE - INFO_FONT_ASCENT, EXTRAS_BASELINE - 1)) { - #if ALL(DOGM_SD_PERCENT, SHOW_REMAINING_TIME, ROTATE_PROGRESS_DISPLAY) + #if ALL(SHOW_SD_PERCENT, SHOW_REMAINING_TIME, ROTATE_PROGRESS_DISPLAY) if (prev_blink != blink) { prev_blink = blink; @@ -789,13 +785,13 @@ void MarlinUI::draw_status_screen() { lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string); } - #else // !DOGM_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY + #else // !SHOW_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY // // SD Percent Complete // - #if ENABLED(DOGM_SD_PERCENT) + #if ENABLED(SHOW_SD_PERCENT) if (progress_string[0]) { lcd_put_u8str(55, EXTRAS_BASELINE, progress_string); // Percent complete lcd_put_wchar('%'); @@ -815,7 +811,7 @@ void MarlinUI::draw_status_screen() { #endif lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string); - #endif // !DOGM_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY + #endif // !SHOW_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY } #endif // HAS_PRINT_PROGRESS diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 05da343f9e43..f008a7a2b4f0 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -94,9 +94,6 @@ #define PAUSE_HEAT -#define USE_STRING_HEADINGS -//#define USE_STRING_TITLES - #define MENU_CHAR_LIMIT 24 #define STATUS_Y 360 @@ -121,20 +118,22 @@ #define DWIN_SCROLL_UPDATE_INTERVAL SEC_TO_MS(2) #define DWIN_REMAIN_TIME_UPDATE_INTERVAL SEC_TO_MS(20) -constexpr uint16_t TROWS = 6, MROWS = TROWS - 1, // Total rows, and other-than-Back - TITLE_HEIGHT = 30, // Title bar height - MLINE = 53, // Menu line height - LBLX = 60, // Menu item label X +#define TROWS 6 // Total rows +constexpr uint16_t MROWS = TROWS - 1, // Last Row Index + TITLE_HEIGHT = 30, // Title bar height + MLINE = 53, // Menu line height + LBLX = 60, // Menu item label X MENU_CHR_W = 8, STAT_CHR_W = 10; #define MBASE(L) (49 + MLINE * (L)) +#define EBASE(L) (MBASE(L) - 2 * DISABLED(USE_STRING_TITLES)) #define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, dwin_zoffset) #define DWIN_BOTTOM (DWIN_HEIGHT-1) #define DWIN_RIGHT (DWIN_WIDTH-1) -/* Value Init */ +// Value Init HMI_value_t HMI_ValueStruct; HMI_Flag_t HMI_flag{0}; @@ -228,166 +227,122 @@ void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t } } +typedef struct { uint16_t x, y, w, h; } icon_info_t; +typedef struct { uint16_t x, y[2], w, h; } text_info_t; + +void ICON_Button(const bool here, const int iconid, const icon_info_t &ico, const text_info_t (&txt)[2]) { + const bool cn = HMI_IsChinese(); + DWIN_ICON_Show(ICON, iconid + here, ico.x, ico.y); + if (here) DWIN_Draw_Rectangle(0, Color_White, ico.x, ico.y, ico.x + ico.w - 1, ico.y + ico.h - 1); + DWIN_Frame_AreaCopy(1, txt[cn].x, txt[cn].y[here], txt[cn].x + txt[cn].w - 1, txt[cn].y[here] + txt[cn].h - 1, ico.x + (ico.w - txt[cn].w) / 2, (ico.y + ico.h - 28) - txt[cn].h/2); +} + +// +// Main Menu: "Print" +// void ICON_Print() { - if (select_page.now == 0) { - DWIN_ICON_Show(ICON, ICON_Print_1, 17, 130); - DWIN_Draw_Rectangle(0, Color_White, 17, 130, 126, 229); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 447, 28, 460, 58, 201); - else - DWIN_Frame_AreaCopy(1, 1, 451, 31, 463, 57, 201); - } - else { - DWIN_ICON_Show(ICON, ICON_Print_0, 17, 130); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 405, 28, 420, 58, 201); - else - DWIN_Frame_AreaCopy(1, 1, 423, 31, 435, 57, 201); - } + constexpr icon_info_t ico = { 17, 130, 110, 100 }; + constexpr text_info_t txt[2] = { + { 1, { 417, 449 }, 30, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 0, ICON_Print_0, ico, txt); } +// +// Main Menu: "Prepare" +// void ICON_Prepare() { - if (select_page.now == 1) { - DWIN_ICON_Show(ICON, ICON_Prepare_1, 145, 130); - DWIN_Draw_Rectangle(0, Color_White, 145, 130, 254, 229); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 31, 447, 58, 460, 186, 201); - else - DWIN_Frame_AreaCopy(1, 33, 451, 82, 466, 175, 201); - } - else { - DWIN_ICON_Show(ICON, ICON_Prepare_0, 145, 130); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 31, 405, 58, 420, 186, 201); - else - DWIN_Frame_AreaCopy(1, 33, 423, 82, 438, 175, 201); - } + constexpr icon_info_t ico = { 145, 130, 110, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 417, 449 }, 51, 14 }, + { 31, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 1, ICON_Prepare_0, ico, txt); } +// +// Main Menu: "Control" +// void ICON_Control() { - if (select_page.now == 2) { - DWIN_ICON_Show(ICON, ICON_Control_1, 17, 246); - DWIN_Draw_Rectangle(0, Color_White, 17, 246, 126, 345); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 61, 447, 88, 460, 58, 318); - else - DWIN_Frame_AreaCopy(1, 85, 451, 132, 463, 48, 318); - } - else { - DWIN_ICON_Show(ICON, ICON_Control_0, 17, 246); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 61, 405, 88, 420, 58, 318); - else - DWIN_Frame_AreaCopy(1, 85, 423, 132, 434, 48, 318); - } + constexpr icon_info_t ico = { 17, 246, 110, 100 }; + constexpr text_info_t txt[2] = { + { 85, { 417, 449 }, 46, 14 }, + { 61, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 2, ICON_Control_0, ico, txt); } -void ICON_StartInfo(bool show) { - if (show) { - DWIN_ICON_Show(ICON, ICON_Info_1, 145, 246); - DWIN_Draw_Rectangle(0, Color_White, 145, 246, 254, 345); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 91, 447, 118, 460, 186, 318); - else - DWIN_Frame_AreaCopy(1, 132, 451, 159, 466, 186, 318); - } - else { - DWIN_ICON_Show(ICON, ICON_Info_0, 145, 246); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 91, 405, 118, 420, 186, 318); - else - DWIN_Frame_AreaCopy(1, 132, 423, 159, 435, 186, 318); - } +// +// Main Menu: "Info" +// +void ICON_StartInfo() { + constexpr icon_info_t ico = { 145, 246, 110, 100 }; + constexpr text_info_t txt[2] = { + { 133, { 417, 449 }, 23, 14 }, + { 91, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 3, ICON_Info_0, ico, txt); } -void ICON_Leveling(bool show) { - if (show) { - DWIN_ICON_Show(ICON, ICON_Leveling_1, 145, 246); - DWIN_Draw_Rectangle(0, Color_White, 145, 246, 254, 345); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 211, 447, 238, 460, 186, 318); - else - DWIN_Frame_AreaCopy(1, 84, 437, 120, 449, 182, 318); - } - else { - DWIN_ICON_Show(ICON, ICON_Leveling_0, 145, 246); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 211, 405, 238, 420, 186, 318); - else - DWIN_Frame_AreaCopy(1, 84, 465, 120, 478, 182, 318); - } +// +// Main Menu: "Level" +// +void ICON_Leveling() { + constexpr icon_info_t ico = { 145, 246, 110, 100 }; + constexpr text_info_t txt[2] = { + { 88, { 433, 464 }, 36, 14 }, + { 211, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 3, ICON_Leveling_0, ico, txt); } +// +// Printing: "Tune" +// void ICON_Tune() { - if (select_print.now == 0) { - DWIN_ICON_Show(ICON, ICON_Setup_1, 8, 252); - DWIN_Draw_Rectangle(0, Color_White, 8, 252, 87, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 121, 447, 148, 458, 34, 325); - else - DWIN_Frame_AreaCopy(1, 0, 466, 34, 476, 31, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Setup_0, 8, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 121, 405, 148, 420, 34, 325); - else - DWIN_Frame_AreaCopy(1, 0, 438, 32, 448, 31, 325); - } + constexpr icon_info_t ico = { 8, 252, 80, 100 }; + constexpr text_info_t txt[2] = { + { 0, { 433, 464 }, 32, 14 }, + { 121, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == 0, ICON_Setup_0, ico, txt); } +// +// Printing: "Pause" +// void ICON_Pause() { - if (select_print.now == 1) { - DWIN_ICON_Show(ICON, ICON_Pause_1, 96, 252); - DWIN_Draw_Rectangle(0, Color_White, 96, 252, 175, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 181, 447, 208, 459, 124, 325); - else - DWIN_Frame_AreaCopy(1, 177, 451, 216, 462, 116, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Pause_0, 96, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 181, 405, 208, 420, 124, 325); - else - DWIN_Frame_AreaCopy(1, 177, 423, 215, 433, 116, 325); - } + constexpr icon_info_t ico = { 96, 252, 80, 100 }; + constexpr text_info_t txt[2] = { + { 157, { 417, 449 }, 39, 14 }, + { 181, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == 1, ICON_Pause_0, ico, txt); } -void ICON_Continue() { - if (select_print.now == 1) { - DWIN_ICON_Show(ICON, ICON_Continue_1, 96, 252); - DWIN_Draw_Rectangle(0, Color_White, 96, 252, 175, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 447, 28, 460, 124, 325); - else - DWIN_Frame_AreaCopy(1, 1, 452, 32, 464, 121, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Continue_0, 96, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 405, 28, 420, 124, 325); - else - DWIN_Frame_AreaCopy(1, 1, 424, 31, 434, 121, 325); - } +// +// Printing: "Resume" +// +void ICON_Resume() { + constexpr icon_info_t ico = { 96, 252, 80, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 433, 464 }, 53, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == 1, ICON_Continue_0, ico, txt); } +// +// Printing: "Stop" +// void ICON_Stop() { - if (select_print.now == 2) { - DWIN_ICON_Show(ICON, ICON_Stop_1, 184, 252); - DWIN_Draw_Rectangle(0, Color_White, 184, 252, 263, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 151, 447, 178, 459, 210, 325); - else - DWIN_Frame_AreaCopy(1, 218, 452, 249, 466, 209, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Stop_0, 184, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 151, 405, 178, 420, 210, 325); - else - DWIN_Frame_AreaCopy(1, 218, 423, 247, 436, 209, 325); - } + constexpr icon_info_t ico = { 184, 252, 80, 100 }; + constexpr text_info_t txt[2] = { + { 196, { 417, 449 }, 29, 14 }, + { 151, { 405, 447 }, 27, 12 } + }; + ICON_Button(select_print.now == 2, ICON_Stop_0, ico, txt); } inline void Clear_Title_Bar() { @@ -425,7 +380,7 @@ void Draw_More_Icon(const uint8_t line) { } void Draw_Menu_Cursor(const uint8_t line) { - // DWIN_ICON_Show(ICON,ICON_Rectangle, 0, MBASE(line) - 18); + //DWIN_ICON_Show(ICON, ICON_Rectangle, 0, MBASE(line) - 18); DWIN_Draw_Rectangle(1, Rectangle_Color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); } @@ -474,22 +429,29 @@ void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34); } -void Draw_Chkb_Line(const uint8_t line, const bool mode) { - DWIN_Draw_Checkbox(Color_White, Color_Bg_Black, 225, MBASE(line) - 1, mode); +void Draw_Checkbox_Line(const uint8_t line, const bool ison) { + const uint16_t x = 225, y = EBASE(line) - 2; + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x + 5, y, F(ison ? "X" : " ")); + DWIN_Draw_Rectangle(0, Color_White, x + 2, y + 2, x + 17, y + 17); } -// The "Back" label is always on the first line -void Draw_Back_Label() { - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 129, 72, 156, 84, LBLX, MBASE(0)); - else - DWIN_Frame_AreaCopy(1, 226, 179, 256, 189, LBLX, MBASE(0)); +// AreaCopy for a Menu Item +void Item_AreaCopy(const uint16_t x1, const uint16_t y1, const uint16_t x2, const uint16_t y2, const uint8_t row=0, const uint16_t inset=0, const uint16_t yadd=0) { + DWIN_Frame_AreaCopy(1, x1, y1, x2, y2, LBLX + inset, MBASE(row) + yadd); +} + +// AreaCopy for a Screen Title +void DWIN_Frame_TitleCopy(const uint16_t x1, const uint16_t y1, const uint16_t w, const uint16_t h) { + DWIN_Frame_AreaCopy(1, x1, y1, x1 + w - 1, y1 + h - 1, (DWIN_WIDTH - w) / 2, (TITLE_HEIGHT - h) / 2); } // Draw "Back" line at the top void Draw_Back_First(const bool is_sel=true) { Draw_Menu_Line(0, ICON_Back); - Draw_Back_Label(); + if (HMI_IsChinese()) + Item_AreaCopy(129, 72, 156, 84); + else + Item_AreaCopy(223, 179, 254, 189); if (is_sel) Draw_Menu_Cursor(0); } @@ -562,42 +524,81 @@ inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, T &valref) // Draw Menus // -void DWIN_Draw_Label(const uint16_t y, char *string) { - DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, LBLX, y, string); +void say_move_en(const uint8_t row) { + Item_AreaCopy( 69, 61, 102, 71, row); // "Move" } -void DWIN_Draw_Label(const uint16_t y, const __FlashStringHelper *title) { - DWIN_Draw_Label(y, (char*)title); +void say_max_en(const uint8_t row) { + Item_AreaCopy( 75, 119, 100, 129, row); // "Max" } - -void draw_move_en(const uint16_t line) { - #ifdef USE_STRING_TITLES - DWIN_Draw_Label(line, F("Move")); - #else - DWIN_Frame_AreaCopy(1, 69, 61, 102, 71, LBLX, line); // "Move" - #endif +void say_jerk_en(const uint8_t row) { + Item_AreaCopy(104, 119, 128, 129, row, 30); // "Jerk" +} +void say_speed_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(133, 119, 172, 132, row, inset); // "Speed" +} +void say_max_accel_en(const uint8_t row) { + say_max_en(row); // "Max" + Item_AreaCopy( 0, 135, 79, 145, row, 30); // "Acceleration" +} +void say_max_jerk_speed_en(const uint8_t row) { + Item_AreaCopy( 75, 119, 172, 132, row); // "Max Jerk Speed" +} +void say_x_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(175, 119, 184, 129, row, inset); // "X" +} +void say_y_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(184, 119, 192, 129, row, inset); // "Y" +} +void say_z_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(193, 119, 201, 129, row, inset); // "Z" +} +void say_e_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(201, 119, 209, 129, row, inset); // "E" +} +void say_pla_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(131, 164, 153, 174, row, inset); // "PLA" +} +void say_abs_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(157, 76, 181, 86, row, inset); // "ABS" +} +void say_home_offs_en(const uint8_t row) { + Item_AreaCopy(153, 193, 225, 203, row); // "Home Offset" +} +void say_probe_offs_en(const uint8_t row) { + Item_AreaCopy(153, 205, 225, 215, row); // "Probe Offset" +} +void say_steps_per_mm_en(const uint8_t row) { + Item_AreaCopy( 1, 151, 91, 161, row); // "Steps-per-mm" } -inline void DWIN_Frame_TitleCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { - DWIN_Frame_AreaCopy(id, x1, y1, x2, y2, 14, 8); +void DWIN_Draw_Label(const uint8_t row, char *string) { + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(row), string); +} +void DWIN_Draw_Label(const uint8_t row, const __FlashStringHelper *title) { + DWIN_Draw_Label(row, (char*)title); } +// +// Prepare Menu +// + void Item_Prepare_Move(const uint8_t row) { if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 159, 70, 200, 84, LBLX, MBASE(row)); + Item_AreaCopy(159, 70, 200, 84, row); else - draw_move_en(MBASE(row)); // "Move" + say_move_en(row); // "Move" Draw_Menu_Line(row, ICON_Axis); Draw_More_Icon(row); } void Item_Prepare_Disable(const uint8_t row) { if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 204, 70, 259, 82, LBLX, MBASE(row)); + Item_AreaCopy(204, 70, 259, 82, row); else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), GET_TEXT_F(MSG_DISABLE_STEPPERS)); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_DISABLE_STEPPERS)); #else - DWIN_Frame_AreaCopy(1, 103, 59, 200, 74, LBLX, MBASE(row)); // "Disable Stepper" + Item_AreaCopy(104, 61, 191, 74, row); // "Disable Stepper" #endif } Draw_Menu_Line(row, ICON_CloseMotor); @@ -605,12 +606,12 @@ void Item_Prepare_Disable(const uint8_t row) { void Item_Prepare_Home(const uint8_t row) { if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 0, 89, 41, 101, LBLX, MBASE(row)); + Item_AreaCopy(0, 89, 41, 101, row); else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), GET_TEXT_F(MSG_AUTO_HOME)); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_AUTO_HOME)); #else - DWIN_Frame_AreaCopy(1, 202, 61, 271, 71, LBLX, MBASE(row)); // "Auto Home" + Item_AreaCopy(202, 61, 271, 71, row); // "Auto Home" #endif } Draw_Menu_Line(row, ICON_Homing); @@ -621,25 +622,25 @@ void Item_Prepare_Home(const uint8_t row) { void Item_Prepare_Offset(const uint8_t row) { if (HMI_IsChinese()) { #if HAS_BED_PROBE - DWIN_Frame_AreaCopy(1, 174, 164, 223, 177, LBLX, MBASE(row)); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(row), probe.offset.z * 100); + Item_AreaCopy(174, 164, 223, 177, row); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(row), probe.offset.z * 100); #else - DWIN_Frame_AreaCopy(1, 43, 89, 98, 101, LBLX, MBASE(row)); + Item_AreaCopy(43, 89, 98, 101, row); #endif } else { #if HAS_BED_PROBE #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); #else - DWIN_Frame_AreaCopy(1, 93, 179, 141, 189, LBLX, MBASE(row)); // "Z-Offset" + Item_AreaCopy(94, 179, 143, 190, row); // "Z-Offset" #endif - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(row), probe.offset.z * 100); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(row), probe.offset.z * 100); #else #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); #else - DWIN_Frame_AreaCopy(1, 1, 76, 106, 86, LBLX, MBASE(row)); // "Set home offsets" + Item_AreaCopy(1, 76, 103, 87, row); // "Set home offsets" #endif #endif } @@ -650,30 +651,28 @@ void Item_Prepare_Home(const uint8_t row) { #if HAS_HOTEND void Item_Prepare_PLA(const uint8_t row) { - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 100, 89, 151, 101, LBLX, MBASE(row)); - } + if (HMI_IsChinese()) + Item_AreaCopy(100, 89, 151, 101, row); else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), F("Preheat " PREHEAT_1_LABEL)); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_PREHEAT_1)); #else - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(row)); // "Preheat" - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX + 52, MBASE(row)); // "PLA" + Item_AreaCopy(108, 76, 155, 87, row); // "Preheat" + say_pla_en(52, row); // "PLA" #endif } Draw_Menu_Line(row, ICON_PLAPreheat); } void Item_Prepare_ABS(const uint8_t row) { - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 180, 89, 233, 100, LBLX, MBASE(row)); - } + if (HMI_IsChinese()) + Item_AreaCopy(180, 89, 233, 100, row); else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), F("Preheat " PREHEAT_2_LABEL)); + DWIN_Draw_Label(row, F("Preheat " PREHEAT_2_LABEL)); #else - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(row)); // "Preheat" - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX + 52, MBASE(row)); // "ABS" + Item_AreaCopy(108, 76, 155, 87, row); // "Preheat" + say_abs_en(52, row); // "ABS" #endif } Draw_Menu_Line(row, ICON_ABSPreheat); @@ -683,12 +682,12 @@ void Item_Prepare_Home(const uint8_t row) { #if HAS_PREHEAT void Item_Prepare_Cool(const uint8_t row) { if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 104, 56, 117, LBLX, MBASE(row)); + Item_AreaCopy(1, 104, 56, 117, row); else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), GET_TEXT_F(MSG_COOLDOWN)); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_COOLDOWN)); #else - DWIN_Frame_AreaCopy(1, 200, 76, 264, 86, LBLX, MBASE(row)); // "Cooldown" + Item_AreaCopy(200, 76, 264, 86, row); // "Cooldown" #endif } Draw_Menu_Line(row, ICON_Cool); @@ -697,33 +696,34 @@ void Item_Prepare_Home(const uint8_t row) { void Item_Prepare_Lang(const uint8_t row) { if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 239, 134, 266, 146, LBLX, MBASE(row)); + Item_AreaCopy(239, 134, 266, 146, row); else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(row), F("UI Language")); + DWIN_Draw_Label(row, F("UI Language")); #else - DWIN_Frame_AreaCopy(1, 0, 194, 121, 207, LBLX, MBASE(row)); // "Language selection" + Item_AreaCopy(1, 194, 96, 206, row); // "LCD Language" #endif } - DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 226, MBASE(row), HMI_IsChinese() ? F("CN") : F("EN")); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 226, EBASE(row), HMI_IsChinese() ? F("CN") : F("EN")); Draw_Menu_Icon(row, ICON_Language); } +#define VISI(T,L,S) (WITHIN(L, T - MROWS, MROWS) || WITHIN(S, 0, MROWS)) + void Draw_Prepare_Menu() { Clear_Main_Window(); const int16_t scroll = MROWS - index_prepare; // Scrolled-up lines #define PSCROL(L) (scroll + (L)) - #define PVISI(L) WITHIN(PSCROL(L), 0, MROWS) + #define PVISI(L) VISI(PREPARE_CASE_TOTAL, L, PSCROL(L)) - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 133, 1, 160, 13); // "Prepare" - } + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(133, 1, 28, 13); // "Prepare" else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_PREPARE)); #else - DWIN_Frame_TitleCopy(1, 178, 2, 229, 14); // "Prepare" + DWIN_Frame_TitleCopy(179, 0, 48, 14); // "Prepare" #endif } @@ -746,80 +746,125 @@ void Draw_Prepare_Menu() { if (select_prepare.now) Draw_Menu_Cursor(PSCROL(select_prepare.now)); } -void Item_Control_Info(const uint16_t line) { +// +// Control Menu +// + +void Item_Control_Temp(const uint16_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(57, 104, 84, 116, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_TEMPERATURE)); + #else + Item_AreaCopy(1, 89, 83, 101, row); + #endif + } + Draw_Menu_Line(row, ICON_Temperature); + Draw_More_Icon(row); +} + +void Item_Control_Motion(const uint16_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(87, 104, 114, 116, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_MOTION)); + #else + Item_AreaCopy(84, 89, 128, 99, row); + #endif + } + Draw_Menu_Line(row, ICON_Motion); + Draw_More_Icon(row); +} + +void Item_Control_Advanced(const uint16_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(62, 180, 120, 192, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); + #else + Item_AreaCopy(82, 135, 200, 149, row); + #endif + } + Draw_Menu_Line(row, ICON_AdvSet); + Draw_More_Icon(row); +} + +void Item_Control_Info(const uint16_t row) { if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 231, 104, 258, 116, LBLX, line); + Item_AreaCopy(231, 104, 258, 116, row); else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(line, F("Info")); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_INFO_SCREEN)); #else - DWIN_Frame_AreaCopy(1, 0, 104, 24, 114, LBLX, line); + Item_AreaCopy(0, 104, 24, 114, row); #endif } + Draw_Menu_Line(row, ICON_Info); + Draw_More_Icon(row); } void Draw_Control_Menu() { Clear_Main_Window(); - #if CONTROL_CASE_TOTAL >= 6 + #if CONTROL_CASE_TOTAL >= TROWS const int16_t scroll = MROWS - index_control; // Scrolled-up lines - #define CSCROL(L) (scroll + (L)) #else - #define CSCROL(L) (L) + constexpr int16_t scroll = 0; #endif - #define CLINE(L) MBASE(CSCROL(L)) - #define CVISI(L) WITHIN(CSCROL(L), 0, MROWS) - - if (CVISI(0)) Draw_Back_First(select_control.now == 0); // < Back + #define CSCROL(L) (scroll + (L)) + #define CLINE(L) MBASE(CSCROL(L)) + #define CVISI(L) VISI(CONTROL_CASE_TOTAL, L, CSCROL(L)) - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 103, 1, 130, 14); // "Control" + // "Control" Title + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(103, 1, 28, 14); + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_CONTROL)); + #else + DWIN_Frame_TitleCopy(128, 2, 49, 11); // "Control" + #endif + } - DWIN_Frame_AreaCopy(1, 57, 104, 84, 116, LBLX, CLINE(CONTROL_CASE_TEMP)); // Temperature > - DWIN_Frame_AreaCopy(1, 87, 104, 114, 116, LBLX, CLINE(CONTROL_CASE_MOVE)); // Motion > + if (CVISI(0)) Draw_Back_First(select_control.now == 0); // < Back + if (CVISI(CONTROL_CASE_TEMP)) Item_Control_Temp(CSCROL(CONTROL_CASE_TEMP)); // Temperature > + if (CVISI(CONTROL_CASE_MOVE)) Item_Control_Motion(CSCROL(CONTROL_CASE_MOVE)); // Motion > + if (HMI_IsChinese()) { #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 117, 104, 172, 116, LBLX, CLINE(CONTROL_CASE_SAVE)); // Store Configuration - DWIN_Frame_AreaCopy(1, 174, 103, 229, 116, LBLX, CLINE(CONTROL_CASE_LOAD)); // Read Configuration - DWIN_Frame_AreaCopy(1, 1, 118, 56, 131, LBLX, CLINE(CONTROL_CASE_RESET)); // Reset Configuration + Item_AreaCopy(117, 104, 172, 116, CSCROL(CONTROL_CASE_SAVE)); // "Store Configuration" + Item_AreaCopy(174, 103, 229, 116, CSCROL(CONTROL_CASE_LOAD)); // "Read Configuration" + Item_AreaCopy( 1, 118, 56, 131, CSCROL(CONTROL_CASE_RESET)); // "Reset Configuration" #endif } else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_CONTROL)); - #else - DWIN_Frame_TitleCopy(1, 128, 2, 176, 12); // "Control" - #endif #ifdef USE_STRING_TITLES - if (CVISI(CONTROL_CASE_TEMP)) DWIN_Draw_Label(CLINE(CONTROL_CASE_TEMP), GET_TEXT_F(MSG_TEMPERATURE)); - if (CVISI(CONTROL_CASE_MOVE)) DWIN_Draw_Label(CLINE(CONTROL_CASE_MOVE), GET_TEXT_F(MSG_MOTION)); #if ENABLED(EEPROM_SETTINGS) - if (CVISI(CONTROL_CASE_SAVE)) DWIN_Draw_Label(CLINE(CONTROL_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); - if (CVISI(CONTROL_CASE_LOAD)) DWIN_Draw_Label(CLINE(CONTROL_CASE_LOAD), GET_TEXT_F(MSG_LOAD_EEPROM)); - if (CVISI(CONTROL_CASE_RESET)) DWIN_Draw_Label(CLINE(CONTROL_CASE_RESET), GET_TEXT_F(MSG_RESTORE_DEFAULTS)); + if (CVISI(CONTROL_CASE_SAVE)) DWIN_Draw_Label(CSCROL(CONTROL_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); // "Store Configuration" + if (CVISI(CONTROL_CASE_LOAD)) DWIN_Draw_Label(CSCROL(CONTROL_CASE_LOAD), GET_TEXT_F(MSG_LOAD_EEPROM)); // "Read Configuration" + if (CVISI(CONTROL_CASE_RESET)) DWIN_Draw_Label(CSCROL(CONTROL_CASE_RESET), GET_TEXT_F(MSG_RESTORE_DEFAULTS)); // "Reset Configuration" #endif #else - if (CVISI(CONTROL_CASE_TEMP)) DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX, CLINE(CONTROL_CASE_TEMP)); // Temperature > - if (CVISI(CONTROL_CASE_MOVE)) DWIN_Frame_AreaCopy(1, 84, 89, 128, 99, LBLX, CLINE(CONTROL_CASE_MOVE)); // Motion > #if ENABLED(EEPROM_SETTINGS) - if (CVISI(CONTROL_CASE_SAVE)) DWIN_Frame_AreaCopy(1, 148, 89, 268, 101, LBLX , CLINE(CONTROL_CASE_SAVE)); // "Store Configuration" + if (CVISI(CONTROL_CASE_SAVE)) + Item_AreaCopy(150, 89, 263, 102, CSCROL(CONTROL_CASE_SAVE)); // "Store Configuration" if (CVISI(CONTROL_CASE_LOAD)) { - DWIN_Frame_AreaCopy(1, 26, 104, 57, 114, LBLX , CLINE(CONTROL_CASE_LOAD)); // "Read" - DWIN_Frame_AreaCopy(1, 182, 89, 268, 101, LBLX + 34, CLINE(CONTROL_CASE_LOAD)); // "Configuration" + Item_AreaCopy( 26, 104, 57, 114, CSCROL(CONTROL_CASE_LOAD)); // "Read" + Item_AreaCopy(182, 89, 263, 102, CSCROL(CONTROL_CASE_LOAD), 34); // "Configuration" } if (CVISI(CONTROL_CASE_RESET)) { - DWIN_Frame_AreaCopy(1, 59, 104, 93, 114, LBLX , CLINE(CONTROL_CASE_RESET)); // "Reset" - DWIN_Frame_AreaCopy(1, 182, 89, 268, 101, LBLX + 37, CLINE(CONTROL_CASE_RESET)); // "Configuration" + Item_AreaCopy( 59, 104, 93, 114, CSCROL(CONTROL_CASE_RESET)); // "Reset" + Item_AreaCopy(182, 89, 263, 102, CSCROL(CONTROL_CASE_RESET), 37); // "Configuration" } #endif #endif } - if (CVISI(CONTROL_CASE_ADVSET)) { - DWIN_Draw_Label(CLINE(CONTROL_CASE_ADVSET), GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // Advanced Settings - } - - if (CVISI(CONTROL_CASE_INFO)) Item_Control_Info(CLINE(CONTROL_CASE_INFO)); + if (CVISI(CONTROL_CASE_ADVSET)) Item_Control_Advanced(CSCROL(CONTROL_CASE_ADVSET)); + if (CVISI(CONTROL_CASE_INFO)) Item_Control_Info(CSCROL(CONTROL_CASE_INFO)); if (select_control.now && CVISI(select_control.now)) Draw_Menu_Cursor(CSCROL(select_control.now)); @@ -834,72 +879,77 @@ void Draw_Control_Menu() { } \ } while(0) - _TEMP_ICON(CONTROL_CASE_TEMP, ICON_Temperature, true); - _TEMP_ICON(CONTROL_CASE_MOVE, ICON_Motion, true); - #if ENABLED(EEPROM_SETTINGS) _TEMP_ICON(CONTROL_CASE_SAVE, ICON_WriteEEPROM, false); _TEMP_ICON(CONTROL_CASE_LOAD, ICON_ReadEEPROM, false); _TEMP_ICON(CONTROL_CASE_RESET, ICON_ResumeEEPROM, false); #endif +} - _TEMP_ICON(CONTROL_CASE_ADVSET, ICON_AdvSet, true); - _TEMP_ICON(CONTROL_CASE_INFO, ICON_Info, true); +void Draw_Edit_Integer3(const uint8_t line, const uint16_t value, const bool active=false) { + DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 3, 220, EBASE(line), value); } +void Draw_Edit_Integer4(const uint8_t line, const uint16_t value, const bool active=false) { + DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 4, 210, EBASE(line), value); +} + +// +// Tune Menu +// + void Draw_Tune_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 73, 2, 100, 13); - DWIN_Frame_AreaCopy(1, 116, 164, 171, 176, LBLX, MBASE(TUNE_CASE_SPEED)); + DWIN_Frame_TitleCopy(73, 2, 28, 12); // "Tune" + Item_AreaCopy(116, 164, 171, 176, TUNE_CASE_SPEED); #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX, MBASE(TUNE_CASE_TEMP)); + Item_AreaCopy(1, 134, 56, 146, TUNE_CASE_TEMP); #endif #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX, MBASE(TUNE_CASE_BED)); + Item_AreaCopy(58, 134, 113, 146, TUNE_CASE_BED); #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX, MBASE(TUNE_CASE_FAN)); + Item_AreaCopy(115, 134, 170, 146, TUNE_CASE_FAN); #endif #if HAS_ZOFFSET_ITEM - DWIN_Frame_AreaCopy(1, 174, 164, 223, 177, LBLX, MBASE(TUNE_CASE_ZOFF)); + Item_AreaCopy(174, 164, 223, 177, TUNE_CASE_ZOFF); #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_TUNE)); #else - DWIN_Frame_AreaCopy(1, 94, 2, 126, 12, 14, 9); + DWIN_Frame_TitleCopy(94, 2, 33, 11); // "Tune" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(TUNE_CASE_SPEED), GET_TEXT_F(MSG_SPEED)); + DWIN_Draw_Label(TUNE_CASE_SPEED, GET_TEXT_F(MSG_SPEED)); #if HAS_HOTEND - DWIN_Draw_Label(MBASE(TUNE_CASE_TEMP), GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); + DWIN_Draw_Label(TUNE_CASE_TEMP, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); #endif #if HAS_HEATED_BED - DWIN_Draw_Label(MBASE(TUNE_CASE_BED), GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); + DWIN_Draw_Label(TUNE_CASE_BED, GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); #endif #if HAS_FAN - DWIN_Draw_Label(MBASE(TUNE_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); + DWIN_Draw_Label(TUNE_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); #endif - DWIN_Draw_Label(MBASE(TUNE_CASE_ZOFF), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); + DWIN_Draw_Label(TUNE_CASE_ZOFF, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); #else - DWIN_Frame_TitleCopy(1, 94, 2, 126, 12); - DWIN_Frame_AreaCopy(1, 1, 179, 92, 190, LBLX, MBASE(TUNE_CASE_SPEED)); // Print speed + Item_AreaCopy(1, 179, 92, 190, TUNE_CASE_SPEED); // "Print speed" #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX, MBASE(TUNE_CASE_TEMP)); // Hotend... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 44, MBASE(TUNE_CASE_TEMP)); // ...Temperature + Item_AreaCopy(197, 104, 238, 114, TUNE_CASE_TEMP); // "Hotend" + Item_AreaCopy( 1, 89, 83, 101, TUNE_CASE_TEMP, 44); // "Temperature" #endif #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX, MBASE(TUNE_CASE_BED)); // Bed... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 27, MBASE(TUNE_CASE_BED)); // ...Temperature + Item_AreaCopy(240, 104, 264, 114, TUNE_CASE_BED); // "Bed" + Item_AreaCopy( 1, 89, 83, 101, TUNE_CASE_BED, 27); // "Temperature" #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX, MBASE(TUNE_CASE_FAN)); // Fan speed + Item_AreaCopy(0, 119, 64, 132, TUNE_CASE_FAN); // "Fan speed" #endif #if HAS_ZOFFSET_ITEM - DWIN_Frame_AreaCopy(1, 93, 179, 141, 189, LBLX, MBASE(TUNE_CASE_ZOFF)); // Z-offset + Item_AreaCopy(93, 179, 141, 189, TUNE_CASE_ZOFF); // "Z-offset" #endif #endif } @@ -908,90 +958,64 @@ void Draw_Tune_Menu() { if (select_tune.now) Draw_Menu_Cursor(select_tune.now); Draw_Menu_Line(TUNE_CASE_SPEED, ICON_Speed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_SPEED), feedrate_percentage); + Draw_Edit_Integer3(TUNE_CASE_SPEED, feedrate_percentage); #if HAS_HOTEND Draw_Menu_Line(TUNE_CASE_TEMP, ICON_HotendTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_TEMP), thermalManager.degTargetHotend(0)); + Draw_Edit_Integer3(TUNE_CASE_TEMP, thermalManager.degTargetHotend(0)); #endif #if HAS_HEATED_BED Draw_Menu_Line(TUNE_CASE_BED, ICON_BedTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_BED), thermalManager.degTargetBed()); + Draw_Edit_Integer3(TUNE_CASE_BED, thermalManager.degTargetBed()); #endif #if HAS_FAN Draw_Menu_Line(TUNE_CASE_FAN, ICON_FanSpeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_FAN), thermalManager.fan_speed[0]); + Draw_Edit_Integer3(TUNE_CASE_FAN, thermalManager.fan_speed[0]); #endif #if HAS_ZOFFSET_ITEM Draw_Menu_Line(TUNE_CASE_ZOFF, ICON_Zoffset); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(TUNE_CASE_ZOFF), BABY_Z_VAR * 100); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(TUNE_CASE_ZOFF), BABY_Z_VAR * 100); #endif } -void draw_max_en(const uint16_t line) { - DWIN_Frame_AreaCopy(1, 245, 119, 269, 129, LBLX, line); // "Max" -} -void draw_max_accel_en(const uint16_t line) { - draw_max_en(line); - DWIN_Frame_AreaCopy(1, 1, 135, 79, 145, LBLX + 27, line); // "Acceleration" -} -void draw_speed_en(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 184, 119, 224, 132, LBLX + inset, line); // "Speed" -} -void draw_jerk_en(const uint16_t line) { - DWIN_Frame_AreaCopy(1, 64, 119, 106, 129, LBLX + 27, line); // "Jerk" -} -void draw_steps_per_mm(const uint16_t line) { - DWIN_Frame_AreaCopy(1, 1, 151, 101, 161, LBLX, line); // "Steps-per-mm" -} -void say_x(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 95, 104, 102, 114, LBLX + inset, line); // "X" -} -void say_y(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 104, 104, 110, 114, LBLX + inset, line); // "Y" -} -void say_z(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 112, 104, 120, 114, LBLX + inset, line); // "Z" -} -void say_e(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 237, 119, 244, 129, LBLX + inset, line); // "E" -} - +// +// Motion Menu +// void Draw_Motion_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Motion" - DWIN_Frame_AreaCopy(1, 173, 133, 228, 147, LBLX, MBASE(MOTION_CASE_RATE)); // Max speed - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(MOTION_CASE_ACCEL)); // Max... - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(MOTION_CASE_ACCEL) + 1); // ...Acceleration + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Motion" + Item_AreaCopy(173, 133, 228, 147, MOTION_CASE_RATE); // Max speed + Item_AreaCopy(173, 133, 200, 147, MOTION_CASE_ACCEL); // Max... + Item_AreaCopy(28, 149, 69, 161, MOTION_CASE_ACCEL, 30, 1); // ...Acceleration #if HAS_CLASSIC_JERK - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(MOTION_CASE_JERK)); // Max... - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(MOTION_CASE_JERK) + 1); // ... - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 54, MBASE(MOTION_CASE_JERK)); // ...Jerk + Item_AreaCopy(173, 133, 200, 147, MOTION_CASE_JERK); // Max... + Item_AreaCopy(1, 180, 28, 192, MOTION_CASE_JERK, 30, 1); // ... + Item_AreaCopy(202, 133, 228, 147, MOTION_CASE_JERK, 57); // ...Jerk #endif - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(MOTION_CASE_STEPS)); // Flow ratio + Item_AreaCopy(153, 148, 194, 161, MOTION_CASE_STEPS); // Flow ratio } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_MOTION)); #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Motion" + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Motion" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(MOTION_CASE_RATE), F("Feedrate")); - DWIN_Draw_Label(MBASE(MOTION_CASE_ACCEL), GET_TEXT_F(MSG_ACCELERATION)); + DWIN_Draw_Label(MOTION_CASE_RATE, F("Feedrate")); // "Feedrate" + DWIN_Draw_Label(MOTION_CASE_ACCEL, GET_TEXT_F(MSG_ACCELERATION)); // "Acceleration" #if HAS_CLASSIC_JERK - DWIN_Draw_Label(MBASE(MOTION_CASE_JERK), GET_TEXT_F(MSG_JERK)); + DWIN_Draw_Label(MOTION_CASE_JERK, GET_TEXT_F(MSG_JERK)); // "Jerk" #endif - DWIN_Draw_Label(MBASE(MOTION_CASE_STEPS), GET_TEXT_F(MSG_STEPS_PER_MM)); + DWIN_Draw_Label(MOTION_CASE_STEPS, GET_TEXT_F(MSG_STEPS_PER_MM)); // "Steps/mm" #else - draw_max_en(MBASE(MOTION_CASE_RATE)); draw_speed_en(27, MBASE(MOTION_CASE_RATE)); // "Max Speed" - draw_max_accel_en(MBASE(MOTION_CASE_ACCEL)); // "Max Acceleration" + say_max_en(MOTION_CASE_RATE); say_speed_en(30, MOTION_CASE_RATE); // "Max Speed" + say_max_accel_en(MOTION_CASE_ACCEL); // "Max Acceleration" #if HAS_CLASSIC_JERK - draw_max_en(MBASE(MOTION_CASE_JERK)); draw_jerk_en(MBASE(MOTION_CASE_JERK)); // "Max Jerk" + say_max_en(MOTION_CASE_JERK); say_jerk_en(MOTION_CASE_JERK); // "Max Jerk" #endif - draw_steps_per_mm(MBASE(MOTION_CASE_STEPS)); // "Steps-per-mm" + say_steps_per_mm_en(MOTION_CASE_STEPS); // "Steps-per-mm" #endif } @@ -1020,9 +1044,9 @@ void Draw_Motion_Menu() { if (toohigh) { DWIN_ICON_Show(ICON, ICON_TempTooHigh, 102, 165); if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285); + DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285); // Temp Too High DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285); - DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); + DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); } else { DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); @@ -1032,7 +1056,7 @@ void Draw_Motion_Menu() { else { DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 165); if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 103, 371, 270, 386, 52, 285); + DWIN_Frame_AreaCopy(1, 103, 371, 270, 386, 52, 285); // Tenp Too Low DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); } else { @@ -1055,7 +1079,7 @@ void Draw_Popup_Bkgd_60() { Draw_Popup_Bkgd_60(); DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105); if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); + DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); // Nozzle Too Cold DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 69 + 33, 240); DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280); } @@ -1071,7 +1095,7 @@ void Popup_Window_Resume() { Clear_Popup_Area(); Draw_Popup_Bkgd_105(); if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 135); + DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 135); // Resume Interrupted Print DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 192); DWIN_ICON_Show(ICON, ICON_Cancel_C, 26, 307); DWIN_ICON_Show(ICON, ICON_Continue_C, 146, 307); @@ -1090,7 +1114,7 @@ void Popup_Window_Home(const bool parking/*=false*/) { Draw_Popup_Bkgd_60(); DWIN_ICON_Show(ICON, ICON_BLTouch, 101, 105); if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 0, 371, 33, 386, 85, 240); + DWIN_Frame_AreaCopy(1, 0, 371, 33, 386, 85, 240); // Wait for Move to Complete DWIN_Frame_AreaCopy(1, 203, 286, 271, 302, 118, 240); DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); } @@ -1107,7 +1131,7 @@ void Popup_Window_Home(const bool parking/*=false*/) { Draw_Popup_Bkgd_60(); DWIN_ICON_Show(ICON, ICON_AutoLeveling, 101, 105); if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 0, 371, 100, 386, 84, 240); + DWIN_Frame_AreaCopy(1, 0, 371, 100, 386, 84, 240); // Wait for Leveling DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); } else { @@ -1132,8 +1156,8 @@ void Popup_window_PauseOrStop() { Clear_Main_Window(); Draw_Popup_Bkgd_60(); if (HMI_IsChinese()) { - if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); - else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); + if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); // Pause Print + else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); // Stop Print DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); DWIN_ICON_Show(ICON, ICON_Confirm_C, 26, 280); DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280); @@ -1149,14 +1173,14 @@ void Popup_window_PauseOrStop() { void Draw_Printing_Screen() { if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 30, 1, 71, 14, 14, 9); // Tune - DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 41, 188); // Pause - DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 176, 188); // Stop + DWIN_Frame_TitleCopy(30, 1, 42, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 41, 188); // "Printing Time" + DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 176, 188); // "Remain" } else { - DWIN_Frame_AreaCopy(1, 40, 2, 92, 14, 14, 9); // Tune - DWIN_Frame_AreaCopy(1, 0, 44, 96, 58, 41, 188); // Pause - DWIN_Frame_AreaCopy(1, 98, 44, 152, 58, 176, 188); // Stop + DWIN_Frame_TitleCopy(42, 0, 47, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 1, 43, 97, 59, 41, 188); // "Printing Time" + DWIN_Frame_AreaCopy(1, 100, 43, 152, 56, 176, 188); // "Remain" } } @@ -1180,6 +1204,13 @@ void Draw_Print_ProgressRemain() { DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 200, 212, (_remain_time % 3600) / 60); } +void ICON_ResumeOrPause() { + if (printingIsPaused() || HMI_flag.pause_flag || HMI_flag.pause_action) + ICON_Resume(); + else + ICON_Pause(); +} + void Goto_PrintProcess() { checkkey = PrintProcess; @@ -1187,7 +1218,7 @@ void Goto_PrintProcess() { Draw_Printing_Screen(); ICON_Tune(); - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); + ICON_ResumeOrPause(); ICON_Stop(); // Copy into filebuf string before entry @@ -1209,12 +1240,12 @@ void Goto_MainMenu() { Clear_Main_Window(); if (HMI_IsChinese()) - DWIN_Frame_TitleCopy(1, 2, 2, 27, 14); // "Home" + DWIN_Frame_TitleCopy(2, 2, 26, 13); // "Home" etc else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_MAIN)); #else - DWIN_Frame_TitleCopy(1, 0, 2, 39, 12); + DWIN_Frame_TitleCopy(0, 2, 40, 11); // "Home" #endif } @@ -1223,7 +1254,7 @@ void Goto_MainMenu() { ICON_Print(); ICON_Prepare(); ICON_Control(); - TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(select_page.now == 3); + TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); } inline ENCODER_DiffState get_encoder_state() { @@ -1253,11 +1284,13 @@ void HMI_Move_Done(const AxisEnum axis) { void HMI_Move_X() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scaled)) + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scaled)) { + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); return HMI_Move_Done(X_AXIS); + } LIMIT(HMI_ValueStruct.Move_X_scaled, (X_MIN_POS) * MINUNITMULT, (X_MAX_POS) * MINUNITMULT); current_position.x = HMI_ValueStruct.Move_X_scaled / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); DWIN_UpdateLCD(); HMI_Plan_Move(homing_feedrate(X_AXIS)); } @@ -1266,11 +1299,13 @@ void HMI_Move_X() { void HMI_Move_Y() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scaled)) + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scaled)) { + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); return HMI_Move_Done(Y_AXIS); + } LIMIT(HMI_ValueStruct.Move_Y_scaled, (Y_MIN_POS) * MINUNITMULT, (Y_MAX_POS) * MINUNITMULT); current_position.y = HMI_ValueStruct.Move_Y_scaled / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); DWIN_UpdateLCD(); HMI_Plan_Move(homing_feedrate(Y_AXIS)); } @@ -1279,11 +1314,13 @@ void HMI_Move_Y() { void HMI_Move_Z() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scaled)) + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scaled)) { + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); return HMI_Move_Done(Z_AXIS); + } LIMIT(HMI_ValueStruct.Move_Z_scaled, (Z_MIN_POS) * MINUNITMULT, (Z_MAX_POS) * MINUNITMULT); current_position.z = HMI_ValueStruct.Move_Z_scaled / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); DWIN_UpdateLCD(); HMI_Plan_Move(homing_feedrate(Z_AXIS)); } @@ -1297,11 +1334,12 @@ void HMI_Move_Z() { if (encoder_diffState != ENCODER_DIFF_NO) { if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_E_scaled)) { last_E_scaled = HMI_ValueStruct.Move_E_scaled; + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(4), last_E_scaled); return HMI_Move_Done(E_AXIS); } LIMIT(HMI_ValueStruct.Move_E_scaled, last_E_scaled - (EXTRUDE_MAXLENGTH) * MINUNITMULT, last_E_scaled + (EXTRUDE_MAXLENGTH) * MINUNITMULT); current_position.e = HMI_ValueStruct.Move_E_scaled / MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(4), HMI_ValueStruct.Move_E_scaled); DWIN_UpdateLCD(); HMI_Plan_Move(MMM_TO_MMS(FEEDRATE_E)); } @@ -1328,7 +1366,7 @@ void HMI_Move_Z() { TERN_(EEPROM_SETTINGS, settings.save()); #endif checkkey = HMI_ValueStruct.show_mode == -4 ? Prepare : Tune; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(zoff_line), TERN(HAS_BED_PROBE, BABY_Z_VAR * 100, HMI_ValueStruct.offset_value)); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(zoff_line), TERN(HAS_BED_PROBE, BABY_Z_VAR * 100, HMI_ValueStruct.offset_value)); DWIN_UpdateLCD(); return; } @@ -1338,7 +1376,7 @@ void HMI_Move_Z() { #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); #endif - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(zoff_line), HMI_ValueStruct.offset_value); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, EBASE(zoff_line), HMI_ValueStruct.offset_value); DWIN_UpdateLCD(); } } @@ -1362,27 +1400,27 @@ void HMI_Move_Z() { if (HMI_ValueStruct.show_mode == -2) { checkkey = PLAPreheat; ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(temp_line), ui.material_preset[0].hotend_temp); + Draw_Edit_Integer3(temp_line, ui.material_preset[0].hotend_temp); return; } else if (HMI_ValueStruct.show_mode == -3) { checkkey = ABSPreheat; ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(temp_line), ui.material_preset[1].hotend_temp); + Draw_Edit_Integer3(temp_line, ui.material_preset[1].hotend_temp); return; } else if (HMI_ValueStruct.show_mode == -1) // Temperature checkkey = TemperatureID; else checkkey = Tune; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(temp_line), HMI_ValueStruct.E_Temp); + Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp); thermalManager.setTargetHotend(HMI_ValueStruct.E_Temp, 0); return; } // E_Temp limit LIMIT(HMI_ValueStruct.E_Temp, HEATER_0_MINTEMP, thermalManager.hotend_max_target(0)); // E_Temp value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(temp_line), HMI_ValueStruct.E_Temp); + Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp, true); } } @@ -1405,27 +1443,27 @@ void HMI_Move_Z() { if (HMI_ValueStruct.show_mode == -2) { checkkey = PLAPreheat; ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(bed_line), ui.material_preset[0].bed_temp); + Draw_Edit_Integer3(bed_line, ui.material_preset[0].bed_temp); return; } else if (HMI_ValueStruct.show_mode == -3) { checkkey = ABSPreheat; ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(bed_line), ui.material_preset[1].bed_temp); + Draw_Edit_Integer3(bed_line, ui.material_preset[1].bed_temp); return; } else if (HMI_ValueStruct.show_mode == -1) checkkey = TemperatureID; else checkkey = Tune; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(bed_line), HMI_ValueStruct.Bed_Temp); + Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp); thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp); return; } // Bed_Temp limit LIMIT(HMI_ValueStruct.Bed_Temp, BED_MINTEMP, BED_MAX_TARGET); // Bed_Temp value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(bed_line), HMI_ValueStruct.Bed_Temp); + Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp, true); } } @@ -1449,27 +1487,27 @@ void HMI_Move_Z() { if (HMI_ValueStruct.show_mode == -2) { checkkey = PLAPreheat; ui.material_preset[0].fan_speed = HMI_ValueStruct.Fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(fan_line), ui.material_preset[0].fan_speed); + Draw_Edit_Integer3(fan_line, ui.material_preset[0].fan_speed); return; } else if (HMI_ValueStruct.show_mode == -3) { checkkey = ABSPreheat; ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(fan_line), ui.material_preset[1].fan_speed); + Draw_Edit_Integer3(fan_line, ui.material_preset[1].fan_speed); return; } else if (HMI_ValueStruct.show_mode == -1) checkkey = TemperatureID; else checkkey = Tune; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(fan_line), HMI_ValueStruct.Fan_speed); + Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed); thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed); return; } // Fan_speed limit LIMIT(HMI_ValueStruct.Fan_speed, 0, 255); // Fan_speed value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(fan_line), HMI_ValueStruct.Fan_speed); + Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed, true); } } @@ -1482,13 +1520,13 @@ void HMI_PrintSpeed() { checkkey = Tune; EncoderRate.enabled = false; feedrate_percentage = HMI_ValueStruct.print_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(select_tune.now + MROWS - index_tune), HMI_ValueStruct.print_speed); + Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed); return; } // print_speed limit LIMIT(HMI_ValueStruct.print_speed, MIN_PRINT_SPEED, MAX_PRINT_SPEED); // print_speed value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(select_tune.now + MROWS - index_tune), HMI_ValueStruct.print_speed); + Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed, true); } } @@ -1502,7 +1540,7 @@ void HMI_MaxFeedspeedXYZE() { EncoderRate.enabled = false; if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, LAST_AXIS)) planner.set_max_feedrate(HMI_flag.feedspeed_axis, HMI_ValueStruct.Max_Feedspeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed); return; } // MaxFeedspeed limit @@ -1510,7 +1548,7 @@ void HMI_MaxFeedspeedXYZE() { NOMORE(HMI_ValueStruct.Max_Feedspeed, default_max_feedrate[HMI_flag.feedspeed_axis] * 2); if (HMI_ValueStruct.Max_Feedspeed < MIN_MAXFEEDSPEED) HMI_ValueStruct.Max_Feedspeed = MIN_MAXFEEDSPEED; // MaxFeedspeed value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed, true); } } @@ -1522,7 +1560,7 @@ void HMI_MaxAccelerationXYZE() { EncoderRate.enabled = false; if (WITHIN(HMI_flag.acc_axis, X_AXIS, LAST_AXIS)) planner.set_max_acceleration(HMI_flag.acc_axis, HMI_ValueStruct.Max_Acceleration); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration); return; } // MaxAcceleration limit @@ -1530,7 +1568,7 @@ void HMI_MaxAccelerationXYZE() { NOMORE(HMI_ValueStruct.Max_Acceleration, default_max_acceleration[HMI_flag.acc_axis] * 2); if (HMI_ValueStruct.Max_Acceleration < MIN_MAXACCELERATION) HMI_ValueStruct.Max_Acceleration = MIN_MAXACCELERATION; // MaxAcceleration value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration, true); } } @@ -1544,7 +1582,7 @@ void HMI_MaxAccelerationXYZE() { EncoderRate.enabled = false; if (WITHIN(HMI_flag.jerk_axis, X_AXIS, LAST_AXIS)) planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk_scaled / 10); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); return; } // MaxJerk limit @@ -1552,7 +1590,7 @@ void HMI_MaxAccelerationXYZE() { NOMORE(HMI_ValueStruct.Max_Jerk_scaled, default_max_jerk[HMI_flag.jerk_axis] * 2 * MINUNITMULT); NOLESS(HMI_ValueStruct.Max_Jerk_scaled, (MIN_MAXJERK) * MINUNITMULT); // MaxJerk value - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); } } @@ -1566,7 +1604,7 @@ void HMI_StepXYZE() { EncoderRate.enabled = false; if (WITHIN(HMI_flag.step_axis, X_AXIS, LAST_AXIS)) planner.settings.axis_steps_per_mm[HMI_flag.step_axis] = HMI_ValueStruct.Max_Step_scaled / 10; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); return; } // Step limit @@ -1574,7 +1612,7 @@ void HMI_StepXYZE() { NOMORE(HMI_ValueStruct.Max_Step_scaled, 999.9 * MINUNITMULT); NOLESS(HMI_ValueStruct.Max_Step_scaled, MIN_STEP); // Step value - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); } } @@ -1642,30 +1680,27 @@ void update_variable() { // Tune page temperature update #if HAS_HOTEND if (_new_hotend_target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_TEMP + MROWS - index_tune), _hotendtarget); + Draw_Edit_Integer3(TUNE_CASE_TEMP + MROWS - index_tune, _hotendtarget); #endif #if HAS_HEATED_BED if (_new_bed_target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_BED + MROWS - index_tune), _bedtarget); + Draw_Edit_Integer3(TUNE_CASE_BED + MROWS - index_tune, _bedtarget); #endif #if HAS_FAN if (_new_fanspeed) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_FAN + MROWS - index_tune), _fanspeed); + Draw_Edit_Integer3(TUNE_CASE_FAN + MROWS - index_tune, _fanspeed); #endif } else if (checkkey == TemperatureID) { // Temperature page temperature update #if HAS_HOTEND - if (_new_hotend_target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_TEMP), _hotendtarget); + if (_new_hotend_target) Draw_Edit_Integer3(TEMP_CASE_TEMP, _hotendtarget); #endif #if HAS_HEATED_BED - if (_new_bed_target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_BED), _bedtarget); + if (_new_bed_target) Draw_Edit_Integer3(TEMP_CASE_BED, _bedtarget); #endif #if HAS_FAN - if (_new_fanspeed) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_FAN), _fanspeed); + if (_new_fanspeed) Draw_Edit_Integer3(TEMP_CASE_FAN, _fanspeed); #endif } @@ -1976,22 +2011,22 @@ void Draw_Info_Menu() { DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, F(SHORT_BUILD_VERSION)); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 30, 17, 57, 29); // "Info" + DWIN_Frame_TitleCopy(30, 17, 28, 13); // "Info" - DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); - DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); - DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); + DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); // "Size" + DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); // "Contact Details" } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_INFO_SCREEN)); #else - DWIN_Frame_TitleCopy(1, 190, 16, 215, 26); // "Info" + DWIN_Frame_TitleCopy(192, 15, 23, 12); // "Info" #endif - DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102); - DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); - DWIN_Frame_AreaCopy(1, 0, 165, 94, 175, 89, 248); + DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102); // "Size" + DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 1, 164, 96, 175, 89, 248); // "Contact details" } DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE)); @@ -2005,21 +2040,20 @@ void Draw_Info_Menu() { void Draw_Print_File_Menu() { Clear_Title_Bar(); - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 0, 31, 55, 44); // "Print file" - } + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(0, 31, 56, 14); // "Print file" else { #ifdef USE_STRING_HEADINGS - Draw_Title("Print file"); // TODO: GET_TEXT_F + Draw_Title(GET_TEXT_F(MSG_MEDIA_MENU)); #else - DWIN_Frame_TitleCopy(1, 52, 31, 137, 41); // "Print file" + DWIN_Frame_TitleCopy(52, 31, 86, 11); // "Print file" #endif } Redraw_SD_List(); } -/* Main Process */ +// Main Process void HMI_MainMenu() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -2030,7 +2064,7 @@ void HMI_MainMenu() { case 0: ICON_Print(); break; case 1: ICON_Print(); ICON_Prepare(); break; case 2: ICON_Prepare(); ICON_Control(); break; - case 3: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(1); break; + case 3: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; } } } @@ -2039,8 +2073,8 @@ void HMI_MainMenu() { switch (select_page.now) { case 0: ICON_Print(); ICON_Prepare(); break; case 1: ICON_Prepare(); ICON_Control(); break; - case 2: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(0); break; - case 3: TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(1); break; + case 2: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + case 3: TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; } } } @@ -2144,9 +2178,8 @@ void HMI_SelectFile() { Draw_Back_First(); TERN_(SCROLL_LONG_FILENAMES, shift_ms = 0); } - else { + else Draw_SDItem(itemnum, 0); // Draw the item (and init shift name) - } } else { Move_Highlight(-1, select_file.now + MROWS - index_file); // Just move highlight @@ -2195,11 +2228,12 @@ void HMI_SelectFile() { Goto_PrintProcess(); } } -HMI_SelectFileExit: - DWIN_UpdateLCD(); + + HMI_SelectFileExit: + DWIN_UpdateLCD(); } -/* Printing */ +// Printing void HMI_Printing() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -2219,10 +2253,10 @@ void HMI_Printing() { case 0: ICON_Tune(); break; case 1: ICON_Tune(); - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); + ICON_ResumeOrPause(); break; case 2: - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); + ICON_ResumeOrPause(); ICON_Stop(); break; } @@ -2233,10 +2267,10 @@ void HMI_Printing() { switch (select_print.now) { case 0: ICON_Tune(); - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); + ICON_ResumeOrPause(); break; case 1: - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); + ICON_ResumeOrPause(); ICON_Stop(); break; case 2: ICON_Stop(); break; @@ -2288,7 +2322,7 @@ void HMI_Printing() { DWIN_UpdateLCD(); } -/* Pause and Stop window */ +// Pause and Stop window void HMI_PauseOrStop() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -2301,18 +2335,13 @@ void HMI_PauseOrStop() { if (select_print.now == 1) { // pause window if (HMI_flag.select_flag) { HMI_flag.pause_action = true; - ICON_Continue(); queue.inject_P(PSTR("M25")); } - else { - // cancel pause - } Goto_PrintProcess(); } else if (select_print.now == 2) { // stop window if (HMI_flag.select_flag) { checkkey = Back_Main; - if (HMI_flag.home_flag) planner.synchronize(); // Wait for planner moves to finish! wait_for_heatup = wait_for_user = false; // Stop waiting for heating/user card.abortFilePrintSoon(); // Let the main loop handle SD abort dwin_abort_flag = true; // Reset feedrate, return to Home @@ -2320,6 +2349,7 @@ void HMI_PauseOrStop() { host_action_cancel(); #endif Popup_Window_Home(true); + if (HMI_flag.home_flag) planner.synchronize(); // Wait for planner moves to finish! } else Goto_PrintProcess(); // cancel stop @@ -2332,25 +2362,35 @@ void Draw_Move_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 192, 1, 233, 14); // "Move" - DWIN_Frame_AreaCopy(1, 58, 118, 106, 132, LBLX, MBASE(1)); - DWIN_Frame_AreaCopy(1, 109, 118, 157, 132, LBLX, MBASE(2)); - DWIN_Frame_AreaCopy(1, 160, 118, 209, 132, LBLX, MBASE(3)); + DWIN_Frame_TitleCopy(192, 1, 42, 14); // "Move" + Item_AreaCopy(58, 118, 106, 132, 1); + Item_AreaCopy(109, 118, 157, 132, 2); + Item_AreaCopy(160, 118, 209, 132, 3); #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 212, 118, 253, 131, LBLX, MBASE(4)); + Item_AreaCopy(212, 118, 253, 131, 4); #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_MOVE_AXIS)); #else - DWIN_Frame_TitleCopy(1, 231, 2, 265, 12); // "Move" + DWIN_Frame_TitleCopy(231, 2, 35, 11); // "Move" #endif - draw_move_en(MBASE(1)); say_x(36, MBASE(1)); // "Move X" - draw_move_en(MBASE(2)); say_y(36, MBASE(2)); // "Move Y" - draw_move_en(MBASE(3)); say_z(36, MBASE(3)); // "Move Z" - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 123, 192, 176, 202, LBLX, MBASE(4)); // "Extruder" + + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(1, GET_TEXT_F(MSG_MOVE_X)); + DWIN_Draw_Label(2, GET_TEXT_F(MSG_MOVE_Y)); + DWIN_Draw_Label(3, GET_TEXT_F(MSG_MOVE_Z)); + #if HAS_HOTEND + DWIN_Draw_Label(4, GET_TEXT_F(MSG_MOVE_E)); + #endif + #else + say_move_en(1); say_x_en(38, 1); // "Move X" + say_move_en(2); say_y_en(38, 2); // "Move Y" + say_move_en(3); say_z_en(38, 3); // "Move Z" + #if HAS_HOTEND + say_move_en(4); Item_AreaCopy(99, 194, 151, 204, 4, 38); // "Move Extruder" + #endif #endif } @@ -2361,58 +2401,208 @@ void Draw_Move_Menu() { LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MoveX + i); } -void Draw_AdvSet_Menu() { +void Item_Adv_HomeOffsets(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Set Home Offsets" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + #else + Item_AreaCopy(1, 76, 102, 87, row); // "Set Home Offsets" + #endif + } + Draw_Menu_Line(row, ICON_HomeOff); + Draw_More_Icon(row); +} + +#if HAS_ONESTEP_LEVELING + + void Item_Adv_ProbeOffsets(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Probe Offsets" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + #else + say_probe_offs_en(0, row); + #endif + } + Draw_Menu_Line(row, ICON_ProbeOff); + Draw_More_Icon(row); + } + +#endif + +void Item_Adv_HotendPID(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Hotend PID" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, F("Hotend PID")); + #else + Item_AreaCopy(96, 104, 167, 114, row); // "Hotend PID" + #endif + } + Draw_Menu_Line(row, ICON_PIDNozzle); +} + +void Item_Adv_BedPID(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Bed PID" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, F("Bed PID")); + #else + Item_AreaCopy(241, 104, 263, 115, row); // "Bed" + Item_AreaCopy(145, 104, 167, 114, row, 27); // "PID" + #endif + } + Draw_Menu_Line(row, ICON_PIDbed); +} + +#if ENABLED(POWER_LOSS_RECOVERY) + + void Item_Adv_PLR(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Power-loss Recovery" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ZPROBE_OFFSETS)); + #else + Item_AreaCopy(1, 208, 137, 221, row); // "Power-loss Recovery" + #endif + } + Draw_Menu_Line(row, ICON_Motion); + Draw_Checkbox_Line(row, recovery.enabled); + } + +#endif + +void Draw_AdvancedSettings_Menu() { Clear_Main_Window(); - #if ADVSET_CASE_TOTAL >= 6 + #if ADVSET_CASE_TOTAL >= TROWS const int16_t scroll = MROWS - index_advset; // Scrolled-up lines - #define ASCROL(L) (scroll + (L)) #else - #define ASCROL(L) (L) + constexpr int16_t scroll = 0; #endif + #define ASCROL(L) (scroll + (L)) + #define AVISI(L) VISI(ADVSET_CASE_TOTAL, L, ASCROL(L)) - #define AVISI(L) WITHIN(ASCROL(L), 0, MROWS) - - Draw_Title(GET_TEXT_F(MSG_ADVANCED_SETTINGS)); + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_ADVANCED_SETTINGS)); + #else + DWIN_Frame_TitleCopy(93, 401, 126, 15); // "Advanced Settings" + #endif if (AVISI(0)) Draw_Back_First(select_advset.now == 0); - if (AVISI(ADVSET_CASE_HOMEOFF)) Draw_Menu_Line(ASCROL(ADVSET_CASE_HOMEOFF), ICON_HomeOff, GET_TEXT(MSG_SET_HOME_OFFSETS),true); // Home Offset > + if (AVISI(ADVSET_CASE_HOMEOFF)) Item_Adv_HomeOffsets(ASCROL(ADVSET_CASE_HOMEOFF)); // Set Home Offsets > #if HAS_ONESTEP_LEVELING - if (AVISI(ADVSET_CASE_PROBEOFF)) Draw_Menu_Line(ASCROL(ADVSET_CASE_PROBEOFF), ICON_ProbeOff, GET_TEXT(MSG_ZPROBE_OFFSETS),true); // Probe Offset > + if (AVISI(ADVSET_CASE_PROBEOFF)) Item_Adv_ProbeOffsets(ASCROL(ADVSET_CASE_PROBEOFF)); // Probe Offsets > #endif - if (AVISI(ADVSET_CASE_HEPID)) Draw_Menu_Line(ASCROL(ADVSET_CASE_HEPID), ICON_PIDNozzle, "Hotend PID", false); // Nozzle PID - if (AVISI(ADVSET_CASE_BEDPID)) Draw_Menu_Line(ASCROL(ADVSET_CASE_BEDPID), ICON_PIDbed, "Bed PID", false); // Bed PID + if (AVISI(ADVSET_CASE_HEPID)) Item_Adv_HotendPID(ASCROL(ADVSET_CASE_HEPID)); // Nozzle PID + if (AVISI(ADVSET_CASE_BEDPID)) Item_Adv_BedPID(ASCROL(ADVSET_CASE_BEDPID)); // Bed PID #if ENABLED(POWER_LOSS_RECOVERY) - if (AVISI(ADVSET_CASE_PWRLOSSR)) { - Draw_Menu_Line(ASCROL(ADVSET_CASE_PWRLOSSR), ICON_Motion, "Power-loss recovery", false); // Power-loss recovery - Draw_Chkb_Line(ASCROL(ADVSET_CASE_PWRLOSSR), recovery.enabled); - } + if (AVISI(ADVSET_CASE_PWRLOSSR)) Item_Adv_PLR(ASCROL(ADVSET_CASE_PWRLOSSR)); // Power-loss recovery #endif if (select_advset.now) Draw_Menu_Cursor(ASCROL(select_advset.now)); } +void Item_HomeOffs_X(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offset X" + } + else { + #ifdef USE_STRING_TITLES + Draw_Menu_Line(row, ICON_HomeOffX, GET_TEXT_F(MSG_HOME_OFFSET_X)); + #else + say_home_offs_en(row); say_x_en(75, row); // "Home Offset X" + #endif + } + Draw_Menu_Line(row, ICON_HomeOff); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(row), HMI_ValueStruct.Home_OffX_scaled); +} + +void Item_HomeOffs_Y(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offset Y" + } + else { + #ifdef USE_STRING_TITLES + Draw_Menu_Line(row, ICON_HomeOffY, GET_TEXT_F(MSG_HOME_OFFSET_Y)); + #else + say_home_offs_en(row); say_y_en(75, row); // "Home Offset X" + #endif + } + Draw_Menu_Line(row, ICON_HomeOff); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(row), HMI_ValueStruct.Home_OffY_scaled); +} + +void Item_HomeOffs_Z(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offset Z" + } + else { + #ifdef USE_STRING_TITLES + Draw_Menu_Line(row, ICON_HomeOffZ, GET_TEXT_F(MSG_HOME_OFFSET_Z)); + #else + say_home_offs_en(row); say_z_en(75, row); // "Home Offset Z" + #endif + } + Draw_Menu_Line(row, ICON_HomeOff); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(row), HMI_ValueStruct.Home_OffZ_scaled); +} + void Draw_HomeOff_Menu() { Clear_Main_Window(); - Draw_Title(GET_TEXT_F(MSG_SET_HOME_OFFSETS)); // Home Offsets + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offsets" + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + #else + DWIN_Frame_TitleCopy(1, 401, 91, 12); // "Home Offsets" + #endif + } Draw_Back_First(select_item.now == 0); - Draw_Menu_Line(1, ICON_HomeOffX, GET_TEXT(MSG_HOME_OFFSET_X)); // Home X Offset - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Home_OffX_scaled); - Draw_Menu_Line(2, ICON_HomeOffY, GET_TEXT(MSG_HOME_OFFSET_Y)); // Home Y Offset - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Home_OffY_scaled); - Draw_Menu_Line(3, ICON_HomeOffZ, GET_TEXT(MSG_HOME_OFFSET_Z)); // Home Y Offset - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(3), HMI_ValueStruct.Home_OffZ_scaled); + Item_HomeOffs_X(1); // "Home Offset X" + Item_HomeOffs_Y(2); // "Home Offset Y" + Item_HomeOffs_Z(3); // "Home Offset Z" if (select_item.now) Draw_Menu_Cursor(select_item.now); } #if HAS_ONESTEP_LEVELING + void Draw_ProbeOff_Menu() { Clear_Main_Window(); - Draw_Title(GET_TEXT_F(MSG_ZPROBE_OFFSETS)); // Probe Offsets Draw_Back_First(select_item.now == 0); - Draw_Menu_Line(1, ICON_ProbeOffX, GET_TEXT(MSG_ZPROBE_XOFFSET)); // Probe X Offset - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Probe_OffX_scaled); - Draw_Menu_Line(2, ICON_ProbeOffY, GET_TEXT(MSG_ZPROBE_YOFFSET)); // Probe Y Offset - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Probe_OffY_scaled); + if (false && HMI_IsChinese()) { + // TODO: Chinese "Probe Offsets" + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_ZPROBE_OFFSETS)); + #else + DWIN_Frame_TitleCopy(124, 431, 91, 12); // "Probe Offsets" + #endif + #ifdef USE_STRING_TITLES + Draw_Menu_Line(1, ICON_ProbeOffX, GET_TEXT_F(MSG_ZPROBE_XOFFSET)); // Probe X Offset + Draw_Menu_Line(2, ICON_ProbeOffY, GET_TEXT_F(MSG_ZPROBE_YOFFSET)); // Probe Y Offset + #else + say_probe_offs_en(1); say_x_en(75, 1); // "Probe Offset X" + say_probe_offs_en(2); say_y_en(75, 2); // "Probe Offset Y" + #endif + } + + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Probe_OffX_scaled); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Probe_OffY_scaled); + if (select_item.now) Draw_Menu_Cursor(select_item.now); } #endif @@ -2431,7 +2621,7 @@ void HMI_AudioFeedback(const bool success=true) { #endif } -/* Prepare */ +// Prepare void HMI_Prepare() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -2495,12 +2685,12 @@ void HMI_Prepare() { select_axis.reset(); Draw_Move_Menu(); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(1), current_position.x * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(2), current_position.y * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), current_position.z * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), current_position.x * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), current_position.y * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(3), current_position.z * MINUNITMULT); #if HAS_HOTEND HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(4), HMI_ValueStruct.Move_E_scaled); #endif break; case PREPARE_CASE_DISA: // Disable steppers @@ -2518,7 +2708,7 @@ void HMI_Prepare() { checkkey = Homeoffset; HMI_ValueStruct.show_mode = -4; HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(PREPARE_CASE_ZOFF + MROWS - index_prepare), HMI_ValueStruct.offset_value); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, EBASE(PREPARE_CASE_ZOFF + MROWS - index_prepare), HMI_ValueStruct.offset_value); EncoderRate.enabled = true; #else // Apply workspace offset, making the current position 0,0,0 @@ -2559,60 +2749,61 @@ void Draw_Temperature_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 236, 2, 263, 13); // "Temperature" + DWIN_Frame_TitleCopy(236, 2, 28, 12); // "Temperature" #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX, MBASE(TEMP_CASE_TEMP)); + Item_AreaCopy(1, 134, 56, 146, TEMP_CASE_TEMP); #endif #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX, MBASE(TEMP_CASE_BED)); + Item_AreaCopy(58, 134, 113, 146, TEMP_CASE_BED); #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX, MBASE(TEMP_CASE_FAN)); + Item_AreaCopy(115, 134, 170, 146, TEMP_CASE_FAN); #endif #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 100, 89, 178, 101, LBLX, MBASE(TEMP_CASE_PLA)); - DWIN_Frame_AreaCopy(1, 180, 89, 260, 100, LBLX, MBASE(TEMP_CASE_ABS)); + Item_AreaCopy(100, 89, 178, 101, TEMP_CASE_PLA); + Item_AreaCopy(180, 89, 260, 100, TEMP_CASE_ABS); #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_TEMPERATURE)); #else - DWIN_Frame_TitleCopy(1, 56, 16, 141, 28); // "Temperature" + DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" #endif #ifdef USE_STRING_TITLES #if HAS_HOTEND - DWIN_Draw_Label(MBASE(TEMP_CASE_TEMP), GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); + DWIN_Draw_Label(TEMP_CASE_TEMP, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); #endif #if HAS_HEATED_BED - DWIN_Draw_Label(MBASE(TEMP_CASE_BED), GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); + DWIN_Draw_Label(TEMP_CASE_BED, GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); #endif #if HAS_FAN - DWIN_Draw_Label(MBASE(TEMP_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); + DWIN_Draw_Label(TEMP_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); #endif #if HAS_HOTEND - DWIN_Draw_Label(MBASE(TEMP_CASE_PLA), F("PLA Preheat Settings")); - DWIN_Draw_Label(MBASE(TEMP_CASE_ABS), F("ABS Preheat Settings")); + DWIN_Draw_Label(TEMP_CASE_PLA, F(PREHEAT_1_LABEL " Preheat Settings")); + DWIN_Draw_Label(TEMP_CASE_ABS, F(PREHEAT_2_LABEL " Preheat Settings")); #endif #else #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX, MBASE(TEMP_CASE_TEMP)); // Nozzle... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 44, MBASE(TEMP_CASE_TEMP)); // ...Temperature + Item_AreaCopy(197, 104, 238, 114, TEMP_CASE_TEMP); // "Nozzle" + Item_AreaCopy(1, 89, 83, 101, TEMP_CASE_TEMP, 44); // "Temperature" #endif #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX, MBASE(TEMP_CASE_BED)); // Bed... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 27, MBASE(TEMP_CASE_BED)); // ...Temperature + Item_AreaCopy(240, 104, 264, 114, TEMP_CASE_BED); // "Bed" + Item_AreaCopy(1, 89, 83, 101, TEMP_CASE_BED, 27); // "Temperature" #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX, MBASE(TEMP_CASE_FAN)); // Fan speed + Item_AreaCopy( 1, 119, 61, 132, TEMP_CASE_FAN); // "Fan speed" #endif #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(TEMP_CASE_PLA)); // Preheat... - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX + 52, MBASE(TEMP_CASE_PLA)); // ...PLA - DWIN_Frame_AreaCopy(1, 131, 119, 182, 132, LBLX + 79, MBASE(TEMP_CASE_PLA)); // PLA setting - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(TEMP_CASE_ABS)); // Preheat... - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX + 52, MBASE(TEMP_CASE_ABS)); // ...ABS - DWIN_Frame_AreaCopy(1, 131, 119, 182, 132, LBLX + 81, MBASE(TEMP_CASE_ABS)); // ABS setting + Item_AreaCopy(107, 76, 156, 86, TEMP_CASE_PLA); // "Preheat" + say_pla_en(52, TEMP_CASE_PLA); // "PLA" + Item_AreaCopy(150, 135, 202, 148, TEMP_CASE_PLA, 79); // "Settings" + + Item_AreaCopy(107, 76, 156, 86, TEMP_CASE_ABS); // "Preheat" + say_abs_en(52, TEMP_CASE_ABS); // "ABS" + Item_AreaCopy(150, 135, 202, 148, TEMP_CASE_ABS, 81); // "Settings" #endif #endif } @@ -2625,15 +2816,15 @@ void Draw_Temperature_Menu() { #define _TMENU_ICON(N) Draw_Menu_Line(++i, ICON_SetEndTemp + (N) - 1) #if HAS_HOTEND _TMENU_ICON(TEMP_CASE_TEMP); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), thermalManager.degTargetHotend(0)); + Draw_Edit_Integer3(i, thermalManager.degTargetHotend(0)); #endif #if HAS_HEATED_BED _TMENU_ICON(TEMP_CASE_BED); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), thermalManager.degTargetBed()); + Draw_Edit_Integer3(i, thermalManager.degTargetBed()); #endif #if HAS_FAN _TMENU_ICON(TEMP_CASE_FAN); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), thermalManager.fan_speed[0]); + Draw_Edit_Integer3(i, thermalManager.fan_speed[0]); #endif #if HAS_HOTEND // PLA/ABS items have submenus @@ -2644,7 +2835,7 @@ void Draw_Temperature_Menu() { #endif } -/* Control */ +// Control void HMI_Control() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -2659,20 +2850,14 @@ void HMI_Control() { Scroll_Menu(DWIN_SCROLL_UP); switch (index_control) { // Last menu items - case CONTROL_CASE_ADVSET: // Advanced Settings > - Draw_Menu_Item(MROWS, ICON_AdvSet, GET_TEXT(MSG_ADVANCED_SETTINGS), true); - break; - case CONTROL_CASE_INFO: // Info > - Item_Control_Info(MBASE(MROWS)); - Draw_Menu_Icon(MROWS, ICON_Info); - break; + case CONTROL_CASE_ADVSET: Item_Control_Advanced(MROWS); break; + case CONTROL_CASE_INFO: Item_Control_Info(MROWS); break; default: break; } } - else { + else Move_Highlight(1, select_control.now + MROWS - index_control); - } } } else if (encoder_diffState == ENCODER_DIFF_CCW) { @@ -2681,20 +2866,14 @@ void HMI_Control() { index_control--; Scroll_Menu(DWIN_SCROLL_DOWN); switch (index_control) { // First menu items - case MROWS : - Draw_Back_First(); - break; - case MROWS + 1: // Temperature > - Draw_Menu_Line(0, ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), true); - break; - case MROWS + 2: // Move > - Draw_Menu_Line(0, ICON_Motion, GET_TEXT(MSG_MOTION), true); + case MROWS: Draw_Back_First(); break; + case MROWS + 1: Item_Control_Temp(0); break; + case MROWS + 2: Item_Control_Motion(0); break; default: break; } } - else { + else Move_Highlight(-1, select_control.now + MROWS - index_control); - } } } else if (encoder_diffState == ENCODER_DIFF_ENTER) { @@ -2731,7 +2910,7 @@ void HMI_Control() { case CONTROL_CASE_ADVSET: // Advanced Settings checkkey = AdvSet; select_advset.reset(); - Draw_AdvSet_Menu(); + Draw_AdvancedSettings_Menu(); break; case CONTROL_CASE_INFO: // Info checkkey = Info; @@ -2746,7 +2925,7 @@ void HMI_Control() { #if HAS_ONESTEP_LEVELING - /* Leveling */ + // Leveling void HMI_Leveling() { Popup_Window_Leveling(); DWIN_UpdateLCD(); @@ -2755,7 +2934,7 @@ void HMI_Control() { #endif -/* Axis Move */ +// Axis Move void HMI_AxisMove() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -2767,10 +2946,10 @@ void HMI_AxisMove() { HMI_flag.ETempTooLow_flag = false; HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; Draw_Move_Menu(); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), 0); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(4), 0); DWIN_UpdateLCD(); } return; @@ -2795,19 +2974,19 @@ void HMI_AxisMove() { case 1: // X axis move checkkey = Move_X; HMI_ValueStruct.Move_X_scaled = current_position.x * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); EncoderRate.enabled = true; break; case 2: // Y axis move checkkey = Move_Y; HMI_ValueStruct.Move_Y_scaled = current_position.y * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); EncoderRate.enabled = true; break; case 3: // Z axis move checkkey = Move_Z; HMI_ValueStruct.Move_Z_scaled = current_position.z * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); EncoderRate.enabled = true; break; #if HAS_HOTEND @@ -2823,7 +3002,7 @@ void HMI_AxisMove() { #endif checkkey = Extruder; HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(4), HMI_ValueStruct.Move_E_scaled); EncoderRate.enabled = true; break; #endif @@ -2832,7 +3011,7 @@ void HMI_AxisMove() { DWIN_UpdateLCD(); } -/* TemperatureID */ +// TemperatureID void HMI_Temperature() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -2856,7 +3035,7 @@ void HMI_Temperature() { case TEMP_CASE_TEMP: // Nozzle temperature checkkey = ETemp; HMI_ValueStruct.E_Temp = thermalManager.degTargetHotend(0); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(1), HMI_ValueStruct.E_Temp); + Draw_Edit_Integer3(1, HMI_ValueStruct.E_Temp, true); EncoderRate.enabled = true; break; #endif @@ -2864,7 +3043,7 @@ void HMI_Temperature() { case TEMP_CASE_BED: // Bed temperature checkkey = BedTemp; HMI_ValueStruct.Bed_Temp = thermalManager.degTargetBed(); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(2), HMI_ValueStruct.Bed_Temp); + Draw_Edit_Integer3(2, HMI_ValueStruct.Bed_Temp, true); EncoderRate.enabled = true; break; #endif @@ -2872,7 +3051,7 @@ void HMI_Temperature() { case TEMP_CASE_FAN: // Fan speed checkkey = FanSpeed; HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(3), HMI_ValueStruct.Fan_speed); + Draw_Edit_Integer3(3, HMI_ValueStruct.Fan_speed, true); EncoderRate.enabled = true; break; #endif @@ -2885,53 +3064,53 @@ void HMI_Temperature() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 59, 16, 139, 29); // "PLA Settings" - DWIN_Frame_AreaCopy(1, 100, 89, 124, 101, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX + 24, MBASE(PREHEAT_CASE_TEMP)); // PLA nozzle temp + DWIN_Frame_TitleCopy(59, 16, 81, 14); // "PLA Settings" + Item_AreaCopy(100, 89, 124, 101, PREHEAT_CASE_TEMP); + Item_AreaCopy(1, 134, 56, 146, PREHEAT_CASE_TEMP, 24); // PLA nozzle temp #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 100, 89, 124, 101, LBLX, MBASE(PREHEAT_CASE_BED)); - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX + 24, MBASE(PREHEAT_CASE_BED)); // PLA bed temp + Item_AreaCopy(100, 89, 124, 101, PREHEAT_CASE_BED); + Item_AreaCopy(58, 134, 113, 146, PREHEAT_CASE_BED, 24); // PLA bed temp #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 100, 89, 124, 101, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX + 24, MBASE(PREHEAT_CASE_FAN)); // PLA fan speed + Item_AreaCopy(100, 89, 124, 101, PREHEAT_CASE_FAN); + Item_AreaCopy(115, 134, 170, 146, PREHEAT_CASE_FAN, 24); // PLA fan speed #endif #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 72, 148, 151, 162, LBLX, MBASE(PREHEAT_CASE_SAVE)); // Save PLA configuration + Item_AreaCopy(72, 148, 151, 162, PREHEAT_CASE_SAVE); // Save PLA configuration #endif } else { #ifdef USE_STRING_HEADINGS - Draw_Title("PLA Settings"); // TODO: GET_TEXT_F + Draw_Title(PREHEAT_1_LABEL " Settings"); // TODO: GET_TEXT_F #else - DWIN_Frame_TitleCopy(1, 56, 16, 141, 28); // "PLA Settings" + DWIN_Frame_TitleCopy(57, 16, 84, 14); // "PLA Settings" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(PREHEAT_CASE_TEMP), F("Nozzle Temp")); + DWIN_Draw_Label(PREHEAT_CASE_TEMP, F("Nozzle Temp")); #if HAS_HEATED_BED - DWIN_Draw_Label(MBASE(PREHEAT_CASE_BED), F("Bed Temp")); + DWIN_Draw_Label(PREHEAT_CASE_BED, F("Bed Temp")); #endif #if HAS_FAN - DWIN_Draw_Label(MBASE(PREHEAT_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); + DWIN_Draw_Label(PREHEAT_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); #endif #if ENABLED(EEPROM_SETTINGS) - DWIN_Draw_Label(MBASE(PREHEAT_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); + DWIN_Draw_Label(PREHEAT_CASE_SAVE, GET_TEXT_F(MSG_STORE_EEPROM)); #endif #else - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX + 27, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 71, MBASE(PREHEAT_CASE_TEMP)); // PLA nozzle temp + say_pla_en(0, PREHEAT_CASE_TEMP); // "PLA" + Item_AreaCopy(198, 104, 237, 114, PREHEAT_CASE_TEMP, 27); // "Nozzle" + Item_AreaCopy(1, 89, 81, 102, PREHEAT_CASE_TEMP, 71); // "Temperature" #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX + 27, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 54, MBASE(PREHEAT_CASE_BED) + 3); // PLA bed temp + say_pla_en(0, PREHEAT_CASE_BED); // "PLA" + Item_AreaCopy(240, 104, 264, 114, PREHEAT_CASE_BED, 27); // "Bed" + Item_AreaCopy(1, 89, 83, 101, PREHEAT_CASE_BED, 54); // "Temperature" #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX + 27, MBASE(PREHEAT_CASE_FAN)); // PLA fan speed + say_pla_en(0, PREHEAT_CASE_FAN); // "PLA" + Item_AreaCopy(0, 119, 64, 132, PREHEAT_CASE_FAN, 27); // "Fan speed" #endif #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 97, 165, 229, 177, LBLX, MBASE(PREHEAT_CASE_SAVE)); // Save PLA configuration + Item_AreaCopy(98, 164, 233, 177, PREHEAT_CASE_SAVE); // "Save PLA parameters" #endif #endif } @@ -2940,14 +3119,14 @@ void HMI_Temperature() { uint8_t i = 0; Draw_Menu_Line(++i, ICON_SetEndTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[0].hotend_temp); + Draw_Edit_Integer3(i, ui.material_preset[0].hotend_temp); #if HAS_HEATED_BED Draw_Menu_Line(++i, ICON_SetBedTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[0].bed_temp); + Draw_Edit_Integer3(i, ui.material_preset[0].bed_temp); #endif #if HAS_FAN Draw_Menu_Line(++i, ICON_FanSpeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[0].fan_speed); + Draw_Edit_Integer3(i, ui.material_preset[0].fan_speed); #endif #if ENABLED(EEPROM_SETTINGS) Draw_Menu_Line(++i, ICON_WriteEEPROM); @@ -2962,56 +3141,56 @@ void HMI_Temperature() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 142, 16, 223, 29); // "ABS Settings" + DWIN_Frame_TitleCopy(142, 16, 82, 14); // "ABS Settings" - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX + 24, MBASE(PREHEAT_CASE_TEMP)); // ABS nozzle temp + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_TEMP); + Item_AreaCopy(1, 134, 56, 146, PREHEAT_CASE_TEMP, 24); // ABS nozzle temp #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX, MBASE(PREHEAT_CASE_BED)); - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX + 24, MBASE(PREHEAT_CASE_BED)); // ABS bed temp + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_BED); + Item_AreaCopy(58, 134, 113, 146, PREHEAT_CASE_BED, 24); // ABS bed temp #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX + 24, MBASE(PREHEAT_CASE_FAN)); // ABS fan speed + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_FAN); + Item_AreaCopy(115, 134, 170, 146, PREHEAT_CASE_FAN, 24); // ABS fan speed #endif #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 72, 148, 151, 162, LBLX, MBASE(PREHEAT_CASE_SAVE)); - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX + 28, MBASE(PREHEAT_CASE_SAVE) + 2); // Save ABS configuration + Item_AreaCopy(72, 148, 151, 162, PREHEAT_CASE_SAVE); + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_SAVE, 28, 2); // Save ABS configuration #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title("ABS Settings"); // TODO: GET_TEXT_F #else - DWIN_Frame_TitleCopy(1, 56, 16, 141, 28); // "ABS Settings" + DWIN_Frame_TitleCopy(57, 16, 84, 14); // "ABS Settings" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(PREHEAT_CASE_TEMP), F("Nozzle Temp")); + DWIN_Draw_Label(PREHEAT_CASE_TEMP, F("Nozzle Temp")); #if HAS_HEATED_BED - DWIN_Draw_Label(MBASE(PREHEAT_CASE_BED), F("Bed Temp")); + DWIN_Draw_Label(PREHEAT_CASE_BED, F("Bed Temp")); #endif #if HAS_FAN - DWIN_Draw_Label(MBASE(PREHEAT_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); + DWIN_Draw_Label(PREHEAT_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); #endif #if ENABLED(EEPROM_SETTINGS) - DWIN_Draw_Label(MBASE(PREHEAT_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); + DWIN_Draw_Label(PREHEAT_CASE_SAVE, GET_TEXT_F(MSG_STORE_EEPROM)); #endif #else - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX + 27, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 71, MBASE(PREHEAT_CASE_TEMP)); // ABS nozzle temp + say_abs_en(0, PREHEAT_CASE_TEMP); // "ABS" + Item_AreaCopy(197, 104, 238, 114, PREHEAT_CASE_TEMP, 29); // "Nozzle" + Item_AreaCopy(1, 89, 34, 102, PREHEAT_CASE_TEMP, 73); // "Temp" #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX + 27, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 54, MBASE(PREHEAT_CASE_BED) + 3); // ABS bed temp + say_abs_en(0, PREHEAT_CASE_BED); // "ABS" + Item_AreaCopy(240, 104, 264, 114, PREHEAT_CASE_BED, 29); // "Bed" + Item_AreaCopy(1, 89, 83, 102, PREHEAT_CASE_BED, 56); // "Temperature" #endif #if HAS_FAN - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX + 27, MBASE(PREHEAT_CASE_FAN)); // ABS fan speed + say_abs_en(0, PREHEAT_CASE_FAN); // "ABS" + Item_AreaCopy(0, 119, 64, 132, PREHEAT_CASE_FAN, 29); // "Fan speed" #endif #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 97, 165, 229, 177, LBLX, MBASE(PREHEAT_CASE_SAVE)); - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX + 33, MBASE(PREHEAT_CASE_SAVE)); // Save ABS configuration + Item_AreaCopy(98, 165, 233, 177, PREHEAT_CASE_SAVE); // "Save PLA parameters" + say_abs_en(33, PREHEAT_CASE_SAVE); // "ABS" #endif #endif } @@ -3020,14 +3199,14 @@ void HMI_Temperature() { uint8_t i = 0; Draw_Menu_Line(++i, ICON_SetEndTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[1].hotend_temp); + Draw_Edit_Integer3(i, ui.material_preset[1].hotend_temp); #if HAS_HEATED_BED Draw_Menu_Line(++i, ICON_SetBedTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[1].bed_temp); + Draw_Edit_Integer3(i, ui.material_preset[1].bed_temp); #endif #if HAS_FAN Draw_Menu_Line(++i, ICON_FanSpeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[1].fan_speed); + Draw_Edit_Integer3(i, ui.material_preset[1].fan_speed); #endif #if ENABLED(EEPROM_SETTINGS) Draw_Menu_Line(++i, ICON_WriteEEPROM); @@ -3045,63 +3224,53 @@ void Draw_Max_Speed_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Max Speed (mm/s)" + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Max Speed (mm/s)" - auto say_max_speed = [](const uint16_t row) { - DWIN_Frame_AreaCopy(1, 173, 133, 228, 147, LBLX, row); // "Max speed" + auto say_max_speed_cn = [](const uint8_t line) { + Item_AreaCopy(173, 133, 228, 147, line); // "Max speed" }; - say_max_speed(MBASE(1)); // "Max speed" - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 58, MBASE(1)); // X - say_max_speed(MBASE(2)); // "Max speed" - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 58, MBASE(2) + 3); // Y - say_max_speed(MBASE(3)); // "Max speed" - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 58, MBASE(3) + 3); // Z + say_max_speed_cn(1); // "Max speed" + Item_AreaCopy(229, 133, 236, 147, 1, 58); // "X" + say_max_speed_cn(2); // "Max speed" + Item_AreaCopy(1, 150, 7, 160, 2, 58, 3); // "Y" + say_max_speed_cn(3); // "Max speed" + Item_AreaCopy(9, 150, 16, 160, 3, 58, 3); // "Z" #if HAS_HOTEND - say_max_speed(MBASE(4)); // "Max speed" - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 58, MBASE(4) + 3); // E + say_max_speed_cn(4); // "Max speed" + Item_AreaCopy(18, 150, 25, 160, 4, 58, 3); // "E" #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title("Max Speed (mm/s)"); // TODO: GET_TEXT_F #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Max Speed (mm/s)" + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Max Speed (mm/s)" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(1), F("Max Feedrate X")); - DWIN_Draw_Label(MBASE(2), F("Max Feedrate Y")); - DWIN_Draw_Label(MBASE(3), F("Max Feedrate Z")); + DWIN_Draw_Label(1, F("Max Feedrate X")); + DWIN_Draw_Label(2, F("Max Feedrate Y")); + DWIN_Draw_Label(3, F("Max Feedrate Z")); #if HAS_HOTEND - DWIN_Draw_Label(MBASE(4), F("Max Feedrate E")); + DWIN_Draw_Label(4, F("Max Feedrate E")); #endif #else - draw_max_en(MBASE(1)); // "Max" - DWIN_Frame_AreaCopy(1, 184, 119, 234, 132, LBLX + 27, MBASE(1)); // "Speed X" - - draw_max_en(MBASE(2)); // "Max" - draw_speed_en(27, MBASE(2)); // "Speed" - say_y(70, MBASE(2)); // "Y" - - draw_max_en(MBASE(3)); // "Max" - draw_speed_en(27, MBASE(3)); // "Speed" - say_z(70, MBASE(3)); // "Z" - + say_max_en(1); say_speed_en(30, 1); say_x_en(73, 1); // "Max Speed X" + say_max_en(2); say_speed_en(30, 2); say_y_en(73, 2); // "Max Speed Y" + say_max_en(3); say_speed_en(30, 3); say_z_en(73, 3); // "Max Speed Z" #if HAS_HOTEND - draw_max_en(MBASE(4)); // "Max" - draw_speed_en(27, MBASE(4)); // "Speed" - say_e(70, MBASE(4)); // "E" + say_max_en(4); say_speed_en(30, 4); say_e_en(73, 4); // "Max Speed E" #endif #endif } Draw_Back_First(); LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedX + i); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(1), planner.settings.max_feedrate_mm_s[X_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(2), planner.settings.max_feedrate_mm_s[Y_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(3), planner.settings.max_feedrate_mm_s[Z_AXIS]); + Draw_Edit_Integer4(1, planner.settings.max_feedrate_mm_s[X_AXIS]); + Draw_Edit_Integer4(2, planner.settings.max_feedrate_mm_s[Y_AXIS]); + Draw_Edit_Integer4(3, planner.settings.max_feedrate_mm_s[Z_AXIS]); #if HAS_HOTEND - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(4), planner.settings.max_feedrate_mm_s[E_AXIS]); + Draw_Edit_Integer4(4, planner.settings.max_feedrate_mm_s[E_AXIS]); #endif } @@ -3109,53 +3278,53 @@ void Draw_Max_Accel_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Acceleration" - - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(1)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(1) + 1); - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 71, MBASE(1)); // Max acceleration X - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(2)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(2) + 1); - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 71, MBASE(2) + 2); // Max acceleration Y - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(3)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(3) + 1); - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 71, MBASE(3) + 2); // Max acceleration Z + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Acceleration" + + Item_AreaCopy(173, 133, 200, 147, 1); + Item_AreaCopy( 28, 149, 69, 161, 1, 30, 1); + Item_AreaCopy(229, 133, 236, 147, 1, 74); // Max acceleration X + Item_AreaCopy(173, 133, 200, 147, 2); + Item_AreaCopy( 28, 149, 69, 161, 2, 30, 1); + Item_AreaCopy( 1, 150, 7, 160, 2, 74, 2); // Max acceleration Y + Item_AreaCopy(173, 133, 200, 147, 3); + Item_AreaCopy( 28, 149, 69, 161, 3, 30, 1); + Item_AreaCopy( 9, 150, 16, 160, 3, 74, 2); // Max acceleration Z #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(4)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(4) + 1); - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 71, MBASE(4) + 2); // Max acceleration E + Item_AreaCopy(173, 133, 200, 147, 4); + Item_AreaCopy( 28, 149, 69, 161, 4, 30, 1); + Item_AreaCopy( 18, 150, 25, 160, 4, 74, 2); // Max acceleration E #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_ACCELERATION)); #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Acceleration" + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Acceleration" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(1), F("Max Accel X")); - DWIN_Draw_Label(MBASE(2), F("Max Accel Y")); - DWIN_Draw_Label(MBASE(3), F("Max Accel Z")); + DWIN_Draw_Label(1, F("Max Accel X")); + DWIN_Draw_Label(2, F("Max Accel Y")); + DWIN_Draw_Label(3, F("Max Accel Z")); #if HAS_HOTEND - DWIN_Draw_Label(MBASE(4), F("Max Accel E")); + DWIN_Draw_Label(4, F("Max Accel E")); #endif #else - draw_max_accel_en(MBASE(1)); say_x(108, MBASE(1)); // "Max Acceleration X" - draw_max_accel_en(MBASE(2)); say_y(108, MBASE(2)); // "Max Acceleration Y" - draw_max_accel_en(MBASE(3)); say_z(108, MBASE(3)); // "Max Acceleration Z" + say_max_accel_en(1); say_x_en(112, 1); // "Max Acceleration X" + say_max_accel_en(2); say_y_en(112, 2); // "Max Acceleration Y" + say_max_accel_en(3); say_z_en(112, 3); // "Max Acceleration Z" #if HAS_HOTEND - draw_max_accel_en(MBASE(4)); say_e(108, MBASE(4)); // "Max Acceleration E" + say_max_accel_en(4); say_e_en(112, 4); // "Max Acceleration E" #endif #endif } Draw_Back_First(); LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxAccX + i); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(1), planner.settings.max_acceleration_mm_per_s2[X_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(2), planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(3), planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); + Draw_Edit_Integer4(1, planner.settings.max_acceleration_mm_per_s2[X_AXIS]); + Draw_Edit_Integer4(2, planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); + Draw_Edit_Integer4(3, planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); #if HAS_HOTEND - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(4), planner.settings.max_acceleration_mm_per_s2[E_AXIS]); + Draw_Edit_Integer4(4, planner.settings.max_acceleration_mm_per_s2[E_AXIS]); #endif } @@ -3164,72 +3333,57 @@ void Draw_Max_Accel_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Jerk" - - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(1)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(1) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(1)); - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 83, MBASE(1)); // Max Jerk speed X - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(2)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(2) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(2)); - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 83, MBASE(2) + 3); // Max Jerk speed Y - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(3)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(3) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(3)); - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 83, MBASE(3) + 3); // Max Jerk speed Z + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Jerk" + + Item_AreaCopy(173, 133, 200, 147, 1); + Item_AreaCopy( 1, 180, 28, 192, 1, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 1, 56); + Item_AreaCopy(229, 133, 236, 147, 1, 86); // Max Jerk speed X + Item_AreaCopy(173, 133, 200, 147, 2); + Item_AreaCopy( 1, 180, 28, 192, 2, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 2, 56); + Item_AreaCopy( 1, 150, 7, 160, 2, 86, 3); // Max Jerk speed Y + Item_AreaCopy(173, 133, 200, 147, 3); + Item_AreaCopy( 1, 180, 28, 192, 3, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 3, 56); + Item_AreaCopy( 9, 150, 16, 160, 3, 86, 3); // Max Jerk speed Z #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(4)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(4) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(4)); - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 83, MBASE(4) + 3); // Max Jerk speed E + Item_AreaCopy(173, 133, 200, 147, 4); + Item_AreaCopy( 1, 180, 28, 192, 4, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 4, 56); + Item_AreaCopy( 18, 150, 25, 160, 4, 86, 3); // Max Jerk speed E #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_JERK)); #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Jerk" + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Jerk" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(1), F("Max Jerk X")); - DWIN_Draw_Label(MBASE(2), F("Max Jerk Y")); - DWIN_Draw_Label(MBASE(3), F("Max Jerk Z")); + DWIN_Draw_Label(1, GET_TEXT_F(MSG_VA_JERK)); + DWIN_Draw_Label(2, GET_TEXT_F(MSG_VB_JERK)); + DWIN_Draw_Label(3, GET_TEXT_F(MSG_VC_JERK)); #if HAS_HOTEND - DWIN_Draw_Label(MBASE(4), F("Max Jerk E")); + DWIN_Draw_Label(4, GET_TEXT_F(MSG_VE_JERK)); #endif #else - draw_max_en(MBASE(1)); // "Max" - draw_jerk_en(MBASE(1)); // "Jerk" - draw_speed_en(72, MBASE(1)); // "Speed" - say_x(115, MBASE(1)); // "X" - - draw_max_en(MBASE(2)); // "Max" - draw_jerk_en(MBASE(2)); // "Jerk" - draw_speed_en(72, MBASE(2)); // "Speed" - say_y(115, MBASE(2)); // "Y" - - draw_max_en(MBASE(3)); // "Max" - draw_jerk_en(MBASE(3)); // "Jerk" - draw_speed_en(72, MBASE(3)); // "Speed" - say_z(115, MBASE(3)); // "Z" - + say_max_jerk_speed_en(1); say_x_en(102, 1); // Max Jerk speed X + say_max_jerk_speed_en(2); say_y_en(102, 2); // Max Jerk speed Y + say_max_jerk_speed_en(3); say_z_en(102, 3); // Max Jerk speed Z #if HAS_HOTEND - draw_max_en(MBASE(4)); // "Max" - draw_jerk_en(MBASE(4)); // "Jerk" - draw_speed_en(72, MBASE(4)); // "Speed" - say_e(115, MBASE(4)); // "E" + say_max_jerk_speed_en(4); say_e_en(102, 4); // Max Jerk speed E #endif #endif } Draw_Back_First(); LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedJerkX + i); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(1), planner.max_jerk[X_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(2), planner.max_jerk[Y_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(3), planner.max_jerk[Z_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(1), planner.max_jerk[X_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(2), planner.max_jerk[Y_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(3), planner.max_jerk[Z_AXIS] * MINUNITMULT); #if HAS_HOTEND - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(4), planner.max_jerk[E_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(4), planner.max_jerk[E_AXIS] * MINUNITMULT); #endif } #endif @@ -3238,53 +3392,53 @@ void Draw_Steps_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Steps per mm" - - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(1)); - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 44, MBASE(1)); // Transmission Ratio X - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(2)); - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 44, MBASE(2) + 3); // Transmission Ratio Y - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(3)); - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 44, MBASE(3) + 3); // Transmission Ratio Z + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Steps per mm" + + Item_AreaCopy(153, 148, 194, 161, 1); + Item_AreaCopy(229, 133, 236, 147, 1, 44); // Transmission Ratio X + Item_AreaCopy(153, 148, 194, 161, 2); + Item_AreaCopy( 1, 150, 7, 160, 2, 44, 3); // Transmission Ratio Y + Item_AreaCopy(153, 148, 194, 161, 3); + Item_AreaCopy( 9, 150, 16, 160, 3, 44, 3); // Transmission Ratio Z #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(4)); - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 44, MBASE(4) + 3); // Transmission Ratio E + Item_AreaCopy(153, 148, 194, 161, 4); + Item_AreaCopy( 18, 150, 25, 160, 4, 44, 3); // Transmission Ratio E #endif } else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_STEPS_PER_MM)); #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Steps per mm" + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Steps per mm" #endif #ifdef USE_STRING_TITLES - DWIN_Draw_Label(MBASE(1), F("Steps/mm X")); - DWIN_Draw_Label(MBASE(2), F("Steps/mm Y")); - DWIN_Draw_Label(MBASE(3), F("Steps/mm Z")); + DWIN_Draw_Label(1, GET_TEXT_F(MSG_A_STEPS)); + DWIN_Draw_Label(2, GET_TEXT_F(MSG_B_STEPS)); + DWIN_Draw_Label(3, GET_TEXT_F(MSG_C_STEPS)); #if HAS_HOTEND - DWIN_Draw_Label(MBASE(4), F("Steps/mm E")); + DWIN_Draw_Label(4, GET_TEXT_F(MSG_E_STEPS)); #endif #else - draw_steps_per_mm(MBASE(1)); say_x(103, MBASE(1)); // "Steps-per-mm X" - draw_steps_per_mm(MBASE(2)); say_y(103, MBASE(2)); // "Y" - draw_steps_per_mm(MBASE(3)); say_z(103, MBASE(3)); // "Z" + say_steps_per_mm_en(1); say_x_en(101, 1); // "Steps-per-mm X" + say_steps_per_mm_en(2); say_y_en(101, 2); // "Y" + say_steps_per_mm_en(3); say_z_en(101, 3); // "Z" #if HAS_HOTEND - draw_steps_per_mm(MBASE(4)); say_e(103, MBASE(4)); // "E" + say_steps_per_mm_en(4); say_e_en(101, 4); // "E" #endif #endif } Draw_Back_First(); LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_StepX + i); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(1), planner.settings.axis_steps_per_mm[X_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(2), planner.settings.axis_steps_per_mm[Y_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(3), planner.settings.axis_steps_per_mm[Z_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(1), planner.settings.axis_steps_per_mm[X_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(2), planner.settings.axis_steps_per_mm[Y_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(3), planner.settings.axis_steps_per_mm[Z_AXIS] * MINUNITMULT); #if HAS_HOTEND - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(4), planner.settings.axis_steps_per_mm[E_AXIS] * MINUNITMULT); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(4), planner.settings.axis_steps_per_mm[E_AXIS] * MINUNITMULT); #endif } -/* Motion */ +// Motion void HMI_Motion() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3332,7 +3486,7 @@ void HMI_Motion() { DWIN_UpdateLCD(); } -/* Advanced Settings */ +// Advanced Settings void HMI_AdvSet() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3418,7 +3572,7 @@ void HMI_AdvSet() { #if ENABLED(POWER_LOSS_RECOVERY) case ADVSET_CASE_PWRLOSSR: // Power-loss recovery recovery.enable(!recovery.enabled); - Draw_Chkb_Line(ADVSET_CASE_PWRLOSSR + MROWS - index_advset, recovery.enabled); + Draw_Checkbox_Line(ADVSET_CASE_PWRLOSSR + MROWS - index_advset, recovery.enabled); break; #endif default: break; @@ -3429,7 +3583,7 @@ void HMI_AdvSet() { #if HAS_HOME_OFFSET - /* Home Offset */ + // Home Offset void HMI_HomeOff() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3446,21 +3600,21 @@ void HMI_AdvSet() { case 0: // Back checkkey = AdvSet; select_advset.set(ADVSET_CASE_HOMEOFF); - Draw_AdvSet_Menu(); + Draw_AdvancedSettings_Menu(); break; case 1: // Home Offset X checkkey = HomeOffX; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(1), HMI_ValueStruct.Home_OffX_scaled); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Home_OffX_scaled); EncoderRate.enabled = true; break; case 2: // Home Offset Y checkkey = HomeOffY; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(2), HMI_ValueStruct.Home_OffY_scaled); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Home_OffY_scaled); EncoderRate.enabled = true; break; case 3: // Home Offset Z checkkey = HomeOffZ; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(3), HMI_ValueStruct.Home_OffZ_scaled); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Home_OffZ_scaled); EncoderRate.enabled = true; break; default: break; @@ -3471,17 +3625,17 @@ void HMI_AdvSet() { void HMI_HomeOffN(const AxisEnum axis, float &posScaled, const_float_t lo, const_float_t hi) { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, posScaled)) { - checkkey = HomeOff; - EncoderRate.enabled = false; - set_home_offset(axis, posScaled / 10); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(select_item.now), posScaled); - return; - } - LIMIT(posScaled, lo, hi); - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 216, MBASE(select_item.now), posScaled); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (Apply_Encoder(encoder_diffState, posScaled)) { + checkkey = HomeOff; + EncoderRate.enabled = false; + set_home_offset(axis, posScaled / 10); + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); + return; } + LIMIT(posScaled, lo, hi); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); } void HMI_HomeOffX() { HMI_HomeOffN(X_AXIS, HMI_ValueStruct.Home_OffX_scaled, -500, 500); } @@ -3491,7 +3645,7 @@ void HMI_AdvSet() { #endif // HAS_HOME_OFFSET #if HAS_ONESTEP_LEVELING - /*Probe Offset */ + // Probe Offset void HMI_ProbeOff() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3508,16 +3662,16 @@ void HMI_AdvSet() { case 0: // Back checkkey = AdvSet; select_advset.set(ADVSET_CASE_PROBEOFF); - Draw_AdvSet_Menu(); + Draw_AdvancedSettings_Menu(); break; case 1: // Probe Offset X checkkey = ProbeOffX; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(1), HMI_ValueStruct.Probe_OffX_scaled); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Probe_OffX_scaled); EncoderRate.enabled = true; break; case 2: // Probe Offset X checkkey = ProbeOffY; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(2), HMI_ValueStruct.Probe_OffY_scaled); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Probe_OffY_scaled); EncoderRate.enabled = true; break; } @@ -3527,17 +3681,17 @@ void HMI_AdvSet() { void HMI_ProbeOffN(float &posScaled, float &offset_ref) { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, posScaled)) { - checkkey = ProbeOff; - EncoderRate.enabled = false; - offset_ref = posScaled / 10; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(select_item.now), posScaled); - return; - } - LIMIT(posScaled, -500, 500); - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 216, MBASE(select_item.now), posScaled); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (Apply_Encoder(encoder_diffState, posScaled)) { + checkkey = ProbeOff; + EncoderRate.enabled = false; + offset_ref = posScaled / 10; + DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); + return; } + LIMIT(posScaled, -500, 500); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); } void HMI_ProbeOffX() { HMI_ProbeOffN(HMI_ValueStruct.Probe_OffX_scaled, probe.offset.x); } @@ -3545,7 +3699,7 @@ void HMI_AdvSet() { #endif // HAS_ONESTEP_LEVELING -/* Info */ +// Info void HMI_Info() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3562,7 +3716,7 @@ void HMI_Info() { DWIN_UpdateLCD(); } -/* Tune */ +// Tune void HMI_Tune() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3574,9 +3728,8 @@ void HMI_Tune() { index_tune = select_tune.now; Scroll_Menu(DWIN_SCROLL_UP); } - else { + else Move_Highlight(1, select_tune.now + MROWS - index_tune); - } } } else if (encoder_diffState == ENCODER_DIFF_CCW) { @@ -3586,9 +3739,8 @@ void HMI_Tune() { Scroll_Menu(DWIN_SCROLL_DOWN); if (index_tune == MROWS) Draw_Back_First(); } - else { + else Move_Highlight(-1, select_tune.now + MROWS - index_tune); - } } } else if (encoder_diffState == ENCODER_DIFF_ENTER) { @@ -3601,14 +3753,14 @@ void HMI_Tune() { case TUNE_CASE_SPEED: // Print speed checkkey = PrintSpeed; HMI_ValueStruct.print_speed = feedrate_percentage; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_SPEED + MROWS - index_tune), HMI_ValueStruct.print_speed); + Draw_Edit_Integer3(TUNE_CASE_SPEED + MROWS - index_tune, HMI_ValueStruct.print_speed, true); EncoderRate.enabled = true; break; #if HAS_HOTEND case TUNE_CASE_TEMP: // Nozzle temp checkkey = ETemp; HMI_ValueStruct.E_Temp = thermalManager.degTargetHotend(0); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_TEMP + MROWS - index_tune), HMI_ValueStruct.E_Temp); + Draw_Edit_Integer3(TUNE_CASE_TEMP + MROWS - index_tune, HMI_ValueStruct.E_Temp, true); EncoderRate.enabled = true; break; #endif @@ -3616,7 +3768,7 @@ void HMI_Tune() { case TUNE_CASE_BED: // Bed temp checkkey = BedTemp; HMI_ValueStruct.Bed_Temp = thermalManager.degTargetBed(); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_BED + MROWS - index_tune), HMI_ValueStruct.Bed_Temp); + Draw_Edit_Integer3(TUNE_CASE_BED + MROWS - index_tune, HMI_ValueStruct.Bed_Temp, true); EncoderRate.enabled = true; break; #endif @@ -3624,7 +3776,7 @@ void HMI_Tune() { case TUNE_CASE_FAN: // Fan speed checkkey = FanSpeed; HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_FAN + MROWS - index_tune), HMI_ValueStruct.Fan_speed); + Draw_Edit_Integer3(TUNE_CASE_FAN + MROWS - index_tune, HMI_ValueStruct.Fan_speed, true); EncoderRate.enabled = true; break; #endif @@ -3633,7 +3785,7 @@ void HMI_Tune() { #if EITHER(HAS_BED_PROBE, BABYSTEPPING) checkkey = Homeoffset; HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(TUNE_CASE_ZOFF + MROWS - index_tune), HMI_ValueStruct.offset_value); + DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, EBASE(TUNE_CASE_ZOFF + MROWS - index_tune), HMI_ValueStruct.offset_value); EncoderRate.enabled = true; #else // Apply workspace offset, making the current position 0,0,0 @@ -3650,7 +3802,7 @@ void HMI_Tune() { #if HAS_PREHEAT - /* PLA Preheat */ + // PLA Preheat void HMI_PLAPreheatSetting() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3674,7 +3826,7 @@ void HMI_Tune() { case PREHEAT_CASE_TEMP: // Nozzle temperature checkkey = ETemp; HMI_ValueStruct.E_Temp = ui.material_preset[0].hotend_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_TEMP), ui.material_preset[0].hotend_temp); + Draw_Edit_Integer3(PREHEAT_CASE_TEMP, ui.material_preset[0].hotend_temp, true); EncoderRate.enabled = true; break; #endif @@ -3682,7 +3834,7 @@ void HMI_Tune() { case PREHEAT_CASE_BED: // Bed temperature checkkey = BedTemp; HMI_ValueStruct.Bed_Temp = ui.material_preset[0].bed_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_BED), ui.material_preset[0].bed_temp); + Draw_Edit_Integer3(PREHEAT_CASE_BED, ui.material_preset[0].bed_temp, true); EncoderRate.enabled = true; break; #endif @@ -3690,7 +3842,7 @@ void HMI_Tune() { case PREHEAT_CASE_FAN: // Fan speed checkkey = FanSpeed; HMI_ValueStruct.Fan_speed = ui.material_preset[0].fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_FAN), ui.material_preset[0].fan_speed); + Draw_Edit_Integer3(PREHEAT_CASE_FAN, ui.material_preset[0].fan_speed, true); EncoderRate.enabled = true; break; #endif @@ -3706,7 +3858,7 @@ void HMI_Tune() { DWIN_UpdateLCD(); } - /* ABS Preheat */ + // ABS Preheat void HMI_ABSPreheatSetting() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3730,7 +3882,7 @@ void HMI_Tune() { case PREHEAT_CASE_TEMP: // Set nozzle temperature checkkey = ETemp; HMI_ValueStruct.E_Temp = ui.material_preset[1].hotend_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_TEMP), ui.material_preset[1].hotend_temp); + Draw_Edit_Integer3(PREHEAT_CASE_TEMP, ui.material_preset[1].hotend_temp, true); EncoderRate.enabled = true; break; #endif @@ -3738,7 +3890,7 @@ void HMI_Tune() { case PREHEAT_CASE_BED: // Set bed temperature checkkey = BedTemp; HMI_ValueStruct.Bed_Temp = ui.material_preset[1].bed_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_BED), ui.material_preset[1].bed_temp); + Draw_Edit_Integer3(PREHEAT_CASE_BED, ui.material_preset[1].bed_temp, true); EncoderRate.enabled = true; break; #endif @@ -3746,7 +3898,7 @@ void HMI_Tune() { case PREHEAT_CASE_FAN: // Set fan speed checkkey = FanSpeed; HMI_ValueStruct.Fan_speed = ui.material_preset[1].fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_FAN), ui.material_preset[1].fan_speed); + Draw_Edit_Integer3(PREHEAT_CASE_FAN, ui.material_preset[1].fan_speed, true); EncoderRate.enabled = true; break; #endif @@ -3764,7 +3916,7 @@ void HMI_Tune() { #endif -/* Max Speed */ +// Max Speed void HMI_MaxSpeed() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3781,7 +3933,7 @@ void HMI_MaxSpeed() { checkkey = MaxSpeed_value; HMI_flag.feedspeed_axis = AxisEnum(select_speed.now - 1); HMI_ValueStruct.Max_Feedspeed = planner.settings.max_feedrate_mm_s[HMI_flag.feedspeed_axis]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed, true); EncoderRate.enabled = true; } else { // Back @@ -3793,7 +3945,7 @@ void HMI_MaxSpeed() { DWIN_UpdateLCD(); } -/* Max Acceleration */ +// Max Acceleration void HMI_MaxAcceleration() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3810,7 +3962,7 @@ void HMI_MaxAcceleration() { checkkey = MaxAcceleration_value; HMI_flag.acc_axis = AxisEnum(select_acc.now - 1); HMI_ValueStruct.Max_Acceleration = planner.settings.max_acceleration_mm_per_s2[HMI_flag.acc_axis]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration, true); EncoderRate.enabled = true; } else { // Back @@ -3823,7 +3975,7 @@ void HMI_MaxAcceleration() { } #if HAS_CLASSIC_JERK - /* Max Jerk */ + // Max Jerk void HMI_MaxJerk() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3840,7 +3992,7 @@ void HMI_MaxAcceleration() { checkkey = MaxJerk_value; HMI_flag.jerk_axis = AxisEnum(select_jerk.now - 1); HMI_ValueStruct.Max_Jerk_scaled = planner.max_jerk[HMI_flag.jerk_axis] * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); EncoderRate.enabled = true; } else { // Back @@ -3853,7 +4005,7 @@ void HMI_MaxAcceleration() { } #endif // HAS_CLASSIC_JERK -/* Step */ +// Step void HMI_Step() { ENCODER_DiffState encoder_diffState = get_encoder_state(); if (encoder_diffState == ENCODER_DIFF_NO) return; @@ -3870,7 +4022,7 @@ void HMI_Step() { checkkey = Step_value; HMI_flag.step_axis = AxisEnum(select_step.now - 1); HMI_ValueStruct.Max_Step_scaled = planner.settings.axis_steps_per_mm[HMI_flag.step_axis] * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); EncoderRate.enabled = true; } else { // Back @@ -3934,7 +4086,7 @@ void EachMomentUpdate() { else if (HMI_flag.pause_flag != printingIsPaused()) { // print status update HMI_flag.pause_flag = printingIsPaused(); - if (HMI_flag.pause_flag) ICON_Continue(); else ICON_Pause(); + ICON_ResumeOrPause(); } } @@ -4005,9 +4157,6 @@ void EachMomentUpdate() { Popup_Window_Resume(); update_selection(true); - // TODO: Get the name of the current file from someplace - // - //(void)recovery.interrupted_file_exists(); char * const name = card.longest_filename(); const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * (MENU_CHR_W)) / 2; DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name); @@ -4137,10 +4286,4 @@ void DWIN_StatusChanged_P(PGM_P const pstr) { DWIN_StatusChanged(str); } -// GUI extension -void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode=false) { - DWIN_Draw_String(true, font8x16, Select_Color, bcolor, x + 4, y, F(mode ? "x" : " ")); - DWIN_Draw_Rectangle(0, color, x + 2, y + 2, x + 17, y + 17); -} - #endif // DWIN_CREALITY_LCD diff --git a/Marlin/src/lcd/e3v2/creality/dwin.h b/Marlin/src/lcd/e3v2/creality/dwin.h index 2808fea99ce1..69fe0d6bd675 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.h +++ b/Marlin/src/lcd/e3v2/creality/dwin.h @@ -163,18 +163,6 @@ typedef struct { extern HMI_value_t HMI_ValueStruct; extern HMI_Flag_t HMI_flag; -// Show ICO -void ICON_Print(bool show); -void ICON_Prepare(bool show); -void ICON_Control(bool show); -void ICON_Leveling(bool show); -void ICON_StartInfo(bool show); - -void ICON_Setting(bool show); -void ICON_Pause(bool show); -void ICON_Continue(bool show); -void ICON_Stop(bool show); - #if HAS_HOTEND || HAS_HEATED_BED // Popup message window void DWIN_Popup_Temperature(const bool toohigh); @@ -261,7 +249,6 @@ void EachMomentUpdate(); void DWIN_HandleScreen(); void DWIN_StatusChanged(const char *text); void DWIN_StatusChanged_P(PGM_P const pstr); -void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode /* = false*/); inline void DWIN_StartHoming() { HMI_flag.home_flag = true; } diff --git a/Marlin/src/lcd/e3v2/creality/dwin_lcd.h b/Marlin/src/lcd/e3v2/creality/dwin_lcd.h index e5e79df0fdb4..262276f590b6 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin_lcd.h +++ b/Marlin/src/lcd/e3v2/creality/dwin_lcd.h @@ -31,6 +31,9 @@ #include +//#define USE_STRING_HEADINGS +//#define USE_STRING_TITLES + #define RECEIVED_NO_DATA 0x00 #define RECEIVED_SHAKE_HAND_ACK 0x01 @@ -42,17 +45,12 @@ #define DWIN_WIDTH 272 #define DWIN_HEIGHT 480 -// Character matrix width x height -//#define LCD_WIDTH ((DWIN_WIDTH) / 8) -//#define LCD_HEIGHT ((DWIN_HEIGHT) / 12) - // Picture ID -#define DWIN_Boot_Screen 0 #define Language_English 1 #define Language_Chinese 2 // ICON ID -#define ICON 0x09 +#define ICON 7 // Icon set file 7.ICO #define ICON_LOGO 0 #define ICON_Print_0 1 @@ -258,8 +256,7 @@ inline void DWIN_Draw_VLine(uint16_t color, uint16_t xStart, uint16_t yStart, ui // color: Rectangle color // xStart/yStart: upper left point // xEnd/yEnd: lower right point -void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, - uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); // Draw a box // mode: 0=frame, 1=fill, 2=XOR fill diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index cd204eef5915..85ddcb4bc412 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -273,8 +273,8 @@ namespace Language_en { PROGMEM Language_Str MSG_MOVE_I = _UxGT("Move ") LCD_STR_I; PROGMEM Language_Str MSG_MOVE_J = _UxGT("Move ") LCD_STR_J; PROGMEM Language_Str MSG_MOVE_K = _UxGT("Move ") LCD_STR_K; - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extruder *"); + PROGMEM Language_Str MSG_MOVE_E = _UxGT("Move Extruder"); + PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Move E*"); PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Hotend too cold"); PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Move %smm"); PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Move 0.1mm"); @@ -336,13 +336,13 @@ namespace Language_en { PROGMEM Language_Str MSG_SELECT_E = _UxGT("Select *"); PROGMEM Language_Str MSG_ACC = _UxGT("Accel"); PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); + PROGMEM Language_Str MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VE_JERK = _UxGT("Max E Jerk"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocity"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index 8630f48b3736..1866426a6554 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -126,7 +126,7 @@ void menu_media_filelist() { #endif } else if (card.isMounted()) - ACTION_ITEM_P(PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir); + ACTION_ITEM_P(PSTR(LCD_STR_FOLDER " .."), lcd_sd_updir); if (ui.should_draw()) for (uint16_t i = 0; i < fileCnt; i++) { if (_menuLineNr == _thisItemNr) { diff --git a/buildroot/tests/STM32F103RET6_creality b/buildroot/tests/STM32F103RET6_creality index 8c4177b90746..ad88225807c0 100755 --- a/buildroot/tests/STM32F103RET6_creality +++ b/buildroot/tests/STM32F103RET6_creality @@ -11,7 +11,7 @@ set -e # use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_enable MARLIN_DEV_MODE BUFFER_MONITORING -exec_test $1 $2 "Ender 3 v2" "$3" +exec_test $1 $2 "Ender 3 v2 with CrealityUI" "$3" use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_disable CLASSIC_JERK From ab8e212c2d66d806e0fb8ca32f9bd333949728d7 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 18 Aug 2021 00:58:27 +0000 Subject: [PATCH 225/323] [cron] Bump distribution date (2021-08-18) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 092d76f71d7c..4c60042208ec 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-17" +//#define STRING_DISTRIBUTION_DATE "2021-08-18" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 4cc068511ebc..7856073c30a0 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-17" + #define STRING_DISTRIBUTION_DATE "2021-08-18" #endif /** From 6464601411346c1da7bf15016b07c0fa9558a28c Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue, 17 Aug 2021 20:27:21 -0700 Subject: [PATCH 226/323] =?UTF-8?q?=E2=8F=AA=EF=B8=8F=20Revert=20ABL=20G29?= =?UTF-8?q?=20feedrate=20(#22574)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts 9130f58 --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 2 -- Marlin/src/module/motion.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 18e386212845..29009c6e2d9a 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -363,8 +363,6 @@ G29_TYPE GcodeSuite::G29() { #if ABL_USES_GRID xy_probe_feedrate_mm_s = MMM_TO_MMS(parser.linearval('S', XY_PROBE_FEEDRATE)); - if (!xy_probe_feedrate_mm_s) xy_probe_feedrate_mm_s = PLANNER_XY_FEEDRATE(); - NOLESS(xy_probe_feedrate_mm_s, planner.settings.min_feedrate_mm_s); const float x_min = probe.min_x(), x_max = probe.max_x(), y_min = probe.min_y(), y_max = probe.max_y(); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 838605cd549f..eb6dc6597ce4 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -483,7 +483,7 @@ void do_blocking_move_to(LINEAR_AXIS_ARGS(const float), const_feedRate_t fr_mm_s DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING)); if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", LINEAR_AXIS_ARGS()); - const feedRate_t xy_feedrate = fr_mm_s ?: PLANNER_XY_FEEDRATE(); + const feedRate_t xy_feedrate = fr_mm_s ?: feedRate_t(XY_PROBE_FEEDRATE_MM_S); #if HAS_Z_AXIS const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS); From c05de6cbf8b914c9198091423fe19415e802de6e Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 17 Aug 2021 20:35:12 -0700 Subject: [PATCH 227/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Simplify=20PROBING?= =?UTF-8?q?=5FSTEPPERS=5FOFF=20(#22581)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 7 +++---- Marlin/src/module/probe.cpp | 19 +++++++------------ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 0f33b4799ddd..04848bd0d6aa 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2932,10 +2932,9 @@ #endif #if !BOTH(HAS_BED_PROBE, HAS_EXTRUDERS) #undef PROBING_ESTEPPERS_OFF -#endif -#if BOTH(PROBING_STEPPERS_OFF, PROBING_ESTEPPERS_OFF) - #undef PROBING_ESTEPPERS_OFF - #warning "PROBING_STEPPERS_OFF includes PROBING_ESTEPPERS_OFF. Disabling PROBING_ESTEPPERS_OFF." +#elif ENABLED(PROBING_STEPPERS_OFF) + // PROBING_STEPPERS_OFF implies PROBING_ESTEPPERS_OFF, make sure it is defined + #define PROBING_ESTEPPERS_OFF #endif #if EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF) #define HEATER_IDLE_HANDLER 1 diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index d0f32a32c072..ded5d438934b 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -250,21 +250,16 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() TERN_(PROBING_HEATERS_OFF, thermalManager.pause_heaters(dopause)); TERN_(PROBING_FANS_OFF, thermalManager.set_fans_paused(dopause)); TERN_(PROBING_ESTEPPERS_OFF, if (dopause) disable_e_steppers()); - #if ENABLED(PROBING_STEPPERS_OFF) - IF_DISABLED(DELTA, static uint8_t old_trusted); + #if ENABLED(PROBING_STEPPERS_OFF) && DISABLED(DELTA) + static uint8_t old_trusted; if (dopause) { - #if DISABLED(DELTA) - old_trusted = axis_trusted; - DISABLE_AXIS_X(); - DISABLE_AXIS_Y(); - #endif - IF_DISABLED(PROBING_ESTEPPERS_OFF, disable_e_steppers()); + old_trusted = axis_trusted; + DISABLE_AXIS_X(); + DISABLE_AXIS_Y(); } else { - #if DISABLED(DELTA) - if (TEST(old_trusted, X_AXIS)) ENABLE_AXIS_X(); - if (TEST(old_trusted, Y_AXIS)) ENABLE_AXIS_Y(); - #endif + if (TEST(old_trusted, X_AXIS)) ENABLE_AXIS_X(); + if (TEST(old_trusted, Y_AXIS)) ENABLE_AXIS_Y(); axis_trusted = old_trusted; } #endif From f8c67c48101c3456c301461fbb9013107f20f182 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Wed, 18 Aug 2021 05:37:27 +0200 Subject: [PATCH 228/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Longer3D=20PWM/tim?= =?UTF-8?q?er=20pins=20(#22583)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MARLIN_F103VE_LONGER/PeripheralPins.c | 30 ++----------------- ini/stm32f1.ini | 2 +- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c index ba4046d5f988..99226a739d80 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c @@ -79,9 +79,6 @@ WEAK const PinMap PinMap_PWM[] = { //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 #if defined(STM32F103xE) || defined(STM32F103xG) //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 -#endif -#ifdef STM32F103xG - //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM9_CH1 #endif //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 #if defined(STM32F103xE) || defined(STM32F103xG) @@ -89,20 +86,11 @@ WEAK const PinMap PinMap_PWM[] = { {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM5_CH4 #else {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 -#endif -#if defined(STM32F103xG) - //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM9_CH2 #endif {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM3_CH1 -#if defined(STM32F103xG) - //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM13_CH1 -#endif {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 1)}, // TIM1_CH1N //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM8_CH1N -#if defined(STM32F103xG) - //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM14_CH1 -#endif {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM1_CH1 //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM1_CH2 @@ -132,26 +120,14 @@ WEAK const PinMap PinMap_PWM[] = { {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM4_CH1 {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM4_CH2 {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM4_CH3 -#if defined(STM32F103xG) - //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM10_CH1 -#endif {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM4_CH4 -#if defined(STM32F103xG) - //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM11_CH1 -#endif {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 3, 0)}, // TIM2_CH3 //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 3, 0)}, // TIM2_CH3 {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 4, 0)}, // TIM2_CH4 //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 4, 0)}, // TIM2_CH4 {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM1_CH1N {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM1_CH2N -#if defined(STM32F103xG) - //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM12_CH1 -#endif {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM1_CH3N -#if defined(STM32F103xG) - //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM12_CH2 -#endif {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 1, 0)}, // TIM3_CH1 #if defined(STM32F103xE) || defined(STM32F103xG) //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM8_CH1 @@ -170,10 +146,6 @@ WEAK const PinMap PinMap_PWM[] = { {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 3, 0)}, // TIM4_CH3 {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 4, 0)}, // TIM4_CH4 -#if defined(STM32F103xG) - {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM9_ENABLE, 1, 0)}, // TIM9_CH1 - {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM9_ENABLE, 2, 0)}, // TIM9_CH2 -#endif {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 1, 1)}, // TIM1_CH1N {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 1, 0)}, // TIM1_CH1 {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 2, 1)}, // TIM1_CH2N @@ -182,6 +154,8 @@ WEAK const PinMap PinMap_PWM[] = { {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 3, 0)}, // TIM1_CH3 {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 4, 0)}, // TIM1_CH4 #endif // if 0 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 TFT Backlight + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 Servo connector {NC, NP, 0} }; #endif diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index f1cb078fd81c..dc9607ef844b 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -338,7 +338,7 @@ board_build.variant = MARLIN_F103VE_LONGER board_build.rename = project.bin board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 -build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 +build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DSTEP_TIMER=5 -DU20 -DTS_V12 build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED extra_scripts = ${stm32_variant.extra_scripts} monitor_speed = 250000 From 6a8385624f4a5d75bb9beeec5c5420415b7dcea8 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Wed, 18 Aug 2021 05:39:08 +0200 Subject: [PATCH 229/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20STM32=20delay,=20d?= =?UTF-8?q?ouble=20reset=20in=20FSMC=20TFT=20init=20(#22584)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 10 ---------- Marlin/src/lcd/tft_io/tft_io.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index e9e712d5a362..dacf533224fc 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -36,16 +36,6 @@ LCD_CONTROLLER_TypeDef *TFT_FSMC::LCD; void TFT_FSMC::Init() { uint32_t controllerAddress; - - #if PIN_EXISTS(TFT_RESET) - OUT_WRITE(TFT_RESET_PIN, HIGH); - HAL_Delay(100); - #endif - - #if PIN_EXISTS(TFT_BACKLIGHT) - OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); - #endif - FSMC_NORSRAM_TimingTypeDef Timing, ExtTiming; uint32_t NSBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS); diff --git a/Marlin/src/lcd/tft_io/tft_io.cpp b/Marlin/src/lcd/tft_io/tft_io.cpp index 29c7da235c0e..ded711b57768 100644 --- a/Marlin/src/lcd/tft_io/tft_io.cpp +++ b/Marlin/src/lcd/tft_io/tft_io.cpp @@ -65,13 +65,13 @@ if (lcd_id != 0xFFFFFFFF) return; #if PIN_EXISTS(TFT_RESET) OUT_WRITE(TFT_RESET_PIN, HIGH); delay(10); - OUT_WRITE(TFT_RESET_PIN, LOW); + WRITE(TFT_RESET_PIN, LOW); delay(10); - OUT_WRITE(TFT_RESET_PIN, HIGH); + WRITE(TFT_RESET_PIN, HIGH); #endif #if PIN_EXISTS(TFT_BACKLIGHT) - OUT_WRITE(TFT_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); + WRITE(TFT_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); #endif // io.Init(); @@ -149,7 +149,7 @@ if (lcd_id != 0xFFFFFFFF) return; #endif #if PIN_EXISTS(TFT_BACKLIGHT) && ENABLED(DELAYED_BACKLIGHT_INIT) - OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); + WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif } From 11e8cd9db938fcc5ee5c5234f148655a8f19c20d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Aug 2021 02:32:37 -0500 Subject: [PATCH 230/323] =?UTF-8?q?=F0=9F=A9=B9=20Followup=20to=20Creality?= =?UTF-8?q?UI=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Followup to #22586 fixing `Draw_Menu_Line` with `GET_TEXT_F`. - More number drawing convenience functions. - Return on `ENCODER_DIFF_NO` to reduce indent. - Put Main Menu buttons closer to the top. - Move status message up slightly. - Fix some indentation. --- Marlin/src/lcd/e3v2/creality/dwin.cpp | 750 +++++++++++++------------- 1 file changed, 379 insertions(+), 371 deletions(-) diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index f008a7a2b4f0..9e8ceed368aa 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -95,7 +95,7 @@ #define PAUSE_HEAT #define MENU_CHAR_LIMIT 24 -#define STATUS_Y 360 +#define STATUS_Y 354 // Print speed limit #define MIN_PRINT_SPEED 10 @@ -216,17 +216,6 @@ void HMI_ToggleLanguage() { #endif } -void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { - if (value < 0) { - DWIN_Draw_String(true, size, Color_White, bColor, x - 6, y, F("-")); - DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, -value); - } - else { - DWIN_Draw_String(true, size, Color_White, bColor, x - 6, y, F(" ")); - DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value); - } -} - typedef struct { uint16_t x, y, w, h; } icon_info_t; typedef struct { uint16_t x, y[2], w, h; } text_info_t; @@ -241,7 +230,7 @@ void ICON_Button(const bool here, const int iconid, const icon_info_t &ico, cons // Main Menu: "Print" // void ICON_Print() { - constexpr icon_info_t ico = { 17, 130, 110, 100 }; + constexpr icon_info_t ico = { 17, 110, 110, 100 }; constexpr text_info_t txt[2] = { { 1, { 417, 449 }, 30, 14 }, { 1, { 405, 447 }, 27, 15 } @@ -253,7 +242,7 @@ void ICON_Print() { // Main Menu: "Prepare" // void ICON_Prepare() { - constexpr icon_info_t ico = { 145, 130, 110, 100 }; + constexpr icon_info_t ico = { 145, 110, 110, 100 }; constexpr text_info_t txt[2] = { { 33, { 417, 449 }, 51, 14 }, { 31, { 405, 447 }, 27, 15 } @@ -265,7 +254,7 @@ void ICON_Prepare() { // Main Menu: "Control" // void ICON_Control() { - constexpr icon_info_t ico = { 17, 246, 110, 100 }; + constexpr icon_info_t ico = { 17, 226, 110, 100 }; constexpr text_info_t txt[2] = { { 85, { 417, 449 }, 46, 14 }, { 61, { 405, 447 }, 27, 15 } @@ -277,7 +266,7 @@ void ICON_Control() { // Main Menu: "Info" // void ICON_StartInfo() { - constexpr icon_info_t ico = { 145, 246, 110, 100 }; + constexpr icon_info_t ico = { 145, 226, 110, 100 }; constexpr text_info_t txt[2] = { { 133, { 417, 449 }, 23, 14 }, { 91, { 405, 447 }, 27, 15 } @@ -289,7 +278,7 @@ void ICON_StartInfo() { // Main Menu: "Level" // void ICON_Leveling() { - constexpr icon_info_t ico = { 145, 246, 110, 100 }; + constexpr icon_info_t ico = { 145, 226, 110, 100 }; constexpr text_info_t txt[2] = { { 88, { 433, 464 }, 36, 14 }, { 211, { 405, 447 }, 27, 15 } @@ -301,7 +290,7 @@ void ICON_Leveling() { // Printing: "Tune" // void ICON_Tune() { - constexpr icon_info_t ico = { 8, 252, 80, 100 }; + constexpr icon_info_t ico = { 8, 232, 80, 100 }; constexpr text_info_t txt[2] = { { 0, { 433, 464 }, 32, 14 }, { 121, { 405, 447 }, 27, 15 } @@ -313,7 +302,7 @@ void ICON_Tune() { // Printing: "Pause" // void ICON_Pause() { - constexpr icon_info_t ico = { 96, 252, 80, 100 }; + constexpr icon_info_t ico = { 96, 232, 80, 100 }; constexpr text_info_t txt[2] = { { 157, { 417, 449 }, 39, 14 }, { 181, { 405, 447 }, 27, 15 } @@ -325,7 +314,7 @@ void ICON_Pause() { // Printing: "Resume" // void ICON_Resume() { - constexpr icon_info_t ico = { 96, 252, 80, 100 }; + constexpr icon_info_t ico = { 96, 232, 80, 100 }; constexpr text_info_t txt[2] = { { 33, { 433, 464 }, 53, 14 }, { 1, { 405, 447 }, 27, 15 } @@ -333,11 +322,18 @@ void ICON_Resume() { ICON_Button(select_print.now == 1, ICON_Continue_0, ico, txt); } +void ICON_ResumeOrPause() { + if (printingIsPaused() || HMI_flag.pause_flag || HMI_flag.pause_action) + ICON_Resume(); + else + ICON_Pause(); +} + // // Printing: "Stop" // void ICON_Stop() { - constexpr icon_info_t ico = { 184, 252, 80, 100 }; + constexpr icon_info_t ico = { 184, 232, 80, 100 }; constexpr text_info_t txt[2] = { { 196, { 417, 449 }, 29, 14 }, { 151, { 405, 447 }, 27, 12 } @@ -429,10 +425,14 @@ void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34); } +void Draw_Menu_LineF(const uint8_t line, const uint8_t icon=0, const __FlashStringHelper *label=nullptr, bool more=false) { + Draw_Menu_Line(line, icon, (char*)label, more); +} + void Draw_Checkbox_Line(const uint8_t line, const bool ison) { const uint16_t x = 225, y = EBASE(line) - 2; DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x + 5, y, F(ison ? "X" : " ")); - DWIN_Draw_Rectangle(0, Color_White, x + 2, y + 2, x + 17, y + 17); + DWIN_Draw_Rectangle(0, Color_White, x + 2, y + 2, x + 16, y + 16); } // AreaCopy for a Menu Item @@ -578,6 +578,45 @@ void DWIN_Draw_Label(const uint8_t row, const __FlashStringHelper *title) { DWIN_Draw_Label(row, (char*)title); } +void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + if (value < 0) { + DWIN_Draw_String(true, size, Color_White, bColor, x - 8, y, F("-")); + DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, -value); + } + else { + DWIN_Draw_String(true, size, Color_White, bColor, x - 8, y, F(" ")); + DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value); + } +} + +void Draw_Edit_Integer3(const uint8_t row, const uint16_t value, const bool active=false) { + DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 3, 220, EBASE(row), value); +} + +void Draw_Edit_Integer4(const uint8_t row, const uint16_t value, const bool active=false) { + DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 4, 220 - 1 * 8, EBASE(row), value); +} + +void Draw_Edit_Float3(const uint8_t row, const uint16_t value, const bool active=false) { + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 3, UNITFDIGITS, 220 - UNITFDIGITS * 8, EBASE(row), value); +} + +void Draw_Edit_Signed_Float2(const uint8_t row, const float value, const bool active=false) { + DWIN_Draw_Signed_Float(font8x16, active ? Select_Color : Color_Bg_Black, 2, UNITFDIGITS, 220 + 8 - UNITFDIGITS * 8, EBASE(row), value); +} + +void Draw_Edit_Signed_Float3(const uint8_t row, const float value, const bool active=false) { + DWIN_Draw_Signed_Float(font8x16, active ? Select_Color : Color_Bg_Black, 3, UNITFDIGITS, 220 - UNITFDIGITS * 8, EBASE(row), value); +} + +void Draw_Stat_Int(const uint16_t xpos, const uint16_t ypos, const uint16_t value) { + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, xpos, ypos, value); +} + +void Draw_Stat_Float(const uint16_t xpos, const uint16_t ypos, const float value) { + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, xpos, ypos, value); +} + // // Prepare Menu // @@ -623,7 +662,6 @@ void Item_Prepare_Home(const uint8_t row) { if (HMI_IsChinese()) { #if HAS_BED_PROBE Item_AreaCopy(174, 164, 223, 177, row); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(row), probe.offset.z * 100); #else Item_AreaCopy(43, 89, 98, 101, row); #endif @@ -633,17 +671,17 @@ void Item_Prepare_Home(const uint8_t row) { #ifdef USE_STRING_TITLES DWIN_Draw_Label(row, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); #else - Item_AreaCopy(94, 179, 143, 190, row); // "Z-Offset" + Item_AreaCopy( 94, 179, 143, 190, row); // "Z-Offset" #endif - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(row), probe.offset.z * 100); #else #ifdef USE_STRING_TITLES DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); #else - Item_AreaCopy(1, 76, 103, 87, row); // "Set home offsets" + Item_AreaCopy( 1, 76, 103, 87, row); // "Set home offsets" #endif #endif } + Draw_Edit_Signed_Float2(row, BABY_Z_VAR * 100); Draw_Menu_Line(row, ICON_SetHome); } @@ -658,7 +696,7 @@ void Item_Prepare_Home(const uint8_t row) { DWIN_Draw_Label(row, GET_TEXT_F(MSG_PREHEAT_1)); #else Item_AreaCopy(108, 76, 155, 87, row); // "Preheat" - say_pla_en(52, row); // "PLA" + say_pla_en(52, row); // "PLA" #endif } Draw_Menu_Line(row, ICON_PLAPreheat); @@ -672,7 +710,7 @@ void Item_Prepare_Home(const uint8_t row) { DWIN_Draw_Label(row, F("Preheat " PREHEAT_2_LABEL)); #else Item_AreaCopy(108, 76, 155, 87, row); // "Preheat" - say_abs_en(52, row); // "ABS" + say_abs_en(52, row); // "ABS" #endif } Draw_Menu_Line(row, ICON_ABSPreheat); @@ -829,9 +867,9 @@ void Draw_Control_Menu() { #endif } - if (CVISI(0)) Draw_Back_First(select_control.now == 0); // < Back - if (CVISI(CONTROL_CASE_TEMP)) Item_Control_Temp(CSCROL(CONTROL_CASE_TEMP)); // Temperature > - if (CVISI(CONTROL_CASE_MOVE)) Item_Control_Motion(CSCROL(CONTROL_CASE_MOVE)); // Motion > + if (CVISI(0)) Draw_Back_First(select_control.now == 0); // < Back + if (CVISI(CONTROL_CASE_TEMP)) Item_Control_Temp(CSCROL(CONTROL_CASE_TEMP)); // Temperature > + if (CVISI(CONTROL_CASE_MOVE)) Item_Control_Motion(CSCROL(CONTROL_CASE_MOVE)); // Motion > if (HMI_IsChinese()) { #if ENABLED(EEPROM_SETTINGS) @@ -886,14 +924,6 @@ void Draw_Control_Menu() { #endif } -void Draw_Edit_Integer3(const uint8_t line, const uint16_t value, const bool active=false) { - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 3, 220, EBASE(line), value); -} - -void Draw_Edit_Integer4(const uint8_t line, const uint16_t value, const bool active=false) { - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 4, 210, EBASE(line), value); -} - // // Tune Menu // @@ -974,7 +1004,7 @@ void Draw_Tune_Menu() { #endif #if HAS_ZOFFSET_ITEM Draw_Menu_Line(TUNE_CASE_ZOFF, ICON_Zoffset); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(TUNE_CASE_ZOFF), BABY_Z_VAR * 100); + Draw_Edit_Signed_Float2(TUNE_CASE_ZOFF, BABY_Z_VAR * 100); #endif } @@ -1156,9 +1186,9 @@ void Popup_window_PauseOrStop() { Clear_Main_Window(); Draw_Popup_Bkgd_60(); if (HMI_IsChinese()) { - if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); // Pause Print - else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); // Stop Print - DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); + if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); // Pause + else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); // Stop + DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); // Print DWIN_ICON_Show(ICON, ICON_Confirm_C, 26, 280); DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280); } @@ -1172,43 +1202,40 @@ void Popup_window_PauseOrStop() { } void Draw_Printing_Screen() { + const uint16_t y = 168; if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(30, 1, 42, 14); // "Printing" - DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 41, 188); // "Printing Time" - DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 176, 188); // "Remain" + DWIN_Frame_TitleCopy(30, 1, 42, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 43, y); // "Printing Time" + DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 178, y); // "Remain" } else { - DWIN_Frame_TitleCopy(42, 0, 47, 14); // "Printing" - DWIN_Frame_AreaCopy(1, 1, 43, 97, 59, 41, 188); // "Printing Time" - DWIN_Frame_AreaCopy(1, 100, 43, 152, 56, 176, 188); // "Remain" + DWIN_Frame_TitleCopy(42, 0, 47, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 1, 43, 97, 59, 43, y); // "Printing Time" + DWIN_Frame_AreaCopy(1, 100, 43, 152, 56, 178, y); // "Remain" } } void Draw_Print_ProgressBar() { + constexpr uint16_t y = 93, h = 21; DWIN_ICON_Show(ICON, ICON_Bar, 15, 93); - DWIN_Draw_Rectangle(1, BarFill_Color, 16 + _card_percent * 240 / 100, 93, 256, 113); - DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, 133, _card_percent); - DWIN_Draw_String(false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%")); + DWIN_Draw_Rectangle(1, BarFill_Color, 16 + _card_percent * 240 / 100, y, 256, y + h - 1); + DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, y + 40, _card_percent); + DWIN_Draw_String(false, font8x16, Percent_Color, Color_Bg_Black, 133, y + 40, F("%")); } void Draw_Print_ProgressElapsed() { + constexpr uint16_t x = 45, y = 192; duration_t elapsed = print_job_timer.duration(); // print timer - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 42, 212, elapsed.value / 3600); - DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 58, 212, F(":")); - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 66, 212, (elapsed.value % 3600) / 60); + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x, y, elapsed.value / 3600); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, x + 8 * 2, y, F(":")); + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x + 8 * 3, y, (elapsed.value % 3600) / 60); } void Draw_Print_ProgressRemain() { - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 176, 212, _remain_time / 3600); - DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":")); - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 200, 212, (_remain_time % 3600) / 60); -} - -void ICON_ResumeOrPause() { - if (printingIsPaused() || HMI_flag.pause_flag || HMI_flag.pause_action) - ICON_Resume(); - else - ICON_Pause(); + constexpr uint16_t x = 179, y = 192; + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x, y, _remain_time / 3600); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, x + 8 * 2, y, F(":")); + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x + 8 * 3, y, (_remain_time % 3600) / 60); } void Goto_PrintProcess() { @@ -1226,8 +1253,8 @@ void Goto_PrintProcess() { const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * MENU_CHR_W) / 2; DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, npos, 60, name); - DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 193); - DWIN_ICON_Show(ICON, ICON_RemainTime, 150, 191); + DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 163); + DWIN_ICON_Show(ICON, ICON_RemainTime, 150, 161); Draw_Print_ProgressBar(); Draw_Print_ProgressElapsed(); @@ -1283,47 +1310,44 @@ void HMI_Move_Done(const AxisEnum axis) { void HMI_Move_X() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scaled)) { - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); - return HMI_Move_Done(X_AXIS); - } - LIMIT(HMI_ValueStruct.Move_X_scaled, (X_MIN_POS) * MINUNITMULT, (X_MAX_POS) * MINUNITMULT); - current_position.x = HMI_ValueStruct.Move_X_scaled / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); - DWIN_UpdateLCD(); - HMI_Plan_Move(homing_feedrate(X_AXIS)); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scaled)) { + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled); + return HMI_Move_Done(X_AXIS); } + LIMIT(HMI_ValueStruct.Move_X_scaled, (X_MIN_POS) * MINUNITMULT, (X_MAX_POS) * MINUNITMULT); + current_position.x = HMI_ValueStruct.Move_X_scaled / MINUNITMULT; + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(homing_feedrate(X_AXIS)); } void HMI_Move_Y() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scaled)) { - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); - return HMI_Move_Done(Y_AXIS); - } - LIMIT(HMI_ValueStruct.Move_Y_scaled, (Y_MIN_POS) * MINUNITMULT, (Y_MAX_POS) * MINUNITMULT); - current_position.y = HMI_ValueStruct.Move_Y_scaled / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); - DWIN_UpdateLCD(); - HMI_Plan_Move(homing_feedrate(Y_AXIS)); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scaled)) { + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled); + return HMI_Move_Done(Y_AXIS); } + LIMIT(HMI_ValueStruct.Move_Y_scaled, (Y_MIN_POS) * MINUNITMULT, (Y_MAX_POS) * MINUNITMULT); + current_position.y = HMI_ValueStruct.Move_Y_scaled / MINUNITMULT; + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(homing_feedrate(Y_AXIS)); } void HMI_Move_Z() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scaled)) { - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); - return HMI_Move_Done(Z_AXIS); - } - LIMIT(HMI_ValueStruct.Move_Z_scaled, (Z_MIN_POS) * MINUNITMULT, (Z_MAX_POS) * MINUNITMULT); - current_position.z = HMI_ValueStruct.Move_Z_scaled / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); - DWIN_UpdateLCD(); - HMI_Plan_Move(homing_feedrate(Z_AXIS)); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scaled)) { + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled); + return HMI_Move_Done(Z_AXIS); } + LIMIT(HMI_ValueStruct.Move_Z_scaled, (Z_MIN_POS) * MINUNITMULT, (Z_MAX_POS) * MINUNITMULT); + current_position.z = HMI_ValueStruct.Move_Z_scaled / MINUNITMULT; + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(homing_feedrate(Z_AXIS)); } #if HAS_HOTEND @@ -1331,18 +1355,17 @@ void HMI_Move_Z() { void HMI_Move_E() { static float last_E_scaled = 0; ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_E_scaled)) { - last_E_scaled = HMI_ValueStruct.Move_E_scaled; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(4), last_E_scaled); - return HMI_Move_Done(E_AXIS); - } - LIMIT(HMI_ValueStruct.Move_E_scaled, last_E_scaled - (EXTRUDE_MAXLENGTH) * MINUNITMULT, last_E_scaled + (EXTRUDE_MAXLENGTH) * MINUNITMULT); - current_position.e = HMI_ValueStruct.Move_E_scaled / MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(4), HMI_ValueStruct.Move_E_scaled); - DWIN_UpdateLCD(); - HMI_Plan_Move(MMM_TO_MMS(FEEDRATE_E)); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_E_scaled)) { + last_E_scaled = HMI_ValueStruct.Move_E_scaled; + Draw_Edit_Signed_Float3(4, last_E_scaled); + return HMI_Move_Done(E_AXIS); } + LIMIT(HMI_ValueStruct.Move_E_scaled, last_E_scaled - (EXTRUDE_MAXLENGTH) * MINUNITMULT, last_E_scaled + (EXTRUDE_MAXLENGTH) * MINUNITMULT); + current_position.e = HMI_ValueStruct.Move_E_scaled / MINUNITMULT; + Draw_Edit_Signed_Float3(4, HMI_ValueStruct.Move_E_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(MMM_TO_MMS(FEEDRATE_E)); } #endif @@ -1353,32 +1376,31 @@ void HMI_Move_Z() { void HMI_Zoffset() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t zoff_line; - switch (HMI_ValueStruct.show_mode) { - case -4: zoff_line = PREPARE_CASE_ZOFF + MROWS - index_prepare; break; - default: zoff_line = TUNE_CASE_ZOFF + MROWS - index_tune; - } - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.offset_value)) { - EncoderRate.enabled = false; - #if HAS_BED_PROBE - probe.offset.z = dwin_zoffset; - TERN_(EEPROM_SETTINGS, settings.save()); - #endif - checkkey = HMI_ValueStruct.show_mode == -4 ? Prepare : Tune; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, EBASE(zoff_line), TERN(HAS_BED_PROBE, BABY_Z_VAR * 100, HMI_ValueStruct.offset_value)); - DWIN_UpdateLCD(); - return; - } - LIMIT(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100, (Z_PROBE_OFFSET_RANGE_MAX) * 100); - last_zoffset = dwin_zoffset; - dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f; - #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) - if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t zoff_line; + switch (HMI_ValueStruct.show_mode) { + case -4: zoff_line = PREPARE_CASE_ZOFF + MROWS - index_prepare; break; + default: zoff_line = TUNE_CASE_ZOFF + MROWS - index_tune; + } + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.offset_value)) { + EncoderRate.enabled = false; + #if HAS_BED_PROBE + probe.offset.z = dwin_zoffset; + TERN_(EEPROM_SETTINGS, settings.save()); #endif - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, EBASE(zoff_line), HMI_ValueStruct.offset_value); + checkkey = HMI_ValueStruct.show_mode == -4 ? Prepare : Tune; + Draw_Edit_Signed_Float2(zoff_line, TERN(HAS_BED_PROBE, BABY_Z_VAR * 100, HMI_ValueStruct.offset_value)); DWIN_UpdateLCD(); + return; } + LIMIT(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100, (Z_PROBE_OFFSET_RANGE_MAX) * 100); + last_zoffset = dwin_zoffset; + dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f; + #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); + #endif + Draw_Edit_Signed_Float2(zoff_line, HMI_ValueStruct.offset_value, true); + DWIN_UpdateLCD(); } #endif // HAS_ZOFFSET_ITEM @@ -1387,41 +1409,40 @@ void HMI_Move_Z() { void HMI_ETemp() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t temp_line; - switch (HMI_ValueStruct.show_mode) { - case -1: temp_line = TEMP_CASE_TEMP; break; - case -2: temp_line = PREHEAT_CASE_TEMP; break; - case -3: temp_line = PREHEAT_CASE_TEMP; break; - default: temp_line = TUNE_CASE_TEMP + MROWS - index_tune; + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t temp_line; + switch (HMI_ValueStruct.show_mode) { + case -1: temp_line = TEMP_CASE_TEMP; break; + case -2: temp_line = PREHEAT_CASE_TEMP; break; + case -3: temp_line = PREHEAT_CASE_TEMP; break; + default: temp_line = TUNE_CASE_TEMP + MROWS - index_tune; + } + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.E_Temp)) { + EncoderRate.enabled = false; + if (HMI_ValueStruct.show_mode == -2) { + checkkey = PLAPreheat; + ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; + Draw_Edit_Integer3(temp_line, ui.material_preset[0].hotend_temp); + return; } - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.E_Temp)) { - EncoderRate.enabled = false; - if (HMI_ValueStruct.show_mode == -2) { - checkkey = PLAPreheat; - ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; - Draw_Edit_Integer3(temp_line, ui.material_preset[0].hotend_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -3) { - checkkey = ABSPreheat; - ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; - Draw_Edit_Integer3(temp_line, ui.material_preset[1].hotend_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -1) // Temperature - checkkey = TemperatureID; - else - checkkey = Tune; - Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp); - thermalManager.setTargetHotend(HMI_ValueStruct.E_Temp, 0); + else if (HMI_ValueStruct.show_mode == -3) { + checkkey = ABSPreheat; + ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; + Draw_Edit_Integer3(temp_line, ui.material_preset[1].hotend_temp); return; } - // E_Temp limit - LIMIT(HMI_ValueStruct.E_Temp, HEATER_0_MINTEMP, thermalManager.hotend_max_target(0)); - // E_Temp value - Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp, true); + else if (HMI_ValueStruct.show_mode == -1) // Temperature + checkkey = TemperatureID; + else + checkkey = Tune; + Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp); + thermalManager.setTargetHotend(HMI_ValueStruct.E_Temp, 0); + return; } + // E_Temp limit + LIMIT(HMI_ValueStruct.E_Temp, HEATER_0_MINTEMP, thermalManager.hotend_max_target(0)); + // E_Temp value + Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp, true); } #endif // HAS_HOTEND @@ -1430,41 +1451,40 @@ void HMI_Move_Z() { void HMI_BedTemp() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t bed_line; - switch (HMI_ValueStruct.show_mode) { - case -1: bed_line = TEMP_CASE_BED; break; - case -2: bed_line = PREHEAT_CASE_BED; break; - case -3: bed_line = PREHEAT_CASE_BED; break; - default: bed_line = TUNE_CASE_BED + MROWS - index_tune; + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t bed_line; + switch (HMI_ValueStruct.show_mode) { + case -1: bed_line = TEMP_CASE_BED; break; + case -2: bed_line = PREHEAT_CASE_BED; break; + case -3: bed_line = PREHEAT_CASE_BED; break; + default: bed_line = TUNE_CASE_BED + MROWS - index_tune; + } + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Bed_Temp)) { + EncoderRate.enabled = false; + if (HMI_ValueStruct.show_mode == -2) { + checkkey = PLAPreheat; + ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; + Draw_Edit_Integer3(bed_line, ui.material_preset[0].bed_temp); + return; } - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Bed_Temp)) { - EncoderRate.enabled = false; - if (HMI_ValueStruct.show_mode == -2) { - checkkey = PLAPreheat; - ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; - Draw_Edit_Integer3(bed_line, ui.material_preset[0].bed_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -3) { - checkkey = ABSPreheat; - ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; - Draw_Edit_Integer3(bed_line, ui.material_preset[1].bed_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -1) - checkkey = TemperatureID; - else - checkkey = Tune; - Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp); - thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp); + else if (HMI_ValueStruct.show_mode == -3) { + checkkey = ABSPreheat; + ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; + Draw_Edit_Integer3(bed_line, ui.material_preset[1].bed_temp); return; } - // Bed_Temp limit - LIMIT(HMI_ValueStruct.Bed_Temp, BED_MINTEMP, BED_MAX_TARGET); - // Bed_Temp value - Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp, true); + else if (HMI_ValueStruct.show_mode == -1) + checkkey = TemperatureID; + else + checkkey = Tune; + Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp); + thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp); + return; } + // Bed_Temp limit + LIMIT(HMI_ValueStruct.Bed_Temp, BED_MINTEMP, BED_MAX_TARGET); + // Bed_Temp value + Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp, true); } #endif // HAS_HEATED_BED @@ -1473,147 +1493,141 @@ void HMI_Move_Z() { void HMI_FanSpeed() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t fan_line; - switch (HMI_ValueStruct.show_mode) { - case -1: fan_line = TEMP_CASE_FAN; break; - case -2: fan_line = PREHEAT_CASE_FAN; break; - case -3: fan_line = PREHEAT_CASE_FAN; break; - default: fan_line = TUNE_CASE_FAN + MROWS - index_tune; - } + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t fan_line; + switch (HMI_ValueStruct.show_mode) { + case -1: fan_line = TEMP_CASE_FAN; break; + case -2: fan_line = PREHEAT_CASE_FAN; break; + case -3: fan_line = PREHEAT_CASE_FAN; break; + default: fan_line = TUNE_CASE_FAN + MROWS - index_tune; + } - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Fan_speed)) { - EncoderRate.enabled = false; - if (HMI_ValueStruct.show_mode == -2) { - checkkey = PLAPreheat; - ui.material_preset[0].fan_speed = HMI_ValueStruct.Fan_speed; - Draw_Edit_Integer3(fan_line, ui.material_preset[0].fan_speed); - return; - } - else if (HMI_ValueStruct.show_mode == -3) { - checkkey = ABSPreheat; - ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; - Draw_Edit_Integer3(fan_line, ui.material_preset[1].fan_speed); - return; - } - else if (HMI_ValueStruct.show_mode == -1) - checkkey = TemperatureID; - else - checkkey = Tune; - Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed); - thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed); + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Fan_speed)) { + EncoderRate.enabled = false; + if (HMI_ValueStruct.show_mode == -2) { + checkkey = PLAPreheat; + ui.material_preset[0].fan_speed = HMI_ValueStruct.Fan_speed; + Draw_Edit_Integer3(fan_line, ui.material_preset[0].fan_speed); + return; + } + else if (HMI_ValueStruct.show_mode == -3) { + checkkey = ABSPreheat; + ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; + Draw_Edit_Integer3(fan_line, ui.material_preset[1].fan_speed); return; } - // Fan_speed limit - LIMIT(HMI_ValueStruct.Fan_speed, 0, 255); - // Fan_speed value - Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed, true); + else if (HMI_ValueStruct.show_mode == -1) + checkkey = TemperatureID; + else + checkkey = Tune; + Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed); + thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed); + return; } + // Fan_speed limit + LIMIT(HMI_ValueStruct.Fan_speed, 0, 255); + // Fan_speed value + Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed, true); } #endif // HAS_PREHEAT && HAS_FAN void HMI_PrintSpeed() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.print_speed)) { - checkkey = Tune; - EncoderRate.enabled = false; - feedrate_percentage = HMI_ValueStruct.print_speed; - Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed); - return; - } - // print_speed limit - LIMIT(HMI_ValueStruct.print_speed, MIN_PRINT_SPEED, MAX_PRINT_SPEED); - // print_speed value - Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed, true); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.print_speed)) { + checkkey = Tune; + EncoderRate.enabled = false; + feedrate_percentage = HMI_ValueStruct.print_speed; + Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed); + return; } + // print_speed limit + LIMIT(HMI_ValueStruct.print_speed, MIN_PRINT_SPEED, MAX_PRINT_SPEED); + // print_speed value + Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed, true); } #define LAST_AXIS TERN(HAS_HOTEND, E_AXIS, Z_AXIS) void HMI_MaxFeedspeedXYZE() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Feedspeed)) { - checkkey = MaxSpeed; - EncoderRate.enabled = false; - if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, LAST_AXIS)) - planner.set_max_feedrate(HMI_flag.feedspeed_axis, HMI_ValueStruct.Max_Feedspeed); - Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed); - return; - } - // MaxFeedspeed limit + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Feedspeed)) { + checkkey = MaxSpeed; + EncoderRate.enabled = false; if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, LAST_AXIS)) - NOMORE(HMI_ValueStruct.Max_Feedspeed, default_max_feedrate[HMI_flag.feedspeed_axis] * 2); - if (HMI_ValueStruct.Max_Feedspeed < MIN_MAXFEEDSPEED) HMI_ValueStruct.Max_Feedspeed = MIN_MAXFEEDSPEED; - // MaxFeedspeed value - Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed, true); + planner.set_max_feedrate(HMI_flag.feedspeed_axis, HMI_ValueStruct.Max_Feedspeed); + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed); + return; } + // MaxFeedspeed limit + if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Feedspeed, default_max_feedrate[HMI_flag.feedspeed_axis] * 2); + if (HMI_ValueStruct.Max_Feedspeed < MIN_MAXFEEDSPEED) HMI_ValueStruct.Max_Feedspeed = MIN_MAXFEEDSPEED; + // MaxFeedspeed value + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed, true); } void HMI_MaxAccelerationXYZE() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Acceleration)) { - checkkey = MaxAcceleration; - EncoderRate.enabled = false; - if (WITHIN(HMI_flag.acc_axis, X_AXIS, LAST_AXIS)) - planner.set_max_acceleration(HMI_flag.acc_axis, HMI_ValueStruct.Max_Acceleration); - Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration); - return; - } - // MaxAcceleration limit + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Acceleration)) { + checkkey = MaxAcceleration; + EncoderRate.enabled = false; if (WITHIN(HMI_flag.acc_axis, X_AXIS, LAST_AXIS)) - NOMORE(HMI_ValueStruct.Max_Acceleration, default_max_acceleration[HMI_flag.acc_axis] * 2); - if (HMI_ValueStruct.Max_Acceleration < MIN_MAXACCELERATION) HMI_ValueStruct.Max_Acceleration = MIN_MAXACCELERATION; - // MaxAcceleration value - Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration, true); + planner.set_max_acceleration(HMI_flag.acc_axis, HMI_ValueStruct.Max_Acceleration); + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration); + return; } + // MaxAcceleration limit + if (WITHIN(HMI_flag.acc_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Acceleration, default_max_acceleration[HMI_flag.acc_axis] * 2); + if (HMI_ValueStruct.Max_Acceleration < MIN_MAXACCELERATION) HMI_ValueStruct.Max_Acceleration = MIN_MAXACCELERATION; + // MaxAcceleration value + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration, true); } #if HAS_CLASSIC_JERK void HMI_MaxJerkXYZE() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk_scaled)) { - checkkey = MaxJerk; - EncoderRate.enabled = false; - if (WITHIN(HMI_flag.jerk_axis, X_AXIS, LAST_AXIS)) - planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk_scaled / 10); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); - return; - } - // MaxJerk limit + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk_scaled)) { + checkkey = MaxJerk; + EncoderRate.enabled = false; if (WITHIN(HMI_flag.jerk_axis, X_AXIS, LAST_AXIS)) - NOMORE(HMI_ValueStruct.Max_Jerk_scaled, default_max_jerk[HMI_flag.jerk_axis] * 2 * MINUNITMULT); - NOLESS(HMI_ValueStruct.Max_Jerk_scaled, (MIN_MAXJERK) * MINUNITMULT); - // MaxJerk value - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); + planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk_scaled / 10); + Draw_Edit_Float3(select_jerk.now, HMI_ValueStruct.Max_Jerk_scaled); + return; } + // MaxJerk limit + if (WITHIN(HMI_flag.jerk_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Jerk_scaled, default_max_jerk[HMI_flag.jerk_axis] * 2 * MINUNITMULT); + NOLESS(HMI_ValueStruct.Max_Jerk_scaled, (MIN_MAXJERK) * MINUNITMULT); + // MaxJerk value + Draw_Edit_Float3(select_jerk.now, HMI_ValueStruct.Max_Jerk_scaled, true); } #endif // HAS_CLASSIC_JERK void HMI_StepXYZE() { ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Step_scaled)) { - checkkey = Step; - EncoderRate.enabled = false; - if (WITHIN(HMI_flag.step_axis, X_AXIS, LAST_AXIS)) - planner.settings.axis_steps_per_mm[HMI_flag.step_axis] = HMI_ValueStruct.Max_Step_scaled / 10; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); - return; - } - // Step limit + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Step_scaled)) { + checkkey = Step; + EncoderRate.enabled = false; if (WITHIN(HMI_flag.step_axis, X_AXIS, LAST_AXIS)) - NOMORE(HMI_ValueStruct.Max_Step_scaled, 999.9 * MINUNITMULT); - NOLESS(HMI_ValueStruct.Max_Step_scaled, MIN_STEP); - // Step value - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); + planner.settings.axis_steps_per_mm[HMI_flag.step_axis] = HMI_ValueStruct.Max_Step_scaled / 10; + Draw_Edit_Float3(select_step.now, HMI_ValueStruct.Max_Step_scaled); + return; } + // Step limit + if (WITHIN(HMI_flag.step_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Step_scaled, 999.9 * MINUNITMULT); + NOLESS(HMI_ValueStruct.Max_Step_scaled, MIN_STEP); + // Step value + Draw_Edit_Float3(select_step.now, HMI_ValueStruct.Max_Step_scaled, true); } // Draw X, Y, Z and blink if in an un-homed or un-trusted state @@ -1708,34 +1722,34 @@ void update_variable() { #if HAS_HOTEND if (_new_hotend_temp) - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 384, _hotendtemp); + Draw_Stat_Int(28, 384, _hotendtemp); if (_new_hotend_target) - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 384, _hotendtarget); + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 384, _hotendtarget); static int16_t _flow = planner.flow_percentage[0]; if (_flow != planner.flow_percentage[0]) { _flow = planner.flow_percentage[0]; - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 417, _flow); + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 417, _flow); } #endif #if HAS_HEATED_BED if (_new_bed_temp) - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 417, _bedtemp); + Draw_Stat_Int(28, 417, _bedtemp); if (_new_bed_target) - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 417, _bedtarget); + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 417, _bedtarget); #endif static int16_t _feedrate = 100; if (_feedrate != feedrate_percentage) { _feedrate = feedrate_percentage; - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 384, _feedrate); + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 384, _feedrate); } #if HAS_FAN if (_new_fanspeed) { _fanspeed = thermalManager.fan_speed[0]; - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 195 + 2 * STAT_CHR_W, 384, _fanspeed); + Draw_Stat_Int(195 + 2 * STAT_CHR_W, 384, _fanspeed); } #endif @@ -1743,11 +1757,11 @@ void update_variable() { if (BABY_Z_VAR != _offset) { _offset = BABY_Z_VAR; if (BABY_Z_VAR < 0) { - DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, -_offset * 100); + Draw_Stat_Float(207, 417, -_offset * 100); DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); } else { - DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, _offset * 100); + Draw_Stat_Float(207, 417, _offset * 100); DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); } } @@ -1948,29 +1962,29 @@ void Draw_Status_Area(const bool with_update) { #if HAS_HOTEND DWIN_ICON_Show(ICON, ICON_HotendTemp, 10, 383); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 384, thermalManager.wholeDegHotend(0)); + Draw_Stat_Int(28, 384, thermalManager.wholeDegHotend(0)); DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0)); + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0)); DWIN_ICON_Show(ICON, ICON_StepE, 112, 417); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); #endif #if HAS_HEATED_BED DWIN_ICON_Show(ICON, ICON_BedTemp, 10, 416); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 417, thermalManager.wholeDegBed()); + Draw_Stat_Int(28, 417, thermalManager.wholeDegBed()); DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed()); + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed()); #endif DWIN_ICON_Show(ICON, ICON_Speed, 113, 383); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 384, feedrate_percentage); + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 384, feedrate_percentage); DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); #if HAS_FAN DWIN_ICON_Show(ICON, ICON_FanSpeed, 187, 383); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 195 + 2 * STAT_CHR_W, 384, thermalManager.fan_speed[0]); + Draw_Stat_Int(195 + 2 * STAT_CHR_W, 384, thermalManager.fan_speed[0]); #endif #if HAS_ZOFFSET_ITEM @@ -1978,11 +1992,11 @@ void Draw_Status_Area(const bool with_update) { #endif if (BABY_Z_VAR < 0) { - DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, -BABY_Z_VAR * 100); + Draw_Stat_Float(207, 417, -BABY_Z_VAR * 100); DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); } else { - DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, 207, 417, BABY_Z_VAR * 100); + Draw_Stat_Float(207, 417, BABY_Z_VAR * 100); DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); } @@ -2366,9 +2380,7 @@ void Draw_Move_Menu() { Item_AreaCopy(58, 118, 106, 132, 1); Item_AreaCopy(109, 118, 157, 132, 2); Item_AreaCopy(160, 118, 209, 132, 3); - #if HAS_HOTEND - Item_AreaCopy(212, 118, 253, 131, 4); - #endif + TERN_(HAS_HOTEND, Item_AreaCopy(212, 118, 253, 131, 4)); } else { #ifdef USE_STRING_HEADINGS @@ -2381,16 +2393,12 @@ void Draw_Move_Menu() { DWIN_Draw_Label(1, GET_TEXT_F(MSG_MOVE_X)); DWIN_Draw_Label(2, GET_TEXT_F(MSG_MOVE_Y)); DWIN_Draw_Label(3, GET_TEXT_F(MSG_MOVE_Z)); - #if HAS_HOTEND - DWIN_Draw_Label(4, GET_TEXT_F(MSG_MOVE_E)); - #endif + TERN_(HAS_HOTEND, DWIN_Draw_Label(4, GET_TEXT_F(MSG_MOVE_E))); #else say_move_en(1); say_x_en(38, 1); // "Move X" say_move_en(2); say_y_en(38, 2); // "Move Y" say_move_en(3); say_z_en(38, 3); // "Move Z" - #if HAS_HOTEND - say_move_en(4); Item_AreaCopy(99, 194, 151, 204, 4, 38); // "Move Extruder" - #endif + TERN_(HAS_HOTEND, (say_move_en(4), Item_AreaCopy(99, 194, 151, 204, 4, 38))); // "Move Extruder" #endif } @@ -2519,13 +2527,13 @@ void Item_HomeOffs_X(const uint8_t row) { } else { #ifdef USE_STRING_TITLES - Draw_Menu_Line(row, ICON_HomeOffX, GET_TEXT_F(MSG_HOME_OFFSET_X)); + Draw_Menu_LineF(row, ICON_HomeOffX, GET_TEXT_F(MSG_HOME_OFFSET_X)); #else say_home_offs_en(row); say_x_en(75, row); // "Home Offset X" #endif } Draw_Menu_Line(row, ICON_HomeOff); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(row), HMI_ValueStruct.Home_OffX_scaled); + Draw_Edit_Signed_Float3(row, HMI_ValueStruct.Home_OffX_scaled); } void Item_HomeOffs_Y(const uint8_t row) { @@ -2534,13 +2542,13 @@ void Item_HomeOffs_Y(const uint8_t row) { } else { #ifdef USE_STRING_TITLES - Draw_Menu_Line(row, ICON_HomeOffY, GET_TEXT_F(MSG_HOME_OFFSET_Y)); + Draw_Menu_LineF(row, ICON_HomeOffY, GET_TEXT_F(MSG_HOME_OFFSET_Y)); #else say_home_offs_en(row); say_y_en(75, row); // "Home Offset X" #endif } Draw_Menu_Line(row, ICON_HomeOff); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(row), HMI_ValueStruct.Home_OffY_scaled); + Draw_Edit_Signed_Float3(row, HMI_ValueStruct.Home_OffY_scaled); } void Item_HomeOffs_Z(const uint8_t row) { @@ -2549,13 +2557,13 @@ void Item_HomeOffs_Z(const uint8_t row) { } else { #ifdef USE_STRING_TITLES - Draw_Menu_Line(row, ICON_HomeOffZ, GET_TEXT_F(MSG_HOME_OFFSET_Z)); + Draw_Menu_LineF(row, ICON_HomeOffZ, GET_TEXT_F(MSG_HOME_OFFSET_Z)); #else say_home_offs_en(row); say_z_en(75, row); // "Home Offset Z" #endif } Draw_Menu_Line(row, ICON_HomeOff); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(row), HMI_ValueStruct.Home_OffZ_scaled); + Draw_Edit_Signed_Float3(row, HMI_ValueStruct.Home_OffZ_scaled); } void Draw_HomeOff_Menu() { @@ -2592,16 +2600,16 @@ void Draw_HomeOff_Menu() { DWIN_Frame_TitleCopy(124, 431, 91, 12); // "Probe Offsets" #endif #ifdef USE_STRING_TITLES - Draw_Menu_Line(1, ICON_ProbeOffX, GET_TEXT_F(MSG_ZPROBE_XOFFSET)); // Probe X Offset - Draw_Menu_Line(2, ICON_ProbeOffY, GET_TEXT_F(MSG_ZPROBE_YOFFSET)); // Probe Y Offset + Draw_Menu_LineF(1, ICON_ProbeOffX, GET_TEXT_F(MSG_ZPROBE_XOFFSET)); // Probe X Offset + Draw_Menu_LineF(2, ICON_ProbeOffY, GET_TEXT_F(MSG_ZPROBE_YOFFSET)); // Probe Y Offset #else say_probe_offs_en(1); say_x_en(75, 1); // "Probe Offset X" say_probe_offs_en(2); say_y_en(75, 2); // "Probe Offset Y" #endif } - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Probe_OffX_scaled); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Probe_OffY_scaled); + Draw_Edit_Signed_Float3(1, HMI_ValueStruct.Probe_OffX_scaled); + Draw_Edit_Signed_Float3(2, HMI_ValueStruct.Probe_OffY_scaled); if (select_item.now) Draw_Menu_Cursor(select_item.now); } @@ -2685,12 +2693,12 @@ void HMI_Prepare() { select_axis.reset(); Draw_Move_Menu(); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), current_position.x * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), current_position.y * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(3), current_position.z * MINUNITMULT); + Draw_Edit_Float3(1, current_position.x * MINUNITMULT); + Draw_Edit_Float3(2, current_position.y * MINUNITMULT); + Draw_Edit_Float3(3, current_position.z * MINUNITMULT); #if HAS_HOTEND HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(4), HMI_ValueStruct.Move_E_scaled); + Draw_Edit_Signed_Float3(4, HMI_ValueStruct.Move_E_scaled); #endif break; case PREPARE_CASE_DISA: // Disable steppers @@ -2708,7 +2716,7 @@ void HMI_Prepare() { checkkey = Homeoffset; HMI_ValueStruct.show_mode = -4; HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, EBASE(PREPARE_CASE_ZOFF + MROWS - index_prepare), HMI_ValueStruct.offset_value); + Draw_Edit_Signed_Float2(PREPARE_CASE_ZOFF + MROWS - index_prepare, HMI_ValueStruct.offset_value, true); EncoderRate.enabled = true; #else // Apply workspace offset, making the current position 0,0,0 @@ -2946,10 +2954,10 @@ void HMI_AxisMove() { HMI_flag.ETempTooLow_flag = false; HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; Draw_Move_Menu(); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(4), 0); + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled); + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled); + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled); + Draw_Edit_Signed_Float3(4, 0); DWIN_UpdateLCD(); } return; @@ -2974,19 +2982,19 @@ void HMI_AxisMove() { case 1: // X axis move checkkey = Move_X; HMI_ValueStruct.Move_X_scaled = current_position.x * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Move_X_scaled); + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled, true); EncoderRate.enabled = true; break; case 2: // Y axis move checkkey = Move_Y; HMI_ValueStruct.Move_Y_scaled = current_position.y * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Move_Y_scaled); + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled, true); EncoderRate.enabled = true; break; case 3: // Z axis move checkkey = Move_Z; HMI_ValueStruct.Move_Z_scaled = current_position.z * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Move_Z_scaled); + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled, true); EncoderRate.enabled = true; break; #if HAS_HOTEND @@ -3002,7 +3010,7 @@ void HMI_AxisMove() { #endif checkkey = Extruder; HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(4), HMI_ValueStruct.Move_E_scaled); + Draw_Edit_Signed_Float3(4, HMI_ValueStruct.Move_E_scaled, true); EncoderRate.enabled = true; break; #endif @@ -3083,7 +3091,7 @@ void HMI_Temperature() { #ifdef USE_STRING_HEADINGS Draw_Title(PREHEAT_1_LABEL " Settings"); // TODO: GET_TEXT_F #else - DWIN_Frame_TitleCopy(57, 16, 84, 14); // "PLA Settings" + DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" TODO: "PLA Settings" #endif #ifdef USE_STRING_TITLES DWIN_Draw_Label(PREHEAT_CASE_TEMP, F("Nozzle Temp")); @@ -3162,7 +3170,7 @@ void HMI_Temperature() { #ifdef USE_STRING_HEADINGS Draw_Title("ABS Settings"); // TODO: GET_TEXT_F #else - DWIN_Frame_TitleCopy(57, 16, 84, 14); // "ABS Settings" + DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" TODO: "ABS Settings" #endif #ifdef USE_STRING_TITLES DWIN_Draw_Label(PREHEAT_CASE_TEMP, F("Nozzle Temp")); @@ -3278,17 +3286,17 @@ void Draw_Max_Accel_Menu() { Clear_Main_Window(); if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Acceleration" + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Acceleration" Item_AreaCopy(173, 133, 200, 147, 1); Item_AreaCopy( 28, 149, 69, 161, 1, 30, 1); - Item_AreaCopy(229, 133, 236, 147, 1, 74); // Max acceleration X + Item_AreaCopy(229, 133, 236, 147, 1, 74); // Max acceleration X Item_AreaCopy(173, 133, 200, 147, 2); Item_AreaCopy( 28, 149, 69, 161, 2, 30, 1); - Item_AreaCopy( 1, 150, 7, 160, 2, 74, 2); // Max acceleration Y + Item_AreaCopy( 1, 150, 7, 160, 2, 74, 2); // Max acceleration Y Item_AreaCopy(173, 133, 200, 147, 3); Item_AreaCopy( 28, 149, 69, 161, 3, 30, 1); - Item_AreaCopy( 9, 150, 16, 160, 3, 74, 2); // Max acceleration Z + Item_AreaCopy( 9, 150, 16, 160, 3, 74, 2); // Max acceleration Z #if HAS_HOTEND Item_AreaCopy(173, 133, 200, 147, 4); Item_AreaCopy( 28, 149, 69, 161, 4, 30, 1); @@ -3379,11 +3387,11 @@ void Draw_Max_Accel_Menu() { Draw_Back_First(); LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedJerkX + i); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(1), planner.max_jerk[X_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(2), planner.max_jerk[Y_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(3), planner.max_jerk[Z_AXIS] * MINUNITMULT); + Draw_Edit_Float3(1, planner.max_jerk[X_AXIS] * MINUNITMULT); + Draw_Edit_Float3(2, planner.max_jerk[Y_AXIS] * MINUNITMULT); + Draw_Edit_Float3(3, planner.max_jerk[Z_AXIS] * MINUNITMULT); #if HAS_HOTEND - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(4), planner.max_jerk[E_AXIS] * MINUNITMULT); + Draw_Edit_Float3(4, planner.max_jerk[E_AXIS] * MINUNITMULT); #endif } #endif @@ -3430,11 +3438,11 @@ void Draw_Steps_Menu() { Draw_Back_First(); LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_StepX + i); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(1), planner.settings.axis_steps_per_mm[X_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(2), planner.settings.axis_steps_per_mm[Y_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(3), planner.settings.axis_steps_per_mm[Z_AXIS] * MINUNITMULT); + Draw_Edit_Float3(1, planner.settings.axis_steps_per_mm[X_AXIS] * MINUNITMULT); + Draw_Edit_Float3(2, planner.settings.axis_steps_per_mm[Y_AXIS] * MINUNITMULT); + Draw_Edit_Float3(3, planner.settings.axis_steps_per_mm[Z_AXIS] * MINUNITMULT); #if HAS_HOTEND - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, EBASE(4), planner.settings.axis_steps_per_mm[E_AXIS] * MINUNITMULT); + Draw_Edit_Float3(4, planner.settings.axis_steps_per_mm[E_AXIS] * MINUNITMULT); #endif } @@ -3604,17 +3612,17 @@ void HMI_AdvSet() { break; case 1: // Home Offset X checkkey = HomeOffX; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Home_OffX_scaled); + Draw_Edit_Signed_Float3(1, HMI_ValueStruct.Home_OffX_scaled, true); EncoderRate.enabled = true; break; case 2: // Home Offset Y checkkey = HomeOffY; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Home_OffY_scaled); + Draw_Edit_Signed_Float3(2, HMI_ValueStruct.Home_OffY_scaled, true); EncoderRate.enabled = true; break; case 3: // Home Offset Z checkkey = HomeOffZ; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(3), HMI_ValueStruct.Home_OffZ_scaled); + Draw_Edit_Signed_Float3(3, HMI_ValueStruct.Home_OffZ_scaled, true); EncoderRate.enabled = true; break; default: break; @@ -3631,11 +3639,11 @@ void HMI_AdvSet() { checkkey = HomeOff; EncoderRate.enabled = false; set_home_offset(axis, posScaled / 10); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); + Draw_Edit_Signed_Float3(select_item.now, posScaled); return; } LIMIT(posScaled, lo, hi); - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); + Draw_Edit_Signed_Float3(select_item.now, posScaled, true); } void HMI_HomeOffX() { HMI_HomeOffN(X_AXIS, HMI_ValueStruct.Home_OffX_scaled, -500, 500); } @@ -3666,12 +3674,12 @@ void HMI_AdvSet() { break; case 1: // Probe Offset X checkkey = ProbeOffX; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(1), HMI_ValueStruct.Probe_OffX_scaled); + Draw_Edit_Signed_Float3(1, HMI_ValueStruct.Probe_OffX_scaled, true); EncoderRate.enabled = true; break; case 2: // Probe Offset X checkkey = ProbeOffY; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(2), HMI_ValueStruct.Probe_OffY_scaled); + Draw_Edit_Signed_Float3(2, HMI_ValueStruct.Probe_OffY_scaled, true); EncoderRate.enabled = true; break; } @@ -3687,11 +3695,11 @@ void HMI_AdvSet() { checkkey = ProbeOff; EncoderRate.enabled = false; offset_ref = posScaled / 10; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); + Draw_Edit_Signed_Float3(select_item.now, posScaled); return; } LIMIT(posScaled, -500, 500); - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 220, EBASE(select_item.now), posScaled); + Draw_Edit_Signed_Float3(select_item.now, posScaled, true); } void HMI_ProbeOffX() { HMI_ProbeOffN(HMI_ValueStruct.Probe_OffX_scaled, probe.offset.x); } @@ -3785,7 +3793,7 @@ void HMI_Tune() { #if EITHER(HAS_BED_PROBE, BABYSTEPPING) checkkey = Homeoffset; HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, EBASE(TUNE_CASE_ZOFF + MROWS - index_tune), HMI_ValueStruct.offset_value); + Draw_Edit_Signed_Float2(TUNE_CASE_ZOFF + MROWS - index_tune, HMI_ValueStruct.offset_value, true); EncoderRate.enabled = true; #else // Apply workspace offset, making the current position 0,0,0 @@ -3992,7 +4000,7 @@ void HMI_MaxAcceleration() { checkkey = MaxJerk_value; HMI_flag.jerk_axis = AxisEnum(select_jerk.now - 1); HMI_ValueStruct.Max_Jerk_scaled = planner.max_jerk[HMI_flag.jerk_axis] * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk_scaled); + Draw_Edit_Float3(select_jerk.now, HMI_ValueStruct.Max_Jerk_scaled, true); EncoderRate.enabled = true; } else { // Back @@ -4022,7 +4030,7 @@ void HMI_Step() { checkkey = Step_value; HMI_flag.step_axis = AxisEnum(select_step.now - 1); HMI_ValueStruct.Max_Step_scaled = planner.settings.axis_steps_per_mm[HMI_flag.step_axis] * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, EBASE(select_step.now), HMI_ValueStruct.Max_Step_scaled); + Draw_Edit_Float3(select_step.now, HMI_ValueStruct.Max_Step_scaled, true); EncoderRate.enabled = true; } else { // Back @@ -4274,9 +4282,9 @@ void DWIN_CompletedLeveling() { } void DWIN_StatusChanged(const char *text) { - DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20); + DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 24); const int8_t x = _MAX(0U, DWIN_WIDTH - strlen_P(text) * MENU_CHR_W) / 2; - DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 2, F(text)); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 3, F(text)); DWIN_UpdateLCD(); } From e2297d82f2721466daf180e8c4034b040ac4cc69 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Aug 2021 14:54:56 -0500 Subject: [PATCH 231/323] =?UTF-8?q?=F0=9F=93=8C=20Disregard=20TMCStepper?= =?UTF-8?q?=200.7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/features.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ini/features.ini b/ini/features.ini index e5b0fb3f66ec..b94c3fb9bcf6 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -17,7 +17,7 @@ HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/L POSTMORTEM_DEBUGGING = src_filter=+ + build_flags=-funwind-tables MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/master.zip -HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.1 +HAS_TRINAMIC_CONFIG = TMCStepper@0.7.1 src_filter=+ + + + + HAS_STEALTHCHOP = src_filter=+ SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip From 368a12a8ac687af85ea726bc54dabb5076ca55e2 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 19 Aug 2021 00:51:33 +0000 Subject: [PATCH 232/323] [cron] Bump distribution date (2021-08-19) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 4c60042208ec..c33d333660a9 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-18" +//#define STRING_DISTRIBUTION_DATE "2021-08-19" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 7856073c30a0..8fbdc5ed1d3b 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-18" + #define STRING_DISTRIBUTION_DATE "2021-08-19" #endif /** From 033e65ec854e68fb189fa1c23d0277daf2417301 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Aug 2021 17:38:05 -0500 Subject: [PATCH 233/323] =?UTF-8?q?=F0=9F=90=9B=20Show=20bed=20size=20as?= =?UTF-8?q?=20'work:'=20in=20M115?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #22598 --- Marlin/src/gcode/host/M115.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index 3b88c6905e15..e4f412406f04 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -166,9 +166,11 @@ void GcodeSuite::M115() { // Machine Geometry #if ENABLED(M115_GEOMETRY_REPORT) - const xyz_pos_t dmin = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }, + const xyz_pos_t bmin = { 0, 0, 0 }, + bmax = { X_BED_SIZE , Y_BED_SIZE, Z_MAX_POS }, + dmin = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }, dmax = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS }; - xyz_pos_t cmin = dmin, cmax = dmax; + xyz_pos_t cmin = bmin, cmax = bmax; apply_motion_limits(cmin); apply_motion_limits(cmax); const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(), From 737d2dd56438ba02f07e3693e9138fc9816d143b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Aug 2021 19:16:46 -0500 Subject: [PATCH 234/323] Followup to CrealityUI cleanup Followup to #22586 --- Marlin/src/lcd/e3v2/creality/dwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 9e8ceed368aa..1bbdc326bebf 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -2434,7 +2434,7 @@ void Item_Adv_HomeOffsets(const uint8_t row) { #ifdef USE_STRING_TITLES DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); #else - say_probe_offs_en(0, row); + say_probe_offs_en(row); #endif } Draw_Menu_Line(row, ICON_ProbeOff); From 9db5805c8fbd417d1fa388533ee13eceff13eda9 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 20 Aug 2021 00:56:15 +0000 Subject: [PATCH 235/323] [cron] Bump distribution date (2021-08-20) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index c33d333660a9..db5a6e15247e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-19" +//#define STRING_DISTRIBUTION_DATE "2021-08-20" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 8fbdc5ed1d3b..dcad270c26a1 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-19" + #define STRING_DISTRIBUTION_DATE "2021-08-20" #endif /** From 193205a40dd6b756bd69cab6fcb1af63ddd6d452 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 19 Aug 2021 21:11:10 -0500 Subject: [PATCH 236/323] Followup to CrealityUI cleanup Followup to #22586 --- Marlin/src/lcd/e3v2/creality/dwin.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 1bbdc326bebf..5ddc23181772 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -856,9 +856,8 @@ void Draw_Control_Menu() { #define CLINE(L) MBASE(CSCROL(L)) #define CVISI(L) VISI(CONTROL_CASE_TOTAL, L, CSCROL(L)) - // "Control" Title if (HMI_IsChinese()) - DWIN_Frame_TitleCopy(103, 1, 28, 14); + DWIN_Frame_TitleCopy(103, 1, 28, 14); // "Control" else { #ifdef USE_STRING_HEADINGS Draw_Title(GET_TEXT_F(MSG_CONTROL)); @@ -2028,8 +2027,8 @@ void Draw_Info_Menu() { DWIN_Frame_TitleCopy(30, 17, 28, 13); // "Info" DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); // "Size" - DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); // "Firmware Version" - DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); // "Contact Details" + DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); // "Contact Details" } else { #ifdef USE_STRING_HEADINGS @@ -2432,7 +2431,7 @@ void Item_Adv_HomeOffsets(const uint8_t row) { } else { #ifdef USE_STRING_TITLES - DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ZPROBE_OFFSETS)); #else say_probe_offs_en(row); #endif @@ -2502,11 +2501,16 @@ void Draw_AdvancedSettings_Menu() { #define ASCROL(L) (scroll + (L)) #define AVISI(L) VISI(ADVSET_CASE_TOTAL, L, ASCROL(L)) - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_ADVANCED_SETTINGS)); - #else - DWIN_Frame_TitleCopy(93, 401, 126, 15); // "Advanced Settings" - #endif + if (false && HMI_IsChinese()) { + // TODO: Chinese "Advanced Settings" + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_ADVANCED_SETTINGS)); + #else + DWIN_Frame_TitleCopy(93, 401, 126, 15); // "Advanced Settings" + #endif + } if (AVISI(0)) Draw_Back_First(select_advset.now == 0); if (AVISI(ADVSET_CASE_HOMEOFF)) Item_Adv_HomeOffsets(ASCROL(ADVSET_CASE_HOMEOFF)); // Set Home Offsets > From 9046254a14b92b6bdf1696b1ed839b71615a0772 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 20 Aug 2021 15:40:17 -0500 Subject: [PATCH 237/323] =?UTF-8?q?=F0=9F=8C=90=20Update=20menu=20titles,?= =?UTF-8?q?=20add=20more=20IJK=20(#22605)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #19112 --- Marlin/src/lcd/language/language_an.h | 14 +- Marlin/src/lcd/language/language_bg.h | 9 +- Marlin/src/lcd/language/language_ca.h | 9 +- Marlin/src/lcd/language/language_cz.h | 62 ++- Marlin/src/lcd/language/language_da.h | 9 +- Marlin/src/lcd/language/language_de.h | 32 +- Marlin/src/lcd/language/language_el.h | 12 + Marlin/src/lcd/language/language_el_gr.h | 12 + Marlin/src/lcd/language/language_en.h | 63 +-- Marlin/src/lcd/language/language_es.h | 44 +- Marlin/src/lcd/language/language_eu.h | 15 +- Marlin/src/lcd/language/language_fr.h | 14 +- Marlin/src/lcd/language/language_gl.h | 52 ++- Marlin/src/lcd/language/language_hu.h | 14 +- Marlin/src/lcd/language/language_it.h | 31 +- Marlin/src/lcd/language/language_jp_kana.h | 21 +- Marlin/src/lcd/language/language_pl.h | 31 +- Marlin/src/lcd/language/language_pt.h | 3 + Marlin/src/lcd/language/language_pt_br.h | 6 + Marlin/src/lcd/language/language_ro.h | 30 +- Marlin/src/lcd/language/language_ru.h | 6 +- Marlin/src/lcd/language/language_sk.h | 32 +- Marlin/src/lcd/language/language_sv.h | 24 +- Marlin/src/lcd/language/language_tr.h | 24 +- Marlin/src/lcd/language/language_uk.h | 12 +- Marlin/src/lcd/language/language_vi.h | 57 ++- Marlin/src/lcd/language/language_zh_CN.h | 358 ++++++++------- Marlin/src/lcd/language/language_zh_TW.h | 508 +++++++++++---------- Marlin/src/lcd/menu/menu_advanced.cpp | 2 +- 29 files changed, 882 insertions(+), 624 deletions(-) diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index 787096994f7d..e5fc965ed1fa 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -106,10 +106,13 @@ namespace Language_an { PROGMEM Language_Str MSG_ACC = _UxGT("Aceleracion"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vel. viache min"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accel"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Acel. max") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Acel. max") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Acel. max") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Acel. max") LCD_STR_E; + PROGMEM Language_Str MSG_AMAX_A = _UxGT("Acel. max ") LCD_STR_A; + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Acel. max ") LCD_STR_B; + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Acel. max ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Acel. max ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Acel. max ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Acel. max ") LCD_STR_K; + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Acel. max ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Acel. max *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Acel. retrac."); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Acel. Viaje"); @@ -117,6 +120,9 @@ namespace Language_an { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" trangos/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" trangos/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" trangos/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" trangos/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" trangos/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" trangos/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E trangos/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* trangos/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); diff --git a/Marlin/src/lcd/language/language_bg.h b/Marlin/src/lcd/language/language_bg.h index 0d4291b8355d..37d896f60d58 100644 --- a/Marlin/src/lcd/language/language_bg.h +++ b/Marlin/src/lcd/language/language_bg.h @@ -99,9 +99,12 @@ namespace Language_bg { PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-откат"); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-travel"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Стъпки/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("стъпки/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("стъпки/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("стъпки/mm"); + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" стъпки/mm"); + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" стъпки/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" стъпки/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" стъпки/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" стъпки/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" стъпки/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E стъпки/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* стъпки/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Температура"); diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index f97a783d0183..19ba9acab74f 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -104,9 +104,12 @@ namespace Language_ca { PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Accel. retracc"); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Accel. Viatge"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Passos/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("passos/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("passos/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("passos/mm"); + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" passos/mm"); + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" passos/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" passos/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" passos/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" passos/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" passos/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("Epassos/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*passos/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index fa6a8e21a3ac..a6e97ea40ce2 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -268,33 +268,45 @@ namespace Language_cz { PROGMEM Language_Str MSG_SELECT_E = _UxGT("Vybrat *"); PROGMEM Language_Str MSG_ACC = _UxGT("Zrychl"); PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); + PROGMEM Language_Str MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VE_JERK = _UxGT("Max E Jerk"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Odchylka spoje"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Rychlost"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); + PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Rychlost"); + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Rychlost"); + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Rychlost"); + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Rychlost"); + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Rychlost"); + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Rychlost"); + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Rychlost"); + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max * Rychlost"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav Min"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Akcelerace"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); + PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Akcel"); + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Akcel"); + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Akcel"); + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Akcel"); + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Akcel"); + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Akcel"); + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Akcel"); + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max * Akcel"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrakt"); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-přejezd"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Kroků/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("kroků/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("kroků/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("kroků/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Ekroků/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*kroků/mm"); + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" kroků/mm"); + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" kroků/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" kroků/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" kroků/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" kroků/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" kroků/mm"); + PROGMEM Language_Str MSG_E_STEPS = _UxGT("E kroků/mm"); + PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* kroků/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Teplota"); PROGMEM Language_Str MSG_MOTION = _UxGT("Pohyb"); PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); @@ -475,9 +487,12 @@ namespace Language_cz { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Teplota max"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Nap. zdroj"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Buzení motorů"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Motor %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Motor %"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC uložit EEPROM"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CHYBA SPOJENÍ"); @@ -590,6 +605,9 @@ namespace Language_cz { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korekce"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Vyhlazení"); } diff --git a/Marlin/src/lcd/language/language_da.h b/Marlin/src/lcd/language/language_da.h index 95c2573ae144..ef312f1334cd 100644 --- a/Marlin/src/lcd/language/language_da.h +++ b/Marlin/src/lcd/language/language_da.h @@ -176,9 +176,12 @@ namespace Language_da { PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Strømfors."); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Driv Styrke"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driv %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driv %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driv %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driv %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driv %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driv %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driv %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driv %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driv %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driv %"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Skriv"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index f06370078a4b..0fa895638b12 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -271,15 +271,21 @@ namespace Language_de { PROGMEM Language_Str MSG_SELECT_E = _UxGT("Auswählen *"); PROGMEM Language_Str MSG_ACC = _UxGT("Beschleunigung"); PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V ") LCD_STR_A _UxGT(" Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V ") LCD_STR_B _UxGT(" Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V ") LCD_STR_C _UxGT(" Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("V E Jerk"); + PROGMEM Language_Str MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VE_JERK = _UxGT("Max E Jerk"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Geschwindigkeit"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("V max ") LCD_STR_A; PROGMEM Language_Str MSG_VMAX_B = _UxGT("V max ") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("V max ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("V max ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("V max ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("V max ") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("V max ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("V max *"); PROGMEM Language_Str MSG_VMIN = _UxGT("V min "); @@ -289,6 +295,9 @@ namespace Language_de { PROGMEM Language_Str MSG_AMAX_A = _UxGT("A max ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("A max ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("A max ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("A max ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("A max ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("A max ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("A max ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("A max *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A Einzug"); @@ -299,6 +308,9 @@ namespace Language_de { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" Steps/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" Steps/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" Steps/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" Steps/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" Steps/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" Steps/mm"); PROGMEM Language_Str MSG_E_STEPS = LCD_STR_E _UxGT(" Steps/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* Steps/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatur"); @@ -499,9 +511,12 @@ namespace Language_de { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Netzteil"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Motorleistung"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Treiber %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Treiber %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Treiber %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Treiber %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Treiber %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Treiber %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Treiber %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Treiber %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Treiber %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Treiber %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC Verbindungsfehler"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Werte speichern"); @@ -618,6 +633,9 @@ namespace Language_de { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korrektur"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Glätten"); PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("X Achse leveln"); diff --git a/Marlin/src/lcd/language/language_el.h b/Marlin/src/lcd/language/language_el.h index b69b4695d3be..824b90a232d4 100644 --- a/Marlin/src/lcd/language/language_el.h +++ b/Marlin/src/lcd/language/language_el.h @@ -108,10 +108,16 @@ namespace Language_el { PROGMEM Language_Str MSG_VA_JERK = _UxGT("Vαντίδραση ") LCD_STR_A; PROGMEM Language_Str MSG_VB_JERK = _UxGT("Vαντίδραση ") LCD_STR_B; PROGMEM Language_Str MSG_VC_JERK = _UxGT("Vαντίδραση ") LCD_STR_C; + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Vαντίδραση ") LCD_STR_I; + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Vαντίδραση ") LCD_STR_J; + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Vαντίδραση ") LCD_STR_K; PROGMEM Language_Str MSG_VE_JERK = _UxGT("Vαντίδραση E"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("V Μέγιστο") LCD_STR_A; PROGMEM Language_Str MSG_VMAX_B = _UxGT("V Μέγιστο") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("V Μέγιστο") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("V Μέγιστο") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("V Μέγιστο") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("V Μέγιστο") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("V Μέγιστο") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("V Μέγιστο *"); PROGMEM Language_Str MSG_VMIN = _UxGT("V Ελάχιστο"); @@ -120,6 +126,9 @@ namespace Language_el { PROGMEM Language_Str MSG_AMAX_A = _UxGT("Aμεγ ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Aμεγ ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Aμεγ ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Aμεγ ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Aμεγ ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Aμεγ ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Aμεγ ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Aμεγ *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Α-ανάσυρση"); @@ -128,6 +137,9 @@ namespace Language_el { PROGMEM Language_Str MSG_A_STEPS = _UxGT("Bήματα ") LCD_STR_A _UxGT(" ανά μμ"); PROGMEM Language_Str MSG_B_STEPS = _UxGT("Bήματα ") LCD_STR_B _UxGT(" ανά μμ"); PROGMEM Language_Str MSG_C_STEPS = _UxGT("Bήματα ") LCD_STR_C _UxGT(" ανά μμ"); + PROGMEM Language_Str MSG_I_STEPS = _UxGT("Bήματα ") LCD_STR_I _UxGT(" ανά μμ"); + PROGMEM Language_Str MSG_J_STEPS = _UxGT("Bήματα ") LCD_STR_J _UxGT(" ανά μμ"); + PROGMEM Language_Str MSG_K_STEPS = _UxGT("Bήματα ") LCD_STR_K _UxGT(" ανά μμ"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("Bήματα Ε ανά μμ"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("Bήματα * ανά μμ"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Θερμοκρασία"); diff --git a/Marlin/src/lcd/language/language_el_gr.h b/Marlin/src/lcd/language/language_el_gr.h index 208d7c2363be..e5c169446b6b 100644 --- a/Marlin/src/lcd/language/language_el_gr.h +++ b/Marlin/src/lcd/language/language_el_gr.h @@ -110,10 +110,16 @@ namespace Language_el_gr { PROGMEM Language_Str MSG_VA_JERK = _UxGT("Vαντίδραση ") LCD_STR_A; PROGMEM Language_Str MSG_VB_JERK = _UxGT("Vαντίδραση ") LCD_STR_B; PROGMEM Language_Str MSG_VC_JERK = _UxGT("Vαντίδραση ") LCD_STR_C; + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Vαντίδραση ") LCD_STR_I; + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Vαντίδραση ") LCD_STR_J; + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Vαντίδραση ") LCD_STR_K; PROGMEM Language_Str MSG_VE_JERK = _UxGT("Vαντίδραση E"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vμεγ ") LCD_STR_A; PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vμεγ ") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vμεγ ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Vμεγ ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Vμεγ ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Vμεγ ") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vμεγ ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vμεγ *"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vελαχ"); @@ -122,6 +128,9 @@ namespace Language_el_gr { PROGMEM Language_Str MSG_AMAX_A = _UxGT("Aμεγ ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Aμεγ ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Aμεγ ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Aμεγ ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Aμεγ ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Aμεγ ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Aμεγ ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Aμεγ *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Α-ανάσυρση"); @@ -130,6 +139,9 @@ namespace Language_el_gr { PROGMEM Language_Str MSG_A_STEPS = _UxGT("Bήματα ") LCD_STR_A _UxGT(" ανά μμ"); PROGMEM Language_Str MSG_B_STEPS = _UxGT("Bήματα ") LCD_STR_B _UxGT(" ανά μμ"); PROGMEM Language_Str MSG_C_STEPS = _UxGT("Bήματα ") LCD_STR_C _UxGT(" ανά μμ"); + PROGMEM Language_Str MSG_I_STEPS = _UxGT("Bήματα ") LCD_STR_I _UxGT(" ανά μμ"); + PROGMEM Language_Str MSG_J_STEPS = _UxGT("Bήματα ") LCD_STR_J _UxGT(" ανά μμ"); + PROGMEM Language_Str MSG_K_STEPS = _UxGT("Bήματα ") LCD_STR_K _UxGT(" ανά μμ"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("Bήματα Ε ανά μμ"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("Bήματα * ανά μμ"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Θερμοκρασία"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 85ddcb4bc412..ede69046275e 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -139,8 +139,8 @@ namespace Language_en { PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bed Leveling"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Level Bed"); PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Bed Tramming"); - PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Raise Bed Until Probe Triggered"); - PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("All Corners Within Tolerance. Level Bed"); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Adjust bed until the probe triggers."); + PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Corners within tolerance. Bed trammed."); PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Good Points: "); PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Last Z: "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Next Corner"); @@ -318,6 +318,7 @@ namespace Language_en { PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Off"); PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); + PROGMEM Language_Str MSG_PID_CYCLE = _UxGT("PID Cycle"); PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); @@ -345,29 +346,29 @@ namespace Language_en { PROGMEM Language_Str MSG_VE_JERK = _UxGT("Max E Jerk"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocity"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; - PROGMEM Language_Str MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; - PROGMEM Language_Str MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav Min"); + PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max * Vel"); + PROGMEM Language_Str MSG_VMIN = _UxGT("Min Velocity"); + PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Min Travel Vel"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Acceleration"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; - PROGMEM Language_Str MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; - PROGMEM Language_Str MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Retract"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-Travel"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequency max"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min"); + PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max * Accel"); + PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Retract Accel"); + PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Travel Accel"); + PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Freq Limit"); + PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Steps/mm"); PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" Steps/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" Steps/mm"); @@ -423,7 +424,7 @@ namespace Language_en { PROGMEM Language_Str MSG_PAUSING = _UxGT("Pausing..."); PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pause Print"); PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Resume Print"); - PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Host Start"); + PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Start Host Print"); PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stop Print"); PROGMEM Language_Str MSG_END_LOOPS = _UxGT("End Repeat Loops"); PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Printing Object"); @@ -588,12 +589,12 @@ namespace Language_en { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Drive Strength"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_I = AXIS4_STR _UxGT(" Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_J = AXIS5_STR _UxGT(" Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_K = AXIS6_STR _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CONNECTION ERROR"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Write"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 8fdf0bd47ed2..46e4e262e76c 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -105,7 +105,7 @@ namespace Language_es { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover ejes"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelando Cama"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar Cama"); - PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Recorrido asistido"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Recorrido Cama"); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Siguente Esquina"); PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mallado"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Mallado"); @@ -269,23 +269,32 @@ namespace Language_es { PROGMEM Language_Str MSG_SELECT_E = _UxGT("Seleccionar *"); PROGMEM Language_Str MSG_ACC = _UxGT("Aceleración"); PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); + PROGMEM Language_Str MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VE_JERK = _UxGT("Max E Jerk"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Desvi. Unión"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocidad"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); + PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max * Vel"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vel. viaje min"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Acceleración"); PROGMEM Language_Str MSG_AMAX_A = _UxGT("Acel. max") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Acel. max") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Acel. max") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Acel. max") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Acel. max") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Acel. max") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Acel. max") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Acel. max *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Acel. retrac."); @@ -294,6 +303,9 @@ namespace Language_es { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pasos/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pasos/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pasos/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" pasos/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" pasos/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" pasos/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pasos/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pasos/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); @@ -473,9 +485,12 @@ namespace Language_es { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp. Máxima"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("F. Aliment."); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Fuerza de empuje"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERROR CONEX. TMC"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Escribe DAC EEPROM"); @@ -575,6 +590,9 @@ namespace Language_es { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Corrección"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Suavizado"); diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index 530742d6d3a2..30cc4931d80d 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -167,6 +167,9 @@ namespace Language_eu { PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-astindua"); PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-astindua"); PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-astindua"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-astindua"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-astindua"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-astindua"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-astindua"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VBidaia min"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrakt"); @@ -175,6 +178,9 @@ namespace Language_eu { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pausoak/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pausoak/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pausoak/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" pausoak/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" pausoak/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" pausoak/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pausoak/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pausoak/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Tenperatura"); @@ -294,9 +300,12 @@ namespace Language_eu { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Tenp. Maximoa"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Elikadura-iturria"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Driver-aren potentzia"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Idatzi DAC EEPROM"); PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("HARIZPIA ALDATU"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index 6032937e0f18..e0f13356ba17 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -110,7 +110,7 @@ namespace Language_fr { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Déplacer un axe"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Régler Niv. lit"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveau du lit"); - PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Assistant Molettes"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Niveau des coins"); PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Relever le coin jusqu'à la sonde"); PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Coins dans la tolérance. Niveau lit "); PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Coin suivant"); @@ -521,12 +521,12 @@ namespace Language_fr { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp Max"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Alim."); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Puiss. moteur "); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("Driver X %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Driver Y %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Driver Z %"); - PROGMEM Language_Str MSG_DAC_PERCENT_I = _UxGT("Driver " AXIS4_STR " %"); - PROGMEM Language_Str MSG_DAC_PERCENT_J = _UxGT("Driver " AXIS5_STR " %"); - PROGMEM Language_Str MSG_DAC_PERCENT_K = _UxGT("Driver " AXIS6_STR " %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = _UxGT("Driver ") LCD_STR_A _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = _UxGT("Driver ") LCD_STR_B _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = _UxGT("Driver ") LCD_STR_C _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = _UxGT("Driver ") LCD_STR_I _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = _UxGT("Driver ") LCD_STR_J _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = _UxGT("Driver ") LCD_STR_K _UxGT(" %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("Driver E %"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM sauv."); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERREUR CONNEXION TMC"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index 8defd2b01f37..f657d5e34d7f 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -271,25 +271,34 @@ namespace Language_gl { PROGMEM Language_Str MSG_SELECT_E = _UxGT("Escolla *"); PROGMEM Language_Str MSG_ACC = _UxGT("Acel"); PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); + PROGMEM Language_Str MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + PROGMEM Language_Str MSG_VE_JERK = _UxGT("Max E Jerk"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Desvío Unión"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocidade"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); + PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Vel"); + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max * Vel"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("V-viaxe min"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Aceleración"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); + PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max * Accel"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrac."); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-viaxe"); PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frecuencia max"); @@ -298,6 +307,9 @@ namespace Language_gl { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pasos/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pasos/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pasos/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" pasos/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" pasos/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" pasos/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pasos/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pasos/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); @@ -490,9 +502,12 @@ namespace Language_gl { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp Máx"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Fonte Alimentación"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Forza do Motor"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERRO CONEX. TMC"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Escribe DAC EEPROM"); @@ -593,6 +608,9 @@ namespace Language_gl { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Corrección"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Suavizado"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 6fb41f90ff2d..444c29560b14 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -132,7 +132,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Tengelyek mozgatása"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Ágy szintezés"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Ágy szintezése"); - PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Elektromos segéd"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Sarok szint"); PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Ágy emelése a szonda váltásig"); PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Minden sarok tolerancián belül. Szint jó."); PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Jó pontok: "); @@ -582,12 +582,12 @@ namespace Language_hu { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max höfok"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Meghajtási erö"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_I = AXIS4_STR _UxGT(" Meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_J = AXIS5_STR _UxGT(" Meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_K = AXIS6_STR _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Meghajtó %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Meghajtó %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E meghajtó %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CSATLAKOZÁSI HIBA"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM írása"); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 32bc7ff7c708..4ae85e7bbe16 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -346,14 +346,14 @@ namespace Language_it { PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav min"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accelerazione"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; - PROGMEM Language_Str MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; - PROGMEM Language_Str MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); + PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Accel"); + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max * Accel"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Ritrazione"); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-Spostamento"); PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequenza max"); @@ -577,12 +577,12 @@ namespace Language_it { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp max"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Alimentatore"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Potenza Drive"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("Driver X %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Driver Y %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Driver Z %"); - PROGMEM Language_Str MSG_DAC_PERCENT_I = _UxGT("Driver ") AXIS4_STR _UxGT(" %"); - PROGMEM Language_Str MSG_DAC_PERCENT_J = _UxGT("Driver ") AXIS5_STR _UxGT(" %"); - PROGMEM Language_Str MSG_DAC_PERCENT_K = _UxGT("Driver ") AXIS6_STR _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = _UxGT("Driver ") LCD_STR_A _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = _UxGT("Driver ") LCD_STR_B _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = _UxGT("Driver ") LCD_STR_C _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = _UxGT("Driver ") LCD_STR_I _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = _UxGT("Driver ") LCD_STR_J _UxGT(" %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = _UxGT("Driver ") LCD_STR_K _UxGT(" %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("Driver E %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERR.CONNESSIONE TMC"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Scrivi DAC EEPROM"); @@ -701,6 +701,9 @@ namespace Language_it { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Correzione"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Appianamento"); diff --git a/Marlin/src/lcd/language/language_jp_kana.h b/Marlin/src/lcd/language/language_jp_kana.h index 61740e3b40eb..c0fe2451b0af 100644 --- a/Marlin/src/lcd/language/language_jp_kana.h +++ b/Marlin/src/lcd/language/language_jp_kana.h @@ -119,14 +119,20 @@ namespace Language_jp_kana { PROGMEM Language_Str MSG_VA_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_A; // "Va-jerk" PROGMEM Language_Str MSG_VB_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_B; // "Vb-jerk" PROGMEM Language_Str MSG_VC_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_C; // "Vc-jerk" + PROGMEM Language_Str MSG_VI_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_I; // "Va-jerk" + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_J; // "Vb-jerk" + PROGMEM Language_Str MSG_VK_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_K; // "Vc-jerk" PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("ステップ/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("ステップ/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("ステップ/mm"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("エクストルーダー ヤクド"); // "Ve-jerk" PROGMEM Language_Str MSG_VMAX_A = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax A" - PROGMEM Language_Str MSG_VMAX_B = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax B" - PROGMEM Language_Str MSG_VMAX_C = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax C" - PROGMEM Language_Str MSG_VMAX_E = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax E" + PROGMEM Language_Str MSG_VMAX_B = _UxGT("サイダイオクリソクド ") LCD_STR_B; // "Vmax B" + PROGMEM Language_Str MSG_VMAX_C = _UxGT("サイダイオクリソクド ") LCD_STR_C; // "Vmax C" + PROGMEM Language_Str MSG_VMAX_I = _UxGT("サイダイオクリソクド ") LCD_STR_I; // "Vmax I" + PROGMEM Language_Str MSG_VMAX_J = _UxGT("サイダイオクリソクド ") LCD_STR_J; // "Vmax J" + PROGMEM Language_Str MSG_VMAX_K = _UxGT("サイダイオクリソクド ") LCD_STR_K; // "Vmax K" + PROGMEM Language_Str MSG_VMAX_E = _UxGT("サイダイオクリソクド ") LCD_STR_E; // "Vmax E" PROGMEM Language_Str MSG_VMAX_EN = _UxGT("サイダイオクリソクド *"); // "Vmax E1" PROGMEM Language_Str MSG_VMIN = _UxGT("サイショウオクリソクド"); // "Vmin" PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("サイショウイドウソクド"); // "VTrav min" @@ -214,9 +220,12 @@ namespace Language_jp_kana { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("セッテイサイコウオン"); // "Max Temp" PROGMEM Language_Str MSG_INFO_PSU = _UxGT("デンゲンシュベツ"); // "Power Supply" PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("モータークドウリョク"); // "Drive Strength" - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X DACシュツリョク %"); // "X Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y DACシュツリョク %"); // "Y Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z DACシュツリョク %"); // "Z Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" DACシュツリョク %"); // "X Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" DACシュツリョク %"); // "Y Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" DACシュツリョク %"); // "Z Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" DACシュツリョク %"); // "I Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" DACシュツリョク %"); // "J Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" DACシュツリョク %"); // "K Driver %" PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E DACシュツリョク %"); // "E Driver %" PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("EEPROMヘホゾン"); // "Store memory" PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("イチジテイシ"); diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index e467178f6a98..b55777717d37 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -327,22 +327,16 @@ namespace Language_pl { PROGMEM Language_Str MSG_VA_JERK = _UxGT("Zryw V") LCD_STR_A; PROGMEM Language_Str MSG_VB_JERK = _UxGT("Zryw V") LCD_STR_B; PROGMEM Language_Str MSG_VC_JERK = _UxGT("Zryw V") LCD_STR_C; + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Zryw V") LCD_STR_I; + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Zryw V") LCD_STR_J; + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Zryw V") LCD_STR_K; PROGMEM Language_Str MSG_VE_JERK = _UxGT("Zryw Ve"); //PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Prędkość (V)"); - //PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - //PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - //PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - //PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - //PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - //PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); + PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vskok min"); PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Przyspieszenie (A)"); - //PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - //PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - //PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - //PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - //PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); + PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-wycofanie"); PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-przesuń."); PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Częstotliwość max"); @@ -351,6 +345,9 @@ namespace Language_pl { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" kroki/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" kroki/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" kroki/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" kroki/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" kroki/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" kroki/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E kroki/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* kroki/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); @@ -561,9 +558,12 @@ namespace Language_pl { //PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Zasilacz"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Siła silnika"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Siła %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Siła %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Siła %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Siła %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Siła %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Siła %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Siła %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Siła %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Siła %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Siła %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC BŁĄD POŁĄCZENIA"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Zapisz DAC EEPROM"); @@ -678,9 +678,6 @@ namespace Language_pl { //PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Reset"); //PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" in:"); //PROGMEM Language_Str MSG_BACKLASH = _UxGT("Backlash"); - //PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - //PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - //PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korekcja"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Wygładzanie"); diff --git a/Marlin/src/lcd/language/language_pt.h b/Marlin/src/lcd/language/language_pt.h index 4bec74558e80..630f38e2d930 100644 --- a/Marlin/src/lcd/language/language_pt.h +++ b/Marlin/src/lcd/language/language_pt.h @@ -105,6 +105,9 @@ namespace Language_pt { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" passo/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" passo/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" passo/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" passo/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" passo/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" passo/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E passo/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* passo/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index 12904aa7ea79..4b52ee97b806 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -244,6 +244,9 @@ namespace Language_pt_br { PROGMEM Language_Str MSG_VA_JERK = _UxGT("arrancada V") LCD_STR_A; PROGMEM Language_Str MSG_VB_JERK = _UxGT("arrancada V") LCD_STR_B; PROGMEM Language_Str MSG_VC_JERK = _UxGT("arrancada V") LCD_STR_C; + PROGMEM Language_Str MSG_VI_JERK = _UxGT("arrancada V") LCD_STR_I; + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("arrancada V") LCD_STR_J; + PROGMEM Language_Str MSG_VK_JERK = _UxGT("arrancada V") LCD_STR_K; PROGMEM Language_Str MSG_VE_JERK = _UxGT("arrancada VE"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Desv. Junção"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocidade"); @@ -255,6 +258,9 @@ namespace Language_pt_br { PROGMEM Language_Str MSG_A_STEPS = _UxGT("Passo ") LCD_STR_A _UxGT("/mm"); PROGMEM Language_Str MSG_B_STEPS = _UxGT("Passo ") LCD_STR_B _UxGT("/mm"); PROGMEM Language_Str MSG_C_STEPS = _UxGT("Passo ") LCD_STR_C _UxGT("/mm"); + PROGMEM Language_Str MSG_I_STEPS = _UxGT("Passo ") LCD_STR_I _UxGT("/mm"); + PROGMEM Language_Str MSG_J_STEPS = _UxGT("Passo ") LCD_STR_J _UxGT("/mm"); + PROGMEM Language_Str MSG_K_STEPS = _UxGT("Passo ") LCD_STR_K _UxGT("/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index 3d21e1a58d7a..aedc8c417332 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -273,12 +273,18 @@ namespace Language_ro { PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-Jerk"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-Jerk"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-Jerk"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocity"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); @@ -287,6 +293,9 @@ namespace Language_ro { PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Retract"); @@ -294,9 +303,12 @@ namespace Language_ro { PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequency max"); PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Steps/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("steps/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("steps/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("steps/mm"); + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" steps/mm"); + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" steps/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" steps/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" steps/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" steps/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" steps/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("Esteps/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*steps/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperature"); @@ -497,9 +509,12 @@ namespace Language_ro { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temperatura Maxima"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Drive Strength"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CONNECTION ERROR"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Write"); @@ -606,6 +621,9 @@ namespace Language_ro { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Corectare"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Smoothing"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index 6ccfe5f47a12..e7eab72f6c4c 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -714,9 +714,9 @@ namespace Language_ru { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Макс. ") LCD_STR_THERMOMETER; PROGMEM Language_Str MSG_INFO_PSU = _UxGT("БП"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Сила привода"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Привод, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Привод, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Привод, %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Привод, %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Привод, %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Привод, %"); PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Привод, %"); PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Привод, %"); PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Привод, %"); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 717fa49b3375..079bcf55c813 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -132,7 +132,7 @@ namespace Language_sk { PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Posunúť osy"); PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Vyrovnanie podložky"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Vyrovnať podložku"); - PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Asist. vyrovnanie"); + PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Vyrovnať rohy"); PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Zdvyhnite podl., kým sa nezopne sonda"); PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Rohy sú vrámci odchyl. Vyrovnajte podl."); PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Dobré body: "); @@ -319,12 +319,18 @@ namespace Language_sk { PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-skok"); PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-skok"); PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-skok"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-skok"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-skok"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-skok"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-skok"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Rýchlosť"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); @@ -333,6 +339,9 @@ namespace Language_sk { PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrakt"); @@ -340,9 +349,12 @@ namespace Language_sk { PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Max. frekvencia"); PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min. posun"); PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Kroky/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("krokov/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("krokov/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("krokov/mm"); + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" krokov/mm"); + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" krokov/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" krokov/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" krokov/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" krokov/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" krokov/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("Ekrokov/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*krokov/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Teplota"); @@ -553,9 +565,12 @@ namespace Language_sk { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Teplota max"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Nap. zdroj"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Budenie motorov"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Motor %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Motor %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Motor %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("CHYBA KOMUNIKÁ. TMC"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Uložiť do EEPROM"); @@ -673,6 +688,9 @@ namespace Language_sk { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korekcia"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Vyhladzovanie"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index baa0f645062c..cb33db5dfdff 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -303,12 +303,18 @@ namespace Language_sv { PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Ryck"); PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Ryck"); PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Ryck"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-Ryck"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-Ryck"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-Ryck"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Ryck"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Knutpunkt Avv"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Hastighet"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); @@ -317,6 +323,9 @@ namespace Language_sv { PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Dra tillbaka"); @@ -327,6 +336,9 @@ namespace Language_sv { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" Steg/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" Steg/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" Steg/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" Steg/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" Steg/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" Steg/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E Steg/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* Steg/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatur"); @@ -533,9 +545,12 @@ namespace Language_sv { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Driv Styrka"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC KOPPLNINGSFEL"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Skriv"); @@ -653,6 +668,9 @@ namespace Language_sv { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korrigering"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Glättning"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index bf218f136fac..66c7c1c1a26a 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -266,12 +266,18 @@ namespace Language_tr { PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Sarsım"); PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Sarsım"); PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Sarsım"); + PROGMEM Language_Str MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-Sarsım"); + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-Sarsım"); + PROGMEM Language_Str MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-Sarsım"); PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Sarsım"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Jonksiyon Sapması"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("Hız Vektörü"); PROGMEM Language_Str MSG_VMAX_A = _UxGT("HızVektör.max ") LCD_STR_A; PROGMEM Language_Str MSG_VMAX_B = _UxGT("HızVektör.max ") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("HızVektör.max ") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("HızVektör.max ") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("HızVektör.max ") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("HızVektör.max ") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("HızVektör.max ") LCD_STR_E; PROGMEM Language_Str MSG_VMAX_EN = _UxGT("HızVektör.max *"); PROGMEM Language_Str MSG_VMIN = _UxGT("HızVektör.min"); @@ -280,6 +286,9 @@ namespace Language_tr { PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max. ivme ") LCD_STR_A; PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max. ivme ") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max. ivme ") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Max. ivme ") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Max. ivme ") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Max. ivme ") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max. ivme ") LCD_STR_E; PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max. ivme *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Ivme-geri çekme"); @@ -288,6 +297,9 @@ namespace Language_tr { PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" adım/mm"); PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" adım/mm"); PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" adım/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" adım/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" adım/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" adım/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("E adım/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* adım/mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Sıcaklık"); @@ -464,9 +476,12 @@ namespace Language_tr { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Sıc."); PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Güç Kaynağı"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Sürücü Gücü"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Sürücü %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Sürücü %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Sürücü %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Sürücü %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Sürücü %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Sürücü %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Sürücü %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Sürücü %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Sürücü %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Sürücü %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC BAĞLANTI HATASI"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Yaz"); @@ -571,6 +586,9 @@ namespace Language_tr { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Düzeltme"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Yumuşatma"); } diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 2e4a1b068caf..e0ee2e39294d 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -719,12 +719,12 @@ namespace Language_uk { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Макс. ") LCD_STR_THERMOMETER; PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Блок жив-ня"); PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Сила мотору"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("Драйвер X, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Драйвер Y, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Драйвер Z, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_I = _UxGT("Драйвер ") AXIS4_STR _UxGT(", %"); - PROGMEM Language_Str MSG_DAC_PERCENT_J = _UxGT("Драйвер ") AXIS5_STR _UxGT(", %"); - PROGMEM Language_Str MSG_DAC_PERCENT_K = _UxGT("Драйвер ") AXIS6_STR _UxGT(", %"); + PROGMEM Language_Str MSG_DAC_PERCENT_A = _UxGT("Драйвер ") LCD_STR_A _UxGT(", %"); + PROGMEM Language_Str MSG_DAC_PERCENT_B = _UxGT("Драйвер ") LCD_STR_B _UxGT(", %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = _UxGT("Драйвер ") LCD_STR_C _UxGT(", %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = _UxGT("Драйвер ") LCD_STR_I _UxGT(", %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = _UxGT("Драйвер ") LCD_STR_J _UxGT(", %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = _UxGT("Драйвер ") LCD_STR_K _UxGT(", %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("Драйвер E, %"); PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ЗБІЙ ЗВ'ЯЗКУ З TMC"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Запис ЦАП у EEPROM"); diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h index 013a9159214a..9ee93a56bbd6 100644 --- a/Marlin/src/lcd/language/language_vi.h +++ b/Marlin/src/lcd/language/language_vi.h @@ -52,9 +52,9 @@ namespace Language_vi { PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu gỡ lỗi"); // Debug Menu PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Kiểm tra tiến độ"); // Progress bar test PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Về nhà tự động"); // Auto home - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Về nhà X"); // home x - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Về nhà Y"); // home y - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Về nhà Z"); + PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Về nhà X"); // home X + PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Về nhà Y"); // home Y + PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Về nhà Z"); // home Z PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Chỉnh canh Z tự động"); PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Đang về nhà XYZ"); // Homing XYZ PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Nhấn để bắt đầu"); // Click to Begin @@ -160,7 +160,7 @@ namespace Language_vi { PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Khe nhớ"); // Memory Slot PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Tải lưới bàn"); // Load Bed Mesh PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Lưu lưới bàn"); // Save Bed Mesh - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("%i lưới được nạp"); // Mesh %i loaded + PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("%i lưới được nạp"); // Mesh %i loaded PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("%i lưới đã lưu"); PROGMEM Language_Str MSG_NO_STORAGE = _UxGT("Không lưu trữ"); // No Storage PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Điều sai: Lưu UBL"); // Err: UBL Save @@ -200,7 +200,7 @@ namespace Language_vi { PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Di chuyển Y"); PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Di chuyển Z"); PROGMEM Language_Str MSG_MOVE_E = _UxGT("Máy đùn"); // Extruder - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Máy đùn *"); // Extruder + PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Máy đùn *"); PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Đầu nóng quá lạnh"); // Hotend too cold PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Di chuyển 0.1mm"); // Move 0.1mm PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Di chuyển 1mm"); // Move 1mm @@ -209,12 +209,12 @@ namespace Language_vi { PROGMEM Language_Str MSG_SPEED = _UxGT("Tốc độ"); // Speed PROGMEM Language_Str MSG_BED_Z = _UxGT("Z Bàn"); PROGMEM Language_Str MSG_NOZZLE = _UxGT("Đầu phun"); // Nozzle - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Đầu phun ~"); // Nozzle + PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Đầu phun ~"); PROGMEM Language_Str MSG_BED = _UxGT("Bàn"); // bed PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Tốc độ quạt"); // fan speed - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Tốc độ quạt ~"); // fan speed + PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Tốc độ quạt ~"); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Tốc độ quạt phụ"); // Extra fan speed - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Tốc độ quạt phụ ~"); // Extra fan speed + PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Tốc độ quạt phụ ~"); PROGMEM Language_Str MSG_FLOW = _UxGT("Lưu Lượng"); PROGMEM Language_Str MSG_FLOW_N = _UxGT("Lưu Lượng ~"); PROGMEM Language_Str MSG_CONTROL = _UxGT("Điều khiển"); // Control @@ -231,28 +231,40 @@ namespace Language_vi { PROGMEM Language_Str MSG_VA_JERK = _UxGT("Giật-V") LCD_STR_A; PROGMEM Language_Str MSG_VB_JERK = _UxGT("Giật-V") LCD_STR_B; PROGMEM Language_Str MSG_VC_JERK = _UxGT("Giật-V") LCD_STR_C; + PROGMEM Language_Str MSG_VI_JERK = _UxGT("Giật-V") LCD_STR_I; + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("Giật-V") LCD_STR_J; + PROGMEM Language_Str MSG_VK_JERK = _UxGT("Giật-V") LCD_STR_K; PROGMEM Language_Str MSG_VE_JERK = _UxGT("Giật-Ve"); PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Độ Lệch Chỗ Giao"); // Junction Dev PROGMEM Language_Str MSG_VELOCITY = _UxGT("Vận tốc"); // velocity PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vđa") LCD_STR_A; // Vmax - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vđa") LCD_STR_B; // Vmax - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vđa") LCD_STR_C; // Vmax - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vđa") LCD_STR_E; // Vmax - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vđa *"); // Vmax + PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vđa") LCD_STR_B; + PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vđa") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("Vđa") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("Vđa") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("Vđa") LCD_STR_K; + PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vđa") LCD_STR_E; + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vđa *"); PROGMEM Language_Str MSG_VMIN = _UxGT("Vthiểu"); // Vmin PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vchuyển thiểu"); // VTrav min PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Sự tăng tốc"); // Acceleration PROGMEM Language_Str MSG_AMAX_A = _UxGT("Tăng tốc ca") LCD_STR_A; // Amax - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Tăng tốc ca") LCD_STR_B; // Amax - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Tăng tốc ca") LCD_STR_C; // Amax - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Tăng tốc ca") LCD_STR_E; // Amax - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Tăng tốc ca *"); // Amax + PROGMEM Language_Str MSG_AMAX_B = _UxGT("Tăng tốc ca") LCD_STR_B; + PROGMEM Language_Str MSG_AMAX_C = _UxGT("Tăng tốc ca") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("Tăng tốc ca") LCD_STR_I; // Amax + PROGMEM Language_Str MSG_AMAX_J = _UxGT("Tăng tốc ca") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("Tăng tốc ca") LCD_STR_K; + PROGMEM Language_Str MSG_AMAX_E = _UxGT("Tăng tốc ca") LCD_STR_E; + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Tăng tốc ca *"); PROGMEM Language_Str MSG_A_RETRACT = _UxGT("TT-Rút"); // A-retract PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("TT-Chuyển"); // A-travel PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Bước/mm"); // Steps - PROGMEM Language_Str MSG_A_STEPS = _UxGT("Bước") LCD_STR_A _UxGT("/mm"); // Asteps/mm + PROGMEM Language_Str MSG_A_STEPS = _UxGT("Bước") LCD_STR_A _UxGT("/mm"); // Steps/mm PROGMEM Language_Str MSG_B_STEPS = _UxGT("Bước") LCD_STR_B _UxGT("/mm"); PROGMEM Language_Str MSG_C_STEPS = _UxGT("Bước") LCD_STR_C _UxGT("/mm"); + PROGMEM Language_Str MSG_I_STEPS = _UxGT("Bước") LCD_STR_I _UxGT("/mm"); // Steps/mm + PROGMEM Language_Str MSG_J_STEPS = _UxGT("Bước") LCD_STR_J _UxGT("/mm"); + PROGMEM Language_Str MSG_K_STEPS = _UxGT("Bước") LCD_STR_K _UxGT("/mm"); PROGMEM Language_Str MSG_E_STEPS = _UxGT("BướcE/mm"); PROGMEM Language_Str MSG_EN_STEPS = _UxGT("Bước */mm"); PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Nhiệt độ"); // Temperature @@ -388,10 +400,13 @@ namespace Language_vi { PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Nhiệt độ tối đa"); // Max temp PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Bộ nguồn"); // PSU PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Sức mạnh ổ đĩa"); // Drive Strength - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X % trình điều khiển"); // X Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y % trình điều khiển"); // Y Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z % trình điều khiển"); // Z Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E % trình điều khiển"); // E Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" % trình điều khiển"); // X Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" % trình điều khiển"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" % trình điều khiển"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" % trình điều khiển"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" % trình điều khiển"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" % trình điều khiển"); + PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E % trình điều khiển"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Ghi DAC EEPROM"); // DAC EEPROM Write PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("In tạm dừng"); // PRINT PAUSED PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("Nạp dây nhựa"); diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 31d262360489..d3883ac88ddc 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -33,52 +33,52 @@ namespace Language_zh_CN { constexpr uint8_t CHARSIZE = 3; PROGMEM Language_Str LANGUAGE = _UxGT("Simplified Chinese"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT("已就绪."); //" ready." + PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT("已就绪."); // " ready." PROGMEM Language_Str MSG_MARLIN = _UxGT("马林"); PROGMEM Language_Str MSG_YES = _UxGT("是"); PROGMEM Language_Str MSG_NO = _UxGT("否"); PROGMEM Language_Str MSG_BACK = _UxGT("返回"); // ”Back“ PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("放弃中..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("存储卡已插入"); //"Card inserted" - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("存储卡被拔出"); //"Card removed" + PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("存储卡已插入"); // "Card inserted" + PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("存储卡被拔出"); // "Card removed" PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("等待存储器"); PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("存储器读取错误"); PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB设备已弹出"); PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB启动错误"); PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("子响应溢出"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("挡块"); //"Endstops" // Max length 8 characters + PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("挡块"); // "Endstops" // Max length 8 characters PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("软挡块"); - PROGMEM Language_Str MSG_MAIN = _UxGT("主菜单"); //"Main" + PROGMEM Language_Str MSG_MAIN = _UxGT("主菜单"); // "Main" PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("高级设置"); PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("配置"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("自动开始"); //"Autostart" - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("关闭步进电机"); //"Disable steppers" + PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("自动开始"); // "Autostart" + PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("关闭步进电机"); // "Disable steppers" PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("调试菜单"); // "Debug Menu" PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("进度条测试"); // "Progress Bar Test" - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("自动回原点"); //"Auto home" - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("回X原位"); //"Home X" - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("回Y原位"); //"Home Y" - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("回Z原位"); //"Home Z" + PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("自动回原点"); // "Auto home" + PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("回X原位"); // "Home X" + PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("回Y原位"); // "Home Y" + PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("回Z原位"); // "Home Z" PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("自动Z对齐"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("平台调平XYZ归原位"); //"Homing XYZ" - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("单击开始热床调平"); //"Click to Begin" - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("下个热床调平点"); //"Next Point" - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("完成热床调平"); //"Leveling Done!" + PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("平台调平XYZ归原位"); // "Homing XYZ" + PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("单击开始热床调平"); // "Click to Begin" + PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("下个热床调平点"); // "Next Point" + PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("完成热床调平"); // "Leveling Done!" PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("淡出高度"); // "Fade Height" - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("设置原点偏移"); //"Set home offsets" - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已启用"); //"Offsets applied" - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("设置原点"); //"Set origin" + PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("设置原点偏移"); // "Set home offsets" + PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已启用"); // "Offsets applied" + PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("设置原点"); // "Set origin" #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("预热 ") PREHEAT_1_LABEL; //"Preheat PREHEAT_2_LABEL" - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("预热 ") PREHEAT_1_LABEL " ~"; //"Preheat PREHEAT_2_LABEL" + PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("预热 ") PREHEAT_1_LABEL; // "Preheat PREHEAT_2_LABEL" + PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("预热 ") PREHEAT_1_LABEL " ~"; // "Preheat PREHEAT_2_LABEL" PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 喷嘴"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 喷嘴 ~"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 全部"); //MSG_PREHEAT_1 " All" PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 热床"); //MSG_PREHEAT_1 " Bed" PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 设置"); //MSG_PREHEAT_1 " conf" - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("预热 $"); //"Preheat PREHEAT_2_LABEL" - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("预热 $ ~"); //"Preheat PREHEAT_2_LABEL" + PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("预热 $"); // "Preheat PREHEAT_2_LABEL" + PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("预热 $ ~"); // "Preheat PREHEAT_2_LABEL" PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("预热 $ 喷嘴"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("预热 $ 喷嘴 ~"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("预热 $ 全部"); //MSG_PREHEAT_1 " All" @@ -86,20 +86,20 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("预热 $ 设置"); //MSG_PREHEAT_1 " conf" #endif PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("预热自定义"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("降温"); //"Cooldown" + PROGMEM Language_Str MSG_COOLDOWN = _UxGT("降温"); // "Cooldown" PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("切割频率"); PROGMEM Language_Str MSG_LASER_MENU = _UxGT("激光控制"); PROGMEM Language_Str MSG_LASER_POWER = _UxGT("激光电源"); PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("主轴控制"); PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("主轴电源"); PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("主轴反转"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("电源打开"); //"Switch power on" - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("电源关闭"); //"Switch power off" - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("挤出"); //"Extrude" - PROGMEM Language_Str MSG_RETRACT = _UxGT("回抽"); //"Retract" - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移动轴"); //"Move axis" - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("调平热床"); //"Bed leveling" - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("调平热床"); //"Level bed" + PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("电源打开"); // "Switch power on" + PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("电源关闭"); // "Switch power off" + PROGMEM Language_Str MSG_EXTRUDE = _UxGT("挤出"); // "Extrude" + PROGMEM Language_Str MSG_RETRACT = _UxGT("回抽"); // "Retract" + PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移动轴"); // "Move axis" + PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("调平热床"); // "Bed leveling" + PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("调平热床"); // "Level bed" PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("调平边角"); // "Bed Tramming" PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("下个边角"); // "Next corner" PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("网格编辑器"); @@ -220,27 +220,27 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_MOVING = _UxGT("移动..."); // "Moving...") PROGMEM Language_Str MSG_FREE_XY = _UxGT("释放 XY"); // "Free XY") - PROGMEM Language_Str MSG_MOVE_X = _UxGT("移动X"); //"Move X" - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("移动Y"); //"Move Y" - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("移动Z"); //"Move Z" - PROGMEM Language_Str MSG_MOVE_E = _UxGT("挤出机"); //"Extruder" - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("挤出机 *"); //"Extruder" + PROGMEM Language_Str MSG_MOVE_X = _UxGT("移动X"); // "Move X" + PROGMEM Language_Str MSG_MOVE_Y = _UxGT("移动Y"); // "Move Y" + PROGMEM Language_Str MSG_MOVE_Z = _UxGT("移动Z"); // "Move Z" + PROGMEM Language_Str MSG_MOVE_E = _UxGT("挤出机"); // "Extruder" + PROGMEM Language_Str MSG_MOVE_EN = _UxGT("挤出机 *"); // "Extruder" PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("热端太冷"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("移动 %s mm"); //"Move 0.025mm" - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("移动 0.1 mm"); //"Move 0.1mm" - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("移动 1 mm"); //"Move 1mm" - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("移动 10 mm"); //"Move 10mm" - PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("移动 100 mm"); //"Move 100mm" - PROGMEM Language_Str MSG_SPEED = _UxGT("速率"); //"Speed" - PROGMEM Language_Str MSG_BED_Z = _UxGT("热床Z"); //"Bed Z" - PROGMEM Language_Str MSG_NOZZLE = _UxGT("喷嘴"); //"Nozzle" 噴嘴 - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("喷嘴 ~"); //"Nozzle" 噴嘴 + PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("移动 %s mm"); // "Move 0.025mm" + PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("移动 0.1 mm"); // "Move 0.1mm" + PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("移动 1 mm"); // "Move 1mm" + PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("移动 10 mm"); // "Move 10mm" + PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("移动 100 mm"); // "Move 100mm" + PROGMEM Language_Str MSG_SPEED = _UxGT("速率"); // "Speed" + PROGMEM Language_Str MSG_BED_Z = _UxGT("热床Z"); // "Bed Z" + PROGMEM Language_Str MSG_NOZZLE = _UxGT("喷嘴"); // "Nozzle" 噴嘴 + PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("喷嘴 ~"); // "Nozzle" 噴嘴 PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("喷嘴已停靠"); PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("喷嘴待命中"); - PROGMEM Language_Str MSG_BED = _UxGT("热床"); //"Bed" + PROGMEM Language_Str MSG_BED = _UxGT("热床"); // "Bed" PROGMEM Language_Str MSG_CHAMBER = _UxGT("机箱壳"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("风扇速率"); //"Fan speed" - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("风扇速率 ~"); //"Fan speed" + PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("风扇速率"); // "Fan speed" + PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("风扇速率 ~"); // "Fan speed" PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("存储的风扇 ~"); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("额外风扇速率"); // "Extra fan speed" PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("额外风扇速率 ~"); // "Extra fan speed" @@ -249,70 +249,82 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("自动模式"); PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("工作速度"); PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("空闲周期"); - PROGMEM Language_Str MSG_FLOW = _UxGT("挤出速率"); //"Flow" - PROGMEM Language_Str MSG_FLOW_N = _UxGT("挤出速率 ~"); //"Flow" - PROGMEM Language_Str MSG_CONTROL = _UxGT("控制"); //"Control" - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); //" " LCD_STR_THERMOMETER " Min" - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); //" " LCD_STR_THERMOMETER " Max" - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 因数"); //" " LCD_STR_THERMOMETER " Fact" - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("自动控温"); //"Autotemp" - PROGMEM Language_Str MSG_LCD_ON = _UxGT("开"); //"On" - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("关"); //"Off" + PROGMEM Language_Str MSG_FLOW = _UxGT("挤出速率"); // "Flow" + PROGMEM Language_Str MSG_FLOW_N = _UxGT("挤出速率 ~"); // "Flow" + PROGMEM Language_Str MSG_CONTROL = _UxGT("控制"); // "Control" + PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); // " " LCD_STR_THERMOMETER " Min" + PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); // " " LCD_STR_THERMOMETER " Max" + PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 因数"); // " " LCD_STR_THERMOMETER " Fact" + PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("自动控温"); // "Autotemp" + PROGMEM Language_Str MSG_LCD_ON = _UxGT("开"); // "On" + PROGMEM Language_Str MSG_LCD_OFF = _UxGT("关"); // "Off" PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("自动PID"); PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("自动PID *"); PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID调整完成"); PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("自动调失败. 坏的挤出机"); PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("自动调失败. 温度太高"); PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("自动调失败! 超时"); - PROGMEM Language_Str MSG_SELECT = _UxGT("选择"); //"Select" + PROGMEM Language_Str MSG_SELECT = _UxGT("选择"); // "Select" PROGMEM Language_Str MSG_SELECT_E = _UxGT("选择 *"); - PROGMEM Language_Str MSG_ACC = _UxGT("加速度"); //"Accel" acceleration + PROGMEM Language_Str MSG_ACC = _UxGT("加速度"); // "Accel" acceleration PROGMEM Language_Str MSG_JERK = _UxGT("抖动速率"); // "Jerk" - PROGMEM Language_Str MSG_VA_JERK = _UxGT("轴抖动速率") LCD_STR_A; //"Va-jerk" - PROGMEM Language_Str MSG_VB_JERK = _UxGT("轴抖动速率") LCD_STR_B; //"Vb-jerk" - PROGMEM Language_Str MSG_VC_JERK = _UxGT("轴抖动速率") LCD_STR_C; //"Vc-jerk" - PROGMEM Language_Str MSG_VE_JERK = _UxGT("挤出机抖动速率"); //"Ve-jerk" + PROGMEM Language_Str MSG_VA_JERK = _UxGT("轴抖动速率") LCD_STR_A; // "Va-jerk" + PROGMEM Language_Str MSG_VB_JERK = _UxGT("轴抖动速率") LCD_STR_B; // "Vb-jerk" + PROGMEM Language_Str MSG_VC_JERK = _UxGT("轴抖动速率") LCD_STR_C; // "Vc-jerk" + PROGMEM Language_Str MSG_VI_JERK = _UxGT("轴抖动速率") LCD_STR_I; // "Vi-jerk" + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("轴抖动速率") LCD_STR_J; // "Vj-jerk" + PROGMEM Language_Str MSG_VK_JERK = _UxGT("轴抖动速率") LCD_STR_K; // "Vk-jerk" + PROGMEM Language_Str MSG_VE_JERK = _UxGT("挤出机抖动速率"); // "Ve-jerk" PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("接点差"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("速度"); // "Velocity" - PROGMEM Language_Str MSG_VMAX_A = _UxGT("最大进料速率") LCD_STR_A; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_B = _UxGT("最大进料速率") LCD_STR_B; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_C = _UxGT("最大进料速率") LCD_STR_C; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_E = _UxGT("最大进料速率") LCD_STR_E; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("最大进料速率 *"); //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMIN = _UxGT("最小进料速率"); //"Vmin" min_feedrate_mm_s - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("最小移动速率"); //"VTrav min" min_travel_feedrate_mm_s, (target) speed of the move + PROGMEM Language_Str MSG_VMAX_A = _UxGT("最大进料速率") LCD_STR_A; // "Vmax " max_feedrate_mm_s + PROGMEM Language_Str MSG_VMAX_B = _UxGT("最大进料速率") LCD_STR_B; + PROGMEM Language_Str MSG_VMAX_C = _UxGT("最大进料速率") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("最大进料速率") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("最大进料速率") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("最大进料速率") LCD_STR_K; + PROGMEM Language_Str MSG_VMAX_E = _UxGT("最大进料速率") LCD_STR_E; + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("最大进料速率 *"); + PROGMEM Language_Str MSG_VMIN = _UxGT("最小进料速率"); // "Vmin" min_feedrate_mm_s + PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("最小移动速率"); // "VTrav min" min_travel_feedrate_mm_s, (target) speed of the move PROGMEM Language_Str MSG_ACCELERATION = _UxGT("加速度"); // "Acceleration" - PROGMEM Language_Str MSG_AMAX_A = _UxGT("最大打印加速度") LCD_STR_A; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_B = _UxGT("最大打印加速度") LCD_STR_B; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_C = _UxGT("最大打印加速度") LCD_STR_C; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_E = _UxGT("最大打印加速度") LCD_STR_E; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("最大打印加速度 *"); //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("收进加速度"); //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("非打印移动加速度"); //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves + PROGMEM Language_Str MSG_AMAX_A = _UxGT("最大打印加速度") LCD_STR_A; // "Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves + PROGMEM Language_Str MSG_AMAX_B = _UxGT("最大打印加速度") LCD_STR_B; + PROGMEM Language_Str MSG_AMAX_C = _UxGT("最大打印加速度") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("最大打印加速度") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("最大打印加速度") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("最大打印加速度") LCD_STR_K; + PROGMEM Language_Str MSG_AMAX_E = _UxGT("最大打印加速度") LCD_STR_E; + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("最大打印加速度 *"); + PROGMEM Language_Str MSG_A_RETRACT = _UxGT("收进加速度"); // "A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts + PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("非打印移动加速度"); // "A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("频率最大"); PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("进给速度"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("轴步数/mm"); //"Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("步数/mm"); //"Asteps/mm" - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("步数/mm"); //"Bsteps/mm" - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("步数/mm"); //"Csteps/mm" - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E 步数/mm"); //"Esteps/mm" + PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("轴步数/mm"); // "Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" 步数/mm"); // "Asteps/mm" + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" 步数/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" 步数/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" 步数/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" 步数/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" 步数/mm"); + PROGMEM Language_Str MSG_E_STEPS = _UxGT("E 步数/mm"); // "Esteps/mm" PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* 步数/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("温度"); //"Temperature" - PROGMEM Language_Str MSG_MOTION = _UxGT("运动"); //"Motion" - PROGMEM Language_Str MSG_FILAMENT = _UxGT("料丝"); //"Filament" menu_advanced_filament - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E 在 mm") SUPERSCRIPT_THREE; //"E in mm3" volumetric_enabled + PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("温度"); // "Temperature" + PROGMEM Language_Str MSG_MOTION = _UxGT("运动"); // "Motion" + PROGMEM Language_Str MSG_FILAMENT = _UxGT("料丝"); // "Filament" menu_advanced_filament + PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E 在 mm") SUPERSCRIPT_THREE; // "E in mm3" volumetric_enabled PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E 限制 在 mm") SUPERSCRIPT_THREE; PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E 限制 *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("丝料直径"); //"Fil. Dia." + PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("丝料直径"); // "Fil. Dia." PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("丝料直径 *"); PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("卸载 mm"); // "Unload mm" PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("装载 mm"); // "Load mm" PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD对比度"); //"LCD contrast" - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("保存设置"); //"Store memory" - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("装载设置"); //"Load memory" - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("恢复安全值"); //"Restore Defaults" + PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD对比度"); // "LCD contrast" + PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("保存设置"); // "Store memory" + PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("装载设置"); // "Load memory" + PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("恢复安全值"); // "Restore Defaults" PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("初始化设置"); // "Initialize EEPROM" PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC 错误"); PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index 错误"); @@ -321,9 +333,9 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("存储器更新"); PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("复位打印机"); PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("刷新"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("信息屏"); //"Info screen" - PROGMEM Language_Str MSG_PREPARE = _UxGT("准备"); //"Prepare" - PROGMEM Language_Str MSG_TUNE = _UxGT("调整"); //"Tune" + PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("信息屏"); // "Info screen" + PROGMEM Language_Str MSG_PREPARE = _UxGT("准备"); // "Prepare" + PROGMEM Language_Str MSG_TUNE = _UxGT("调整"); // "Tune" PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("电源监控"); PROGMEM Language_Str MSG_CURRENT = _UxGT("电流"); PROGMEM Language_Str MSG_VOLTAGE = _UxGT("电压"); @@ -340,33 +352,33 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("返回"); PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("继续"); PROGMEM Language_Str MSG_PAUSING = _UxGT("暂停中..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("暂停打印"); //"Pause print" - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("恢复打印"); //"Resume print" - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("停止打印"); //"Stop print" + PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("暂停打印"); // "Pause print" + PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("恢复打印"); // "Resume print" + PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("停止打印"); // "Stop print" PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("打印物体"); PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("取消物体"); PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("取消物体 ="); PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("中断恢复"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("从存储卡上打印"); //"Print from SD" - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("无存储卡"); //"No SD card" - PROGMEM Language_Str MSG_DWELL = _UxGT("休眠中 ..."); //"Sleep..." - PROGMEM Language_Str MSG_USERWAIT = _UxGT("点击继续 ..."); //"Click to resume..." + PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("从存储卡上打印"); // "Print from SD" + PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("无存储卡"); // "No SD card" + PROGMEM Language_Str MSG_DWELL = _UxGT("休眠中 ..."); // "Sleep..." + PROGMEM Language_Str MSG_USERWAIT = _UxGT("点击继续 ..."); // "Click to resume..." PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("暫停打印"); // "Print paused" PROGMEM Language_Str MSG_PRINTING = _UxGT("打印中..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("已取消打印"); //"Print aborted" + PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("已取消打印"); // "Print aborted" PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("打印已完成"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("无移动"); //"No move." - PROGMEM Language_Str MSG_KILLED = _UxGT("已杀掉"); //"KILLED. " - PROGMEM Language_Str MSG_STOPPED = _UxGT("已停止"); //"STOPPED. " - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("回抽长度mm"); //"Retract mm" retract_length, retract length (positive mm) - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("换手回抽长度mm"); //"Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("回抽速率mm/s"); //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); //"Hop mm" retract_zraise, retract Z-lift - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("回抽恢复长度mm"); //"UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("换手回抽恢复长度mm"); //"S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回抽恢复后进料速率mm/s"); //"Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) + PROGMEM Language_Str MSG_NO_MOVE = _UxGT("无移动"); // "No move." + PROGMEM Language_Str MSG_KILLED = _UxGT("已杀掉"); // "KILLED. " + PROGMEM Language_Str MSG_STOPPED = _UxGT("已停止"); // "STOPPED. " + PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("回抽长度mm"); // "Retract mm" retract_length, retract length (positive mm) + PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("换手回抽长度mm"); // "Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change + PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("回抽速率mm/s"); // "Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) + PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); // "Hop mm" retract_zraise, retract Z-lift + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("回抽恢复长度mm"); // "UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("换手回抽恢复长度mm"); // "S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回抽恢复后进料速率mm/s"); // "Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); // "S UnRet V" - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("自动抽回"); //"Auto-Retract" autoretract_enabled, + PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("自动抽回"); // "Auto-Retract" autoretract_enabled, PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("交换长度"); PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("额外的交换"); PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("清洗长度"); @@ -384,17 +396,17 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("自动迁移"); PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("上一个挤出机"); PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("迁移至 *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("更换丝料"); //"Change filament" - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("更换丝料 *"); //"Change filament" + PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("更换丝料"); // "Change filament" + PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("更换丝料 *"); // "Change filament" PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("装载丝料"); // "Load filament" PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("装载丝料 *"); // "Load filament" PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("卸载丝料"); // "Unload filament" PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("卸载丝料 *"); // "Unload filament" PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("卸载全部"); // "Unload All" - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("初始化存储卡"); //"Init. SD card" - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("更换存储卡"); //"Change SD card" + PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("初始化存储卡"); // "Init. SD card" + PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("更换存储卡"); // "Change SD card" PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("释放存储卡"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z探针在热床之外"); //"Z probe out. bed" Z probe is not within the physical limits + PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z探针在热床之外"); // "Z probe out. bed" Z probe is not within the physical limits PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("偏斜因数"); // "Skew Factor" PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); // "BLTouch" PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("自检"); @@ -416,39 +428,39 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("部署TouchMI"); PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("部署Z探针"); PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("收好Z探针"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("归位 %s%s%s 先"); //"Home ... first" + PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("归位 %s%s%s 先"); // "Home ... first" PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("探针偏移量"); PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("探针X偏移"); PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("探针Y偏移"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("探针Z偏移"); //"Z Offset" - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("微量调整X轴"); //"Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("微量调整Y轴"); //"Babystep Y" - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("微量调整Z轴"); //"Babystep Z" + PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("探针Z偏移"); // "Z Offset" + PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("微量调整X轴"); // "Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts + PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("微量调整Y轴"); // "Babystep Y" + PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("微量调整Z轴"); // "Babystep Z" PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("总计"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("挡块终止"); //"Endstop abort" - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("加热失败"); //"Heating failed" - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("错误:冗余温度"); //"Err: REDUNDANT TEMP" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("温控失控"); //"THERMAL RUNAWAY" + PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("挡块终止"); // "Endstop abort" + PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("加热失败"); // "Heating failed" + PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("错误:冗余温度"); // "Err: REDUNDANT TEMP" + PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("温控失控"); // "THERMAL RUNAWAY" PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("热床热量失控"); PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("机箱热量失控"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("错误:最高温度"); //"Err: MAXTEMP" - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("错误:最低温度"); //"Err: MINTEMP" - PROGMEM Language_Str MSG_HALTED = _UxGT("打印停机"); //"PRINTER HALTED" - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("请重置"); //"Please reset" - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("天"); //"d" // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("时"); //"h" // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("分"); //"m" // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("加热中 ..."); //"Heating..." + PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("错误:最高温度"); // "Err: MAXTEMP" + PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("错误:最低温度"); // "Err: MINTEMP" + PROGMEM Language_Str MSG_HALTED = _UxGT("打印停机"); // "PRINTER HALTED" + PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("请重置"); // "Please reset" + PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("天"); // "d" // One character only + PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("时"); // "h" // One character only + PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("分"); // "m" // One character only + PROGMEM Language_Str MSG_HEATING = _UxGT("加热中 ..."); // "Heating..." PROGMEM Language_Str MSG_COOLING = _UxGT("冷却中 ..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("加热热床中 ..."); //"Bed Heating..." + PROGMEM Language_Str MSG_BED_HEATING = _UxGT("加热热床中 ..."); // "Bed Heating..." PROGMEM Language_Str MSG_BED_COOLING = _UxGT("热床冷却中 ..."); PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("机箱加热中 ..."); PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("机箱冷却中 ..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("⊿校准"); //"Delta Calibration" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("⊿校准X"); //"Calibrate X" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校准Y"); //"Calibrate Y" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校准Z"); //"Calibrate Z" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校准中心"); //"Calibrate Center" + PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("⊿校准"); // "Delta Calibration" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("⊿校准X"); // "Calibrate X" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校准Y"); // "Calibrate Y" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校准Z"); // "Calibrate Z" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校准中心"); // "Calibrate Center" PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("⊿设置"); // "Delta Settings" PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("⊿自动校准"); // "Auto Calibration" PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("设置⊿高度"); // "Set Delta Height" @@ -456,19 +468,19 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("⊿斜柱"); // "Diag Rod" PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("⊿高度"); // "Height" PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("⊿半径"); // "Radius" - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("关于打印机"); //"About Printer" - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("打印机信息"); //"Printer Info" + PROGMEM Language_Str MSG_INFO_MENU = _UxGT("关于打印机"); // "About Printer" + PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("打印机信息"); // "Printer Info" PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("三点调平"); // "3-Point Leveling" PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("线性调平"); // "Linear Leveling" PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("双线性调平"); // "Bilinear Leveling" PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("统一热床调平(UBL)"); // "Unified Bed Leveling" PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("网格调平"); // "Mesh Leveling" - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("打印机统计"); //"Printer Stats" - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("主板信息"); //"Board Info" - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("温度计"); //"Thermistors" - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("挤出机"); //"Extruders" - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("波特率"); //"Baud" - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("协议"); //"Protocol" + PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("打印机统计"); // "Printer Stats" + PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("主板信息"); // "Board Info" + PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("温度计"); // "Thermistors" + PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("挤出机"); // "Extruders" + PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("波特率"); // "Baud" + PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("协议"); // "Protocol" PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("监控温度失控:关"); PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("监控温度失控:开"); PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("热端空闲超时"); @@ -479,26 +491,29 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("打印机不正确"); // "The printer is incorrect" #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("打印计数"); //"Print Count" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成了"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("总打印时间"); //"Total print time" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最长工作时间"); //"Longest job time" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("总计挤出"); //"Extruded total" + PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("打印计数"); // "Print Count" + PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成了"); // "Completed" + PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("总打印时间"); // "Total print time" + PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最长工作时间"); // "Longest job time" + PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("总计挤出"); // "Extruded total" #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("打印数"); //"Prints" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("总共"); //"Total" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最长"); //"Longest" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("已挤出"); //"Extruded" + PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("打印数"); // "Prints" + PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); // "Completed" + PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("总共"); // "Total" + PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最长"); // "Longest" + PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("已挤出"); // "Extruded" #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("最低温度"); //"Min Temp" - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("最高温度"); //"Max Temp" - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("电源供应"); //"Power Supply" + PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("最低温度"); // "Min Temp" + PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("最高温度"); // "Max Temp" + PROGMEM Language_Str MSG_INFO_PSU = _UxGT("电源供应"); // "Power Supply" PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("驱动力度"); // "Drive Strength" - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X 驱动 %"); // "X Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y 驱动 %"); // "Y Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z 驱动 %"); // "Z Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" 驱动 %"); // "X Driver %" + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" 驱动 %"); + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" 驱动 %"); + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" 驱动 %"); + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" 驱动 %"); + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" 驱动 %"); PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E 驱动 %"); // "E Driver %" PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC 连接错误"); PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("保存驱动设置"); // "DAC EEPROM Write" @@ -508,7 +523,7 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("卸载丝料"); // "UNLOAD FILAMENT" PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("恢复选项:"); // "RESUME OPTIONS:" PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("清除更多"); // "Purge more" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢复打印"); //"Resume print" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢复打印"); // "Resume print" PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" 喷嘴: "); // " Nozzle: " PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("断料传感器"); PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("断料距离mm"); @@ -583,15 +598,15 @@ namespace Language_zh_CN { #else PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("按下继续")); PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停靠中...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("请等待 ...")); //"Please wait..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入并单击")); //"Insert and Click" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("请等待 ...")); // "Please wait..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入并单击")); // "Insert and Click" PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("按下加热")); PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("加热中 ...")); // "Heating..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); //"Ejecting..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("装载中 ...")); //"Loading..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); // "Ejecting..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("装载中 ...")); // "Loading..." PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("清除中 ...")); // "Purging..." PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("按下完成")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢复中 ...")); //"Resuming..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢复中 ...")); // "Resuming..." #endif PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC驱动器"); PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("驱动电流"); @@ -605,6 +620,9 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; + PROGMEM Language_Str MSG_BACKLASH_I = LCD_STR_I; + PROGMEM Language_Str MSG_BACKLASH_J = LCD_STR_J; + PROGMEM Language_Str MSG_BACKLASH_K = LCD_STR_K; PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("校正"); PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("平滑的"); diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index f162536132bd..2c7d1bf69ff4 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -33,84 +33,84 @@ namespace Language_zh_TW { constexpr uint8_t CHARSIZE = 3; PROGMEM Language_Str LANGUAGE = _UxGT("Traditional Chinese"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT("已就緒."); //" ready." + PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT("已就緒."); // " ready." PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("是"); //"YES" - PROGMEM Language_Str MSG_NO = _UxGT("否"); //"NO" + PROGMEM Language_Str MSG_YES = _UxGT("是"); // "YES" + PROGMEM Language_Str MSG_NO = _UxGT("否"); // "NO" PROGMEM Language_Str MSG_BACK = _UxGT("返回"); // "Back" - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("正在中止..."); //"Aborting..." - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("記憶卡已插入"); //"Card inserted" - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("記憶卡被拔出"); //"Card removed" - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("等待記憶卡"); //"Waiting for media" + PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("正在中止..."); // "Aborting..." + PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("記憶卡已插入"); // "Card inserted" + PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("記憶卡被拔出"); // "Card removed" + PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("等待記憶卡"); // "Waiting for media" PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("記憶卡讀取錯誤"); //"Media read error" - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB裝置已移除"); //"USB device removed" - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB啟動失敗"); //"USB start failed" - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("擋塊"); //"Endstops" // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("軟體擋塊"); //"Soft Endstops" - PROGMEM Language_Str MSG_MAIN = _UxGT("主選單"); //"Main" - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("進階設置"); //"Advanced Settings" + PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB裝置已移除"); // "USB device removed" + PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB啟動失敗"); // "USB start failed" + PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("擋塊"); // "Endstops" // Max length 8 characters + PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("軟體擋塊"); // "Soft Endstops" + PROGMEM Language_Str MSG_MAIN = _UxGT("主選單"); // "Main" + PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("進階設置"); // "Advanced Settings" PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("設置"); //Configuration - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("自動開始"); //"Autostart" - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("關閉步進馬達"); //"Disable steppers" + PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("自動開始"); // "Autostart" + PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("關閉步進馬達"); // "Disable steppers" PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("除錯選單"); // "Debug Menu" PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("進度條測試"); // "Progress Bar Test" - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("自動回原點"); //"Auto home" - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("回X原點"); //"Home X" - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("回Y原點"); //"Home Y" - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("回Z原點"); //"Home Z" - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("自動Z對齊"); //"Auto Z-Align" - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("平台調平XYZ歸原點"); //"Homing XYZ" - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("單擊開始熱床調平"); //"Click to Begin" - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("下個熱床調平點"); //"Next Point" - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("完成熱床調平"); //"Leveling Done!" + PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("自動回原點"); // "Auto home" + PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("回X原點"); // "Home X" + PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("回Y原點"); // "Home Y" + PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("回Z原點"); // "Home Z" + PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("自動Z對齊"); // "Auto Z-Align" + PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("平台調平XYZ歸原點"); // "Homing XYZ" + PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("單擊開始熱床調平"); // "Click to Begin" + PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("下個熱床調平點"); // "Next Point" + PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("完成熱床調平"); // "Leveling Done!" PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("淡出高度"); // "Fade Height" - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("設置原點偏移"); //"Set home offsets" - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已啟用"); //"Offsets applied" - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("設置原點"); //"Set origin" + PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("設置原點偏移"); // "Set home offsets" + PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已啟用"); // "Offsets applied" + PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("設置原點"); // "Set origin" #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("預熱 ") PREHEAT_1_LABEL; //"Preheat PREHEAT_1_LABEL" - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("預熱 ") PREHEAT_1_LABEL " ~"; //"Preheat PREHEAT_1_LABEL" + PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("預熱 ") PREHEAT_1_LABEL; // "Preheat PREHEAT_1_LABEL" + PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("預熱 ") PREHEAT_1_LABEL " ~"; // "Preheat PREHEAT_1_LABEL" PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 噴嘴"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 噴嘴 ~"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 全部"); //MSG_PREHEAT_1 " All" PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 熱床"); //MSG_PREHEAT_1 " Bed" PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 設置"); //MSG_PREHEAT_1 " conf" - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("預熱 $"); //"Preheat PREHEAT_1_LABEL" - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("預熱 $ ~"); //"Preheat PREHEAT_1_LABEL" + PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("預熱 $"); // "Preheat PREHEAT_1_LABEL" + PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("預熱 $ ~"); // "Preheat PREHEAT_1_LABEL" PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("預熱 $ 噴嘴"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("預熱 $ 噴嘴 ~"); //MSG_PREHEAT_1 " " PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("預熱 $ 全部"); //MSG_PREHEAT_1 " All" PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("預熱 $ 熱床"); //MSG_PREHEAT_1 " Bed" PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("預熱 $ 設置"); //MSG_PREHEAT_1 " conf" #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("自定預熱"); //"Preheat Custom" - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("降溫"); //"Cooldown" - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("激光控制"); //"Laser Control" - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("激光電源"); //"Laser Power" - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("主軸控告制"); //"Spindle Control" - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("主軸電源"); //"Spindle Power" - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("主軸反轉"); //"Spindle Reverse" - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("電源打開"); //"Switch power on" - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("電源關閉"); //"Switch power off" - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("擠出"); //"Extrude" - PROGMEM Language_Str MSG_RETRACT = _UxGT("回縮"); //"Retract" - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移動軸"); //"Move axis" - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("調平熱床"); //"Bed leveling" - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("調平熱床"); //"Level bed" + PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("自定預熱"); // "Preheat Custom" + PROGMEM Language_Str MSG_COOLDOWN = _UxGT("降溫"); // "Cooldown" + PROGMEM Language_Str MSG_LASER_MENU = _UxGT("激光控制"); // "Laser Control" + PROGMEM Language_Str MSG_LASER_POWER = _UxGT("激光電源"); // "Laser Power" + PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("主軸控告制"); // "Spindle Control" + PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("主軸電源"); // "Spindle Power" + PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("主軸反轉"); // "Spindle Reverse" + PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("電源打開"); // "Switch power on" + PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("電源關閉"); // "Switch power off" + PROGMEM Language_Str MSG_EXTRUDE = _UxGT("擠出"); // "Extrude" + PROGMEM Language_Str MSG_RETRACT = _UxGT("回縮"); // "Retract" + PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移動軸"); // "Move axis" + PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("調平熱床"); // "Bed leveling" + PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("調平熱床"); // "Level bed" PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("調平邊角"); // "Bed Tramming" PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("下個邊角"); // "Next corner" - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("網格編輯器"); //"Mesh Editor" + PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("網格編輯器"); // "Mesh Editor" PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("編輯網格"); // "Edit Mesh" PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("網格編輯已停止"); // "Mesh Editing Stopped" - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("探測點"); //"Probing Point" - PROGMEM Language_Str MSG_MESH_X = _UxGT("索引 X"); //"Index X" - PROGMEM Language_Str MSG_MESH_Y = _UxGT("索引 Y"); //"Index Y" - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z 值"); //"Z Value" + PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("探測點"); // "Probing Point" + PROGMEM Language_Str MSG_MESH_X = _UxGT("索引 X"); // "Index X" + PROGMEM Language_Str MSG_MESH_Y = _UxGT("索引 Y"); // "Index Y" + PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z 值"); // "Z Value" PROGMEM Language_Str MSG_CUSTOM_COMMANDS = _UxGT("自定命令"); // "Custom Commands" - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 探測測試"); //"M48 Probe Test" - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 探測點"); //"M48 Point" - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("偏差"); //"Deviation" + PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 探測測試"); // "M48 Probe Test" + PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 探測點"); // "M48 Point" + PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("偏差"); // "Deviation" PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX Mode"); PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Tool Offsets"); PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); @@ -123,7 +123,7 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("執行G29"); // "Doing G29" PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL工具"); // "UBL Tools" PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("統一熱床調平(UBL)"); // "Unified Bed Leveling" - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("傾斜點"); //"Tilting Point" + PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("傾斜點"); // "Tilting Point" PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("手工建網"); // "Manually Build Mesh" PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("放置墊片並測量"); // "Place shim & measure" PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("測量"); // "Measure" @@ -132,9 +132,9 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("啟動UBL"); // "Activate UBL" PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("關閉UBL"); // "Deactivate UBL" PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("置設熱床溫度"); // "Bed Temp" - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("置設熱床溫度"); //"Bed Temp") + PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("置設熱床溫度"); // "Bed Temp") PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("置設噴嘴溫度"); // "Hotend Temp" - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("熱端溫度"); //"Hotend Temp" + PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("熱端溫度"); // "Hotend Temp" PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("網格編輯"); // "Mesh Edit" PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("編輯客戶網格"); // "Edit Custom Mesh" PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("細調網格"); // "Fine Tuning Mesh" @@ -150,13 +150,13 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("高度合計"); // "Height Amount" PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("批准網格"); // "Validate Mesh" PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("批准客戶網格"); // "Validate Custom Mesh" - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 加熱熱床"); //"G26 Heating Bed" + PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 加熱熱床"); // "G26 Heating Bed" PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 加熱噴嘴"); //"G26 Heating Nozzle" - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("手動填裝"); //"Manual priming..." - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("固定距離填裝"); //"Fixed Length Prime" - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("完成填裝"); //"Done Priming" - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26已取消"); //"G26 Canceled" - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("離開 G26"); //"Leaving G26" + PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("手動填裝"); // "Manual priming..." + PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("固定距離填裝"); // "Fixed Length Prime" + PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("完成填裝"); // "Done Priming" + PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26已取消"); // "G26 Canceled" + PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("離開 G26"); // "Leaving G26" PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("繼續熱床網格"); // "Continue Bed Mesh" PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("網格調平"); // "Mesh Leveling" PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("三點調平"); // "3-Point Leveling" @@ -186,7 +186,7 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("沒有存儲"); // "No storage" PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("錯誤: UBL保存"); // "Err: UBL Save" PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("錯誤: UBL還原"); // "Err: UBL Restore" - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-偏移:"); //"Z-Offset: " + PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-偏移:"); // "Z-Offset: " PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z偏移已停止"); // "Z-Offset Stopped" PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("一步步UBL"); // "Step-By-Step UBL" PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. 創設冷網格"); @@ -218,148 +218,160 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_MOVING = _UxGT("移動 ..."); // "Moving...") PROGMEM Language_Str MSG_FREE_XY = _UxGT("釋放 XY"); // "Free XY") - PROGMEM Language_Str MSG_MOVE_X = _UxGT("移動X"); //"Move X" - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("移動Y"); //"Move Y" - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("移動Z"); //"Move Z" - PROGMEM Language_Str MSG_MOVE_E = _UxGT("擠出機"); //"Extruder" - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("擠出機 *"); //"Extruder *" - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("噴嘴溫度不夠"); //"Hotend too cold" - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("移動 %s mm"); //"Move 0.025mm" - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("移動 0.1 mm"); //"Move 0.1mm" - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("移動 1 mm"); //"Move 1mm" - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("移動 10 mm"); //"Move 10mm" - PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("移動 100 mm"); //"Move 100mm" - PROGMEM Language_Str MSG_SPEED = _UxGT("速率"); //"Speed" - PROGMEM Language_Str MSG_BED_Z = _UxGT("熱床Z"); //"Bed Z" - PROGMEM Language_Str MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" 噴嘴"); //"Nozzle" 噴嘴 + PROGMEM Language_Str MSG_MOVE_X = _UxGT("移動X"); // "Move X" + PROGMEM Language_Str MSG_MOVE_Y = _UxGT("移動Y"); // "Move Y" + PROGMEM Language_Str MSG_MOVE_Z = _UxGT("移動Z"); // "Move Z" + PROGMEM Language_Str MSG_MOVE_E = _UxGT("擠出機"); // "Extruder" + PROGMEM Language_Str MSG_MOVE_EN = _UxGT("擠出機 *"); // "Extruder *" + PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("噴嘴溫度不夠"); // "Hotend too cold" + PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("移動 %s mm"); // "Move 0.025mm" + PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("移動 0.1 mm"); // "Move 0.1mm" + PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("移動 1 mm"); // "Move 1mm" + PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("移動 10 mm"); // "Move 10mm" + PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("移動 100 mm"); // "Move 100mm" + PROGMEM Language_Str MSG_SPEED = _UxGT("速率"); // "Speed" + PROGMEM Language_Str MSG_BED_Z = _UxGT("熱床Z"); // "Bed Z" + PROGMEM Language_Str MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" 噴嘴"); // "Nozzle" 噴嘴 PROGMEM Language_Str MSG_NOZZLE_N = " " LCD_STR_THERMOMETER _UxGT(" 噴嘴 ~"); - PROGMEM Language_Str MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" 熱床"); //"Bed" + PROGMEM Language_Str MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" 熱床"); // "Bed" PROGMEM Language_Str MSG_CHAMBER = _UxGT("Enclosure"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("風扇速率"); //"Fan speed" + PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("風扇速率"); // "Fan speed" PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("風扇速率 ="); PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ="); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("額外風扇速率"); // "Extra fan speed" PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("額外風扇速率 ="); PROGMEM Language_Str MSG_FLOW = _UxGT("擠出速率"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("擠出速率 ~"); //"Flow" - PROGMEM Language_Str MSG_CONTROL = _UxGT("控制"); //"Control" - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); //" " LCD_STR_THERMOMETER " Min" - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); //" " LCD_STR_THERMOMETER " Max" - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 系數"); //" " LCD_STR_THERMOMETER " Fact" - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("自動控溫"); //"Autotemp" - PROGMEM Language_Str MSG_LCD_ON = _UxGT("開 "); //"On" - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("關 "); //"Off" + PROGMEM Language_Str MSG_FLOW_N = _UxGT("擠出速率 ~"); // "Flow" + PROGMEM Language_Str MSG_CONTROL = _UxGT("控制"); // "Control" + PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); // " " LCD_STR_THERMOMETER " Min" + PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); // " " LCD_STR_THERMOMETER " Max" + PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 系數"); // " " LCD_STR_THERMOMETER " Fact" + PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("自動控溫"); // "Autotemp" + PROGMEM Language_Str MSG_LCD_ON = _UxGT("開 "); // "On" + PROGMEM Language_Str MSG_LCD_OFF = _UxGT("關 "); // "Off" - PROGMEM Language_Str MSG_SELECT = _UxGT("選擇"); //"Select" + PROGMEM Language_Str MSG_SELECT = _UxGT("選擇"); // "Select" PROGMEM Language_Str MSG_SELECT_E = _UxGT("選擇 *"); - PROGMEM Language_Str MSG_ACC = _UxGT("加速度"); //"Accel" acceleration - PROGMEM Language_Str MSG_JERK = _UxGT("抖動速率"); //"Jerk" - PROGMEM Language_Str MSG_VA_JERK = _UxGT("軸抖動速率") LCD_STR_A; //"Va-jerk" - PROGMEM Language_Str MSG_VB_JERK = _UxGT("軸抖動速率") LCD_STR_B; //"Vb-jerk" - PROGMEM Language_Str MSG_VC_JERK = _UxGT("軸抖動速率") LCD_STR_C; //"Vc-jerk" - PROGMEM Language_Str MSG_VE_JERK = _UxGT("擠出機抖動速率"); //"Ve-jerk" + PROGMEM Language_Str MSG_ACC = _UxGT("加速度"); // "Accel" acceleration + PROGMEM Language_Str MSG_JERK = _UxGT("抖動速率"); // "Jerk" + PROGMEM Language_Str MSG_VA_JERK = _UxGT("軸抖動速率") LCD_STR_A; // "Va-jerk" + PROGMEM Language_Str MSG_VB_JERK = _UxGT("軸抖動速率") LCD_STR_B; + PROGMEM Language_Str MSG_VC_JERK = _UxGT("軸抖動速率") LCD_STR_C; + PROGMEM Language_Str MSG_VI_JERK = _UxGT("軸抖動速率") LCD_STR_I; + PROGMEM Language_Str MSG_VJ_JERK = _UxGT("軸抖動速率") LCD_STR_J; + PROGMEM Language_Str MSG_VK_JERK = _UxGT("軸抖動速率") LCD_STR_K; + PROGMEM Language_Str MSG_VE_JERK = _UxGT("擠出機抖動速率"); PROGMEM Language_Str MSG_VELOCITY = _UxGT("速度"); // "Velocity" - PROGMEM Language_Str MSG_VMAX_A = _UxGT("最大進料速率") LCD_STR_A; //"Vmax " max_feedrate_mm_s + PROGMEM Language_Str MSG_VMAX_A = _UxGT("最大進料速率") LCD_STR_A; // "Vmax " max_feedrate_mm_s PROGMEM Language_Str MSG_VMAX_B = _UxGT("最大進料速率") LCD_STR_B; PROGMEM Language_Str MSG_VMAX_C = _UxGT("最大進料速率") LCD_STR_C; + PROGMEM Language_Str MSG_VMAX_I = _UxGT("最大進料速率") LCD_STR_I; + PROGMEM Language_Str MSG_VMAX_J = _UxGT("最大進料速率") LCD_STR_J; + PROGMEM Language_Str MSG_VMAX_K = _UxGT("最大進料速率") LCD_STR_K; PROGMEM Language_Str MSG_VMAX_E = _UxGT("最大進料速率") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("最大進料速率 *"); //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMIN = _UxGT("最小進料速率"); //"Vmin" min_feedrate_mm_s - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("最小移動速率"); //"VTrav min" min_travel_feedrate_mm_s, (target) speed of the move + PROGMEM Language_Str MSG_VMAX_EN = _UxGT("最大進料速率 *"); // "Vmax " max_feedrate_mm_s + PROGMEM Language_Str MSG_VMIN = _UxGT("最小進料速率"); // "Vmin" min_feedrate_mm_s + PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("最小移動速率"); // "VTrav min" min_travel_feedrate_mm_s, (target) speed of the move PROGMEM Language_Str MSG_ACCELERATION = _UxGT("加速度"); // "Acceleration" - PROGMEM Language_Str MSG_AMAX_A = _UxGT("最大列印加速度") LCD_STR_A; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves + PROGMEM Language_Str MSG_AMAX_A = _UxGT("最大列印加速度") LCD_STR_A; // "Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves PROGMEM Language_Str MSG_AMAX_B = _UxGT("最大列印加速度") LCD_STR_B; PROGMEM Language_Str MSG_AMAX_C = _UxGT("最大列印加速度") LCD_STR_C; + PROGMEM Language_Str MSG_AMAX_I = _UxGT("最大列印加速度") LCD_STR_I; + PROGMEM Language_Str MSG_AMAX_J = _UxGT("最大列印加速度") LCD_STR_J; + PROGMEM Language_Str MSG_AMAX_K = _UxGT("最大列印加速度") LCD_STR_K; PROGMEM Language_Str MSG_AMAX_E = _UxGT("最大列印加速度") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("最大列印加速度 *"); //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("回縮加速度"); //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("非列印移動加速度"); //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("軸步數/mm"); //"Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("軸步數/mm"); //"Asteps/mm" axis_steps_per_mm, axis steps-per-unit G92 - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("軸步數/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("軸步數/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("擠出機步數/mm"); //"Esteps/mm" + PROGMEM Language_Str MSG_AMAX_EN = _UxGT("最大列印加速度 *"); // "Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves + PROGMEM Language_Str MSG_A_RETRACT = _UxGT("回縮加速度"); // "A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts + PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("非列印移動加速度"); // "A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves + PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("軸步數/mm"); // "Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 + PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" 軸步數/mm"); // "Asteps/mm" axis_steps_per_mm, axis steps-per-unit G92 + PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" 軸步數/mm"); + PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" 軸步數/mm"); + PROGMEM Language_Str MSG_I_STEPS = LCD_STR_I _UxGT(" 軸步數/mm"); + PROGMEM Language_Str MSG_J_STEPS = LCD_STR_J _UxGT(" 軸步數/mm"); + PROGMEM Language_Str MSG_K_STEPS = LCD_STR_K _UxGT(" 軸步數/mm"); + PROGMEM Language_Str MSG_E_STEPS = _UxGT("擠出機步數/mm"); // "Esteps/mm" PROGMEM Language_Str MSG_EN_STEPS = _UxGT("擠出機~步數/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("溫度"); //"Temperature" - PROGMEM Language_Str MSG_MOTION = _UxGT("運作"); //"Motion" - PROGMEM Language_Str MSG_FILAMENT = _UxGT("絲料測容"); //"Filament" menu_control_volumetric - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("測容積mm") SUPERSCRIPT_THREE; //"E in mm3" volumetric_enabled - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("絲料直徑"); //"Fil. Dia." + PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("溫度"); // "Temperature" + PROGMEM Language_Str MSG_MOTION = _UxGT("運作"); // "Motion" + PROGMEM Language_Str MSG_FILAMENT = _UxGT("絲料測容"); // "Filament" menu_control_volumetric + PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("測容積mm") SUPERSCRIPT_THREE; // "E in mm3" volumetric_enabled + PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("絲料直徑"); // "Fil. Dia." PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("絲料直徑 *"); PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("卸載 mm"); // "Unload mm" PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("装載 mm"); // "Load mm" PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD對比度"); //"LCD contrast" - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("保存設置"); //"Store memory" - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("載入設置"); //"Load memory" - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("恢復安全值"); //"Restore failsafe" + PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD對比度"); // "LCD contrast" + PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("保存設置"); // "Store memory" + PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("載入設置"); // "Load memory" + PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("恢復安全值"); // "Restore failsafe" PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("初始化設置"); // "Initialize EEPROM" - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("錯誤: EEPROM CRC"); //"Err: EEPROM CRC" - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("錯誤: EEPROM Index"); //"Err: EEPROM Index" - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("錯誤: EEPROM Version"); //"EEPROM Version" - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("媒體更新"); //"Media Update" - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("重置打印機"); //"Reset Printer - PROGMEM Language_Str MSG_REFRESH = _UxGT("刷新"); //"Refresh" - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("資訊界面"); //"Info screen" - PROGMEM Language_Str MSG_PREPARE = _UxGT("準備"); //"Prepare" - PROGMEM Language_Str MSG_TUNE = _UxGT("調整"); //"Tune" - PROGMEM Language_Str MSG_START_PRINT = _UxGT("開始列印"); //"Start Print" - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("下一個"); //"Next" - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("初始 "); //"Init" - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("停止 "); //"Stop" - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("列印 "); //"Print" - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("復歸 "); //"Reset" - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("放棄 "); //"Cancel" - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("確認 "); //"Done" - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("返回 "); //"Back" - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("繼續 "); //"Proceed" - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("暫停列印"); //"Pause print" - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("恢復列印"); //"Resume print" - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("停止列印"); //"Stop print" - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("列印物件"); //"Printing Object" - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("中止物件"); //"Cancel Object" - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("中止物件 ="); //"Cancel Object =" - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("中斷恢復"); //"Outage Recovery" - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("從記憶卡上列印"); //"Print from SD" - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("無記憶卡"); //"No SD card" - PROGMEM Language_Str MSG_DWELL = _UxGT("休眠 ..."); //"Sleep..." - PROGMEM Language_Str MSG_USERWAIT = _UxGT("點擊繼續 ..."); //"Click to resume..." + PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("錯誤: EEPROM CRC"); // "Err: EEPROM CRC" + PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("錯誤: EEPROM Index"); // "Err: EEPROM Index" + PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("錯誤: EEPROM Version"); // "EEPROM Version" + PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("媒體更新"); // "Media Update" + PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("重置打印機"); // "Reset Printer + PROGMEM Language_Str MSG_REFRESH = _UxGT("刷新"); // "Refresh" + PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("資訊界面"); // "Info screen" + PROGMEM Language_Str MSG_PREPARE = _UxGT("準備"); // "Prepare" + PROGMEM Language_Str MSG_TUNE = _UxGT("調整"); // "Tune" + PROGMEM Language_Str MSG_START_PRINT = _UxGT("開始列印"); // "Start Print" + PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("下一個"); // "Next" + PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("初始 "); // "Init" + PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("停止 "); // "Stop" + PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("列印 "); // "Print" + PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("復歸 "); // "Reset" + PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("放棄 "); // "Cancel" + PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("確認 "); // "Done" + PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("返回 "); // "Back" + PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("繼續 "); // "Proceed" + PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("暫停列印"); // "Pause print" + PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("恢復列印"); // "Resume print" + PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("停止列印"); // "Stop print" + PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("列印物件"); // "Printing Object" + PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("中止物件"); // "Cancel Object" + PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("中止物件 ="); // "Cancel Object =" + PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("中斷恢復"); // "Outage Recovery" + PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("從記憶卡上列印"); // "Print from SD" + PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("無記憶卡"); // "No SD card" + PROGMEM Language_Str MSG_DWELL = _UxGT("休眠 ..."); // "Sleep..." + PROGMEM Language_Str MSG_USERWAIT = _UxGT("點擊繼續 ..."); // "Click to resume..." PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("列印已暫停"); // "Print paused" - PROGMEM Language_Str MSG_PRINTING = _UxGT("列印中 ..."); //"Printing..." - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("已取消列印"); //"Print aborted" - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("無移動"); //"No move." - PROGMEM Language_Str MSG_KILLED = _UxGT("已砍掉"); //"KILLED. " - PROGMEM Language_Str MSG_STOPPED = _UxGT("已停止"); //"STOPPED. " - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("回縮長度mm"); //"Retract mm" retract_length, retract length (positive mm) - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("換手回抽長度mm"); //"Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("回縮速率mm/s"); //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); //"Hop mm" retract_zraise, retract Z-lift - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("回縮恢復長度mm"); //"UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("換手回縮恢復長度mm"); //"S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回縮恢復後進料速率mm/s"); //"Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) + PROGMEM Language_Str MSG_PRINTING = _UxGT("列印中 ..."); // "Printing..." + PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("已取消列印"); // "Print aborted" + PROGMEM Language_Str MSG_NO_MOVE = _UxGT("無移動"); // "No move." + PROGMEM Language_Str MSG_KILLED = _UxGT("已砍掉"); // "KILLED. " + PROGMEM Language_Str MSG_STOPPED = _UxGT("已停止"); // "STOPPED. " + PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("回縮長度mm"); // "Retract mm" retract_length, retract length (positive mm) + PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("換手回抽長度mm"); // "Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change + PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("回縮速率mm/s"); // "Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) + PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); // "Hop mm" retract_zraise, retract Z-lift + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("回縮恢復長度mm"); // "UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("換手回縮恢復長度mm"); // "S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) + PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回縮恢復後進料速率mm/s"); // "Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); // "S UnRet V" - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("自動回縮"); //"Auto-Retract" autoretract_enabled, - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("交換長度"); //"Swap Length" - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("清除長度"); //"Purge Length" + PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("自動回縮"); // "Auto-Retract" autoretract_enabled, + PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("交換長度"); // "Swap Length" + PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("清除長度"); // "Purge Length" PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("交換工具"); //"Tool Change" - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z軸提昇"); //"Z Raise" - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("最高速度"); //"Prime Speed" - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("收回速度"); //"Retract Speed" + PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z軸提昇"); // "Z Raise" + PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("最高速度"); // "Prime Speed" + PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("收回速度"); // "Retract Speed" PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("噴嘴待機"); //"Nozzle Standby" - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("更換絲料"); //"Change filament" + PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("更換絲料"); // "Change filament" PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("更換絲料 *"); PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("裝載絲料"); // "Load filament" PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("裝載絲料 *"); PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("卸載絲料"); // "Unload filament" PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("卸載絲料 *"); // "Unload filament" PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("卸載全部"); // "Unload All" - PROGMEM Language_Str MSG_INIT_MEDIA = _UxGT("初始化記憶卡"); //"Init. SD card" - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("連接記憶卡"); //"Attach Media - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("更換記憶卡"); //"Change SD card" - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("釋放媒體"); //"Release Media" - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z探針在熱床之外"); //"Z probe out. bed" Z probe is not within the physical limits + PROGMEM Language_Str MSG_INIT_MEDIA = _UxGT("初始化記憶卡"); // "Init. SD card" + PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("連接記憶卡"); // "Attach Media + PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("更換記憶卡"); // "Change SD card" + PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("釋放媒體"); // "Release Media" + PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z探針在熱床之外"); // "Z probe out. bed" Z probe is not within the physical limits PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("偏斜因數"); // "Skew Factor" PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch 自檢"); // "BLTouch Self-Test" @@ -367,39 +379,39 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("裝載BLTouch"); // "Stow BLTouch" PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("部署BLTouch"); // "Deploy BLTouch" - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("歸位 %s%s%s 先"); //"Home ... first" + PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("歸位 %s%s%s 先"); // "Home ... first" PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("探針偏移"); //Probe Offsets PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("探針X偏移量"); //Probe X Offset PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("探針Y偏移量"); //Probe Y Offset PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("探針Z偏移量"); //Probe Z Offset - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("微量調整X軸"); //"Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("微量調整Y軸"); //"Babystep Y" - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("微量調整Z軸"); //"Babystep Z" - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("總計"); //"Total" - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("擋塊終止"); //"Endstop abort" - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("加熱失敗"); //"Heating failed" - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("錯誤:冗餘溫度"); //"Err: REDUNDANT TEMP" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("溫度失控"); //"THERMAL RUNAWAY" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("熱床溫度失控"); //"BED THERMAL RUNAWAY" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("機箱溫度失控"); //"CHAMBER T. RUNAWAY" - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("錯誤:最高溫度"); //"Err: MAXTEMP" - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("錯誤:最低溫度"); //"Err: MINTEMP" - PROGMEM Language_Str MSG_HALTED = _UxGT("印表機停機"); //"PRINTER HALTED" - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("請重置"); //"Please reset" - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("天"); //"d" // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("時"); //"h" // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("分"); //"m" // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("加熱中 ..."); //"Heating..." - PROGMEM Language_Str MSG_COOLING = _UxGT("冷卻中 ..."); //"Cooling..." - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("加熱熱床中 ..."); //"Bed Heating..." - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("熱床冷卻中 ..."); //"Bed Cooling..." - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("機箱加熱中 .."); //"Chamber Heating..." + PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("微量調整X軸"); // "Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts + PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("微量調整Y軸"); // "Babystep Y" + PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("微量調整Z軸"); // "Babystep Z" + PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("總計"); // "Total" + PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("擋塊終止"); // "Endstop abort" + PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("加熱失敗"); // "Heating failed" + PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("錯誤:冗餘溫度"); // "Err: REDUNDANT TEMP" + PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("溫度失控"); // "THERMAL RUNAWAY" + PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("熱床溫度失控"); // "BED THERMAL RUNAWAY" + PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("機箱溫度失控"); // "CHAMBER T. RUNAWAY" + PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("錯誤:最高溫度"); // "Err: MAXTEMP" + PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("錯誤:最低溫度"); // "Err: MINTEMP" + PROGMEM Language_Str MSG_HALTED = _UxGT("印表機停機"); // "PRINTER HALTED" + PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("請重置"); // "Please reset" + PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("天"); // "d" // One character only + PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("時"); // "h" // One character only + PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("分"); // "m" // One character only + PROGMEM Language_Str MSG_HEATING = _UxGT("加熱中 ..."); // "Heating..." + PROGMEM Language_Str MSG_COOLING = _UxGT("冷卻中 ..."); // "Cooling..." + PROGMEM Language_Str MSG_BED_HEATING = _UxGT("加熱熱床中 ..."); // "Bed Heating..." + PROGMEM Language_Str MSG_BED_COOLING = _UxGT("熱床冷卻中 ..."); // "Bed Cooling..." + PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("機箱加熱中 .."); // "Chamber Heating..." PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("機箱冷卻中 ..."); //Chamber Cooling... - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("⊿校準"); //"Delta Calibration" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("⊿校準X"); //"Calibrate X" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校準Y"); //"Calibrate Y" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校準Z"); //"Calibrate Z" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校準中心"); //"Calibrate Center" + PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("⊿校準"); // "Delta Calibration" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("⊿校準X"); // "Calibrate X" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校準Y"); // "Calibrate Y" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校準Z"); // "Calibrate Z" + PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校準中心"); // "Calibrate Center" PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("⊿設置"); // "Delta Settings" PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("⊿自動校準"); // "Auto Calibration" PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("設置⊿高度"); // "Set Delta Height" @@ -407,61 +419,63 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("⊿斜柱"); // "Diag Rod" PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("⊿高度"); // "Height" PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("⊿半徑"); // "Radius" - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("關於印表機"); //"About Printer" - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("印表機訊息"); //"Printer Info" + PROGMEM Language_Str MSG_INFO_MENU = _UxGT("關於印表機"); // "About Printer" + PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("印表機訊息"); // "Printer Info" PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("三點調平"); // "3-Point Leveling" PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("線性調平"); // "Linear Leveling" PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT(" 雙線性調平"); // "Bilinear Leveling" PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("統一熱床調平(UBL)"); // "Unified Bed Leveling" PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("網格調平"); // "Mesh Leveling" - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("印表機統計"); //"Printer Stats" - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("主板訊息"); //"Board Info" - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("溫度計"); //"Thermistors" - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT(" 擠出機"); //"Extruders" - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("傳輸率"); //"Baud" - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("協議"); //"Protocol" - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("監測溫度失控:關"); //"Runaway Watch: OFF" - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("監測溫度失控:開"); //"Runaway Watch: ON" + PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("印表機統計"); // "Printer Stats" + PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("主板訊息"); // "Board Info" + PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("溫度計"); // "Thermistors" + PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT(" 擠出機"); // "Extruders" + PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("傳輸率"); // "Baud" + PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("協議"); // "Protocol" + PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("監測溫度失控:關"); // "Runaway Watch: OFF" + PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("監測溫度失控:開"); // "Runaway Watch: ON" PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("外殼燈"); // "Case light" PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("燈亮度"); // "Light BRIGHTNESS" PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("打印機不正確"); // "The printer is incorrect" #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("列印計數"); //"Print Count" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("已完成"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("總列印時間"); //"Total print time" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最長工作時間"); //"Longest job time" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("總計擠出"); //"Extruded total" + PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("列印計數"); // "Print Count" + PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("已完成"); // "Completed" + PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("總列印時間"); // "Total print time" + PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最長工作時間"); // "Longest job time" + PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("總計擠出"); // "Extruded total" #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("列印數"); //"Prints" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("總共"); //"Total" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最長"); //"Longest" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("已擠出"); //"Extruded" + PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("列印數"); // "Prints" + PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); // "Completed" + PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("總共"); // "Total" + PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最長"); // "Longest" + PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("已擠出"); // "Extruded" #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("最低溫度"); //"Min Temp" - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("最高溫度"); //"Max Temp" - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("電源供應"); //"Power Supply" + PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("最低溫度"); // "Min Temp" + PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("最高溫度"); // "Max Temp" + PROGMEM Language_Str MSG_INFO_PSU = _UxGT("電源供應"); // "Power Supply" PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("驅動力度"); // "Drive Strength" - PROGMEM Language_Str MSG_DAC_PERCENT = _UxGT("驅動 %"); // "Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X 驅動 %"); //X Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y 驅動 %"); //Y Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z 驅動 %"); //Z Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" 驅動 %"); // X Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" 驅動 %"); // Y Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" 驅動 %"); // Z Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" 驅動 %"); // I Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" 驅動 %"); // J Driver % + PROGMEM Language_Str MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" 驅動 %"); // K Driver % PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E 驅動 %"); //E Driver % - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC連接錯誤"); //"TMC CONNECTION ERROR" + PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC連接錯誤"); // "TMC CONNECTION ERROR" PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("保存驅動設置"); // "DAC EEPROM Write" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("更換絲料"); //"FILAMENT CHANGE" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("更換絲料"); // "FILAMENT CHANGE" PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("列印已暫停"); // "PRINT PAUSED" PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("裝載絲料"); // "LOAD FILAMENT" PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("卸載絲料"); // "UNLOAD FILAMENT" PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("恢複選項:"); // "RESUME OPTIONS:" PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("清除更多"); // "Purge more" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢復列印"); //"Resume print" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢復列印"); // "Resume print" PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" 噴嘴: "); // " Nozzle: " - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("斷絲偵測"); //"Runout Sensor" - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("絲距離mm"); //"Runout Dist mm" + PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("斷絲偵測"); // "Runout Sensor" + PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("絲距離mm"); // "Runout Dist mm" PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("歸原位失敗"); // "Homing failed" PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("探針探測失敗"); // "Probing failed" @@ -471,28 +485,28 @@ namespace Language_zh_TW { // #if LCD_HEIGHT >= 4 PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("按下按鈕", "恢復列印")); //"Press Button to resume print" - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); //"Parking..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("等待開始", "絲料", "變更")); //"Wait for start of the filament change" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("等待", "卸下絲料")); //"Wait for filament unload" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("插入絲料", "並按鍵", "繼續 ...")); //"Insert filament and press button to continue..." + PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); // "Parking..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("等待開始", "絲料", "變更")); // "Wait for start of the filament change" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("等待", "卸下絲料")); // "Wait for filament unload" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("插入絲料", "並按鍵", "繼續 ...")); // "Insert filament and press button to continue..." PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("按下按鈕", "加熱噴嘴.")); // "Press button to heat nozzle." PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("加熱噴嘴", "請等待 ...")); // "Heating nozzle Please wait..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("等待", "進料")); //"Wait for filament load" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("等待", "進料")); // "Wait for filament load" PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("等待", "絲料清除")); // "Wait for filament purge" PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("按下完成","絲料清除")); //"Press button to filament purge" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("等待列印", "恢復")); //"Wait for print to resume" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("等待列印", "恢復")); // "Wait for print to resume" #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("按下繼續..")); //"Click to continue" - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); //"Parking..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("請等待 ...")); //"Please wait..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入並點擊")); //"Insert and Click" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("按下加熱..")); //"Click to heat" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("加熱中 ...")); //"Heating..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); //"Ejecting..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("載入中 ...")); //"Loading..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("清除中 ...")); //"Purging..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("按下完成..")); //"Click to finish" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢復中 ...")); //"Resuming..." + PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("按下繼續..")); // "Click to continue" + PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); // "Parking..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("請等待 ...")); // "Please wait..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入並點擊")); // "Insert and Click" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("按下加熱..")); // "Click to heat" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("加熱中 ...")); // "Heating..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); // "Ejecting..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("載入中 ...")); // "Loading..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("清除中 ...")); // "Purging..." + PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("按下完成..")); // "Click to finish" + PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢復中 ...")); // "Resuming..." #endif // LCD_HEIGHT < 4 } diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 4ae38edf24ce..467aa9a4eb50 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -68,7 +68,7 @@ void menu_backlash(); START_MENU(); BACK_ITEM(MSG_ADVANCED_SETTINGS); #define EDIT_DAC_PERCENT(A) EDIT_ITEM(uint8, MSG_DAC_PERCENT_##A, &driverPercent[_AXIS(A)], 0, 100, []{ stepper_dac.set_current_percents(driverPercent); }) - LOGICAL_AXIS_CODE(EDIT_DAC_PERCENT(E), EDIT_DAC_PERCENT(X), EDIT_DAC_PERCENT(Y), EDIT_DAC_PERCENT(Z), EDIT_DAC_PERCENT(I), EDIT_DAC_PERCENT(J), EDIT_DAC_PERCENT(K)); + LOGICAL_AXIS_CODE(EDIT_DAC_PERCENT(E), EDIT_DAC_PERCENT(A), EDIT_DAC_PERCENT(B), EDIT_DAC_PERCENT(C), EDIT_DAC_PERCENT(I), EDIT_DAC_PERCENT(J), EDIT_DAC_PERCENT(K)); ACTION_ITEM(MSG_DAC_EEPROM_WRITE, stepper_dac.commit_eeprom); END_MENU(); } From 1903cc23c6a6a004b342503006ae9d51a5ea86c8 Mon Sep 17 00:00:00 2001 From: Fjederhaek Date: Sat, 21 Aug 2021 00:45:05 +0200 Subject: [PATCH 238/323] =?UTF-8?q?=F0=9F=90=9B=20Update=20H-bot=20/=20Cor?= =?UTF-8?q?e=20for=206-axis=20(#22600)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #19112 --- Marlin/src/module/planner.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 7bf672a85d60..e4649b9410f4 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2002,15 +2002,15 @@ bool Planner::_populate_block(block_t * const block, bool split_move, // Number of steps for each axis // See https://www.corexy.com/theory.html #if CORE_IS_XY - block->steps.set(ABS(da + db), ABS(da - db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + db), ABS(da - db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #elif CORE_IS_XZ - block->steps.set(ABS(da + dc), ABS(db), ABS(da - dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + dc), ABS(db), ABS(da - dc), ABS(di), ABS(dj), ABS(dk))); #elif CORE_IS_YZ - block->steps.set(ABS(da), ABS(db + dc), ABS(db - dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db + dc), ABS(db - dc), ABS(di), ABS(dj), ABS(dk))); #elif ENABLED(MARKFORGED_XY) - block->steps.set(ABS(da + db), ABS(db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + db), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #elif IS_SCARA - block->steps.set(ABS(da), ABS(db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #else // default non-h-bot planning block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); @@ -2208,6 +2208,17 @@ bool Planner::_populate_block(block_t * const block, bool split_move, if (block->steps.k) ENABLE_AXIS_K() ); #endif + #if EITHER(IS_CORE, MARKFORGED_XY) + #if LINEAR_AXES >= 4 + if (block->steps.i) ENABLE_AXIS_I(); + #endif + #if LINEAR_AXES >= 5 + if (block->steps.j) ENABLE_AXIS_J(); + #endif + #if LINEAR_AXES >= 6 + if (block->steps.k) ENABLE_AXIS_K(); + #endif + #endif // Enable extruder(s) #if HAS_EXTRUDERS From 0d854d332d10a2f8123eefa0f0d367b984de36b3 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 21 Aug 2021 00:55:55 +0000 Subject: [PATCH 239/323] [cron] Bump distribution date (2021-08-21) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index db5a6e15247e..21efff8495c6 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-20" +//#define STRING_DISTRIBUTION_DATE "2021-08-21" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index dcad270c26a1..abebd0742bbe 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-20" + #define STRING_DISTRIBUTION_DATE "2021-08-21" #endif /** From 104acd9e5997e16ad327340a205d6611517fa65e Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 21 Aug 2021 12:19:02 -0700 Subject: [PATCH 240/323] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20TMCStepper=200.7.3?= =?UTF-8?q?=20(#22608)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ini/features.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ini/features.ini b/ini/features.ini index b94c3fb9bcf6..2d2363ccd181 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -17,7 +17,7 @@ HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/L POSTMORTEM_DEBUGGING = src_filter=+ + build_flags=-funwind-tables MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/master.zip -HAS_TRINAMIC_CONFIG = TMCStepper@0.7.1 +HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.3 src_filter=+ + + + + HAS_STEALTHCHOP = src_filter=+ SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip From 2e3b13133159669ecb9682079f60972d0ff5b3c8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 21 Aug 2021 15:07:52 -0500 Subject: [PATCH 241/323] =?UTF-8?q?=F0=9F=8E=A8=20Tweak=20TMC=20software?= =?UTF-8?q?=20serial=20pins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 3 --- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 13 ++++----- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 6 ++--- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 17 +++++++----- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 3 +++ Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 4 --- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 11 +++----- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 13 ++++----- Marlin/src/pins/lpc1769/pins_FLY_CDY.h | 12 ++++----- Marlin/src/pins/lpc1769/pins_MKS_SGEN.h | 15 ++++++----- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 17 ++++++------ Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 4 ++- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 26 +++++++++--------- Marlin/src/pins/ramps/pins_FYSETC_F6_14.h | 17 +++++++----- Marlin/src/pins/ramps/pins_ORTUR_4.h | 21 +++++++-------- Marlin/src/pins/ramps/pins_RAMPS.h | 4 --- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 4 --- Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h | 4 --- Marlin/src/pins/samd/pins_RAMPS_144.h | 20 ++++++-------- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 11 +++----- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h | 11 +++----- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 23 +++++++++------- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 6 ++--- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 11 +++----- .../pins/stm32f1/pins_FYSETC_CHEETAH_V12.h | 3 --- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 6 ++--- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 4 --- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 3 --- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 4 --- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 3 --- Marlin/src/pins/stm32f4/pins_ARMED.h | 3 --- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 11 +++----- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 15 +++++------ Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 25 ++++++++--------- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 25 ++++++++--------- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 15 +++++------ .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 13 ++++----- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 19 +++++++------ Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 3 --- Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h | 1 - Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h | 27 ++++++++++++------- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 12 ++++----- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 16 +++++------ .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 10 +++---- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 14 ++++------ Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h | 3 --- Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 10 +++---- Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h | 13 ++++----- 48 files changed, 235 insertions(+), 299 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 42c6f4d0299b..b922f057f1e5 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -164,9 +164,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN P4_29 #define X_SERIAL_RX_PIN P1_17 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 43e954a4f1b0..2c9e608e496f 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -220,23 +220,20 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN P1_10 - #define X_SERIAL_RX_PIN P1_10 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P1_09 - #define Y_SERIAL_RX_PIN P1_09 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P1_08 - #define Z_SERIAL_RX_PIN P1_08 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P1_04 - #define E0_SERIAL_RX_PIN P1_04 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN P1_01 - #define E1_SERIAL_RX_PIN P1_01 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index cb3d3242e28c..9e04fc047954 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -172,7 +172,7 @@ #define E2_CS_PIN EXP1_05_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_05_PIN - #define E2_SERIAL_RX_PIN EXP1_05_PIN + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif #endif @@ -185,7 +185,7 @@ #define E3_CS_PIN EXP1_07_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_07_PIN - #define E3_SERIAL_RX_PIN EXP1_07_PIN + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #endif #else #define E3_ENABLE_PIN EXP2_04_PIN @@ -200,7 +200,7 @@ #define E4_CS_PIN EXP1_09_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_09_PIN - #define E4_SERIAL_RX_PIN EXP1_09_PIN + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif #else #define E4_ENABLE_PIN EXP2_04_PIN diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index 1ec1131b45ff..1feaeb13b5d6 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -82,17 +82,22 @@ // #if HAS_TMC_UART #define X_SERIAL_TX_PIN P1_00 - #define X_SERIAL_RX_PIN P1_00 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN P1_09 - #define Y_SERIAL_RX_PIN P1_09 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN P1_16 - #define Z_SERIAL_RX_PIN P1_16 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN P0_04 - #define E0_SERIAL_RX_PIN P0_04 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN P2_02 - #define E1_SERIAL_RX_PIN P2_02 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + #define E2_SERIAL_TX_PIN P2_06 - #define E2_SERIAL_RX_PIN P2_06 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index 44dbaacb7301..a2235dc28ad4 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -327,10 +327,13 @@ */ #define X_SERIAL_TX_PIN P1_22 // J8-2 #define X_SERIAL_RX_PIN P2_12 // J8-4 Interrupt Capable + #define Y_SERIAL_TX_PIN P1_23 // J8-3 #define Y_SERIAL_RX_PIN P2_11 // J8-5 Interrupt Capable + #define Z_SERIAL_TX_PIN P2_12 // J8-4 #define Z_SERIAL_RX_PIN P0_25 // TH3 + #define E0_SERIAL_TX_PIN P4_28 // J8-6 #define E0_SERIAL_RX_PIN P0_26 // TH4 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 8808c3a22806..449d9a93ce4e 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -163,10 +163,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN P1_04 #define X_SERIAL_RX_PIN P1_01 diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index fe7daa8cdafd..62127f5504b7 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -119,9 +119,6 @@ * If undefined software serial is used according to the pins below */ - // - // Software serial - // // P2_08 E1-Step // P2_13 E1-Dir @@ -130,28 +127,28 @@ #define X_SERIAL_TX_PIN P0_01 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN P0_01 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P0_00 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN P0_00 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P2_13 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN P2_13 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P2_08 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN P2_08 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index cecb44efbe18..44ceb9b7cc8f 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -129,23 +129,20 @@ * If undefined software serial is used according to the pins below */ - // - // Software serial - // #define X_SERIAL_TX_PIN P1_01 - #define X_SERIAL_RX_PIN P1_01 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P1_10 - #define Y_SERIAL_RX_PIN P1_10 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P1_17 - #define Z_SERIAL_RX_PIN P1_17 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P0_05 - #define E0_SERIAL_RX_PIN P0_05 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN P0_22 - #define E1_SERIAL_RX_PIN P0_22 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index b90443403ccb..535fb32e3ee0 100644 --- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -104,22 +104,22 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN P1_04 - #define X_SERIAL_RX_PIN P1_04 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P1_10 - #define Y_SERIAL_RX_PIN P1_10 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P1_16 - #define Z_SERIAL_RX_PIN P1_16 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P4_28 - #define E0_SERIAL_RX_PIN P4_28 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN P2_12 - #define E1_SERIAL_RX_PIN P2_12 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN P0_10 - #define E2_SERIAL_RX_PIN P0_10 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index ddfee63cd080..f5c158162cda 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -38,17 +38,20 @@ /** * TMC2208/TMC2209 stepper drivers */ - #define X_SERIAL_TX_PIN P1_22 // J8-2 - #define X_SERIAL_RX_PIN P1_22 // J8-2 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN P1_23 // J8-3 - #define Y_SERIAL_RX_PIN P1_23 // J8-3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN P2_12 // J8-4 - #define Z_SERIAL_RX_PIN P2_12 // J8-4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN P2_11 // J8-5 - #define E0_SERIAL_RX_PIN P2_11 // J8-5 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN P4_28 // J8-6 - #define E1_SERIAL_RX_PIN P4_28 // J8-6 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 7547279bbda3..ff7aa11dafed 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -173,19 +173,20 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN P1_01 - #define X_SERIAL_RX_PIN P1_01 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN P1_08 - #define Y_SERIAL_RX_PIN P1_08 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN P1_10 - #define Z_SERIAL_RX_PIN P1_10 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN P1_15 - #define E0_SERIAL_RX_PIN P1_15 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN P1_17 - #define E1_SERIAL_RX_PIN P1_17 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 4d725bc7d16a..e45f5dbd95e4 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -75,14 +75,16 @@ #if HAS_TMC_UART // // TMC220x stepper drivers - // Software serial // #define X_SERIAL_TX_PIN P0_04 #define X_SERIAL_RX_PIN P0_05 + #define Y_SERIAL_TX_PIN P0_10 #define Y_SERIAL_RX_PIN P0_11 + #define Z_SERIAL_TX_PIN P0_19 #define Z_SERIAL_RX_PIN P0_20 + #define E0_SERIAL_TX_PIN P0_22 #define E0_SERIAL_RX_PIN P0_21 diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 8756a3321806..9c6b74f1269d 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -124,42 +124,42 @@ * Software serial communication pins. * At the moment, F6 rx pins are not pc interrupt pins */ - #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN -1 // 71 - #endif #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 72 #endif - #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN -1 // 73 + #ifndef X_SERIAL_RX_PIN + #define X_SERIAL_RX_PIN -1 // 71 #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN 75 #endif - #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN -1 // 78 + #ifndef Y_SERIAL_RX_PIN + #define Y_SERIAL_RX_PIN -1 // 73 #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN 79 #endif - #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN -1 // 76 + #ifndef Z_SERIAL_RX_PIN + #define Z_SERIAL_RX_PIN -1 // 78 #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN 77 #endif - #ifndef E1_SERIAL_RX_PIN - #define E1_SERIAL_RX_PIN -1 // 80 + #ifndef E0_SERIAL_RX_PIN + #define E0_SERIAL_RX_PIN -1 // 76 #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN 81 #endif - #ifndef E2_SERIAL_RX_PIN - #define E2_SERIAL_RX_PIN -1 // 22 + #ifndef E1_SERIAL_RX_PIN + #define E1_SERIAL_RX_PIN -1 // 80 #endif #ifndef E2_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN 82 #endif + #ifndef E2_SERIAL_RX_PIN + #define E2_SERIAL_RX_PIN -1 // 22 + #endif #endif // diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h index 4280204b99d9..1fc24154b733 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h @@ -33,18 +33,23 @@ /** * TMC2208/TMC2209 stepper drivers */ - #define X_SERIAL_RX_PIN 72 #define X_SERIAL_TX_PIN 71 - #define Y_SERIAL_RX_PIN 73 + #define X_SERIAL_RX_PIN 72 + #define Y_SERIAL_TX_PIN 78 - #define Z_SERIAL_RX_PIN 75 + #define Y_SERIAL_RX_PIN 73 + #define Z_SERIAL_TX_PIN 79 - #define E0_SERIAL_RX_PIN 77 + #define Z_SERIAL_RX_PIN 75 + #define E0_SERIAL_TX_PIN 81 - #define E1_SERIAL_RX_PIN 76 + #define E0_SERIAL_RX_PIN 77 + #define E1_SERIAL_TX_PIN 80 - #define E2_SERIAL_RX_PIN 62 + #define E1_SERIAL_RX_PIN 76 + #define E2_SERIAL_TX_PIN 82 + #define E2_SERIAL_RX_PIN 62 #endif #include "pins_FYSETC_F6_13.h" diff --git a/Marlin/src/pins/ramps/pins_ORTUR_4.h b/Marlin/src/pins/ramps/pins_ORTUR_4.h index e79973e06f07..428279c92ab2 100644 --- a/Marlin/src/pins/ramps/pins_ORTUR_4.h +++ b/Marlin/src/pins/ramps/pins_ORTUR_4.h @@ -54,20 +54,19 @@ #define TEMP_0_PIN 15 // Analog Input #define TEMP_1_PIN 13 // Analog Input -// -// Software serial -// -#define X_SERIAL_TX_PIN 59 -#define X_SERIAL_RX_PIN 63 +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN 59 + #define X_SERIAL_RX_PIN 63 -#define Y_SERIAL_TX_PIN 64 -#define Y_SERIAL_RX_PIN 40 + #define Y_SERIAL_TX_PIN 64 + #define Y_SERIAL_RX_PIN 40 -#define Z_SERIAL_TX_PIN 44 -#define Z_SERIAL_RX_PIN 42 + #define Z_SERIAL_TX_PIN 44 + #define Z_SERIAL_RX_PIN 42 -#define E0_SERIAL_TX_PIN 66 -#define E0_SERIAL_RX_PIN 65 + #define E0_SERIAL_TX_PIN 66 + #define E0_SERIAL_RX_PIN 65 +#endif #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 2c271408b0c3..b141fdbf85dd 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -321,10 +321,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 40 #endif diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 57a9a560d35b..a43f10fc93cd 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -117,10 +117,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN -1 // 59 #define X_SERIAL_RX_PIN -1 // 63 #define X2_SERIAL_TX_PIN -1 diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index 26ad5fd6580a..feaa4ba98b95 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -213,10 +213,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 40 #endif diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index fbd9d7c86412..449ae0273e23 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -194,60 +194,56 @@ //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 47 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN 47 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #endif #ifndef X2_SERIAL_TX_PIN #define X2_SERIAL_TX_PIN -1 #endif #ifndef X2_SERIAL_RX_PIN - #define X2_SERIAL_RX_PIN -1 + #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN 45 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN 45 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #endif #ifndef Y2_SERIAL_TX_PIN #define Y2_SERIAL_TX_PIN -1 #endif #ifndef Y2_SERIAL_RX_PIN - #define Y2_SERIAL_RX_PIN -1 + #define Y2_SERIAL_RX_PIN Y2_SERIAL_TX_PIN #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN 32 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN 32 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #ifndef Z2_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN 22 #endif #ifndef Z2_SERIAL_RX_PIN - #define Z2_SERIAL_RX_PIN 22 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN 43 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN 43 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN -1 #endif #ifndef E1_SERIAL_RX_PIN - #define E1_SERIAL_RX_PIN -1 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 9b71570b0838..6ed2869141a2 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -120,20 +120,17 @@ //#define Z_HARDWARE_SERIAL MSerial1 //#define E0_HARDWARE_SERIAL MSerial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PC10 - #define X_SERIAL_RX_PIN PC10 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PC11 - #define Y_SERIAL_RX_PIN PC11 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC12 - #define Z_SERIAL_RX_PIN PC12 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD2 - #define E0_SERIAL_RX_PIN PD2 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h index 4951d697a72f..44d4f2343546 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h @@ -33,20 +33,17 @@ * TMC2208/TMC2209 stepper drivers */ #if HAS_TMC_UART - // - // Software serial - // #define X_SERIAL_TX_PIN PB15 - #define X_SERIAL_RX_PIN PB15 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PC6 - #define Y_SERIAL_RX_PIN PC6 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC10 - #define Z_SERIAL_RX_PIN PC10 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC11 - #define E0_SERIAL_RX_PIN PC11 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index dc8b8c50f160..7b61f55d4f19 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -84,15 +84,20 @@ #define E0_STEP_PIN PA6 #define E0_DIR_PIN PA5 -// Stepper drivers Serial UART -#define X_SERIAL_TX_PIN PB3 -#define X_SERIAL_RX_PIN PD2 -#define Y_SERIAL_TX_PIN PA15 -#define Y_SERIAL_RX_PIN PC6 -#define Z_SERIAL_TX_PIN PB11 -#define Z_SERIAL_RX_PIN PB10 -#define E0_SERIAL_TX_PIN PC5 -#define E0_SERIAL_RX_PIN PC4 +#if HAS_TMC_UART + // Stepper drivers Serial UART + #define X_SERIAL_TX_PIN PB3 + #define X_SERIAL_RX_PIN PD2 + + #define Y_SERIAL_TX_PIN PA15 + #define Y_SERIAL_RX_PIN PC6 + + #define Z_SERIAL_TX_PIN PB11 + #define Z_SERIAL_RX_PIN PB10 + + #define E0_SERIAL_TX_PIN PC5 + #define E0_SERIAL_RX_PIN PC4 +#endif // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 21bbd23ca9f6..f850b4a90b07 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -124,11 +124,11 @@ // SoftwareSerial with one pin per driver // Compatible with TMC2208 and TMC2209 drivers #define X_SERIAL_TX_PIN PA10 // RXD1 - #define X_SERIAL_RX_PIN PA10 // RXD1 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PA9 // TXD1 - #define Y_SERIAL_RX_PIN PA9 // TXD1 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC7 // IO1 - #define Z_SERIAL_RX_PIN PC7 // IO1 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define TMC_BAUD_RATE 19200 #else // Motor current PWM pins diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index be0a622b1d71..08efa9a04e1e 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -94,17 +94,14 @@ #endif #if HAS_TMC_UART - // - // Software serial - // #define X_SERIAL_TX_PIN PB0 - #define X_SERIAL_RX_PIN PB0 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PA7 - #define Y_SERIAL_RX_PIN PA7 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PA4 - #define Z_SERIAL_RX_PIN PA4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC2 - #define E0_SERIAL_RX_PIN PC2 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h index ba35265d10a0..120d6d6f0a7b 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h @@ -42,9 +42,6 @@ * TMC2208/TMC2209 stepper drivers */ - // - // Software serial - // #define X_SERIAL_TX_PIN PA11 #define X_SERIAL_RX_PIN PA12 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 889e1f5e07bf..29baeba934f1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -258,12 +258,12 @@ //#define TMC_SOFTWARE_SERIAL #if ENABLED(TMC_SOFTWARE_SERIAL) #define X_SERIAL_TX_PIN PF8 // SERVO3_PIN -- XS2 - 6 - #define Y_SERIAL_TX_PIN PF9 // SERVO2_PIN -- XS2 - 5 - #define Z_SERIAL_TX_PIN PA1 // SERVO1_PIN -- XS1 - 6 - #define E0_SERIAL_TX_PIN PC3 // SERVO0_PIN -- XS1 - 5 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN PF9 // SERVO2_PIN -- XS2 - 5 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN PA1 // SERVO1_PIN -- XS1 - 6 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN PC3 // SERVO0_PIN -- XS1 - 5 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define TMC_BAUD_RATE 19200 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index ba5198006512..2cfb71380d37 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -145,10 +145,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN PD5 #define X_SERIAL_RX_PIN PD5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 5a359328014e..c568e42df230 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -92,9 +92,6 @@ //#define Z_HARDWARE_SERIAL MSerial1 //#define E0_HARDWARE_SERIAL MSerial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PC7 #define X_SERIAL_RX_PIN PC7 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 49d5476fecda..e83bcb0a5c37 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -146,10 +146,6 @@ //#define E0_HARDWARE_SERIAL MSerial1 //#define E1_HARDWARE_SERIAL MSerial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN PD5 #define X_SERIAL_RX_PIN PD5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index d752d52a3a3e..1f3efee6e567 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -133,9 +133,6 @@ //#define E1_HARDWARE_SERIAL MSerial1 //#define E2_HARDWARE_SERIAL MSerial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PF7 #define X_SERIAL_RX_PIN PF8 diff --git a/Marlin/src/pins/stm32f4/pins_ARMED.h b/Marlin/src/pins/stm32f4/pins_ARMED.h index a67af089f20a..4d0369b044f2 100644 --- a/Marlin/src/pins/stm32f4/pins_ARMED.h +++ b/Marlin/src/pins/stm32f4/pins_ARMED.h @@ -204,9 +204,6 @@ #if HAS_TMC_UART // TMC2208/TMC2209 stepper drivers - // - // Software serial - // #define X_SERIAL_TX_PIN EXT0_PIN #define X_SERIAL_RX_PIN EXT0_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 2bfbb194270b..79a414d7d46b 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -137,20 +137,17 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial ## - // #define X_SERIAL_TX_PIN PE2 - #define X_SERIAL_RX_PIN PE2 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE4 - #define Z_SERIAL_RX_PIN PE4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD7 - #define E0_SERIAL_RX_PIN PD7 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index a806611c18fd..481c38f5152b 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -112,27 +112,24 @@ * TMC2208/TMC2209 stepper drivers */ #if HAS_TMC_UART - // - // Software serial - // #define X_SERIAL_TX_PIN PD6 - #define X_SERIAL_RX_PIN PD6 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD1 - #define Y_SERIAL_RX_PIN PD1 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD15 - #define Z_SERIAL_RX_PIN PD15 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD11 - #define E0_SERIAL_RX_PIN PD11 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define X2_SERIAL_TX_PIN FPC12_PIN // X2UART - #define X2_SERIAL_RX_PIN FPC12_PIN // X2UART + #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN FPC6_PIN // E1UART - #define E1_SERIAL_RX_PIN FPC6_PIN // E1UART + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index 3151a38ae8f9..fa49ff149558 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -239,42 +239,39 @@ //#define E6_HARDWARE_SERIAL Serial1 // M5 MOTOR 4 //#define E7_HARDWARE_SERIAL Serial1 // M5 MOTOR 5 - // - // Software serial - // #define X_SERIAL_TX_PIN PC14 - #define X_SERIAL_RX_PIN PC14 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE1 - #define Y_SERIAL_RX_PIN PE1 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB5 - #define Z_SERIAL_RX_PIN PB5 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PG10 - #define E0_SERIAL_RX_PIN PG10 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD4 - #define E1_SERIAL_RX_PIN PD4 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PC12 - #define E2_SERIAL_RX_PIN PC12 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #if ENABLED(M5_EXTENDER) #define E3_SERIAL_TX_PIN PG4 - #define E3_SERIAL_RX_PIN PG4 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PE15 - #define E4_SERIAL_RX_PIN PE15 + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PE7 - #define E5_SERIAL_RX_PIN PE7 + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #define E6_SERIAL_TX_PIN PF15 - #define E6_SERIAL_RX_PIN PF15 + #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #define E7_SERIAL_TX_PIN PH14 - #define E7_SERIAL_RX_PIN PH14 + #define E7_SERIAL_RX_PIN E7_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 25622bc62d87..92e7b5d3749c 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -282,32 +282,29 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PC4 - #define X_SERIAL_RX_PIN PC4 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD11 - #define Y_SERIAL_RX_PIN PD11 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC6 - #define Z_SERIAL_RX_PIN PC6 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN PC7 - #define Z2_SERIAL_RX_PIN PC7 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PF2 - #define E0_SERIAL_RX_PIN PF2 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PE4 - #define E1_SERIAL_RX_PIN PE4 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PE1 - #define E2_SERIAL_RX_PIN PE1 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PD3 - #define E3_SERIAL_RX_PIN PD3 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -387,7 +384,7 @@ #define E4_CS_PIN EXP1_05_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_05_PIN - #define E4_SERIAL_RX_PIN EXP1_05_PIN + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif // M2 on Driver Expansion Module @@ -398,7 +395,7 @@ #define E5_CS_PIN EXP1_07_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_07_PIN - #define E5_SERIAL_RX_PIN EXP1_07_PIN + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // M3 on Driver Expansion Module @@ -409,7 +406,7 @@ #define E6_CS_PIN EXP1_09_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_09_PIN - #define E6_SERIAL_RX_PIN EXP1_09_PIN + #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #endif #endif // BTT_MOTOR_EXPANSION diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index eb3ce730a696..e43cc4e5a066 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -204,26 +204,23 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PC13 - #define X_SERIAL_RX_PIN PC13 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE1 - #define Z_SERIAL_RX_PIN PE1 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD4 - #define E0_SERIAL_RX_PIN PD4 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD1 - #define E1_SERIAL_RX_PIN PD1 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD6 - #define E2_SERIAL_RX_PIN PD6 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index e5d6b6891b5b..dc2ee99affc2 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -267,23 +267,20 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PE0 - #define X_SERIAL_RX_PIN PE0 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD3 - #define Y_SERIAL_RX_PIN PD3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD0 - #define Z_SERIAL_RX_PIN PD0 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC6 - #define E0_SERIAL_RX_PIN PC6 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD12 - #define E1_SERIAL_RX_PIN PD12 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 77257f818a5b..728e7535439b 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -234,32 +234,31 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PG13 - #define X_SERIAL_RX_PIN PG13 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PG10 - #define Y_SERIAL_RX_PIN PG10 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD5 - #define Z_SERIAL_RX_PIN PD5 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD1 - #define E0_SERIAL_RX_PIN PD1 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PA14 - #define E1_SERIAL_RX_PIN PA14 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PG6 - #define E2_SERIAL_RX_PIN PG6 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PG3 - #define E3_SERIAL_RX_PIN PG3 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PD10 - #define E4_SERIAL_RX_PIN PD10 + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PB12 - #define E5_SERIAL_RX_PIN PB12 - + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 492383048e0d..986cd7feaa3f 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -118,9 +118,6 @@ // TMC2208/TMC2209 stepper drivers // - // - // Software serial - // #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN PE9 #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h index 641805d855a6..6f1c9be8f5b0 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h @@ -40,7 +40,6 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE8 #define Y_SERIAL_TX_PIN PC4 - #define Y_SERIAL_RX_PIN PC4 #define Z_SERIAL_TX_PIN PD12 #define E0_SERIAL_TX_PIN PA15 #define E1_SERIAL_TX_PIN PC5 diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h index e90ac552aef1..e05811552e2b 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h @@ -76,21 +76,28 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE7 - #define X_SERIAL_RX_PIN PE7 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define X2_SERIAL_TX_PIN PA15 + #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN PE15 - #define Y_SERIAL_RX_PIN PE15 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN PD10 - #define Z_SERIAL_RX_PIN PD10 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define Z2_SERIAL_TX_PIN PD11 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN PD7 - #define E0_SERIAL_RX_PIN PD7 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN PC14 - #define E1_SERIAL_RX_PIN PC14 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + #define E2_SERIAL_TX_PIN PC15 - #define E2_SERIAL_RX_PIN PC15 - #define X2_SERIAL_TX_PIN PA15 - #define X2_SERIAL_RX_PIN PA15 - #define Z2_SERIAL_TX_PIN PD11 - #define Z2_SERIAL_RX_PIN PD11 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif // diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 3b75e7072ad3..4adc2f65a2f2 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -118,37 +118,37 @@ #define X_SERIAL_TX_PIN PB2 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN PB2 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE2 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN PE2 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE3 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN PE3 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PE4 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN PE4 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PE1 #endif #ifndef E1_SERIAL_RX_PIN - #define E1_SERIAL_RX_PIN PE1 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif #ifndef EX_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PE0 #endif #ifndef EX_SERIAL_RX_PIN - #define E2_SERIAL_RX_PIN PE0 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index 5c6668562995..adc8b2a8bdb0 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -160,28 +160,28 @@ // No Hardware serial for steppers // #define X_SERIAL_TX_PIN PE6 - #define X_SERIAL_RX_PIN PE6 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB7 - #define Z_SERIAL_RX_PIN PB7 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PB3 - #define E0_SERIAL_RX_PIN PB3 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD4 - #define E1_SERIAL_RX_PIN PD4 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD0 - #define E2_SERIAL_RX_PIN PD0 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PD15 - #define E3_SERIAL_RX_PIN PD15 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PD11 - #define E4_SERIAL_RX_PIN PD11 + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 9193a8551171..8008310f5af9 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -134,19 +134,19 @@ // No Hardware serial for steppers // #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN PD5 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN PD7 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN PD4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN PD9 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD8 - #define E1_SERIAL_RX_PIN PD8 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index c2809c855329..a56889fc7e48 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -147,24 +147,20 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN PD5 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN PD7 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN PD4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN PD9 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD8 - #define E1_SERIAL_RX_PIN PD8 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h index 4dce7b79c019..0b539417d6d0 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h @@ -67,9 +67,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PA3 #define X_SERIAL_RX_PIN PC14 diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index 5e50548c9b5c..217664e5bc2b 100644 --- a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -130,16 +130,16 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB9 - #define X_SERIAL_RX_PIN PB9 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE12 - #define Z_SERIAL_RX_PIN PE12 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E_SERIAL_TX_PIN PG9 - #define E_SERIAL_RX_PIN PG9 + #define E0_SERIAL_TX_PIN PG9 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h index d85bbf7bed95..991c611a89f6 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h @@ -131,23 +131,20 @@ //#define E6_HARDWARE_SERIAL Serial1 //#define E7_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PG10 - #define X_SERIAL_RX_PIN PG10 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD4 - #define Y_SERIAL_RX_PIN PD4 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD5 - #define Z_SERIAL_RX_PIN PD5 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PI8 - #define E0_SERIAL_RX_PIN PI8 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PC8 - #define E1_SERIAL_RX_PIN PC8 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 From 536cf287a6f642aa3eccd290b421b0e3869f018a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 21 Aug 2021 18:00:55 -0500 Subject: [PATCH 242/323] =?UTF-8?q?=F0=9F=8E=A8=20Misc=20code=20and=20spac?= =?UTF-8?q?ing=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/serial.h | 2 +- Marlin/src/feature/mixing.cpp | 14 +++--- Marlin/src/feature/pause.cpp | 9 ++-- Marlin/src/feature/probe_temp_comp.cpp | 8 +--- Marlin/src/gcode/bedlevel/abl/G29.cpp | 4 +- Marlin/src/gcode/feature/camera/M240.cpp | 13 +----- .../src/gcode/feature/fwretract/G10_G11.cpp | 11 +---- Marlin/src/gcode/feature/pause/M701_M702.cpp | 4 +- Marlin/src/gcode/parser.h | 3 +- Marlin/src/gcode/queue.cpp | 12 +---- Marlin/src/inc/Version.h | 12 ++--- .../dogm/u8g_dev_tft_upscale_from_128x64.cpp | 4 +- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 2 +- Marlin/src/lcd/menu/menu_advanced.cpp | 4 +- Marlin/src/lcd/menu/menu_ubl.cpp | 4 +- Marlin/src/module/planner.cpp | 44 +++++-------------- Marlin/src/module/settings.cpp | 8 +--- Marlin/src/module/stepper.cpp | 10 ++--- Marlin/src/module/stepper/trinamic.h | 30 ++++++------- Marlin/src/module/temperature.cpp | 10 ++--- Marlin/src/module/tool_change.cpp | 12 ++--- .../src/sd/usb_flashdrive/lib-uhs2/max3421e.h | 2 +- .../UHS_host/USB_HOST_SHIELD/UHS_max3421e.h | 12 ++--- .../USB_HOST_SHIELD/USB_HOST_SHIELD.h | 4 +- 24 files changed, 79 insertions(+), 159 deletions(-) diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index dfcf23ddb60f..a3d640ee1a76 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -88,7 +88,7 @@ extern uint8_t marlin_debug_flags; #if HAS_MULTI_SERIAL #define _PORT_REDIRECT(n,p) REMEMBER(n,multiSerial.portMask,p) #define _PORT_RESTORE(n,p) RESTORE(n) - #define SERIAL_ASSERT(P) if(multiSerial.portMask!=(P)){ debugger(); } + #define SERIAL_ASSERT(P) if (multiSerial.portMask!=(P)) { debugger(); } // If we have a catchall, use that directly #ifdef SERIAL_CATCHALL #define _SERIAL_LEAF_2 SERIAL_CATCHALL diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index 332a4f374014..0013797ad5f5 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -169,14 +169,12 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*= #include "../module/planner.h" gradient_t Mixer::gradient = { - false, // enabled - {0}, // color (array) - 0, 0, // start_z, end_z - 0, 1, // start_vtool, end_vtool - {0}, {0} // start_mix[], end_mix[] - #if ENABLED(GRADIENT_VTOOL) - , -1 // vtool_index - #endif + false, // enabled + {0}, // color (array) + 0, 0, // start_z, end_z + 0, 1, // start_vtool, end_vtool + {0}, {0} // start_mix[], end_mix[] + OPTARG(GRADIENT_VTOOL, -1) // vtool_index }; float Mixer::prev_z; // = 0 diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 94c564a9aaf7..d24a60a0b096 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -191,13 +191,14 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; // LCD click or M108 will clear this + + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament"))); + #if ENABLED(HOST_PROMPT_SUPPORT) const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, active_extruder); host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Load Filament T"), tool, CONTINUE_STR); #endif - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament"))); - while (wait_for_user) { impatient_beep(max_beep_count); idle_no_sleep(); @@ -237,8 +238,8 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE); - TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purging..."), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Filament Purging..."))); + TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purging..."), CONTINUE_STR)); wait_for_user = true; // A click or M108 breaks the purge_length loop for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); @@ -272,7 +273,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load #endif // Keep looping if "Purge More" was selected - } while (TERN0(M600_PURGE_MORE_RESUMABLE, show_lcd && pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE)); + } while (TERN0(M600_PURGE_MORE_RESUMABLE, pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE)); #endif TERN_(HOST_PROMPT_SUPPORT, host_action_prompt_end()); diff --git a/Marlin/src/feature/probe_temp_comp.cpp b/Marlin/src/feature/probe_temp_comp.cpp index e39896d4dc09..6f2dad58b9c8 100644 --- a/Marlin/src/feature/probe_temp_comp.cpp +++ b/Marlin/src/feature/probe_temp_comp.cpp @@ -38,16 +38,12 @@ int16_t ProbeTempComp::z_offsets_probe[cali_info_init[TSI_PROBE].measurements], int16_t *ProbeTempComp::sensor_z_offsets[TSI_COUNT] = { ProbeTempComp::z_offsets_probe, ProbeTempComp::z_offsets_bed - #if ENABLED(USE_TEMP_EXT_COMPENSATION) - , ProbeTempComp::z_offsets_ext - #endif + OPTARG(USE_TEMP_EXT_COMPENSATION, ProbeTempComp::z_offsets_ext) }; const temp_calib_t ProbeTempComp::cali_info[TSI_COUNT] = { cali_info_init[TSI_PROBE], cali_info_init[TSI_BED] - #if ENABLED(USE_TEMP_EXT_COMPENSATION) - , cali_info_init[TSI_EXT] - #endif + OPTARG(USE_TEMP_EXT_COMPENSATION, cali_info_init[TSI_EXT]) }; constexpr xyz_pos_t ProbeTempComp::park_point; diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 29009c6e2d9a..c3c8d3c92bf1 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -878,9 +878,7 @@ G29_TYPE GcodeSuite::G29() { // Sync the planner from the current_position if (planner.leveling_active) sync_plan_position(); - #if HAS_BED_PROBE - probe.move_z_after_probing(); - #endif + TERN_(HAS_BED_PROBE, probe.move_z_after_probing()); #ifdef Z_PROBE_END_SCRIPT if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT); diff --git a/Marlin/src/gcode/feature/camera/M240.cpp b/Marlin/src/gcode/feature/camera/M240.cpp index f5c910a9e943..19051ffd423e 100644 --- a/Marlin/src/gcode/feature/camera/M240.cpp +++ b/Marlin/src/gcode/feature/camera/M240.cpp @@ -135,17 +135,8 @@ void GcodeSuite::M240() { }; #ifdef PHOTO_RETRACT_MM - const float rval = parser.seenval('R') ? parser.value_linear_units() : _PHOTO_RETRACT_MM; - feedRate_t sval = ( - #if ENABLED(ADVANCED_PAUSE_FEATURE) - PAUSE_PARK_RETRACT_FEEDRATE - #elif ENABLED(FWRETRACT) - RETRACT_FEEDRATE - #else - 45 - #endif - ); - if (parser.seenval('S')) sval = parser.value_feedrate(); + const float rval = parser.linearval('R', _PHOTO_RETRACT_MM); + const feedRate_t sval = parser.feedrateval('S', TERN(ADVANCED_PAUSE_FEATURE, PAUSE_PARK_RETRACT_FEEDRATE, TERN(FWRETRACT, RETRACT_FEEDRATE, 45))); e_move_m240(-rval, sval); #endif diff --git a/Marlin/src/gcode/feature/fwretract/G10_G11.cpp b/Marlin/src/gcode/feature/fwretract/G10_G11.cpp index 219502f28a8e..35330fe0ac12 100644 --- a/Marlin/src/gcode/feature/fwretract/G10_G11.cpp +++ b/Marlin/src/gcode/feature/fwretract/G10_G11.cpp @@ -32,16 +32,7 @@ * G10 - Retract filament according to settings of M207 * TODO: Handle 'G10 P' for tool settings and 'G10 L' for workspace settings */ -void GcodeSuite::G10() { - #if HAS_MULTI_EXTRUDER - const bool rs = parser.boolval('S'); - #endif - fwretract.retract(true - #if HAS_MULTI_EXTRUDER - , rs - #endif - ); -} +void GcodeSuite::G10() { fwretract.retract(true OPTARG(HAS_MULTI_EXTRUDER, parser.boolval('S'))); } /** * G11 - Recover filament according to settings of M208 diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp index 0a649dadd47a..d46bb234bceb 100644 --- a/Marlin/src/gcode/feature/pause/M701_M702.cpp +++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp @@ -114,9 +114,7 @@ void GcodeSuite::M701() { true, // show_lcd thermalManager.still_heating(target_extruder), // pause_for_user PAUSE_MODE_LOAD_FILAMENT // pause_mode - #if ENABLED(DUAL_X_CARRIAGE) - , target_extruder // Dual X target - #endif + OPTARG(DUAL_X_CARRIAGE, target_extruder) // Dual X target ); #endif diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index 08cf10004a16..a819de6127f7 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -416,7 +416,8 @@ class GCodeParser { static inline float linearval(const char c, const float dval=0) { return seenval(c) ? value_linear_units() : dval; } static inline float axisunitsval(const char c, const AxisEnum a, const float dval=0) { return seenval(c) ? value_axis_units(a) : dval; } - static inline celsius_t celsiusval(const char c, const float dval=0) { return seenval(c) ? value_celsius() : dval; } + static inline celsius_t celsiusval(const char c, const celsius_t dval=0) { return seenval(c) ? value_celsius() : dval; } + static inline feedRate_t feedrateval(const char c, const feedRate_t dval=0) { return seenval(c) ? value_feedrate() : dval; } #if ENABLED(MARLIN_DEV_MODE) diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index fa83c82ddc87..37acc8d58cff 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -118,11 +118,7 @@ bool GCodeQueue::RingBuffer::enqueue(const char *cmd, bool skip_ok/*=true*/ ) { if (*cmd == ';' || length >= BUFSIZE) return false; strcpy(commands[index_w].buffer, cmd); - commit_command(skip_ok - #if HAS_MULTI_SERIAL - , serial_ind - #endif - ); + commit_command(skip_ok OPTARG(HAS_MULTI_SERIAL, serial_ind)); return true; } @@ -538,11 +534,7 @@ void GCodeQueue::get_serial_commands() { #endif // Add the command to the queue - ring_buffer.enqueue(serial.line_buffer, false - #if HAS_MULTI_SERIAL - , p - #endif - ); + ring_buffer.enqueue(serial.line_buffer, false OPTARG(HAS_MULTI_SERIAL, p)); } else process_stream_char(serial_char, serial.input_state, serial.line_buffer, serial.count); diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index abebd0742bbe..6bbcca1457fe 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -105,18 +105,18 @@ * Currently only supported by DUE platform */ #ifndef USB_DEVICE_VENDOR_ID - #define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */ + #define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */ #endif #ifndef USB_DEVICE_PRODUCT_ID - #define USB_DEVICE_PRODUCT_ID 0x2424 /* MSC / CDC */ + #define USB_DEVICE_PRODUCT_ID 0x2424 /* MSC / CDC */ #endif //! USB Device string definitions (Optional) #ifndef USB_DEVICE_MANUFACTURE_NAME - #define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL + #define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL #endif #ifdef CUSTOM_MACHINE_NAME - #define USB_DEVICE_PRODUCT_NAME CUSTOM_MACHINE_NAME + #define USB_DEVICE_PRODUCT_NAME CUSTOM_MACHINE_NAME #else - #define USB_DEVICE_PRODUCT_NAME MACHINE_NAME + #define USB_DEVICE_PRODUCT_NAME MACHINE_NAME #endif -#define USB_DEVICE_SERIAL_NAME "123985739853" +#define USB_DEVICE_SERIAL_NAME "123985739853" diff --git a/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp b/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp index b0cb59a12cba..9b5f206fa9d8 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp @@ -390,9 +390,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u LOOP_L_N(y, PAGE_HEIGHT) { uint32_t k = 0; - #if HAS_LCD_IO - buffer = (y & 1) ? bufferB : bufferA; - #endif + TERN_(HAS_LCD_IO, buffer = (y & 1) ? bufferB : bufferA); for (uint16_t i = 0; i < (uint32_t)pb->width; i++) { const uint8_t b = *(((uint8_t *)pb->buf) + i); const uint16_t c = TEST(b, y) ? TFT_MARLINUI_COLOR : TFT_MARLINBG_COLOR; diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 55546caaf157..589821e23a64 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -64,7 +64,7 @@ namespace ExtUI { ScreenHandler.SetupConfirmAction(setUserConfirmed); ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POPUP); } - else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP ) { + else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP) { ScreenHandler.SetupConfirmAction(nullptr); ScreenHandler.PopToOldScreen(); } diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 467aa9a4eb50..8834ee6eac5f 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -569,9 +569,7 @@ void menu_advanced_settings() { SUBMENU(MSG_JERK, menu_advanced_jerk); #elif HAS_JUNCTION_DEVIATION EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.001f, 0.3f - #if ENABLED(LIN_ADVANCE) - , planner.recalculate_max_e_jerk - #endif + OPTARG(LIN_ADVANCE, planner.recalculate_max_e_jerk) ); #endif diff --git a/Marlin/src/lcd/menu/menu_ubl.cpp b/Marlin/src/lcd/menu/menu_ubl.cpp index 467bd81acfc7..dae2c420471c 100644 --- a/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/Marlin/src/lcd/menu/menu_ubl.cpp @@ -192,9 +192,7 @@ void _lcd_ubl_edit_mesh() { char ubl_lcd_gcode[20]; sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26CPH%" PRIi16 TERN_(HAS_HEATED_BED, "B%" PRIi16)) , custom_hotend_temp - #if HAS_HEATED_BED - , custom_bed_temp - #endif + OPTARG(HAS_HEATED_BED, custom_bed_temp) ); queue.inject(ubl_lcd_gcode); } diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index e4649b9410f4..00173e9ad1f8 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1388,9 +1388,7 @@ void Planner::check_axes_activity() { // Update Fan speeds // Only if synchronous M106/M107 is disabled // - #if HAS_TAIL_FAN_SPEED - sync_fan_speeds(tail_fan_speed); - #endif + TERN_(HAS_TAIL_FAN_SPEED, sync_fan_speeds(tail_fan_speed)); TERN_(AUTOTEMP, autotemp_task()); @@ -1585,11 +1583,7 @@ void Planner::check_axes_activity() { raw.z += ( #if ENABLED(MESH_BED_LEVELING) - mbl.get_z(raw - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - , fade_scaling_factor - #endif - ) + mbl.get_z(raw OPTARG(ENABLE_LEVELING_FADE_HEIGHT, fade_scaling_factor)) #elif ENABLED(AUTO_BED_LEVELING_UBL) fade_scaling_factor ? fade_scaling_factor * ubl.get_z_correction(raw) : 0.0 #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) @@ -1622,11 +1616,7 @@ void Planner::check_axes_activity() { raw.z -= ( #if ENABLED(MESH_BED_LEVELING) - mbl.get_z(raw - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - , fade_scaling_factor - #endif - ) + mbl.get_z(raw OPTARG(ENABLE_LEVELING_FADE_HEIGHT, fade_scaling_factor)) #elif ENABLED(AUTO_BED_LEVELING_UBL) fade_scaling_factor ? fade_scaling_factor * ubl.get_z_correction(raw) : 0.0 #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) @@ -1811,12 +1801,8 @@ bool Planner::_buffer_steps(const xyze_long_t &target // Fill the block with the specified movement if (!_populate_block(block, false, target - #if HAS_POSITION_FLOAT - , target_float - #endif - #if HAS_DIST_MM_ARG - , cart_dist_mm - #endif + OPTARG(HAS_POSITION_FLOAT, target_float) + OPTARG(HAS_DIST_MM_ARG, cart_dist_mm) , fr_mm_s, extruder, millimeters )) { // Movement was not queued, probably because it was too short. @@ -1975,9 +1961,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #endif #endif - #if HAS_EXTRUDERS - if (de < 0) SBI(dm, E_AXIS); - #endif + TERN_(HAS_EXTRUDERS, if (de < 0) SBI(dm, E_AXIS)); #if HAS_EXTRUDERS const float esteps_float = de * e_factor[extruder]; @@ -2075,9 +2059,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, ); #endif - #if HAS_EXTRUDERS - steps_dist_mm.e = esteps_float * steps_to_mm[E_AXIS_N(extruder)]; - #endif + TERN_(HAS_EXTRUDERS, steps_dist_mm.e = esteps_float * steps_to_mm[E_AXIS_N(extruder)]); TERN_(LCD_SHOW_E_TOTAL, e_move_accumulator += steps_dist_mm.e); @@ -2162,9 +2144,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, block->e_to_p_pressure = baricuda_e_to_p_pressure; #endif - #if HAS_MULTI_EXTRUDER - block->extruder = extruder; - #endif + TERN_(HAS_MULTI_EXTRUDER, block->extruder = extruder); #if ENABLED(AUTO_POWER_CONTROL) if (LINEAR_AXIS_GANG( @@ -2986,12 +2966,8 @@ bool Planner::buffer_segment(const abce_pos_t &abce // Queue the movement. Return 'false' if the move was not queued. if (!_buffer_steps(target - #if HAS_POSITION_FLOAT - , target_float - #endif - #if HAS_DIST_MM_ARG - , cart_dist_mm - #endif + OPTARG(HAS_POSITION_FLOAT, target_float) + OPTARG(HAS_DIST_MM_ARG, cart_dist_mm) , fr_mm_s, extruder, millimeters) ) return false; diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 47c1314e2851..fca33c98c2fd 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -2555,9 +2555,7 @@ void MarlinSettings::reset() { TERN_(HAS_CLASSIC_E_JERK, planner.max_jerk.e = DEFAULT_EJERK); #endif - #if HAS_JUNCTION_DEVIATION - planner.junction_deviation_mm = float(JUNCTION_DEVIATION_MM); - #endif + TERN_(HAS_JUNCTION_DEVIATION, planner.junction_deviation_mm = float(JUNCTION_DEVIATION_MM)); #if HAS_SCARA_OFFSET scara_home_offset.reset(); @@ -3151,9 +3149,7 @@ void MarlinSettings::reset() { CONFIG_ECHO_HEADING( "Advanced: B S T" - #if HAS_JUNCTION_DEVIATION - " J" - #endif + TERN_(HAS_JUNCTION_DEVIATION, " J") #if HAS_CLASSIC_JERK " X Y Z" TERN_(HAS_CLASSIC_E_JERK, " E") diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index b8fdaa5f7609..882f5efc3512 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1428,14 +1428,10 @@ void Stepper::isr() { // Get the interval to the next ISR call const uint32_t interval = _MIN( + uint32_t(HAL_TIMER_TYPE_MAX), // Come back in a very long time nextMainISR // Time until the next Pulse / Block phase - #if ENABLED(LIN_ADVANCE) - , nextAdvanceISR // Come back early for Linear Advance? - #endif - #if ENABLED(INTEGRATED_BABYSTEPPING) - , nextBabystepISR // Come back early for Babystepping? - #endif - , uint32_t(HAL_TIMER_TYPE_MAX) // Come back in a very long time + OPTARG(LIN_ADVANCE, nextAdvanceISR) // Come back early for Linear Advance? + OPTARG(INTEGRATED_BABYSTEPPING, nextBabystepISR) // Come back early for Babystepping? ); // diff --git a/Marlin/src/module/stepper/trinamic.h b/Marlin/src/module/stepper/trinamic.h index 766f8fced246..7957a1b35363 100644 --- a/Marlin/src/module/stepper/trinamic.h +++ b/Marlin/src/module/stepper/trinamic.h @@ -121,7 +121,7 @@ void reset_trinamic_drivers(); #define X_ENABLE_READ() stepperX.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(X) - #define X_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X_STEP_PIN); }while(0) + #define X_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(X_STEP_PIN); }while(0) #endif #endif @@ -149,7 +149,7 @@ void reset_trinamic_drivers(); #define Z_ENABLE_READ() stepperZ.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z) - #define Z_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z_STEP_PIN); }while(0) + #define Z_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z_STEP_PIN); }while(0) #endif #endif @@ -166,7 +166,7 @@ void reset_trinamic_drivers(); #define X2_ENABLE_READ() stepperX2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(X2) - #define X2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X2_STEP_PIN); }while(0) + #define X2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(X2_STEP_PIN); }while(0) #endif #endif @@ -183,7 +183,7 @@ void reset_trinamic_drivers(); #define Y2_ENABLE_READ() stepperY2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Y2) - #define Y2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Y2_STEP_PIN); }while(0) + #define Y2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Y2_STEP_PIN); }while(0) #endif #endif @@ -200,7 +200,7 @@ void reset_trinamic_drivers(); #define Z2_ENABLE_READ() stepperZ2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z2) - #define Z2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z2_STEP_PIN); }while(0) + #define Z2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z2_STEP_PIN); }while(0) #endif #endif @@ -217,7 +217,7 @@ void reset_trinamic_drivers(); #define Z3_ENABLE_READ() stepperZ3.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z3) - #define Z3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z3_STEP_PIN); }while(0) + #define Z3_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z3_STEP_PIN); }while(0) #endif #endif @@ -234,7 +234,7 @@ void reset_trinamic_drivers(); #define Z4_ENABLE_READ() stepperZ4.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z4) - #define Z4_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z4_STEP_PIN); }while(0) + #define Z4_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z4_STEP_PIN); }while(0) #endif #endif @@ -293,7 +293,7 @@ void reset_trinamic_drivers(); #define E0_ENABLE_READ() stepperE0.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E0) - #define E0_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E0_STEP_PIN); }while(0) + #define E0_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E0_STEP_PIN); }while(0) #endif #endif @@ -310,7 +310,7 @@ void reset_trinamic_drivers(); #define E1_ENABLE_READ() stepperE1.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E1) - #define E1_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E1_STEP_PIN); }while(0) + #define E1_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E1_STEP_PIN); }while(0) #endif #endif @@ -327,7 +327,7 @@ void reset_trinamic_drivers(); #define E2_ENABLE_READ() stepperE2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E2) - #define E2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E2_STEP_PIN); }while(0) + #define E2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E2_STEP_PIN); }while(0) #endif #endif @@ -344,7 +344,7 @@ void reset_trinamic_drivers(); #define E3_ENABLE_READ() stepperE3.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E3) - #define E3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E3_STEP_PIN); }while(0) + #define E3_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E3_STEP_PIN); }while(0) #endif #endif @@ -361,7 +361,7 @@ void reset_trinamic_drivers(); #define E4_ENABLE_READ() stepperE4.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E4) - #define E4_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E4_STEP_PIN); }while(0) + #define E4_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E4_STEP_PIN); }while(0) #endif #endif @@ -378,7 +378,7 @@ void reset_trinamic_drivers(); #define E5_ENABLE_READ() stepperE5.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E5) - #define E5_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E5_STEP_PIN); }while(0) + #define E5_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E5_STEP_PIN); }while(0) #endif #endif @@ -395,7 +395,7 @@ void reset_trinamic_drivers(); #define E6_ENABLE_READ() stepperE6.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E6) - #define E6_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E6_STEP_PIN); }while(0) + #define E6_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E6_STEP_PIN); }while(0) #endif #endif @@ -412,6 +412,6 @@ void reset_trinamic_drivers(); #define E7_ENABLE_READ() stepperE7.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E7) - #define E7_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E7_STEP_PIN); }while(0) + #define E7_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E7_STEP_PIN); }while(0) #endif #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 52d0dfb56e20..0475db486c1c 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2288,9 +2288,7 @@ void Temperature::init() { INIT_FAN_PIN(CONTROLLER_FAN_PIN); #endif - #if HAS_MAXTC_SW_SPI - max_tc_spi.init(); - #endif + TERN_(HAS_MAXTC_SW_SPI, max_tc_spi.init()); HAL_adc_init(); @@ -3037,15 +3035,15 @@ void Temperature::isr() { #endif #if HAS_HEATED_BED - _PWM_MOD(BED,soft_pwm_bed,temp_bed); + _PWM_MOD(BED, soft_pwm_bed, temp_bed); #endif #if HAS_HEATED_CHAMBER - _PWM_MOD(CHAMBER,soft_pwm_chamber,temp_chamber); + _PWM_MOD(CHAMBER, soft_pwm_chamber, temp_chamber); #endif #if HAS_COOLER - _PWM_MOD(COOLER,soft_pwm_cooler,temp_cooler); + _PWM_MOD(COOLER, soft_pwm_cooler, temp_cooler); #endif #if ENABLED(FAN_SOFT_PWM) diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 6d69b8722dde..8fffb2e6406d 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -918,9 +918,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. if (ok) { // Do a small lift to avoid the workpiece in the move back (below) current_position.z += toolchange_settings.z_raise; - #if HAS_SOFTWARE_ENDSTOPS - NOMORE(current_position.z, soft_endstop.max.z); - #endif + TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z)); fast_line_to_current(Z_AXIS); planner.synchronize(); } @@ -1068,9 +1066,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (can_move_away && TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park)) { // Do a small lift to avoid the workpiece in the move back (below) current_position.z += toolchange_settings.z_raise; - #if HAS_SOFTWARE_ENDSTOPS - NOMORE(current_position.z, soft_endstop.max.z); - #endif + TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z)); fast_line_to_current(Z_AXIS); planner.synchronize(); } @@ -1117,9 +1113,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (can_move_away && TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park)) { // Do a small lift to avoid the workpiece in the move back (below) current_position.z += toolchange_settings.z_raise; - #if HAS_SOFTWARE_ENDSTOPS - NOMORE(current_position.z, soft_endstop.max.z); - #endif + TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z)); fast_line_to_current(Z_AXIS); } #endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h index 6cad39d0df59..f7eb9adf06d1 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h @@ -67,7 +67,7 @@ #define rCPUCTL 0x80 //16<<3 /* CPUCTL Bits */ -#define bmPUSLEWID1 0x80 //b7 +#define bmPULSEWID1 0x80 //b7 #define bmPULSEWID0 0x40 //b6 #define bmIE 0x01 //b0 diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h index 8ecafd4ad895..841cc8fe75c5 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h @@ -59,19 +59,19 @@ e-mail : support@circuitsathome.com // (CPUCTL) #define rCPUCTL 0x80 //16<<3 -#define bmPUSLEWID1 0x80 //b7 +#define bmPULSEWID1 0x80 //b7 #define bmPULSEWID0 0x40 //b6 #define bmIE 0x01 //b0 -// bmPUSLEWID1 bmPULSEWID0 Pulse width +// bmPULSEWID1 bmPULSEWID0 Pulse width // 0 0 10.6uS // 0 1 5.3uS // 1 0 2.6uS // 1 1 1.3uS -#define PUSLEWIDTH10_6 (0) -#define PUSLEWIDTH5_3 (bmPULSEWID0) -#define PUSLEWIDTH2_6 (bmPUSLEWID1) -#define PUSLEWIDTH1_3 (bmPULSEWID0 | bmPUSLEWID1) +#define PULSEWIDTH10_6 (0) +#define PULSEWIDTH5_3 (bmPULSEWID0) +#define PULSEWIDTH2_6 (bmPULSEWID1) +#define PULSEWIDTH1_3 (bmPULSEWID0 | bmPULSEWID1) // (PINCTL) #define rPINCTL 0x88 //17<<3 diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h index 7d17d626c1ba..79c06a492b97 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h @@ -272,11 +272,11 @@ e-mail : support@circuitsathome.com // #define IRQ_SENSE FALLING #ifdef ARDUINO_ARCH_PIC32 -//#define bmPULSEWIDTH PUSLEWIDTH10_6 +//#define bmPULSEWIDTH PULSEWIDTH10_6 #define bmPULSEWIDTH 0 #define bmIRQ_SENSE 0 #else -#define bmPULSEWIDTH PUSLEWIDTH1_3 +#define bmPULSEWIDTH PULSEWIDTH1_3 #define bmIRQ_SENSE 0 #endif #else From 34e6940aabd6645109b497c04f8733a1d205b35c Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 22 Aug 2021 11:05:39 +1200 Subject: [PATCH 243/323] =?UTF-8?q?=E2=9C=A8=20BOARD=5FRUMBA32=5FBTT=20(#2?= =?UTF-8?q?2607)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 55 +++++++-------- Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 1 - Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h | 1 - Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h | 68 +++++++++++++++++++ Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 1 - 6 files changed, 98 insertions(+), 30 deletions(-) create mode 100644 Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 2ed585919966..8e84f0b9673d 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -365,33 +365,34 @@ #define BOARD_RUMBA32_V1_0 4201 // RUMBA32 STM32F446VET6 based controller from Aus3D #define BOARD_RUMBA32_V1_1 4202 // RUMBA32 STM32F446VET6 based controller from Aus3D #define BOARD_RUMBA32_MKS 4203 // RUMBA32 STM32F446VET6 based controller from Makerbase -#define BOARD_BLACK_STM32F407VE 4204 // BLACK_STM32F407VE -#define BOARD_BLACK_STM32F407ZE 4205 // BLACK_STM32F407ZE -#define BOARD_STEVAL_3DP001V1 4206 // STEVAL-3DP001V1 3D PRINTER BOARD -#define BOARD_BTT_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZGT6) -#define BOARD_BTT_SKR_PRO_V1_2 4208 // BigTreeTech SKR Pro v1.2 (STM32F407ZGT6) -#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VGT6) -#define BOARD_BTT_E3_RRF 4210 // BigTreeTech E3 RRF (STM32F407VGT6) -#define BOARD_BTT_SKR_V2_0_REV_A 4211 // BigTreeTech SKR v2.0 Rev A (STM32F407VGT6) -#define BOARD_BTT_SKR_V2_0_REV_B 4212 // BigTreeTech SKR v2.0 Rev B (STM32F407VGT6) -#define BOARD_BTT_GTR_V1_0 4213 // BigTreeTech GTR v1.0 (STM32F407IGT) -#define BOARD_BTT_OCTOPUS_V1_0 4214 // BigTreeTech Octopus v1.0 (STM32F446ZET6) -#define BOARD_BTT_OCTOPUS_V1_1 4215 // BigTreeTech Octopus v1.1 (STM32F446ZET6) -#define BOARD_LERDGE_K 4216 // Lerdge K (STM32F407ZG) -#define BOARD_LERDGE_S 4217 // Lerdge S (STM32F407VE) -#define BOARD_LERDGE_X 4218 // Lerdge X (STM32F407VE) -#define BOARD_VAKE403D 4219 // VAkE 403D (STM32F446VET6) -#define BOARD_FYSETC_S6 4220 // FYSETC S6 (STM32F446VET6) -#define BOARD_FYSETC_S6_V2_0 4221 // FYSETC S6 v2.0 (STM32F446VET6) -#define BOARD_FYSETC_SPIDER 4222 // FYSETC Spider (STM32F446VET6) -#define BOARD_FLYF407ZG 4223 // FLYmaker FLYF407ZG (STM32F407ZG) -#define BOARD_MKS_ROBIN2 4224 // MKS_ROBIN2 (STM32F407ZE) -#define BOARD_MKS_ROBIN_PRO_V2 4225 // MKS Robin Pro V2 (STM32F407VE) -#define BOARD_MKS_ROBIN_NANO_V3 4226 // MKS Robin Nano V3 (STM32F407VG) -#define BOARD_MKS_MONSTER8 4227 // MKS Monster8 (STM32F407VGT6) -#define BOARD_ANET_ET4 4228 // ANET ET4 V1.x (STM32F407VGT6) -#define BOARD_ANET_ET4P 4229 // ANET ET4P V1.x (STM32F407VGT6) -#define BOARD_FYSETC_CHEETAH_V20 4230 // FYSETC Cheetah V2.0 +#define BOARD_RUMBA32_BTT 4204 // RUMBA32 STM32F446VET6 based controller from BIGTREETECH +#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE +#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE +#define BOARD_STEVAL_3DP001V1 4207 // STEVAL-3DP001V1 3D PRINTER BOARD +#define BOARD_BTT_SKR_PRO_V1_1 4208 // BigTreeTech SKR Pro v1.1 (STM32F407ZGT6) +#define BOARD_BTT_SKR_PRO_V1_2 4209 // BigTreeTech SKR Pro v1.2 (STM32F407ZGT6) +#define BOARD_BTT_BTT002_V1_0 4210 // BigTreeTech BTT002 v1.0 (STM32F407VGT6) +#define BOARD_BTT_E3_RRF 4211 // BigTreeTech E3 RRF (STM32F407VGT6) +#define BOARD_BTT_SKR_V2_0_REV_A 4212 // BigTreeTech SKR v2.0 Rev A (STM32F407VGT6) +#define BOARD_BTT_SKR_V2_0_REV_B 4213 // BigTreeTech SKR v2.0 Rev B (STM32F407VGT6) +#define BOARD_BTT_GTR_V1_0 4214 // BigTreeTech GTR v1.0 (STM32F407IGT) +#define BOARD_BTT_OCTOPUS_V1_0 4215 // BigTreeTech Octopus v1.0 (STM32F446ZET6) +#define BOARD_BTT_OCTOPUS_V1_1 4216 // BigTreeTech Octopus v1.1 (STM32F446ZET6) +#define BOARD_LERDGE_K 4217 // Lerdge K (STM32F407ZG) +#define BOARD_LERDGE_S 4218 // Lerdge S (STM32F407VE) +#define BOARD_LERDGE_X 4219 // Lerdge X (STM32F407VE) +#define BOARD_VAKE403D 4220 // VAkE 403D (STM32F446VET6) +#define BOARD_FYSETC_S6 4221 // FYSETC S6 (STM32F446VET6) +#define BOARD_FYSETC_S6_V2_0 4222 // FYSETC S6 v2.0 (STM32F446VET6) +#define BOARD_FYSETC_SPIDER 4223 // FYSETC Spider (STM32F446VET6) +#define BOARD_FLYF407ZG 4224 // FLYmaker FLYF407ZG (STM32F407ZG) +#define BOARD_MKS_ROBIN2 4225 // MKS_ROBIN2 (STM32F407ZE) +#define BOARD_MKS_ROBIN_PRO_V2 4226 // MKS Robin Pro V2 (STM32F407VE) +#define BOARD_MKS_ROBIN_NANO_V3 4227 // MKS Robin Nano V3 (STM32F407VG) +#define BOARD_MKS_MONSTER8 4228 // MKS Monster8 (STM32F407VGT6) +#define BOARD_ANET_ET4 4229 // ANET ET4 V1.x (STM32F407VGT6) +#define BOARD_ANET_ET4P 4230 // ANET ET4P V1.x (STM32F407VGT6) +#define BOARD_FYSETC_CHEETAH_V20 4231 // FYSETC Cheetah V2.0 // // ARM Cortex M7 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 28c7ed007170..0655580f0f38 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -587,6 +587,8 @@ #include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32 #elif MB(RUMBA32_MKS) #include "stm32f4/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32 +#elif MB(RUMBA32_BTT) + #include "stm32f4/pins_RUMBA32_BTT.h" // STM32F4 env:rumba32 #elif MB(BLACK_STM32F407VE) #include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black #elif MB(STEVAL_3DP001V1) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 986cd7feaa3f..c9f528b87bcc 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -195,7 +195,6 @@ // Misc. Functions // //#define LED_PIN PB14 -//#define BTN_PIN PC10 //#define PS_ON_PIN PE11 //#define KILL_PIN PC5 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h index a60a2781495c..f2073457b13b 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h @@ -51,7 +51,6 @@ #if MB(RUMBA32_V1_1) #define SERVO0_PIN PA15 - #undef BTN_PIN #if HAS_TMC_UART // diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h new file mode 100644 index 000000000000..b12f4737b7c3 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h @@ -0,0 +1,68 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * No offical schematics have been found. + * But these differences where noted in https://github.com/bigtreetech/Rumba32/issues/1 + */ + +#pragma once + +#define BOARD_INFO_NAME "RUMBA32 (BTT)" + +#if NO_EEPROM_SELECTED + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x2000 // 8KB (24LC64T-I/OT) +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + // Decrease delays and flash wear by spreading writes across the + // 128 kB sector allocated for EEPROM emulation. + #define FLASH_EEPROM_LEVELING +#endif + +#include "pins_RUMBA32_common.h" + +#define SERVO0_PIN PA15 // Pin is not broken out, is a test point only. + +#if HAS_TMC_UART + // + // TMC2208/TMC2209 Software Serial + // + #define X_SERIAL_TX_PIN PC14 // BTT Rumba32 only uses 1 pin for UART + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PE4 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PE0 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PC13 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PD5 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + #define E2_SERIAL_TX_PIN PD1 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN +#endif diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index 7bf148874c3f..03d8d19e945a 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -134,7 +134,6 @@ // Misc. Functions // #define LED_PIN PB14 -#define BTN_PIN PC10 #define PS_ON_PIN PE11 #define KILL_PIN PC5 From 7d416bd055e3ccddf765208b2937dcc1fcd4ea8b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 22 Aug 2021 05:25:07 -0500 Subject: [PATCH 244/323] =?UTF-8?q?=E2=9C=A8=20MarlinUI=20for=20Ender=203?= =?UTF-8?q?=20v2=20DWIN=20LCD=20(#22594)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Taylor Talkington --- Marlin/Configuration.h | 6 + Marlin/Configuration_adv.h | 24 +- Marlin/src/feature/pause.cpp | 4 +- Marlin/src/inc/Conditionals_LCD.h | 7 +- Marlin/src/inc/Conditionals_post.h | 6 +- Marlin/src/inc/SanityCheck.h | 7 +- Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp | 470 + Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h | 302 + Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp | 180 + Marlin/src/lcd/e3v2/marlinui/dwin_string.h | 1007 ++ .../src/lcd/e3v2/marlinui/lcdprint_dwin.cpp | 193 + Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h | 30 + Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h | 146 + Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 595 + .../lcd/e3v2/marlinui/ui_status_480x272.cpp | 391 + Marlin/src/lcd/lcdprint.cpp | 2 +- Marlin/src/lcd/lcdprint.h | 21 +- Marlin/src/lcd/marlinui.cpp | 8 + Marlin/src/lcd/marlinui.h | 26 +- Marlin/src/lcd/menu/menu.cpp | 2 + Marlin/src/lcd/menu/menu.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 4 +- buildroot/share/fonts/buildhzk.py | 64 + buildroot/share/fonts/marlin-10x20.bdf | 4104 +++++++ buildroot/share/fonts/marlin-12x24.bdf | 4558 ++++++++ buildroot/share/fonts/marlin-14x28.bdf | 5078 +++++++++ buildroot/share/fonts/marlin-16x32.bdf | 5492 +++++++++ buildroot/share/fonts/marlin-20x40.bdf | 6458 +++++++++++ buildroot/share/fonts/marlin-24x48.bdf | 6462 +++++++++++ buildroot/share/fonts/marlin-28x56.bdf | 7311 ++++++++++++ buildroot/share/fonts/marlin-32x64.bdf | 9870 +++++++++++++++++ buildroot/share/fonts/marlin-8x16.bdf | 3701 ++++++ buildroot/tests/STM32F103RET6_creality | 6 +- ini/features.ini | 1 + platformio.ini | 3 +- 35 files changed, 56500 insertions(+), 41 deletions(-) create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_string.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/ui_common.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp create mode 100644 buildroot/share/fonts/buildhzk.py create mode 100644 buildroot/share/fonts/marlin-10x20.bdf create mode 100644 buildroot/share/fonts/marlin-12x24.bdf create mode 100644 buildroot/share/fonts/marlin-14x28.bdf create mode 100644 buildroot/share/fonts/marlin-16x32.bdf create mode 100644 buildroot/share/fonts/marlin-20x40.bdf create mode 100644 buildroot/share/fonts/marlin-24x48.bdf create mode 100644 buildroot/share/fonts/marlin-28x56.bdf create mode 100644 buildroot/share/fonts/marlin-32x64.bdf create mode 100644 buildroot/share/fonts/marlin-8x16.bdf diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 763c143158c6..ac98b1b322b7 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2746,6 +2746,12 @@ // //#define DWIN_CREALITY_LCD +// +// MarlinUI for Creality's DWIN display (and others) +// +//#define DWIN_MARLINUI_PORTRAIT +//#define DWIN_MARLINUI_LANDSCAPE + // // Touch Screen Settings // diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 2eecc0adb354..8a07b5c97b12 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1306,7 +1306,7 @@ // LCD Print Progress options #if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) - #if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) + #if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, IS_DWIN_MARLINUI) //#define SHOW_REMAINING_TIME // Display estimated time to completion #if ENABLED(SHOW_REMAINING_TIME) //#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation @@ -1579,16 +1579,10 @@ * printing performance versus fast display updates. */ #if HAS_MARLINUI_U8GLIB - // Show SD percentage next to the progress bar - //#define SHOW_SD_PERCENT - // Save many cycles by drawing a hollow frame or no frame on the Info Screen //#define XYZ_NO_FRAME #define XYZ_HOLLOW_FRAME - // Enable to save many cycles by drawing a hollow frame on Menu Screens - #define MENU_HOLLOW_FRAME - // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. //#define USE_BIG_EDIT_FONT @@ -1597,9 +1591,6 @@ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. //#define USE_SMALL_INFOFONT - // Swap the CW/CCW indicators in the graphics overlay - //#define OVERLAY_GFX_REVERSE - /** * ST7920-based LCDs can emulate a 16 x 4 character display using * the ST7920 character-generator for very fast screen updates. @@ -1651,6 +1642,17 @@ #endif // HAS_MARLINUI_U8GLIB +#if HAS_MARLINUI_U8GLIB || IS_DWIN_MARLINUI + // Show SD percentage next to the progress bar + //#define SHOW_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE +#endif + // // Additional options for DGUS / DWIN displays // @@ -1716,7 +1718,7 @@ // // Specify additional languages for the UI. Default specified by LCD_LANGUAGE. // -#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE) +#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI) //#define LCD_LANGUAGE_2 fr //#define LCD_LANGUAGE_3 de //#define LCD_LANGUAGE_4 es diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index d24a60a0b096..79a8af66e2a4 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -238,8 +238,8 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Filament Purging..."))); - TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purging..."), CONTINUE_STR)); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE))); + TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_FILAMENT_CHANGE_PURGE), CONTINUE_STR)); wait_for_user = true; // A click or M108 breaks the purge_length loop for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 137b9fce3ec1..c4309db144eb 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -488,7 +488,10 @@ #define HAS_MARLINUI_U8GLIB 1 #elif IS_TFTGLCD_PANEL // Neither DOGM nor HD44780. Fully customized interface. - #elif DISABLED(HAS_GRAPHICAL_TFT) + #elif IS_DWIN_MARLINUI + // Since HAS_MARLINUI_U8GLIB refers to U8G displays + // the DWIN display can define its own flags + #elif !HAS_GRAPHICAL_TFT #define HAS_MARLINUI_HD44780 1 #endif #endif @@ -1087,7 +1090,7 @@ #define HAS_ETHERNET 1 #endif -#if ENABLED(DWIN_CREALITY_LCD) +#if EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) #define SERIAL_CATCHALL 0 #ifndef LCD_SERIAL_PORT #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 04848bd0d6aa..20243ae0ea20 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -461,7 +461,7 @@ #endif -#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT) || !PIN_EXISTS(SD_DETECT) +#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI) || !PIN_EXISTS(SD_DETECT) #define NO_LCD_REINIT 1 // Suppress LCD re-initialization #endif @@ -3258,6 +3258,8 @@ #ifndef LCD_WIDTH #if HAS_MARLINUI_U8GLIB #define LCD_WIDTH 21 + #elif IS_DWIN_MARLINUI + // Defined by header #else #define LCD_WIDTH TERN(IS_ULTIPANEL, 20, 16) #endif @@ -3265,6 +3267,8 @@ #ifndef LCD_HEIGHT #if HAS_MARLINUI_U8GLIB #define LCD_HEIGHT 5 + #elif IS_DWIN_MARLINUI + // Defined by header #else #define LCD_HEIGHT TERN(IS_ULTIPANEL, 4, 2) #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 817bce28bc42..b679f2cb532d 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -798,8 +798,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0." #endif #elif ENABLED(LCD_SET_PROGRESS_MANUALLY) - #if NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI) - #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, or EXTENSIBLE_UI." + #if NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI, IS_DWIN_MARLINUI) + #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, EXTENSIBLE_UI, OR DWIN MarlinUI." #endif #endif @@ -1721,7 +1721,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #endif -#if ENABLED(MESH_EDIT_GFX_OVERLAY) && !BOTH(AUTO_BED_LEVELING_UBL, HAS_MARLINUI_U8GLIB) +#if ENABLED(MESH_EDIT_GFX_OVERLAY) && !(ENABLED(AUTO_BED_LEVELING_UBL) && EITHER(HAS_MARLINUI_U8GLIB, IS_DWIN_MARLINUI)) #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD." #endif @@ -2640,6 +2640,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \ + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) \ + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY, DWIN_CREALITY_LCD) \ + + COUNT_ENABLED(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1) \ + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp new file mode 100644 index 000000000000..97dc0eec42b6 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp @@ -0,0 +1,470 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/******************************************************************************** + * @file lcd/e3v2/marlinui/dwin_lcd.cpp + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "../../../inc/MarlinConfig.h" + +#include "dwin_lcd.h" +#include // for memset + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +// Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail. +// Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters. +uint8_t DWIN_SendBuf[11 + DWIN_WIDTH / 6 * 2] = { 0xAA }; +uint8_t DWIN_BufTail[4] = { 0xCC, 0x33, 0xC3, 0x3C }; +uint8_t databuf[26] = { 0 }; +uint8_t receivedType; + +int recnum = 0; + +inline void DWIN_Byte(size_t &i, const uint16_t bval) { + DWIN_SendBuf[++i] = bval; +} + +inline void DWIN_Word(size_t &i, const uint16_t wval) { + DWIN_SendBuf[++i] = wval >> 8; + DWIN_SendBuf[++i] = wval & 0xFF; +} + +inline void DWIN_Long(size_t &i, const uint32_t lval) { + DWIN_SendBuf[++i] = (lval >> 24) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 16) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 8) & 0xFF; + DWIN_SendBuf[++i] = lval & 0xFF; +} + +inline void DWIN_String(size_t &i, char * const string) { + const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, strlen(string)); + memcpy(&DWIN_SendBuf[i+1], string, len); + i += len; +} + +inline void DWIN_String(size_t &i, const __FlashStringHelper * string) { + if (!string) return; + const size_t len = strlen_P((PGM_P)string); // cast it to PGM_P, which is basically const char *, and measure it using the _P version of strlen. + if (len == 0) return; + memcpy(&DWIN_SendBuf[i+1], string, len); + i += len; +} + +// Send the data in the buffer and the packet end +inline void DWIN_Send(size_t &i) { + ++i; + LOOP_L_N(n, i) { LCD_SERIAL.write(DWIN_SendBuf[n]); delayMicroseconds(1); } + LOOP_L_N(n, 4) { LCD_SERIAL.write(DWIN_BufTail[n]); delayMicroseconds(1); } +} + +/*-------------------------------------- System variable function --------------------------------------*/ + +// Handshake (1: Success, 0: Fail) +bool DWIN_Handshake(void) { + #ifndef LCD_BAUDRATE + #define LCD_BAUDRATE 115200 + #endif + LCD_SERIAL.begin(LCD_BAUDRATE); + const millis_t serial_connect_timeout = millis() + 1000UL; + while (!LCD_SERIAL.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + + size_t i = 0; + DWIN_Byte(i, 0x00); + DWIN_Send(i); + + while (LCD_SERIAL.available() > 0 && recnum < (signed)sizeof(databuf)) { + databuf[recnum] = LCD_SERIAL.read(); + // ignore the invalid data + if (databuf[0] != FHONE) { // prevent the program from running. + if (recnum > 0) { + recnum = 0; + ZERO(databuf); + } + continue; + } + delay(10); + recnum++; + } + + return ( recnum >= 3 + && databuf[0] == FHONE + && databuf[1] == '\0' + && databuf[2] == 'O' + && databuf[3] == 'K' ); +} + +void DWIN_Startup(void) { + DEBUG_ECHOPGM("\r\nDWIN handshake "); + delay(750); // Delay here or init later in the boot process + const bool success = DWIN_Handshake(); + if (success) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error."); + DWIN_Frame_SetDir(TERN(DWIN_MARLINUI_LANDSCAPE, 0, 1)); + DWIN_Frame_Clear(Color_Bg_Black); // MarlinUI handles the bootscreen so just clear here + DWIN_UpdateLCD(); +} + +// Set the backlight luminance +// luminance: (0x00-0xFF) +void DWIN_Backlight_SetLuminance(const uint8_t luminance) { + size_t i = 0; + DWIN_Byte(i, 0x30); + DWIN_Byte(i, _MAX(luminance, 0x1F)); + DWIN_Send(i); +} + +// Set screen display direction +// dir: 0=0°, 1=90°, 2=180°, 3=270° +void DWIN_Frame_SetDir(uint8_t dir) { + size_t i = 0; + DWIN_Byte(i, 0x34); + DWIN_Byte(i, 0x5A); + DWIN_Byte(i, 0xA5); + DWIN_Byte(i, dir); + DWIN_Send(i); +} + +// Update display +void DWIN_UpdateLCD(void) { + size_t i = 0; + DWIN_Byte(i, 0x3D); + DWIN_Send(i); +} + +/*---------------------------------------- Drawing functions ----------------------------------------*/ + +// Clear screen +// color: Clear screen color +void DWIN_Frame_Clear(const uint16_t color) { + size_t i = 0; + DWIN_Byte(i, 0x01); + DWIN_Word(i, color); + DWIN_Send(i); +} + +// Draw a point +// width: point width 0x01-0x0F +// height: point height 0x01-0x0F +// x,y: upper left point +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x02); + DWIN_Word(i, color); + DWIN_Byte(i, width); + DWIN_Byte(i, height); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Draw a line +// color: Line segment color +// xStart/yStart: Start point +// xEnd/yEnd: End point +void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x03); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +// Draw a rectangle +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xEnd/yEnd: lower right point +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, + uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x05); + DWIN_Byte(i, mode); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +// Move a screen area +// mode: 0, circle shift; 1, translation +// dir: 0=left, 1=right, 2=up, 3=down +// dis: Distance +// color: Fill color +// xStart/yStart: upper left point +// xEnd/yEnd: bottom right point +void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, + uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x09); + DWIN_Byte(i, (mode << 7) | dir); + DWIN_Word(i, dis); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +/*---------------------------------------- Text related functions ----------------------------------------*/ + +// Draw a string +// bShow: true=display background color; false=don't display background color +// size: Font size +// color: Character color +// bColor: Background color +// x/y: Upper-left coordinate of the string +// *string: The string +void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string) { + uint8_t widthAdjust = 0; + size_t i = 0; + DWIN_Byte(i, 0x11); + // Bit 7: widthAdjust + // Bit 6: bShow + // Bit 5-4: Unused (0) + // Bit 3-0: size + DWIN_Byte(i, (widthAdjust * 0x80) | (bShow * 0x40) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_String(i, string); + DWIN_Send(i); +} + +// Draw a positive integer +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of digits +// x/y: Upper-left coordinate +// value: Integer value +void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + size_t i = 0; + DWIN_Byte(i, 0x14); + // Bit 7: bshow + // Bit 6: 1 = signed; 0 = unsigned number; + // Bit 5: zeroFill + // Bit 4: zeroMode + // Bit 3-0: size + DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Byte(i, iNum); + DWIN_Byte(i, 0); // fNum + DWIN_Word(i, x); + DWIN_Word(i, y); + #if 0 + for (char count = 0; count < 8; count++) { + DWIN_Byte(i, value); + value >>= 8; + if (!(value & 0xFF)) break; + } + #else + // Write a big-endian 64 bit integer + const size_t p = i + 1; + for (char count = 8; count--;) { // 7..0 + ++i; + DWIN_SendBuf[p + count] = value; + value >>= 8; + } + #endif + + DWIN_Send(i); +} + +// Draw a floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + //uint8_t *fvalue = (uint8_t*)&value; + size_t i = 0; + DWIN_Byte(i, 0x14); + DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Byte(i, iNum); + DWIN_Byte(i, fNum); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Long(i, value); + /* + DWIN_Byte(i, fvalue[3]); + DWIN_Byte(i, fvalue[2]); + DWIN_Byte(i, fvalue[1]); + DWIN_Byte(i, fvalue[0]); + */ + DWIN_Send(i); +} + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Draw JPG and cached in #0 virtual display area +// id: Picture ID +void DWIN_JPG_ShowAndCache(const uint8_t id) { + size_t i = 0; + DWIN_Word(i, 0x2200); + DWIN_Byte(i, id); + DWIN_Send(i); // AA 23 00 00 00 00 08 00 01 02 03 CC 33 C3 3C +} + +// Draw an Icon +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x23); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Byte(i, 0x80 | libID); + //DWIN_Byte(i, libID); + DWIN_Byte(i, picID); + DWIN_Send(i); +} + +// Unzip the JPG picture to a virtual display area +// n: Cache index +// id: Picture ID +void DWIN_JPG_CacheToN(uint8_t n, uint8_t id) { + size_t i = 0; + DWIN_Byte(i, 0x25); + DWIN_Byte(i, n); + DWIN_Byte(i, id); + DWIN_Send(i); +} + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x27); + DWIN_Byte(i, 0x80 | cacheID); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Animate a series of icons +// animID: Animation ID; 0x00-0x0F +// animate: true on; false off; +// libID: Icon library ID +// picIDs: Icon starting ID +// picIDe: Icon ending ID +// x/y: Upper-left point +// interval: Display time interval, unit 10mS +void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x28); + DWIN_Word(i, x); + DWIN_Word(i, y); + // Bit 7: animation on or off + // Bit 6: start from begin or end + // Bit 5-4: unused (0) + // Bit 3-0: animID + DWIN_Byte(i, (animate * 0x80) | 0x40 | animID); + DWIN_Byte(i, libID); + DWIN_Byte(i, picIDs); + DWIN_Byte(i, picIDe); + DWIN_Byte(i, interval); + DWIN_Send(i); +} + +// Animation Control +// state: 16 bits, each bit is the state of an animation id +void DWIN_ICON_AnimationControl(uint16_t state) { + size_t i = 0; + DWIN_Byte(i, 0x29); + DWIN_Word(i, state); + DWIN_Send(i); +} + +/*---------------------------------------- Memory functions ----------------------------------------*/ +// The LCD has an additional 32KB SRAM and 16KB Flash + +// Data can be written to the sram and save to one of the jpeg page files + +// Write Data Memory +// command 0x31 +// Type: Write memory selection; 0x5A=SRAM; 0xA5=Flash +// Address: Write data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash +// Data: data +// +// Flash writing returns 0xA5 0x4F 0x4B + +// Read Data Memory +// command 0x32 +// Type: Read memory selection; 0x5A=SRAM; 0xA5=Flash +// Address: Read data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash +// Length: leangth of data to read; 0x01-0xF0 +// +// Response: +// Type, Address, Length, Data + +// Write Picture Memory +// Write the contents of the 32KB SRAM data memory into the designated image memory space +// Issued: 0x5A, 0xA5, PIC_ID +// Response: 0xA5 0x4F 0x4B +// +// command 0x33 +// 0x5A, 0xA5 +// PicId: Picture Memory location, 0x00-0x0F +// +// Flash writing returns 0xA5 0x4F 0x4B + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h new file mode 100644 index 000000000000..09d7b5ddd228 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h @@ -0,0 +1,302 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/******************************************************************************** + * @file lcd/e3v2/marlinui/dwin_lcd.h + * @brief DWIN screen control functions + ********************************************************************************/ + +#include + +#define RECEIVED_NO_DATA 0x00 +#define RECEIVED_SHAKE_HAND_ACK 0x01 + +#define FHONE 0xAA + +#define DWIN_SCROLL_UP 2 +#define DWIN_SCROLL_DOWN 3 + +#if DISABLED(DWIN_MARLINUI_LANDSCAPE) + #define DWIN_WIDTH 272 + #define DWIN_HEIGHT 480 +#else + #define DWIN_WIDTH 480 + #define DWIN_HEIGHT 272 +#endif + +// Picture ID +#define DWIN_Boot_Horiz 0 +#define DWIN_Boot_Vert 1 +#define DWIN_MarlinUI_Assets 2 + +/** + * 3-.0:The font size, 0x00-0x09, corresponds to the font size below: + * 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28 + * 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64 + */ +#define font6x12 0x00 +#define font8x16 0x01 +#define font10x20 0x02 +#define font12x24 0x03 +#define font14x28 0x04 +#define font16x32 0x05 +#define font20x40 0x06 +#define font24x48 0x07 +#define font28x56 0x08 +#define font32x64 0x09 + +#define DWIN_FONT_MENU font10x20 +#define DWIN_FONT_STAT font14x28 +#define DWIN_FONT_HEAD font10x20 +#define DWIN_FONT_ALERT font14x28 + +// Color +#define Color_White 0xFFFF +#define Color_Yellow 0xFF0F +#define Color_Error_Red 0xB000 // Error! +#define Color_Bg_Red 0xF00F // Red background color +#define Color_Bg_Window 0x31E8 // Popup background color +#define Color_Bg_Heading 0x3344 // Static Heading +#define Color_Bg_Blue 0x1125 // Dark blue background color +#define Color_Bg_Black 0x0841 // Black background color +#define Color_IconBlue 0x45FA // Lighter blue that matches icons/accents +#define Popup_Text_Color 0xD6BA // Popup font background color +#define Line_Color 0x3A6A // Split line color +#define Rectangle_Color 0xEE2F // Blue square cursor color +#define Percent_Color 0xFE29 // Percentage color +#define BarFill_Color 0x10E4 // Fill color of progress bar +#define Select_Color 0x33BB // Selected color + +// Character matrix width x height +//#define LCD_WIDTH ((DWIN_WIDTH) / 8) +//#define LCD_HEIGHT ((DWIN_HEIGHT) / 12) + +// ICON ID +#define BOOT_ICON 3 // Icon set file 3.ICO +#define ICON 4 // Icon set file 4.ICO + +// MarlinUI Boot Icons +#define ICON_MarlinBoot 0 +#define ICON_OpenSource 1 +#define ICON_GitHubURL 2 +#define ICON_MarlinURL 3 +#define ICON_Copyright 4 + +// MarlinUI Icons +#define ICON_LOGO_Marlin 0 +#define ICON_HotendOff 1 +#define ICON_HotendOn 2 +#define ICON_BedOff 3 +#define ICON_BedOn 4 +#define ICON_Fan0 5 +#define ICON_Fan1 6 +#define ICON_Fan2 7 +#define ICON_Fan3 8 +#define ICON_Halted 9 +#define ICON_Question 10 +#define ICON_Alert 11 +#define ICON_RotateCW 12 +#define ICON_RotateCCW 13 +#define ICON_UpArrow 14 +#define ICON_DownArrow 15 +#define ICON_BedLine 16 + +#define ICON_AdvSet ICON_Language +#define ICON_HomeOff ICON_AdvSet +#define ICON_HomeOffX ICON_StepX +#define ICON_HomeOffY ICON_StepY +#define ICON_HomeOffZ ICON_StepZ +#define ICON_ProbeOff ICON_AdvSet +#define ICON_ProbeOffX ICON_StepX +#define ICON_ProbeOffY ICON_StepY +#define ICON_PIDNozzle ICON_SetEndTemp +#define ICON_PIDbed ICON_SetBedTemp + +/*-------------------------------------- System variable function --------------------------------------*/ + +// Handshake (1: Success, 0: Fail) +bool DWIN_Handshake(void); + +// Common DWIN startup +void DWIN_Startup(void); + +// Set the backlight luminance +// luminance: (0x00-0xFF) +void DWIN_Backlight_SetLuminance(const uint8_t luminance); + +// Set screen display direction +// dir: 0=0°, 1=90°, 2=180°, 3=270° +void DWIN_Frame_SetDir(uint8_t dir); + +// Update display +void DWIN_UpdateLCD(void); + +/*---------------------------------------- Drawing functions ----------------------------------------*/ + +// Clear screen +// color: Clear screen color +void DWIN_Frame_Clear(const uint16_t color); + +// Draw a point +// color: point color +// width: point width 0x01-0x0F +// height: point height 0x01-0x0F +// x,y: upper left point +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y); + +// Draw a line +// color: Line segment color +// xStart/yStart: Start point +// xEnd/yEnd: End point +void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +// Draw a Horizontal line +// color: Line segment color +// xStart/yStart: Start point +// xLength: Line Length +inline void DWIN_Draw_HLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xLength) { + DWIN_Draw_Line(color, xStart, yStart, xStart + xLength - 1, yStart); +} + +// Draw a Vertical line +// color: Line segment color +// xStart/yStart: Start point +// yLength: Line Length +inline void DWIN_Draw_VLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t yLength) { + DWIN_Draw_Line(color, xStart, yStart, xStart, yStart + yLength - 1); +} + +// Draw a rectangle +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xEnd/yEnd: lower right point +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, + uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +// Draw a box +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xSize/ySize: box size +inline void DWIN_Draw_Box(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xSize, uint16_t ySize) { + DWIN_Draw_Rectangle(mode, color, xStart, yStart, xStart + xSize - 1, yStart + ySize - 1); +} + +// Move a screen area +// mode: 0, circle shift; 1, translation +// dir: 0=left, 1=right, 2=up, 3=down +// dis: Distance +// color: Fill color +// xStart/yStart: upper left point +// xEnd/yEnd: bottom right point +void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, + uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +/*---------------------------------------- Text related functions ----------------------------------------*/ + +// Draw a string +// bShow: true=display background color; false=don't display background color +// size: Font size +// color: Character color +// bColor: Background color +// x/y: Upper-left coordinate of the string +// *string: The string +void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string); + +class __FlashStringHelper; + +inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(bShow, size, color, bColor, x, y, (char *)title); +} + +// Draw a positive integer +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of digits +// x/y: Upper-left coordinate +// value: Integer value +void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value); + +// Draw a floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Draw JPG and cached in #0 virtual display area +// id: Picture ID +void DWIN_JPG_ShowAndCache(const uint8_t id); + +// Draw an Icon +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y); + +// Unzip the JPG picture to a virtual display area +// n: Cache index +// id: Picture ID +void DWIN_JPG_CacheToN(uint8_t n, uint8_t id); + +// Unzip the JPG picture to virtual display area #1 +// id: Picture ID +inline void DWIN_JPG_CacheTo1(uint8_t id) { DWIN_JPG_CacheToN(1, id); } + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Animate a series of icons +// animID: Animation ID up to 16 +// animate: animation on or off +// libID: Icon library ID +// picIDs: Icon starting ID +// picIDe: Icon ending ID +// x/y: Upper-left point +// interval: Display time interval, unit 10mS +void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, + uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval); + +// Animation Control +// state: 16 bits, each bit is the state of an animation id +void DWIN_ICON_AnimationControl(uint16_t state); diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp new file mode 100644 index 000000000000..c7b37319c4df --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp @@ -0,0 +1,180 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfig.h" + +#if IS_DWIN_MARLINUI + +#include "dwin_string.h" +//#include "../../fontutils.h" + +uint8_t DWIN_String::data[]; +uint16_t DWIN_String::span; +uint8_t DWIN_String::len; + +void DWIN_String::set() { + //*data = 0x00; + memset(data, 0x00, sizeof(data)); + span = 0; + len = 0; +} + +uint8_t read_byte(uint8_t *byte) { return *byte; } + +/** + * Add a string, applying substitutions for the following characters: + * + * = displays '0'....'10' for indexes 0 - 10 + * ~ displays '1'....'11' for indexes 0 - 10 + * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) + */ +void DWIN_String::add(uint8_t *string, int8_t index, uint8_t *itemString) { + wchar_t wchar; + + while (*string) { + string = get_utf8_value_cb(string, read_byte, &wchar); + if (wchar > 255) wchar |= 0x0080; + uint8_t ch = uint8_t(wchar & 0x00FF); + + if (ch == '=' || ch == '~' || ch == '*') { + if (index >= 0) { + int8_t inum = index + ((ch == '=') ? 0 : LCD_FIRST_TOOL); + if (ch == '*') add_character('E'); + if (inum >= 10) { add_character('0' + (inum / 10)); inum %= 10; } + add_character('0' + inum); + } + else { + add(index == -2 ? GET_TEXT(MSG_CHAMBER) : GET_TEXT(MSG_BED)); + } + continue; + } + else if (ch == '$' && itemString) { + add(itemString); + continue; + } + + add_character(ch); + } + eol(); +} + +void DWIN_String::add(uint8_t *string, uint8_t max_len) { + wchar_t wchar; + while (*string && max_len) { + string = get_utf8_value_cb(string, read_byte, &wchar); + /* + if (wchar > 255) wchar |= 0x0080; + uint8_t ch = uint8_t(wchar & 0x00FF); + add_character(ch); + */ + add(wchar); + max_len--; + } + eol(); +} + +void DWIN_String::add(wchar_t character) { + int ret; + size_t idx = 0; + dwin_charmap_t pinval; + dwin_charmap_t *copy_address = nullptr; + pinval.uchar = character; + pinval.idx = -1; + + // For 8-bit ASCII just print the single character + char str[] = { '?', 0 }; + if (character < 255) { + str[0] = (char)character; + } + else { + copy_address = nullptr; + ret = pf_bsearch_r((void *)g_dwin_charmap_device, COUNT(g_dwin_charmap_device), pf_bsearch_cb_comp_dwinmap_pgm, (void *)&pinval, &idx); + if (ret >= 0) { + copy_address = (dwin_charmap_t*)(g_dwin_charmap_device + idx); + } + else { + ret = pf_bsearch_r((void *)g_dwin_charmap_common, COUNT(g_dwin_charmap_common), pf_bsearch_cb_comp_dwinmap_pgm, (void *)&pinval, &idx); + if (ret >= 0) + copy_address = (dwin_charmap_t*)(g_dwin_charmap_common + idx); + } + if (ret >= 0) { + dwin_charmap_t localval; + memcpy_P(&localval, copy_address, sizeof(localval)); + str[0] = localval.idx; + str[1] = localval.idx2; + } + } + if (str[0]) add_character(str[0]); + if (str[1]) add_character(str[1]); +} + +void DWIN_String::add_character(uint8_t character) { + if (len < MAX_STRING_LENGTH) { + data[len] = character; + len++; + //span += glyph(character)->DWidth; + } +} + +void DWIN_String::rtrim(uint8_t character) { + while (len) { + if (data[len - 1] == 0x20 || data[len - 1] == character) { + len--; + //span -= glyph(data[length])->DWidth; + eol(); + } + else + break; + } +} + +void DWIN_String::ltrim(uint8_t character) { + uint16_t i, j; + for (i = 0; (i < len) && (data[i] == 0x20 || data[i] == character); i++) { + //span -= glyph(data[i])->DWidth; + } + if (i == 0) return; + for (j = 0; i < len; data[j++] = data[i++]); + len = j; + eol(); +} + +void DWIN_String::trim(uint8_t character) { + rtrim(character); + ltrim(character); +} + +/* return v1 - v2 */ +int dwin_charmap_compare(dwin_charmap_t *v1, dwin_charmap_t *v2) { + return (v1->uchar < v2->uchar) ? -1 : (v1->uchar > v2->uchar) ? 1 : 0; +} + +int pf_bsearch_cb_comp_dwinmap_pgm(void *userdata, size_t idx, void * data_pin) { + dwin_charmap_t localval; + dwin_charmap_t *p_dwin_charmap = (dwin_charmap_t *)userdata; + memcpy_P(&localval, p_dwin_charmap + idx, sizeof(localval)); + return dwin_charmap_compare(&localval, (dwin_charmap_t *)data_pin); +} + +DWIN_String dwin_string; + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h new file mode 100644 index 000000000000..d78d774095bf --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h @@ -0,0 +1,1007 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + + +#include "../../fontutils.h" +#include "../../marlinui.h" + +typedef struct _dwin_charmap_t { + wchar_t uchar; // the unicode char + uint8_t idx; // the glyph of the char in the ROM + uint8_t idx2; // the char used to be combined with the idx to simulate a single char +} dwin_charmap_t; + +#define MAX_STRING_LENGTH 64 + +#define S(V) (char*)(V) + +class DWIN_String { + private: + //static glyph_t *glyphs[256]; + //static font_t *font_header; + + static uint8_t data[MAX_STRING_LENGTH + 1]; + static uint16_t span; // in pixels + static uint8_t len; // in characters + + static void add_character(uint8_t character); + static void eol() { data[len] = 0x00; } + + public: + //static void set_font(const uint8_t *font); + //static void add_glyphs(const uint8_t *font); + + //static font_t *font() { return font_header; }; + //static uint16_t font_height() { return font_header->FontAscent - font_header->FontDescent; } + //static glyph_t *glyph(uint8_t character) { return glyphs[character] ?: glyphs[0x3F]; } /* Use '?' for unknown glyphs */ + //static inline glyph_t *glyph(uint8_t *character) { return glyph(*character); } + + static void set(); + //static void add(uint8_t character) { add_character(character); eol(); } + static void add(wchar_t character); + static void add(uint8_t *string, uint8_t max_len=MAX_STRING_LENGTH); + static void add(uint8_t *string, int8_t index, uint8_t *itemString=nullptr); + static void set(uint8_t *string) { set(); add(string); } + static void set(wchar_t character) { set(); add(character); } + static void set(uint8_t *string, int8_t index, const char *itemString=nullptr) { set(); add(string, index, (uint8_t *)itemString); } + static inline void set(const __FlashStringHelper *fstring) { set((uint8_t *)fstring); } + static inline void set(const char *string) { set((uint8_t *)string); } + static inline void set(const char *string, int8_t index, const char *itemString=nullptr) { set((uint8_t *)string, index, itemString); } + static inline void add(const char *string) { add((uint8_t *)string); } + + static void trim(uint8_t character=0x20); + static void rtrim(uint8_t character=0x20); + static void ltrim(uint8_t character=0x20); + + static void truncate(uint8_t maxlen) { if (len > maxlen) { len = maxlen; eol(); } } + + static uint8_t length() { return len; } + static uint16_t width() { return span; } + static uint8_t *string() { return data; } + static uint16_t center(uint16_t width) { return span > width ? 0 : (width - span) / 2; } +}; + +int dwin_charmap_compare(dwin_charmap_t *v1, dwin_charmap_t *v2); +int pf_bsearch_cb_comp_dwinmap_pgm(void *userdata, size_t idx, void * data_pin); + +extern DWIN_String dwin_string; + +#ifdef __AVR__ + #define IV(a) U##a +#else + #define IV(a) L##a +#endif + +const dwin_charmap_t g_dwin_charmap_device[] PROGMEM = { + // sorted by uchar: + #if DISPLAY_CHARSET_HD44780 == JAPANESE + + {IV('¢'), 0xEC, 0}, // A2 + {IV('°'), 0xDF, 0}, // B0, Marlin special: '°' LCD_STR_DEGREE (0x09) + {IV('ä'), 0xE1, 0}, // E4 + {IV('ö'), 0xEF, 0}, // F6 + {IV('÷'), 0xFD, 0}, // 00F7 + {IV('ü'), 0xF5, 0}, // 00FC + {IV('ˣ'), 0xEB, 0}, // 02E3 + + {IV('·'), 0xA5, 0}, // 0387 + {IV('Ώ'), 0xF4, 0}, // 038F + {IV('Θ'), 0xF2, 0}, // 0398, Theta + {IV('Ξ'), 0xE3, 0}, // 039E, Xi + {IV('Σ'), 0xF6, 0}, // 03A3, Sigma + {IV('Ω'), 0xF4, 0}, // 03A9, Omega + {IV('ά'), 0xE0, 0}, // 03AC + {IV('έ'), 0xE3, 0}, // 03AD + {IV('α'), 0xE0, 0}, // 03B1, alpha + {IV('β'), 0xE2, 0}, // 03B2, beta + {IV('ε'), 0xE3, 0}, // 03B5, epsilon + {IV('θ'), 0xF2, 0}, // 03B8, theta + {IV('μ'), 0xE4, 0}, // 03BC, mu + {IV('ξ'), 0xE3, 0}, // 03BE, xi + {IV('π'), 0xF7, 0}, // 03C0, pi + {IV('ρ'), 0xE6, 0}, // 03C1, rho + {IV('σ'), 0xE5, 0}, // 03C3, sigma + + {IV('←'), 0x7F, 0}, // 2190 + {IV('→'), 0x7E, 0}, // 2192, Marlin special: '⮈⮉⮊⮋➤→' LCD_STR_ARROW_RIGHT (0x03) + {IV('√'), 0xE8, 0}, // 221A + {IV('∞'), 0xF3, 0}, // 221E + {IV('█'), 0xFF, 0}, // 2588 + + //{IV(''), 0xA0, 0}, + {IV('。'), 0xA1, 0}, + {IV('「'), 0xA2, 0}, + {IV('」'), 0xA3, 0}, + {IV('゛'), 0xDE, 0}, // ‶ + {IV('゜'), 0xDF, 0}, // '〫' + {IV('゠'), '=', 0}, + {IV('ァ'), 0xA7, 0}, + {IV('ア'), 0xB1, 0}, + {IV('ィ'), 0xA8, 0}, + {IV('イ'), 0xB2, 0}, + {IV('ゥ'), 0xA9, 0}, + {IV('ウ'), 0xB3, 0}, + {IV('ェ'), 0xAA, 0}, + {IV('エ'), 0xB4, 0}, + {IV('ォ'), 0xAB, 0}, + + {IV('オ'), 0xB5, 0}, + {IV('カ'), 0xB6, 0}, + {IV('ガ'), 0xB6, 0xDE}, + {IV('キ'), 0xB7, 0}, + {IV('ギ'), 0xB7, 0xDE}, + {IV('ク'), 0xB8, 0}, + {IV('グ'), 0xB8, 0xDE}, + {IV('ケ'), 0xB9, 0}, + {IV('ゲ'), 0xB9, 0xDE}, + {IV('コ'), 0xBA, 0}, + {IV('ゴ'), 0xBA, 0xDE}, + {IV('サ'), 0xBB, 0}, + {IV('ザ'), 0xBB, 0xDE}, + {IV('シ'), 0xBC, 0}, + {IV('ジ'), 0xBC, 0xDE}, + {IV('ス'), 0xBD, 0}, + {IV('ズ'), 0xBD, 0xDE}, + {IV('セ'), 0xBE, 0}, + {IV('ゼ'), 0xBE, 0xDE}, + {IV('ソ'), 0xBF, 0}, + {IV('ゾ'), 0xBF, 0xDE}, + + {IV('タ'), 0xC0, 0}, + {IV('ダ'), 0xC0, 0xDE}, + {IV('チ'), 0xC1, 0}, + {IV('ヂ'), 0xC1, 0xDE}, + {IV('ッ'), 0xAF, 0}, + {IV('ツ'), 0xC2, 0}, + {IV('ヅ'), 0xC2, 0xDE}, + {IV('テ'), 0xC3, 0}, + {IV('デ'), 0xC3, 0xDE}, + {IV('ト'), 0xC4, 0}, + {IV('ド'), 0xC4, 0xDE}, + {IV('ナ'), 0xC5, 0}, + {IV('ニ'), 0xC6, 0}, + {IV('ヌ'), 0xC7, 0}, + {IV('ネ'), 0xC8, 0}, + {IV('ノ'), 0xC9, 0}, + {IV('ハ'), 0xCA, 0}, + {IV('バ'), 0xCA, 0xDE}, + {IV('パ'), 0xCA, 0xDF}, + {IV('ヒ'), 0xCB, 0}, + {IV('ビ'), 0xCB, 0xDE}, + {IV('ピ'), 0xCB, 0xDF}, + {IV('フ'), 0xCC, 0}, + {IV('ブ'), 0xCC, 0xDE}, + {IV('プ'), 0xCC, 0xDF}, + {IV('ヘ'), 0xCD, 0}, + {IV('ベ'), 0xCD, 0xDE}, + {IV('ペ'), 0xCD, 0xDF}, + {IV('ホ'), 0xCE, 0}, + {IV('ボ'), 0xCE, 0xDE}, + {IV('ポ'), 0xCE, 0xDF}, + {IV('マ'), 0xCF, 0}, + + {IV('ミ'), 0xD0, 0}, + {IV('ム'), 0xD1, 0}, + {IV('メ'), 0xD2, 0}, + {IV('モ'), 0xD3, 0}, + {IV('ャ'), 0xAC, 0}, + {IV('ヤ'), 0xD4, 0}, + {IV('ュ'), 0xAD, 0}, + {IV('ユ'), 0xD5, 0}, + {IV('ョ'), 0xAE, 0}, + {IV('ヨ'), 0xD6, 0}, + {IV('ラ'), 0xD7, 0}, + {IV('リ'), 0xD8, 0}, + {IV('ル'), 0xD9, 0}, + {IV('レ'), 0xDA, 0}, + {IV('ロ'), 0xDB, 0}, + {IV('ワ'), 0xDC, 0}, + {IV('ヲ'), 0xA6, 0}, + {IV('ン'), 0xDD, 0}, + {IV('ヴ'), 0xB3, 0xDE}, + {IV('ヷ'), 0xDC, 0xDE}, + {IV('ヺ'), 0xA6, 0xDE}, + {IV('・'), 0xA5, 0}, + {IV('ー'), 0xB0, 0}, + {IV('ヽ'), 0xA4, 0}, + + //{IV('g'), 0xE7, 0}, // error + //{IV(''), 0xE9, 0}, + //{IV('j'), 0xEA, 0}, // error + //{IV(''), 0xED, 0}, + //{IV(''), 0xEE, 0}, + + //{IV('p'), 0xF0, 0}, // error + //{IV('q'), 0xF1, 0}, // error + //{IV(''), 0xF8, 0}, + //{IV('y'), 0xF9, 0}, // error + {IV('万'), 0xFB, 0}, + {IV('円'), 0xFC, 0}, + {IV('千'), 0xFA, 0}, + //{IV(''), 0xFE, 0}, + + //、・ヲァィゥェォャュョッー + {IV('、'), 0xA4, 0}, //ヽ + {IV('・'), 0xA5, 0}, //・ + {IV('ヲ'), 0xA6, 0}, //ヲ + {IV('ァ'), 0xA7, 0}, //ァ + {IV('ィ'), 0xA8, 0}, //ィ + {IV('ゥ'), 0xA9, 0}, //ゥ + {IV('ェ'), 0xAA, 0}, //ェ + {IV('ォ'), 0xAB, 0}, //ォ + {IV('ャ'), 0xAC, 0}, //ャ + {IV('ュ'), 0xAD, 0}, //ュ + {IV('ョ'), 0xAE, 0}, //ョ + {IV('ッ'), 0xAF, 0}, //ッ + {IV('ー'), 0xB0, 0}, //ー + + //アイウエオカキクケコサシスセ + {IV('ア'), 0xB1, 0}, //ア + {IV('イ'), 0xB2, 0}, //イ + {IV('ウ'), 0xB3, 0}, //ウ + {IV('エ'), 0xB4, 0}, //エ + {IV('オ'), 0xB5, 0}, //オ + {IV('カ'), 0xB6, 0}, //カ + {IV('キ'), 0xB7, 0}, //キ + {IV('ク'), 0xB8, 0}, //ク + {IV('ケ'), 0xB9, 0}, //ケ + {IV('コ'), 0xBA, 0}, //コ + {IV('サ'), 0xBB, 0}, //サ + {IV('シ'), 0xBC, 0}, //シ + {IV('ス'), 0xBD, 0}, //ス + {IV('セ'), 0xBE, 0}, //セ + + //ソタチツテトナニヌネノハヒフ + {IV('ソ'), 0xBF, 0}, //ソ + {IV('タ'), 0xC0, 0}, //タ + {IV('チ'), 0xC1, 0}, //チ + {IV('ツ'), 0xC2, 0}, //ツ + {IV('テ'), 0xC3, 0}, //テ + {IV('ト'), 0xC4, 0}, //ト + {IV('ナ'), 0xC5, 0}, //ナ + {IV('ニ'), 0xC6, 0}, //ニ + {IV('ヌ'), 0xC7, 0}, //ヌ + {IV('ネ'), 0xC8, 0}, //ネ + {IV('ノ'), 0xC9, 0}, //ノ + {IV('ハ'), 0xCA, 0}, //ハ + {IV('ヒ'), 0xCB, 0}, //ヒ + {IV('フ'), 0xCC, 0}, //フ + + //ヘホマミムメモヤユヨラリルレロワン゙゚ + {IV('ヘ'), 0xCD, 0}, //ヘ + {IV('ホ'), 0xCE, 0}, //ホ + {IV('マ'), 0xCF, 0}, //マ + {IV('ミ'), 0xD0, 0}, //ミ + {IV('ム'), 0xD1, 0}, //ム + {IV('メ'), 0xD2, 0}, //メ + {IV('モ'), 0xD3, 0}, //モ + {IV('ヤ'), 0xD4, 0}, //ヤ + {IV('ユ'), 0xD5, 0}, //ユ + {IV('ヨ'), 0xD6, 0}, //ヨ + {IV('ラ'), 0xD7, 0}, //ラ + {IV('リ'), 0xD8, 0}, //リ + {IV('ル'), 0xD9, 0}, //ル + {IV('レ'), 0xDA, 0}, //レ + {IV('ロ'), 0xDB, 0}, //ロ + {IV('ワ'), 0xDC, 0}, //ワ + {IV('ン'), 0xDD, 0}, //ン + {IV('゙'), 0xDE, 0}, // ゛ + {IV('゚'), 0xDF, 0}, // ゜ + + {IV('¥'), 0x5C, 0}, + + #elif DISPLAY_CHARSET_HD44780 == WESTERN + // 0x10 -- 0x1F (except 0x1C) + // 0x80 -- 0xFF (except 0xA7,0xB0,0xB1,0xB3,0xB4,0xBF,0xD1,0xF8,0xFA,0xFC-0xFF) + + {IV('¡'), 0xA9, 0}, + {IV('¢'), 0xA4, 0}, + {IV('£'), 0xA5, 0}, + {IV('¥'), 0xA6, 0}, + {IV('§'), 0xD2, 0}, // section sign + {IV('©'), 0xCF, 0}, + + {IV('ª'), 0x9D, 0}, + {IV('«'), 0xBB, 0}, + {IV('®'), 0xCE, 0}, + + {IV('°'), 0xB2, 0}, // Marlin special: '°' LCD_STR_DEGREE (0x09) + //{IV(''), 0xD1, 0}, + {IV('±'), 0x10, 0}, //∓± + //{'='), 0x1C, 0}, // error + {IV('²'), 0x1E, 0}, + {IV('³'), 0x1F, 0}, + {IV('¶'), 0xD3, 0}, // pilcrow sign + {IV('º'), 0x9E, 0}, + {IV('»'), 0xBC, 0}, // 00BB + //{IV(''), 0xB3, 0}, // error + //{IV(''), 0xB4, 0}, // error + {IV('¼'), 0xB6, 0}, // 00BC + {IV('½'), 0xB5, 0}, // 00BD + //{IV('¾'), '3', 0}, // 00BE + {IV('¿'), 0x9F, 0}, // 00BF + + {IV('Â'), 0x8F, 0}, + {IV('Ã'), 0xAA, 0}, + {IV('Ä'), 0x8E, 0}, + {IV('Æ'), 0x92, 0}, + {IV('Ç'), 0x80, 0}, + {IV('É'), 0x90, 0}, + {IV('Ñ'), 0x9C, 0}, + {IV('Õ'), 0xAC, 0}, + {IV('Ö'), 0x99, 0}, + {IV('×'), 0xB7, 0}, + {IV('Ø'), 0xAE, 0}, + {IV('Ü'), 0x9A, 0}, + {IV('à'), 0x85, 0}, + {IV('á'), 0xA0, 0}, + {IV('â'), 0x83, 0}, + {IV('ã'), 0xAB, 0}, + {IV('ä'), 0x84, 0}, + {IV('å'), 0x86, 0}, + {IV('æ'), 0x91, 0}, + {IV('ç'), 0x87, 0}, + {IV('è'), 0x8A, 0}, + {IV('é'), 0x82, 0}, + {IV('ê'), 0x88, 0}, + {IV('ë'), 0x89, 0}, + {IV('ì'), 0x8D, 0}, + {IV('í'), 0xA1, 0}, + {IV('î'), 0x8C, 0}, + {IV('ï'), 0x8B, 0}, + + {IV('ñ'), 0x9B, 0}, + {IV('ò'), 0x95, 0}, + {IV('ó'), 0xA2, 0}, + {IV('ô'), 0x93, 0}, + {IV('õ'), 0xAD, 0}, + {IV('ö'), 0x94, 0}, + {IV('÷'), 0xB8, 0}, + {IV('ø'), 0xAF, 0}, + {IV('ù'), 0x97, 0}, + {IV('ú'), 0xA3, 0}, + {IV('û'), 0x96, 0}, + {IV('ü'), 0x81, 0}, + {IV('ÿ'), 0x98, 0}, + + //{IV(''), 0xB0, 0}, // error + //{IV(''), 0xB1, 0}, // error + {IV('ƒ'), 0xA8, 0}, // 0192 + + {IV('Ύ'), 0xDB, 0}, // 038E + {IV('Ώ'), 0xDE, 0}, // 038F + {IV('ΐ'), 0xE7, 0}, // 0390 + + {IV('Γ'), 0xD4, 0}, // 0393, Gamma + {IV('Δ'), 0xD5, 0}, // 0394, Delta, ◿ + {IV('Θ'), 0xD6, 0}, // 0398, Theta + {IV('Λ'), 0xD7, 0}, // 039B, Lambda + {IV('Ξ'), 0xD8, 0}, // 039E, Xi + {IV('Π'), 0xD9, 0}, // Pi + {IV('Σ'), 0xDA, 0}, // Sigma + {IV('Υ'), 0xDB, 0}, // Upsilon + {IV('Φ'), 0xDC, 0}, // Phi + {IV('Ψ'), 0xDD, 0}, // Psi + {IV('Ω'), 0xDE, 0}, // Omega + + {IV('ά'), 0xDF, 0}, // 03AC + {IV('έ'), 0xE3, 0}, // 03AD + {IV('ή'), 0xE5, 0}, // 03AE + {IV('ί'), 0xE7, 0}, // 03AF + {IV('ΰ'), 0xF1, 0}, // 03B0 + + {IV('α'), 0xDF, 0}, // alpha + {IV('β'), 0xE0, 0}, // beta + {IV('γ'), 0xE1, 0}, // gamma + {IV('δ'), 0xE2, 0}, // delta + {IV('ε'), 0xE3, 0}, // epsilon + {IV('ζ'), 0xE4, 0}, // zeta + {IV('η'), 0xE5, 0}, // eta + {IV('θ'), 0xE6, 0}, // theta + {IV('ι'), 0xE7, 0}, // lota + {IV('κ'), 0xE8, 0}, // kappa + {IV('λ'), 0xE9, 0}, // lambda + {IV('μ'), 0xEA, 0}, // mu + {IV('ν'), 0xEB, 0}, // nu + {IV('ξ'), 0xEC, 0}, // xi + {IV('π'), 0xED, 0}, // pi + {IV('ρ'), 0xEE, 0}, // rho + {IV('σ'), 0xEF, 0}, // sigma + + {IV('τ'), 0xF0, 0}, // tau + {IV('υ'), 0xF1, 0}, // upsilon + {IV('χ'), 0xF2, 0}, // chi + {IV('ψ'), 0xF3, 0}, // psi + {IV('ω'), 0xF4, 0}, // 03C9, omega + {IV('ϊ'), 0xE7, 0}, // 03CA + {IV('ϋ'), 0xF1, 0}, // 03CB + {IV('ύ'), 0xF1, 0}, // 03CD + {IV('ώ'), 0xF4, 0}, // 03CE + + {IV('•'), 0xCD, 0}, // · + {IV('℞'), 0xA7, 0}, // ℞ Pt ASCII 158 + {IV('™'), 0xD0, 0}, + {IV('↤'), 0xF9, 0}, // ⟻ + {IV('↵'), 0xC4, 0}, + {IV('↻'), 0x04, 0}, // Marlin special: '↻↺⟳⟲' LCD_STR_REFRESH (0x01) + {IV('⇥'), 0xFB, 0}, + {IV('√'), 0xBE, 0}, // √ + {IV('∞'), 0xC2, 0}, // infinity + {IV('∫'), 0x1B, 0}, + {IV('∼'), 0x1D, 0}, + {IV('≈'), 0x1A, 0}, + {IV('≠'), 0xBD, 0}, + {IV('≡'), 0x11, 0}, + {IV('≤'), 0xB9, 0},// ≤≥ ⩽⩾ + {IV('≥'), 0xBA, 0}, + //{IV(''), 0xBF, 0}, // error + + {IV('⌠'), 0xC0, 0}, + {IV('⌡'), 0xC1, 0}, + + {IV('⎧'), 0x14, 0}, + {IV('⎩'), 0x15, 0}, + {IV('⎫'), 0x16, 0}, + {IV('⎭'), 0x17, 0}, + {IV('⎰'), 0x18, 0}, + {IV('⎱'), 0x19, 0}, + + {IV('⎲'), 0x12, 0}, + {IV('⎳'), 0x13, 0}, + + {IV('⏱'), 0x07, 0}, // Marlin special: '🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚🕛🕜🕝🕞🕟🕠🕡🕢🕣🕤🕥🕦🕧 ⌚⌛⏰⏱⏳⧖⧗' LCD_STR_CLOCK (0x05) + {IV('┌'), 0xC9, 0}, + {IV('┐'), 0xCA, 0}, + {IV('└'), 0xCB, 0}, + {IV('┘'), 0xCC, 0}, + {IV('◸'), 0xC3, 0}, // ◿ + {IV('⭠'), 0xC8, 0}, + {IV('⭡'), 0xC5, 0}, + {IV('⭢'), 0xC7, 0}, + {IV('⭣'), 0xC6, 0}, + + + {IV('⯆'), 0xF5, 0}, + {IV('⯇'), 0xF7, 0}, // ⯅ + {IV('⯈'), 0xF6, 0}, + //{IV(''), 0xF8, 0}, // error + //{IV(''), 0xFA, 0}, // error + //{IV(''), 0xFC, 0}, // error + //{IV(''), 0xFD, 0}, // error + //{IV(''), 0xFE, 0}, // error + //{IV(''), 0xFF, 0}, // error + + #elif DISPLAY_CHARSET_HD44780 == CYRILLIC + + {IV('¢'), 0x5C, 0}, // 00A2 + {IV('£'), 0xCF, 0}, // 00A3 + {IV('°'), 0x01, 0}, // 00B0, Marlin special: '°' LCD_STR_DEGREE (0x09) + + //{IV(''), 0x80, 0}, + //{IV(''), 0x81, 0}, + //{IV(''), 0x82, 0}, + //{IV(''), 0x83, 0}, + //{IV(''), 0x84, 0}, + //{IV(''), 0x85, 0}, + //{IV(''), 0x86, 0}, + //{IV(''), 0x87, 0}, + //{IV(''), 0x88, 0}, + //{IV(''), 0x89, 0}, + //{IV(''), 0x8A, 0}, + //{IV(''), 0x8B, 0}, + //{IV(''), 0x8C, 0}, + //{IV(''), 0x8D, 0}, + //{IV(''), 0x8E, 0}, + //{IV(''), 0x8F, 0}, + + //{IV(''), 0x90, 0}, + //{IV(''), 0x91, 0}, + //{IV(''), 0x92, 0}, + //{IV(''), 0x93, 0}, + //{IV(''), 0x94, 0}, + //{IV(''), 0x95, 0}, + //{IV(''), 0x96, 0}, + //{IV(''), 0x97, 0}, + //{IV(''), 0x98, 0}, + //{IV(''), 0x99, 0}, + //{IV(''), 0x9A, 0}, + //{IV(''), 0x9B, 0}, + //{IV(''), 0x9C, 0}, + //{IV(''), 0x9D, 0}, + //{IV(''), 0x9E, 0}, + //{IV(''), 0x9F, 0}, + + + {IV('¼'), 0xF0, 0}, // 00BC + {IV('⅓'), 0xF1, 0}, + {IV('½'), 0xF2, 0}, // 00BD + {IV('¾'), 0xF3, 0}, // 00BE + {IV('¿'), 0xCD, 0}, // 00BF + + #if ENABLED(DISPLAY_CHARSET_ISO10646_5) + + // Map Cyrillic to HD44780 extended CYRILLIC where possible + {IV('Ё'), 0xA2, 0}, // 0401 + {IV('А'), 'A', 0}, // 0410 + {IV('Б'), 0xA0, 0}, + {IV('В'), 'B', 0}, + {IV('Г'), 0xA1, 0}, + {IV('Д'), 0xE0, 0}, + {IV('Е'), 'E', 0}, + {IV('Ж'), 0xA3, 0}, + {IV('З'), 0xA4, 0}, + {IV('И'), 0xA5, 0}, + {IV('Й'), 0xA6, 0}, + {IV('К'), 'K', 0}, + {IV('Л'), 0xA7, 0}, + {IV('М'), 'M', 0}, + {IV('Н'), 'H', 0}, + {IV('О'), 'O', 0}, + {IV('П'), 0xA8, 0}, + {IV('Р'), 'P', 0}, + {IV('С'), 'C', 0}, + {IV('Т'), 'T', 0}, + {IV('У'), 0xA9, 0}, + {IV('Ф'), 0xAA, 0}, + {IV('Х'), 'X', 0}, + {IV('Ц'), 0xE1, 0}, + {IV('Ч'), 0xAB, 0}, + {IV('Ш'), 0xAC, 0}, + {IV('Щ'), 0xE2, 0}, + {IV('Ъ'), 0xAD, 0}, + {IV('Ы'), 0xAE, 0}, + {IV('Ь'), 'b', 0}, + {IV('Э'), 0xAF, 0}, + {IV('Ю'), 0xB0, 0}, + {IV('Я'), 0xB1, 0}, + {IV('а'), 'a', 0}, + + {IV('б'), 0xB2, 0}, + {IV('в'), 0xB3, 0}, + {IV('г'), 0xB4, 0}, + {IV('д'), 0xE3, 0}, + {IV('е'), 'e', 0}, + {IV('ж'), 0xB6, 0}, + {IV('з'), 0xB7, 0}, + {IV('и'), 0xB8, 0}, + {IV('й'), 0xB9, 0}, + {IV('к'), 0xBA, 0}, //клмноп + {IV('л'), 0xBB, 0}, + {IV('м'), 0xBC, 0}, + {IV('н'), 0xBD, 0}, + {IV('о'), 'o', 0}, + {IV('п'), 0xBE, 0}, + {IV('р'), 'p', 0}, + {IV('с'), 'c', 0}, + {IV('т'), 0xBF, 0}, + + {IV('у'), 'y', 0}, + {IV('ф'), 0xE4, 0}, + {IV('х'), 'x', 0}, + {IV('ц'), 0xE5, 0}, + {IV('ч'), 0xC0, 0}, + {IV('ш'), 0xC1, 0}, + {IV('щ'), 0xE6, 0}, + {IV('ъ'), 0xC2, 0}, + {IV('ы'), 0xC3, 0}, + {IV('ь'), 0xC4, 0}, + {IV('э'), 0xC5, 0}, + {IV('ю'), 0xC6, 0}, + {IV('я'), 0xC7, 0}, // 044F + {IV('ё'), 0xB5, 0}, // 0451 + //{IV(''), 0xC8, 0}, + //{IV(''), 0xC9, 0}, + //{IV(''), 0xCA, 0}, + //{IV(''), 0xCB, 0}, + //{IV(''), 0xCC, 0}, + //{IV(''), 0xCD, 0}, + //{IV(''), 0xCE, 0}, + + //{IV(''), 0xD0, 0}, + //{IV(''), 0xD1, 0}, + //{IV(''), 0xD2, 0}, + //{IV(''), 0xD3, 0}, + //{IV(''), 0xD4, 0}, + //{IV(''), 0xD5, 0}, + //{IV(''), 0xD6, 0}, + //{IV(''), 0xD7, 0}, + //{IV(''), 0xD8, 0}, + //{IV(''), 0xDB, 0}, + //{IV(''), 0xDC, 0}, + //{IV(''), 0xDD, 0}, + //{IV(''), 0xDE, 0}, + //{IV(''), 0xDF, 0}, + + //{IV(''), 0xE7, 0}, + //{IV(''), 0xE8, 0}, + //{IV(''), 0xE9, 0}, + //{IV(''), 0xEA, 0}, + //{IV(''), 0xEB, 0}, + //{IV(''), 0xEC, 0}, + //{IV(''), 0xED, 0}, + //{IV(''), 0xEE, 0}, + //{IV(''), 0xEF, 0}, + + //{IV(''), 0xF4, 0}, + //{IV(''), 0xF5, 0}, + //{IV(''), 0xF6, 0}, + //{IV(''), 0xF7, 0}, + //{IV(''), 0xF8, 0}, + //{IV(''), 0xF9, 0}, + //{IV(''), 0xFA, 0}, + //{IV(''), 0xFB, 0}, + //{IV(''), 0xFC, 0}, + //{IV(''), 0xFD, 0}, + //{IV(''), 0xFE, 0}, + //{IV(''), 0xFF, 0}, + + #endif + + {IV('↑'), 0xD9, 0}, // 2191 ←↑→↓ + {IV('↓'), 0xDA, 0}, // 2193 + #endif +}; + +// the plain ASCII replacement for various char +const dwin_charmap_t g_dwin_charmap_common[] PROGMEM = { + {IV('¡'), 'i', 0}, // A1 + {IV('¢'), 'c', 0}, // A2 + {IV('°'), 0x09, 0}, // B0 Marlin special: '°' LCD_STR_DEGREE (0x09) + + // Map WESTERN code to plain ASCII + {IV('Á'), 'A', 0}, // C1 + {IV('Â'), 'A', 0}, // C2 + {IV('Ã'), 'A', 0}, // C3 + {IV('Ä'), 'A', 0}, // C4 + {IV('Å'), 'A', 0}, // C5 + {IV('Æ'), 'A', 'E'}, // C6 + {IV('Ç'), 'C', 0}, // C7 + {IV('È'), 'E', 0}, // C8 + {IV('É'), 'E', 0}, // C9 + {IV('Í'), 'I', 0}, // CD + {IV('Ñ'), 'N', 0}, // D1 + {IV('Õ'), 'O', 0}, // D5 + {IV('Ö'), 'O', 0}, // D6 + {IV('×'), 'x', 0}, // D7 + {IV('Ü'), 'U', 0}, // DC + {IV('Ý'), 'Y', 0}, // DD + {IV('à'), 'a', 0}, // E0 + {IV('á'), 'a', 0}, + {IV('â'), 'a', 0}, + {IV('ã'), 'a', 0}, + {IV('ä'), 'a', 0}, + {IV('å'), 'a', 0}, + {IV('æ'), 'a', 'e'}, + {IV('ç'), 'c', 0}, + {IV('è'), 'e', 0}, // 00E8 + {IV('é'), 'e', 0}, + {IV('ê'), 'e', 0}, + {IV('ë'), 'e', 0}, + {IV('ì'), 'i', 0}, // 00EC + {IV('í'), 'i', 0}, + {IV('î'), 'i', 0}, + {IV('ï'), 'i', 0}, // 00EF + + {IV('ñ'), 'n', 0}, // 00F1 + {IV('ò'), 'o', 0}, + {IV('ó'), 'o', 0}, + {IV('ô'), 'o', 0}, + {IV('õ'), 'o', 0}, + {IV('ö'), 'o', 0}, + //{IV('÷'), 0xB8, 0}, + {IV('ø'), 'o', 0}, + {IV('ù'), 'u', 0}, + {IV('ú'), 'u', 0}, + {IV('û'), 'u', 0}, + {IV('ü'), 'u', 0}, // FC + {IV('ý'), 'y', 0}, // FD + {IV('ÿ'), 'y', 0}, // FF + + {IV('Ą'), 'A', 0}, // 0104 + {IV('ą'), 'a', 0}, // 0105 + {IV('Ć'), 'C', 0}, // 0106 + {IV('ć'), 'c', 0}, // 0107 + {IV('Č'), 'C', 0}, // 010C + {IV('č'), 'c', 0}, // 010D + {IV('Ď'), 'D', 0}, // 010E + {IV('ď'), 'd', 0}, // 010F + {IV('đ'), 'd', 0}, // 0111 + {IV('ę'), 'e', 0}, // 0119 + {IV('Ě'), 'E', 0}, // 011A + {IV('ě'), 'e', 0}, // 011B + {IV('ğ'), 'g', 0}, // 011F + {IV('İ'), 'I', 0}, // 0130 + {IV('ı'), 'i', 0}, // 0131 + + {IV('Ł'), 'L', 0}, // 0141 + {IV('ł'), 'l', 0}, // 0142 + {IV('Ń'), 'N', 0}, // 0143 + {IV('ń'), 'n', 0}, // 0144 + {IV('ň'), 'n', 0}, // 0148 + + {IV('Ř'), 'R', 0}, // 0158 + {IV('ř'), 'r', 0}, // 0159 + {IV('Ś'), 'S', 0}, // 015A + {IV('ś'), 's', 0}, // 015B + {IV('ş'), 's', 0}, // 015F + {IV('Š'), 'S', 0}, // 0160 + {IV('š'), 's', 0}, // 0161 + {IV('ť'), 't', 0}, // 0165 + {IV('ů'), 'u', 0}, // 016F + {IV('ż'), 'z', 0}, // 017C + {IV('Ž'), 'Z', 0}, // 017D + {IV('ž'), 'z', 0}, // 017E + {IV('ƒ'), 'f', 0}, // 0192 + + {IV('ˣ'), 'x', 0}, // 02E3 + + #if ENABLED(DISPLAY_CHARSET_ISO10646_VI) + + // Map Vietnamese phonetics + + //{IV('à'), 'a', 0}, {IV('À'), 'A', 0}, + {IV('ạ'), 'a', 0}, {IV('Ạ'), 'A', 0}, + {IV('ả'), 'a', 0}, {IV('Ả'), 'A', 0}, + //{IV('ã'), 'a', 0}, {IV('Ã'), 'A', 0}, + //{IV('á'), 'á', 0}, {IV('Á'), 'A', 0}, + {IV('Ạ'), 'A', 0}, + {IV('ă'), 'a', 0}, {IV('Ă'), 'A', 0}, + {IV('ằ'), 'a', 0}, {IV('Ằ'), 'A', 0}, + {IV('ẳ'), 'a', 0}, {IV('Ẳ'), 'A', 0}, + {IV('ẵ'), 'a', 0}, {IV('Ẵ'), 'A', 0}, + {IV('ắ'), 'a', 0}, {IV('Ắ'), 'A', 0}, + {IV('ặ'), 'a', 0}, {IV('Ặ'), 'A', 0}, + {IV('â'), 'a', 0}, {IV('Â'), 'A', 0}, + {IV('ầ'), 'a', 0}, {IV('Ầ'), 'A', 0}, + {IV('ẩ'), 'a', 0}, {IV('Ẩ'), 'A', 0}, + {IV('ẫ'), 'a', 0}, {IV('Ẫ'), 'A', 0}, + {IV('ấ'), 'a', 0}, {IV('Ấ'), 'A', 0}, + {IV('ậ'), 'a', 0}, {IV('Ậ'), 'A', 0}, + //{IV('đ'), 'd', 0}, + {IV('Đ'), 'D', 0}, + {IV('e'), 'e', 0}, {IV('E'), 'E', 0}, + {IV('è'), 'e', 0}, {IV('È'), 'E', 0}, + {IV('ẻ'), 'e', 0}, {IV('Ẻ'), 'E', 0}, + {IV('ẽ'), 'e', 0}, {IV('Ẽ'), 'E', 0}, + {IV('é'), 'e', 0}, {IV('É'), 'E', 0}, + {IV('ẹ'), 'e', 0}, {IV('Ẹ'), 'E', 0}, + {IV('ê'), 'e', 0}, {IV('Ê'), 'E', 0}, + {IV('ề'), 'e', 0}, {IV('Ề'), 'E', 0}, + {IV('ể'), 'e', 0}, {IV('Ể'), 'E', 0}, + {IV('ễ'), 'e', 0}, {IV('Ễ'), 'E', 0}, + {IV('ế'), 'e', 0}, {IV('Ế'), 'E', 0}, + {IV('ệ'), 'e', 0}, {IV('Ệ'), 'E', 0}, + {IV('i'), 'i', 0}, {IV('I'), 'I', 0}, + //{IV('ì'), 'ì', 0}, {IV('Ì'), 'Ì', 0}, + {IV('ỉ'), 'ỉ', 0}, {IV('Ỉ'), 'Ỉ', 0}, + {IV('ĩ'), 'ĩ', 0}, {IV('Ĩ'), 'Ĩ', 0}, + {IV('í'), 'í', 0}, {IV('Í'), 'Í', 0}, + {IV('ị'), 'ị', 0}, {IV('Ị'), 'Ị', 0}, + {IV('o'), 'o', 0}, {IV('O'), 'O', 0}, + {IV('ò'), 'o', 0}, {IV('Ò'), 'O', 0}, + {IV('ỏ'), 'o', 0}, {IV('Ỏ'), 'O', 0}, + {IV('õ'), 'o', 0}, {IV('Õ'), 'O', 0}, + {IV('ó'), 'o', 0}, {IV('Ó'), 'O', 0}, + {IV('ọ'), 'o', 0}, {IV('Ọ'), 'O', 0}, + {IV('ô'), 'o', 0}, {IV('Ô'), 'O', 0}, + {IV('ồ'), 'o', 0}, {IV('Ồ'), 'O', 0}, + {IV('ổ'), 'o', 0}, {IV('Ổ'), 'O', 0}, + {IV('ỗ'), 'o', 0}, {IV('Ỗ'), 'O', 0}, + {IV('ố'), 'o', 0}, {IV('Ố'), 'O', 0}, + {IV('ộ'), 'o', 0}, {IV('Ộ'), 'O', 0}, + {IV('ơ'), 'o', 0}, {IV('Ơ'), 'O', 0}, + {IV('ờ'), 'o', 0}, {IV('Ờ'), 'O', 0}, + {IV('ở'), 'o', 0}, {IV('Ở'), 'O', 0}, + {IV('ỡ'), 'o', 0}, {IV('Ỡ'), 'O', 0}, + {IV('ớ'), 'o', 0}, {IV('Ớ'), 'O', 0}, + {IV('ợ'), 'o', 0}, {IV('Ợ'), 'O', 0}, + {IV('ù'), 'u', 0}, {IV('Ù'), 'U', 0}, + {IV('ủ'), 'u', 0}, {IV('Ủ'), 'U', 0}, + {IV('ũ'), 'u', 0}, {IV('Ũ'), 'U', 0}, + //{IV('ú'), 'u', 0}, {IV('Ú'), 'U', 0}, + {IV('ụ'), 'u', 0}, {IV('Ụ'), 'U', 0}, + {IV('ư'), 'u', 0}, {IV('Ư'), 'U', 0}, + {IV('ừ'), 'u', 0}, {IV('Ừ'), 'U', 0}, + {IV('ử'), 'u', 0}, {IV('Ử'), 'U', 0}, + {IV('ữ'), 'u', 0}, {IV('Ữ'), 'U', 0}, + {IV('ứ'), 'u', 0}, {IV('Ứ'), 'U', 0}, + {IV('ự'), 'u', 0}, {IV('Ự'), 'U', 0}, + {IV('y'), 'y', 0}, {IV('Y'), 'Y', 0}, + + #endif + + #if ENABLED(DISPLAY_CHARSET_ISO10646_GREEK) + + {IV('΄'), '\'', 0}, // 0384 + {IV('΅'), '\'', 0}, // 0385 + {IV('Ά'), 'A', 0}, // 0386 + {IV('·'), '.', 0}, // 0387 + {IV('Έ'), 'E', 0}, // 0388 + {IV('Ή'), 'H', 0}, // 0389 + {IV('Ί'), 'I', 0}, // 038A + {IV('Ό'), 'O', 0}, // 038C + {IV('Ύ'), 'Y', 0}, // 038E + {IV('Ώ'), 'O', 0}, // 038F + {IV('ΐ'), 'i', 0}, // 0390 + {IV('Α'), 'A', 0}, // 0391 + {IV('Β'), 'B', 0}, // 0392 + {IV('Γ'), 'T', 0}, // 0393, Gamma + {IV('Δ'), '4', 0}, // 0394, Delta, ◿ + {IV('Ε'), 'E', 0}, // 0395 + {IV('Ζ'), 'Z', 0}, // 0396 + {IV('Η'), 'H', 0}, // 0397 + {IV('Θ'), '0', 0}, // 0398, Theta + {IV('Ι'), 'I', 0}, // 0399 + {IV('Κ'), 'K', 0}, // 039A + {IV('Λ'), '^', 0}, // 039B, Lambda + {IV('Μ'), 'M', 0}, // 039C + {IV('Ν'), 'N', 0}, // 039D + {IV('Ξ'), '3', 0}, // 039E, Xi + {IV('Ο'), 'O', 0}, // 039F + {IV('Π'), 'n', 0}, // 03A0, Pi + {IV('Ρ'), 'P', 0}, // 03A1 + {IV('Σ'), 'E', 0}, // 03A3, Sigma + {IV('Τ'), 'T', 0}, // 03A4 + {IV('Υ'), 'Y', 0}, // 03A5, Upsilon + {IV('Φ'), 'p', 0}, // 03A6, Phi + {IV('Χ'), 'X', 0}, // 03A7 + {IV('Ψ'), 'P', 0}, // 03A8, Psi + {IV('Ω'), 'O', 0}, // 03A9, Omega + {IV('Ϊ'), 'I', 0}, // 03AA + {IV('Ϋ'), 'Y', 0}, // 03AB + {IV('ά'), 'a', 0}, // 03AC + {IV('έ'), 'e', 0}, // 03AD + {IV('ή'), 'n', 0}, // 03AE + {IV('ί'), 'i', 0}, // 03AF + {IV('ΰ'), 'v', 0}, // 03B0 + {IV('α'), 'a', 0}, // 03B1, alpha + {IV('β'), 'B', 0}, // 03B2, beta + {IV('γ'), 'v', 0}, // 03B3, gamma + {IV('δ'), 'd', 0}, // 03B4, delta + {IV('ε'), 'e', 0}, // 03B5, epsilon + {IV('ζ'), 'Z', 0}, // 03B6, zeta + {IV('η'), 'n', 0}, // 03B7, eta + {IV('θ'), '0', 0}, // 03B8, theta + {IV('ι'), 'i', 0}, // 03B9, lota + {IV('κ'), 'k', 0}, // 03BA, kappa + {IV('λ'), 'L', 0}, // 03BB, lambda + {IV('μ'), 'u', 0}, // 03BC, mu + {IV('ν'), 'v', 0}, // 03BD, nu + {IV('ξ'), 'e', 0}, // 03BE, xi + {IV('ο'), 'o', 0}, // 03BF + {IV('π'), 'n', 0}, // 03C0, pi + {IV('ρ'), 'p', 0}, // 03C1, rho + {IV('ς'), 'c', 0}, // 03C2 + {IV('σ'), 'o', 0}, // 03C3, sigma + {IV('τ'), 't', 0}, // 03C4, tau + {IV('υ'), 'v', 0}, // 03C5, upsilon + {IV('φ'), 'p', 0}, // 03C6 + {IV('χ'), 'X', 0}, // 03C7, chi + {IV('ψ'), 'W', 0}, // 03C8, psi + {IV('ω'), 'w', 0}, // 03C9, omega + {IV('ϊ'), 'i', 0}, // 03CA + {IV('ϋ'), 'v', 0}, // 03CB + {IV('ό'), 'o', 0}, // 03CC + {IV('ύ'), 'v', 0}, // 03CD + {IV('ώ'), 'w', 0}, // 03CE + + #endif + + #if ENABLED(DISPLAY_CHARSET_ISO10646_5) + // Map CYRILLIC code to plain ASCII + {IV('Ё'), 'E', 0}, // 0401 + {IV('А'), 'A', 0}, // 0410 + {IV('Б'), 'b', 0}, // 0411 + {IV('В'), 'B', 0}, // 0412 + {IV('Г'), 'T', 0}, // 0413 + {IV('Д'), 'Q', 0}, // 0414 + {IV('Е'), 'E', 0}, // 0415 + {IV('Ж'), '*', 0}, // 0416 + {IV('З'), 'E', 0}, // 0417 + {IV('И'), 'N', 0}, // 0418 + {IV('Й'), 'N', 0}, // 0419 + {IV('К'), 'K', 0}, // 041A + {IV('Л'), 'T', 0}, // 041B + {IV('М'), 'M', 0}, // 041C + {IV('Н'), 'H', 0}, // 041D + {IV('О'), 'O', 0}, // 041E + {IV('П'), 'n', 0}, // 041F + {IV('Р'), 'P', 0}, // 0420 + {IV('С'), 'C', 0}, // 0421 + {IV('Т'), 'T', 0}, // 0422 + {IV('У'), 'Y', 0}, + {IV('Ф'), 'o', 0}, + {IV('Х'), 'X', 0}, + {IV('Ц'), 'U', 0}, + {IV('Ч'), 'y', 0}, + {IV('Ш'), 'W', 0}, + {IV('Щ'), 'W', 0}, + {IV('Ъ'), 'b', 0}, + {IV('Ы'), 'b', '|'}, + {IV('Ь'), 'b'}, + {IV('Э'), 'e'}, + {IV('Ю'), '|', 'O'}, + {IV('Я'), '9', '|'}, // 042F + + {IV('а'), 'a', 0}, // 0430 + {IV('б'), '6', 0}, // 0431 + {IV('в'), 'B', 0}, // 0432, + {IV('г'), 'r', 0}, // 0433 + {IV('д'), 'a', 0}, // 0434, + {IV('е'), 'e', 0}, // 0435 + {IV('ж'), '*', 0}, // 0436 + {IV('з'), 'e', 0}, // 0437, + {IV('и'), 'u', 0}, // 0438 + {IV('й'), 'u', 0}, // 0439, + {IV('к'), 'k', 0}, // 043A + {IV('л'), 'n', 0}, + {IV('м'), 'm', 0}, + {IV('н'), 'H', 0}, + {IV('о'), 'o', 0}, + {IV('п'), 'n', 0}, + {IV('р'), 'p', 0}, + {IV('с'), 'c', 0}, + {IV('т'), 't', 0}, + {IV('у'), 'y', 0}, + {IV('ф'), 'q', 'p'}, + {IV('х'), 'x', 0}, + {IV('ц'), 'u', 0}, + {IV('ч'), 'y', 0}, + {IV('ш'), 'w', 0}, + {IV('щ'), 'w', 0}, + {IV('ъ'), 'b', 0}, + {IV('ы'), 'b', '|'}, + {IV('ь'), 'b', 0}, + {IV('э'), 'e', 0}, + {IV('ю'), '|', 'o'}, + {IV('я'), 'g', 0}, // 044F + {IV('ё'), 'e', 0}, // 0451 + #endif + + {IV('•'), '.', 0}, // 2022 · + {IV('℞'), 'P', 'x'}, // 211E ℞ Pt ASCII 158 + {IV('™'), 'T', 'M'}, // 2122 + {IV('←'), '<', '-'}, // 2190 + {IV('→'), '-', '>'}, // 2192, Marlin special: '⮈⮉⮊⮋➤→⏵➟➠➡' LCD_STR_ARROW_RIGHT (0x03) + //{IV('↰'), '<', 0}, // 21B0, Marlin special: '⮥⮭⮉⇧↑↰⤴' LCD_STR_UPLEVEL (0x04) + {IV('↰'), 0x03, 0}, // 21B0, Marlin special: '⮥⮭⮉⇧↑↰⤴' LCD_STR_UPLEVEL (0x04) + {IV('↻'), 0x04, 0}, // 21BB Marlin special: '↻↺⟳⟲' LCD_STR_REFRESH (0x01) + {IV('∼'), '~', 0}, // 223C + {IV('≈'), '~', '='}, // 2248 + {IV('≠'), '!', '='}, // 2260 + {IV('≡'), '=', 0}, // 2261 + {IV('≤'), '<', '='},// 2264, ≤≥ ⩽⩾ + {IV('≥'), '>', '='}, // 2265 + {IV('⏱'), 0x07, 0}, // 23F1, Marlin special: '🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚🕛🕜🕝🕞🕟🕠🕡🕢🕣🕤🕥🕦🕧 ⌚⌛⏰⏱⏳⧖⧗' LCD_STR_CLOCK (0x05) + + {IV('゠'), '=', 0}, // 30A0 + + // ⏰⏱⏲⏳◴◵◶◷ + // ⏻⏼♁♂ + //{IV(''), 0x00, 0}, // Marlin special: '' LCD_STR_BEDTEMP (0x07) + {IV('🌡'), 0x02, 0}, // D83CDF21 Marlin special: '🌡' LCD_STR_THERMOMETER (0x08) + {IV('📂'), 0x05, 0}, // D83DDCC2 Marlin special: '📁📂' LCD_STR_FOLDER (0x02) + //{IV(''), 0x06, 0}, // Marlin special: '' LCD_STR_FEEDRATE (0x06) +}; diff --git a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp new file mode 100644 index 000000000000..20b3727dbc93 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp @@ -0,0 +1,193 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/e3v2/marlinui/lcdprint_dwin.cpp + * + * Due to DWIN hardware limitations simplified characters are used + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "lcdprint_dwin.h" +#include "dwin_lcd.h" +#include "dwin_string.h" + +#include "../../marlinui.h" +#include "../../../MarlinCore.h" + +#include + +cursor_t cursor; + +extern dwin_font_t dwin_font; + +void lcd_moveto_xy(const lcd_uint_t x, const lcd_uint_t y) { cursor.x = x; cursor.y = y; } + +void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) { + cursor.x = col * dwin_font.width; + cursor.y = (row * (dwin_font.height + EXTRA_ROW_HEIGHT)) + (EXTRA_ROW_HEIGHT / 2); +} + +inline void lcd_advance_cursor() { cursor.x += dwin_font.width; } + +void lcd_put_int(const int i) { + // TODO: Draw an int at the cursor position, advance the cursor +} + +int lcd_put_dwin_string() { + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + cursor.x += dwin_string.length() * dwin_font.width; + return dwin_string.length(); +} + +// return < 0 on error +// return the advanced cols +int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) { + dwin_string.set(); + dwin_string.add(c); + dwin_string.truncate(max_length); + // Draw the char(s) at the cursor and advance the cursor + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + cursor.x += dwin_string.length() * dwin_font.width; + return dwin_string.length(); +} + +/** + * @brief Draw a UTF-8 string + * + * @param utf8_str : the UTF-8 string + * @param cb_read_byte : the callback function to read one byte from the utf8_str (from RAM or ROM) + * @param max_length : the pixel length of the string allowed (or number of slots in HD44780) + * + * @return the number of pixels advanced + * + * Draw a UTF-8 string + */ +static int lcd_put_u8str_max_cb(const char * utf8_str, uint8_t (*cb_read_byte)(uint8_t * str), pixel_len_t max_length) { + uint8_t *p = (uint8_t *)utf8_str; + dwin_string.set(); + while (dwin_string.length() < max_length) { + wchar_t ch = 0; + p = get_utf8_value_cb(p, cb_read_byte, &ch); + if (!ch) break; + dwin_string.add(ch); + } + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + cursor.x += dwin_string.length() * dwin_font.width; + return dwin_string.length(); +} + +int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) { + return lcd_put_u8str_max_cb(utf8_str, read_byte_ram, max_length); +} + +int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) { + return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length); +} + +lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const inStr/*=nullptr*/, const lcd_uint_t maxlen/*=LCD_WIDTH*/) { + dwin_string.set(); + dwin_string.add((uint8_t*)pstr, ind, (uint8_t*)inStr); + dwin_string.truncate(maxlen); + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + cursor.x += dwin_string.length() * dwin_font.width; + return dwin_string.length(); +} + +#if ENABLED(DEBUG_LCDPRINT) + + int test_dwin_charmap(dwin_charmap_t *data, size_t size, char *name, char flg_show_contents) { + int ret; + size_t idx = 0; + dwin_charmap_t preval = { 0, 0, 0 }; + dwin_charmap_t pinval = { 0, 0, 0 }; + char flg_error = 0; + + int i; + + TRACE("Test %s\n", name); + + for (i = 0; i < size; i ++) { + memcpy_P(&pinval, &(data[i]), sizeof(pinval)); + + if (flg_show_contents) { + #if 1 + TRACE("[% 4d] % 6" PRIu32 "(0x%04" PRIX32 ") --> 0x%02X,0x%02X%s\n", i, pinval.uchar, pinval.uchar, (unsigned int)(pinval.idx), (unsigned int)(pinval.idx2), (preval.uchar < pinval.uchar?"":" <--- ERROR")); + #else + TRACE("[% 4d]", i); + TRACE("% 6" PRIu32 "(0x%04" PRIX32 "),", pinval.uchar, pinval.uchar); + TRACE("0x%02X,", (unsigned int)(pinval.idx)); + TRACE("0x%02X,", (unsigned int)(pinval.idx2)); + TRACE("%s", (preval.uchar < pinval.uchar?"":" <--- ERROR")); + #endif + } + if (preval.uchar >= pinval.uchar) { + flg_error = 1; + //TRACE("Error: out of order in array %s: idx=%d, val=%d(0x%x)\n", name, i, pinval.uchar, pinval.uchar); + //return -1; + } + memcpy(&preval, &pinval, sizeof(pinval)); + + ret = pf_bsearch_r((void *)data, size, pf_bsearch_cb_comp_dwinmap_pgm, (void *)&pinval, &idx); + if (ret < 0) { + flg_error = 1; + TRACE("Error: not found item in array %s: idx=%d, val=%d(0x%x)\n", name, i, pinval.uchar, pinval.uchar); + //return -1; + } + if (idx != i) { + flg_error = 1; + TRACE("Error: wrong index found item in array %s: idx=%d, val=%d(0x%x)\n", name, i, pinval.uchar, pinval.uchar); + //return -1; + } + } + if (flg_error) { + TRACE("\nError: in array %s\n\n", name); + return -1; + } + TRACE("\nPASS array %s\n\n", name); + return 0; + } + + int test_dwin_charmap_all() { + int flg_error = 0; + if (test_dwin_charmap(g_dwin_charmap_device, COUNT(g_dwin_charmap_device), "g_dwin_charmap_device", 0) < 0) { + flg_error = 1; + test_dwin_charmap(g_dwin_charmap_device, COUNT(g_dwin_charmap_device), "g_dwin_charmap_device", 1); + } + if (test_dwin_charmap(g_dwin_charmap_common, COUNT(g_dwin_charmap_common), "g_dwin_charmap_common", 0) < 0) { + flg_error = 1; + test_dwin_charmap(g_dwin_charmap_common, COUNT(g_dwin_charmap_common), "g_dwin_charmap_common", 1); + } + if (flg_error) { + TRACE("\nFAILED in dwin tests!\n"); + return -1; + } + TRACE("\nPASS in dwin tests.\n"); + return 0; + } + +#endif // DEBUG_LCDPRINT + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h new file mode 100644 index 000000000000..692f448e7631 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h @@ -0,0 +1,30 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../lcdprint.h" + +typedef struct { int16_t x, y; } cursor_t; +extern cursor_t cursor; + +int lcd_put_dwin_string(); +void lcd_moveto_xy(const lcd_uint_t, const lcd_uint_t); diff --git a/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h b/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h new file mode 100644 index 000000000000..de87c30b6b00 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h @@ -0,0 +1,146 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * lcd/e3v2/marlinui/lcdprint_dwin.h + */ + +#include "../../../inc/MarlinConfigPre.h" +#include "dwin_lcd.h" + +typedef uint16_t dwin_coord_t; // Screen can be pretty big +typedef uint16_t lcd_uint_t; +typedef int16_t lcd_int_t; + +typedef struct { + uint8_t index, width, height; + uint16_t fg, bg; + bool solid; +} dwin_font_t; + +extern dwin_font_t dwin_font; + +// Only Western languages support big / small fonts +//#if DISABLED(DISPLAY_CHARSET_ISO10646_1) +// #undef USE_BIG_EDIT_FONT +// #undef USE_SMALL_INFOFONT +//#endif + +#if ENABLED(USE_BIG_EDIT_FONT) + #define DWIN_FONT_EDIT font10x20 +#else + #define DWIN_FONT_EDIT font8x16 +#endif + +#define DWIN_FONT_INFO font8x16 + +#if DWIN_FONT_MENU == font6x12 + #define MENU_FONT_WIDTH 6 + #define MENU_FONT_ASCENT 10 + #define MENU_FONT_DESCENT 2 +#elif DWIN_FONT_MENU == font8x16 + #define MENU_FONT_WIDTH 8 + #define MENU_FONT_ASCENT 13 + #define MENU_FONT_DESCENT 3 +#elif DWIN_FONT_MENU == font10x20 + #define MENU_FONT_WIDTH 10 + #define MENU_FONT_ASCENT 16 + #define MENU_FONT_DESCENT 4 +#endif +#define MENU_FONT_HEIGHT (MENU_FONT_ASCENT + MENU_FONT_DESCENT) + +#define EXTRA_ROW_HEIGHT 8 +#define MENU_LINE_HEIGHT (MENU_FONT_HEIGHT + EXTRA_ROW_HEIGHT) + +#if DWIN_FONT_EDIT == font6x12 + #define EDIT_FONT_WIDTH 6 + #define EDIT_FONT_ASCENT 10 + #define EDIT_FONT_DESCENT 2 +#elif DWIN_FONT_EDIT == font8x16 + #define EDIT_FONT_WIDTH 8 + #define EDIT_FONT_ASCENT 13 + #define EDIT_FONT_DESCENT 3 +#elif DWIN_FONT_EDIT == font10x20 + #define EDIT_FONT_WIDTH 10 + #define EDIT_FONT_ASCENT 16 + #define EDIT_FONT_DESCENT 4 +#endif +#define EDIT_FONT_HEIGHT (EDIT_FONT_ASCENT + EDIT_FONT_DESCENT) + +#if DWIN_FONT_INFO == font6x12 + #define INFO_FONT_WIDTH 6 + #define INFO_FONT_ASCENT 10 + #define INFO_FONT_DESCENT 2 +#elif DWIN_FONT_INFO == font8x16 + #define INFO_FONT_WIDTH 8 + #define INFO_FONT_ASCENT 13 + #define INFO_FONT_DESCENT 3 +#elif DWIN_FONT_INFO == font10x20 + #define INFO_FONT_WIDTH 10 + #define INFO_FONT_ASCENT 16 + #define INFO_FONT_DESCENT 4 +#endif +#define INFO_FONT_HEIGHT (INFO_FONT_ASCENT + INFO_FONT_DESCENT) + +#if DWIN_FONT_STAT == font6x12 + #define STAT_FONT_WIDTH 6 + #define STAT_FONT_ASCENT 10 + #define STAT_FONT_DESCENT 2 +#elif DWIN_FONT_STAT == font8x16 + #define STAT_FONT_WIDTH 8 + #define STAT_FONT_ASCENT 13 + #define STAT_FONT_DESCENT 3 +#elif DWIN_FONT_STAT == font10x20 + #define STAT_FONT_WIDTH 10 + #define STAT_FONT_ASCENT 16 + #define STAT_FONT_DESCENT 4 +#elif DWIN_FONT_STAT == font12x24 + #define STAT_FONT_WIDTH 12 + #define STAT_FONT_ASCENT 19 + #define STAT_FONT_DESCENT 5 +#elif DWIN_FONT_STAT == font14x28 + #define STAT_FONT_WIDTH 14 + #define STAT_FONT_ASCENT 22 + #define STAT_FONT_DESCENT 6 +#elif DWIN_FONT_STAT == font16x32 + #define STAT_FONT_WIDTH 16 + #define STAT_FONT_ASCENT 26 + #define STAT_FONT_DESCENT 6 +#elif DWIN_FONT_STAT == font20x40 + #define STAT_FONT_WIDTH 20 + #define STAT_FONT_ASCENT 32 + #define STAT_FONT_DESCENT 8 +#elif DWIN_FONT_STAT == font24x48 + #define STAT_FONT_WIDTH 24 + #define STAT_FONT_ASCENT 38 + #define STAT_FONT_DESCENT 10 +#elif DWIN_FONT_STAT == font28x56 + #define STAT_FONT_WIDTH 28 + #define STAT_FONT_ASCENT 44 + #define STAT_FONT_DESCENT 12 +#elif DWIN_FONT_STAT == font32x64 + #define STAT_FONT_WIDTH 32 + #define STAT_FONT_ASCENT 50 + #define STAT_FONT_DESCENT 14 +#endif +#define STAT_FONT_HEIGHT (STAT_FONT_ASCENT + STAT_FONT_DESCENT) diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp new file mode 100644 index 000000000000..7655e059e2b9 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -0,0 +1,595 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "marlinui_dwin.h" +#include "dwin_lcd.h" +#include "dwin_string.h" + +//#include "../../lcdprint.h" +#include "lcdprint_dwin.h" +#include "../../fontutils.h" +#include "../../../libs/numtostr.h" +#include "../../marlinui.h" + +#include "../../../sd/cardreader.h" +#include "../../../module/motion.h" +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" + +#if ENABLED(SDSUPPORT) + #include "../../../libs/duration_t.h" +#endif + +#if ENABLED(AUTO_BED_LEVELING_UBL) + #include "../../../feature/bedlevel/bedlevel.h" +#endif + +// DWIN printing specifies the font on each string operation +// but we'll make the font modal for Marlin +dwin_font_t dwin_font = { font8x16, 8, 16, Color_White, Color_Bg_Black, true }; +void MarlinUI::set_font(const uint8_t font_nr) { + if (font_nr != dwin_font.index) { + dwin_font.index = font_nr; + uint8_t w, h; + switch (font_nr) { + default: + case font6x12: w = 6; h = 12; break; + case font8x16: w = 8; h = 16; break; + case font10x20: w = 10; h = 20; break; + case font12x24: w = 12; h = 24; break; + case font14x28: w = 14; h = 28; break; + case font16x32: w = 16; h = 32; break; + case font20x40: w = 20; h = 40; break; + case font24x48: w = 24; h = 48; break; + case font28x56: w = 28; h = 56; break; + case font32x64: w = 32; h = 64; break; + } + dwin_font.width = w; + dwin_font.height = h; + // TODO: Array with dimensions, auto fit menu items, + // update char width / height of the screen based on + // new (fixed-width) font size. + } +} + +// This display is always detected +bool MarlinUI::detected() { return true; } + +// Initialize or re-initialize the LCD +void MarlinUI::init_lcd() { + DWIN_Startup(); + + // Load the assets JPG (currently just the status screen 'icon') + DWIN_JPG_CacheToN(1, DWIN_MarlinUI_Assets); +} + +// This LCD should clear where it will draw anew +void MarlinUI::clear_lcd() { + DWIN_ICON_AnimationControl(0x0000); // disable all icon animations + DWIN_Frame_Clear(Color_Bg_Black); + DWIN_UpdateLCD(); + + did_first_redraw = false; +} + +#if ENABLED(SHOW_BOOTSCREEN) + + void MarlinUI::show_bootscreen() { + clear_lcd(); + dwin_string.set(F(SHORT_BUILD_VERSION)); + + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + #define LOGO_CENTER ((LCD_PIXEL_WIDTH) / 2) + #define INFO_CENTER LOGO_CENTER + #define VERSION_Y 330 + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinBoot, LOGO_CENTER - 266 / 2, 15); + DWIN_ICON_Show(BOOT_ICON, ICON_OpenSource, LOGO_CENTER - 174 / 2, 280); + DWIN_ICON_Show(BOOT_ICON, ICON_GitHubURL, LOGO_CENTER - 180 / 2, 420); + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinURL, LOGO_CENTER - 100 / 2, 440); + DWIN_ICON_Show(BOOT_ICON, ICON_Copyright, LOGO_CENTER - 126 / 2, 460); + #else + #define LOGO_CENTER (280 / 2) + #define INFO_CENTER ((LCD_PIXEL_WIDTH) - 200 / 2) + #define VERSION_Y 84 + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinBoot, LOGO_CENTER - 266 / 2, 15); + DWIN_ICON_Show(BOOT_ICON, ICON_OpenSource, INFO_CENTER - 174 / 2, 60); + DWIN_ICON_Show(BOOT_ICON, ICON_GitHubURL, INFO_CENTER - 180 / 2, 130); + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinURL, INFO_CENTER - 100 / 2, 152); + DWIN_ICON_Show(BOOT_ICON, ICON_Copyright, INFO_CENTER - 126 / 2, 200); + #endif + + DWIN_Draw_String(false, font10x20, Color_Yellow, Color_Bg_Black, INFO_CENTER - (dwin_string.length() * 10) / 2, VERSION_Y, S(dwin_string.string())); + DWIN_UpdateLCD(); + } + + void MarlinUI::bootscreen_completion(const millis_t sofar) { + if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar); + clear_lcd(); + } + +#endif + +// The kill screen is displayed for unrecoverable conditions +void MarlinUI::draw_kill_screen() { + set_font(DWIN_FONT_ALERT); + DWIN_Frame_Clear(Color_Bg_Black); + dwin_font.fg = Color_Error_Red; + dwin_font.solid = false; + DWIN_Draw_Rectangle(1, Color_Bg_Window, 20, 20, LCD_PIXEL_WIDTH - 20, LCD_PIXEL_HEIGHT - 20); + // make the frame a few pixels thick + DWIN_Draw_Rectangle(0, Color_Yellow, 20, 20, LCD_PIXEL_WIDTH - 20, LCD_PIXEL_HEIGHT - 20); + DWIN_Draw_Rectangle(0, Color_Yellow, 21, 21, LCD_PIXEL_WIDTH - 21, LCD_PIXEL_HEIGHT - 21); + DWIN_Draw_Rectangle(0, Color_Yellow, 22, 22, LCD_PIXEL_WIDTH - 22, LCD_PIXEL_HEIGHT - 22); + + uint8_t cx = (LCD_PIXEL_WIDTH / dwin_font.width / 2), + cy = (LCD_PIXEL_HEIGHT / dwin_font.height / 2); + + #if ENABLED(DWIN_MARLINUI_LANDSCAPE) + cx += (96 / 2 / dwin_font.width); + DWIN_ICON_Show(ICON, ICON_Halted, 40, (LCD_PIXEL_HEIGHT - 96) / 2); + #else + DWIN_ICON_Show(ICON, ICON_Halted, (LCD_PIXEL_WIDTH - 96) / 2, 40); + #endif + + uint8_t slen = utf8_strlen(status_message); + lcd_moveto(cx - (slen / 2), cy - 1); + lcd_put_u8str(status_message); + + slen = utf8_strlen(S(GET_TEXT_F(MSG_HALTED))); + lcd_moveto(cx - (slen / 2), cy); + lcd_put_u8str_P((const char*)GET_TEXT_F(MSG_HALTED)); + + slen = utf8_strlen(S(GET_TEXT_F(MSG_HALTED))); + lcd_moveto(cx - (slen / 2), cy + 1); + lcd_put_u8str_P((const char*)GET_TEXT_F(MSG_HALTED)); +} + +// +// Status Message +// +void MarlinUI::draw_status_message(const bool blink) { + set_font(DWIN_FONT_STAT); + dwin_font.solid = true; + dwin_font.fg = Color_White; + dwin_font.bg = Color_Bg_Black; + lcd_moveto_xy(0, LCD_PIXEL_HEIGHT - (STAT_FONT_HEIGHT) - 1); + + constexpr uint8_t max_status_chars = (LCD_PIXEL_WIDTH) / (STAT_FONT_WIDTH); + + auto status_changed = []{ + static uint16_t old_hash = 0x0000; + uint16_t hash = 0x0000; + for (uint8_t i = 0; i < MAX_MESSAGE_LENGTH; i++) { + const char c = ui.status_message[i]; + if (!c) break; + hash = ((hash << 1) | (hash >> 15)) ^ c; + } + const bool hash_changed = hash != old_hash; + old_hash = hash; + return hash_changed || !ui.did_first_redraw; + }; + + #if ENABLED(STATUS_MESSAGE_SCROLLING) + static bool last_blink = false; + + // Get the UTF8 character count of the string + uint8_t slen = utf8_strlen(status_message); + + // If the string fits into the LCD, just print it and do not scroll it + if (slen <= max_status_chars) { + + if (status_changed()) { + + // The string isn't scrolling and may not fill the screen + lcd_put_u8str(status_message); + + // Fill the rest with spaces + while (slen < max_status_chars) { lcd_put_wchar(' '); ++slen; } + } + } + else { + // String is larger than the available line space + + // Get a pointer to the next valid UTF8 character + // and the string remaining length + uint8_t rlen; + const char *stat = status_and_len(rlen); + lcd_put_u8str_max(stat, max_status_chars); + + // If the string doesn't completely fill the line... + if (rlen < max_status_chars) { + lcd_put_wchar('.'); // Always at 1+ spaces left, draw a dot + uint8_t chars = max_status_chars - rlen; // Amount of space left in characters + if (--chars) { // Draw a second dot if there's space + lcd_put_wchar('.'); + if (--chars) + lcd_put_u8str_max(status_message, chars); // Print a second copy of the message + } + } + + if (last_blink != blink) { + last_blink = blink; + advance_status_scroll(); + } + } + + #else + + UNUSED(blink); + + if (status_changed()) { + // Get the UTF8 character count of the string + uint8_t slen = utf8_strlen(status_message); + + // Just print the string to the LCD + lcd_put_u8str_max(status_message, max_status_chars); + + // Fill the rest with spaces if there are missing spaces + while (slen < max_status_chars) { lcd_put_wchar(' '); ++slen; } + } + + #endif +} + +#if HAS_LCD_MENU + + #include "../../menu/menu.h" + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + + void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) { + + dwin_font.solid = false; + dwin_font.fg = Color_White; + dwin_string.set("E"); + dwin_string.add('1' + extruder); + dwin_string.add(' '); + dwin_string.add(i16tostr3rj(thermalManager.degHotend(extruder))); + dwin_string.add('/'); + if (get_blink() || !thermalManager.heater_idle[thermalManager.idle_index_for_id(extruder)].timed_out) + dwin_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder))); + else + dwin_string.add(PSTR(" ")); + + lcd_moveto(LCD_WIDTH - dwin_string.length(), row); + lcd_put_dwin_string(); + } + + #endif + + // Set the colors for a menu item based on whether it is selected + static bool mark_as_selected(const uint8_t row, const bool sel, const bool is_static=false) { + const dwin_coord_t y = row * (MENU_LINE_HEIGHT) + 1; + if (y >= LCD_PIXEL_HEIGHT) return false; + + if (is_static && sel) + DWIN_Draw_Box(1, Color_Bg_Heading, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + else { + #if ENABLED(MENU_HOLLOW_FRAME) + DWIN_Draw_Box(1, Color_Bg_Black, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + if (sel) DWIN_Draw_Box(0, Select_Color, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + #else + DWIN_Draw_Box(1, sel ? Select_Color : Color_Bg_Black, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + #endif + } + + return true; + } + + // Draw a static line of text in the same idiom as a menu item + + void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { + // Call mark_as_selected to draw a bigger selection box + // and draw the text without a background + if (mark_as_selected(row, (bool)(style & SS_INVERT), true)) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + + dwin_string.set(); + const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0, + vlen = vstr ? utf8_strlen(vstr) : 0; + if (style & SS_CENTER) { + int8_t pad = (LCD_WIDTH - 1 - plen - vlen) / 2; + while (--pad) dwin_string.add(' '); + } + + if (plen) dwin_string.add((uint8_t*)pstr, itemIndex, (uint8_t*)itemString); + if (vlen) dwin_string.add((uint8_t*)vstr); + if (style & SS_CENTER) { + int8_t pad = (LCD_WIDTH - 1 - plen - vlen) / 2; + while (--pad) dwin_string.add(' '); + } + + lcd_moveto(1, row); + lcd_put_dwin_string(); + } + } + + // Draw a generic menu item + void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, const char, const char post_char) { + if (mark_as_selected(row, sel)) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + + dwin_string.set(pstr, itemIndex, itemString); + + pixel_len_t n = LCD_WIDTH - 1 - dwin_string.length(); + while (--n > 1) dwin_string.add(' '); + + dwin_string.add(post_char); + + lcd_moveto(1, row); + lcd_put_dwin_string(); + } + } + + // + // Draw a menu item with an editable value + // + void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) { + if (mark_as_selected(row, sel)) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + + const uint8_t vallen = (pgm ? utf8_strlen_P(data) : utf8_strlen(S(data))); + + dwin_string.set(pstr, itemIndex, itemString); + if (vallen) dwin_string.add(':'); + + lcd_moveto(1, row); + lcd_put_dwin_string(); + + if (vallen) { + dwin_font.fg = Color_Yellow; + dwin_string.set(data); + lcd_moveto(LCD_WIDTH - vallen - 1, row); + lcd_put_dwin_string(); + } + } + } + + // + // Draw an edit screen with label and current value + // + void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { + ui.encoder_direction_normal(); + + const dwin_coord_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value); + + dwin_string.set(); + dwin_string.add((uint8_t*)pstr, itemIndex); + if (vallen) dwin_string.add(':'); // If a value is included, add a colon + + // Assume the label is alpha-numeric (with a descender) + const uint16_t row = (LCD_HEIGHT / 2) - 1; + + dwin_font.fg = Color_White; + dwin_font.solid = true; + lcd_moveto((LCD_WIDTH - labellen + !!vallen) / 2, row); + lcd_put_dwin_string(); + + // If a value is included, print the value in larger text below the label + if (vallen) { + dwin_string.set(); + dwin_string.add(value); + + const dwin_coord_t by = (row * MENU_LINE_HEIGHT) + MENU_FONT_HEIGHT + EXTRA_ROW_HEIGHT / 2; + DWIN_Draw_String(true, font16x32, Color_Yellow, Color_Bg_Black, (LCD_PIXEL_WIDTH - vallen * 16) / 2, by, S(dwin_string.string())); + + extern screenFunc_t _manual_move_func_ptr; + if (ui.currentScreen != _manual_move_func_ptr && !ui.external_control) { + + const dwin_coord_t slider_length = LCD_PIXEL_WIDTH - TERN(DWIN_MARLINUI_LANDSCAPE, 120, 20), + slider_height = 16, + slider_x = (LCD_PIXEL_WIDTH - slider_length) / 2, + slider_y = by + 32 + 4, + amount = ui.encoderPosition * slider_length / maxEditValue; + + DWIN_Draw_Rectangle(1, Color_Bg_Window, slider_x - 1, slider_y - 1, slider_x - 1 + slider_length + 2 - 1, slider_y - 1 + slider_height + 2 - 1); + if (amount > 0) + DWIN_Draw_Box(1, BarFill_Color, slider_x, slider_y, amount, slider_height); + if (amount < slider_length) + DWIN_Draw_Box(1, Color_Bg_Black, slider_x + amount, slider_y, slider_length - amount, slider_height); + } + } + } + + inline void draw_boxed_string(const bool yesopt, PGM_P const pstr, const bool inv) { + const uint8_t len = utf8_strlen_P(pstr), + mar = TERN(DWIN_MARLINUI_PORTRAIT, 1, 4), + col = yesopt ? LCD_WIDTH - mar - len : mar, + row = (LCD_HEIGHT >= 8 ? LCD_HEIGHT / 2 + 3 : LCD_HEIGHT - 1); + lcd_moveto(col, row); + DWIN_Draw_Box(1, inv ? Select_Color : Color_Bg_Black, cursor.x - dwin_font.width, cursor.y + 1, dwin_font.width * (len + 2), dwin_font.height + 2); + lcd_put_u8str_P(col, row, pstr); + } + + void MenuItem_confirm::draw_select_screen( + PGM_P const yes, PGM_P const no, const bool yesno, + PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/ + ) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + ui.draw_select_screen_prompt(pref, string, suff); + draw_boxed_string(false, no, !yesno); + draw_boxed_string(true, yes, yesno); + } + + #if ENABLED(SDSUPPORT) + + void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) { + if (mark_as_selected(row, sel)) { + dwin_string.set(); + + uint8_t maxlen = LCD_WIDTH - 1; + if (isDir) { + dwin_string.add(LCD_STR_FOLDER " "); + maxlen -= 2; + } + + dwin_string.add((uint8_t*)ui.scrolled_filename(theCard, maxlen, row, sel), maxlen); + uint8_t n = maxlen - dwin_string.length(); + while (n > 0) { dwin_string.add(' '); --n; } + lcd_moveto(1, row); + lcd_put_dwin_string(); + } + } + + #endif // SDSUPPORT + + #if ENABLED(AUTO_BED_LEVELING_UBL) + + /** + * UBL LCD "radar" map data + */ + #define MAP_UPPER_LEFT_CORNER_X 5 // These probably should be moved to the .h file But for now, + #define MAP_UPPER_LEFT_CORNER_Y 5 // it is easier to play with things having them here + #define MAP_MAX_PIXELS_X 262 // 272 - 10 + #define MAP_MAX_PIXELS_Y 262 + + void MarlinUI::ubl_plot(const uint8_t x_plot, const uint8_t y_plot) { + // Scale the box pixels appropriately + dwin_coord_t x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X), + y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y), + + pixels_per_x_mesh_pnt = x_map_pixels / (GRID_MAX_POINTS_X), + pixels_per_y_mesh_pnt = y_map_pixels / (GRID_MAX_POINTS_Y), + + x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2, + y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2; + + // Clear the Mesh Map + + // First draw the bigger box in White so we have a border around the mesh map box + DWIN_Draw_Rectangle(1, Color_White, x_offset - 2, y_offset - 2, x_offset + 2 + x_map_pixels, y_offset + 2 + y_map_pixels); + // Now actually clear the mesh map box + DWIN_Draw_Rectangle(1, Color_Bg_Black, x_offset, y_offset, x_offset + x_map_pixels, y_offset + y_map_pixels); + + // Fill in the Specified Mesh Point + + const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y - 1) - y_plot; // The origin is typically in the lower right corner. We need to + // invert the Y to get it to plot in the right location. + + const dwin_coord_t by = y_offset + y_plot_inv * pixels_per_y_mesh_pnt; + DWIN_Draw_Rectangle(1, Select_Color, + x_offset + (x_plot * pixels_per_x_mesh_pnt), by, + x_offset + (x_plot * pixels_per_x_mesh_pnt) + pixels_per_x_mesh_pnt, by + pixels_per_y_mesh_pnt + ); + + // Display Mesh Point Locations + const dwin_coord_t sx = x_offset + pixels_per_x_mesh_pnt / 2; + dwin_coord_t y = y_offset + pixels_per_y_mesh_pnt / 2; + for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++, y += pixels_per_y_mesh_pnt) + for (uint8_t i = 0, x = sx; i < GRID_MAX_POINTS_X; i++, x += pixels_per_x_mesh_pnt) + DWIN_Draw_Point(Color_White, 1, 1, x, y); + + // Put Relevant Text on Display + + // Show X and Y positions at top of screen + dwin_font.fg = Color_White; + dwin_font.solid = true; + const xy_pos_t pos = { ubl.mesh_index_to_xpos(x_plot), ubl.mesh_index_to_ypos(y_plot) }, + lpos = pos.asLogical(); + + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, 1), + TERN(DWIN_MARLINUI_LANDSCAPE, 1, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 1) + ); + lcd_put_u8str_P(X_LBL); + lcd_put_u8str(ftostr52(lpos.x)); + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, 1), + TERN(DWIN_MARLINUI_LANDSCAPE, 3, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 2) + ); + lcd_put_u8str_P(Y_LBL); + lcd_put_u8str(ftostr52(lpos.y)); + + // Print plot position + dwin_string.set("("); + dwin_string.add(i8tostr3rj(x_plot)); + dwin_string.add(","); + dwin_string.add(i8tostr3rj(y_plot)); + dwin_string.add(")"); + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, LCD_WIDTH - dwin_string.length()), + TERN(DWIN_MARLINUI_LANDSCAPE, LCD_HEIGHT - 2, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 1) + ); + lcd_put_dwin_string(); + + // Show the location value + dwin_string.set(Z_LBL); + if (!isnan(ubl.z_values[x_plot][y_plot])) + dwin_string.add(ftostr43sign(ubl.z_values[x_plot][y_plot])); + else + dwin_string.add(PSTR(" -----")); + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, LCD_WIDTH - dwin_string.length()), + TERN(DWIN_MARLINUI_LANDSCAPE, LCD_HEIGHT - 1, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 2) + ); + lcd_put_dwin_string(); + } + + #endif // AUTO_BED_LEVELING_UBL + + #if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY, BABYSTEP_GFX_OVERLAY) + + void _lcd_zoffset_overlay_gfx(const float zvalue) { + // Determine whether the user is raising or lowering the nozzle. + static int8_t dir; + static float old_zvalue; + if (zvalue != old_zvalue) { + dir = zvalue ? zvalue < old_zvalue ? -1 : 1 : 0; + old_zvalue = zvalue; + } + + const int rot_up = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCCW, ICON_RotateCW), + rot_down = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCW, ICON_RotateCCW); + + const int nozzle = (LCD_PIXEL_WIDTH / 2) - 20; + + // Draw a representation of the nozzle + DWIN_Draw_Box(1, Color_Bg_Black, nozzle + 3, 8, 48, 52); // 'clear' the area where the nozzle is drawn in case it was moved up/down + DWIN_ICON_Show(ICON, ICON_HotendOff, nozzle + 3, 10 - dir); + DWIN_ICON_Show(ICON, ICON_BedLine, nozzle, 10 + 36); + + // Draw cw/ccw indicator and up/down arrows + const int arrow_y = LCD_PIXEL_HEIGHT / 2 - 24; + DWIN_ICON_Show(ICON, ICON_DownArrow, 0, arrow_y - dir); + DWIN_ICON_Show(ICON, rot_down, 48, arrow_y); + + DWIN_ICON_Show(ICON, ICON_UpArrow, LCD_PIXEL_WIDTH - 10 - (48*2), arrow_y - dir); + DWIN_ICON_Show(ICON, rot_up, LCD_PIXEL_WIDTH - 10 - 48, arrow_y); + } + + #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY + +#endif // HAS_LCD_MENU + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp new file mode 100644 index 000000000000..0e2f3a3d4cac --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -0,0 +1,391 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "marlinui_dwin.h" +#include "dwin_lcd.h" +#include "dwin_string.h" +#include "lcdprint_dwin.h" + +#include "../../fontutils.h" +#include "../../../libs/numtostr.h" +#include "../../marlinui.h" + +#include "../../../sd/cardreader.h" +#include "../../../module/motion.h" +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" + +#if ENABLED(SDSUPPORT) + #include "../../../libs/duration_t.h" +#endif + +#if ENABLED(LCD_SHOW_E_TOTAL) + #include "../../../MarlinCore.h" // for printingIsActive +#endif + +#define STATUS_HEATERS_X 15 +#define STATUS_HEATERS_Y 56 +#define STATUS_HEATERS_XSPACE 64 +#define STATUS_FAN_WIDTH 48 +#define STATUS_FAN_HEIGHT 48 +#define STATUS_FAN_Y STATUS_HEATERS_Y + 22 +#define STATUS_CHR_WIDTH 14 +#define STATUS_CHR_HEIGHT 28 + +// +// Before homing, blink '123' <-> '???'. +// Homed but unknown... '123' <-> ' '. +// Homed and known, display constantly. +// +FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, const uint16_t x, const uint16_t y) { + uint8_t vallen = utf8_strlen(value); + + if (!ui.did_first_redraw) { + dwin_string.set(); + dwin_string.add('X' + axis); + DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (vallen * 14 - 14) / 2, y + 2, S(dwin_string.string())); + } + + dwin_string.set(); + if (blink) + dwin_string.add(value); + else { + if (!TEST(axis_homed, axis)) + while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?'); + else { + #if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) + if (!TEST(axis_trusted, axis)) + dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" ")); + else + #endif + dwin_string.add(value); + } + } + + // For E_TOTAL there may be some characters to cover up + if (BOTH(DWIN_MARLINUI_PORTRAIT, LCD_SHOW_E_TOTAL) && axis == X_AXIS) + dwin_string.add(" "); + + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 32, S(dwin_string.string())); +} + +#if ENABLED(LCD_SHOW_E_TOTAL) + + FORCE_INLINE void _draw_e_value(const_float_t value, const uint16_t x, const uint16_t y) { + const uint8_t scale = value >= 100000.0f ? 10 : 1; // show cm after 99,999mm + + if (!ui.did_first_redraw) { + // Extra spaces so we don't have to clear the 'Y' label separately + dwin_string.set("E "); + DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (4 * 14 / 2) - 7, y + 2, S(dwin_string.string())); + } + + dwin_string.set(ui16tostr5rj(value / scale)); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 32, S(dwin_string.string())); + + // Extra spaces so we don't have to clear out the Y value separately + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, x + (5 * 14), y + 32, S(scale == 1 ? "mm " : "cm ")); + } + +#endif + +// +// Fan Icon and Percentage +// +FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) { + const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2; + const uint8_t fan_pct = thermalManager.scaledFanSpeedPercent(0); + const bool fan_on = !!fan_pct; + if (fan_on) { + DWIN_ICON_Animation(0, fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25); + dwin_string.set(i8tostr3rj(fan_pct)); + dwin_string.add('%'); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); + } + else { + DWIN_ICON_Show(ICON, ICON_Fan0, x + fanx, y); + dwin_string.set(PSTR(" ")); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); + } +} + +#if HOTENDS > 2 + #define HOTEND_STATS 3 +#elif HOTENDS > 1 + #define HOTEND_STATS 2 +#elif HAS_HOTEND + #define HOTEND_STATS 1 +#endif + +/** + * Draw a single heater icon with current and target temperature, at the given XY + */ +FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x, const uint16_t y) { + + #if HAS_HOTEND + static celsius_t old_temp[HOTEND_STATS] = ARRAY_N_1(HOTEND_STATS, 500), + old_target[HOTEND_STATS] = ARRAY_N_1(HOTEND_STATS, 500); + static bool old_on[HOTEND_STATS] = ARRAY_N_1(HOTEND_STATS, false); + #endif + + #if HAS_HEATED_BED + static celsius_t old_bed_temp = 500, old_bed_target = 500; + static bool old_bed_on = false; + #endif + + #if HAS_HOTEND && HAS_HEATED_BED + const bool isBed = heater < 0; + const float tc = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)), + tt = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)); + const uint8_t ta = isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater); + const bool c_draw = tc != (isBed ? old_bed_temp : old_temp[heater]), + t_draw = tt != (isBed ? old_bed_target : old_target[heater]), + i_draw = ta != (isBed ? old_bed_on : old_on[heater]); + if (isBed) { old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta; } + else { old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta; } + #elif HAS_HOTEND + constexpr bool isBed = false; + const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater); + const uint8_t ta = thermalManager.isHeatingHotend(heater); + const bool c_draw = tc != old_bed_temp, t_draw = tt != old_bed_target, i_draw = ta != old_bed_on; + old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta; + #elif HAS_HEATED_BED + constexpr bool isBed = true; + const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed(); + const uint8_t ta = thermalManager.isHeatingBed(); + const bool c_draw = tc != old_temp[heater], t_draw = tt != old_target[heater], i_draw = ta != old_on[heater]; + old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta; + #endif + + if (!ui.did_first_redraw || t_draw) { + dwin_string.set(i16tostr3rj(tt + 0.5)); + dwin_string.add(LCD_STR_DEGREE); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y, S(dwin_string.string())); + } + + if (!ui.did_first_redraw || i_draw) + DWIN_ICON_Show(ICON, (isBed ? ICON_BedOff : ICON_HotendOff) + ta, x, y + STATUS_CHR_HEIGHT + 2); + + if (!ui.did_first_redraw || c_draw) { + dwin_string.set(i16tostr3rj(tc + 0.5)); + dwin_string.add(LCD_STR_DEGREE); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 70, S(dwin_string.string())); + } +} + +/** + * Draw the current "feed rate" percentage preceded by the >> character + */ +FORCE_INLINE void _draw_feedrate_status(const char *value, uint16_t x, uint16_t y) { + if (!ui.did_first_redraw) { + dwin_string.set(LCD_STR_FEEDRATE); + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, x, y, S(dwin_string.string())); + } + + dwin_string.set(value); + dwin_string.add(PSTR("%")); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x + 14, y, S(dwin_string.string())); +} + +/** + * Draw the MarlinUI Status Screen for Ender 3 V2 + */ +void MarlinUI::draw_status_screen() { + const bool blink = get_blink(); + + // Draw elements that never change + if (!ui.did_first_redraw) { + // Logo/Status Icon + #define STATUS_LOGO_WIDTH 128 + #define STATUS_LOGO_HEIGHT 40 + DWIN_ICON_Show(ICON, ICON_LOGO_Marlin, (LCD_PIXEL_WIDTH - (STATUS_LOGO_WIDTH)) / 2, ((STATUS_HEATERS_Y - 4) - (STATUS_LOGO_HEIGHT)) / 2); + + // Draw a frame around the x/y/z values + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + DWIN_Draw_Rectangle(0, Select_Color, 0, 193, LCD_PIXEL_WIDTH, 260); + #else + //DWIN_Draw_Rectangle(0, Select_Color, LCD_PIXEL_WIDTH - 106, 50, LCD_PIXEL_WIDTH - 1, 230); + #endif + } + + uint16_t hx = STATUS_HEATERS_X; + #if HAS_HOTEND + _draw_heater_status(H_E0, hx, STATUS_HEATERS_Y); + hx += STATUS_HEATERS_XSPACE; + #endif + #if HAS_MULTI_HOTEND + _draw_heater_status(H_E1, hx, STATUS_HEATERS_Y); + hx += STATUS_HEATERS_XSPACE; + #endif + #if HAS_HEATED_BED + _draw_heater_status(H_BED, hx, STATUS_HEATERS_Y); + #endif + + #if HAS_FAN + // Fan display, pinned to the right side + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + _draw_fan_status(LCD_PIXEL_WIDTH - STATUS_CHR_WIDTH * 4, STATUS_FAN_Y); + #else + _draw_fan_status(212, STATUS_FAN_Y); + #endif + #endif + + // Axis values + const xyz_pos_t lpos = current_position.asLogical(); + const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive()); UNUSED(show_e_total); + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + constexpr int16_t cpy = 195; + if (show_e_total) { + TERN_(LCD_SHOW_E_TOTAL, _draw_e_value(e_move_accumulator, 6, cpy)); + } + else { + _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink, 6, cpy); + TERN_(HAS_Y_AXIS, _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink, 95, cpy)); + } + TERN_(HAS_Z_AXIS, _draw_axis_value(Z_AXIS, ftostr52sp(lpos.z), blink, 165, cpy)); + #else + constexpr int16_t cpx = LCD_PIXEL_WIDTH - 104; + _draw_axis_value(X_AXIS, ftostr52sp(lpos.x), blink, cpx, STATUS_HEATERS_Y); + TERN_(HAS_Y_AXIS, _draw_axis_value(Y_AXIS, ftostr52sp(lpos.y), blink, cpx, STATUS_HEATERS_Y + 59)); + TERN_(HAS_Z_AXIS, _draw_axis_value(Z_AXIS, ftostr52sp(lpos.z), blink, cpx, STATUS_HEATERS_Y + 118)); + #endif + + // Feedrate + static uint16_t old_fp = 0; + if (!ui.did_first_redraw || old_fp != feedrate_percentage) { + old_fp = feedrate_percentage; + _draw_feedrate_status(i16tostr3rj(feedrate_percentage), + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + 5, 290 + #else + 294, STATUS_HEATERS_Y + #endif + ); + } + + // + // Elapsed time + // + char buffer[14]; + duration_t time; + + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + + // Portrait mode only shows one value at a time, and will rotate if ROTATE_PROGRESS_DISPLAY + dwin_string.set(); + char prefix = ' '; + #if ENABLED(SHOW_REMAINING_TIME) + if (TERN1(ROTATE_PROGRESS_DISPLAY, blink) && print_job_timer.isRunning()) { + time = get_remaining_time(); + prefix = 'R'; + } + else + #endif + time = print_job_timer.duration(); + + time.toDigital(buffer); + dwin_string.add(prefix); + dwin_string.add(buffer); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, (LCD_PIXEL_WIDTH - ((dwin_string.length() + 1) * 14)), 290, S(dwin_string.string())); + + #else + + // landscape mode shows both elapsed and remaining (if SHOW_REMAINING_TIME) + time = print_job_timer.duration(); + time.toDigital(buffer); + dwin_string.set(" "); + dwin_string.add(buffer); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 280, 100, S(dwin_string.string())); + + #if ENABLED(LCD_SHOW_E_TOTAL) + if (show_e_total && TERN1(SHOW_REMAINING_TIME, !blink)) { // if SHOW_REMAINING_TIME is also + const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // show cm after 99,000mm + + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 249, 135, S("E")); + dwin_string.set(ui16tostr5rj(e_move_accumulator * escale)); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 263, 135, S(dwin_string.string())); + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 333, 135, S(escale==1 ? "mm" : "cm")); + } + #endif + #if ENABLED(SHOW_REMAINING_TIME) + if (!show_e_total || blink) { + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 249, 135, S(" R ")); + time = get_remaining_time(); + time.toDigital(buffer); + dwin_string.set(buffer); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 291, 135, S(dwin_string.string())); + } + #endif + #endif + + // + // Progress Bar + // + constexpr int16_t pb_margin = 5, pb_left = pb_margin, pb_height = 60, + pb_right = LCD_PIXEL_WIDTH - TERN(DWIN_MARLINUI_PORTRAIT, 0, 107) - pb_margin, + pb_bottom = TERN(DWIN_MARLINUI_PORTRAIT, 410, 230), + pb_top = pb_bottom - pb_height, + pb_width = pb_right - pb_left; + + const progress_t progress = TERN(HAS_PRINT_PROGRESS_PERMYRIAD, get_progress_permyriad, get_progress_percent)(); + + if (!ui.did_first_redraw) + DWIN_Draw_Rectangle(0, Select_Color, pb_left, pb_top, pb_right, pb_bottom); // Outline + + static uint16_t old_solid = 50; + const uint16_t pb_solid = (pb_width - 2) * (progress / (PROGRESS_SCALE)) * 0.01f; + const bool p_draw = !ui.did_first_redraw || old_solid != pb_solid; + + if (p_draw) { + //if (pb_solid) + DWIN_Draw_Rectangle(1, Select_Color, pb_left + 1, pb_top + 1, pb_left + pb_solid, pb_bottom - 1); // Fill the solid part + + //if (pb_solid < old_solid) + DWIN_Draw_Rectangle(1, Color_Bg_Black, pb_left + 1 + pb_solid, pb_top + 1, pb_right - 1, pb_bottom - 1); // Erase the rest + + #if ENABLED(SHOW_SD_PERCENT) + dwin_string.set(TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(progress), ui8tostr3rj(progress / (PROGRESS_SCALE)))); + dwin_string.add(PSTR("%")); + DWIN_Draw_String( + false, font16x32, Percent_Color, Color_Bg_Black, + pb_left + (pb_width - dwin_string.length() * 16) / 2, + pb_top + (pb_height - 32) / 2, + S(dwin_string.string()) + ); + #endif + + old_solid = pb_solid; + } + + // + // Status Message + // + draw_status_message(blink); + + ui.did_first_redraw = true; +} + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/lcdprint.cpp b/Marlin/src/lcd/lcdprint.cpp index eef27dbdb4bc..b2c939557d0f 100644 --- a/Marlin/src/lcd/lcdprint.cpp +++ b/Marlin/src/lcd/lcdprint.cpp @@ -26,7 +26,7 @@ #include "../inc/MarlinConfigPre.h" -#if HAS_WIRED_LCD && !HAS_GRAPHICAL_TFT +#if HAS_WIRED_LCD && !HAS_GRAPHICAL_TFT && !IS_DWIN_MARLINUI #include "marlinui.h" #include "lcdprint.h" diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index 32d958bf7f33..f6ac818ae564 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -34,7 +34,21 @@ #include "../inc/MarlinConfig.h" -#if HAS_MARLINUI_U8GLIB +#if IS_DWIN_MARLINUI + + #include "e3v2/marlinui/marlinui_dwin.h" + + #define LCD_PIXEL_WIDTH DWIN_WIDTH + #define LCD_PIXEL_HEIGHT DWIN_HEIGHT + #define LCD_WIDTH ((LCD_PIXEL_WIDTH) / (MENU_FONT_WIDTH)) + #define LCD_HEIGHT ((LCD_PIXEL_HEIGHT) / (MENU_LINE_HEIGHT)) + + // The DWIN lcd_moveto function uses row / column, not pixels + #define LCD_COL_X(col) (col) + #define LCD_ROW_Y(row) (row) + #define LCD_COL_X_RJ(len) (LCD_WIDTH - LCD_COL_X(len)) + +#elif HAS_MARLINUI_U8GLIB #include "dogm/u8g_fontutf8.h" typedef u8g_uint_t lcd_uint_t; @@ -105,7 +119,10 @@ #define MENU_LINE_HEIGHT MENU_FONT_HEIGHT #endif -#define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) +#ifndef LCD_COL_X_RJ + #define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) +#endif + #define SETCURSOR(col, row) lcd_moveto(LCD_COL_X(col), LCD_ROW_Y(row)) #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_COL_X_RJ(len), LCD_ROW_Y(row)) #define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index f4938722e3e2..1472f5c32aa5 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -202,6 +202,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; bool MarlinUI::drawing_screen, MarlinUI::first_page; // = false #endif + #if IS_DWIN_MARLINUI + bool MarlinUI::did_first_redraw; + #endif + // Encoder Handling #if HAS_ENCODER_ACTION uint32_t MarlinUI::encoderPosition; @@ -335,6 +339,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; col = (LCD_WIDTH - plen - slen) / 2; row = LCD_HEIGHT > 3 ? 1 : 0; } + if (LCD_HEIGHT >= 8) row = LCD_HEIGHT / 2 - 2; wrap_string_P(col, row, pref, true); if (string) { if (col) { col = 0; row++; } // Move to the start of the next line @@ -1073,6 +1078,9 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; run_current_screen(); + // Apply all DWIN drawing after processing + TERN_(IS_DWIN_MARLINUI, DWIN_UpdateLCD()); + #endif TERN_(HAS_LCD_MENU, lcd_clicked = false); diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 9930796a01c8..edee8f0cc2d0 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -387,22 +387,22 @@ class MarlinUI { #endif #if HAS_MARLINUI_U8GLIB - static void set_font(const MarlinFont font_nr); + #elif IS_DWIN_MARLINUI + static void set_font(const uint8_t font_nr); + #endif - #else - + #if HAS_MARLINUI_HD44780 static void set_custom_characters(const HD44780CharSet screen_charset=CHARSET_INFO); + #endif - #if ENABLED(LCD_PROGRESS_BAR) - static millis_t progress_bar_ms; // Start time for the current progress bar cycle - static void draw_progress_bar(const uint8_t percent); - #if PROGRESS_MSG_EXPIRE > 0 - static millis_t expire_status_ms; // = 0 - FORCE_INLINE static void reset_progress_bar_timeout() { expire_status_ms = 0; } - #endif + #if ENABLED(LCD_PROGRESS_BAR) && !HAS_MARLINUI_U8GLIB + static millis_t progress_bar_ms; // Start time for the current progress bar cycle + static void draw_progress_bar(const uint8_t percent); + #if PROGRESS_MSG_EXPIRE > 0 + static millis_t expire_status_ms; // = 0 + FORCE_INLINE static void reset_progress_bar_timeout() { expire_status_ms = 0; } #endif - #endif static uint8_t lcd_status_update_delay; @@ -447,6 +447,10 @@ class MarlinUI { static constexpr bool drawing_screen = false, first_page = true; #endif + #if IS_DWIN_MARLINUI + static bool did_first_redraw; + #endif + static bool get_blink(); static void kill_screen(PGM_P const lcd_error, PGM_P const lcd_component); static void draw_kill_screen(); diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index 01c8bb80c0ef..dd52eb2b5b53 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -179,6 +179,8 @@ bool printer_busy() { void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, const uint8_t top/*=0*/, const uint8_t items/*=0*/) { if (currentScreen != screen) { + TERN_(IS_DWIN_MARLINUI, did_first_redraw = false); + TERN_(HAS_TOUCH_BUTTONS, repeat_delay = BUTTON_DELAY_MENU); TERN_(LCD_SET_PROGRESS_MANUALLY, progress_reset()); diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index 28d377da0cf2..7b253ad0ee76 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -39,7 +39,7 @@ typedef void (*selectFunc_t)(); #define SS_INVERT 0x02 #define SS_DEFAULT SS_CENTER -#if HAS_MARLINUI_U8GLIB && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) +#if EITHER(HAS_MARLINUI_U8GLIB, IS_DWIN_MARLINUI) && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) void _lcd_zoffset_overlay_gfx(const_float_t zvalue); #endif diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 6b3c4ed8fae7..0437156c0c11 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -184,7 +184,7 @@ #define BTN_EN1 PB10 #define BTN_EN2 PA6 -#elif ENABLED(DWIN_CREALITY_LCD) +#elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD #define BTN_ENC PB14 @@ -194,7 +194,7 @@ //#define LCD_LED_PIN PB2 #ifndef BEEPER_PIN #define BEEPER_PIN PB13 - #undef SPEAKER + //#undef SPEAKER #endif #elif ENABLED(DWIN_VET6_CREALITY_LCD) diff --git a/buildroot/share/fonts/buildhzk.py b/buildroot/share/fonts/buildhzk.py new file mode 100644 index 000000000000..185cc14e973c --- /dev/null +++ b/buildroot/share/fonts/buildhzk.py @@ -0,0 +1,64 @@ +# Generate a 'HZK' font file for the T5UIC1 DWIN LCD +# from multiple bdf font files. +# Note: the 16x16 glyphs are not produced +# Author: Taylor Talkington +# License: GPL + +import bdflib.reader +import math + +def glyph_bits(size_x, size_y, font, glyph_ord): + asc = font[b'FONT_ASCENT'] + desc = font[b'FONT_DESCENT'] + bits = [0 for y in range(size_y)] + + glyph_bytes = math.ceil(size_x / 8) + try: + glyph = font[glyph_ord] + for y, row in enumerate(glyph.data): + v = row + rpad = size_x - glyph.bbW + if rpad < 0: rpad = 0 + if glyph.bbW > size_x: v = v >> (glyph.bbW - size_x) # some glyphs are actually too wide to fit! + v = v << (glyph_bytes * 8) - size_x + rpad + v = v >> glyph.bbX + bits[y + desc + glyph.bbY] |= v + except KeyError: + pass + + bits.reverse() + return bits + +def marlin_font_hzk(): + fonts = [ + [6,12,'marlin-6x12-3.bdf'], + [8,16,'marlin-8x16.bdf'], + [10,20,'marlin-10x20.bdf'], + [12,24,'marlin-12x24.bdf'], + [14,28,'marlin-14x28.bdf'], + [16,32,'marlin-16x32.bdf'], + [20,40,'marlin-20x40.bdf'], + [24,48,'marlin-24x48.bdf'], + [28,56,'marlin-28x56.bdf'], + [32,64,'marlin-32x64.bdf'] + ] + + with open('marlin_fixed.hzk','wb') as output: + for f in fonts: + with open(f[2], 'rb') as file: + print(f'{f[0]}x{f[1]}') + font = bdflib.reader.read_bdf(file) + for glyph in range(128): + bits = glyph_bits(f[0], f[1], font, glyph) + glyph_bytes = math.ceil(f[0]/8) + + for b in bits: + try: + z = b.to_bytes(glyph_bytes, 'big') + output.write(z) + except OverflowError: + print('Overflow') + print(f'{glyph}') + print(font[glyph]) + for b in bits: print(f'{b:0{f[0]}b}') + return diff --git a/buildroot/share/fonts/marlin-10x20.bdf b/buildroot/share/fonts/marlin-10x20.bdf new file mode 100644 index 000000000000..e6716d9b12a4 --- /dev/null +++ b/buildroot/share/fonts/marlin-10x20.bdf @@ -0,0 +1,4104 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 20 100 100 +FONTBOUNDINGBOX 12 19 0 -3 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 17 +FONT_DESCENT 3 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +FE00 +FE00 +F180 +F180 +C180 +C180 +C180 +C780 +C780 +3F80 +0600 +0600 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +F000 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +FF80 +FF80 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 2 +BITMAP +08 +0C +0E +FF +FF +0E +0C +08 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 14 0 0 +BITMAP +0800 +1C00 +3E00 +7F00 +FF80 +FF80 +0800 +0800 +0800 +0800 +0800 +0800 +F800 +F800 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -2 +BITMAP +0800 +3E00 +3E00 +C980 +C980 +C980 +CF80 +CF80 +C180 +C180 +C180 +3E00 +3E00 +0800 +0800 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 11 8 0 2 +BITMAP +E700 +7380 +39C0 +1CE0 +1CE0 +39C0 +7380 +E700 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 15 1 -2 +BITMAP +FE +92 +92 +82 +82 +82 +82 +82 +82 +82 +82 +92 +92 +92 +FE +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 16 1 -3 +BITMAP +10 +28 +28 +28 +28 +28 +28 +28 +C6 +82 +92 +92 +92 +82 +82 +7C +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 4 1 5 +BITMAP +60 +90 +90 +60 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 12 4 0 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +00 +80 +80 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 5 2 8 +BITMAP +90 +90 +90 +90 +90 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 10 0 0 +BITMAP +2200 +2200 +FF80 +2200 +2200 +2200 +2200 +FF80 +2200 +2200 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 16 0 -2 +BITMAP +0800 +0800 +3E00 +4900 +8880 +8880 +4800 +3E00 +0900 +0880 +0880 +8880 +4900 +3E00 +0800 +0800 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +E080 +E080 +E100 +0200 +0400 +0800 +0800 +1000 +2000 +4380 +8380 +8380 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 0 +BITMAP +3000 +4800 +8800 +4800 +3000 +3000 +4880 +8900 +4600 +2900 +1080 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 5 4 8 +BITMAP +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +18 +20 +20 +40 +40 +40 +80 +80 +80 +40 +40 +40 +20 +20 +18 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +C0 +20 +20 +10 +10 +10 +08 +08 +08 +10 +10 +10 +20 +20 +C0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +8880 +4900 +3E00 +0800 +0800 +3E00 +4900 +8880 +0800 +0800 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 9 0 1 +BITMAP +0800 +0800 +0800 +0800 +FF80 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 3 5 2 -2 +BITMAP +E0 +20 +20 +40 +80 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 1 0 5 +BITMAP +FF80 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 2 2 3 0 +BITMAP +C0 +C0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0080 +0100 +0200 +0200 +0400 +0800 +0800 +1000 +1000 +2000 +4000 +8000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8380 +8480 +9880 +E080 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +20 +20 +E0 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +0100 +0200 +0400 +0800 +1000 +2000 +4000 +FF80 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF00 +0180 +0080 +0100 +0200 +0400 +0E00 +0100 +0080 +C100 +2200 +1C00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0200 +0600 +0A00 +1200 +2200 +4200 +8200 +8200 +FF80 +0200 +0200 +0200 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +8000 +8000 +8000 +FE00 +0100 +0080 +0080 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +06 +08 +10 +20 +40 +FC +82 +81 +81 +41 +22 +1C +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +0080 +0080 +0100 +0200 +0400 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3E00 +4100 +8080 +8080 +4100 +3E00 +4100 +8080 +8080 +8080 +4100 +3E00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +3C +42 +81 +81 +81 +41 +3F +01 +02 +04 +08 +70 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 2 7 2 0 +BITMAP +C0 +C0 +00 +00 +00 +C0 +C0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 3 9 2 -2 +BITMAP +C0 +C0 +00 +00 +E0 +20 +20 +40 +80 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 8 2 2 +BITMAP +10 +20 +40 +80 +80 +40 +20 +10 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 5 0 3 +BITMAP +FF80 +0000 +0000 +0000 +FF80 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 8 2 2 +BITMAP +80 +40 +20 +10 +10 +20 +40 +80 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +1C +22 +41 +81 +02 +04 +08 +08 +08 +00 +00 +08 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8780 +8880 +8880 +8880 +8700 +4000 +2000 +1E00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8080 +8080 +FF80 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +FC +42 +41 +41 +42 +7C +42 +41 +41 +41 +42 +FC +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8000 +8000 +8000 +8000 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +F8 +44 +42 +41 +41 +41 +41 +41 +41 +42 +44 +F8 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +8000 +8000 +8000 +8000 +FE00 +8000 +8000 +8000 +8000 +8000 +FF80 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +8000 +8000 +8000 +8000 +FE00 +8000 +8000 +8000 +8000 +8000 +8000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8000 +8000 +8000 +8780 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +FF80 +8080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +F8 +20 +20 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0F80 +0200 +0200 +0200 +0200 +0200 +0200 +0200 +0200 +8200 +4400 +3800 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +81 +82 +84 +88 +90 +E0 +A0 +90 +88 +84 +82 +81 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +FF80 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +C180 +A280 +9480 +8880 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +C080 +A080 +9080 +8880 +8480 +8280 +8180 +8080 +8080 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8080 +8080 +8080 +8080 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +FC +82 +81 +81 +81 +82 +FC +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8080 +8080 +8080 +8080 +8480 +4200 +2100 +1C80 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +FC +82 +81 +81 +81 +FE +90 +90 +88 +84 +82 +81 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +3C +42 +81 +80 +80 +7C +02 +01 +01 +81 +42 +3C +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +4100 +3E00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +4100 +2200 +1400 +0800 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8880 +8880 +8880 +5500 +2200 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +4100 +2200 +1400 +0800 +0800 +1400 +2200 +4100 +8080 +8080 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +4100 +2200 +1400 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +0080 +0080 +0100 +0200 +0400 +0800 +1000 +2000 +4000 +8000 +FF80 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +F8 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +F8 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +4000 +2000 +1000 +1000 +0800 +0800 +0400 +0400 +0200 +0100 +0080 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +F8 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +F8 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 5 0 8 +BITMAP +0800 +1400 +2200 +4100 +8080 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 1 0 -3 +BITMAP +FF80 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 5 2 8 +BITMAP +80 +40 +20 +10 +08 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 1 0 +BITMAP +7C +02 +01 +7F +81 +81 +81 +7F +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8000 +FE00 +8100 +8080 +8080 +8080 +8080 +8100 +FE00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 0 +BITMAP +3E +40 +80 +80 +80 +41 +22 +1C +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0080 +0080 +0080 +0080 +3F80 +4080 +8080 +8080 +8080 +8080 +4080 +3F80 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 0 +BITMAP +7E +81 +81 +81 +FE +80 +40 +3E +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 0 +BITMAP +0E00 +1100 +2080 +2000 +2000 +F800 +2000 +2000 +2000 +2000 +2000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +3E00 +4100 +8080 +8080 +8080 +8080 +4080 +3F80 +0080 +0100 +3E00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8000 +FE00 +8100 +8080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +20 +00 +00 +00 +E0 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 15 2 -3 +BITMAP +02 +00 +00 +00 +1E +02 +02 +02 +02 +02 +02 +02 +82 +44 +38 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8080 +8100 +8200 +8400 +F800 +8400 +8200 +8100 +8080 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +E0 +20 +20 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +F600 +8900 +8880 +8880 +8880 +8880 +8880 +8880 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +9E00 +A100 +C080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3E00 +4100 +8080 +8080 +8080 +8080 +4100 +3E00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +FE00 +8100 +8080 +8080 +8080 +8080 +8100 +FE00 +8000 +8000 +8000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +3F00 +4080 +8080 +8080 +8080 +8080 +4080 +3F80 +0080 +0080 +0080 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +9E00 +A100 +C080 +8000 +8000 +8000 +8000 +8000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3F80 +4000 +4000 +3E00 +0100 +0080 +0100 +FE00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +0800 +0800 +FF80 +0800 +0800 +0800 +0800 +0800 +0400 +0380 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +8080 +8080 +8080 +8080 +8180 +8280 +4480 +3880 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +8080 +8080 +8080 +8080 +4100 +2200 +1400 +0800 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +8080 +8080 +8080 +8880 +8880 +8880 +5500 +2200 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 9 0 0 +BITMAP +8080 +4100 +2200 +1400 +0800 +1400 +2200 +4100 +8080 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +8080 +8080 +8080 +8080 +4100 +2200 +1400 +0800 +1000 +2000 +4000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 0 +BITMAP +FF +02 +04 +08 +10 +20 +40 +FF +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 16 3 -2 +BITMAP +10 +20 +40 +40 +40 +40 +40 +80 +80 +40 +40 +40 +40 +40 +20 +10 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 15 4 -2 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 16 2 -2 +BITMAP +80 +40 +20 +20 +20 +20 +20 +10 +10 +20 +20 +20 +20 +20 +40 +80 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 10 5 0 3 +BITMAP +3040 +4840 +8880 +8500 +8200 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 12 4 0 +BITMAP +80 +80 +00 +00 +80 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 -2 +BITMAP +0800 +0800 +3E00 +C980 +C980 +C800 +C800 +C980 +3E00 +3E00 +0800 +0800 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0E00 +0E00 +3180 +3180 +3000 +F800 +F800 +3000 +3000 +3180 +CE00 +CE00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +C980 +3600 +3600 +C180 +C180 +3600 +C980 +C980 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +C180 +C180 +3600 +3600 +FF80 +0800 +0800 +FF80 +FF80 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 12 4 0 +BITMAP +80 +80 +80 +80 +80 +00 +00 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 13 2 0 +BITMAP +3E +C0 +C0 +38 +38 +C6 +C6 +C6 +38 +38 +06 +F8 +F8 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 1 2 12 +BITMAP +D8 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 10 12 0 0 +BITMAP +3F80 +3F80 +C040 +C040 +CE40 +C840 +C840 +CE40 +CE40 +C040 +3F80 +3F80 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +38 +38 +D8 +38 +38 +00 +00 +F8 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +0980 +3600 +3600 +C800 +C800 +3600 +0980 +0980 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 5 0 2 +BITMAP +FF80 +FF80 +0180 +0180 +0180 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 2 2 5 +BITMAP +F8 +F8 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 10 12 0 0 +BITMAP +3F80 +3F80 +C040 +C040 +CE40 +C840 +C840 +C840 +C840 +C040 +3F80 +3F80 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 1 0 12 +BITMAP +FF80 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 7 2 8 +BITMAP +38 +38 +C6 +C6 +C6 +38 +38 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +0800 +0800 +FF80 +0800 +0800 +0800 +0800 +0000 +FF80 +FF80 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +20 +20 +D8 +18 +18 +20 +20 +F8 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +E0 +E0 +18 +20 +20 +18 +18 +E0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 5 2 8 +BITMAP +18 +20 +20 +C0 +C0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +C180 +C180 +C180 +C180 +C180 +C780 +F980 +F980 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3F80 +F980 +F980 +F980 +F980 +F980 +3980 +3980 +0980 +0980 +0980 +0980 +0980 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 3 3 4 5 +BITMAP +E0 +E0 +E0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 3 2 -3 +BITMAP +18 +18 +E0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +20 +20 +E0 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 9 2 8 +BITMAP +20 +20 +D8 +D8 +20 +00 +00 +F8 +F8 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +C800 +3600 +3600 +0980 +0980 +3600 +C800 +C800 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +F000 +F000 +3180 +3600 +3600 +3800 +3800 +3600 +CE00 +CE00 +3600 +3600 +3F80 +0600 +0600 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +F000 +F000 +3180 +3600 +3600 +3800 +3800 +3600 +C980 +C980 +0180 +0180 +0600 +0F80 +0F80 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +F000 +F000 +0800 +0800 +3180 +0E00 +0E00 +F800 +F800 +3600 +CE00 +CE00 +3600 +3600 +3F80 +0600 +0600 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +0000 +0000 +0800 +0800 +0800 +3000 +3000 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3980 +3980 +CE00 +CE00 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0800 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3F80 +3F80 +C800 +C800 +C800 +FE00 +FE00 +C800 +C800 +C800 +CF80 +CF80 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -3 +BITMAP +3E00 +3E00 +C180 +C180 +C000 +C000 +C000 +C000 +C000 +C180 +3E00 +3E00 +0600 +0600 +3800 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 17 2 0 +BITMAP +C0 +C0 +20 +20 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 17 2 0 +BITMAP +18 +18 +20 +20 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 17 2 0 +BITMAP +20 +20 +D8 +D8 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 0 +BITMAP +D8 +D8 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3E00 +3E00 +3180 +3180 +3180 +F980 +F980 +3180 +3180 +3180 +3E00 +3E00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3980 +3980 +CE00 +CE00 +0000 +C180 +C180 +C180 +C180 +F180 +C980 +C980 +C780 +C780 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3980 +3980 +CE00 +CE00 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 2 +BITMAP +C180 +C180 +3600 +0800 +0800 +3600 +3600 +C180 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -2 +BITMAP +0180 +3E00 +3E00 +C780 +C780 +C980 +C980 +C980 +C980 +C980 +F180 +3E00 +3E00 +C000 +C000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +C180 +C180 +C180 +C180 +3600 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 12 2 0 +BITMAP +C0 +C0 +F8 +F8 +C6 +C6 +C6 +C6 +C6 +F8 +C0 +C0 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3E00 +3E00 +C180 +C180 +C600 +C800 +C800 +C600 +C600 +C180 +CE00 +CE00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3980 +CE00 +CE00 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0800 +0800 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3E00 +0980 +0980 +3E00 +3E00 +C800 +3F80 +3F80 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +3E00 +C180 +C180 +C000 +C000 +C180 +3E00 +3E00 +0600 +0600 +3800 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 13 2 0 +BITMAP +C0 +20 +20 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 13 2 0 +BITMAP +18 +20 +20 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 13 2 0 +BITMAP +20 +D8 +D8 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +D8 +D8 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0800 +3600 +3600 +0180 +0180 +3F80 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3980 +CE00 +CE00 +0000 +0000 +CE00 +F180 +F180 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3980 +CE00 +CE00 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 2 +BITMAP +0800 +0800 +0000 +FF80 +FF80 +0000 +0000 +0800 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3F80 +C780 +C780 +C980 +C980 +F180 +FE00 +FE00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 16 0 -3 +BITMAP +0600 +0800 +0800 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +3600 +0800 +0800 +3000 +3000 +C000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -3 +BITMAP +C000 +C000 +C000 +C000 +FE00 +C180 +C180 +C180 +C180 +C180 +FE00 +FE00 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -3 +BITMAP +3600 +3600 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +3600 +0800 +0800 +3000 +3000 +C000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-12x24.bdf b/buildroot/share/fonts/marlin-12x24.bdf new file mode 100644 index 000000000000..b8b85e328696 --- /dev/null +++ b/buildroot/share/fonts/marlin-12x24.bdf @@ -0,0 +1,4558 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 24 100 100 +FONTBOUNDINGBOX 14 23 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 22 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +FF00 +FF00 +F0C0 +F0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C3C0 +C3C0 +3FC0 +3FC0 +0300 +0300 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +F000 +F000 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +0C00 +0E00 +0F00 +0F80 +FFC0 +FFC0 +0F80 +0F00 +0E00 +0C00 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +1E00 +3F00 +7F80 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +FC00 +FC00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 0 +BITMAP +0C00 +0C00 +3F00 +3F00 +CCC0 +CCC0 +CCC0 +CCC0 +CFC0 +CFC0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +0C00 +0C00 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 13 10 0 4 +BITMAP +F380 +F380 +3DE0 +3DE0 +0E78 +0E78 +3DE0 +3DE0 +F380 +F380 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 0 +BITMAP +FFC0 +FFC0 +CCC0 +CCC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 -2 +BITMAP +0C00 +1E00 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +7380 +E1C0 +C0C0 +CCC0 +CCC0 +CCC0 +CCC0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 0 8 +BITMAP +30 +78 +CC +CC +78 +30 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 14 4 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 2 12 +BITMAP +CC +CC +CC +CC +CC +CC +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 12 0 2 +BITMAP +3300 +3300 +FFC0 +FFC0 +3300 +3300 +3300 +3300 +FFC0 +FFC0 +3300 +3300 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 19 0 0 +BITMAP +0C00 +0C00 +1E00 +3F00 +6F80 +CDC0 +CCC0 +CC00 +EC00 +7F00 +3F80 +0DC0 +0CC0 +CCC0 +EDC0 +7F80 +3F00 +0C00 +0C00 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +E0C0 +E0C0 +E0C0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +E000 +C1C0 +C1C0 +C1C0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3000 +7800 +CC00 +CC00 +CC00 +CC00 +7800 +7800 +DCC0 +CFC0 +C780 +C780 +7FC0 +3CC0 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 6 4 12 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +0C +1C +38 +30 +60 +60 +C0 +C0 +C0 +C0 +C0 +C0 +E0 +60 +70 +38 +1C +0C +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +C0 +E0 +70 +30 +18 +18 +0C +0C +0C +0C +0C +0C +18 +18 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +CCC0 +EDC0 +7F80 +3F00 +0C00 +0C00 +3F00 +7F80 +EDC0 +CCC0 +0C00 +0C00 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +0C00 +0C00 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 6 2 0 +BITMAP +F0 +F0 +30 +30 +E0 +C0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 2 0 8 +BITMAP +FFC0 +FFC0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 4 2 2 +BITMAP +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +00C0 +01C0 +0380 +0300 +0300 +0700 +0E00 +1C00 +3800 +3000 +3000 +7000 +E000 +C000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C1C0 +C3C0 +C7C0 +CEC0 +DCC0 +F8C0 +F0C0 +E0C0 +C0C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +30 +30 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +00C0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +00C0 +01C0 +0380 +0700 +0F00 +0F80 +01C0 +00C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0300 +0700 +0F00 +1F00 +3B00 +7300 +E300 +C300 +FFC0 +FFC0 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +C000 +C000 +FF00 +FF80 +01C0 +00C0 +00C0 +00C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0F00 +1F00 +3800 +7000 +E000 +C000 +FF00 +FF80 +C1C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +00C0 +00C0 +0180 +0300 +0600 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +7F80 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +7FC0 +3FC0 +00C0 +01C0 +0380 +0700 +3E00 +3C00 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 10 2 2 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 12 2 0 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +F0 +F0 +30 +30 +E0 +C0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 4 +BITMAP +0C +1C +38 +70 +E0 +E0 +70 +38 +1C +0C +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 6 +BITMAP +FFC0 +FFC0 +0000 +0000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 4 +BITMAP +C0 +E0 +70 +38 +1C +1C +38 +70 +E0 +C0 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C1C0 +0380 +0700 +0E00 +0C00 +0C00 +0C00 +0000 +0000 +0C00 +0C00 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C7C0 +CFC0 +CCC0 +CCC0 +CFC0 +C780 +C000 +C000 +7F00 +3F00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +30C0 +30C0 +30C0 +30C0 +3F80 +3F80 +30C0 +30C0 +30C0 +30C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C000 +C000 +C000 +C000 +C000 +C000 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +31C0 +30C0 +30C0 +30C0 +30C0 +30C0 +30C0 +30C0 +30C0 +31C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C000 +C000 +C000 +C000 +C3C0 +C3C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0FC0 +0FC0 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +C300 +E700 +7E00 +3C00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C1C0 +C380 +C700 +CE00 +DC00 +F800 +F800 +DC00 +CE00 +C700 +C380 +C1C0 +C0C0 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +E1C0 +F3C0 +FFC0 +DEC0 +CCC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +E0C0 +F0C0 +F8C0 +DCC0 +CEC0 +C7C0 +C3C0 +C1C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CEC0 +C700 +E380 +7DC0 +3CC0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +DC00 +CE00 +C700 +C380 +C1C0 +C0C0 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C000 +E000 +7F00 +3F80 +01C0 +00C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +FFC0 +7F80 +3300 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +1E00 +3F00 +7380 +E1C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +00C0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +E000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +FC +FC +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +FC +FC +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +E000 +7000 +3000 +3000 +3800 +1C00 +0E00 +0700 +0300 +0300 +0380 +01C0 +00C0 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +FC +FC +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +FC +FC +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 12 +BITMAP +0C00 +1E00 +3F00 +7380 +E1C0 +C0C0 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 2 0 -2 +BITMAP +FFC0 +FFC0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 2 12 +BITMAP +C0 +E0 +70 +38 +1C +0C +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +3F80 +01C0 +00C0 +3FC0 +7FC0 +C0C0 +C0C0 +7FC0 +3FC0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +7F00 +E000 +C000 +C000 +C000 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +00C0 +00C0 +00C0 +00C0 +3FC0 +7FC0 +E0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +7FC0 +3FC0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +FF80 +FF00 +C000 +E000 +7F00 +3F00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0F00 +1F80 +39C0 +30C0 +3000 +3000 +FC00 +FC00 +3000 +3000 +3000 +3000 +3000 +3000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +7FC0 +3FC0 +00C0 +01C0 +3F80 +3F00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 18 2 -2 +BITMAP +03 +03 +00 +00 +0F +0F +03 +03 +03 +03 +03 +03 +03 +03 +C3 +E7 +7E +3C +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +C0C0 +C1C0 +C380 +C700 +FE00 +FE00 +C700 +C380 +C1C0 +C0C0 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +F300 +FF80 +DFC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CF00 +DF80 +F9C0 +F0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +3FC0 +7FC0 +E0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +7FC0 +3FC0 +00C0 +00C0 +00C0 +00C0 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CF00 +DF80 +F9C0 +F0C0 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3FC0 +7FC0 +C000 +C000 +7F00 +3F80 +00C0 +00C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0C00 +0E00 +07C0 +03C0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C3C0 +E7C0 +7EC0 +3CC0 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +FFC0 +7F80 +3300 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +E1C0 +7380 +3F00 +1E00 +1E00 +3F00 +7380 +E1C0 +C0C0 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +1C00 +3800 +7000 +E000 +C000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +FFC0 +FFC0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +0C +1C +38 +30 +30 +30 +30 +70 +C0 +C0 +70 +30 +30 +30 +30 +38 +1C +0C +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 18 4 0 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +C0 +E0 +70 +30 +30 +30 +30 +38 +0C +0C +38 +30 +30 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 6 +BITMAP +30C0 +78C0 +DCC0 +CEC0 +C780 +C300 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 14 4 2 +BITMAP +C0 +C0 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 0 +BITMAP +0C00 +0C00 +3F00 +3F00 +CCC0 +CCC0 +CC00 +CC00 +CCC0 +CCC0 +3F00 +3F00 +0C00 +0C00 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0F00 +0F00 +30C0 +30C0 +3000 +3000 +FC00 +FC00 +3000 +3000 +30C0 +30C0 +CF00 +CF00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CCC0 +CCC0 +3300 +3300 +C0C0 +C0C0 +3300 +3300 +CCC0 +CCC0 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +3300 +3300 +FFC0 +FFC0 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 14 4 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 16 2 2 +BITMAP +3F +3F +C0 +C0 +3C +3C +C3 +C3 +C3 +C3 +3C +3C +03 +03 +FC +FC +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 2 2 16 +BITMAP +CC +CC +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 12 14 0 2 +BITMAP +3FC0 +3FC0 +C030 +C030 +CF30 +CF30 +CC30 +CC30 +CF30 +CF30 +C030 +C030 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +3C +3C +CC +CC +3C +3C +00 +00 +FC +FC +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +0CC0 +0CC0 +3300 +3300 +CC00 +CC00 +3300 +3300 +0CC0 +0CC0 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 4 +BITMAP +FFC0 +FFC0 +00C0 +00C0 +00C0 +00C0 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 2 2 8 +BITMAP +FC +FC +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 12 14 0 2 +BITMAP +3FC0 +3FC0 +C030 +C030 +CF30 +CF30 +CC30 +CC30 +CC30 +CC30 +C030 +C030 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 2 0 16 +BITMAP +FFC0 +FFC0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 8 2 12 +BITMAP +3C +3C +C3 +C3 +C3 +C3 +3C +3C +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +30 +30 +CC +CC +0C +0C +30 +30 +FC +FC +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +F0 +F0 +0C +0C +30 +30 +0C +0C +F0 +F0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 2 12 +BITMAP +0C +0C +30 +30 +C0 +C0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C3C0 +C3C0 +FCC0 +FCC0 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3FC0 +3FC0 +FCC0 +FCC0 +FCC0 +FCC0 +FCC0 +FCC0 +3CC0 +3CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 4 4 8 +BITMAP +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 4 2 -2 +BITMAP +0C +0C +F0 +F0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +30 +30 +F0 +F0 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 12 +BITMAP +30 +30 +CC +CC +30 +30 +00 +00 +FC +FC +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CC00 +CC00 +3300 +3300 +0CC0 +0CC0 +3300 +3300 +CC00 +CC00 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +F000 +F000 +30C0 +30C0 +3300 +3300 +3C00 +3C00 +3300 +3300 +CF00 +CF00 +3300 +3300 +3FC0 +3FC0 +0300 +0300 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +F000 +F000 +30C0 +30C0 +3300 +3300 +3C00 +3C00 +3300 +3300 +CCC0 +CCC0 +00C0 +00C0 +0300 +0300 +0FC0 +0FC0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +F000 +F000 +0C00 +0C00 +30C0 +30C0 +0F00 +0F00 +FC00 +FC00 +3300 +3300 +CF00 +CF00 +3300 +3300 +3FC0 +3FC0 +0300 +0300 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +0000 +0000 +0C00 +0C00 +0C00 +0C00 +3000 +3000 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0C00 +0C00 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3FC0 +3FC0 +CC00 +CC00 +CC00 +CC00 +FF00 +FF00 +CC00 +CC00 +CC00 +CC00 +CFC0 +CFC0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 -2 +BITMAP +3F00 +3F00 +C0C0 +C0C0 +C000 +C000 +C000 +C000 +C000 +C000 +C0C0 +C0C0 +3F00 +3F00 +0300 +0300 +3C00 +3C00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 20 2 2 +BITMAP +C0 +C0 +30 +30 +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 20 2 2 +BITMAP +0C +0C +30 +30 +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 20 2 2 +BITMAP +30 +30 +CC +CC +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 2 +BITMAP +CC +CC +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +3F00 +30C0 +30C0 +30C0 +30C0 +FCC0 +FCC0 +30C0 +30C0 +30C0 +30C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +F0C0 +F0C0 +CCC0 +CCC0 +C3C0 +C3C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +3300 +3300 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 0 +BITMAP +00C0 +00C0 +3F00 +3F00 +C3C0 +C3C0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +F0C0 +F0C0 +3F00 +3F00 +C000 +C000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 14 2 2 +BITMAP +C0 +C0 +FC +FC +C3 +C3 +C3 +C3 +C3 +C3 +FC +FC +C0 +C0 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +3F00 +C0C0 +C0C0 +C300 +C300 +CC00 +CC00 +C300 +C300 +C0C0 +C0C0 +CF00 +CF00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0C00 +0C00 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +3F00 +0CC0 +0CC0 +3F00 +3F00 +CC00 +CC00 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +3F00 +3F00 +C0C0 +C0C0 +C000 +C000 +C0C0 +C0C0 +3F00 +3F00 +0300 +0300 +3C00 +3C00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 16 2 2 +BITMAP +C0 +C0 +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 16 2 2 +BITMAP +0C +0C +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 16 2 2 +BITMAP +30 +30 +CC +CC +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +CC +CC +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0C00 +0C00 +3300 +3300 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +CF00 +CF00 +F0C0 +F0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +0000 +0000 +0C00 +0C00 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3FC0 +3FC0 +C3C0 +C3C0 +CCC0 +CCC0 +F0C0 +F0C0 +FF00 +FF00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 -2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +3000 +3000 +C000 +C000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 -2 +BITMAP +C000 +C000 +C000 +C000 +FF00 +FF00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 -2 +BITMAP +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +3000 +3000 +C000 +C000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-14x28.bdf b/buildroot/share/fonts/marlin-14x28.bdf new file mode 100644 index 000000000000..8a91ff060551 --- /dev/null +++ b/buildroot/share/fonts/marlin-14x28.bdf @@ -0,0 +1,5078 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 28 100 100 +FONTBOUNDINGBOX 16 27 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. orig" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 26 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +FFC0 +FFC0 +FFC0 +F830 +F830 +E030 +E030 +E030 +E030 +E030 +E1F0 +E1F0 +1FF0 +1FF0 +01C0 +01C0 +01C0 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +F800 +F800 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 11 0 5 +BITMAP +0600 +0700 +0780 +07C0 +FFE0 +FFF0 +FFE0 +07C0 +0780 +0700 +0600 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0F00 +1F80 +3FC0 +7FE0 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +FE00 +FE00 +FE00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +0600 +0600 +1FC0 +1FC0 +1FC0 +E630 +E630 +E630 +E630 +E7F0 +E7F0 +E7F0 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +0600 +0600 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 13 11 1 5 +BITMAP +E380 +F3C0 +79E0 +3CF0 +1E78 +1E78 +1E78 +3CF0 +79E0 +F3C0 +E380 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +FFF0 +FFF0 +E630 +E630 +E630 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E630 +E630 +E630 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 23 1 -2 +BITMAP +0C00 +0C00 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 6 1 10 +BITMAP +30 +78 +CC +CC +78 +30 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 17 5 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 7 3 14 +BITMAP +CC +CC +CC +CC +CC +CC +CC +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 14 0 2 +BITMAP +1980 +1980 +FFF0 +FFF0 +1980 +1980 +1980 +1980 +1980 +FFF0 +FFF0 +1980 +1980 +1980 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +0600 +0600 +1F80 +3FC0 +76E0 +E670 +C630 +C600 +E600 +7600 +3F80 +1FC0 +06E0 +0670 +C630 +E670 +76E0 +3FC0 +1F80 +0600 +0600 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +F060 +F060 +F060 +F060 +00E0 +03C0 +0780 +0E00 +0C00 +1C00 +3800 +7000 +E000 +C1E0 +C1E0 +C1E0 +C1E0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1800 +3C00 +7E00 +E600 +C600 +C600 +EE00 +7C00 +3800 +7C00 +EE30 +C770 +C3E0 +E3E0 +7F70 +3E30 +1C30 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 7 5 14 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +0E +1E +38 +70 +60 +E0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +E0 +60 +70 +38 +1E +0E +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +E0 +F0 +38 +1C +0C +0E +06 +06 +06 +06 +06 +06 +06 +06 +06 +0E +0C +1C +38 +F0 +E0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +E670 +F6F0 +3FC0 +1F80 +0600 +0600 +0600 +1F80 +3FC0 +F6F0 +E670 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 4 +BITMAP +0600 +0600 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 7 3 0 +BITMAP +F0 +F0 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 3 0 9 +BITMAP +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 5 3 2 +BITMAP +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0030 +0030 +0070 +00E0 +01C0 +0180 +0380 +0300 +0700 +0E00 +1C00 +1800 +3800 +7000 +E000 +C000 +C000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1F80 +3FC0 +6060 +C030 +C070 +C0F0 +C1B0 +C330 +C630 +CC30 +D830 +F030 +E030 +C030 +6060 +3FC0 +1F80 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 17 3 2 +BITMAP +30 +30 +30 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FC0 +3FE0 +7060 +E030 +C030 +0030 +0070 +00E0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +0030 +0030 +0070 +00E0 +01C0 +0380 +07C0 +03E0 +0070 +0030 +E030 +7070 +38E0 +1FC0 +0F80 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 0 2 +BITMAP +0180 +0180 +0380 +0780 +0F80 +1D80 +3980 +7180 +E180 +C180 +FFE0 +FFE0 +0180 +0180 +0180 +0180 +0180 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +C000 +C000 +C000 +FFC0 +FFE0 +0070 +0030 +0030 +0030 +0030 +E030 +7070 +38E0 +1FC0 +0F80 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +03C0 +07C0 +0E00 +1C00 +3800 +7000 +E000 +C000 +FFC0 +FFE0 +C070 +C030 +C030 +E030 +7070 +3FE0 +1FC0 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +0030 +0030 +0030 +0070 +00E0 +01C0 +0380 +0700 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +7FC0 +E0E0 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0C0 +C060 +C060 +C060 +C060 +E060 +7FE0 +3FE0 +0060 +00E0 +01C0 +0380 +0700 +1E00 +1C00 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 11 3 2 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 13 3 0 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +F0 +F0 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 13 3 4 +BITMAP +06 +0E +1C +38 +70 +E0 +C0 +E0 +70 +38 +1C +0E +06 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 7 0 7 +BITMAP +FFF0 +FFF0 +0000 +0000 +0000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 13 2 4 +BITMAP +C0 +E0 +70 +38 +1C +0E +06 +0E +1C +38 +70 +E0 +C0 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 0 2 +BITMAP +1F80 +3FC0 +70E0 +E060 +C060 +00E0 +01C0 +0380 +0700 +0600 +0600 +0600 +0000 +0000 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +1F00 +3F80 +71C0 +E0E0 +C060 +C7E0 +CFE0 +CE60 +CC60 +CEE0 +CFE0 +C7C0 +C000 +E000 +7000 +3F80 +1F80 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +1F00 +3F80 +71C0 +E0E0 +C060 +C060 +C060 +C060 +FFE0 +FFE0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +30E0 +3060 +3060 +3060 +30E0 +3FE0 +3FC0 +30C0 +3060 +3060 +3060 +3060 +30E0 +FFE0 +FFC0 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F00 +7F80 +E1C0 +C0E0 +C060 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C060 +C0E0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +30E0 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +30E0 +FFC0 +FF80 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +C000 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +C000 +C000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +C000 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +1F00 +3F80 +71C0 +E0E0 +C060 +C000 +C000 +C000 +C000 +C000 +C3E0 +C3E0 +C060 +C0E0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +FFE0 +FFE0 +FFE0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 8 16 2 2 +BITMAP +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 0 2 +BITMAP +07E0 +07E0 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +C180 +E380 +7700 +3E00 +1C00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C0E0 +C1C0 +C380 +C700 +CE00 +DC00 +F800 +F000 +F800 +DC00 +CE00 +C700 +C380 +C1C0 +C0E0 +C060 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 17 1 2 +BITMAP +C0C0 +C0C0 +E1C0 +F3C0 +FFC0 +DEC0 +CCC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +E060 +F060 +F860 +DC60 +CE60 +C760 +C3E0 +C1E0 +C0E0 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +CC60 +CE60 +C760 +C3A0 +E1C0 +7EE0 +3E70 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +DC00 +CE00 +C700 +C380 +C1C0 +C0E0 +C060 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C000 +C000 +E000 +7F80 +3FC0 +00E0 +0060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +60C0 +60C0 +3180 +3180 +1B00 +0E00 +0E00 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +CE60 +CE60 +CE60 +FFE0 +FBE0 +7BC0 +3180 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 17 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +1E00 +3F00 +7380 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 17 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 2 +BITMAP +FFE0 +FFE0 +0060 +0060 +00E0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +E000 +C000 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +FE +FE +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +E000 +6000 +7000 +3000 +3800 +1C00 +0C00 +0E00 +0600 +0700 +0380 +0180 +01C0 +00C0 +00E0 +0060 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 21 3 0 +BITMAP +FC +FC +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +FC +FC +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 7 0 14 +BITMAP +0600 +0F00 +1F80 +39C0 +70E0 +E070 +C030 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 2 0 -2 +BITMAP +FFF0 +FFF0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 7 3 14 +BITMAP +C0 +E0 +70 +38 +1C +0E +06 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +3FC0 +00E0 +0060 +0060 +3FE0 +7FE0 +E060 +C060 +E0E0 +7FE0 +3FC0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +7F80 +E000 +C000 +C000 +C000 +C000 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0030 +0030 +0030 +0030 +0030 +3FF0 +7FF0 +E030 +C030 +C030 +C030 +C030 +C030 +C030 +E030 +7FF0 +3FF0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C0E0 +FFC0 +FF80 +C000 +C000 +E000 +7F80 +3F80 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +0F00 +1F80 +39C0 +30E0 +3060 +3000 +3000 +3000 +FC00 +FC00 +3000 +3000 +3000 +3000 +3000 +3000 +3000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 -2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +E060 +7FE0 +3FE0 +0060 +00E0 +3FC0 +3F80 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 16 3 2 +BITMAP +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 20 3 -2 +BITMAP +0180 +0180 +0000 +0000 +0F80 +0F80 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +C180 +E380 +7F00 +3E00 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +C060 +C0E0 +C1C0 +C380 +C700 +FE00 +FE00 +C700 +C380 +C1C0 +C0E0 +C060 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 17 3 2 +BITMAP +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +F380 +FFC0 +DEE0 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +CF80 +DFC0 +F8E0 +F060 +E060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 -2 +BITMAP +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 -2 +BITMAP +3FE0 +7FE0 +E060 +C060 +C060 +C060 +C060 +C060 +C060 +E060 +7FE0 +3FE0 +0060 +0060 +0060 +0060 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +CF80 +DFC0 +F8E0 +F060 +E060 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3FE0 +7FE0 +E000 +C000 +E000 +7F80 +3FC0 +00E0 +0060 +00E0 +FFC0 +FF80 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0700 +03F0 +01F0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C0E0 +C1E0 +C3E0 +E760 +7E60 +3C60 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 12 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 12 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +DEC0 +FFC0 +7380 +3300 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +C030 +E070 +70E0 +39C0 +1F80 +0F00 +0F00 +1F80 +39C0 +70E0 +E070 +C030 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 16 1 -2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +71C0 +3B80 +1F00 +0E00 +1C00 +3800 +7000 +E000 +C000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +FFF0 +FFF0 +00E0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +0E +1E +38 +30 +30 +30 +30 +30 +70 +E0 +C0 +E0 +70 +30 +30 +30 +30 +30 +38 +1E +0E +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 21 5 0 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 21 3 0 +BITMAP +C0 +E0 +70 +30 +30 +30 +30 +30 +38 +1C +0C +1C +38 +30 +30 +30 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 7 1 7 +BITMAP +3060 +7860 +FC60 +CC60 +CEE0 +C7C0 +C380 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 17 5 2 +BITMAP +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 16 0 0 +BITMAP +0600 +0600 +1FC0 +1FC0 +E630 +E630 +E630 +E600 +E600 +E630 +E630 +1FC0 +1FC0 +1FC0 +0600 +0600 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +07C0 +07C0 +07C0 +1830 +1830 +1800 +1800 +FE00 +FE00 +FE00 +1800 +1800 +1830 +1830 +E7C0 +E7C0 +E7C0 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +E630 +E630 +19C0 +19C0 +19C0 +E030 +E030 +19C0 +19C0 +E630 +E630 +E630 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +E030 +E030 +E030 +19C0 +19C0 +FFF0 +FFF0 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 17 5 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 19 3 2 +BITMAP +3F80 +3F80 +C000 +C000 +C000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +0180 +0180 +FE00 +FE00 +FE00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 2 3 19 +BITMAP +CE +CE +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 14 17 0 2 +BITMAP +1FF0 +1FF0 +1FF0 +E00C +E00C +E7CC +E7CC +E60C +E60C +E60C +E7CC +E7CC +E00C +E00C +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +3E +3E +CE +CE +3E +3E +3E +00 +00 +FE +FE +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +0630 +0630 +19C0 +19C0 +19C0 +E600 +E600 +19C0 +19C0 +0630 +0630 +0630 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 7 0 5 +BITMAP +FFF0 +FFF0 +FFF0 +0030 +0030 +0030 +0030 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 3 3 9 +BITMAP +FE +FE +FE +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 14 17 0 2 +BITMAP +1FF0 +1FF0 +1FF0 +E00C +E00C +E7CC +E7CC +E60C +E60C +E60C +E60C +E60C +E00C +E00C +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 2 0 19 +BITMAP +FFF0 +FFF0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 9 3 14 +BITMAP +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +30 +30 +CE +CE +0E +0E +0E +30 +30 +FE +FE +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +F0 +F0 +0E +0E +30 +30 +30 +0E +0E +F0 +F0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 7 3 14 +BITMAP +0E +0E +30 +30 +30 +C0 +C0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 16 0 -2 +BITMAP +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E1F0 +E1F0 +FE30 +FE30 +FE30 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1FF0 +1FF0 +FE30 +FE30 +FE30 +FE30 +FE30 +FE30 +FE30 +1E30 +1E30 +1E30 +0630 +0630 +0630 +0630 +0630 +0630 +0630 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 5 5 5 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 4 3 -2 +BITMAP +0E +0E +F0 +F0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +30 +30 +F0 +F0 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 12 3 14 +BITMAP +30 +30 +30 +CE +CE +30 +30 +00 +00 +00 +FE +FE +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +E600 +E600 +19C0 +19C0 +19C0 +0630 +0630 +19C0 +19C0 +E600 +E600 +E600 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +F800 +F800 +1830 +1830 +19C0 +19C0 +19C0 +1E00 +1E00 +19C0 +19C0 +E7C0 +E7C0 +E7C0 +19C0 +19C0 +1FF0 +1FF0 +01C0 +01C0 +01C0 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +F800 +F800 +1830 +1830 +19C0 +19C0 +19C0 +1E00 +1E00 +19C0 +19C0 +E630 +E630 +E630 +0030 +0030 +01C0 +01C0 +07F0 +07F0 +07F0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +F800 +F800 +F800 +0600 +0600 +1830 +1830 +07C0 +07C0 +07C0 +FE00 +FE00 +19C0 +19C0 +E7C0 +E7C0 +E7C0 +19C0 +19C0 +1FF0 +1FF0 +01C0 +01C0 +01C0 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +0000 +0000 +0600 +0600 +0600 +0600 +0600 +1800 +1800 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1E30 +1E30 +1E30 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0600 +0600 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FF0 +1FF0 +1FF0 +E600 +E600 +E600 +E600 +FFC0 +FFC0 +FFC0 +E600 +E600 +E600 +E600 +E7F0 +E7F0 +E7F0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 -2 +BITMAP +1FC0 +1FC0 +1FC0 +E030 +E030 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E030 +E030 +1FC0 +1FC0 +1FC0 +01C0 +01C0 +1E00 +1E00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 24 3 2 +BITMAP +C0 +C0 +C0 +30 +30 +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 24 3 2 +BITMAP +0E +0E +0E +30 +30 +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 24 3 2 +BITMAP +30 +30 +30 +CE +CE +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 2 +BITMAP +CE +CE +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FC0 +1FC0 +1FC0 +1830 +1830 +1830 +1830 +FE30 +FE30 +FE30 +1830 +1830 +1830 +1830 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1E30 +1E30 +1E30 +E7C0 +E7C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +F830 +F830 +E630 +E630 +E630 +E1F0 +E1F0 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1E30 +1E30 +1E30 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 11 0 5 +BITMAP +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +19C0 +19C0 +E030 +E030 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +0030 +0030 +1FC0 +1FC0 +1FC0 +E1F0 +E1F0 +E630 +E630 +E630 +E630 +E630 +E630 +E630 +F830 +F830 +1FC0 +1FC0 +1FC0 +E000 +E000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 17 3 2 +BITMAP +C000 +C000 +C000 +FE00 +FE00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +FE00 +FE00 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FC0 +1FC0 +1FC0 +E030 +E030 +E1C0 +E1C0 +E600 +E600 +E600 +E1C0 +E1C0 +E030 +E030 +E7C0 +E7C0 +E7C0 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1E30 +1E30 +E7C0 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0600 +0600 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +1FC0 +1FC0 +0630 +0630 +0630 +1FC0 +1FC0 +E600 +E600 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 16 0 -2 +BITMAP +1FC0 +1FC0 +E030 +E030 +E030 +E000 +E000 +E030 +E030 +1FC0 +1FC0 +1FC0 +01C0 +01C0 +1E00 +1E00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 19 3 2 +BITMAP +C0 +C0 +30 +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 19 3 2 +BITMAP +0E +0E +30 +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 19 3 2 +BITMAP +30 +30 +CE +CE +CE +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 17 3 2 +BITMAP +CE +CE +CE +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0600 +0600 +19C0 +19C0 +19C0 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1E30 +1E30 +E7C0 +E7C0 +E7C0 +0000 +0000 +E7C0 +E7C0 +F830 +F830 +F830 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1E30 +1E30 +E7C0 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 11 0 5 +BITMAP +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +0000 +0000 +0600 +0600 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +1FF0 +1FF0 +E1F0 +E1F0 +E1F0 +E630 +E630 +F830 +F830 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 23 0 -2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +1800 +1800 +E000 +E000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 -2 +BITMAP +E000 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 -2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +1800 +1800 +E000 +E000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-16x32.bdf b/buildroot/share/fonts/marlin-16x32.bdf new file mode 100644 index 000000000000..0cbcbb6879bb --- /dev/null +++ b/buildroot/share/fonts/marlin-16x32.bdf @@ -0,0 +1,5492 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 32 100 100 +FONTBOUNDINGBOX 18 31 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 30 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +FFE0 +FFE0 +FFE0 +FC1C +FC1C +FC1C +E01C +E01C +E01C +E01C +E01C +E0FC +E0FC +E0FC +1FFC +1FFC +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +FC00 +FC00 +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 15 0 5 +BITMAP +0200 +0300 +0380 +03C0 +03E0 +03F0 +FFF8 +FFFC +FFF8 +03F0 +03E0 +03C0 +0380 +0300 +0200 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 22 0 3 +BITMAP +0300 +0780 +0FC0 +1FE0 +3FF0 +7FF8 +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 0 +BITMAP +0300 +0300 +1FE0 +1FE0 +1FE0 +E31C +E31C +E31C +E31C +E31C +E3FC +E3FC +E3FC +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1296 0 +DWIDTH 18 0 +BBX 16 13 0 6 +BITMAP +F9E0 +F9F0 +7CF8 +3E7C +1F3E +0F9F +078F +0F9F +1F3E +3E7C +7EF8 +FDF0 +F9E0 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 0 +BITMAP +FFFC +FFFC +E31C +E31C +E31C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E31C +E31C +E31C +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 26 0 -2 +BITMAP +0780 +0FC0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +3CF0 +7CF8 +F03C +E01C +E01C +E31C +E31C +E31C +E31C +E31C +E01C +E01C +F03C +7FF8 +3FF0 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 7 7 1 12 +BITMAP +38 +7C +EE +C6 +EE +7C +38 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 19 6 3 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 8 3 16 +BITMAP +E7 +E7 +E7 +E7 +E7 +E7 +E7 +E7 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 16 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +FFFC +FFFC +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +FFFC +FFFC +1CE0 +1CE0 +1CE0 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 25 0 0 +BITMAP +0300 +0300 +0300 +1FE0 +3FF0 +7FF8 +F33C +E31C +E31C +E300 +F300 +7FE0 +3FF0 +1FF8 +033C +031C +031C +E31C +F33C +7FF8 +3FF0 +1FE0 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +F81C +F81C +F81C +F81C +F83C +0078 +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +7800 +F07C +E07C +E07C +E07C +E07C +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1C00 +3E00 +7E00 +F700 +E300 +E300 +E300 +F700 +7E00 +3E00 +3E00 +771C +E3BC +E1FC +E0F0 +F1F0 +7FFC +3FBC +1F1C +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 8 6 16 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 7 24 4 0 +BITMAP +0E +1E +38 +30 +60 +60 +60 +60 +E0 +C0 +C0 +C0 +C0 +C0 +C0 +E0 +60 +60 +60 +30 +38 +18 +0E +0E +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 7 24 5 0 +BITMAP +E0 +F0 +38 +18 +0C +0C +0C +0C +0E +06 +06 +06 +06 +06 +06 +0E +0C +0C +0C +18 +38 +30 +E0 +E0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0300 +0300 +0300 +E31C +E31C +F33C +3FF0 +1FE0 +0300 +0300 +0300 +1FE0 +1FE0 +3FF0 +F33C +E31C +0300 +0300 +0300 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 6 +BITMAP +0300 +0300 +0300 +0300 +0300 +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 8 3 0 +BITMAP +F8 +F8 +18 +18 +38 +F0 +E0 +C0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 3 0 11 +BITMAP +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 5 3 3 +BITMAP +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +001C +001C +0038 +0070 +00F0 +00E0 +01C0 +03C0 +0380 +0700 +0F00 +0E00 +1C00 +1C00 +3800 +7000 +F000 +E000 +C000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E0FC +E1FC +E3DC +E79C +EF1C +FE1C +FC1C +F81C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 19 3 3 +BITMAP +18 +38 +78 +F8 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +001C +003C +0078 +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +001C +001C +003C +0078 +00F0 +01E0 +03F0 +03F8 +003C +001C +001C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +00E0 +01E0 +03E0 +07E0 +0FE0 +1EE0 +3CE0 +78E0 +F0E0 +E0E0 +E0E0 +FFFC +FFFC +FFFC +00E0 +00E0 +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +E000 +E000 +E000 +FFF0 +FFF8 +003C +001C +001C +001C +001C +001C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +03E0 +07E0 +0FE0 +1E00 +3C00 +7800 +F000 +E000 +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +001C +001C +003C +0078 +00F0 +01E0 +03C0 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +001C +001C +003C +0078 +00F0 +1FE0 +1FC0 +1F80 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 13 3 3 +BITMAP +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 16 3 0 +BITMAP +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +F8 +F8 +F8 +18 +18 +F8 +F0 +E0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 14 3 5 +BITMAP +07 +0F +1F +3C +78 +F0 +E0 +E0 +F0 +78 +3C +1F +0F +07 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 9 0 8 +BITMAP +FFFC +FFFC +FFFC +0000 +0000 +0000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 14 3 5 +BITMAP +E0 +F0 +F8 +7C +3E +1F +0F +0F +1F +3E +7C +F8 +F0 +E0 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E03C +0078 +00F0 +01E0 +03C0 +0380 +0380 +0380 +0380 +0000 +0000 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E1FC +E3FC +E31C +E31C +E31C +E3FC +E3FC +E1F8 +E000 +F000 +7FE0 +3FE0 +1FE0 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +1C3C +1C1C +1C1C +1C1C +1C3C +1FF8 +1FF0 +1FF8 +1C3C +1C1C +1C1C +1C1C +1C3C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +1C3C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C3C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E000 +E000 +E000 +E000 +E000 +E0FC +E0FC +E0FC +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 19 3 3 +BITMAP +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +07FC +07FC +07FC +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +E0E0 +F1E0 +7FC0 +3F80 +1F00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E03C +E078 +E0F0 +E1E0 +E3C0 +E780 +EF00 +FE00 +FC00 +FE00 +EF00 +E780 +E3C0 +E1E0 +E0F0 +E078 +E03C +E01C +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +F03C +F87C +FCFC +FFFC +EFDC +E79C +E31C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +F01C +F81C +FC1C +FE1C +EF1C +E79C +E3DC +E1FC +E0FC +E07C +E03C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E19C +E1DC +E1EC +F0F0 +7F78 +3FBC +1F9C +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +E700 +E780 +E3C0 +E1E0 +E0F0 +E078 +E03C +E01C +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E000 +F000 +7FE0 +3FF0 +1FF8 +003C +001C +001C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7038 +3878 +3870 +1CE0 +1FE0 +0FC0 +0780 +0300 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E79C +E79C +E79C +E79C +F7BC +7FF8 +3FF0 +1CE0 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +F03C +7878 +3CF0 +1FE0 +0FC0 +07C0 +0FC0 +1FE0 +3FF0 +7CF8 +F87C +F03C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 15 19 0 3 +BITMAP +E00E +E00E +E00E +E00E +E00E +E00E +701C +3838 +1FF0 +0FE0 +07C0 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +001C +003C +0078 +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +7800 +F000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 0 +BITMAP +FF +FF +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +FF +FF +FF +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +F000 +F000 +7800 +3C00 +1C00 +1E00 +0F00 +0780 +0380 +03C0 +01C0 +01E0 +00E0 +00F0 +0078 +003C +001C +001C +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 25 3 0 +BITMAP +FF +FF +FF +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +FF +FF +FF +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 8 0 16 +BITMAP +0780 +0FC0 +1FE0 +3FF0 +7CF8 +F87C +F03C +E01C +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 3 0 -2 +BITMAP +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 8 3 16 +BITMAP +E0 +F0 +78 +3C +1E +0F +07 +03 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 14 0 3 +BITMAP +1FE0 +1FF0 +1FF8 +003C +001C +001C +1FFC +3FFC +7FFC +E01C +E01C +7FFC +3FFC +1FFC +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 14 0 3 +BITMAP +1FE0 +3FE0 +7FE0 +F000 +E000 +E000 +E000 +E000 +E000 +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +001C +001C +001C +001C +001C +1FFC +3FFC +7FFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 14 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E03C +FFF8 +FFF0 +FFE0 +E000 +F000 +7FE0 +3FE0 +1FE0 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +03E0 +07F0 +0FF8 +1E3C +1C1C +1C1C +1C00 +1C00 +FF80 +FF80 +FF80 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 -2 +BITMAP +1FE0 +3FF0 +7FF8 +F01C +E01C +E01C +E01C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +001C +001C +003C +1FF8 +1FF0 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 9 19 3 3 +BITMAP +1C00 +1C00 +1C00 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 24 3 -2 +BITMAP +00E0 +00E0 +00E0 +0000 +0000 +07E0 +07E0 +07E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +E0E0 +E0E0 +F1E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +E01C +E03C +E078 +E0F0 +E1E0 +E3C0 +FF80 +FF80 +FFC0 +E1E0 +E0F0 +E078 +E03C +E01C +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 9 19 3 3 +BITMAP +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +FEF0 +FFF8 +E7BC +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E7F0 +EFF8 +FFFC +FC3C +F81C +F01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +1FFC +3FFC +7FFC +F01C +E01C +E01C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +001C +001C +001C +001C +001C +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E7F0 +EFF8 +FFFC +FC1C +F81C +F000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FFC +3FFC +7FFC +E000 +F000 +7FE0 +3FF0 +1FF8 +003C +001C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0700 +0700 +0700 +0700 +0700 +FFFC +FFFC +FFFC +0700 +0700 +0700 +0700 +0700 +0700 +0700 +0780 +03FC +01FC +00FC +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E03C +E07C +E0FC +F1FC +7FDC +3F9C +1F1C +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7878 +3CF0 +1FE0 +0FC0 +0780 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E31C +E31C +E31C +E31C +F7BC +7FF8 +3FF0 +1CE0 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +F03C +7878 +3CF0 +1FE0 +0FC0 +0780 +0FC0 +1FE0 +3CF0 +7878 +F03C +E01C +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 13 18 0 -2 +BITMAP +E038 +E038 +E038 +E038 +E038 +E038 +E038 +F078 +78F0 +3DE0 +1FC0 +0F80 +0F00 +1E00 +3C00 +7800 +F000 +E000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +FFFC +FFFC +FFFC +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 0 +BITMAP +07 +0F +1C +18 +18 +18 +18 +18 +38 +38 +E0 +E0 +E0 +38 +38 +18 +18 +18 +18 +18 +1C +0F +0F +07 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 3 24 6 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 0 +BITMAP +E0 +F0 +38 +18 +18 +18 +18 +18 +18 +1C +07 +07 +07 +1C +18 +18 +18 +18 +18 +18 +38 +F0 +E0 +E0 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 8 0 8 +BITMAP +3C1C +7E1C +F71C +E31C +E3BC +E1F0 +E0E0 +E0E0 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 19 6 3 +BITMAP +C0 +C0 +C0 +00 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 0 +BITMAP +0300 +0300 +0300 +1FE0 +1FE0 +E31C +E31C +E31C +E300 +E300 +E300 +E31C +E31C +1FE0 +1FE0 +1FE0 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +03E0 +03E0 +03E0 +1C1C +1C1C +1C1C +1C00 +1C00 +FF00 +FF00 +FF00 +1C00 +1C00 +1C00 +1C1C +1C1C +E3E0 +E3E0 +E3E0 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E31C +E31C +1CE0 +1CE0 +1CE0 +E01C +E01C +E01C +1CE0 +1CE0 +E31C +E31C +E31C +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +1CE0 +1CE0 +1CE0 +FFFC +FFFC +0300 +0300 +0300 +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 19 6 3 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 21 3 3 +BITMAP +1FE0 +1FE0 +E000 +E000 +E000 +1F00 +1F00 +1F00 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +1F00 +1F00 +1F00 +00E0 +00E0 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 2 3 22 +BITMAP +E7 +E7 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 16 19 0 3 +BITMAP +1FFC +1FFC +1FFC +E003 +E003 +E003 +E3E3 +E3E3 +E303 +E303 +E303 +E3E3 +E3E3 +E3E3 +E003 +E003 +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +1F +1F +1F +E7 +E7 +1F +1F +1F +00 +00 +00 +FF +FF +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +031C +031C +1CE0 +1CE0 +1CE0 +E300 +E300 +E300 +1CE0 +1CE0 +031C +031C +031C +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 8 0 6 +BITMAP +FFFC +FFFC +FFFC +001C +001C +001C +001C +001C +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 3 3 11 +BITMAP +FF +FF +FF +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 16 19 0 3 +BITMAP +1FFC +1FFC +1FFC +E003 +E003 +E003 +E3E3 +E3E3 +E303 +E303 +E303 +E303 +E303 +E303 +E003 +E003 +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 2 0 22 +BITMAP +FFFC +FFFC +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 11 3 16 +BITMAP +1F00 +1F00 +1F00 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +1F00 +1F00 +1F00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0300 +0300 +0300 +0300 +0300 +0300 +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +18 +18 +18 +E7 +E7 +07 +07 +07 +18 +18 +18 +FF +FF +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +F8 +F8 +F8 +07 +07 +18 +18 +18 +07 +07 +07 +F8 +F8 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 8 3 16 +BITMAP +07 +07 +18 +18 +18 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E0FC +E0FC +FF1C +FF1C +FF1C +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1FFC +1FFC +FF1C +FF1C +FF1C +FF1C +FF1C +FF1C +FF1C +FF1C +1F1C +1F1C +1F1C +031C +031C +031C +031C +031C +031C +031C +031C +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 5 6 11 +BITMAP +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 5 3 -2 +BITMAP +07 +07 +07 +F8 +F8 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +18 +18 +18 +F8 +F8 +18 +18 +18 +18 +18 +18 +FF +FF +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 14 3 16 +BITMAP +18 +18 +18 +E7 +E7 +E7 +18 +18 +00 +00 +00 +FF +FF +FF +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E300 +E300 +1CE0 +1CE0 +1CE0 +031C +031C +031C +1CE0 +1CE0 +E300 +E300 +E300 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +FC00 +FC00 +FC00 +1C1C +1C1C +1CE0 +1CE0 +1CE0 +1F00 +1F00 +1F00 +1CE0 +1CE0 +E3E0 +E3E0 +E3E0 +1CE0 +1CE0 +1CE0 +1FFC +1FFC +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +FC00 +FC00 +FC00 +1C1C +1C1C +1CE0 +1CE0 +1CE0 +1F00 +1F00 +1F00 +1CE0 +1CE0 +E31C +E31C +E31C +001C +001C +001C +00E0 +00E0 +03FC +03FC +03FC +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +FC00 +FC00 +FC00 +0300 +0300 +0300 +1C1C +1C1C +03E0 +03E0 +03E0 +FF00 +FF00 +FF00 +1CE0 +1CE0 +E3E0 +E3E0 +E3E0 +1CE0 +1CE0 +1CE0 +1FFC +1FFC +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0300 +0300 +0300 +0000 +0000 +0000 +0300 +0300 +0300 +0300 +0300 +1C00 +1C00 +1C00 +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1F1C +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0300 +0300 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FFC +1FFC +1FFC +E300 +E300 +E300 +E300 +E300 +FFE0 +FFE0 +FFE0 +E300 +E300 +E300 +E300 +E300 +E3FC +E3FC +E3FC +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 -2 +BITMAP +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E01C +E01C +1FE0 +1FE0 +1FE0 +00E0 +00E0 +00E0 +1F00 +1F00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 27 3 3 +BITMAP +E0 +E0 +E0 +18 +18 +18 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 27 3 3 +BITMAP +07 +07 +07 +18 +18 +18 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 27 3 3 +BITMAP +18 +18 +18 +E7 +E7 +E7 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 3 +BITMAP +E7 +E7 +E7 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +1FE0 +1FE0 +1C1C +1C1C +1C1C +1C1C +1C1C +FF1C +FF1C +FF1C +1C1C +1C1C +1C1C +1C1C +1C1C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1F1C +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +FC1C +FC1C +E31C +E31C +E31C +E0FC +E0FC +E0FC +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1F1C +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 6 +BITMAP +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +E01C +E01C +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 0 +BITMAP +001C +001C +1FE0 +1FE0 +1FE0 +E0FC +E0FC +E0FC +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +FC1C +FC1C +1FE0 +1FE0 +1FE0 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 19 3 3 +BITMAP +E000 +E000 +E000 +FF00 +FF00 +FF00 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +FF00 +FF00 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E0E0 +E0E0 +E300 +E300 +E300 +E0E0 +E0E0 +E0E0 +E01C +E01C +E3E0 +E3E0 +E3E0 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0300 +0300 +0300 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FE0 +1FE0 +031C +031C +031C +1FE0 +1FE0 +1FE0 +E300 +E300 +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +1FE0 +1FE0 +E01C +E01C +E01C +E000 +E000 +E000 +E01C +E01C +1FE0 +1FE0 +1FE0 +00E0 +00E0 +00E0 +1F00 +1F00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 21 3 3 +BITMAP +E0 +E0 +18 +18 +18 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 21 3 3 +BITMAP +07 +07 +18 +18 +18 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 21 3 3 +BITMAP +18 +18 +E7 +E7 +E7 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 19 3 3 +BITMAP +E7 +E7 +E7 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0300 +0300 +1CE0 +1CE0 +1CE0 +001C +001C +001C +1FFC +1FFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +0000 +E3E0 +E3E0 +FC1C +FC1C +FC1C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 6 +BITMAP +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +0000 +0000 +0000 +0300 +0300 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FFC +1FFC +E0FC +E0FC +E0FC +E31C +E31C +E31C +FC1C +FC1C +FFE0 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 26 0 -2 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +1C00 +1C00 +1C00 +E000 +E000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 -2 +BITMAP +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 -2 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +1C00 +1C00 +1C00 +E000 +E000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-20x40.bdf b/buildroot/share/fonts/marlin-20x40.bdf new file mode 100644 index 000000000000..e44e0b7f7023 --- /dev/null +++ b/buildroot/share/fonts/marlin-20x40.bdf @@ -0,0 +1,6458 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 40 100 100 +FONTBOUNDINGBOX 22 39 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. orig" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 38 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +FE0380 +FE0380 +FE0380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F03F80 +F03F80 +F03F80 +0FFF80 +0FFF80 +0FFF80 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +FE0000 +FE0000 +FE0000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 16 0 8 +BITMAP +01C000 +01E000 +01F000 +01F800 +01FC00 +01FE00 +FFFF00 +FFFF80 +FFFF80 +FFFF00 +01FE00 +01FC00 +01F800 +01F000 +01E000 +01C000 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 28 0 4 +BITMAP +008000 +01C000 +03E000 +07F000 +0FF800 +1FFC00 +3FFE00 +7FFF00 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFC000 +FFC000 +FFC000 +FFC000 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 1 +BITMAP +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1FF80 +F1FF80 +F1FF80 +F1FF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1584 0 +DWIDTH 22 0 +BBX 19 16 1 8 +BITMAP +F8F800 +FCFC00 +FEFE00 +7F7F00 +3FBF80 +1FDFC0 +0FEFE0 +07EFE0 +07EFE0 +07EFE0 +0FDFC0 +1FBF80 +3F7F00 +FEFE00 +FCFC00 +F8F800 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 1 +BITMAP +FFFF80 +FFFF80 +FFFF80 +F1C380 +F1C380 +F1C380 +F1C380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F1C380 +F1C380 +F1C380 +F1C380 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 33 0 -2 +BITMAP +01C000 +03E000 +07F000 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +1E3C00 +3E3E00 +7C1F00 +F80F80 +F00780 +F00780 +F08780 +F1C780 +F1C780 +F1C780 +F1C780 +F1C780 +F08780 +F00780 +F00780 +F80F80 +7FFF80 +3FFF00 +1FFE00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 9 1 15 +BITMAP +1C00 +3E00 +7F00 +E380 +E380 +E380 +7F00 +3E00 +1C00 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 24 7 4 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +00 +00 +00 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 10 4 21 +BITMAP +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 20 0 4 +BITMAP +0E3800 +0E3800 +0E3800 +FFFF80 +FFFF80 +FFFF80 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +FFFF80 +FFFF80 +FFFF80 +0E3800 +0E3800 +0E3800 +0E3800 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 16 30 1 1 +BITMAP +0380 +0380 +0380 +0380 +1FFC +3FFE +7FFF +E38F +E387 +E387 +E380 +E380 +E380 +F380 +7FFC +3FFE +1FFF +038F +0387 +0387 +E387 +E387 +E387 +F38F +7FFE +3FFC +1FF8 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FE0380 +FE0380 +FE0380 +FE0380 +FE0780 +FE0F80 +FE1F80 +003F00 +007E00 +00FC00 +01F800 +01F000 +03E000 +07C000 +0F8000 +1F0000 +3E0000 +FC3F80 +F83F80 +F03F80 +F03F80 +F03F80 +F03F80 +F03F80 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 16 24 1 4 +BITMAP +1C00 +1C00 +3E00 +7F00 +F780 +E380 +E380 +E380 +E380 +F780 +7F00 +3E00 +3C00 +7E00 +F787 +E38F +E3DF +E1FC +E0FC +F1FE +7FFF +3FCF +1F87 +1F87 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 10 7 21 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 30 4 1 +BITMAP +0380 +0780 +0F00 +1E00 +1C00 +3800 +3800 +3800 +7000 +7000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +7000 +7000 +3800 +3800 +3C00 +1C00 +1E00 +0F00 +0780 +0380 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 30 7 1 +BITMAP +E000 +F000 +7800 +3C00 +1C00 +0E00 +0E00 +0E00 +0700 +0700 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0700 +0700 +0E00 +0E00 +1E00 +1C00 +3C00 +7800 +F000 +E000 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +01E000 +01E000 +01E000 +E1E1C0 +F1E3C0 +F9E7C0 +7DEF80 +3FFF00 +1FFE00 +0FFC00 +01E000 +01E000 +01E000 +01E000 +0FFC00 +1FFE00 +3FFF00 +7DEF80 +F9E7C0 +F1E3C0 +C1E1C0 +01E000 +01E000 +01E000 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 7 +BITMAP +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 10 4 1 +BITMAP +F8 +FC +FC +1C +1C +1C +3C +F8 +F0 +E0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 4 0 14 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 7 4 4 +BITMAP +FC +FC +FC +FC +FC +FC +FC +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +000180 +000380 +000780 +000F80 +000F00 +001E00 +003C00 +003C00 +007800 +00F800 +00F000 +01E000 +03C000 +07C000 +078000 +0F0000 +0F0000 +1E0000 +3C0000 +780000 +F00000 +F00000 +E00000 +C00000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F00FC0 +F01FC0 +F03FC0 +F07FC0 +F0FFC0 +F1FBC0 +F3F3C0 +F7E3C0 +FFC3C0 +FF83C0 +FF03C0 +FE03C0 +FC03C0 +F803C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +1E00 +1E00 +3E00 +7E00 +FE00 +FE00 +FE00 +FE00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +0003C0 +0007C0 +000FC0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +FFFFC0 +FFFFC0 +FFFFC0 +FFFFC0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000380 +000780 +000F00 +001E00 +003C00 +007800 +00F000 +01FC00 +01FE00 +00FF00 +000F80 +000780 +000380 +E00380 +F00380 +F80780 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +003C00 +007C00 +00FC00 +01FC00 +03FC00 +07FC00 +0FBC00 +1F3C00 +3E3C00 +7C3C00 +F83C00 +F03C00 +F03C00 +F03C00 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +FFFC00 +FFFE00 +FFFF00 +FFFF80 +0007C0 +0003C0 +0003C0 +0003C0 +0003C0 +0003C0 +E003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +00FC00 +01FC00 +03FC00 +07FC00 +0FC000 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +FFFC00 +FFFE00 +FFFF00 +FFFF80 +F007C0 +F003C0 +F003C0 +F003C0 +F003C0 +F80780 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000780 +000780 +000780 +000F80 +001F00 +003E00 +007C00 +00F800 +01F000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F007C0 +7FFF80 +3FFF00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F803C0 +7FFFC0 +3FFFC0 +1FFFC0 +0FFFC0 +0003C0 +0007C0 +000F80 +001F00 +003E00 +007C00 +0FF800 +0FF000 +0FE000 +0FC000 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 17 4 4 +BITMAP +FC +FC +FC +FC +FC +FC +FC +00 +00 +00 +FC +FC +FC +FC +FC +FC +FC +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 20 4 1 +BITMAP +FC +FC +FC +FC +FC +FC +FC +00 +00 +00 +F8 +FC +FC +1C +1C +1C +3C +F8 +F0 +E0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 16 4 8 +BITMAP +0380 +0780 +0F80 +1F00 +3E00 +7C00 +F800 +F000 +F000 +F800 +7C00 +3E00 +1F00 +0F80 +0780 +0380 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 10 0 11 +BITMAP +FFFF80 +FFFF80 +FFFF80 +000000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 16 4 8 +BITMAP +E000 +F000 +F800 +7C00 +3E00 +1F00 +0F80 +0780 +0780 +0F80 +1F00 +7E00 +7C00 +F800 +F000 +E000 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F80F80 +F00780 +E00780 +000F80 +001F00 +003E00 +007C00 +00F800 +01F000 +01E000 +01E000 +01E000 +01E000 +000000 +000000 +000000 +01E000 +01E000 +01E000 +01E000 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F0FFC0 +F1FFC0 +F1FFC0 +F1E3C0 +F1C3C0 +F1C3C0 +F1E7C0 +F1FFC0 +F1FFC0 +F0FF80 +F00000 +F00000 +F80000 +7FFC00 +3FFC00 +1FFC00 +0FFC00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +FFFFC0 +FFFFC0 +FFFFC0 +FFFFC0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +1E07C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E07C0 +1FFF80 +1FFF00 +1FFF00 +1FFF80 +1E07C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E07C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F003C0 +F003C0 +F807C0 +FFFF80 +7FFF00 +3FFE00 +1FFC00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +1E07C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E07C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F03FC0 +F03FC0 +F03FC0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 11 24 3 4 +BITMAP +FFE0 +FFE0 +FFE0 +FFE0 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +FFE0 +FFE0 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01FF80 +01FF80 +01FF80 +01FF80 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +F03C00 +F03C00 +F87C00 +7FF800 +3FF000 +1FE000 +0FC000 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00380 +F00780 +F00F80 +F01F00 +F03E00 +F07C00 +F0F800 +F1F000 +F3E000 +F7C000 +FF8000 +FF0000 +FF0000 +FF8000 +F7C000 +F3E000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F00780 +F00380 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +F007C0 +F007C0 +F80FC0 +FC1FC0 +FE3FC0 +FF7FC0 +FFFFC0 +F7F3C0 +F3E3C0 +F1C3C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F803C0 +FC03C0 +FE03C0 +FF03C0 +FF83C0 +F7C3C0 +F3E3C0 +F1F3C0 +F0FBC0 +F07FC0 +F03FC0 +F01FC0 +F00FC0 +F007C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F007C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F1C3C0 +F1E3C0 +F1F3C0 +F0F9C0 +F07DC0 +F83EC0 +7FDF40 +3FEF80 +1FF7C0 +0FF3C0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +F007C0 +F003C0 +F003C0 +F003C0 +F003C0 +F007C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +F7C000 +F3E000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F00780 +F00380 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F003C0 +F003C0 +F001C0 +F00000 +F00000 +F80000 +7FFC00 +3FFE00 +1FFF00 +0FFF80 +0007C0 +0003C0 +0003C0 +E003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +780F00 +3C1E00 +3C1E00 +1E3C00 +0E3800 +0F7800 +07F000 +03E000 +03E000 +01C000 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F1C780 +F1C780 +F1C780 +F1C780 +F1C780 +FBEF80 +7FFF00 +3FFE00 +1F7C00 +0E3800 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +03E000 +07F000 +0FF800 +1F7C00 +3E3E00 +7C1F00 +F80F80 +F00780 +F00780 +F00780 +F00780 +F00780 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000780 +000F80 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 1 +BITMAP +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +E00000 +F00000 +F80000 +F80000 +7C0000 +3E0000 +3E0000 +1F0000 +0F0000 +0F8000 +07C000 +03C000 +01E000 +01F000 +00F800 +007800 +003C00 +003E00 +001F00 +001F00 +000F80 +000F80 +000780 +000380 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 1 +BITMAP +FFC0 +FFC0 +FFC0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 10 0 21 +BITMAP +01C000 +03E000 +07F000 +0FF800 +1FFC00 +3F7E00 +7E3F00 +FC1F80 +F80F80 +F00780 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 3 0 -2 +BITMAP +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 10 4 21 +BITMAP +E000 +F000 +F800 +7C00 +3E00 +1F00 +0F80 +07C0 +03C0 +01C0 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 16 17 1 4 +BITMAP +1FF8 +1FFC +1FFE +000F +0007 +0007 +0FFF +1FFF +3FFF +7FFF +F007 +E007 +F007 +FFFF +7FFF +3FFF +1FFF +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFE00 +FFFF00 +F00780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00780 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +1FFC00 +3FFC00 +7FFC00 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00380 +F00380 +F80780 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +000380 +000380 +000380 +000380 +000380 +000380 +000380 +1FFF80 +3FFF80 +7FFF80 +F80380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F80380 +7FFF80 +3FFF80 +1FFF80 +0FFF80 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +1FFC00 +3FFE00 +7FFF00 +F80780 +F00380 +F00380 +F00780 +FFFF00 +FFFE00 +FFFC00 +F00000 +F00000 +F80000 +7FFC00 +3FFC00 +1FFC00 +0FFC00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +01FC00 +03FE00 +07FF00 +0FFF80 +0F07C0 +0F03C0 +0F03C0 +0F0000 +0F0000 +0F0000 +FFF000 +FFF000 +FFF000 +FFF000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +1FFE00 +3FFF00 +7FFF80 +F80780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F80380 +7FFF80 +3FFF80 +1FFF80 +0FFF80 +000380 +000380 +000780 +0FFF80 +0FFF00 +0FFE00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFE00 +FFFF00 +FFFF80 +F00780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +1E00 +1E00 +1E00 +1E00 +0000 +0000 +0000 +FE00 +FE00 +FE00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 30 4 -2 +BITMAP +0038 +0038 +0038 +0038 +0000 +0000 +0000 +03F8 +03F8 +03F8 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +E038 +E038 +F078 +FFF8 +7FF0 +3FE0 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00780 +F00F80 +F01F80 +F03F00 +F07E00 +F0FC00 +F1F800 +FFF000 +FFE000 +FFE000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F00780 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +FC00 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +FE3C00 +FF7E00 +FFFF00 +F3E780 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1FC00 +F3FE00 +F7FF00 +FF8780 +FF0380 +FE0380 +FC0380 +F80380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 18 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +FFFE00 +FFFF00 +FFFF80 +F00780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00780 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +1FFF80 +3FFF80 +7FFF80 +F80380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F80380 +7FFF80 +3FFF80 +1FFF80 +0FFF80 +000380 +000380 +000380 +000380 +000380 +000380 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1FC00 +F3FE00 +F7FF00 +FFC780 +FF8380 +FF0380 +FE0380 +FC0000 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +1FFF80 +3FFF80 +7FFF80 +F80000 +F00000 +F00000 +F80000 +7FFE00 +3FFF00 +1FFF80 +000780 +000380 +000780 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01E000 +01FF80 +00FF80 +007F80 +003F80 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00780 +F00F80 +F01F80 +F03F80 +F87F80 +7FFB80 +3FF380 +1FE380 +0FC380 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +01C000 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F1C780 +F1C780 +F1C780 +F1C780 +F1C780 +FBEF80 +7FFF00 +3F7E00 +1F7C00 +0E3800 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +E00380 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +07F000 +0FF800 +1F7C00 +3E3E00 +7C1F00 +F80F80 +F00780 +E00380 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +07C000 +0F8000 +1F0000 +3E0000 +FC0000 +F80000 +F00000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +001F00 +003E00 +007C00 +00F800 +01F000 +03E000 +07C000 +0F8000 +1F0000 +3E0000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 1 +BITMAP +03C0 +07C0 +0FC0 +1E00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +3C00 +7800 +E000 +E000 +E000 +E000 +7800 +3C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1E00 +0FC0 +07C0 +03C0 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 30 7 1 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 30 4 1 +BITMAP +E000 +F000 +F800 +3C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1E00 +0F00 +0380 +0380 +0380 +0380 +0F00 +1E00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +3C00 +F800 +F000 +E000 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 10 0 11 +BITMAP +0E03C0 +1F03C0 +3F83C0 +7BC3C0 +F1C3C0 +F1C3C0 +F1E7C0 +F0FF80 +F07F00 +F03E00 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 24 7 4 +BITMAP +E0 +E0 +E0 +E0 +00 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 1 +BITMAP +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +F1C380 +F1C380 +F1C380 +F1C380 +F1C000 +F1C000 +F1C000 +F1C380 +F1C380 +F1C380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01FC00 +01FC00 +01FC00 +01FC00 +0E0380 +0E0380 +0E0380 +0E0000 +0E0000 +0E0000 +FFC000 +FFC000 +FFC000 +FFC000 +0E0000 +0E0000 +0E0000 +0E0380 +0E0380 +0E0380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1C380 +F1C380 +F1C380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +F1C380 +F1C380 +F1C380 +F1C380 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 24 7 4 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +00 +00 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 27 4 4 +BITMAP +1FF8 +1FF8 +1FF8 +E000 +E000 +E000 +E000 +1FC0 +1FC0 +1FC0 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +1FC0 +1FC0 +1FC0 +0038 +0038 +0038 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 3 4 28 +BITMAP +E3C0 +E3C0 +E3C0 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 20 24 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +0FFF80 +F00070 +F00070 +F00070 +F1FC70 +F1FC70 +F1FC70 +F1C070 +F1C070 +F1C070 +F1C070 +F1FC70 +F1FC70 +F1FC70 +F00070 +F00070 +F00070 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +1FC0 +1FC0 +1FC0 +E3C0 +E3C0 +E3C0 +1FC0 +1FC0 +1FC0 +1FC0 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +01C380 +01C380 +01C380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +F1C000 +F1C000 +F1C000 +0E3C00 +0E3C00 +0E3C00 +01C380 +01C380 +01C380 +01C380 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 10 0 8 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000380 +000380 +000380 +000380 +000380 +000380 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 4 4 14 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 20 24 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +0FFF80 +F00070 +F00070 +F00070 +F1FC70 +F1FC70 +F1FC70 +F1C070 +F1C070 +F1C070 +F1C070 +F1C070 +F1C070 +F1C070 +F00070 +F00070 +F00070 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 3 0 28 +BITMAP +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 13 4 21 +BITMAP +1FC0 +1FC0 +1FC0 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +03C0 +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +FC00 +FC00 +FC00 +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +1C00 +03C0 +03C0 +03C0 +FC00 +FC00 +FC00 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 10 4 21 +BITMAP +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +1C00 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F03F80 +F03F80 +F03F80 +FFC380 +FFC380 +FFC380 +FFC380 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +0FC380 +0FC380 +0FC380 +0FC380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 7 7 7 14 +BITMAP +FE +FE +FE +FE +FE +FE +FE +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 6 4 -2 +BITMAP +03C0 +03C0 +03C0 +FC00 +FC00 +FC00 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +1C00 +1C00 +1C00 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 17 4 21 +BITMAP +1C00 +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +1C00 +1C00 +1C00 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1C000 +F1C000 +F1C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +01C380 +01C380 +01C380 +0E3C00 +0E3C00 +0E3C00 +F1C000 +F1C000 +F1C000 +F1C000 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +FE0000 +FE0000 +FE0000 +0E0380 +0E0380 +0E0380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +0FC000 +0FC000 +0FC000 +0E3C00 +0E3C00 +0E3C00 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +0E3C00 +0E3C00 +0E3C00 +0FFF80 +0FFF80 +0FFF80 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +FE0000 +FE0000 +FE0000 +0E0380 +0E0380 +0E0380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +0FC000 +0FC000 +0FC000 +0E3C00 +0E3C00 +0E3C00 +F1C380 +F1C380 +F1C380 +F1C380 +000380 +000380 +000380 +003C00 +003C00 +003C00 +01FF80 +01FF80 +01FF80 +01FF80 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +FE0000 +FE0000 +FE0000 +FE0000 +01C000 +01C000 +01C000 +0E0380 +0E0380 +0E0380 +01FC00 +01FC00 +01FC00 +01FC00 +FFC000 +FFC000 +FFC000 +0E3C00 +0E3C00 +0E3C00 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +0E3C00 +0E3C00 +0E3C00 +0FFF80 +0FFF80 +0FFF80 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +0E0000 +0E0000 +0E0000 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +0FFF80 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +F1FF80 +F1FF80 +F1FF80 +F1FF80 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 -2 +BITMAP +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +003C00 +003C00 +003C00 +0FC000 +0FC000 +0FC000 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 34 4 4 +BITMAP +E000 +E000 +E000 +E000 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 34 4 4 +BITMAP +03C0 +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 34 4 4 +BITMAP +1C00 +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 4 +BITMAP +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFC00 +0FFC00 +0FFC00 +0FFC00 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +FFC380 +FFC380 +FFC380 +FFC380 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FE0380 +FE0380 +FE0380 +F1C380 +F1C380 +F1C380 +F1C380 +F03F80 +F03F80 +F03F80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 16 0 8 +BITMAP +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 1 +BITMAP +000380 +000380 +000380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F03F80 +F03F80 +F03F80 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +FE0380 +FE0380 +FE0380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 24 4 4 +BITMAP +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F03C00 +F03C00 +F03C00 +F1C000 +F1C000 +F1C000 +F1C000 +F03C00 +F03C00 +F03C00 +F00380 +F00380 +F00380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +0FFC00 +0FFC00 +0FFC00 +01C380 +01C380 +01C380 +01C380 +0FFC00 +0FFC00 +0FFC00 +F1C000 +F1C000 +F1C000 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00000 +F00000 +F00000 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +003C00 +003C00 +003C00 +0FC000 +0FC000 +0FC000 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 27 4 4 +BITMAP +E000 +E000 +E000 +1C00 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 27 4 4 +BITMAP +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 27 4 4 +BITMAP +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +E3C0 +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +F1FC00 +F1FC00 +F1FC00 +FE0380 +FE0380 +FE0380 +FE0380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 16 0 8 +BITMAP +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000000 +000000 +000000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +F03F80 +F03F80 +F03F80 +F03F80 +F1C380 +F1C380 +F1C380 +FE0380 +FE0380 +FE0380 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 33 0 -2 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +0E0000 +0E0000 +0E0000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 -2 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 -2 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +0E0000 +0E0000 +0E0000 +F00000 +F00000 +F00000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-24x48.bdf b/buildroot/share/fonts/marlin-24x48.bdf new file mode 100644 index 000000000000..dba6e07e7f18 --- /dev/null +++ b/buildroot/share/fonts/marlin-24x48.bdf @@ -0,0 +1,6462 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 40 100 100 +FONTBOUNDINGBOX 26 39 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 38 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +FF00F0 +FF00F0 +FF00F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F00FF0 +F00FF0 +F00FF0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +FF0000 +FF0000 +FF0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 18 0 7 +BITMAP +00E000 +00F000 +00F800 +00FC00 +00FE00 +00FF00 +00FF80 +FFFFC0 +FFFFE0 +FFFFE0 +FFFFC0 +00FF80 +00FF00 +00FE00 +00FC00 +00F800 +00F000 +00E000 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 29 0 4 +BITMAP +004000 +00E000 +01F000 +03F800 +07FC00 +0FFE00 +1FFF00 +3FFF80 +7FFFC0 +FFFFE0 +FFFFE0 +FFFFE0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFF000 +FFF000 +FFF000 +FFF000 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +00F000 +00F000 +00F000 +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +FCF3F0 +F8F1F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0FFF0 +F0FFF0 +F0FFF0 +F0FFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +FC03F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1872 0 +DWIDTH 26 0 +BBX 24 16 0 8 +BITMAP +FE3F80 +7F1FC0 +3F8FE0 +1FC7F0 +0FE3F8 +07F1FC +03F8FE +01FC7F +01FC7F +03F8FE +07F1FC +0FE3F8 +1FC7F0 +3F8FE0 +7F1FC0 +FE3F80 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 33 0 -2 +BITMAP +01F800 +03FC00 +07FE00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +1F0F80 +3F0FC0 +7F0FE0 +F801F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 10 9 1 15 +BITMAP +1E00 +3F00 +7F80 +F3C0 +E1C0 +F3C0 +7F80 +3F00 +1E00 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 24 8 4 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 10 4 21 +BITMAP +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 20 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +FFFFF0 +FFFFF0 +FFFFF0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +FFFFF0 +FFFFF0 +FFFFF0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +00F000 +00F000 +00F000 +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F8F1F0 +F0F0F0 +F0F0F0 +F0F000 +F0F000 +F8F000 +7FFF00 +3FFF80 +1FFFC0 +0FFFE0 +00F1F0 +00F0F0 +00F0F0 +F0F0F0 +F0F0F0 +F8F1F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FF00F0 +FF00F0 +FF00F0 +FF01F0 +FF03F0 +FF07E0 +FF0FC0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +7E0FF0 +FC0FF0 +F80FF0 +F00FF0 +F00FF0 +F00FF0 +F00FF0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0000 +1F8000 +3FC000 +7FE000 +F9F000 +F0F000 +F0F000 +F0F000 +F0F000 +F9F000 +7FE000 +3FC000 +3FC000 +7FE000 +F9F0F0 +F0F9F0 +F07FF0 +F03F80 +F01F00 +F83F80 +7FFFF0 +3FFFF0 +1FF9F0 +0FF0F0 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 10 8 21 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +01F0 +03F0 +07F0 +0F80 +1F00 +1E00 +3E00 +3C00 +7C00 +7800 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +7800 +7C00 +3C00 +3E00 +1E00 +1F00 +0F80 +07F0 +03F0 +01F0 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +F800 +FC00 +FE00 +1F00 +0F80 +0780 +03C0 +03C0 +01E0 +01E0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +01E0 +01E0 +03C0 +03C0 +0780 +0F80 +1F00 +FE00 +FC00 +F000 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +F0F0F0 +F8F1F0 +7CF3E0 +3EF7C0 +1FFF80 +0FFF00 +07FE00 +03FC00 +03FC00 +07FE00 +0FFF00 +1FFF80 +3EF7C0 +7CF3E0 +F8F1F0 +F0F0F0 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 16 0 8 +BITMAP +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 10 4 1 +BITMAP +FF +FF +FF +0F +0F +0F +1E +FC +F8 +F0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 4 0 14 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 7 4 4 +BITMAP +FF +FF +FF +FF +FF +FF +FF +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +000070 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +001F80 +003F00 +007E00 +00FC00 +01FC00 +03F800 +03F000 +07E000 +07C000 +0F8000 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +F00000 +E00000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F003F0 +F007F0 +F00FF0 +F01FF0 +F03EF0 +F07CF0 +F0F8F0 +F1F0F0 +F3E0F0 +F7C0F0 +FF80F0 +FF00F0 +FE00F0 +FC00F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +0F00 +1F00 +3F00 +7F00 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +0001F0 +0003E0 +0007C0 +000F80 +001F00 +003E00 +007C00 +00F800 +01F000 +03E000 +07C000 +0F8000 +1F0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +007F80 +007FC0 +003FE0 +0001F0 +0000F0 +0000F0 +E000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 25 0 4 +BITMAP +001F00 +003F00 +007F00 +00FF00 +01FF00 +03EF00 +07CF00 +0F8F00 +1F0F00 +3E0F00 +7C0F00 +F80F00 +F00F00 +F00F00 +F00F00 +FFFFF0 +FFFFF0 +FFFFF0 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +FFFF80 +FFFFC0 +FFFFE0 +0001F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +E000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +01FF00 +03FF00 +07FF00 +0FFF00 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +F00000 +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0000F0 +0000F0 +0001F0 +0003E0 +0007C0 +000F80 +001F00 +003E00 +007C00 +00F800 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +0FFF00 +0FFE00 +0FFC00 +0FF800 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 17 4 4 +BITMAP +FF +FF +FF +FF +FF +FF +FF +00 +00 +00 +FF +FF +FF +FF +FF +FF +FF +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 20 4 1 +BITMAP +FF +FF +FF +FF +FF +FF +FF +00 +00 +00 +FF +FF +FF +0F +0F +0F +1E +FC +F8 +F0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 13 16 3 8 +BITMAP +0078 +00F8 +03F8 +07E0 +1F80 +3F00 +7C00 +F800 +F800 +7C00 +3F00 +1F80 +07E0 +03F8 +00F8 +0078 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 10 0 11 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +000000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 13 16 4 8 +BITMAP +F000 +F800 +FE00 +3F00 +0FC0 +07E0 +01F0 +00F8 +00F8 +01F0 +07E0 +0FC0 +3F00 +FE00 +F800 +F000 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +0001F0 +0003E0 +0007C0 +000F80 +001F00 +003E00 +007C00 +00F800 +00F000 +00F000 +000000 +000000 +000000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F07FF0 +F0FFF0 +F0FFF0 +F0F9F0 +F0F0F0 +F0F0F0 +F0F9F0 +F0FFF0 +F0FFF0 +F07FE0 +F00000 +F00000 +F80000 +7FFF00 +3FFF00 +1FFF00 +0FFF00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +0F01F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F01F0 +0FFFE0 +0FFFC0 +0FFFC0 +0FFFE0 +0F01F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F01F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +0F01F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F01F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00FF0 +F00FF0 +F00FF0 +F00FF0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00FFF0 +00FFF0 +00FFF0 +00FFF0 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +F00F00 +F00F00 +F81F00 +7FFE00 +3FFC00 +1FF800 +0FF000 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 24 0 4 +BITMAP +F001E0 +F003E0 +F007C0 +F00F80 +F01F00 +F03E00 +F07C00 +F0F800 +F1F000 +F3E000 +FFC000 +FF8000 +FF8000 +FFC000 +F3E000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F007C0 +F003E0 +F001E0 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F801F0 +FC03F0 +FE07F0 +FF0FF0 +FF9FF0 +F7FEF0 +F3FCF0 +F1F8F0 +F0F0F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +FC00F0 +FE00F0 +FF00F0 +FF80F0 +F7C0F0 +F3E0F0 +F1F0F0 +F0F8F0 +F07CF0 +F03EF0 +F01FF0 +F00FF0 +F007F0 +F003F0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F8F0 +F0FCF0 +F07EF0 +F03F70 +F01FB0 +F80FC0 +7FF7E0 +3FFBF0 +1FFDF0 +0FFCF0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F007C0 +F003E0 +F001F0 +F000F0 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +7FFF00 +3FFF80 +1FFFC0 +0FFFE0 +0001F0 +0000F0 +0000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +01F800 +00F000 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F9F9F0 +7FFFE0 +3FFFC0 +1F9F80 +0F0F00 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +03FC00 +07FE00 +0F9F00 +1F0F80 +3E07C0 +7C03E0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0FFF00 +07FE00 +03FC00 +01F800 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +7E0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +FFF0 +FFF0 +FFF0 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +E00000 +F00000 +F80000 +FC0000 +7E0000 +3F0000 +1F8000 +0F8000 +0FC000 +07E000 +03F000 +01F800 +00F800 +007C00 +003E00 +001F00 +001F80 +000FC0 +0007C0 +0007E0 +0003F0 +0001F0 +0000F0 +000070 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +FFF0 +FFF0 +FFF0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 11 0 21 +BITMAP +00F000 +01F800 +03FC00 +07FE00 +0F9F00 +1F0F80 +3E07C0 +7C03E0 +F801F0 +F000F0 +E00070 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 3 0 -2 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 11 4 20 +BITMAP +F000 +F800 +FC00 +7E00 +3F00 +1F80 +0FC0 +07E0 +03F0 +01F0 +00F0 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +0FFF80 +0FFFC0 +0FFFE0 +0001F0 +0000F0 +0000F0 +0FFFF0 +1FFFF0 +3FFFF0 +7FFFF0 +F800F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +1FFF00 +3FFF00 +7FFF00 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +1FFFF0 +3FFFF0 +7FFFF0 +F800F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +F00000 +F00000 +F80000 +7FFF00 +3FFF00 +1FFF00 +0FFF00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00FF00 +01FF80 +03FFC0 +07FFE0 +0F81F0 +0F00F0 +0F0070 +0F0000 +0F0000 +0F0000 +FFF000 +FFF000 +FFF000 +FFF000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +0000F0 +0000F0 +0001F0 +0FFFE0 +0FFFC0 +0FFF80 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +0F00 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 30 4 -2 +BITMAP +000F +000F +000F +000F +0000 +0000 +0000 +00FF +00FF +00FF +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +E00F +F00F +F81F +7FFE +3FFC +1FF8 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F001F0 +F003E0 +F007C0 +F00F80 +F01F00 +F03E00 +FFFC00 +FFF800 +FFFC00 +F03E00 +F01F00 +F00F80 +F007C0 +F003E0 +F001F0 +F000F0 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +FF00 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +FF0F80 +FF9FC0 +FFFFE0 +F1F9F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F1FF80 +F3FFC0 +F7FFE0 +FF81F0 +FF00F0 +FE00F0 +FC00F0 +F800F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 18 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +1FFFF0 +3FFFF0 +7FFFF0 +F800F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F1FF80 +F3FFC0 +F7FFE0 +FF81F0 +FF00F0 +FE0070 +FC0030 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +1FFFF0 +3FFFF0 +7FFFF0 +F80000 +F00000 +F00000 +F80000 +7FFF80 +3FFFC0 +1FFFE0 +0001F0 +0000F0 +0001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F800 +007FF0 +003FF0 +001FF0 +000FF0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +F003F0 +F007F0 +F00FF0 +F81FF0 +7FFEF0 +3FFCF0 +1FF8F0 +0FF0F0 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +01F800 +00F000 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F9F9F0 +7FFFE0 +3FFFC0 +1F9F80 +0F0F00 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 16 0 4 +BITMAP +F803E0 +7C07C0 +3E0F80 +1F1F00 +0FBE00 +07FC00 +03F800 +01F000 +01F000 +03F800 +07BC00 +0F1E00 +1E0F00 +3C0780 +7803C0 +F001E0 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +00F800 +01F000 +03E000 +07C000 +0F8000 +FF0000 +FE0000 +FC0000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +00F0 +01F0 +03E0 +0780 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +1F00 +3F00 +7E00 +F800 +F000 +F000 +F800 +7E00 +3F00 +1F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0780 +03E0 +01F0 +00F0 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 30 8 1 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +F000 +F800 +7C00 +3E00 +1F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F80 +0FC0 +07E0 +01F0 +00F0 +00F0 +01F0 +07E0 +0FC0 +0F80 +0F00 +0F00 +0F00 +0F00 +0F00 +1F00 +3E00 +7C00 +F800 +F000 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 10 0 11 +BITMAP +1F00F0 +3F80F0 +7FC0F0 +F3E0F0 +F1F0F0 +F0F8F0 +F07DF0 +F03FE0 +F01FC0 +F00F80 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 24 8 4 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 1 +BITMAP +00F000 +00F000 +00F000 +0FFF00 +0FFF00 +0FFF00 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F000 +F0F000 +F0F000 +F0F0F0 +F0F0F0 +F0F0F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00FF00 +00FF00 +00FF00 +00FF00 +0F00F0 +0F00F0 +0F00F0 +0F0000 +0F0000 +0F0000 +FFF000 +FFF000 +FFF000 +FFF000 +0F0000 +0F0000 +0F0000 +0F00F0 +0F00F0 +0F00F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F0F0F0 +F0F0F0 +F0F0F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 24 8 4 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 27 4 4 +BITMAP +0FFF +0FFF +0FFF +F000 +F000 +F000 +F000 +0FF0 +0FF0 +0FF0 +F00F +F00F +F00F +F00F +F00F +F00F +F00F +0FF0 +0FF0 +0FF0 +000F +000F +000F +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 3 4 28 +BITMAP +F0F0 +F0F0 +F0F0 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 24 24 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +F0000F +F0000F +F0000F +F0FF0F +F0FF0F +F0FF0F +F0F00F +F0F00F +F0F00F +F0F00F +F0FF0F +F0FF0F +F0FF0F +F0000F +F0000F +F0000F +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +0FF0 +0FF0 +0FF0 +F0F0 +F0F0 +F0F0 +0FF0 +0FF0 +0FF0 +0FF0 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +00F0F0 +00F0F0 +00F0F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +F0F000 +F0F000 +F0F000 +0F0F00 +0F0F00 +0F0F00 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 10 0 8 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 4 4 14 +BITMAP +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 24 24 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +F0000F +F0000F +F0000F +F0FF0F +F0FF0F +F0FF0F +F0F00F +F0F00F +F0F00F +F0F00F +F0F00F +F0F00F +F0F00F +F0000F +F0000F +F0000F +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 3 0 28 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 13 4 21 +BITMAP +0FF0 +0FF0 +0FF0 +F00F +F00F +F00F +F00F +F00F +F00F +F00F +0FF0 +0FF0 +0FF0 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +00F0 +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +FF00 +FF00 +FF00 +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0F00 +00F0 +00F0 +00F0 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 10 4 21 +BITMAP +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0F00 +F000 +F000 +F000 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F00FF0 +F00FF0 +F00FF0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 7 8 14 +BITMAP +FF +FF +FF +FF +FF +FF +FF +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 6 4 -2 +BITMAP +00F0 +00F0 +00F0 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +0F00 +0F00 +0F00 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 17 4 21 +BITMAP +0F00 +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +0F00 +0F00 +0F00 +0000 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F0F000 +F0F000 +F0F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +00F0F0 +00F0F0 +00F0F0 +0F0F00 +0F0F00 +0F0F00 +F0F000 +F0F000 +F0F000 +F0F000 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +FF0000 +FF0000 +FF0000 +0F00F0 +0F00F0 +0F00F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0FF000 +0FF000 +0FF000 +0F0F00 +0F0F00 +0F0F00 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +0F0F00 +0F0F00 +0F0F00 +0FFFF0 +0FFFF0 +0FFFF0 +000F00 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +FF0000 +FF0000 +FF0000 +0F00F0 +0F00F0 +0F00F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0FF000 +0FF000 +0FF000 +0F0F00 +0F0F00 +0F0F00 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +0000F0 +0000F0 +0000F0 +000F00 +000F00 +000F00 +00FFF0 +00FFF0 +00FFF0 +00FFF0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +FF0000 +FF0000 +FF0000 +FF0000 +00F000 +00F000 +00F000 +0F00F0 +0F00F0 +0F00F0 +00FF00 +00FF00 +00FF00 +00FF00 +FFF000 +FFF000 +FFF000 +0F0F00 +0F0F00 +0F0F00 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +0F0F00 +0F0F00 +0F0F00 +0FFFF0 +0FFFF0 +0FFFF0 +000F00 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +0F0000 +0F0000 +0F0000 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +F0FFF0 +F0FFF0 +F0FFF0 +F0FFF0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 -2 +BITMAP +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +000F00 +000F00 +000F00 +0FF000 +0FF000 +0FF000 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 34 4 4 +BITMAP +F000 +F000 +F000 +F000 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 34 4 4 +BITMAP +00F0 +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 34 4 4 +BITMAP +0F00 +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 4 +BITMAP +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +0FFF00 +0FFF00 +0FFF00 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FF00F0 +FF00F0 +FF00F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F00FF0 +F00FF0 +F00FF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 16 0 8 +BITMAP +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +0000F0 +0000F0 +0000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F00FF0 +F00FF0 +F00FF0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +FF00F0 +FF00F0 +FF00F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 24 4 4 +BITMAP +F000 +F000 +F000 +F000 +FFF0 +FFF0 +FFF0 +F00F +F00F +F00F +F00F +F00F +F00F +F00F +F00F +F00F +F00F +FFF0 +FFF0 +FFF0 +F000 +F000 +F000 +F000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F00F00 +F00F00 +F00F00 +F0F000 +F0F000 +F0F000 +F0F000 +F00F00 +F00F00 +F00F00 +F000F0 +F000F0 +F000F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +0FFF00 +0FFF00 +0FFF00 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +0FFF00 +0FFF00 +0FFF00 +F0F000 +F0F000 +F0F000 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +000F00 +000F00 +000F00 +0FF000 +0FF000 +0FF000 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 27 4 4 +BITMAP +F000 +F000 +F000 +0F00 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 27 4 4 +BITMAP +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 27 4 4 +BITMAP +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +F0F0 +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +F0FF00 +F0FF00 +F0FF00 +FF00F0 +FF00F0 +FF00F0 +FF00F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 16 0 8 +BITMAP +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +000000 +000000 +000000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +F00FF0 +F00FF0 +F00FF0 +F00FF0 +F0F0F0 +F0F0F0 +F0F0F0 +FF00F0 +FF00F0 +FF00F0 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 33 0 -2 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +0F0000 +0F0000 +0F0000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 -2 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 -2 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +0F0000 +0F0000 +0F0000 +F00000 +F00000 +F00000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-28x56.bdf b/buildroot/share/fonts/marlin-28x56.bdf new file mode 100644 index 000000000000..1b6a3f523306 --- /dev/null +++ b/buildroot/share/fonts/marlin-28x56.bdf @@ -0,0 +1,7311 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 48 100 100 +FONTBOUNDINGBOX 30 47 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 46 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +FFC03F +FFC01F +FFC01F +FFC01F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F803FF +F803FF +F803FF +FC03FF +7FFFFF +3FFFFF +1FFFFF +0FFFFF +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +FFC000 +FFC000 +FFC000 +FFC000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 20 0 10 +BITMAP +003C00 +003E00 +003F00 +003F80 +003FC0 +003FE0 +003FF0 +003FF8 +FFFFFC +FFFFFE +FFFFFE +FFFFFC +003FF8 +003FF0 +003FE0 +003FC0 +003F80 +003F00 +003E00 +003C00 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 34 0 6 +BITMAP +001000 +003800 +007C00 +00FE00 +01FF00 +03FF80 +07FFC0 +0FFFE0 +1FFFF0 +3FFFF8 +7FFFFC +FFFFFE +FFFFFE +FFFFFE +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +003C00 +003C00 +003C00 +003C00 +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC3C3F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83FFF +F83FFF +F83FFF +F83FFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 2160 0 +DWIDTH 30 0 +BBX 28 20 0 10 +BITMAP +FE1FE000 +FF1FF000 +FF9FF800 +7FCFFC00 +3FE7FE00 +1FF3FF00 +0FF9FF80 +07FCFFC0 +03FE7FE0 +01FF3FF0 +01FF3FF0 +03FE7FE0 +07FCFFC0 +0FF9FF80 +1FF3FF00 +3FE7FE00 +7FCFFC00 +FF9FF800 +FF1FF000 +FE1FE000 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F83C1F +F83C1F +F83C1F +F83C1F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 -2 +BITMAP +007E00 +00FF00 +01FF80 +03FFC0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +0FC3F0 +1FC3F8 +3FC3FC +7FC3FE +FC003F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 13 12 1 18 +BITMAP +0F80 +1FC0 +3FE0 +7FF0 +F8F8 +F078 +F078 +F8F8 +7FF0 +3FE0 +1FC0 +0F80 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 28 10 6 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 12 5 26 +BITMAP +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 24 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +07C3E0 +07C3E0 +07C3E0 +07C3E0 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +003C00 +003C00 +003C00 +003C00 +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC3C3F +F83C1F +F83C1F +F83C1F +F83C00 +F83C00 +F83C00 +FC3C00 +7FFFF0 +3FFFF8 +1FFFFC +0FFFFE +003C3F +003C1F +003C1F +003C1F +F83C1F +F83C1F +F83C1F +FC3C3F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFC01F +FFC01F +FFC01F +FFC01F +FFC01F +FFC03F +FFC07F +FFC0FF +0003F8 +0007F0 +000FE0 +001FC0 +003F00 +007E00 +00FC00 +01F800 +07F000 +0FE000 +1FC000 +3F8000 +FE03FF +FC03FF +F803FF +F803FF +F803FF +F803FF +F803FF +F803FF +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FC000 +1FE000 +3FF000 +7FF800 +FC7C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +7C7800 +3FF000 +1FE000 +1FF000 +3FF800 +7C7C0F +F83E1F +F81F3F +F80FFE +F807FC +F803F8 +F803F8 +FC07FC +7FFFFE +3FFF3F +1FFE1F +0FFC0F +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 12 10 26 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +007C +00FC +01FC +03FC +07C0 +0780 +0F80 +0F00 +1F00 +3E00 +3E00 +7C00 +FC00 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +7C00 +3C00 +3E00 +1F00 +1F00 +0F80 +0FC0 +07E0 +03FC +01FC +00FC +007C +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +F800 +FC00 +FE00 +FF00 +1F80 +0FC0 +07E0 +07E0 +03F0 +03F0 +01F8 +01F8 +00FC +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +00FC +00F8 +01F8 +01F0 +03F0 +03E0 +07E0 +07C0 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +F83C1F +FC3C3F +7E3C7E +3F3CFC +1FBDF8 +0FFFF0 +07FFE0 +03FFC0 +01FF80 +00FF00 +00FF00 +01FF80 +03FFC0 +07FFE0 +0FFFF0 +1FBDF8 +3F3CFC +7E3C7E +FC3C3F +F83C1F +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 10 +BITMAP +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 12 5 2 +BITMAP +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 4 0 18 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 8 5 6 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +00001F +00003F +00007F +0000FE +0001FC +0003FC +0003F8 +0007F0 +000FE0 +001FE0 +003FC0 +003F80 +007F80 +00FF00 +01FE00 +01FC00 +03FC00 +07F800 +0FF800 +0FF000 +1FE000 +3FC000 +7F8000 +FF0000 +FE0000 +FC0000 +F80000 +F00000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8007F +F800FF +F801FF +F803FF +F807FF +F80FFF +F81FDF +F83F9F +F87F1F +F8FE1F +F9FC1F +FBF81F +FFF01F +FFE01F +FFC01F +FF801F +FF001F +FE001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +0F80 +1F80 +3F80 +7F80 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +00003F +00007F +0000FE +0001FC +0003F8 +0007F0 +000FE0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00001F +00003F +00007F +0000FE +0001FC +0003F8 +0007F0 +003FF0 +003FF8 +003FFC +003FFE +00003F +00001F +00001F +00001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 29 0 6 +BITMAP +0007E0 +000FE0 +001FE0 +003FE0 +007FE0 +00FFE0 +01FBE0 +03F3E0 +07E3E0 +0FC3E0 +1F83E0 +3F03E0 +7E03E0 +FC03E0 +F803E0 +F803E0 +F803E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +00003F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +00FFE0 +01FFE0 +03FFE0 +07FFE0 +0FE000 +1FC000 +3F8000 +7F0000 +FE0000 +FC0000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00001F +00003F +00007E +0000FC +0001F8 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +003E00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +00001F +00001F +00003F +00007E +0000FC +0001F8 +0003F0 +0007E0 +07FFC0 +07FF80 +07FF00 +07FE00 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 20 5 6 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 24 5 2 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 21 5 9 +BITMAP +007C +00FC +01F8 +03F0 +07E0 +0FC0 +1F80 +3F00 +7E00 +FC00 +F800 +FC00 +7E00 +3F00 +1F80 +0FC0 +07E0 +03F0 +01F8 +00FC +007C +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 14 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 10 +BITMAP +FC00 +FE00 +3F00 +1F80 +0FC0 +07E0 +03F0 +01F8 +00FC +007C +007C +00FC +01F8 +03F0 +07E0 +0FC0 +1F80 +3F00 +FE00 +FC00 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8003F +00007E +0000FC +0001F8 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +003E00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +F8003F +F8001F +F8001F +F8001F +F81FFF +F83FFF +F83FFF +F83FFF +F83E1F +F83C1F +F83C1F +F83E3F +F83FFF +F83FFF +F83FFF +F81FFE +F80000 +F80000 +F80000 +FC0000 +7FFFE0 +3FFFE0 +1FFFE0 +0FFFE0 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +07C03F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07FFFE +07FFFC +07FFFC +07FFFE +07C03F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C03F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +07C03F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C03F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F803FF +F803FF +F803FF +F803FF +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003FFF +003FFF +003FFF +003FFF +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +F803E0 +F803E0 +F803E0 +FC07E0 +7FFFC0 +3FFF80 +1FFF00 +0FFE00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8003F +F8007E +F800FC +F801F8 +F803F0 +F807E0 +F80FC0 +F81F80 +F83F00 +F87E00 +F8FC00 +F9F800 +FFF000 +FFE000 +FFE000 +FFF000 +F9F800 +F8FC00 +F87E00 +F83F00 +F81F80 +F80FC0 +F807E0 +F803F0 +F801F8 +F800FC +F8007E +F8003F +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +FC003F +FE007F +FF00FF +FF81FF +FFC3FF +FFE7FF +FFFFFF +F9FF9F +F8FF1F +F87E1F +F83C1F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +FC001F +FE001F +FF001F +FF801F +FFC01F +FFE01F +FBF01F +F9F81F +F8FC1F +F87E1F +F83F1F +F81F9F +F80FDF +F807FF +F803FF +F801FF +F800FF +F8007F +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83E1F +F83F1F +F83F9F +F81FDF +F80FEF +F807F7 +FC03FB +7FFDFC +3FFEFE +1FFF7F +0FFFBF +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F8FC00 +F87E00 +F83F00 +F81F80 +F80FC0 +F807E0 +F803F0 +F801F8 +F800FC +F8007E +F8003F +F8001F +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +FC0000 +7FFFF0 +3FFFF8 +1FFFFC +0FFFFE +00003F +00001F +00001F +00001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +FE007E +7F00FC +3F81F8 +1FC3F0 +0FE7E0 +07FFC0 +03FF80 +01FF00 +00FE00 +007C00 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F87E3F +7FFFFE +3FFFFC +1FE7F8 +0FC3F0 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 28 0 6 +BITMAP +F8003E +F8003E +F8003E +F8003E +FC007E +7E00FC +3F01F8 +1F83F0 +0FC7E0 +07EFC0 +03FF80 +01FF00 +00FE00 +007C00 +007C00 +00FE00 +01FF00 +03FF80 +07EFC0 +0FC7E0 +1F83F0 +3F01F8 +7E00FC +FC007E +F8003E +F8003E +F8003E +F8003E +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7E007E +3F00FC +1F81F8 +0FC3F0 +07FFE0 +03FFC0 +01FF80 +00FF00 +007E00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00003F +00007F +0000FE +0001FC +0003F8 +0007F0 +000FE0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +3F8000 +7F0000 +FE0000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +FFFC +FFFC +FFFC +FFFC +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +FC0000 +FE0000 +FF0000 +7F8000 +3F8000 +1FC000 +1FE000 +0FE000 +07F000 +03F800 +03FC00 +01FE00 +00FE00 +007F00 +003F80 +003FC0 +001FC0 +000FE0 +0007F0 +0007F8 +0003F8 +0001FC +0001FE +0000FF +00007F +00003F +00001F +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +FFFC +FFFC +FFFC +FFFC +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 26 +BITMAP +003C00 +00FF00 +01FF80 +03FFC0 +07E7E0 +0FC3F0 +1F81F8 +3F00FC +7E007E +FC003F +F8001F +F0000F +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 4 0 -2 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 12 5 26 +BITMAP +F800 +FC00 +FE00 +FF00 +7FC0 +3FE0 +1FF0 +0FF8 +03FC +01FC +00FC +007C +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +07FFF0 +07FFF8 +07FFFC +07FFFE +00003F +00001F +00001F +00001F +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFE0 +1FFFE0 +3FFFE0 +7FFFE0 +FC0000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +00001F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F80000 +F80000 +F80000 +FC0000 +7FFFE0 +3FFFE0 +1FFFE0 +0FFFE0 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +007FF0 +00FFF8 +01FFFC +03FFFE +07E03F +07C01F +07C01F +07C00F +07C000 +07C000 +07C000 +07C000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +00001F +00001F +00001F +00003F +07FFFE +07FFFC +07FFF8 +07FFF0 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 36 5 -2 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +000000 +000000 +000000 +000000 +007FE0 +007FE0 +007FE0 +007FE0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +F803E0 +F803E0 +F803E0 +FC07E0 +7FFFC0 +3FFF80 +1FFF00 +0FFE00 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8003E +F8007E +F800FC +F801F8 +F803F0 +F807E0 +F80FC0 +F81F80 +FFFF00 +FFFE00 +FFFE00 +FFFF00 +F81F80 +F80FC0 +F807E0 +F803F0 +F801F8 +F800FC +F8007E +F8003E +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +FFC3F0 +FFE7F8 +FFFFFC +FFFFFE +F87E3F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F87FF0 +F8FFF8 +F9FFFC +FBFFFE +FFE03F +FFC01F +FF801F +FF001F +FE001F +FC001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +00001F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F87FF0 +F8FFF8 +F9FFFC +FBFFFE +FFE03F +FFC01F +FF801F +FF000F +FE0000 +FC0000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC0000 +F80000 +F80000 +FC0000 +7FFFF0 +3FFFF8 +1FFFFC +0FFFFE +00003F +00001F +00001F +00003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003E00 +003FFF +001FFF +000FFF +0007FF +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +F8007F +F800FF +F801FF +F803FF +FC07FF +7FFFDF +3FFF9F +1FFF1F +0FFE1F +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7E007E +3F00FC +1F81F8 +0FC3F0 +07E7E0 +03FFC0 +01FF80 +00FF00 +007E00 +003C00 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +FC7E3F +7FFFFE +3FFFFC +1FFFF8 +0FE7F0 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F0000F +F8001F +FC003F +7E007E +3F00FC +1F81F8 +0FC3F0 +07E7E0 +03FFC0 +01FF80 +01FF80 +03FFC0 +07FFE0 +0FE7F0 +1FC3F8 +3F81FC +7F00FE +FE007F +FC003F +F8001F +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FC007E +FE00FC +7F01F8 +3F83F0 +1FC7E0 +0FFFC0 +07FF80 +03FF00 +01FE00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +FF0000 +FE0000 +FC0000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +0003F8 +0007F0 +000FE0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +007C +00FC +01FC +03FC +07C0 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0F80 +1F80 +3F00 +FC00 +F800 +F800 +FC00 +3F00 +1F80 +0F80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +07C0 +03FC +01FC +00FC +007C +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 36 10 2 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +F800 +FC00 +FE00 +FF00 +0F80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +07C0 +07E0 +03F0 +00FC +007C +007C +00FC +03F0 +07E0 +07C0 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 14 +BITMAP +0FE01F +1FF01F +3FF81F +7FFC1F +FC7C1F +F83C1F +F83C1F +F83E3F +F83FFE +F81FFC +F80FF8 +F807F0 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 28 10 6 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 2 +BITMAP +003C00 +003C00 +003C00 +003C00 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F83C1F +F83C1F +F83C1F +F83C1F +F83C00 +F83C00 +F83C00 +F83C00 +F83C1F +F83C1F +F83C1F +F83C1F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003FE0 +003FE0 +003FE0 +003FE0 +07C01F +07C01F +07C01F +07C01F +07C000 +07C000 +07C000 +07C000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +07C000 +07C000 +07C000 +07C000 +07C01F +07C01F +07C01F +07C01F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F83C1F +F83C1F +F83C1F +F83C1F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C1F +F83C1F +F83C1F +F83C1F +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 28 10 6 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 32 5 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F80000 +F80000 +F80000 +F80000 +07FC00 +07FC00 +07FC00 +07FC00 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +07FC00 +07FC00 +07FC00 +07FC00 +0003E0 +0003E0 +0003E0 +0003E0 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 4 5 34 +BITMAP +F87C +F87C +F87C +F87C +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 28 28 0 6 +BITMAP +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +07FC +07FC +07FC +07FC +F87C +F87C +F87C +F87C +07FC +07FC +07FC +07FC +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +003C1F +003C1F +003C1F +003C1F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C00 +F83C00 +F83C00 +F83C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C1F +003C1F +003C1F +003C1F +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 10 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 4 5 18 +BITMAP +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 28 28 0 6 +BITMAP +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 4 0 34 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 16 5 26 +BITMAP +07FC00 +07FC00 +07FC00 +07FC00 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +07FC00 +07FC00 +07FC00 +07FC00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +007C +007C +007C +007C +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +FF80 +FF80 +FF80 +FF80 +007C +007C +007C +007C +0780 +0780 +0780 +0780 +007C +007C +007C +007C +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 12 5 26 +BITMAP +007C +007C +007C +007C +0780 +0780 +0780 +0780 +F800 +F800 +F800 +F800 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F803FF +F803FF +F803FF +F803FF +FFFC1F +FFFC1F +FFFC1F +FFFC1F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FFFF +07FFFF +07FFFF +07FFFF +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +07FC1F +07FC1F +07FC1F +07FC1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 8 10 18 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 8 5 -2 +BITMAP +007C +007C +007C +007C +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +0780 +0780 +0780 +0780 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 26 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F83C00 +F83C00 +F83C00 +F83C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C1F +003C1F +003C1F +003C1F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C00 +F83C00 +F83C00 +F83C00 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +FFC000 +FFC000 +FFC000 +FFC000 +07C01F +07C01F +07C01F +07C01F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FC00 +07FC00 +07FC00 +07FC00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83FE0 +F83FE0 +F83FE0 +F83FE0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FFFF +07FFFF +07FFFF +07FFFF +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +FFC000 +FFC000 +FFC000 +FFC000 +07C01F +07C01F +07C01F +07C01F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FC00 +07FC00 +07FC00 +07FC00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C1F +F83C1F +F83C1F +F83C1F +00001F +00001F +00001F +00001F +0003E0 +0003E0 +0003E0 +0003E0 +003FFF +003FFF +003FFF +003FFF +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +FFC000 +FFC000 +FFC000 +FFC000 +003C00 +003C00 +003C00 +003C00 +07C01F +07C01F +07C01F +07C01F +003FE0 +003FE0 +003FE0 +003FE0 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83FE0 +F83FE0 +F83FE0 +F83FE0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FFFF +07FFFF +07FFFF +07FFFF +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +07C000 +07C000 +07C000 +07C000 +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07FFFF +07FFFF +07FFFF +07FFFF +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83FFF +F83FFF +F83FFF +F83FFF +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 -2 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +0003E0 +0003E0 +0003E0 +0003E0 +07FC00 +07FC00 +07FC00 +07FC00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 40 5 6 +BITMAP +F800 +F800 +F800 +F800 +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 40 5 6 +BITMAP +007C +007C +007C +007C +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 40 5 6 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 6 +BITMAP +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFC01F +FFC01F +FFC01F +FFC01F +F83C1F +F83C1F +F83C1F +F83C1F +F803FF +F803FF +F803FF +F803FF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 10 +BITMAP +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +00001F +00001F +00001F +00001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F803FF +F803FF +F803FF +F803FF +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +FFC01F +FFC01F +FFC01F +FFC01F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 28 5 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F803E0 +F803E0 +F803E0 +F803E0 +F83C00 +F83C00 +F83C00 +F83C00 +F803E0 +F803E0 +F803E0 +F803E0 +F8001F +F8001F +F8001F +F8001F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +003C1F +003C1F +003C1F +003C1F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F83C00 +F83C00 +F83C00 +F83C00 +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +0003E0 +0003E0 +0003E0 +0003E0 +07FC00 +07FC00 +07FC00 +07FC00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 32 5 6 +BITMAP +F800 +F800 +F800 +F800 +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 32 5 6 +BITMAP +007C +007C +007C +007C +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 32 5 6 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +F83FE0 +F83FE0 +F83FE0 +F83FE0 +FFC01F +FFC01F +FFC01F +FFC01F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 10 +BITMAP +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +000000 +000000 +000000 +000000 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +07FFFF +07FFFF +07FFFF +07FFFF +F803FF +F803FF +F803FF +F803FF +F83C1F +F83C1F +F83C1F +F83C1F +FFC01F +FFC01F +FFC01F +FFC01F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 -2 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C000 +07C000 +07C000 +07C000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 -2 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 -2 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C000 +07C000 +07C000 +07C000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-32x64.bdf b/buildroot/share/fonts/marlin-32x64.bdf new file mode 100644 index 000000000000..987f9c974f2e --- /dev/null +++ b/buildroot/share/fonts/marlin-32x64.bdf @@ -0,0 +1,9870 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 70 100 100 +FONTBOUNDINGBOX 34 69 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 68 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FFE01FE0 +FFE00FE0 +FFE007E0 +FFE003E0 +FFE003E0 +FFE003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FE00FFE0 +FF00FFE0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 30 37 0 11 +BITMAP +00100000 +00180000 +001C0000 +001E0000 +001F0000 +001F8000 +001FC000 +001FE000 +001FF000 +001FF800 +001FFC00 +001FFE00 +001FFF00 +001FFF80 +001FFFC0 +FFFFFFE0 +FFFFFFF0 +FFFFFFF8 +FFFFFFFC +FFFFFFF8 +FFFFFFF0 +001FFFE0 +001FFFC0 +001FFF80 +001FFF00 +001FFE00 +001FFC00 +001FF800 +001FF000 +001FE000 +001FC000 +001F8000 +001F0000 +001E0000 +001C0000 +00180000 +00100000 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 28 48 0 9 +BITMAP +00060000 +000F0000 +001F8000 +003FC000 +007FE000 +00FFF000 +01FFF800 +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE1F07E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 2448 0 +DWIDTH 34 0 +BBX 32 29 0 15 +BITMAP +FC07E000 +FE07F000 +FF07F800 +FF87FC00 +FFC7FE00 +7FE3FF00 +3FF1FF80 +1FF8FFC0 +0FFC7FE0 +07FE3FF0 +03FF1FF8 +01FF8FFC +00FFC7FE +007FE3FF +007FE3FF +00FFC7FE +01FF8FFC +03FF1FF8 +07FE3FF0 +0FFC7FE0 +1FF8FFC0 +3FF1FF80 +7FE3FF00 +FFC7FE00 +FF87FC00 +FF07F800 +FE07F000 +FC07E000 +F807C000 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 58 0 -2 +BITMAP +001F0000 +003F8000 +007FC000 +00FFE000 +01FFF000 +03FFF800 +03F1FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +07E0FC00 +0FE0FE00 +1FE0FF00 +3FE0FF80 +7FE0FFC0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +7FFFFFC0 +3FFFFF80 +1FFFFF00 +0FFFFE00 +07FFFC00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 17 17 0 27 +BITMAP +03E000 +07F000 +0FF800 +1FFC00 +3FFE00 +7FFF00 +FE3F80 +FC1F80 +FC1F80 +FC1F80 +FE3F80 +7FFF00 +3FFE00 +1FFC00 +0FF800 +07F000 +03E000 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 41 11 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 18 6 38 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 35 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFE00 +07FFFF00 +0FFFFF80 +1FFFFFC0 +3FFFFFE0 +7FFFFFE0 +FE1F07E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FE1F0000 +FFFFFC00 +7FFFFE00 +3FFFFF00 +1FFFFF80 +0FFFFFC0 +07FFFFE0 +001F07E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FE1F07E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE007E0 +FFE00FE0 +FFE01FE0 +FFE03FC0 +00007F80 +0000FF00 +0001FE00 +0003FC00 +0007F800 +000FF000 +001FE000 +003FC000 +007F8000 +00FF0000 +01FE0000 +03FC0000 +07F80000 +0FF00000 +1FE00000 +3FC00000 +7F800000 +FF00FFE0 +FE00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E00000 +07F00000 +0FF80000 +1FFC0000 +3FFE0000 +7FFF0000 +FE3F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FE3F0000 +7FFE0000 +3FFC0000 +1FF80000 +1FF00000 +3FF80000 +7FFC0000 +FEFE01E0 +FC7F03E0 +FC3F87E0 +FC1FC7E0 +FC0FFFC0 +FC07FF80 +FC03FF00 +FC01FE00 +FC00FC00 +FC00FC00 +FC00FE00 +FE01FF00 +7FFFFF80 +3FFFFFC0 +1FFFFFE0 +0FFFCFE0 +07FF87E0 +03FF03E0 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 18 11 38 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +003F +007F +00FF +01FE +03FC +07F8 +07F0 +0FE0 +1FC0 +1FC0 +1F80 +1F80 +1F00 +3F00 +3F00 +3F00 +7E00 +7E00 +FE00 +FE00 +FC00 +FC00 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +FC00 +FC00 +FC00 +7E00 +7E00 +3E00 +3F00 +3F00 +1F00 +1F00 +1F80 +1F80 +0FC0 +0FE0 +07F0 +03F8 +01FC +00FE +007F +003F +001F +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +F800 +FC00 +FE00 +FF00 +7F80 +3FC0 +1FC0 +0FE0 +07E0 +07F0 +03F0 +03F8 +01F8 +01F8 +00FC +00FC +007E +007E +007F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +007F +007E +007E +00FC +00FC +01F8 +01F8 +01F8 +03F0 +07F0 +07E0 +07E0 +0FC0 +1FC0 +3F80 +7F00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +F01F01E0 +F81F03E0 +FC1F07E0 +FE1F0FE0 +FF1F1FE0 +7F9F3FC0 +3FDF7F80 +1FFFFF00 +0FFFFE00 +07FFFC00 +03FFF800 +01FFF000 +00FFE000 +007FC000 +007FC000 +007FC000 +00FFE000 +01FFF000 +03FFF800 +07FFFC00 +0FFFFE00 +1FFFFF00 +3FDF7F80 +7F9F3FC0 +FF1F1FE0 +FE1F0FE0 +FC1F07E0 +F81F03E0 +F01F01E0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 15 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 18 6 3 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +0FC0 +FFC0 +FF80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 6 0 27 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 12 6 9 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +000003E0 +000007E0 +000007E0 +00000FE0 +00000FE0 +00001FE0 +00003FC0 +00003F80 +00007F80 +0000FF00 +0000FF00 +0001FE00 +0001FC00 +0003FC00 +0007F800 +0007F800 +000FF000 +000FF000 +001FE000 +003FC000 +003FC000 +007F8000 +00FF8000 +00FF0000 +01FE0000 +01FE0000 +03FC0000 +07FC0000 +07F80000 +0FF00000 +1FF00000 +1FE00000 +3FE00000 +3FC00000 +7FC00000 +FF800000 +FF000000 +FF000000 +FE000000 +FE000000 +FC000000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE0007E0 +FC0007E0 +FC000FE0 +FC001FE0 +FC003FE0 +FC007FE0 +FC00FFE0 +FC01FFE0 +FC03FFE0 +FC07FFE0 +FC0FFFE0 +FC1FFFE0 +FC3FFBE0 +FC7FF3E0 +FCFFE3E0 +FDFFC3E0 +FFFF83E0 +FFFF03E0 +FFFE03E0 +FFFC03E0 +FFF803E0 +FFF003E0 +FFE003E0 +FFC003E0 +FF8003E0 +FF0003E0 +FE0003E0 +FC0003E0 +FE0007E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +07C0 +07C0 +0FC0 +1FC0 +3FC0 +7FC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FE0 +00003FC0 +00007F80 +0000FF00 +0001FE00 +0003FC00 +0007F800 +000FF000 +001FE000 +003FC000 +007F8000 +00FF0000 +01FE0000 +03FC0000 +07F80000 +0FF00000 +1FE00000 +3FC00000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FC0 +00003F80 +00007F00 +0000FE00 +0001FC00 +000FFC00 +001FFE00 +001FFF00 +001FFF80 +001FFFC0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +0000FC00 +0000FC00 +0001FC00 +0003FC00 +0007FC00 +000FFC00 +001FFC00 +003FFC00 +007FFC00 +00FFFC00 +01FEFC00 +03FCFC00 +07F8FC00 +0FF0FC00 +1FE0FC00 +3FC0FC00 +7F80FC00 +FF00FC00 +FE00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +00000FE0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFC00 +003FFC00 +007FFC00 +00FFFC00 +01FFFC00 +03FFFC00 +07F80000 +0FF00000 +1FE00000 +3FC00000 +7F800000 +FF000000 +FE000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FC0 +00001F80 +00003F00 +00007E00 +0000FC00 +0001F800 +0003F000 +0007E000 +000FC000 +001F8000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFC0 +3FFFFF80 +1FFFFF00 +1FFFFF00 +3FFFFF80 +7FFFFFC0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FE0 +00003FC0 +00007F80 +0000FF00 +0001FE00 +0003FC00 +03FFF800 +03FFF000 +03FFE000 +03FFC000 +03FF8000 +03FF0000 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 29 6 9 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 35 6 3 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +0FC0 +1FC0 +FFC0 +FF80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 18 28 4 16 +BITMAP +0007C0 +000FC0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +3F8000 +7F0000 +FE0000 +FE0000 +7F0000 +3F8000 +1FC000 +0FE000 +07F000 +03F800 +01FC00 +00FE00 +007F00 +003F80 +001FC0 +000FC0 +0007C0 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 17 0 21 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 18 29 6 15 +BITMAP +F80000 +FC0000 +FE0000 +FF0000 +7F8000 +3FC000 +1FE000 +0FF000 +07F800 +03FC00 +01FE00 +00FF00 +007F80 +003FC0 +003FC0 +007F80 +00FF00 +01FE00 +03FC00 +07F800 +0FF000 +1FE000 +3FC000 +7F8000 +FF0000 +FE0000 +FC0000 +F80000 +F00000 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +00001FC0 +00003F80 +00007F00 +0000FE00 +0001FC00 +0003F800 +0007F000 +000FE000 +001FC000 +001F8000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1F83E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F83E0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC0FFFC0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FE000000 +7FFFFC00 +3FFFFC00 +1FFFFC00 +0FFFFC00 +07FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +03E00FE0 +03E007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E007E0 +03E00FE0 +03FFFFE0 +03FFFFC0 +03FFFF80 +03FFFF00 +03FFFF80 +03FFFFC0 +03E00FE0 +03E007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E007E0 +03E00FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +03E00FE0 +03E007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E007E0 +03E00FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FE01FC00 +FF03FC00 +7FFFF800 +3FFFF000 +1FFFE000 +0FFFC000 +07FF8000 +03FF0000 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0001E0 +FC0003E0 +FC0007E0 +FC000FE0 +FC001FC0 +FC003F80 +FC007F00 +FC00FE00 +FC01FC00 +FC03F800 +FC07F000 +FC0FE000 +FC1FC000 +FC3F8000 +FC7F0000 +FCFE0000 +FDFC0000 +FFF80000 +FFF00000 +FFE00000 +FFE00000 +FFF00000 +FFF80000 +FDFC0000 +FCFE0000 +FC7F0000 +FC3F8000 +FC1FC000 +FC0FE000 +FC07F000 +FC03F800 +FC01FC00 +FC00FE00 +FC007F00 +FC003F80 +FC001FC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0001E0 +FC0000E0 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +FF801FE0 +FFC03FE0 +FFE07FE0 +FFF0FFE0 +FFF9FFE0 +FFFFFFE0 +FDFFFBE0 +FCFFF3E0 +FC7FE3E0 +FC3FC3E0 +FC1F83E0 +FC0F03E0 +FC0603E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +FF8003E0 +FFC003E0 +FFE003E0 +FFF003E0 +FFF803E0 +FFFC03E0 +FFFE03E0 +FDFF03E0 +FCFF83E0 +FC7FC3E0 +FC3FE3E0 +FC1FF3E0 +FC0FFBE0 +FC07FFE0 +FC03FFE0 +FC01FFE0 +FC00FFE0 +FC007FE0 +FC003FE0 +FC001FE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1E03E0 +FC1F03E0 +FC1F83E0 +FC1FC3E0 +FC1FE3E0 +FC1FF3E0 +FC0FFBE0 +FC07FDE0 +FC03FEE0 +FC01FF60 +FC00FF80 +FC007FC0 +7FFFBFE0 +3FFFDFE0 +1FFFEFE0 +0FFFF7E0 +07FFFBE0 +03FFF9E0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FFFE0000 +FDFF0000 +FCFF8000 +FC7FC000 +FC3FE000 +FC1FF000 +FC0FF800 +FC07FC00 +FC03FE00 +FC01FF00 +FC00FF80 +FC007FC0 +FC003FE0 +FC001FE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0001E0 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FE000000 +FF000000 +7FFFFC00 +3FFFFE00 +1FFFFF00 +0FFFFF80 +07FFFFC0 +03FFFFE0 +00000FE0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FE0007E0 +FE000FE0 +7E000FC0 +7F001FC0 +3F001F80 +3F803F80 +1F803F00 +1FC07F00 +0FC07E00 +07E0FE00 +07F1FC00 +03F1F800 +03FFF800 +01FFF000 +01FFF000 +00FFE000 +00FFE000 +007FC000 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FE3F87E0 +FF7FCFE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFBFF00 +07F1FE00 +03E0FC00 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FE000FE0 +FF001FE0 +FF803FE0 +7FC07FE0 +3FE0FFC0 +1FF1FF80 +0FFBFF00 +07FFFE00 +03FFFC00 +01FFF800 +00FFF000 +007FE000 +007FE000 +00FFF000 +01FFF800 +03FFFC00 +07FFFE00 +0FFFFF00 +1FFBFF80 +3FF1FFC0 +7FE0FFE0 +FFC07FE0 +FF803FE0 +FF001FE0 +FE000FE0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FE000FE0 +FF001FE0 +7F803FC0 +3FC07F80 +1FE0FF00 +0FF1FE00 +07FBFC00 +03FFF800 +01FFF000 +00FFE000 +007FC000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FE0 +00003FE0 +00007FE0 +0000FFC0 +0001FF80 +0003FF00 +0007FE00 +000FFC00 +001FF800 +003FF000 +007FE000 +00FFC000 +01FF8000 +03FF0000 +07FE0000 +0FFC0000 +1FF80000 +3FF00000 +7FE00000 +FFC00000 +FF800000 +FF000000 +FE000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FE000000 +FE000000 +FF000000 +FF000000 +FF800000 +7FC00000 +3FC00000 +3FE00000 +1FE00000 +0FF00000 +0FF00000 +07F80000 +07FC0000 +03FC0000 +01FE0000 +01FE0000 +00FF0000 +007F8000 +007F8000 +003FC000 +003FC000 +001FE000 +000FF000 +000FF000 +0007F800 +0003F800 +0003FC00 +0001FC00 +0001FE00 +0000FF00 +0000FF00 +00007F80 +00003F80 +00003FC0 +00001FE0 +00000FE0 +00000FE0 +000007E0 +000007E0 +000003E0 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 28 19 0 38 +BITMAP +00040000 +000E0000 +001F0000 +003F8000 +007FC000 +00FFE000 +01FFF000 +03FBF800 +07F1FC00 +0FE0FE00 +1FC07F00 +3F803F80 +7F001FC0 +FE000FE0 +FC0007F0 +F80003F0 +F00001F0 +E00000F0 +C0000070 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 5 0 -2 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 18 6 38 +BITMAP +F000 +F800 +FC00 +FE00 +FF00 +FF80 +FFC0 +7FE0 +3FF0 +1FF8 +0FFC +07FE +03FF +01FF +00FF +007F +003F +001F +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +03FFFC00 +03FFFE00 +03FFFF00 +03FFFF80 +03FFFFC0 +00000FE0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFC00 +0FFFFC00 +1FFFFC00 +3FFFFC00 +7FFFFC00 +FF000000 +FE000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFC00 +0FFFFE00 +1FFFFF00 +3FFFFF80 +7FFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FE000000 +FF000000 +7FFFFC00 +3FFFFC00 +1FFFFC00 +0FFFFC00 +07FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFC00 +003FFE00 +007FFF00 +00FFFF80 +01FFFFC0 +03FFFFE0 +03F80FE0 +03F007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +03FFFFC0 +03FFFF80 +03FFFF00 +03FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 52 6 -2 +BITMAP +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +000000 +000000 +000000 +000000 +000000 +000000 +003FF8 +003FF8 +003FF8 +003FF8 +003FF8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +F800F8 +F800F8 +F800F8 +F800F8 +FC01F8 +FE03F8 +7FFFF0 +3FFFE0 +1FFFC0 +0FFF80 +07FF00 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0007E0 +FC000FE0 +FC001FC0 +FC003F80 +FC007F00 +FC00FE00 +FC01FC00 +FC03F800 +FC07F000 +FC0FE000 +FFFFC000 +FFFF8000 +FFFF0000 +FFFF8000 +FFFFC000 +FFFFE000 +FC0FF000 +FC07F800 +FC03FC00 +FC01FE00 +FC00FF00 +FC007F80 +FC003FC0 +FC001FE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0001E0 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FFE0FC00 +FFF1FE00 +FFFBFF00 +FFFFFF80 +FFFFFFC0 +FC7FCFE0 +FC3F87E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1FFC00 +FC3FFE00 +FC7FFF00 +FCFFFF80 +FDFFFFC0 +FFFC0FE0 +FFF807E0 +FFF003E0 +FFE003E0 +FFC003E0 +FF8003E0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFC00 +0FFFFE00 +1FFFFF00 +3FFFFF80 +7FFFFFC0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1FFC00 +FC3FFE00 +FC7FFF00 +FCFFFF80 +FDFFFFC0 +FFFC0FE0 +FFF807E0 +FFF003E0 +FFE003E0 +FFC003E0 +FF8003E0 +FF000000 +FE000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF000000 +FE000000 +FC000000 +FC000000 +FE000000 +FF000000 +7FFFFC00 +3FFFFE00 +1FFFFF00 +0FFFFF80 +07FFFFC0 +03FFFFE0 +00000FE0 +000007E0 +000003E0 +000003E0 +000007E0 +00000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F8000 +001FC000 +001FFFE0 +000FFFE0 +0007FFE0 +0003FFE0 +0001FFE0 +0000FFE0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FC001FE0 +FC003FE0 +FC007FE0 +FC00FFE0 +FE01FFE0 +FF03FFE0 +7FFFFBE0 +3FFFF3E0 +1FFFE3E0 +0FFFC3E0 +07FF83E0 +03FF03E0 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FE000FE0 +7F001FC0 +3F803F80 +1FC07F00 +0FE0FE00 +07F1FC00 +03FFF800 +01FFF000 +00FFE000 +007FC000 +003F8000 +001F0000 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FE3F8FE0 +FF7FDFE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFBFF00 +07F1FE00 +03E0FC00 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +F00003E0 +F80007E0 +FC000FE0 +FE001FE0 +FF003FC0 +7F807F80 +3FC0FF00 +1FE1FE00 +0FF3FC00 +07FFF800 +03FFF000 +01FFE000 +00FFC000 +007F8000 +007F8000 +00FFC000 +01FFE000 +03FFF000 +07FFF800 +0FF3FC00 +1FE1FE00 +3FC0FF00 +7F807F80 +FF003FC0 +FE001FE0 +FC000FE0 +F80007E0 +F00003E0 +E00001E0 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7F801FE0 +3FC03FC0 +1FE07F80 +0FF0FF00 +07F9FE00 +03FFFC00 +01FFF800 +00FFF000 +007FE000 +003FC000 +003F8000 +007F0000 +00FE0000 +01FC0000 +03F80000 +07F00000 +0FE00000 +1FC00000 +3F800000 +7F000000 +FE000000 +FC000000 +F8000000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +00007FC0 +0000FF80 +0001FF00 +0003FE00 +0007FC00 +000FF800 +001FF000 +003FE000 +007FC000 +00FF8000 +01FF0000 +03FE0000 +07FC0000 +0FF80000 +1FF00000 +3FE00000 +7FC00000 +FF800000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +001F +003F +007F +00FF +01FF +03FE +07F0 +07E0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0FC0 +1FC0 +3FC0 +7FC0 +FE00 +FC00 +F800 +F800 +FC00 +FE00 +7FC0 +3FC0 +1FC0 +0FC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07E0 +07F0 +03FE +01FF +00FF +007F +003F +001F +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 53 11 3 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +F000 +F800 +FC00 +FE00 +FF00 +7F80 +1FC0 +0FC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07E0 +07F0 +07F8 +07FC +07FE +00FF +007F +003F +003F +007F +00FF +07FE +07FC +07F8 +07F0 +07E0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0FC0 +1FC0 +7F80 +FF00 +FE00 +FC00 +F800 +F000 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 17 0 21 +BITMAP +07E003E0 +0FF003E0 +1FF803E0 +3FFC03E0 +7FFE03E0 +FFFF03E0 +FE7F83E0 +FC3FC3E0 +FC1FE3E0 +FC0FF7E0 +FC07FFE0 +FC03FFE0 +FC01FFC0 +FC00FF80 +FC007F00 +FC003E00 +FC001C00 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 41 11 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 3 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 41 11 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 47 6 9 +BITMAP +07FFF8 +07FFF8 +07FFF8 +07FFF8 +07FFF8 +07FFF8 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 6 6 50 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 32 41 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +07FF +07FF +07FF +07FF +07FF +07FF +F83F +F83F +F83F +F83F +F83F +F83F +07FF +07FF +07FF +07FF +07FF +07FF +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 18 0 15 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 6 6 27 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 32 41 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 6 0 50 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 24 6 38 +BITMAP +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +003F +003F +003F +003F +003F +003F +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 18 6 38 +BITMAP +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F800 +F800 +F800 +F800 +F800 +F800 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 11 11 11 27 +BITMAP +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 11 6 -2 +BITMAP +003F +003F +003F +003F +003F +003F +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 30 6 38 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 52 0 -2 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 59 6 9 +BITMAP +F800 +F800 +F800 +F800 +F800 +F800 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 59 6 9 +BITMAP +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 59 6 9 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 9 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 15 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 41 6 9 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 47 6 9 +BITMAP +F800 +F800 +F800 +F800 +F800 +F800 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 47 6 9 +BITMAP +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 47 6 9 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 15 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 58 0 -2 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 52 0 -2 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 52 0 -2 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-8x16.bdf b/buildroot/share/fonts/marlin-8x16.bdf new file mode 100644 index 000000000000..92e73951b5ba --- /dev/null +++ b/buildroot/share/fonts/marlin-8x16.bdf @@ -0,0 +1,3701 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 16 100 100 +FONTBOUNDINGBOX 10 15 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 14 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 1 +BITMAP +40 +78 +E4 +C4 +84 +84 +84 +9C +78 +08 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +C0 +FE +FE +C2 +C2 +C2 +C2 +C2 +C2 +FE +FE +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 8 0 1 +BITMAP +10 +18 +1C +FE +FE +1C +18 +10 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +38 +7C +FE +10 +10 +10 +10 +10 +F0 +F0 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 11 1 -1 +BITMAP +20 +78 +A4 +A4 +A4 +BC +84 +84 +84 +78 +20 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 6 0 2 +BITMAP +EE00 +7700 +1980 +1980 +7700 +EE00 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -1 +BITMAP +FE +92 +92 +82 +82 +82 +82 +82 +82 +92 +92 +FE +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 13 1 -2 +BITMAP +20 +50 +50 +50 +50 +50 +50 +88 +A8 +A8 +A8 +88 +70 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 3 1 5 +BITMAP +40 +A0 +40 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 10 3 0 +BITMAP +80 +80 +80 +80 +80 +80 +80 +00 +80 +80 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 4 2 7 +BITMAP +A0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 0 +BITMAP +28 +28 +FE +28 +28 +28 +FE +28 +28 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -1 +BITMAP +10 +3C +52 +92 +90 +70 +1C +12 +92 +54 +3C +10 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 0 +BITMAP +C4 +C4 +04 +08 +10 +20 +40 +80 +8C +8C +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +20 +60 +90 +90 +60 +60 +92 +8C +52 +32 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 4 3 7 +BITMAP +80 +80 +80 +80 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +30 +40 +40 +40 +80 +80 +80 +80 +40 +40 +40 +30 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 12 2 -1 +BITMAP +80 +40 +40 +40 +20 +20 +20 +20 +40 +40 +40 +80 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +D6 +38 +10 +10 +38 +D6 +10 +10 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 2 +BITMAP +10 +10 +10 +FE +10 +10 +10 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 4 2 -1 +BITMAP +C0 +40 +40 +80 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 2 0 4 +BITMAP +FE +FE +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 2 2 0 +BITMAP +C0 +C0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 0 +BITMAP +04 +04 +08 +10 +10 +20 +40 +40 +80 +80 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 0 +BITMAP +30 +48 +84 +8C +94 +A4 +C4 +84 +48 +30 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 10 1 0 +BITMAP +20 +60 +E0 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +02 +04 +08 +10 +20 +40 +FE +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +02 +02 +04 +08 +1C +02 +82 +44 +38 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +04 +0C +14 +24 +44 +84 +FE +04 +04 +04 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +80 +80 +FC +02 +02 +02 +82 +44 +38 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +1C +20 +40 +80 +F8 +84 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +02 +02 +04 +0C +08 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +44 +38 +44 +82 +44 +38 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +42 +3E +02 +04 +08 +30 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 5 2 1 +BITMAP +C0 +C0 +00 +C0 +C0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 7 2 -1 +BITMAP +C0 +C0 +00 +C0 +40 +40 +80 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 7 2 1 +BITMAP +10 +20 +40 +80 +40 +20 +10 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 3 +BITMAP +FE +00 +00 +FE +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 7 2 1 +BITMAP +80 +40 +20 +10 +20 +40 +80 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +04 +08 +10 +10 +00 +10 +10 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +9E +92 +92 +9E +80 +40 +3C +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +7C +82 +82 +82 +82 +FE +82 +82 +82 +82 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +44 +42 +42 +7C +42 +42 +42 +44 +FC +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +18 +24 +42 +80 +80 +80 +80 +42 +24 +18 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +44 +42 +42 +42 +42 +42 +42 +44 +F8 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +80 +80 +80 +FC +80 +80 +80 +80 +FE +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +80 +80 +80 +FC +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +80 +80 +80 +8E +42 +24 +18 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +FE +82 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 10 1 0 +BITMAP +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 0 +BITMAP +3E +08 +08 +08 +08 +08 +88 +48 +30 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +84 +88 +90 +E0 +E0 +90 +88 +84 +82 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +FE +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +C6 +AA +92 +82 +82 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +C2 +A2 +92 +8A +86 +82 +82 +82 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +82 +82 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +84 +82 +82 +84 +F8 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +82 +82 +82 +8C +46 +3A +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +84 +82 +82 +84 +F8 +90 +88 +84 +82 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +18 +24 +42 +80 +40 +3C +02 +82 +44 +38 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +10 +10 +10 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +82 +82 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +82 +82 +44 +44 +28 +10 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +82 +82 +92 +92 +54 +28 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +44 +28 +10 +10 +28 +44 +82 +82 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +44 +28 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +02 +02 +04 +08 +10 +20 +40 +80 +FE +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +F0 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +F0 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +40 +20 +10 +10 +08 +08 +04 +02 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +F0 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +F0 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 7 +BITMAP +10 +28 +44 +82 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 1 0 -2 +BITMAP +FE +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 4 2 7 +BITMAP +80 +40 +20 +10 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3C +02 +02 +3E +C2 +46 +3E +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +FC +82 +82 +82 +82 +84 +F8 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +7C +80 +80 +80 +82 +44 +38 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +02 +02 +02 +3E +42 +82 +82 +82 +42 +3E +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3C +42 +82 +FC +80 +40 +3C +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +08 +14 +22 +20 +20 +F8 +20 +20 +20 +20 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +3C +42 +82 +82 +82 +42 +3E +02 +3C +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +FC +82 +82 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 9 2 0 +BITMAP +40 +00 +C0 +40 +40 +40 +40 +40 +F0 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 11 2 -2 +BITMAP +08 +00 +38 +08 +08 +08 +08 +08 +08 +88 +70 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +82 +84 +88 +F0 +88 +84 +82 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 9 2 0 +BITMAP +C0 +40 +40 +40 +40 +40 +40 +40 +F0 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +EC +92 +92 +92 +92 +92 +92 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +9C +A2 +C2 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +38 +44 +82 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +FC +82 +82 +82 +82 +82 +FC +80 +80 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +7E +82 +82 +82 +82 +82 +7E +02 +02 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +9C +A2 +C2 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3E +40 +80 +7C +02 +04 +F8 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +10 +FE +10 +10 +10 +10 +08 +06 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +82 +82 +82 +86 +8A +72 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +82 +82 +82 +44 +28 +10 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +82 +82 +82 +92 +54 +28 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +44 +28 +10 +28 +44 +82 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +82 +82 +82 +44 +28 +10 +10 +20 +C0 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +FE +04 +08 +10 +20 +40 +FE +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +30 +40 +40 +40 +40 +80 +80 +40 +40 +40 +40 +30 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 12 3 -1 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 12 2 -1 +BITMAP +80 +40 +40 +40 +40 +20 +20 +40 +40 +40 +40 +80 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 3 +BITMAP +22 +52 +92 +8C +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 10 3 0 +BITMAP +80 +80 +00 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -1 +BITMAP +10 +3C +D2 +D2 +D0 +D2 +3C +3C +10 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +1C +1C +22 +20 +F0 +F0 +20 +22 +DC +DC +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +D2 +2C +2C +C2 +2C +D2 +D2 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +C2 +C2 +2C +FE +10 +10 +FE +10 +10 +10 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 10 3 0 +BITMAP +80 +80 +80 +80 +00 +00 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 11 2 0 +BITMAP +78 +80 +80 +70 +88 +88 +88 +70 +08 +F0 +F0 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 1 2 10 +BITMAP +B0 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 8 10 0 0 +BITMAP +3E +3E +C1 +DD +D1 +D1 +DD +C1 +3E +3E +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +70 +B0 +70 +70 +00 +F0 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +12 +2C +2C +D0 +2C +12 +12 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 2 +BITMAP +FE +FE +02 +02 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 2 2 4 +BITMAP +F0 +F0 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 8 10 0 0 +BITMAP +3E +3E +C1 +DD +D1 +D1 +D1 +C1 +3E +3E +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 1 0 10 +BITMAP +FE +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 5 2 7 +BITMAP +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +10 +FE +10 +10 +10 +00 +FE +FE +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +40 +B0 +30 +30 +40 +F0 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +C0 +30 +40 +40 +30 +C0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 4 2 7 +BITMAP +30 +40 +40 +80 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +C2 +C2 +C2 +C2 +CE +F2 +F2 +C0 +C0 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +3E +F2 +F2 +F2 +F2 +32 +32 +12 +12 +12 +12 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 3 3 4 +BITMAP +E0 +E0 +E0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 2 2 -2 +BITMAP +30 +C0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +40 +C0 +40 +40 +40 +F0 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 7 2 7 +BITMAP +40 +40 +B0 +40 +00 +00 +F0 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +D0 +2C +2C +12 +2C +D0 +D0 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +E0 +22 +2C +2C +30 +2C +DC +DC +2C +3E +0C +0C +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +E0 +22 +2C +2C +30 +2C +D2 +D2 +02 +0C +1E +1E +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +E0 +E0 +10 +22 +1C +1C +F0 +2C +DC +DC +2C +3E +0C +0C +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +00 +10 +10 +10 +20 +C2 +3C +3C +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +32 +32 +DC +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +10 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +3E +3E +D0 +D0 +FC +FC +D0 +D0 +DE +DE +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -2 +BITMAP +3C +3C +C2 +C0 +C0 +C0 +C0 +C2 +3C +3C +0C +30 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 14 2 0 +BITMAP +80 +80 +40 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 14 2 0 +BITMAP +30 +30 +40 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 14 2 0 +BITMAP +40 +40 +B0 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 0 +BITMAP +B0 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +3C +3C +22 +22 +F2 +F2 +22 +22 +3C +3C +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +32 +32 +DC +00 +C2 +C2 +C2 +E2 +D2 +D2 +CE +C2 +C2 +C2 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +32 +32 +DC +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 6 0 2 +BITMAP +C2 +2C +10 +10 +2C +C2 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -1 +BITMAP +02 +3C +3C +CE +D2 +D2 +D2 +D2 +E2 +3C +3C +C0 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +C2 +C2 +C2 +2C +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 10 2 0 +BITMAP +80 +80 +F0 +88 +88 +88 +88 +F0 +80 +80 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +3C +3C +C2 +CC +D0 +D0 +CC +C2 +DC +DC +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +32 +DC +DC +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +10 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3C +12 +12 +3C +D0 +3E +3E +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +3C +C2 +C2 +C0 +C2 +3C +3C +0C +30 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 11 2 0 +BITMAP +80 +40 +40 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 11 2 0 +BITMAP +30 +40 +40 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 11 2 0 +BITMAP +40 +B0 +B0 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 10 2 0 +BITMAP +B0 +B0 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +10 +2C +2C +02 +3E +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +32 +DC +DC +00 +DC +E2 +E2 +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +32 +DC +DC +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 6 0 2 +BITMAP +10 +00 +FE +FE +00 +10 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3E +CE +CE +D2 +E2 +FC +FC +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 13 0 -2 +BITMAP +0C +10 +10 +00 +C2 +C2 +C2 +C2 +2C +10 +10 +20 +C0 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -2 +BITMAP +C0 +C0 +C0 +FC +C2 +C2 +C2 +C2 +FC +FC +C0 +C0 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -2 +BITMAP +2C +2C +00 +C2 +C2 +C2 +C2 +2C +10 +10 +20 +C0 +ENDCHAR +ENDFONT diff --git a/buildroot/tests/STM32F103RET6_creality b/buildroot/tests/STM32F103RET6_creality index ad88225807c0..a941eb906af2 100755 --- a/buildroot/tests/STM32F103RET6_creality +++ b/buildroot/tests/STM32F103RET6_creality @@ -13,11 +13,9 @@ use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_enable MARLIN_DEV_MODE BUFFER_MONITORING exec_test $1 $2 "Ender 3 v2 with CrealityUI" "$3" -use_example_configs "Creality/Ender-3 V2/CrealityUI" -opt_disable CLASSIC_JERK +use_example_configs "Creality/Ender-3 V2/MarlinUI" opt_add SDCARD_EEPROM_EMULATION -opt_set TEMP_SENSOR_BED 0 -exec_test $1 $2 "Ender 3 v2, SD EEPROM, no CLASSIC_JERK, no Bed" "$3" +exec_test $1 $2 "Ender 3 v2 with MarlinUI" "$3" restore_configs opt_set MOTHERBOARD BOARD_CREALITY_V452 SERIAL_PORT 1 diff --git a/ini/features.ini b/ini/features.ini index 2d2363ccd181..fa7d1519389e 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -45,6 +45,7 @@ I2C_EEPROM = src_filter=+ DWIN_CREALITY_LCD = src_filter=+ +DWIN_MARLINUI_.+ = src_filter=+ HAS_GRAPHICAL_TFT = src_filter=+ IS_TFTGLCD_PANEL = src_filter=+ HAS_TOUCH_BUTTONS = src_filter=+ diff --git a/platformio.ini b/platformio.ini index db4d12ea7fb3..9ee1e76a5b14 100644 --- a/platformio.ini +++ b/platformio.ini @@ -48,7 +48,8 @@ extra_scripts = post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py lib_deps = default_src_filter = + - - + - - - - - - - + - - - - - + - - - - - - - - From 104de60d0bbad1233455591842bc67cb4f006f30 Mon Sep 17 00:00:00 2001 From: Chris Pepper Date: Sun, 22 Aug 2021 22:47:37 +0100 Subject: [PATCH 245/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20LPC176x=20M43=20Pi?= =?UTF-8?q?ns=20Debugging=20(#22611)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/pinsDebug.h | 1 + Marlin/src/HAL/DUE/pinsDebug.h | 1 + Marlin/src/HAL/LINUX/pinsDebug.h | 1 + Marlin/src/HAL/LPC1768/pinsDebug.h | 7 +++---- Marlin/src/HAL/NATIVE_SIM/pinsDebug.h | 1 + Marlin/src/HAL/SAMD51/pinsDebug.h | 1 + Marlin/src/HAL/STM32/pinsDebug.h | 1 + Marlin/src/HAL/STM32F1/pinsDebug.h | 1 + Marlin/src/HAL/TEENSY40_41/pinsDebug.h | 1 + Marlin/src/pins/pinsDebug.h | 15 ++++----------- Marlin/src/pins/pinsDebug_list.h | 10 +++++++--- 11 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/src/HAL/AVR/pinsDebug.h index 55fddb05b862..6923e1f902f3 100644 --- a/Marlin/src/HAL/AVR/pinsDebug.h +++ b/Marlin/src/HAL/AVR/pinsDebug.h @@ -393,3 +393,4 @@ static void pwm_details(uint8_t pin) { #endif #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) diff --git a/Marlin/src/HAL/DUE/pinsDebug.h b/Marlin/src/HAL/DUE/pinsDebug.h index a99ca8ecce90..02a5e6646f38 100644 --- a/Marlin/src/HAL/DUE/pinsDebug.h +++ b/Marlin/src/HAL/DUE/pinsDebug.h @@ -64,6 +64,7 @@ #define PRINT_PORT(p) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define GET_ARRAY_PIN(p) pin_array[p].pin #define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0) diff --git a/Marlin/src/HAL/LINUX/pinsDebug.h b/Marlin/src/HAL/LINUX/pinsDebug.h index 8f8543ef5984..9803c5d362e1 100644 --- a/Marlin/src/HAL/LINUX/pinsDebug.h +++ b/Marlin/src/HAL/LINUX/pinsDebug.h @@ -34,6 +34,7 @@ #define GET_ARRAY_PIN(p) pin_array[p].pin #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin // active ADC function/mode/code values for PINSEL registers diff --git a/Marlin/src/HAL/LPC1768/pinsDebug.h b/Marlin/src/HAL/LPC1768/pinsDebug.h index f80551604fa1..c622a2622ed1 100644 --- a/Marlin/src/HAL/LPC1768/pinsDebug.h +++ b/Marlin/src/HAL/LPC1768/pinsDebug.h @@ -33,7 +33,8 @@ #define PRINT_PORT(p) #define GET_ARRAY_PIN(p) pin_array[p].pin #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities @@ -48,6 +49,4 @@ bool GET_PINMODE(const pin_t pin) { return LPC176x::gpio_direction(pin); } -bool GET_ARRAY_IS_DIGITAL(const pin_t pin) { - return (!LPC176x::pin_has_adc(pin) || !LPC176x::pin_adc_enabled(pin)); -} +#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital) diff --git a/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h index 7ba14574d0c7..7e5049259855 100644 --- a/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h +++ b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h @@ -36,6 +36,7 @@ #define GET_ARRAY_PIN(p) pin_array[p].pin #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin // active ADC function/mode/code values for PINSEL registers diff --git a/Marlin/src/HAL/SAMD51/pinsDebug.h b/Marlin/src/HAL/SAMD51/pinsDebug.h index 81376db79add..5c86d0c07179 100644 --- a/Marlin/src/HAL/SAMD51/pinsDebug.h +++ b/Marlin/src/HAL/SAMD51/pinsDebug.h @@ -26,6 +26,7 @@ #define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define GET_ARRAY_PIN(p) pin_array[p].pin #define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL) diff --git a/Marlin/src/HAL/STM32/pinsDebug.h b/Marlin/src/HAL/STM32/pinsDebug.h index 048f788e3d08..ff671a6ebf3f 100644 --- a/Marlin/src/HAL/STM32/pinsDebug.h +++ b/Marlin/src/HAL/STM32/pinsDebug.h @@ -109,6 +109,7 @@ const XrefInfo pin_xref[] PROGMEM = { #define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL) #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads #define PRINT_PIN(Q) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define PRINT_PORT(ANUM) port_print(ANUM) #define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1 // will report analog pin number in the print port routine #define GET_PIN_MAP_PIN_M43(Index) pin_xref[Index].Ard_num diff --git a/Marlin/src/HAL/STM32F1/pinsDebug.h b/Marlin/src/HAL/STM32F1/pinsDebug.h index b018a0fc8c0a..dcf3a5113871 100644 --- a/Marlin/src/HAL/STM32F1/pinsDebug.h +++ b/Marlin/src/HAL/STM32F1/pinsDebug.h @@ -41,6 +41,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS]; #define pwm_status(pin) PWM_PIN(pin) #define digitalRead_mod(p) extDigitalRead(p) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define PRINT_PORT(p) print_port(p) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 21 // space needed to be pretty if not first name assigned to a pin diff --git a/Marlin/src/HAL/TEENSY40_41/pinsDebug.h b/Marlin/src/HAL/TEENSY40_41/pinsDebug.h index 4ad62d00fea5..197cc6f1b243 100644 --- a/Marlin/src/HAL/TEENSY40_41/pinsDebug.h +++ b/Marlin/src/HAL/TEENSY40_41/pinsDebug.h @@ -30,6 +30,7 @@ #define PRINT_PORT(p) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define GET_ARRAY_PIN(p) pin_array[p].pin #define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0) diff --git a/Marlin/src/pins/pinsDebug.h b/Marlin/src/pins/pinsDebug.h index 0c5523296976..e29067268df4 100644 --- a/Marlin/src/pins/pinsDebug.h +++ b/Marlin/src/pins/pinsDebug.h @@ -203,11 +203,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e SERIAL_ECHOPGM("PIN: "); PRINT_PIN(pin); PRINT_PORT(pin); - if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) { - sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number - SERIAL_ECHO(buffer); - } - else SERIAL_ECHO_SP(8); // add padding if not an analog pin + if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) PRINT_PIN_ANALOG(pin); // analog pin number + else SERIAL_ECHO_SP(8); // add padding if not an analog pin } else { SERIAL_CHAR('.'); @@ -254,12 +251,8 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e SERIAL_ECHOPGM("PIN: "); PRINT_PIN(pin); PRINT_PORT(pin); - if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) { - sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number - SERIAL_ECHO(buffer); - } - else - SERIAL_ECHO_SP(8); // add padding if not an analog pin + if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) PRINT_PIN_ANALOG(pin); // analog pin number + else SERIAL_ECHO_SP(8); // add padding if not an analog pin SERIAL_ECHOPGM(""); if (extended) { diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 78ee71749d11..501ae921c217 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -24,14 +24,18 @@ // Pin lists 1.1.x and 2.0.x synchronized 2018-02-17 -#line 28 // set __LINE__ to a known value for both passes +#if TARGET_LPC1768 + #define ANALOG_OK(PN) ((PN) == P0_02 || (PN) == P0_03 || (PN) == P0_23 || (PN) == P0_24 || (PN) == P0_25 || (PN) == P0_26 || (PN) == P1_30 || (PN) == P1_31) +#else + #define ANALOG_OK(PN) ((PN) >= 0 && (PN) < NUM_ANALOG_INPUTS) +#endif + +#line 34 // set __LINE__ to a known value for both passes // // Analog Pin Assignments // -#define ANALOG_OK(PN) ((PN) >= 0 && (PN) < NUM_ANALOG_INPUTS) - #if defined(EXT_AUX_A0) && ANALOG_OK(EXT_AUX_A0) REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) #endif From 2c45ac3c1b2acb1f98a92dd80160c560d08600a8 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 23 Aug 2021 00:53:22 +0000 Subject: [PATCH 246/323] [cron] Bump distribution date (2021-08-23) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 21efff8495c6..ec3d43c4a5a1 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-21" +//#define STRING_DISTRIBUTION_DATE "2021-08-23" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 6bbcca1457fe..05aec3fa8b2f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-21" + #define STRING_DISTRIBUTION_DATE "2021-08-23" #endif /** From 9c51cf3491623a7492e6c6d1e20218da69e3db72 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 24 Aug 2021 00:56:33 +0000 Subject: [PATCH 247/323] [cron] Bump distribution date (2021-08-24) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ec3d43c4a5a1..ebd1fc9f9724 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-23" +//#define STRING_DISTRIBUTION_DATE "2021-08-24" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 05aec3fa8b2f..6709b5b46ba5 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-23" + #define STRING_DISTRIBUTION_DATE "2021-08-24" #endif /** From 7974dcd2aaae741e37d6e2e230492f2ba258ffb4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 23 Aug 2021 19:42:15 -0500 Subject: [PATCH 248/323] =?UTF-8?q?=F0=9F=8E=A8=20Define=20FYSETC=20S6=20a?= =?UTF-8?q?nd=20TH3D=20EZBoard=20EXP1/2=20pins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 97 +++++++++++---- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 126 ++++++++++++-------- 2 files changed, 145 insertions(+), 78 deletions(-) diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index e45f5dbd95e4..22a6613329dd 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -27,20 +27,30 @@ #include "env_validate.h" +//#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config + #define BOARD_INFO_NAME "TH3D EZBoard" #define BOARD_WEBSITE_URL "th3dstudio.com" // // Servos // -#define SERVO0_PIN P2_04 +#if ENABLED(V3_EZABL_ON_SERVO) + #define SERVO0_PIN -1 +#else + #define SERVO0_PIN P2_04 +#endif // // Limit Switches // #define X_STOP_PIN P1_24 #define Y_STOP_PIN P1_25 -#define Z_STOP_PIN P1_26 +#if ENABLED(V3_EZABL_ON_SERVO) + #define Z_STOP_PIN P2_04 +#else + #define Z_STOP_PIN P1_26 +#endif // // Filament Runout Sensor @@ -103,13 +113,6 @@ #endif #define TEMP_BED_PIN P0_24_A1 // Analog Input P0_24 -#define TEMP_1_PIN P0_25_A2 // Analog Input P0_25 - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILWIDTH_PIN P0_26_A3 // Analog Input P0_26 -#else - #define TEMP_2_PIN P0_26_A3 // Analog Input P0_26 -#endif // // Heaters / Fans @@ -141,6 +144,7 @@ #define SDCARD_CONNECTION ONBOARD +//#define SD_DETECT_PIN P0_25 // SD_CD #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 @@ -152,14 +156,14 @@ // /** - * _____ - * 5V | · · | GND - * (LCD_EN) P0_18 | · · | P0_16 (LCD_RS) - * (LCD_D4) P0_15 | · · P3_25 (BTN_EN2) - * (RESET) P2_11 | · · | P3_26 (BTN_EN1) - * (BTN_ENC) P1_30 | · · | P1_31 (BEEPER) - * ----- - * EXP1 + * ______ + * 5V | 1 2 | GND + * P0_18 | 3 4 | P0_16 + * P0_15 | 5 6 P3_25 + * P2_11 | 7 8 | P3_26 + * P1_30 | 9 10 | P1_31 + * ------ + * EXP1 * * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. @@ -167,16 +171,57 @@ * A remote SD card is currently not supported because the pins routed to the EXP2 * connector are shared with the onboard SD card. */ +#define EXP1_03_PIN P0_18 +#define EXP1_04_PIN P0_16 +#define EXP1_05_PIN P0_15 +#define EXP1_06_PIN P3_25 +#define EXP1_07_PIN P2_11 +#define EXP1_08_PIN P3_26 +#define EXP1_09_PIN P1_30 +#define EXP1_10_PIN P1_31 #if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN P1_31 - #define BTN_EN1 P3_26 - #define BTN_EN2 P3_25 - #define BTN_ENC P1_30 - #define LCD_PINS_RS P0_16 - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 - #define KILL_PIN P2_11 + /** ______ + * 5V | 1 2 | GND + * LCD_EN | 3 4 | LCD_RS + * LCD_D4 | 5 6 EN2 + * KILL | 7 8 | EN1 + * ENC | 9 10 | BEEPER + * ------ + */ + #define BEEPER_PIN EXP1_10_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define KILL_PIN EXP1_07_PIN + +#elif ENABLED(MKS_MINI_12864) + /** ______ + * 5V | 1 2 | GND + * SPI-MOSI | 3 4 | SPI-CS + * A0 | 5 6 EN2 + * -- | 7 8 | EN1 + * ENC | 9 10 | SPI-SCK + * ------ + */ + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 EXP1_05_PIN + #define DOGLCD_SCK EXP1_10_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define LCD_CONTRAST_INIT 160 + #define LCD_CONTRAST_MIN 120 + #define LCD_CONTRAST_MAX 180 + #define FORCE_SOFT_SPI + #define LCD_BACKLIGHT_PIN -1 + #elif HAS_WIRED_LCD - #error "Only the CR10_STOCKDISPLAY is supported with TH3D EZBoard." + + #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard." + +#endif + +#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864) + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index c9f528b87bcc..9de62d372a1b 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -184,13 +184,6 @@ #define FAN1_PIN PB1 #define FAN2_PIN PB2 -// -// SPI -// -#define SD_SCK_PIN PA5 -#define SD_MISO_PIN PA6 -#define SD_MOSI_PIN PA7 - // // Misc. Functions // @@ -198,84 +191,119 @@ //#define PS_ON_PIN PE11 //#define KILL_PIN PC5 -#define SDSS PA4 -#define SD_DETECT_PIN PB10 +/** + * ______ ______ + * 5V | 1 2 | GND 5V | 1 2 | GND + * PD1 | 3 4 | PD0 RESET | 3 4 | PB10 + * PC12 | 5 6 PC10 PA7 | 5 6 PC7 + * PD2 | 7 8 | PC11 PA4 | 7 8 | PC6 + * PA8 | 9 10 | PC9 PA5 | 9 10 | PA6 + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PD1 +#define EXP1_04_PIN PD0 +#define EXP1_05_PIN PC12 +#define EXP1_06_PIN PC10 +#define EXP1_07_PIN PD2 +#define EXP1_08_PIN PC11 +#define EXP1_09_PIN PA8 +#define EXP1_10_PIN PC9 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB10 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PC7 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PC6 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +// +// SPI / SD Card +// +#define SD_SCK_PIN EXP2_09_PIN +#define SD_MISO_PIN EXP2_10_PIN +#define SD_MOSI_PIN EXP2_05_PIN + +#define SDSS EXP2_07_PIN +#define SD_DETECT_PIN EXP2_04_PIN // // LCD / Controller // #if ENABLED(FYSETC_242_OLED_12864) - #define BTN_EN1 PC9 - #define BTN_EN2 PD1 - #define BTN_ENC PA8 + #define BTN_EN1 EXP1_10_PIN + #define BTN_EN2 EXP1_03_PIN + #define BTN_ENC EXP1_09_PIN - #define BEEPER_PIN PC6 + #define BEEPER_PIN EXP2_08_PIN - #define LCD_PINS_DC PC12 - #define LCD_PINS_RS PC7 // LCD_RST - #define DOGLCD_CS PD2 - #define DOGLCD_MOSI PC10 - #define DOGLCD_SCK PC11 + #define LCD_PINS_DC EXP1_05_PIN + #define LCD_PINS_RS EXP2_06_PIN // LCD_RST + #define DOGLCD_CS EXP1_07_PIN + #define DOGLCD_MOSI EXP1_06_PIN + #define DOGLCD_SCK EXP1_08_PIN #define DOGLCD_A0 LCD_PINS_DC #define FORCE_SOFT_SPI #define KILL_PIN -1 // NC - #define NEOPIXEL_PIN PD0 + #define NEOPIXEL_PIN EXP1_04_PIN #elif HAS_WIRED_LCD - #define BEEPER_PIN PC9 - #define BTN_ENC PA8 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS PD0 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 PC11 - #define BTN_EN2 PC10 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE PD1 - #define LCD_PINS_D4 PC12 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #else - #define LCD_PINS_RS PD2 + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 PC6 - #define BTN_EN2 PC7 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_SDSS PA4 + #define LCD_SDSS EXP2_07_PIN - #define LCD_PINS_ENABLE PC11 - #define LCD_PINS_D4 PC10 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) // See https://wiki.fysetc.com/Mini12864_Panel - #define DOGLCD_CS PC11 - #define DOGLCD_A0 PD2 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN #if ENABLED(FYSETC_GENERIC_12864_1_1) - #define LCD_BACKLIGHT_PIN PD0 + #define LCD_BACKLIGHT_PIN EXP1_04_PIN #endif - #define LCD_RESET_PIN PC10 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN PC12 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN PD0 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN PD1 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN PC12 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 PC12 - #define LCD_PINS_D6 PD0 - #define LCD_PINS_D7 PD1 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif @@ -287,15 +315,9 @@ // Alter timing for graphical display #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) - #endif + #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(640) #endif #ifndef RGB_LED_R_PIN From 8cf7dc960fbc78b7c9339d30372289d8c1bb0303 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Aug 2021 14:55:12 -0500 Subject: [PATCH 249/323] =?UTF-8?q?=E2=9C=A8=20New=20board=20TH3D=5FEZBOAR?= =?UTF-8?q?D=5FLITE=5FV2=20(#22621)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 2 + .../pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h | 264 ++++++++++ .../PeripheralPins.c | 314 +++++++++++ .../MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h | 50 ++ .../hal_conf_extra.h | 495 ++++++++++++++++++ .../MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld | 203 +++++++ .../MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp | 177 +++++++ .../MARLIN_TH3D_EZBOARD_LITE_V2/variant.h | 148 ++++++ ini/stm32f4.ini | 14 + 10 files changed, 1668 insertions(+) create mode 100644 Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h create mode 100755 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 8e84f0b9673d..6eeed447f727 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -393,6 +393,7 @@ #define BOARD_ANET_ET4 4229 // ANET ET4 V1.x (STM32F407VGT6) #define BOARD_ANET_ET4P 4230 // ANET ET4P V1.x (STM32F407VGT6) #define BOARD_FYSETC_CHEETAH_V20 4231 // FYSETC Cheetah V2.0 +#define BOARD_TH3D_EZBOARD_LITE_V2 4232 // TH3D EZBoard Lite v2.0 // // ARM Cortex M7 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 0655580f0f38..1c3e1ac7cf8f 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -641,6 +641,8 @@ #include "stm32f4/pins_FYSETC_CHEETAH_V20.h" // STM32F4 env:FYSETC_CHEETAH_V20 #elif MB(MKS_MONSTER8) #include "stm32f4/pins_MKS_MONSTER8.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc +#elif MB(TH3D_EZBOARD_LITE_V2) + #include "stm32f4/pins_TH3D_EZBOARD_LITE_V2.h" // STM32F4 env:TH3D_EZBoard_Lite_V2 // // ARM Cortex M7 diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h new file mode 100644 index 000000000000..c04341a24352 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h @@ -0,0 +1,264 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#define BOARD_INFO_NAME "TH3D EZBoard Lite V2" +#define BOARD_WEBSITE_URL "th3dstudio.com" + +//#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config + +#define DISABLE_JTAGSWD // Disabling J-tag and Debug via SWD + +// Onboard I2C EEPROM +#if NO_EEPROM_SELECTED + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB + #define I2C_SCL_PIN PB6 + #define I2C_SDA_PIN PB7 + #undef NO_EEPROM_SELECTED +#endif + +// +// Neopixels +// +#define NEOPIXEL_PIN PA8 + +// +// Servos +// +#if ENABLED(V3_EZABL_ON_SERVO) + #define SERVO0_PIN -1 +#else + #define SERVO0_PIN PA2 +#endif + +// +// Limit Switches +// +#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + // Sensorless homing pins + #if ENABLED(X_AXIS_SENSORLESS_HOMING) + #define X_STOP_PIN PB4 + #else + #define X_STOP_PIN PC1 + #endif + + #if ENABLED(Y_AXIS_SENSORLESS_HOMING) + #define Y_STOP_PIN PB9 + #else + #define Y_STOP_PIN PC2 + #endif + + //#define Z_STOP_PIN PC15 // Don't use sensorless homing on Z! + + #define E_STOP_PIN PB10 +#else + // Standard Endstop Pins + #define X_STOP_PIN PC1 + #define Y_STOP_PIN PC2 +#endif + +#if ENABLED(V3_EZABL_ON_SERVO) + #define Z_STOP_PIN PA2 +#else + #define Z_STOP_PIN PC3 +#endif + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PC0 +#endif + +// +// Steppers +// +#define X_STEP_PIN PB3 +#define X_DIR_PIN PD2 +#define X_ENABLE_PIN PB5 + +#define Y_STEP_PIN PB8 +#define Y_DIR_PIN PC13 +#define Y_ENABLE_PIN PC12 + +#define Z_STEP_PIN PA3 +#define Z_DIR_PIN PB1 +#define Z_ENABLE_PIN PC14 + +#define E0_STEP_PIN PA15 +#define E0_DIR_PIN PB11 +#define E0_ENABLE_PIN PB2 + +#if HAS_TMC_UART + // + // Hardware Serial on UART4, Single Wire, 0-3 addresses + // + #define X_SERIAL_TX_PIN PC10 + #define X_SERIAL_RX_PIN PC11 + + #define Y_SERIAL_TX_PIN PC10 + #define Y_SERIAL_RX_PIN PC11 + + #define Z_SERIAL_TX_PIN PC10 + #define Z_SERIAL_RX_PIN PC11 + + #define E0_SERIAL_TX_PIN PC10 + #define E0_SERIAL_RX_PIN PC11 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temp Sensors +// 3.3V max when defined as an Analog Input! +// +#define TEMP_0_PIN PA1 // Analog Input PA1 +#define TEMP_BED_PIN PA0 // Analog Input PA0 + +// +// Heaters / Fans +// +#define HEATER_BED_PIN PC9 +#define HEATER_0_PIN PC8 +#ifndef FAN_PIN + #define FAN_PIN PC6 +#endif +#define FAN1_PIN PC7 + +// +// Auto fans +// +#define AUTO_FAN_PIN PC7 +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E1_AUTO_FAN_PIN + #define E1_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E2_AUTO_FAN_PIN + #define E2_AUTO_FAN_PIN AUTO_FAN_PIN +#endif + +// +// SD Card +// + +#define SDCARD_CONNECTION ONBOARD + +//#define SOFTWARE_SPI +#define CUSTOM_SPI_PINS +#define SDSS PA4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN SDSS +//#define SD_DETECT_PIN -1 +//#define ONBOARD_SD_CS_PIN SDSS + +// +// LCD / Controller +// + +/** + * ______ + * 5V | 1 2 | GND + * PB15 | 3 4 | PB12 + * PB13 | 5 6 PC5 + * ---- | 7 8 | PC4 + * PB0 | 9 10 | PA14 + * ------ + * EXP1 + * + * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be + * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. + * + * A remote SD card is currently not supported because the pins routed to the EXP2 + * connector are shared with the onboard SD card. + */ +#define EXP1_03_PIN PB15 +#define EXP1_04_PIN PB12 +#define EXP1_05_PIN PB13 +#define EXP1_06_PIN PC5 +//#define EXP1_07_PIN -1 +#define EXP1_08_PIN PC4 +#define EXP1_09_PIN PB0 +#define EXP1_10_PIN PA14 + +#if ENABLED(CR10_STOCKDISPLAY) + /** ______ + * 5V | 1 2 | GND + * LCD_EN | 3 4 | LCD_RS + * LCD_D4 | 5 6 EN2 + * RESET | 7 8 | EN1 + * ENC | 9 10 | BEEPER + * ------ + */ + #ifdef DISABLE_JTAGSWD + #define BEEPER_PIN EXP1_10_PIN // Not connected in dev board + #endif + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + //#define KILL_PIN -1 + + #undef BOARD_ST7920_DELAY_1 + #undef BOARD_ST7920_DELAY_2 + #undef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_1 DELAY_NS(600) + #define BOARD_ST7920_DELAY_2 DELAY_NS(750) + #define BOARD_ST7920_DELAY_3 DELAY_NS(750) + +#elif ENABLED(MKS_MINI_12864) + /** ______ + * 5V | 1 2 | GND + * SPI-MOSI | 3 4 | SPI-CS + * A0 | 5 6 EN2 + * -- | 7 8 | EN1 + * ENC | 9 10 | SPI-SCK + * ------ + */ + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 EXP1_05_PIN + #define DOGLCD_SCK EXP1_10_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define LCD_CONTRAST_INIT 160 + #define LCD_CONTRAST_MIN 120 + #define LCD_CONTRAST_MAX 180 + #define FORCE_SOFT_SPI + #define LCD_BACKLIGHT_PIN -1 + +#elif HAS_WIRED_LCD + + #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard V2." + +#endif + +#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864) + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c new file mode 100644 index 000000000000..03d75bbfa823 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c @@ -0,0 +1,314 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + * Automatically generated from STM32F405RGTx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 TEMP_BED + //{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 TEMP_BED + //{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 TEMP_BED + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 TEMP_0 + //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 SERVO0 + //{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + //{PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 Z_STEP + //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + //{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 SPI-SEL ONBOARD SD + //{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + //{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 SPI-SCK + //{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + //{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 SPI-MISO + //{PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + //{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 SPI-MOSI + //{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + //{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 BTN_ENC + //{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + //{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 I2C1 EEPROM + //{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + //{PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 FIL_RUNOUT + //{PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + //{PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + //{PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 X_STOP + //{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + //{PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + //{PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 Y_STOP + //{PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + //{PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + //{PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 Z_STOP + //{PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + //{PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + //{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 BTN_EN1 + //{PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + //{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 BTN_EN2 + //{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { + //{PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + //{PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // I2C1 SDA (EEPROM) + //{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // YDIAG + //{PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // E0_DIR + //{PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // BED / HEATER1 + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + //{PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // NEOPIXEL + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // I2C1 SCL (EEPROM) + //{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Y_STEP + //{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // EDIAG + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 TEMP_BED + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 TEMP_0 + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 SERVO0 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 Z_STEP + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 SPI-SCK + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 SPI-MISO + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N SPI-MOSI + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 NEOPIXEL + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 SERIAL_TX (HEADER) + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 SERIAL_RX (HEADER) + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 USB H + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 E0_STEP + + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N BTN_ENC + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N Z_DIR + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 X_STEP + //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 XDIAG + //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 X_ENABLE + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 I2C1_SCL (EEPROM) + //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 I2C1_SDA (EEPROM) + + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 Y_STEP + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 YDIAG + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 EDIAG + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 E0_DIR + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N LCD_PINS_D4 + + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N LCD-MISO + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N LCD_PINS_ENABLE + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 + + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 FAN + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 FAN1 / AUTO_FAN + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 HEATER0 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 BED / HEATER1 + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + //{PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // TEMP_BED + //{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // SERVO0 + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // SERIAL_TX (HEADER) + //{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // I2C1_SCL (EEPROM) + //{PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // EDIAG + //{PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // FAN + {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // SERIAL_TX (TMC) + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // SERIAL_TX (TMC) + //{PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Y_ENABLE + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + //{PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // TEMP_0 + //{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Z_STEP + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // SERIAL_RX (HEADER) + //{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // I2C1 SDA (EEPROM) + //{PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // E_DIR + //{PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // FAN1 / AUTO_FAN + {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // SERIAL_RX (TMC) + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // SERIAL_RX (TMC) + //{PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // X_DIR + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + //{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // TEMP_0 + //{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB D + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // LCD-MISO + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + //{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // TEMP_BED / WKUP + //{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB H + //{PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // LCD-SCK + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 MOSI (SD) + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // X_ENABLE + //{PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 MOSI (LCD) + //{PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // Z_STOP + //{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // Y_ENABLE + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 MOSI (SD) + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // XDIAG + //{PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 MISO (LCD) + //{PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // Y_STOP + //{PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // SERIAL_RX (TMC) + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 CLK (SD) + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // X_STEP + //{PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // EDIAG + {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 SCK (LCD) + //{PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // SERIAL_TX (TMC) + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 CS (SD) + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // E0_STEP + //{PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // YDIAG + {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 CS (LCD) + {NC, NP, 0} +}; +#endif + +//*** No CAN *** + +//*** No ETHERNET *** + +//*** No QUADSPI *** + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB_OTG_FS[] = { + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF NEOPIXEL + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS SERIAL_TX (HEADER) + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID SERIAL_RX (HEADER) + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM USB H + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP USB D + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_USB_OTG_HS[] = { +#ifdef USE_USB_HS_IN_FS + //{PA_4, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF CS (SD) + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID CS (LCD) + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS LCD_PINS_D4 + //{PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM MISO (LCD) + //{PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP LCD_PINS_ENABLE +#else + //{PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 Z_STEP + //{PA_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_CK SPI-SCK + //{PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 BTN_ENC + //{PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 I2C1 (EEPROM) + //{PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 X_ENABLE + //{PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 EDIAG + //{PB_11, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D4 FAN + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 CS (LCD) + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 LCD_PINS_D4 + //{PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP FIL_RUNOUT + //{PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR Y_STOP + //{PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT Z_STOP +#endif /* USE_USB_HS_IN_FS */ + {NC, NP, 0} +}; +#endif + +//*** No SDIO *** diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h new file mode 100644 index 000000000000..24248859373b --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h @@ -0,0 +1,50 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_OTG_FS_SOF = PA_8, + USB_OTG_FS_VBUS = PA_9, + USB_OTG_FS_ID = PA_10, + USB_OTG_FS_DM = PA_11, + USB_OTG_FS_DP = PA_12, + USB_OTG_HS_ULPI_D0 = PA_3, + USB_OTG_HS_SOF = PA_4, + USB_OTG_HS_ULPI_CK = PA_5, + USB_OTG_HS_ULPI_D1 = PB_0, + USB_OTG_HS_ULPI_D2 = PB_1, + USB_OTG_HS_ULPI_D7 = PB_5, + USB_OTG_HS_ULPI_D3 = PB_10, + USB_OTG_HS_ULPI_D4 = PB_11, + USB_OTG_HS_ID = PB_12, + USB_OTG_HS_ULPI_D5 = PB_12, + USB_OTG_HS_ULPI_D6 = PB_13, + USB_OTG_HS_VBUS = PB_13, + USB_OTG_HS_DM = PB_14, + USB_OTG_HS_DP = PB_15, + USB_OTG_HS_ULPI_STP = PC_0, + USB_OTG_HS_ULPI_DIR = PC_2, + USB_OTG_HS_ULPI_NXT = PC_3, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h new file mode 100755 index 000000000000..8c46edb50e6e --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h @@ -0,0 +1,495 @@ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf_template.h + * @author MCD Application Team + * @brief HAL configuration template file. + * This file should be copied to the application folder and renamed + * to stm32f4xx_hal_conf.h. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_H +#define __STM32F4xx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CRC_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +//#define HAL_EXTI_MODULE_ENABLED +//#define HAL_I2C_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_SD_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default +#define HAL_USART_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) + #define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) + #define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) + #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) + #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) + #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U +#define INSTRUCTION_CACHE_ENABLE 1U +#define DATA_CACHE_ENABLE 1U + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +//#define USE_FULL_ASSERT 1U + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ + +/* DP83848 PHY Address*/ +#define DP83848_PHY_ADDRESS 0x01U +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x0010) /*!< PHY status register Offset */ +#define PHY_MICR ((uint16_t)0x0011) /*!< MII Interrupt Control Register */ +#define PHY_MISR ((uint16_t)0x0012) /*!< MII Interrupt Status and Misc. Control Register */ + +#define PHY_LINK_STATUS ((uint16_t)0x0001) /*!< PHY Link mask */ +#define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ + +#define PHY_MICR_INT_EN ((uint16_t)0x0002) /*!< PHY Enable interrupts */ +#define PHY_MICR_INT_OE ((uint16_t)0x0001) /*!< PHY Enable output interrupt events */ + +#define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /*!< Enable Interrupt on change of link status */ +#define PHY_LINK_INTERRUPT ((uint16_t)0x2000) /*!< PHY link status interrupt mask */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ + +#define USE_SPI_CRC 0U + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED + #include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED + #include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED + #include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED + #include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED + #include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED + #include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED + #include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED + #include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED + #include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED + #include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED + #include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED + #include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED + #include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED + #include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED + #include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED + #include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED + #include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED + #include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED + #include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED + #include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED + #include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED + #include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED + #include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED + #include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld new file mode 100644 index 000000000000..e07c5e4acef9 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld @@ -0,0 +1,203 @@ +/* +***************************************************************************** +** +** File : LinkerScript.ld +** +** +** Abstract : Linker script for STM32F4x5RGTx series +** 1024Kbytes FLASH and 192Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed “as is,” without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2019 STMicroelectronics

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of STMicroelectronics nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K +FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text ALIGN(8): + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata ALIGN(4): + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + _siccmram = LOADADDR(.ccmram); + + /* CCM-RAM section + * + * IMPORTANT NOTE! + * If initialized variables will be placed in this section, + * the startup code needs to be modified to copy the init-values. + */ + .ccmram : + { + . = ALIGN(4); + _sccmram = .; /* create a global symbol at ccmram start */ + *(.ccmram) + *(.ccmram*) + + . = ALIGN(4); + _eccmram = .; /* create a global symbol at ccmram end */ + } >CCMRAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp new file mode 100644 index 000000000000..034f685dcecd --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp @@ -0,0 +1,177 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, // Digital pin 0 + PA_1, // Digital pin 1 + PA_2, // Digital pin 2 + PA_3, // Digital pin 3 + PA_4, // Digital pin 4 + PA_5, // Digital pin 5 + PA_6, // Digital pin 6 + PA_7, // Digital pin 7 + PA_8, // Digital pin 8 + PA_9, // Digital pin 9 + PA_10, // Digital pin 10 + PA_11, // Digital pin 11 + PA_12, // Digital pin 12 + PA_13, // Digital pin 13 + PA_14, // Digital pin 14 + PA_15, // Digital pin 15 + + PB_0, // Digital pin 16 + PB_1, // Digital pin 17 + PB_2, // Digital pin 18 + PB_3, // Digital pin 19 + PB_4, // Digital pin 20 + PB_5, // Digital pin 21 + PB_6, // Digital pin 22 + PB_7, // Digital pin 23 + PB_8, // Digital pin 24 + PB_9, // Digital pin 25 + PB_10, // Digital pin 26 + PB_11, // Digital pin 27 + PB_12, // Digital pin 28 + PB_13, // Digital pin 29 + PB_14, // Digital pin 30 + PB_15, // Digital pin 31 + + PC_0, // Digital pin 32 + PC_1, // Digital pin 33 + PC_2, // Digital pin 34 + PC_3, // Digital pin 35 + PC_4, // Digital pin 36 + PC_5, // Digital pin 37 + PC_6, // Digital pin 38 + PC_7, // Digital pin 39 + PC_8, // Digital pin 40 + PC_9, // Digital pin 41 + PC_10, // Digital pin 42 + PC_11, // Digital pin 43 + PC_12, // Digital pin 44 + PC_13, // Digital pin 45 + PC_14, // Digital pin 46 + PC_15, // Digital pin 47 + + PD_2, // Digital pin 48 + + PH_0, // Digital pin 49, used by the external oscillator + PH_1 // Digital pin 40, used by the external oscillator +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17, // A9, PB1 + 32, // A10, PC0 + 33, // A11, PC1 + 34, // A12, PC2 + 35, // A13, PC3 + 36, // A14, PC4 + 37 // A15, PC5 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ + +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + +WEAK void SetSysClock_PLL_HSE(void) { + + RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct; + + /**Configure the main internal regulator output voltage + */ + __HAL_RCC_PWR_CLK_ENABLE(); + + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); + + /**Initializes the CPU, AHB and APB busses clocks + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = (HSE_VALUE / 1000000); + RCC_OscInitStruct.PLL.PLLN = 336; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 7; + + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + _Error_Handler(__FILE__, __LINE__); + + /**Initializes the CPU, AHB and APB busses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) + _Error_Handler(__FILE__, __LINE__); +} + +WEAK void SystemClock_Config(void) { + SetSysClock_PLL_HSE(); + + /* Ensure CCM RAM clock is enabled */ + __HAL_RCC_CCMDATARAMEN_CLK_ENABLE(); + + /* Output clock on MCO2 pin(PC9) for debugging purpose */ + //HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h new file mode 100644 index 000000000000..ec6e498b2179 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h @@ -0,0 +1,148 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins (STM32F405RG and STM32F415RG) + *----------------------------------------------------------------------------*/ + +// | DIGITAL | ANALOG IN | ANALOG OUT | UART/USART | TWI | SPI | SPECIAL | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PA0 PIN_A0 // | 0 | A0 (ADC1) | | UART4_TX | | | | +#define PA1 PIN_A1 // | 1 | A1 (ADC1) | | UART4_RX | | | | +#define PA2 PIN_A2 // | 2 | A2 (ADC1) | | USART2_TX | | | | +#define PA3 PIN_A3 // | 3 | A3 (ADC1) | | USART2_RX | | | | +#define PA4 PIN_A4 // | 4 | A4 (ADC1) | DAC_OUT1 | | | SPI1_SS, (SPI3_SS) | | +#define PA5 PIN_A5 // | 5 | A5 (ADC1) | DAC_OUT2 | | | SPI1_SCK | | +#define PA6 PIN_A6 // | 6 | A6 (ADC1) | | | | SPI1_MISO | | +#define PA7 PIN_A7 // | 7 | A7 (ADC1) | | | | SPI1_MOSI | | +#define PA8 8 // | 8 | | | | TWI3_SCL | | | +#define PA9 9 // | 9 | | | USART1_TX | | SPI2_SCK | | +#define PA10 10 // | 10 | | | USART1_RX | | | | +#define PA11 11 // | 11 | | | | | | | +#define PA12 12 // | 12 | | | | | | | +#define PA13 13 // | 13 | | | | | | SWD_SWDIO | +#define PA14 14 // | 14 | | | | | | SWD_SWCLK | +#define PA15 15 // | 15 | | | | | SPI3_SS, (SPI1_SS) | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PB0 PIN_A8 // | 16 | A8 (ADC1) | | | | | | +#define PB1 PIN_A9 // | 17 | A9 (ADC1) | | | | | | +#define PB2 18 // | 18 | | | | | | BOOT1 | +#define PB3 19 // | 19 | | | | | SPI3_SCK, (SPI1_SCK) | | +#define PB4 20 // | 20 | | | | | SPI3_MISO, (SPI1_MISO) | | +#define PB5 21 // | 21 | | | | | SPI3_MOSI, (SPI1_MOSI) | | +#define PB6 22 // | 22 | | | USART1_TX | TWI1_SCL | | | +#define PB7 23 // | 23 | | | USART1_RX | TWI1_SDA | | | +#define PB8 24 // | 24 | | | | TWI1_SCL | | | +#define PB9 25 // | 25 | | | | TWI1_SDA | SPI2_SS | | +#define PB10 26 // | 26 | | | USART3_TX | TWI2_SCL | SPI2_SCK | | +#define PB11 27 // | 27 | | | USART3_RX | TWI2_SDA | | | +#define PB12 28 // | 28 | | | | | SPI2_SS | | +#define PB13 29 // | 29 | | | | | SPI2_SCK | | +#define PB14 30 // | 30 | | | | | SPI2_MISO | | +#define PB15 31 // | 31 | | | | | SPI2_MOSI | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PC0 PIN_A10 // | 32 | A10 (ADC1) | | | | | | +#define PC1 PIN_A11 // | 33 | A11 (ADC1) | | | | | | +#define PC2 PIN_A12 // | 34 | A12 (ADC1) | | | | SPI2_MISO | | +#define PC3 PIN_A13 // | 35 | A13 (ADC1) | | | | SPI2_MOSI | | +#define PC4 PIN_A14 // | 36 | A14 (ADC1) | | | | | | +#define PC5 PIN_A15 // | 37 | A15 (ADC1) | | | | | | +#define PC6 38 // | 38 | | | USART6_TX | | | | +#define PC7 39 // | 39 | | | USART3_RX | | SPI2_SCK | | +#define PC8 40 // | 40 | | | | | | | +#define PC9 41 // | 41 | | | | TWI3_SDA | | | +#define PC10 42 // | 42 | | | USART3_TX, (UART4_TX) | | SPI3_SCK | | +#define PC11 43 // | 43 | | | USART3_RX, (UART4_RX) | | SPI3_MISO | | +#define PC12 44 // | 44 | | | UART5_TX | | SPI3_MOSI | | +#define PC13 45 // | 45 | | | | | | | +#define PC14 46 // | 46 | | | | | | OSC32_IN | +#define PC15 47 // | 47 | | | | | | OSC32_OUT | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PD2 48 // | 48 | | | UART5_RX | | | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PH0 49 // | 49 | | | | | | OSC_IN | +#define PH1 50 // | 50 | | | | | | OSC_OUT | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| + +/// This must be a literal +#define NUM_DIGITAL_PINS 51 +#define NUM_ANALOG_INPUTS 16 + +// On-board LED pin number +#ifndef LED_BUILTIN +#define LED_BUILTIN PA5 +#endif +#define LED_GREEN LED_BUILTIN + +// On-board user button +#ifndef USER_BTN +#define USER_BTN PC13 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#define TIMER_TONE TIM5 +#define TIMER_SERVO TIM7 + +// UART Definitions +// Define here Serial instance number to map on Serial generic name +#define SERIAL_UART_INSTANCE 1 + +// Default pin used for 'Serial' instance +// Mandatory for Firmata +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +/* Extra HAL modules */ +#define HAL_DAC_MODULE_ENABLED + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial + #define SERIAL_PORT_HARDWARE Serial +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index e2e93eaa4327..29dd93307826 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -439,3 +439,17 @@ extends = env:mks_monster8_usb_flash_drive build_flags = ${env:mks_monster8_usb_flash_drive.build_flags} -DUSBD_USE_CDC_MSC build_unflags = -DUSBD_USE_CDC + +# +# TH3D EZBoard Lite v2.0 (STM32F405RGT6 ARM Cortex-M4) +# +[env:TH3D_EZBoard_Lite_V2] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F405RG +board_build.variant = MARLIN_TH3D_EZBOARD_LITE_V2 +board_build.offset = 0xC000 +board_upload.offset_address = 0x0800C000 +build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0 +debug_tool = stlink +upload_protocol = stlink From 4f35858c9ef4de8e291d8006041aca0969c9d825 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 24 Aug 2021 18:07:41 -0500 Subject: [PATCH 250/323] =?UTF-8?q?=F0=9F=8E=A8=20EXP1/2=20headers=20and?= =?UTF-8?q?=20pins=20cleanup=20(#22628)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32F1/onboard_sd.cpp | 2 +- Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 3 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 8 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 72 +++---- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 5 +- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 3 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 3 +- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 167 +++++++++------- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 3 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 3 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 4 +- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 3 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 123 +++++++----- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 6 +- Marlin/src/pins/ramps/pins_RAMPS.h | 4 +- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 2 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 2 - Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 6 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 8 +- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 2 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 1 - Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 83 +++++--- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 4 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 18 +- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 6 +- Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 6 +- Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 6 +- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 6 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 4 +- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 2 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 2 +- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 109 ++++++---- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 6 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 24 ++- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 168 ++++++++-------- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 189 ++++++++++-------- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 16 +- 40 files changed, 591 insertions(+), 494 deletions(-) diff --git a/Marlin/src/HAL/STM32F1/onboard_sd.cpp b/Marlin/src/HAL/STM32F1/onboard_sd.cpp index e26947145d0e..df98c2c057af 100644 --- a/Marlin/src/HAL/STM32F1/onboard_sd.cpp +++ b/Marlin/src/HAL/STM32F1/onboard_sd.cpp @@ -158,7 +158,7 @@ static void sd_power_on() { ONBOARD_SD_SPI.begin(); ONBOARD_SD_SPI.setBitOrder(MSBFIRST); ONBOARD_SD_SPI.setDataMode(SPI_MODE0); - OUT_WRITE(ONBOARD_SD_CS_PIN, HIGH); // Set CS# high + CS_HIGH(); } // Disable SPI function diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index 5131069f6bea..9211a6a793bf 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -85,7 +85,6 @@ #define FAN1_PIN P0_26 #define LCD_SDSS P0_16 // LCD SD chip select -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #if ENABLED(AZSMZ_12864) #define BEEPER_PIN P1_30 @@ -109,6 +108,7 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index c6a44123a02b..c01afccacabc 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -54,7 +54,7 @@ /** - * ______ ______ + * ------ ------ * NC | 1 2 | GND 5V | 1 2 | GND * RESET | 3 4 | 1.31 NC | 3 4 | NC * 0.18 | 5 6 3.25 NC | 5 6 0.15 @@ -82,7 +82,6 @@ #define EXP2_09_PIN P0_15 #define EXP2_10_PIN P0_17 - /** * LCD / Controller * diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index b922f057f1e5..1ce6aed7003c 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -184,7 +184,7 @@ #endif /** - * ______ ______ + * ------ ------ * NC | 1 2 | GND 5V | 1 2 | GND * RESET | 3 4 | 1.31 (SD_DETECT) (LCD_D7) 1.23 | 3 4 | 1.22 (LCD_D6) * (MOSI) 0.18 | 5 6 3.25 (BTN_EN2) (LCD_D5) 1.21 | 5 6 1.20 (LCD_D4) @@ -230,7 +230,7 @@ * The ANET_FULL_GRAPHICS_LCD connector plug: * * BEFORE AFTER - * ______ ______ + * ------ ------ * GND 1 | 1 2 | 2 5V 5V 1 | 1 2 | 2 GND * CS 3 | 3 4 | 4 BTN_EN2 CS 3 | 3 4 | 4 BTN_EN2 * SID 5 | 5 6 6 BTN_EN1 SID 5 | 5 6 6 BTN_EN1 @@ -386,11 +386,11 @@ /** * Creality Ender-2 display pinout - * _____ + * ----- * 5V | 1 2 | GND * (MOSI) P1_23 | 3 4 | P1_22 (LCD_CS) * (LCD_A0) P1_21 | 5 6 P1_20 (BTN_EN2) - * RESET P1_19 | 7 8 | P1_18 (BTN_EN1) + * (RESET) P1_19 | 7 8 | P1_18 (BTN_EN1) * (BTN_ENC) P0_28 | 9 10| P1_30 (SCK) * ----- * EXP1 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 2c9e608e496f..ae6456a3ce4d 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -239,14 +239,14 @@ #define TMC_BAUD_RATE 19200 #endif -/* _____ _____ - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22 - * 0.18 | 5 6 3.25 1.21 | 5 6 1.20 - * 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18 - * 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30 - * ----- ----- - * EXP2 EXP1 +/** ------ ------ + * NC | 1 2 | GND 5V | 1 2 | GND + * RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22 + * 0.18 | 5 6 3.25 1.21 | 5 6 1.20 + * 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18 + * 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30 + * ------ ------ + * EXP2 EXP1 */ #define EXP1_03_PIN P1_23 @@ -267,27 +267,15 @@ #define EXP2_09_PIN P0_15 #define EXP2_10_PIN P0_17 -/** - * _____ _____ - * NC | · · | GND 5V | · · | GND - * RESET | · · | 1.31 (SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6) - * (MOSI) 0.18 | · · 3.25 (BTN_EN2) (LCD_D5) 1.21 | · · 1.20 (LCD_D4) - * (SD_SS) 0.16 | · · | 3.26 (BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN) - * (SCK) 0.15 | · · | 0.17 (MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER) - * ----- ----- - * EXP2 EXP1 - */ - -#if ENABLED(DWIN_CREALITY_LCD) +#if EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD - #define BTN_ENC P1_20 - #define BTN_EN1 P1_23 - #define BTN_EN2 P1_22 + #define BTN_ENC EXP1_06_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_04_PIN #ifndef BEEPER_PIN - #define BEEPER_PIN P1_21 - #undef SPEAKER + #define BEEPER_PIN EXP1_05_PIN #endif #elif HAS_WIRED_LCD && !BTT_MOTOR_EXPANSION @@ -304,13 +292,13 @@ * The ANET_FULL_GRAPHICS_LCD_ALT_WIRING connector plug: * * BEFORE AFTER - * _____ _____ - * GND | 1 2 | 5V 5V | 1 2 | GND - * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 - * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 - * open | 7 8 | BTN_ENC open | 7 8 | BTN_ENC - * CLK | 9 10| Beeper CLK | 9 10| Beeper - * ----- ----- + * ------ ------ + * GND | 1 2 | 5V 5V | 1 2 | GND + * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 + * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 + * open | 7 8 | BTN_ENC open | 7 8 | BTN_ENC + * CLK | 9 10| BEEPER CLK | 9 10| BEEPER + * ------ ------ * LCD LCD */ @@ -337,15 +325,15 @@ * * The ANET_FULL_GRAPHICS_LCD connector plug: * - * BEFORE AFTER - * ______ ______ - * GND | 1 2 | 5V 5V | 1 2 | GND - * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 - * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 - * open | 7 8 | BTN_ENC CLK | 7 8 | BTN_ENC - * CLK | 9 10 | Beeper open | 9 10 | Beeper - * ------ ------ - * LCD LCD + * BEFORE AFTER + * ------ ------ + * GND | 1 2 | 5V 5V | 1 2 | GND + * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 + * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 + * open | 7 8 | BTN_ENC CLK | 7 8 | BTN_ENC + * CLK | 9 10 | BEEPER open | 9 10 | BEEPER + * ------ ------ + * LCD LCD */ #define LCD_PINS_RS EXP1_03_PIN @@ -372,7 +360,7 @@ #elif ENABLED(ENDER2_STOCKDISPLAY) /** Creality Ender-2 display pinout - * ______ + * ------ * 5V | 1 2 | GND * (MOSI) 1.23 | 3 4 | 1.22 (LCD_RS) * (LCD_A0) 1.21 | 5 6 1.20 (BTN_EN2) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index 9e04fc047954..52f34ed0f0d5 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -126,8 +126,6 @@ #endif #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) && ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS) #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS." #endif @@ -145,13 +143,14 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif #if ENABLED(BTT_MOTOR_EXPANSION) - /** ______ ______ + /** ------ ------ * NC | 1 2 | GND NC | 1 2 | GND * NC | 3 4 | M1EN M2EN | 3 4 | M3EN * M1STP | 5 6 M1DIR M1RX | 5 6 M1DIAG diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index 1feaeb13b5d6..eee3ede713fe 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -155,8 +155,6 @@ #define SDCARD_CONNECTION LCD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) #define SD_SCK_PIN P0_15 #define SD_MISO_PIN P0_17 @@ -167,5 +165,6 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index a2235dc28ad4..d1d1eccc458c 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -165,8 +165,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(CUSTOM_CABLE) /** @@ -199,6 +197,7 @@ #define SD_SS_PIN P0_28 #else #define SD_DETECT_PIN P0_27 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 449d9a93ce4e..49dad8b07b43 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -215,7 +215,7 @@ // Power Supply Control // #if ENABLED(MKS_PWC) - #define PS_ON_PIN P2_00 // SERVO + #define PS_ON_PIN P2_00 // SERVO1 #define KILL_PIN P1_24 // Z+ #define KILL_PIN_STATE HIGH #endif @@ -228,42 +228,79 @@ #define LED3_PIN P1_20 #define LED4_PIN P1_21 -/** - * _____ _____ - * (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK) - * (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2) - * (LCD_D4) 0.15 | · · 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · 0.9 (SD_MOSI) - * (LCD_D6) 1.0 | · · | 1.22 (LCD_D7) (SD_DETECT) 0.27 | · · | RST - * GND | · · | 5V GND | · · | NC - * ----- ----- - * EXP1 EXP2 +/** ------ ------ + * (BEEPER) 1.31 |10 9 | 1.30 (BTN_ENC) (MISO) 0.8 |10 9 | 0.7 (SD_SCK) + * (LCD_EN) 0.18 | 8 7 | 0.16 (LCD_RS) (BTN_EN1) 3.25 | 8 7 | 0.28 (SD_CS2) + * (LCD_D4) 0.15 | 6 5 0.17 (LCD_D5) (BTN_EN2) 3.26 | 6 5 0.9 (SD_MOSI) + * (LCD_D6) 1.0 | 4 3 | 1.22 (LCD_D7) (SD_DETECT) 0.27 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ + +#define EXP1_03_PIN P1_22 +#define EXP1_04_PIN P1_00 +#define EXP1_05_PIN P0_17 +#define EXP1_06_PIN P0_15 +#define EXP1_07_PIN P0_16 +#define EXP1_08_PIN P0_18 +#define EXP1_09_PIN P1_30 +#define EXP1_10_PIN P1_31 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN P0_27 +#define EXP2_05_PIN P0_09 +#define EXP2_06_PIN P3_26 +#define EXP2_07_PIN P0_28 +#define EXP2_08_PIN P3_25 +#define EXP2_09_PIN P0_07 +#define EXP2_10_PIN P0_08 + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) + #define SD_DETECT_PIN EXP2_04_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #if SD_CONNECTION_IS(ONBOARD) + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card + #define SD_SS_PIN ONBOARD_SD_CS_PIN + #else + #define SD_SS_PIN EXP2_07_PIN + #endif +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "No custom SD drive cable defined for this board." +#endif + #if HAS_WIRED_LCD - #define BEEPER_PIN P1_31 - #define BTN_ENC P1_30 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS P1_00 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 P0_18 - #define BTN_EN2 P0_15 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE P1_22 - #define LCD_PINS_D4 P0_17 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI - #define TFT_CS_PIN P1_00 - #define TFT_A0_PIN P1_22 - #define TFT_DC_PIN P1_22 - #define TFT_MISO_PIN P0_08 - #define TFT_BACKLIGHT_PIN P0_18 - #define TFT_RESET_PIN P0_16 + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_A0_PIN EXP1_03_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + #define TFT_RESET_PIN EXP1_07_PIN #define LCD_USE_DMA_SPI - #define TOUCH_INT_PIN P0_17 - #define TOUCH_CS_PIN P0_15 + #define TOUCH_INT_PIN EXP1_05_PIN + #define TOUCH_CS_PIN EXP1_06_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 @@ -278,8 +315,8 @@ #define TFT_QUEUE_SIZE 6144 #endif - #define BTN_EN1 P3_25 - #define BTN_EN2 P3_26 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #elif IS_TFTGLCD_PANEL @@ -287,74 +324,74 @@ #undef BTN_ENC #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS P3_25 + #define TFTGLCD_CS EXP2_08_PIN #endif #else - #define BTN_EN1 P3_25 - #define BTN_EN2 P3_26 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_SDSS P0_28 + #define LCD_SDSS EXP2_07_PIN #if ENABLED(MKS_12864OLED_SSD1306) - #define LCD_PINS_DC P0_17 - #define DOGLCD_CS P0_16 + #define LCD_PINS_DC EXP1_05_PIN + #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_A0 LCD_PINS_DC - #define DOGLCD_SCK P0_15 - #define DOGLCD_MOSI P0_18 + #define DOGLCD_SCK EXP1_06_PIN + #define DOGLCD_MOSI EXP1_08_PIN - #define LCD_PINS_RS P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #define KILL_PIN -1 // NC #else // !MKS_12864OLED_SSD1306 - #define LCD_PINS_RS P0_16 + #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS P0_18 - #define DOGLCD_A0 P0_16 - #define DOGLCD_SCK P0_07 - #define DOGLCD_MOSI P0_09 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define LCD_BACKLIGHT_PIN -1 #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN P0_15 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P0_17 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_00 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_22 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P0_17 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #else // !FYSETC_MINI_12864 #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS P0_17 - #define DOGLCD_A0 P1_00 + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_A0 EXP1_04_PIN #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 P0_17 - #define LCD_PINS_D6 P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -370,29 +407,9 @@ #endif // HAS_WIRED_LCD -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD -#endif - -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - -#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) - #define SD_DETECT_PIN P0_27 - #define SD_SCK_PIN P0_07 - #define SD_MISO_PIN P0_08 - #define SD_MOSI_PIN P0_09 - #if SD_CONNECTION_IS(ONBOARD) - #define SD_SS_PIN ONBOARD_SD_CS_PIN - #else - #define SD_SS_PIN P0_28 - #endif -#elif SD_CONNECTION_IS(CUSTOM_CABLE) - #error "No custom SD drive cable defined for this board." -#endif - // // Other Pins // //#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) //#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) -//#define PS_ON_PIN P1_23 // SERVO P1.23 +//#define PS_ON_PIN P1_23 // SERVO0 P1.23 diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 62127f5504b7..ce5d5ad7c6de 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -455,8 +455,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) #define SD_SCK_PIN P0_15 // (52) system defined J3-9 & AUX-3 #define SD_MISO_PIN P0_17 // (50) system defined J3-10 & AUX-3 @@ -467,6 +465,7 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index 80a91d2cbc4b..f3ecebde4674 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -198,8 +198,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) #define SD_SCK_PIN P0_15 #define SD_MISO_PIN P0_17 @@ -210,6 +208,7 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 44ceb9b7cc8f..c2d2621bc1c9 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -179,7 +179,7 @@ #endif /** - * ______ + * ------ * 5V | 1 2 | GND * (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) * (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) @@ -203,7 +203,7 @@ /** * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo - * ______ ______ RX 8 --> 5 P0_15 + * ------ ------ RX 8 --> 5 P0_15 * 5V | 1 2 | GND 5V | 1 2 | GND TX 7 --> 9 P0_16 * (BTN_E1) A | 3 4 | B (BTN_E2) (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) BEEPER 5 --> 10 P2_08 * BEEPER | 5 6 ENT (BTN_ENC) (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index 57b45214535b..ea2e0b708251 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -229,8 +229,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) #define SD_SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3 #define SD_MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3 @@ -239,6 +237,7 @@ #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin #else #undef SD_DETECT_PIN + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #endif #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index ff7aa11dafed..a8a4d2de4e20 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -231,7 +231,7 @@ // Power Supply Control // #if ENABLED(MKS_PWC) - #define PS_ON_PIN P2_00 // SERVO + #define PS_ON_PIN P2_00 // SERVO1 #define KILL_PIN P1_24 // Z+ #define KILL_PIN_STATE HIGH #endif @@ -256,7 +256,7 @@ #endif /** - * _____ _____ + * ----- ----- * (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK) * (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2) * (LCD_D4) 0.15 | · · | 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · | 0.9 (SD_MOSI) @@ -265,60 +265,78 @@ * ----- ----- * EXP1 EXP2 */ +#define EXP1_03_PIN P1_22 +#define EXP1_04_PIN P1_00 +#define EXP1_05_PIN P0_17 +#define EXP1_06_PIN P0_15 +#define EXP1_07_PIN P0_16 +#define EXP1_08_PIN P0_18 +#define EXP1_09_PIN P1_30 +#define EXP1_10_PIN P1_31 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN P0_27 +#define EXP2_05_PIN P0_09 +#define EXP2_06_PIN P3_26 +#define EXP2_07_PIN P0_28 +#define EXP2_08_PIN P3_25 +#define EXP2_09_PIN P0_07 +#define EXP2_10_PIN P0_08 + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS P3_25 + #define TFTGLCD_CS EXP2_08_PIN #endif - #define SD_DETECT_PIN P0_27 + #define SD_DETECT_PIN EXP2_04_PIN #elif HAS_WIRED_LCD - #define BEEPER_PIN P1_31 - #define BTN_ENC P1_30 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS P1_00 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 P0_18 - #define BTN_EN2 P0_15 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE P1_22 - #define LCD_PINS_D4 P0_17 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #else - #define BTN_EN1 P3_25 - #define BTN_EN2 P3_26 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_SDSS P0_28 + #define LCD_SDSS EXP2_07_PIN #if ENABLED(MKS_12864OLED_SSD1306) - #define LCD_PINS_DC P0_17 - #define DOGLCD_CS P0_16 + #define LCD_PINS_DC EXP1_05_PIN + #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_A0 LCD_PINS_DC - #define DOGLCD_SCK P0_15 - #define DOGLCD_MOSI P0_18 + #define DOGLCD_SCK EXP1_06_PIN + #define DOGLCD_MOSI EXP1_08_PIN - #define LCD_PINS_RS P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #define KILL_PIN -1 // NC #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI - #define TFT_CS_PIN P1_00 - #define TFT_A0_PIN P1_22 - #define TFT_DC_PIN P1_22 - #define TFT_MISO_PIN P0_08 - #define TFT_BACKLIGHT_PIN P0_18 - #define TFT_RESET_PIN P0_16 + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_A0_PIN EXP1_03_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + #define TFT_RESET_PIN EXP1_07_PIN #define LCD_USE_DMA_SPI - #define TOUCH_INT_PIN P0_17 - #define TOUCH_CS_PIN P0_15 + #define TOUCH_INT_PIN EXP1_05_PIN + #define TOUCH_CS_PIN EXP1_06_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 @@ -335,50 +353,50 @@ #else // !MKS_12864OLED_SSD1306 - #define LCD_PINS_RS P0_16 + #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS P0_18 - #define DOGLCD_A0 P0_16 - #define DOGLCD_SCK P0_07 - #define DOGLCD_MOSI P0_09 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define LCD_BACKLIGHT_PIN -1 #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN P0_15 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P0_17 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_00 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_22 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P0_17 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #else // !FYSETC_MINI_12864 #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS P0_17 - #define DOGLCD_A0 P1_00 + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_A0 EXP1_04_PIN #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 P0_17 - #define LCD_PINS_D6 P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -398,17 +416,16 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) - #define SD_DETECT_PIN P0_27 - #define SD_SCK_PIN P0_07 - #define SD_MISO_PIN P0_08 - #define SD_MOSI_PIN P0_09 + #define SD_DETECT_PIN EXP2_04_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN #if SD_CONNECTION_IS(ONBOARD) + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #else - #define SD_SS_PIN P0_28 + #define SD_SS_PIN EXP2_07_PIN #endif #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." @@ -419,4 +436,4 @@ // //#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) //#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) -//#define PS_ON_PIN P1_23 // SERVO P1.23 +//#define PS_ON_PIN P1_23 // SERVO0 P1.23 diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index 22a6613329dd..dc7dcd6db609 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -156,7 +156,7 @@ // /** - * ______ + * ------ * 5V | 1 2 | GND * P0_18 | 3 4 | P0_16 * P0_15 | 5 6 P3_25 @@ -181,7 +181,7 @@ #define EXP1_10_PIN P1_31 #if ENABLED(CR10_STOCKDISPLAY) - /** ______ + /** ------ * 5V | 1 2 | GND * LCD_EN | 3 4 | LCD_RS * LCD_D4 | 5 6 EN2 @@ -196,7 +196,7 @@ #define KILL_PIN EXP1_07_PIN #elif ENABLED(MKS_MINI_12864) - /** ______ + /** ------ * 5V | 1 2 | GND * SPI-MOSI | 3 4 | SPI-CS * A0 | 5 6 EN2 diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index b141fdbf85dd..1683ccf5c82d 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -434,7 +434,7 @@ /** * LCD adapter. Please note: These comes in two variants. The socket keys can be * on either side, and may be backwards on some boards / displays. - * _____ _____ + * ----- ----- * D37 |10 9 | D35 (MISO) D50 |10 9 | D52 (SCK) * D17 | 8 7 | D16 D31 | 8 7 | D53 * D23 6 5 D25 D33 6 5 D51 (MOSI) @@ -778,7 +778,7 @@ * FYSETC TFT-81050 display pinout * * Board Display - * _____ _____ + * ----- ----- * (SCK) D52 | 1 2 | D50 (MISO) MISO | 1 2 | SCK * (SD_CS) D53 | 3 4 | D33 (BNT_EN2) (BNT_EN2) MOD_RESET | 3 4 | SD_CS * (MOSI) D51 | 5 6 D31 (BNT_EN1) (BNT_EN1) LCD_CS | 5 6 MOSI diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 225392de1bb4..d4915c9cca2e 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -137,7 +137,7 @@ /** * EXP1 Connector EXP1 as CR10 STOCKDISPLAY - * _____ _____ + * ----- ----- * PA4 | 6 5 | PC0 BEEPER_PIN | 6 5 | BTN_ENC * PD3 | 7 4 | RESET BTN_EN1 | 7 4 | RESET * PD2 8 3 | PA1 BTN_EN2 8 3 | LCD_PINS_D4 (ST9720 CLK) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index bd5f2068f1a4..c614a2dbb962 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -158,8 +158,6 @@ // SD Card // -#define HAS_ONBOARD_SD - #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 6ed2869141a2..dae43d3c13ed 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -156,7 +156,7 @@ #define USB_CONNECT_INVERTING false /** - * _____ + * ----- * 5V | 1 2 | GND * (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS) * (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) @@ -195,7 +195,7 @@ #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) /** Creality Ender-2 display pinout - * _____ + * ----- * 5V | 1 2 | GND * (MOSI) PB7 | 3 4 | PB8 (LCD_RS) * (LCD_A0) PB9 | 5 6 PA10 (BTN_EN2) @@ -229,7 +229,7 @@ /** FYSETC TFT TFT81050 display pinout * * Board Display - * _____ _____ + * ----- ----- * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10) * (FREE) PB9 | 5 6 PA10 (SD_CS) (PB8) LCD_CS | 5 6 MOSI (SPI1-MOSI) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 8f305542a981..fe4fd3a4a72c 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -117,7 +117,7 @@ /** * SKR Mini E3 V1.0, V1.2 SKR Mini E3 V2.0 - * ______ ______ + * ------ ------ * 5V | 1 2 | GND 5V | 1 2 | GND * (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS) (LCD_EN) PB15 | 3 4 | PB8 (LCD_RS) * (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) @@ -134,7 +134,7 @@ #define EXP1_3 PB7 #endif -#if ENABLED(DWIN_CREALITY_LCD) +#if EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) /** * ------ ------ ------ * VCC | 1 2 | GND VCC | 1 2 | GND GND | 2 1 | VCC @@ -205,7 +205,7 @@ * TFTGLCD_PANEL_SPI display pinout * * Board Display - * ______ ______ + * ------ ------ * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) LCD_CS | 3 4 | SD_CS (PA10) * (FREE) PB9 | 5 6 | PA10 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI) @@ -248,7 +248,7 @@ * FYSETC TFT TFT81050 display pinout * * Board Display - * ______ ______ + * ------ ------ * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10) * (FREE) PB9 | 5 6 | PA10 (SD_CS) (PB8) LCD_CS | 5 6 | MOSI (SPI1-MOSI) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 6b3d2832d08a..441f9350e36f 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -98,7 +98,7 @@ // /** - * _____ _____ + * ----- ----- * NC | · · | GND 5V | · · | GND * RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6) * (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4) diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index 7b61f55d4f19..c2edcd367824 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -122,7 +122,7 @@ #define NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin /** - * 1 _____ 2 + * 1 ----- 2 * PB5 | · · | PB6 * PA2 | · · | RESET * PA3 | · · | PB8 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 0437156c0c11..056fdf4c29de 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -194,7 +194,6 @@ //#define LCD_LED_PIN PB2 #ifndef BEEPER_PIN #define BEEPER_PIN PB13 - //#undef SPEAKER #endif #elif ENABLED(DWIN_VET6_CREALITY_LCD) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index f971f6562801..7694130a3eee 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -156,35 +156,67 @@ #define SDIO_SUPPORT #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD) - #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." -#endif - -#if ENABLED(RET6_12864_LCD) - - // RET6 12864 LCD - #define LCD_PINS_RS PB12 - #define LCD_PINS_ENABLE PB15 - #define LCD_PINS_D4 PB13 - - #define BTN_ENC PB2 - #define BTN_EN1 PB10 - #define BTN_EN2 PB14 +#if ENABLED(CR10_STOCKDISPLAY) + + #if ENABLED(RET6_12864_LCD) + + /** + * RET6 12864 LCD + * ------ + * PC6 |10 9 | PB2 + * PB10 | 8 7 | PE8 + * PB14 | 6 5 | PB13 + * PB12 | 4 3 | PB15 + * GND | 2 1 | 5V + * ------ + * EXP1 + */ + #define EXP1_03_PIN PB15 + #define EXP1_04_PIN PB12 + #define EXP1_05_PIN PB13 + #define EXP1_06_PIN PB14 + #define EXP1_07_PIN PE8 + #define EXP1_08_PIN PB10 + #define EXP1_09_PIN PB2 + #define EXP1_10_PIN PC6 + + #define BEEPER_PIN EXP1_10_PIN + + #elif ENABLED(VET6_12864_LCD) + + /** + * VET6 12864 LCD + * ------ + * ? |10 9 | PC5 + * PB10 | 8 7 | ? + * PA6 | 6 5 | PA5 + * PA4 | 4 3 | PA7 + * GND | 2 1 | 5V + * ------ + * EXP1 + */ + #define EXP1_03_PIN PA7 + #define EXP1_04_PIN PA4 + #define EXP1_05_PIN PA5 + #define EXP1_06_PIN PA6 + #define EXP1_07_PIN -1 + #define EXP1_08_PIN PB10 + #define EXP1_09_PIN PC5 + #define EXP1_10_PIN -1 - #define BEEPER_PIN PC6 - -#elif ENABLED(VET6_12864_LCD) + #else + #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." + #endif - // VET6 12864 LCD - #define LCD_PINS_RS PA4 - #define LCD_PINS_ENABLE PA7 - #define LCD_PINS_D4 PA5 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #define BTN_ENC PC5 - #define BTN_EN1 PB10 - #define BTN_EN2 PA6 + #define BTN_ENC EXP1_09_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN -#elif ENABLED(DWIN_CREALITY_LCD) +#elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD #define BTN_ENC PB14 @@ -194,7 +226,6 @@ //#define LCD_LED_PIN PB2 #ifndef BEEPER_PIN #define BEEPER_PIN PB13 - #undef SPEAKER #endif #elif ENABLED(DWIN_VET6_CREALITY_LCD) diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index 552ad9ac5717..2060ad86fe5b 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -132,8 +132,8 @@ /* * EXP1 pinout for the LCD according to Fysetcs schematic for the Cheetah board -* _____ -* (Beeper) PC9 | 1 2 | PC12 (BTN_ENC) +* ----- +* (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) * (BTN_EN2) PC11 | 3 4 | PB14 (LCD_RS / MISO) * (BTN_EN1) PC10 5 6 | PB13 (SCK) * (LCD_EN) PB12 | 7 8 | PB15 (MOSI) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index c568e42df230..60d342c60200 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -133,7 +133,7 @@ #endif /** - * _____ _____ _____ + * ----- ----- ----- * (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK) 5V | 1 2 | GND * (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA15 (SD_SS) (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) * (LCD_D4) PA6 | 5 6 PA7 (LCD_D5) (BTN_EN2) PB0 | 5 6 PB15 (SD_MOSI) (LCD_D4) PA6 | 5 6 PB0 (BTN_EN2) diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 1f3efee6e567..6e19b441c6d6 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -299,14 +299,16 @@ #endif -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) -#endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) -#endif -#ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) +#if HAS_MARLINUI_U8GLIB + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #endif #endif #define HAS_SPI_FLASH 1 diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h index bad5db7125e1..0d413d3651b9 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -201,9 +201,9 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_06_PIN #define BTN_ENC EXP1_04_PIN - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(200) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(200) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index 8a6bb4b5f87b..3674f10ce703 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -332,9 +332,9 @@ #endif #if HAS_MARLINUI_U8GLIB - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif // Remap SERVO0 PIN for BLTouch diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h index 5bbf43bbfac3..017195edee09 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -305,9 +305,9 @@ #endif #if HAS_MARLINUI_U8GLIB - #define BOARD_ST7920_DELAY_1 DELAY_NS(200) // Tclk_fall <200ns - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) // Tdata_width >200ns - #define BOARD_ST7920_DELAY_3 DELAY_NS(200) // Tclk_rise <200ns + #define BOARD_ST7920_DELAY_1 DELAY_NS(200) // Tclk_fall <200ns + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) // Tdata_width >200ns + #define BOARD_ST7920_DELAY_3 DELAY_NS(200) // Tclk_rise <200ns #endif // Remap SERVO0 PIN for BLTouch diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 481c38f5152b..a768088c37a3 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -183,7 +183,7 @@ /** * BTT E3 RRF - * _____ + * ----- * 5V | 1 2 | GND * (LCD_EN) PE11 | 3 4 | PB1 (LCD_RS) * (LCD_D4) PE10 | 5 6 PB2 (BTN_EN2) @@ -248,7 +248,7 @@ * TFTGLCD_PANEL_SPI display pinout * * Board Display - * _____ _____ + * ----- ----- * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) * (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) LCD_CS | 3 4 | SD_CS (PB2) * (FREE) PE10 | 5 6 | PB2 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI) @@ -303,7 +303,7 @@ /** FYSETC TFT TFT81050 display pinout * * Board Display - * _____ _____ + * ----- ----- * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) * (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) MOD_RESET | 3 4 | SD_CS (PB2) * (FREE) PE10 | 5 6 | PB2 (SD_CS) (PB1) LCD_CS | 5 6 | MOSI (SPI1-MOSI) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 92e7b5d3749c..ec9ca32f7e58 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -311,7 +311,7 @@ #endif /** - * ______ ______ + * ------ ------ * NC | 1 2 | GND 5V | 1 2 | GND * RESET | 3 4 | PC15 (SD_DETECT) (LCD_D7) PE15 | 3 4 | PE14 (LCD_D6) * (MOSI) PA7 | 5 6 PB1 (BTN_EN2) (LCD_D5) PE13 | 5 6 PE12 (LCD_D4) @@ -366,7 +366,7 @@ #if ENABLED(BTT_MOTOR_EXPANSION) /** - * ______ ______ + * ------ ------ * NC | 1 2 | GND NC | 1 2 | GND * NC | 3 4 | M1EN M2EN | 3 4 | M3EN * M1STP | 5 6 M1DIR M1RX | 5 6 M1DIAG diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index e43cc4e5a066..6daa34e0592a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -367,7 +367,7 @@ #endif #if ENABLED(BTT_MOTOR_EXPANSION) - /** _____ _____ + /** ----- ----- * NC | . . | GND NC | . . | GND * NC | . . | M1EN M2EN | . . | M3EN * M1STP | . . M1DIR M1RX | . . M1DIAG diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index dc2ee99affc2..e049f8fbd930 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -350,7 +350,7 @@ #endif #if ENABLED(BTT_MOTOR_EXPANSION) - /** _____ _____ + /** ----- ----- * NC | . . | GND NC | . . | GND * NC | . . | M1EN M2EN | . . | M3EN * M1STP | . . M1DIR M1RX | . . M1DIAG diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 728e7535439b..27ad7179dfdf 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -175,17 +175,39 @@ #define FAN4_PIN PE13 #define FAN5_PIN PB11 +/** + * ------ ------ + * PB10 |10 9 | PE15 PB14 |10 9 | PB13 + * PE14 | 8 7 | PE12 PC5 | 8 7 | PF11 + * PE10 6 5 | PE9 PC4 6 5 | PB15 + * PE8 | 4 3 | PE7 PB2 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 + */ + +#define EXP1_03_PIN PE7 +#define EXP1_04_PIN PE8 +#define EXP1_05_PIN PE9 +#define EXP1_06_PIN PE10 +#define EXP1_07_PIN PE12 +#define EXP1_08_PIN PE14 +#define EXP1_09_PIN PE15 +#define EXP1_10_PIN PB10 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB2 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PC4 +#define EXP2_07_PIN PF11 +#define EXP2_08_PIN PC5 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 + // // Onboard SD support // - -#define SDIO_D0_PIN PC8 -#define SDIO_D1_PIN PC9 //#define SD_CARD_DETECT_PIN PC13 -#define SDIO_D2_PIN PC10 -#define SDIO_D3_PIN PC11 -#define SDIO_CK_PIN PC12 -#define SDIO_CMD_PIN PD2 #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD @@ -194,37 +216,37 @@ #if SD_CONNECTION_IS(ONBOARD) #define SDIO_SUPPORT // Use SDIO for onboard SD - #ifndef SDIO_SUPPORT + + #if DISABLED(SDIO_SUPPORT) #define SOFTWARE_SPI // Use soft SPI for onboard SD - #define SDSS SDIO_D3_PIN - #define SD_SCK_PIN SDIO_CK_PIN - #define SD_MISO_PIN SDIO_D0_PIN - #define SD_MOSI_PIN SDIO_CMD_PIN + #define SDSS PC11 + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 #endif #elif SD_CONNECTION_IS(LCD) - #define SD_SCK_PIN PB13 - #define SD_MISO_PIN PB14 - #define SD_MOSI_PIN PB15 - #define SDSS PF11 - #define SD_DETECT_PIN PB2 + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SDSS EXP2_07_PIN + #define SD_DETECT_PIN EXP2_04_PIN #endif // // Trinamic Software SPI // - #if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 + #ifndef TMC_SW_SCK + #define TMC_SW_SCK EXP2_09_PIN #endif #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 + #define TMC_SW_MISO EXP2_10_PIN #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI EXP2_05_PIN #endif #endif @@ -264,17 +286,18 @@ // // LCD / Controller // - -#define BEEPER_PIN PB10 -#define LCD_PINS_RS PE12 -#define LCD_PINS_ENABLE PE14 -#define LCD_PINS_D4 PE10 -#define LCD_PINS_D5 PE9 -#define LCD_PINS_D6 PE8 -#define LCD_PINS_D7 PE7 -#define BTN_EN1 PC4 -#define BTN_EN2 PC5 -#define BTN_ENC PE15 +#if IS_RRD_SC + #define BEEPER_PIN EXP1_10_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + #define BTN_EN1 EXP2_06_PIN + #define BTN_EN2 EXP2_08_PIN + #define BTN_ENC EXP1_09_PIN +#endif // // Filament runout @@ -285,12 +308,14 @@ // // ST7920 Delays // -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) -#endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) -#endif -#ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) +#if HAS_MARLINUI_U8GLIB + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index ef1c14aae0bf..b50f1e4966bf 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -138,7 +138,7 @@ #endif /** - * _____ _____ + * ----- ----- * 5V | 1 2 | GND 5V | 1 2 | GND * RESET | 3 4 | PC3 (SD_DETECT) (LCD_D7) PB7 | 3 4 | PB6 (LCD_D6) * (SD_MOSI) PA7 5 6 | PC11 (BTN_EN2) (LCD_D5) PB14 5 6 | PB13 (LCD_D4) @@ -149,7 +149,7 @@ */ /** -* _____ +* ----- * (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) * (BTN_EN1) PC10 | 3 4 | PB14 (LCD_D5/MISO) * (BTN_EN2) PC11 5 6 | PB13 (LCD_D4/SCK) @@ -258,7 +258,7 @@ #define BOARD_ST7920_DELAY_2 DELAY_NS(48) #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 9de62d372a1b..9ce8d33fa8ce 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -192,12 +192,12 @@ //#define KILL_PIN PC5 /** - * ______ ______ - * 5V | 1 2 | GND 5V | 1 2 | GND - * PD1 | 3 4 | PD0 RESET | 3 4 | PB10 - * PC12 | 5 6 PC10 PA7 | 5 6 PC7 - * PD2 | 7 8 | PC11 PA4 | 7 8 | PC6 - * PA8 | 9 10 | PC9 PA5 | 9 10 | PA6 + * ------ ------ + * PC9 |10 9 | PA8 PA6 |10 9 | PA5 + * PC11 | 8 7 | PD2 PC6 | 8 7 | PA4 + * PC10 | 6 5 PC12 PC7 | 6 5 PA7 + * PD0 | 4 3 | PD1 PB10 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 5V * ------ ------ * EXP1 EXP2 */ @@ -315,9 +315,15 @@ // Alter timing for graphical display #if HAS_MARLINUI_U8GLIB - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 DELAY_NS(640) + #endif #endif #ifndef RGB_LED_R_PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index adc8b2a8bdb0..38714d7da9c9 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -225,22 +225,46 @@ // Power Supply Control // #if ENABLED(MKS_PWC) - #define PS_ON_PIN PW_OFF - #define KILL_PIN PW_DET + #define PS_ON_PIN PW_OFF + #define KILL_PIN PW_DET #define KILL_PIN_STATE HIGH #endif // Random Info #define USB_SERIAL -1 // USB Serial +/** + * ------ ------ + * (BEEPER) PB2 |10 9 | PE10 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) + * (LCD_EN) PE11 | 8 7 | PD10 (LCD_RS) (BTN_EN1) PE9 | 8 7 | PA4 (SPI1 CS) + * (LCD_D4) PD9 | 6 5 PD8 (LCD_D5) (BTN_EN2) PE8 | 6 5 PA7 (SPI1 MOSI) + * (LCD_D6) PE15 | 4 3 | PE7 (LCD_D7) (SPI1_RS) PB11 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 3.3V + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PE7 +#define EXP1_04_PIN PE15 +#define EXP1_05_PIN PD8 +#define EXP1_06_PIN PD9 +#define EXP1_07_PIN PD10 +#define EXP1_08_PIN PE11 +#define EXP1_09_PIN PE10 +#define EXP1_10_PIN PB2 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB11 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PE8 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PE9 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif -// -// Onboard SD card -// -// detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled #if SD_CONNECTION_IS(ONBOARD) #define ENABLE_SPI3 #define SD_SS_PIN -1 @@ -248,62 +272,32 @@ #define SD_SCK_PIN PC10 #define SD_MISO_PIN PC11 #define SD_MOSI_PIN PC12 - #define SD_DETECT_PIN PC4 -// -// LCD SD -// + #define SD_DETECT_PIN PC4 // SD_DETECT_PIN doesn't work with NO_SD_HOST_DRIVE disabled #elif SD_CONNECTION_IS(LCD) #define ENABLE_SPI1 - #define SDSS PA4 - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PB11 + #define SDSS EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_DETECT_PIN EXP2_04_PIN #endif -/** - * _____ _____ - * (BEEPER)PB2 | · · | PE10(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) - * (LCD_EN)PE11 | · · | PD10(LCD_RS) (BTN_EN1) PE9 | · · | PA4 (SPI1 CS) - * (LCD_D4)PD9 | · · PD8(LCD_D5) (BTN_EN2) PE8 | · · PA7 (SPI1 MOSI) - * (LCD_D6)PE15 | · · | PE7(LCD_D7) (SPI1_RS) PB11 | · · | RESET - * GND | · · | 5V GND | · · | 3.3V - *  ̄ ̄ ̄  ̄ ̄ ̄ - * EXP1 EXP2 - */ - #if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17253 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11579 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 514 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -24 - #endif - #ifndef TOUCH_ORIENTATION - #define TOUCH_ORIENTATION TOUCH_LANDSCAPE - #endif - - #define TFT_CS_PIN PE15 - #define TFT_SCK_PIN PA5 - #define TFT_MISO_PIN PA6 - #define TFT_MOSI_PIN PA7 - #define TFT_DC_PIN PE7 - #define TFT_RST_PIN PD10 + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_RST_PIN EXP1_07_PIN #define TFT_A0_PIN TFT_DC_PIN - #define TFT_RESET_PIN PD10 - #define TFT_BACKLIGHT_PIN PE11 + #define TFT_RESET_PIN EXP1_07_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - #define LCD_BACKLIGHT_PIN PE11 + #define LCD_BACKLIGHT_PIN EXP1_08_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif @@ -311,29 +305,36 @@ #define TFT_HEIGHT 320 #endif - #define TOUCH_CS_PIN PD9 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI - - #define BTN_EN1 PE9 - #define BTN_EN2 PE8 - #define BEEPER_PIN PB2 - #define BTN_ENC PE10 + #define TOUCH_CS_PIN EXP1_06_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_09_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_10_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_05_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_SIZE 14400 + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -17253 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11579 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 514 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -24 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + #elif HAS_WIRED_LCD - #define BEEPER_PIN PB2 - #define BTN_ENC PE10 - #define LCD_PINS_ENABLE PE11 - #define LCD_PINS_RS PD10 - #define BTN_EN1 PE9 - #define BTN_EN2 PE8 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN #define LCD_BACKLIGHT_PIN -1 // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) @@ -341,19 +342,19 @@ //#define LCD_BACKLIGHT_PIN -1 //#define LCD_RESET_PIN -1 #define DOGLCD_A0 PD11 - #define DOGLCD_CS PE15 - //#define DOGLCD_SCK PA5 - //#define DOGLCD_MOSI PA7 + #define DOGLCD_CS EXP1_04_PIN + //#define DOGLCD_SCK EXP2_09_PIN + //#define DOGLCD_MOSI EXP2_05_PIN #elif ENABLED(MKS_MINI_12864_V3) - #define DOGLCD_CS PE11 - #define DOGLCD_A0 PD10 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN #define LCD_PINS_DC DOGLCD_A0 #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PD9 - #define NEOPIXEL_PIN PD8 - #define DOGLCD_MOSI PA7 - #define DOGLCD_SCK PA5 + #define LCD_RESET_PIN EXP1_06_PIN + #define NEOPIXEL_PIN EXP1_05_PIN + #define DOGLCD_MOSI EXP2_05_PIN + #define DOGLCD_SCK EXP2_09_PIN #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif @@ -361,17 +362,24 @@ #else - #define LCD_PINS_D4 PD9 + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(ULTIPANEL) - #define LCD_PINS_D5 PD8 - #define LCD_PINS_D6 PE15 - #define LCD_PINS_D7 PE7 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #endif #define BOARD_ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif // !MKS_MINI_12864 #endif // HAS_WIRED_LCD + +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, HAS_WIRED_LCD) + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 8008310f5af9..5b5c24899f2d 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -41,10 +41,12 @@ // Use one of these or SDCard-based Emulation will be used //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation -#define I2C_EEPROM -#define MARLIN_EEPROM_SIZE 0x1000 // 4KB -#define I2C_SCL_PIN PB6 -#define I2C_SDA_PIN PB7 +#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB + #define I2C_SCL_PIN PB6 + #define I2C_SDA_PIN PB7 +#endif // // Release PB4 (Z_DIR_PIN) from JTAG NRST role @@ -253,25 +255,11 @@ #define SD_DETECT_PIN PD12 #endif -// -// LCD SD -// -#if SD_CONNECTION_IS(LCD) - #define ENABLE_SPI1 - #define SDSS PE10 - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PE12 -#endif - -// -// LCD / Controller #define SPI_FLASH -#define HAS_SPI_FLASH 1 -#define SPI_DEVICE 2 -#define SPI_FLASH_SIZE 0x1000000 #if ENABLED(SPI_FLASH) + #define HAS_SPI_FLASH 1 + #define SPI_DEVICE 2 + #define SPI_FLASH_SIZE 0x1000000 #define SPI_FLASH_CS_PIN PB12 #define SPI_FLASH_MOSI_PIN PC3 #define SPI_FLASH_MISO_PIN PC2 @@ -279,48 +267,65 @@ #endif /** - * _____ _____ - * (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) - * (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS) - * (LCD_D4)PE14 | · · PE15(LCD_D5) (BTN_EN2) PE11 | · · PA7 (SPI1 MOSI) - * (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI1_RS) PE12 | · · | RESET - * GND | · · | 5V GND | · · | 3.3V - *  ̄ ̄ ̄  ̄ ̄ ̄ - * EXP1 EXP2 + * ------ ------ + * (BEEPER) PC5 |10 9 | PE13 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) + * (LCD_EN) PD13 | 8 7 | PC6 (LCD_RS) (BTN_EN1) PE8 | 8 7 | PE10 (SPI1 CS) + * (LCD_D4) PE14 6 5 | PE15 (LCD_D5) (BTN_EN2) PE11 6 5 | PA7 (SPI1 MOSI) + * (LCD_D6) PD11 | 4 3 | PD10 (LCD_D7) (SPI1_RS) PE12 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 3.3V + * ------ ------ + * EXP1 EXP2 */ -#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17253 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11579 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 514 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -24 - #endif - #ifndef TOUCH_ORIENTATION - #define TOUCH_ORIENTATION TOUCH_LANDSCAPE - #endif +#define EXP1_03_PIN PD10 +#define EXP1_04_PIN PD11 +#define EXP1_05_PIN PE15 +#define EXP1_06_PIN PE14 +#define EXP1_07_PIN PC6 +#define EXP1_08_PIN PD13 +#define EXP1_09_PIN PE13 +#define EXP1_10_PIN PC5 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PE12 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PE11 +#define EXP2_07_PIN PE10 +#define EXP2_08_PIN PE8 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +// +// SPI SD Card +// +#if SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_DETECT_PIN EXP2_04_PIN +#endif - #define TFT_CS_PIN PD11 - #define TFT_SCK_PIN PA5 - #define TFT_MISO_PIN PA6 - #define TFT_MOSI_PIN PA7 - #define TFT_DC_PIN PD10 - #define TFT_RST_PIN PC6 +// +// LCD / Controller +// +#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_RST_PIN EXP1_07_PIN #define TFT_A0_PIN TFT_DC_PIN - #define TFT_RESET_PIN PC6 - #define TFT_BACKLIGHT_PIN PD13 + #define TFT_RESET_PIN EXP1_07_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - #define LCD_BACKLIGHT_PIN PD13 + #define LCD_BACKLIGHT_PIN EXP1_08_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif @@ -328,71 +333,85 @@ #define TFT_HEIGHT 320 #endif - #define TOUCH_CS_PIN PE14 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI - - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 + #define TOUCH_CS_PIN EXP1_06_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_09_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_10_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_05_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_SIZE 14400 + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -17253 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11579 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 514 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -24 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + #elif HAS_WIRED_LCD - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 - #define LCD_PINS_ENABLE PD13 - #define LCD_PINS_RS PC6 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN #define LCD_BACKLIGHT_PIN -1 // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) //#define LCD_BACKLIGHT_PIN -1 //#define LCD_RESET_PIN -1 - #define DOGLCD_A0 PD11 - #define DOGLCD_CS PE15 - //#define DOGLCD_SCK PA5 - //#define DOGLCD_MOSI PA7 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + //#define DOGLCD_SCK EXP2_09_PIN + //#define DOGLCD_MOSI EXP2_05_PIN // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B //#undef SHOW_BOOTSCREEN #elif ENABLED(MKS_MINI_12864_V3) - #define DOGLCD_CS PD13 - #define DOGLCD_A0 PC6 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN #define LCD_PINS_DC DOGLCD_A0 #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PE14 - #define NEOPIXEL_PIN PE15 - #define DOGLCD_MOSI PA7 - #define DOGLCD_SCK PA5 + #define LCD_RESET_PIN EXP1_06_PIN + #define NEOPIXEL_PIN EXP1_05_PIN + #define DOGLCD_MOSI EXP2_05_PIN + #define DOGLCD_SCK EXP2_09_PIN #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif //#define LCD_SCREEN_ROT_180 - #else // !MKS_MINI_12864 + #else // !MKS_MINI_12864 - #define LCD_PINS_D4 PE14 + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(ULTIPANEL) - #define LCD_PINS_D5 PE15 - #define LCD_PINS_D6 PD11 - #define LCD_PINS_D7 PD10 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #endif #define BOARD_ST7920_DELAY_1 DELAY_NS(96) #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif // !MKS_MINI_12864 #endif // HAS_WIRED_LCD + +#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI, HAS_WIRED_LCD) + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index a56889fc7e48..88e2d1804e90 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -258,13 +258,13 @@ #endif /** - * _____ _____ + * ----- ----- * (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) * (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS) * (LCD_D4)PE14 | · · | PE15(LCD_D5) (BTN_EN2) PE11 | · · | PA7 (SPI1 MOSI) * (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI DET) PE12 | · · | RESET * GND | · · | 5V GND | · · | 3.3V - *  ̄ ̄ ̄  ̄ ̄ ̄ + * ----- ----- * EXP1 EXP2 */ @@ -355,15 +355,9 @@ #define LCD_PINS_D7 PD10 #endif - #ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 DELAY_NS(600) - #endif + #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif // !MKS_MINI_12864 From 7dec5c2674d0d3c7e2ddebba0b3568dfee18434d Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 25 Aug 2021 00:57:08 +0000 Subject: [PATCH 251/323] [cron] Bump distribution date (2021-08-25) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ebd1fc9f9724..11e6508ba725 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-24" +//#define STRING_DISTRIBUTION_DATE "2021-08-25" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 6709b5b46ba5..c7e8ed99341b 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-24" + #define STRING_DISTRIBUTION_DATE "2021-08-25" #endif /** From 71c96db932134ce845855fd51d910a86d044261e Mon Sep 17 00:00:00 2001 From: Ryan V1 <55478432+V1EngineeringInc@users.noreply.github.com> Date: Tue, 24 Aug 2021 20:34:10 -0700 Subject: [PATCH 252/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Multi-Endstop=20st?= =?UTF-8?q?epping=20(#22625)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/stepper.cpp | 109 +++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 48 deletions(-) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 882f5efc3512..86e469827d79 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -257,25 +257,30 @@ xyze_int8_t Stepper::count_direction{0}; }; #endif -#define DUAL_ENDSTOP_APPLY_STEP(A,V) \ - if (separate_multi_axis) { \ - if (ENABLED(A##_HOME_TO_MIN)) { \ - if (TERN0(HAS_##A##_MIN, !(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor)) A##_STEP_WRITE(V); \ - if (TERN0(HAS_##A##2_MIN, !(TEST(endstops.state(), A##2_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##2_motor)) A##2_STEP_WRITE(V); \ - } \ - else { \ - if (TERN0(HAS_##A##_MAX, !(TEST(endstops.state(), A##_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##_motor)) A##_STEP_WRITE(V); \ - if (TERN0(HAS_##A##2_MAX, !(TEST(endstops.state(), A##2_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##2_motor)) A##2_STEP_WRITE(V); \ - } \ - } \ - else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ +#define MINDIR(A) (count_direction[_AXIS(A)] < 0) +#define MAXDIR(A) (count_direction[_AXIS(A)] > 0) + +#define STEPTEST(A,M,I) TERN0(HAS_ ##A## ##I## _ ##M, !(TEST(endstops.state(), A## ##I## _ ##M) && M## DIR(A)) && !locked_ ##A## ##I## _motor) + +#define DUAL_ENDSTOP_APPLY_STEP(A,V) \ + if (separate_multi_axis) { \ + if (ENABLED(A##_HOME_TO_MIN)) { \ + if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ + } \ + else if (ENABLED(A##_HOME_TO_MAX)) { \ + if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ + } \ + } \ + else { \ + A##_STEP_WRITE(V); \ + A##2_STEP_WRITE(V); \ } #define DUAL_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A##_motor) A##_STEP_WRITE(V); \ + if (!locked_##A## _motor) A## _STEP_WRITE(V); \ if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ } \ else { \ @@ -283,60 +288,68 @@ xyze_int8_t Stepper::count_direction{0}; A##2_STEP_WRITE(V); \ } -#define TRIPLE_ENDSTOP_APPLY_STEP(A,V) \ - if (separate_multi_axis) { \ - if (ENABLED(A##_HOME_TO_MIN)) { \ - if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##3_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##3_motor) A##3_STEP_WRITE(V); \ - } \ - else { \ - if (!(TEST(endstops.state(), A##_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##3_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##3_motor) A##3_STEP_WRITE(V); \ - } \ - } \ - else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ +#define TRIPLE_ENDSTOP_APPLY_STEP(A,V) \ + if (separate_multi_axis) { \ + if (ENABLED(A##_HOME_TO_MIN)) { \ + if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MIN,3)) A##3_STEP_WRITE(V); \ + } \ + else if (ENABLED(A##_HOME_TO_MAX)) { \ + if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MAX,3)) A##3_STEP_WRITE(V); \ + } \ + } \ + else { \ + A##_STEP_WRITE(V); \ + A##2_STEP_WRITE(V); \ + A##3_STEP_WRITE(V); \ } #define TRIPLE_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A##_motor) A##_STEP_WRITE(V); \ + if (!locked_##A## _motor) A## _STEP_WRITE(V); \ if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ if (!locked_##A##3_motor) A##3_STEP_WRITE(V); \ } \ else { \ - A##_STEP_WRITE(V); \ + A## _STEP_WRITE(V); \ A##2_STEP_WRITE(V); \ A##3_STEP_WRITE(V); \ } -#define QUAD_ENDSTOP_APPLY_STEP(A,V) \ - if (separate_multi_axis) { \ - if (!(TEST(endstops.state(), (TERN(A##_HOME_TO_MIN, A##_MIN, A##_MAX))) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), (TERN(A##_HOME_TO_MIN, A##2_MIN, A##2_MAX))) && count_direction[_AXIS(A)] < 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), (TERN(A##_HOME_TO_MIN, A##3_MIN, A##3_MAX))) && count_direction[_AXIS(A)] < 0) && !locked_##A##3_motor) A##3_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), (TERN(A##_HOME_TO_MIN, A##4_MIN, A##4_MAX))) && count_direction[_AXIS(A)] < 0) && !locked_##A##4_motor) A##4_STEP_WRITE(V); \ - } \ - else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ - A##4_STEP_WRITE(V); \ +#define QUAD_ENDSTOP_APPLY_STEP(A,V) \ + if (separate_multi_axis) { \ + if (ENABLED(A##_HOME_TO_MIN)) { \ + if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MIN,3)) A##3_STEP_WRITE(V); \ + if (STEPTEST(A,MIN,4)) A##4_STEP_WRITE(V); \ + } \ + else if (ENABLED(A##_HOME_TO_MAX)) { \ + if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MAX,3)) A##3_STEP_WRITE(V); \ + if (STEPTEST(A,MAX,4)) A##4_STEP_WRITE(V); \ + } \ + } \ + else { \ + A## _STEP_WRITE(V); \ + A##2_STEP_WRITE(V); \ + A##3_STEP_WRITE(V); \ + A##4_STEP_WRITE(V); \ } #define QUAD_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A##_motor) A##_STEP_WRITE(V); \ + if (!locked_##A## _motor) A## _STEP_WRITE(V); \ if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ if (!locked_##A##3_motor) A##3_STEP_WRITE(V); \ if (!locked_##A##4_motor) A##4_STEP_WRITE(V); \ } \ else { \ - A##_STEP_WRITE(V); \ + A## _STEP_WRITE(V); \ A##2_STEP_WRITE(V); \ A##3_STEP_WRITE(V); \ A##4_STEP_WRITE(V); \ From 181530db767b619e998c3c3c5f9b102bb008edfa Mon Sep 17 00:00:00 2001 From: Jin <3448324+jinhong-@users.noreply.github.com> Date: Thu, 26 Aug 2021 06:33:08 +0800 Subject: [PATCH 253/323] =?UTF-8?q?=F0=9F=A9=B9=20Use=20=20?= =?UTF-8?q?in=20MAX31865=20lib=20(#22618)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/libs/MAX31865.cpp | 26 +++++++++----------------- Marlin/src/libs/MAX31865.h | 1 + 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Marlin/src/libs/MAX31865.cpp b/Marlin/src/libs/MAX31865.cpp index 909adb3807c8..86c31edee983 100644 --- a/Marlin/src/libs/MAX31865.cpp +++ b/Marlin/src/libs/MAX31865.cpp @@ -44,7 +44,7 @@ //#define MAX31865_DEBUG //#define MAX31865_DEBUG_SPI -//TODO: switch to SPIclass/SoftSPI +#include #include "../inc/MarlinConfig.h" @@ -62,7 +62,7 @@ SPISettings MAX31865::spiConfig = SPISettings( 500000 #endif , MSBFIRST - , SPI_MODE_1 // CPOL0 CPHA1 + , SPI_MODE1 // CPOL0 CPHA1 ); #ifndef LARGE_PINMAP @@ -157,10 +157,9 @@ void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { #ifdef MAX31865_DEBUG SERIAL_ECHOLN("Initializing MAX31865 Software SPI"); #endif - - OUT_WRITE(_sclk, LOW); - SET_OUTPUT(_mosi); - SET_INPUT(_miso); + + swSpiBegin(_sclk, _miso, _mosi); + } else { // start and configure hardware SPI #ifdef MAX31865_DEBUG @@ -170,6 +169,9 @@ void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { SPI.begin(); } + // SPI Begin must be called first, then init + _spi_speed = swSpiInit(SPI_QUARTER_SPEED, _sclk, _mosi); + setWires(wires); enableBias(false); autoConvert(false); @@ -484,17 +486,7 @@ uint8_t MAX31865::spixfer(uint8_t x) { if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) return SPI.transfer(x); - uint8_t reply = 0; - for (int i = 7; i >= 0; i--) { - reply <<= 1; - WRITE(_sclk, HIGH); - WRITE(_mosi, x & (1 << i)); - WRITE(_sclk, LOW); - if (READ(_miso)) - reply |= 1; - } - - return reply; + return swSpiTransfer(x, _spi_speed, _sclk, _miso, _mosi); } #endif // HAS_MAX31865 && !LIB_USR_MAX31865 diff --git a/Marlin/src/libs/MAX31865.h b/Marlin/src/libs/MAX31865.h index 5d50e870ecd2..13a117447dca 100644 --- a/Marlin/src/libs/MAX31865.h +++ b/Marlin/src/libs/MAX31865.h @@ -90,6 +90,7 @@ class MAX31865 { static SPISettings spiConfig; TERN(LARGE_PINMAP, uint32_t, uint8_t) _sclk, _miso, _mosi, _cs; + uint8_t _spi_speed; float Rzero, Rref; void setConfig(uint8_t config, bool enable); From 88816548b65e464f2a3f77141197b74520d9c142 Mon Sep 17 00:00:00 2001 From: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Thu, 26 Aug 2021 01:05:06 +0200 Subject: [PATCH 254/323] =?UTF-8?q?=F0=9F=94=A8=20Melzi=20with=20OptiBoot?= =?UTF-8?q?=20build=20(#22630)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/pins.h | 2 +- Marlin/src/pins/sanguino/pins_ANET_10.h | 18 +++++++++++++++++- ini/avr.ini | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 1c3e1ac7cf8f..86283dae24fe 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -329,7 +329,7 @@ #elif MB(OMCA) #include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino644p #elif MB(ANET_10) - #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized env:melzi_optiboot #elif MB(SETHI) #include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index ac8fa80eb892..e54209ed6ac7 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -86,8 +86,24 @@ * Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community. */ +/** + * OptiBoot Bootloader: + * Optiboot is an alternative bootloader that can be flashed on the board to free up space for a larger firmware build. + * See https://github.com/Optiboot/optiboot for more information. + * + * Install Marlin with Arduino IDE: + * For a board with the stock bootloader, select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' + * For a board with OptiBoot, select 'Sanguino (Optiboot)' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' + * + * Install Marlin with PlatformIO IDE: + * (NOTE: You can set a default build environment by editing the value of 'default_env' in 'platformio.ini'. + * For the best user experience install the "Auto Build Marlin" extension.) + * For a board with the stock bootloader use Build / Upload under the 'sanguino1284p' or 'sanguino1284p_optimized' target. + * For a board with OptiBoot, use Build / Upload under the 'melzi_optiboot' target. + */ + #if NOT_TARGET(__AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'melzi' or 'melzi_optiboot.')" + #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'sanguino1284p' or 'sanguino1284p_optimized'. With optiboot, use 'melzi_optiboot.')" #endif #define BOARD_INFO_NAME "Anet 1.0" diff --git a/ini/avr.ini b/ini/avr.ini index 88f54a723cb5..e4d64de712a1 100644 --- a/ini/avr.ini +++ b/ini/avr.ini @@ -141,6 +141,7 @@ platform = atmelavr extends = common_avr8 board = sanguino_atmega1284p upload_speed = 115200 +board_upload.maximum_size = 130048 # # Melzi and clones (Zonestar Melzi2 with tuned flags) From 8889e68088ff8a71c5cafecdc8eb6455b1522627 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 26 Aug 2021 01:08:27 +0200 Subject: [PATCH 255/323] =?UTF-8?q?=F0=9F=A9=B9=20Tweak=20startup=20messag?= =?UTF-8?q?e=20(#22633)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/MarlinCore.cpp | 3 +-- Marlin/src/feature/ethernet.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 39ff4393d79c..6d4e0eab9054 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -1279,14 +1279,13 @@ void setup() { HAL_clear_reset_source(); SERIAL_ECHOLNPGM("Marlin " SHORT_BUILD_VERSION); - SERIAL_EOL(); #if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR) SERIAL_ECHO_MSG( " Last Updated: " STRING_DISTRIBUTION_DATE " | Author: " STRING_CONFIG_H_AUTHOR ); #endif - SERIAL_ECHO_MSG("Compiled: " __DATE__); + SERIAL_ECHO_MSG(" Compiled: " __DATE__); SERIAL_ECHO_MSG(STR_FREE_MEMORY, freeMemory(), STR_PLANNER_BUFFER_BYTES, sizeof(block_t) * (BLOCK_BUFFER_SIZE)); // Some HAL need precise delay adjustment diff --git a/Marlin/src/feature/ethernet.cpp b/Marlin/src/feature/ethernet.cpp index d4a95fa051fd..c5bfa932cb5b 100644 --- a/Marlin/src/feature/ethernet.cpp +++ b/Marlin/src/feature/ethernet.cpp @@ -147,7 +147,7 @@ void MarlinEthernet::check() { " | Author: " STRING_CONFIG_H_AUTHOR ); #endif - telnetClient.println("Compiled: " __DATE__); + telnetClient.println(" Compiled: " __DATE__); SERIAL_ECHOLNPGM("Client connected"); have_telnet_client = true; From 51160ee9879e03878d7774870bf4e30b48d0149f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 26 Aug 2021 00:55:12 +0000 Subject: [PATCH 256/323] [cron] Bump distribution date (2021-08-26) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 11e6508ba725..6a858d22a0d5 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-25" +//#define STRING_DISTRIBUTION_DATE "2021-08-26" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c7e8ed99341b..81fcb736be7d 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-25" + #define STRING_DISTRIBUTION_DATE "2021-08-26" #endif /** From 0c4085da01433c230731828a45ee7a91ae11b794 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 27 Aug 2021 01:01:36 +0000 Subject: [PATCH 257/323] [cron] Bump distribution date (2021-08-27) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 6a858d22a0d5..09cdc0b3fe38 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-26" +//#define STRING_DISTRIBUTION_DATE "2021-08-27" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 81fcb736be7d..54a368c2aa1b 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-26" + #define STRING_DISTRIBUTION_DATE "2021-08-27" #endif /** From 36e40b68c9d34c254dccea2cc135b1dca5a80ce9 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 27 Aug 2021 23:06:45 +0200 Subject: [PATCH 258/323] =?UTF-8?q?=F0=9F=94=A8=20Set=20Longer3D=20timers?= =?UTF-8?q?=20in=20variant=20(#22632)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../variants/MARLIN_F103VE_LONGER/PeripheralPins.c | 1 + .../variants/MARLIN_F103VE_LONGER/variant.h | 14 +++++++------- ini/stm32f1.ini | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c index 99226a739d80..23c1344fe9bd 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c @@ -154,6 +154,7 @@ WEAK const PinMap PinMap_PWM[] = { {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 3, 0)}, // TIM1_CH3 {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 4, 0)}, // TIM1_CH4 #endif // if 0 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 Part Fan {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 TFT Backlight {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 Servo connector {NC, NP, 0} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h index b0f2ddf0c22c..56ae719077ce 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h @@ -117,13 +117,13 @@ extern "C" { #define PIN_WIRE_SCL PB10 // Timer Definitions -// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin -#ifndef TIMER_TONE - #define TIMER_TONE TIM6 -#endif -#ifndef TIMER_SERVO - #define TIMER_SERVO TIM7 -#endif +// Leave TIMER 2 for optional Fan PWM +#define TEMP_TIMER 3 +// Leave TIMER 4 for TFT backlight PWM or Servo freq... +#define STEP_TIMER 5 +#define TIMER_TONE TIM6 +#define TIMER_SERVO TIM7 +#define TIMER_SERIAL TIM8 // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index dc9607ef844b..f1cb078fd81c 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -338,7 +338,7 @@ board_build.variant = MARLIN_F103VE_LONGER board_build.rename = project.bin board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 -build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DSTEP_TIMER=5 -DU20 -DTS_V12 +build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED extra_scripts = ${stm32_variant.extra_scripts} monitor_speed = 250000 From f6dc56d97933d0f7566f9fb1f8e775663d014d53 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 27 Aug 2021 17:23:08 -0500 Subject: [PATCH 259/323] =?UTF-8?q?=F0=9F=93=9D=20AlephObjects=20=3D>=20Lu?= =?UTF-8?q?lzBot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 6 +++--- Marlin/src/inc/SanityCheck.h | 2 ++ .../lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h | 2 +- Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h | 6 +++--- Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt | 5 +---- Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt | 4 +--- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8a07b5c97b12..80606df73396 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1737,7 +1737,7 @@ //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) - //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + //#define LCD_LULZBOT_CLCD_UI // LulzBot Color LCD UI //#define LCD_FYSETC_TFT81050 // FYSETC with 5" (800x480) //#define LCD_EVE3_50G // Matrix Orbital 5.0", 800x480, BT815 //#define LCD_EVE2_50G // Matrix Orbital 5.0", 800x480, FT813 @@ -1748,8 +1748,8 @@ //#define TOUCH_UI_800x480 // Mappings for boards with a standard RepRapDiscount Display connector - //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping - //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define AO_EXP1_PINMAP // LulzBot CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // LulzBot CLCD UI EXP2 mapping //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping //#define S6_TFT_PINMAP // FYSETC S6 pin mapping //#define F6_TFT_PINMAP // FYSETC F6 pin mapping diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index b679f2cb532d..e02e9035511e 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -589,6 +589,8 @@ #warning "Onboard temperature sensor for BOARD_DUE3DOM_MINI has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." #elif MOTHERBOARD == BOARD_BTT_SKR_E3_TURBO && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) #warning "Onboard temperature sensor for BOARD_BTT_SKR_E3_TURBO has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." +#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) + #warning "LCD_ALEPHOBJECTS_CLCD_UI is now LCD_LULZBOT_CLCD_UI." #endif constexpr float arm[] = AXIS_RELATIVE_MODES; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h index 19f926d8e086..5168ef76af4a 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h @@ -138,7 +138,7 @@ * Settings for the Aleph Objects Color LCD User Interface * Datasheet https://www.hantronix.com/files/data/s1501799605s500-gh7.pdf */ -#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) +#elif defined(LCD_LULZBOT_CLCD_UI) #if !HAS_RESOLUTION #define TOUCH_UI_800x480 #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h index 04cdbe96db9d..7c0bdd88e920 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h @@ -53,7 +53,7 @@ #elif ENABLED(AO_EXP1_DEPRECATED_PINMAP) /** - * This AlephObjects pinout re-purposes the UltraLCD + * This LulzBot pinout re-purposes the UltraLCD * connector EXP1 for Software SPI (rev B, obsolete) */ @@ -74,7 +74,7 @@ /** * AO_EXP1_PINMAP with TOUCH_UI_ULTIPANEL * - * This AlephObjects mapping re-purposes the UltraLCD + * This LulzBot mapping re-purposes the UltraLCD * connector EXP1 for Software SPI for display (rev C): * * EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD: @@ -106,7 +106,7 @@ /** * AO_EXP2_PINMAP with TOUCH_UI_ULTIPANEL * - * The AlephObjects mapping for re-purposing the UltraLCD + * The LulzBot mapping for re-purposing the UltraLCD * connector EXP2 for hardware SPI for display and SD card * or USB (rev C): * diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt b/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt index 5abcc8f2adfb..4e9bd84b9c71 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt @@ -40,7 +40,4 @@ under the "MIT" license, as documented here: ==== MARLIN INTEGRATION WORK ==== -All additional work done to integrate USB into Marlin was performed by AlephObjects, Inc. -and is licensed under the GPLv3. - --- marcio@alephobjects.com +All additional work done to integrate USB into Marlin was performed by LulzBot and is licensed under the GPLv3. diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt index 710b3f20b584..378786f940f3 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt @@ -16,7 +16,7 @@ usb_flashdrive/lib github.com/felis/UHS30 GPLv2 or later ==== MARLIN INTEGRATION WORK ==== All additional work done to integrate USB into Marlin was performed by -AlephObjects, Inc. and is licensed under the GPLv3. +LulzBot and is licensed under the GPLv3. This version of UHS3 has been modified for better compatibility with Marlin. The upstream version of UHS 3.0 runs a frame timer interrupt every 1 ms to @@ -27,5 +27,3 @@ IRQ. SKIP_PAGE3F and USB_NO_TEST_UNIT_READY were added to work around bugs with certain devices. - --- marcio@alephobjects.com From 3a8c509a9fea4c67227648ce9ac35f7434bd0f9e Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 28 Aug 2021 00:54:18 +0000 Subject: [PATCH 260/323] [cron] Bump distribution date (2021-08-28) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 09cdc0b3fe38..e1dd602e1e5e 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-27" +//#define STRING_DISTRIBUTION_DATE "2021-08-28" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 54a368c2aa1b..2dff3aa92f8a 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-27" + #define STRING_DISTRIBUTION_DATE "2021-08-28" #endif /** From d818a019c5d80e8b2238f0ea8311ad53154be4ec Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 28 Aug 2021 15:27:52 -0500 Subject: [PATCH 261/323] =?UTF-8?q?=F0=9F=8E=A8=20EXP=20headers,=20ST7920?= =?UTF-8?q?=20delays=20(#22641)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/HAL.h | 13 ++ Marlin/src/HAL/LINUX/HAL.h | 6 +- Marlin/src/HAL/LPC1768/HAL.h | 12 +- Marlin/src/HAL/NATIVE_SIM/HAL.h | 6 +- Marlin/src/HAL/STM32/HAL.h | 7 + Marlin/src/HAL/STM32F1/HAL.h | 7 + Marlin/src/HAL/TEENSY31_32/HAL.h | 6 +- Marlin/src/HAL/TEENSY35_36/HAL.h | 6 +- Marlin/src/HAL/TEENSY40_41/HAL.h | 6 +- Marlin/src/inc/Conditionals_LCD.h | 15 ++- .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 54 -------- Marlin/src/pins/esp32/pins_MRR_ESPE.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 1 - Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 17 ++- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 19 ++- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 1 - .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 1 - Marlin/src/pins/mega/pins_OVERLORD.h | 2 +- Marlin/src/pins/mega/pins_SILVER_GATE.h | 5 +- Marlin/src/pins/pins_postprocess.h | 38 +++++- Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 6 + Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 7 + Marlin/src/pins/rambo/pins_MINIRAMBO.h | 8 +- Marlin/src/pins/rambo/pins_RAMBO.h | 7 + Marlin/src/pins/ramps/pins_3DRAG.h | 7 + Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h | 6 +- Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h | 7 + Marlin/src/pins/ramps/pins_DAGOMA_F5.h | 6 +- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 15 +-- Marlin/src/pins/ramps/pins_K8600.h | 21 --- Marlin/src/pins/ramps/pins_MKS_GEN_13.h | 69 ++++------ Marlin/src/pins/ramps/pins_RAMPS.h | 124 ++++++++++------- Marlin/src/pins/sanguino/pins_MELZI.h | 13 ++ .../src/pins/sanguino/pins_MELZI_CREALITY.h | 28 ++-- Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h | 13 -- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 15 +-- Marlin/src/pins/sanguino/pins_MELZI_V2.h | 15 +-- .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 23 ---- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 7 +- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 126 ++++++++++-------- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 54 ++++---- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 109 ++++++++------- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 15 +-- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 15 +-- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 15 +-- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 15 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 12 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 119 +++++++++++------ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 15 +-- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 6 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 15 +-- Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 3 +- Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 3 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 15 +-- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 14 +- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 14 +- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 32 ++--- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 24 ++-- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 5 +- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 19 +-- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 14 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 14 +- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 1 - Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 19 +-- Marlin/src/pins/stm32f4/pins_VAKE403D.h | 14 +- 65 files changed, 630 insertions(+), 698 deletions(-) diff --git a/Marlin/src/HAL/AVR/HAL.h b/Marlin/src/HAL/AVR/HAL.h index a5896a0e970f..dc0a4f2074be 100644 --- a/Marlin/src/HAL/AVR/HAL.h +++ b/Marlin/src/HAL/AVR/HAL.h @@ -39,6 +39,19 @@ #include #include +// +// Default graphical display delays +// +#if F_CPU >= 20000000 + #define CPU_ST7920_DELAY_1 DELAY_NS(150) + #define CPU_ST7920_DELAY_2 DELAY_NS( 0) + #define CPU_ST7920_DELAY_3 DELAY_NS(150) +#elif F_CPU == 16000000 + #define CPU_ST7920_DELAY_1 DELAY_NS(125) + #define CPU_ST7920_DELAY_2 DELAY_NS( 0) + #define CPU_ST7920_DELAY_3 DELAY_NS(188) +#endif + #ifndef pgm_read_ptr // Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for // Windows Subsystem for Linux on Windows 10 as of 10/18/2019 diff --git a/Marlin/src/HAL/LINUX/HAL.h b/Marlin/src/HAL/LINUX/HAL.h index 36906bffc869..07ab85a9a090 100644 --- a/Marlin/src/HAL/LINUX/HAL.h +++ b/Marlin/src/HAL/LINUX/HAL.h @@ -63,9 +63,9 @@ uint8_t _getc(); extern MSerialT usb_serial; #define MYSERIAL1 usb_serial -#define ST7920_DELAY_1 DELAY_NS(600) -#define ST7920_DELAY_2 DELAY_NS(750) -#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 DELAY_NS(600) +#define CPU_ST7920_DELAY_2 DELAY_NS(750) +#define CPU_ST7920_DELAY_3 DELAY_NS(750) // // Interrupts diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h index 3f9cd2dfbd02..f0a1185ff246 100644 --- a/Marlin/src/HAL/LPC1768/HAL.h +++ b/Marlin/src/HAL/LPC1768/HAL.h @@ -50,15 +50,9 @@ extern "C" volatile uint32_t _millis; // // Default graphical display delays // -#ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 DELAY_NS(600) -#endif -#ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 DELAY_NS(750) -#endif -#ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 DELAY_NS(750) -#endif +#define CPU_ST7920_DELAY_1 DELAY_NS(600) +#define CPU_ST7920_DELAY_2 DELAY_NS(750) +#define CPU_ST7920_DELAY_3 DELAY_NS(750) typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1; extern DefaultSerial1 USBSerial; diff --git a/Marlin/src/HAL/NATIVE_SIM/HAL.h b/Marlin/src/HAL/NATIVE_SIM/HAL.h index d5c5782c36c3..400fafd711ca 100644 --- a/Marlin/src/HAL/NATIVE_SIM/HAL.h +++ b/Marlin/src/HAL/NATIVE_SIM/HAL.h @@ -99,9 +99,9 @@ extern MSerialT serial_stream_3; #endif -#define ST7920_DELAY_1 DELAY_NS(600) -#define ST7920_DELAY_2 DELAY_NS(750) -#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 DELAY_NS(600) +#define CPU_ST7920_DELAY_2 DELAY_NS(750) +#define CPU_ST7920_DELAY_3 DELAY_NS(750) // // Interrupts diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h index 02bee57ba3ac..d73f8b2d54d0 100644 --- a/Marlin/src/HAL/STM32/HAL.h +++ b/Marlin/src/HAL/STM32/HAL.h @@ -37,6 +37,13 @@ #include +// +// Default graphical display delays +// +#define CPU_ST7920_DELAY_1 DELAY_NS(300) +#define CPU_ST7920_DELAY_2 DELAY_NS( 40) +#define CPU_ST7920_DELAY_3 DELAY_NS(340) + // // Serial Ports // diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index b3d8dc9d0b3e..7efb761c2806 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -51,6 +51,13 @@ // Defines // ------------------------ +// +// Default graphical display delays +// +#define CPU_ST7920_DELAY_1 DELAY_NS(300) +#define CPU_ST7920_DELAY_2 DELAY_NS( 40) +#define CPU_ST7920_DELAY_3 DELAY_NS(340) + #ifndef STM32_FLASH_SIZE #if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE) #define STM32_FLASH_SIZE 512 diff --git a/Marlin/src/HAL/TEENSY31_32/HAL.h b/Marlin/src/HAL/TEENSY31_32/HAL.h index 8baa7936f5f8..d4b3c0a772aa 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL.h +++ b/Marlin/src/HAL/TEENSY31_32/HAL.h @@ -36,9 +36,9 @@ #include -#define ST7920_DELAY_1 DELAY_NS(600) -#define ST7920_DELAY_2 DELAY_NS(750) -#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 DELAY_NS(600) +#define CPU_ST7920_DELAY_2 DELAY_NS(750) +#define CPU_ST7920_DELAY_3 DELAY_NS(750) //#undef MOTHERBOARD //#define MOTHERBOARD BOARD_TEENSY31_32 diff --git a/Marlin/src/HAL/TEENSY35_36/HAL.h b/Marlin/src/HAL/TEENSY35_36/HAL.h index 26c35223bd48..0b82a569f904 100644 --- a/Marlin/src/HAL/TEENSY35_36/HAL.h +++ b/Marlin/src/HAL/TEENSY35_36/HAL.h @@ -37,9 +37,9 @@ #include #include -#define ST7920_DELAY_1 DELAY_NS(600) -#define ST7920_DELAY_2 DELAY_NS(750) -#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 DELAY_NS(600) +#define CPU_ST7920_DELAY_2 DELAY_NS(750) +#define CPU_ST7920_DELAY_3 DELAY_NS(750) // ------------------------ // Defines diff --git a/Marlin/src/HAL/TEENSY40_41/HAL.h b/Marlin/src/HAL/TEENSY40_41/HAL.h index 1d00447fe894..14f14bf446c7 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL.h +++ b/Marlin/src/HAL/TEENSY40_41/HAL.h @@ -41,9 +41,9 @@ #include "../../feature/ethernet.h" #endif -//#define ST7920_DELAY_1 DELAY_NS(600) -//#define ST7920_DELAY_2 DELAY_NS(750) -//#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 DELAY_NS(600) +#define CPU_ST7920_DELAY_2 DELAY_NS(750) +#define CPU_ST7920_DELAY_3 DELAY_NS(750) // ------------------------ // Defines diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index c4309db144eb..bfbe5ba6cf1a 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -237,11 +237,18 @@ #elif ENABLED(CR10_STOCKDISPLAY) #define IS_RRD_FG_SC 1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define LCD_ST7920_DELAY_1 DELAY_NS(125) + #define LCD_ST7920_DELAY_2 DELAY_NS(125) + #define LCD_ST7920_DELAY_3 DELAY_NS(125) -#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER) +#elif ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) + + #define IS_RRD_FG_SC 1 + #define LCD_ST7920_DELAY_1 DELAY_NS(150) + #define LCD_ST7920_DELAY_2 DELAY_NS(150) + #define LCD_ST7920_DELAY_3 DELAY_NS(150) + +#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER) #define IS_RRD_FG_SC 1 diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index 4abf91edbd6e..20c8cec0cf34 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -33,60 +33,6 @@ #include "ultralcd_st7920_u8glib_rrd_AVR.h" -#if F_CPU >= 20000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(150) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(150) -#elif MB(3DRAG, K8200, K8400) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(188) - #define CPU_ST7920_DELAY_3 DELAY_NS(0) -#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO, SILVER_GATE) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(250) - #define CPU_ST7920_DELAY_3 DELAY_NS(0) -#elif MB(RAMBO) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(0) -#elif MB(BQ_ZUM_MEGA_3D) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(189) -#elif defined(ARDUINO_ARCH_STM32) - #define CPU_ST7920_DELAY_1 DELAY_NS(300) - #define CPU_ST7920_DELAY_2 DELAY_NS(40) - #define CPU_ST7920_DELAY_3 DELAY_NS(340) -#elif F_CPU == 16000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(125) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(188) -#else - #error "No valid condition for delays in 'ultralcd_st7920_u8glib_rrd_AVR.h'" -#endif - -#ifndef ST7920_DELAY_1 - #ifdef BOARD_ST7920_DELAY_1 - #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1 - #else - #define ST7920_DELAY_1 CPU_ST7920_DELAY_1 - #endif -#endif -#ifndef ST7920_DELAY_2 - #ifdef BOARD_ST7920_DELAY_2 - #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2 - #else - #define ST7920_DELAY_2 CPU_ST7920_DELAY_2 - #endif -#endif -#ifndef ST7920_DELAY_3 - #ifdef BOARD_ST7920_DELAY_3 - #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3 - #else - #define ST7920_DELAY_3 CPU_ST7920_DELAY_3 - #endif -#endif - // Optimize this code with -O3 #pragma GCC optimize (3) diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index f156efd2e8a9..8b4ec8b19735 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -122,7 +122,7 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_MARLINUI_U8GLIB +#if HAS_WIRED_LCD #define LCD_PINS_RS 13 #define LCD_PINS_ENABLE 17 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index c01afccacabc..b74870b30fef 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -63,7 +63,6 @@ * ------ ------ * EXP2 EXP1 */ - #define EXP1_03_PIN -1 #define EXP1_04_PIN -1 #define EXP1_05_PIN -1 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 1ce6aed7003c..56944273e38b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -184,16 +184,15 @@ #endif /** - * ------ ------ - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | 1.31 (SD_DETECT) (LCD_D7) 1.23 | 3 4 | 1.22 (LCD_D6) - * (MOSI) 0.18 | 5 6 3.25 (BTN_EN2) (LCD_D5) 1.21 | 5 6 1.20 (LCD_D4) - * (SD_SS) 0.16 | 7 8 | 3.26 (BTN_EN1) (LCD_RS) 1.19 | 7 8 | 1.18 (LCD_EN) - * (SCK) 0.15 | 9 10 | 0.17 (MISO) (BTN_ENC) 0.28 | 9 10 | 1.30 (BEEPER) - * ------ ------ - * EXP2 EXP1 + * ------ ------ + * (BEEPER) 1.30 |10 9 | 0.28 (BTN_ENC) (MISO) 0.17 |10 9 | 0.15 (SCK) + * (LCD_EN) 1.18 | 8 7 | 1.19 (LCD_RS) (BTN_EN1) 3.26 | 8 7 | 0.16 (SD_SS) + * (LCD_D4) 1.20 6 5 | 1.21 (LCD_D5) (BTN_EN2) 3.25 6 5 | 0.18 (MOSI) + * (LCD_D6) 1.22 | 4 3 | 1.23 (LCD_D7) (SD_DETECT) 1.31 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - #define EXP1_03_PIN P1_23 #define EXP1_04_PIN P1_22 #define EXP1_05_PIN P1_21 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index ae6456a3ce4d..58f2ac280849 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -239,16 +239,15 @@ #define TMC_BAUD_RATE 19200 #endif -/** ------ ------ - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22 - * 0.18 | 5 6 3.25 1.21 | 5 6 1.20 - * 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18 - * 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30 - * ------ ------ - * EXP2 EXP1 +/** ------ ------ + * 1.30 |10 9 | 0.28 0.17 |10 9 | 0.15 + * 1.18 | 8 7 | 1.19 3.26 | 8 7 | 0.16 + * 1.20 6 5 | 1.21 3.25 6 5 | 0.18 + * 1.22 | 4 3 | 1.23 1.31 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - #define EXP1_03_PIN P1_23 #define EXP1_04_PIN P1_22 #define EXP1_05_PIN P1_21 @@ -258,7 +257,7 @@ #define EXP1_09_PIN P0_28 #define EXP1_10_PIN P1_30 -#define EXP2_03_PIN -1 +#define EXP2_03_PIN -1 // RESET #define EXP2_04_PIN P1_31 #define EXP2_05_PIN P0_18 #define EXP2_06_PIN P3_25 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 49dad8b07b43..fe2a71ae0312 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -237,7 +237,6 @@ * ------ ------ * EXP1 EXP2 */ - #define EXP1_03_PIN P1_22 #define EXP1_04_PIN P1_00 #define EXP1_05_PIN P0_17 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index c2d2621bc1c9..af7b7d7e58ae 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -188,7 +188,6 @@ * ------ * EXP */ - #define EXP1_03_PIN P0_18 #define EXP1_04_PIN P0_17 #define EXP1_05_PIN P0_15 diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 161820b67a8e..0884d8ecb514 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -119,7 +119,7 @@ // // LCD / Controller // -#if HAS_MARLINUI_U8GLIB +#if HAS_WIRED_LCD // OVERLORD OLED pins #define LCD_PINS_RS 20 #define LCD_PINS_D5 21 diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 41cbe5e0e078..0828b32aa90c 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -72,7 +72,7 @@ #define HEATER_BED_PIN 8 #define TEMP_BED_PIN 6 -#if HAS_MARLINUI_U8GLIB +#if HAS_WIRED_LCD #if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 #define LCD_PINS_RS 30 #define LCD_PINS_ENABLE 20 @@ -86,6 +86,9 @@ #define KILL_PIN 21 #define HOME_PIN 28 #endif + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) #endif #endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index fc82e600df04..aa2bc07908c0 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -1221,23 +1221,47 @@ // // Default DOGLCD SPI delays // -#if HAS_MARLINUI_U8GLIB - #if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1) - #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1 +#if ENABLED(U8GLIB_ST7920) + #ifndef ST7920_DELAY_1 + #ifdef LCD_ST7920_DELAY_1 + #define ST7920_DELAY_1 LCD_ST7920_DELAY_1 + #elif defined(BOARD_ST7920_DELAY_1) + #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1 + #elif defined(CPU_ST7920_DELAY_1) + #define ST7920_DELAY_1 CPU_ST7920_DELAY_1 + #endif #endif - #if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2) - #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2 + #ifndef ST7920_DELAY_2 + #ifdef LCD_ST7920_DELAY_2 + #define ST7920_DELAY_2 LCD_ST7920_DELAY_2 + #elif defined(BOARD_ST7920_DELAY_2) + #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2 + #elif defined(CPU_ST7920_DELAY_2) + #define ST7920_DELAY_2 CPU_ST7920_DELAY_2 + #endif #endif - #if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3) - #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3 + #ifndef ST7920_DELAY_3 + #ifdef LCD_ST7920_DELAY_3 + #define ST7920_DELAY_3 LCD_ST7920_DELAY_3 + #elif defined(BOARD_ST7920_DELAY_3) + #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3 + #elif defined(CPU_ST7920_DELAY_3) + #define ST7920_DELAY_3 CPU_ST7920_DELAY_3 + #endif #endif #else #undef ST7920_DELAY_1 #undef ST7920_DELAY_2 #undef ST7920_DELAY_3 + #undef LCD_ST7920_DELAY_1 + #undef LCD_ST7920_DELAY_2 + #undef LCD_ST7920_DELAY_3 #undef BOARD_ST7920_DELAY_1 #undef BOARD_ST7920_DELAY_2 #undef BOARD_ST7920_DELAY_3 + #undef CPU_ST7920_DELAY_1 + #undef CPU_ST7920_DELAY_2 + #undef CPU_ST7920_DELAY_3 #endif #if !NEED_CASE_LIGHT_PIN diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index 78465dd7a806..dbb34f6585be 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -205,4 +205,10 @@ #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_WIRED_LCD +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) +#endif + #undef MK3_FAN_PINS diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 0c072745d57b..5d8ffc07aad4 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -199,3 +199,10 @@ #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) +#endif diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index ec44cc3b3661..62575506971a 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -69,7 +69,7 @@ #define E0_DIR_PIN 43 #define E0_ENABLE_PIN 26 -// Microstepping pins - Mapping not from fastio.h (?) +// Microstepping pins #define X_MS1_PIN 40 #define X_MS2_PIN 41 #define Y_MS1_PIN 69 @@ -192,3 +192,9 @@ #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL + +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(250) + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) +#endif diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index f2d34dc00d79..a77cb3d93f30 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -268,3 +268,10 @@ #endif // !IS_NEWPANEL #endif // HAS_WIRED_LCD + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(0) + #define BOARD_ST7920_DELAY_3 DELAY_NS(0) +#endif diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index e78f7683f607..3f38ecb2118d 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -80,6 +80,7 @@ #if IS_ULTRA_LCD && IS_NEWPANEL #undef BEEPER_PIN + // TODO: Remap EXP1/2 based on adapter #undef LCD_PINS_RS #undef LCD_PINS_ENABLE #undef LCD_PINS_D4 @@ -107,6 +108,12 @@ #endif // IS_ULTRA_LCD && IS_NEWPANEL +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(188) + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) +#endif + /** * M3/M4/M5 - Spindle/Laser Control * diff --git a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h index 97ef1b4fd869..4d7a79263570 100644 --- a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h +++ b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h @@ -38,12 +38,10 @@ #define SPINDLE_DIR_PIN 67 #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM -#include "pins_RAMPS.h" - // // Temperature Sensors // -#undef TEMP_0_PIN -#undef TEMP_1_PIN #define TEMP_0_PIN 9 // Analog Input #define TEMP_1_PIN 11 // Analog Input + +#include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 99cf484de7f0..5b3ed4c6a5b2 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -123,3 +123,10 @@ #undef HEATER_BED_PIN #define HEATER_BED_PIN 8 #endif + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_3 DELAY_NS(189) +#endif diff --git a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h index 8dc93c833b3b..4f25110ca249 100644 --- a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h +++ b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h @@ -39,10 +39,8 @@ #define FIL_RUNOUT2_PIN 14 #endif -// -// LCD delays -// -#if HAS_MARLINUI_U8GLIB +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) #define BOARD_ST7920_DELAY_1 DELAY_NS(0) #define BOARD_ST7920_DELAY_2 DELAY_NS(250) #define BOARD_ST7920_DELAY_3 DELAY_NS(250) diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 5f645e5d957a..0398d36f93f1 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -198,14 +198,9 @@ #define LCD_PINS_D7 29 #endif -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(200) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(200) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(200) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(200) + #define BOARD_ST7920_DELAY_2 DELAY_NS(200) + #define BOARD_ST7920_DELAY_3 DELAY_NS(200) #endif diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index 47b52e75e80d..9049308ba87a 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -60,30 +60,9 @@ // // Steppers // -#undef X_STEP_PIN -#undef X_DIR_PIN -#undef X_ENABLE_PIN -#define X_STEP_PIN 54 -#define X_DIR_PIN 55 -#define X_ENABLE_PIN 38 - -#undef Y_STEP_PIN -#undef Y_DIR_PIN -#undef Y_ENABLE_PIN -#define Y_STEP_PIN 60 -#define Y_DIR_PIN 61 -#define Y_ENABLE_PIN 56 - #undef Z_ENABLE_PIN #define Z_ENABLE_PIN 63 -#undef E0_STEP_PIN -#undef E0_DIR_PIN -#undef E0_ENABLE_PIN -#define E0_STEP_PIN 26 -#define E0_DIR_PIN 28 -#define E0_ENABLE_PIN 24 - // // Heaters / Fans // diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 08dd0f44bdfe..4742ac9b0d25 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -54,6 +54,9 @@ #include "pins_RAMPS.h" +#undef EXP2_03_PIN +#define EXP2_03_PIN -1 // RESET + // // LCD / Controller // @@ -81,19 +84,21 @@ * * This configuration uses the following arrangement: * - * EXP1 D37 = EN2 D35 = EN1 EXP2 D50 = MISO D52 = SCK - * D17 = BLUE D16 = RED D31 = ENC D53 = SDCS - * D23 = KILL D25 = BUZZ D33 = --- D51 = MOSI - * D27 = A0 D29 = LCS D49 = SDCD RST = --- - * GND = GND 5V = 5V GND = --- D41 = --- + * ------ ------ + * ENCB |10 9 | ENCA MISO |10 9 | SCK + * BLUE_LED | 8 7 | RED_LED ENCBTN | 8 7 | SDCS + * KILL 6 5 | BEEPER 6 5 | MOSI + * A0 | 4 3 | LCD_CS SDCD | 4 3 | + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - + #undef SD_DETECT_PIN #undef BTN_EN1 #undef BTN_EN2 #undef BTN_ENC #undef DOGLCD_A0 #undef DOGLCD_CS - #undef SD_DETECT_PIN #undef BEEPER_PIN #undef KILL_PIN #undef STAT_LED_RED_PIN @@ -102,46 +107,24 @@ // // VIKI2 12-wire lead // + #define SD_DETECT_PIN EXP2_04_PIN // SDCD orange/white + #define BTN_EN1 EXP1_09_PIN // ENCA white + #define BTN_EN2 EXP1_10_PIN // ENCB green + #define BTN_ENC EXP2_08_PIN // ENCBTN purple + #define DOGLCD_A0 EXP1_04_PIN // A0 brown + #define DOGLCD_CS EXP1_03_PIN // LCS green/white - // orange/white SDCD - #define SD_DETECT_PIN 49 - - // white ENCA - #define BTN_EN1 35 - - // green ENCB - #define BTN_EN2 37 - - // purple ENCBTN - #define BTN_ENC 31 - - // brown A0 - #define DOGLCD_A0 27 + // EXP2_10_PIN gray MISO + // EXP2_05_PIN yellow MOSI + // EXP2_09_PIN orange SCK - // green/white LCS - #define DOGLCD_CS 29 - - // 50 gray MISO - // 51 yellow MOSI - // 52 orange SCK - - // blue SDCS - //#define SDSS 53 + //#define SDSS EXP2_07_PIN // SDCS blue // // VIKI2 4-wire lead // - - // blue BTN - #define KILL_PIN 23 - - // green BUZZER - #define BEEPER_PIN 25 - - // yellow RED-LED - #define STAT_LED_RED_PIN 16 - - // white BLUE-LED - #define STAT_LED_BLUE_PIN 17 - + #define KILL_PIN EXP1_06_PIN // BTN blue + #define BEEPER_PIN EXP1_05_PIN // BUZZER green + #define STAT_LED_RED_PIN EXP1_07_PIN // RED-LED yellow + #define STAT_LED_BLUE_PIN EXP1_08_PIN // BLUE-LED white #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 1683ccf5c82d..b51d212f4f3d 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -120,14 +120,14 @@ #define X_DIR_PIN 55 #define X_ENABLE_PIN 38 #ifndef X_CS_PIN - #define X_CS_PIN EXP2_07_PIN + #define X_CS_PIN AUX3_03_PIN #endif #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 #define Y_ENABLE_PIN 56 #ifndef Y_CS_PIN - #define Y_CS_PIN EXP2_04_PIN + #define Y_CS_PIN AUX3_07_PIN #endif #ifndef Z_STEP_PIN @@ -242,7 +242,7 @@ // Misc. Functions // #ifndef SDSS - #define SDSS EXP2_07_PIN + #define SDSS AUX3_03_PIN #endif #define LED_PIN 13 @@ -424,58 +424,79 @@ #endif // -// Aux 3 GND D52 D50 5V -// NC D53 D51 D49 +// AUX3 : GND D52 D50 5V +// NC D53 D51 D49 + +#define AUX3_03_PIN 53 +#define AUX3_04_PIN 52 +#define AUX3_05_PIN 51 +#define AUX3_06_PIN 50 +#define AUX3_07_PIN 49 // -// Aux 4 D16 D17 D23 D25 D27 D29 D31 D33 D35 D37 D39 D41 D43 D45 D47 D32 GND 5V +// AUX4 : D16 D17 D23 D25 D27 D29 D31 D33 D35 D37 D39 D41 D43 D45 D47 D32 GND 5V // +#define AUX4_03_PIN 32 +#define AUX4_04_PIN 47 +#define AUX4_05_PIN 45 +#define AUX4_06_PIN 43 +#define AUX4_07_PIN 41 +#define AUX4_08_PIN 39 +#define AUX4_09_PIN 37 +#define AUX4_10_PIN 35 +#define AUX4_11_PIN 33 +#define AUX4_12_PIN 31 +#define AUX4_13_PIN 29 +#define AUX4_14_PIN 27 +#define AUX4_15_PIN 25 +#define AUX4_16_PIN 23 +#define AUX4_17_PIN 17 +#define AUX4_18_PIN 16 + /** - * LCD adapter. Please note: These comes in two variants. The socket keys can be + * LCD adapter. NOTE: These come in two variants. The socket keys can be * on either side, and may be backwards on some boards / displays. - * ----- ----- - * D37 |10 9 | D35 (MISO) D50 |10 9 | D52 (SCK) - * D17 | 8 7 | D16 D31 | 8 7 | D53 - * D23 6 5 D25 D33 6 5 D51 (MOSI) - * D27 | 4 3 | D29 D49 | 4 3 | D41 - * GND | 2 1 | 5V GND | 2 1 | NC - * ----- ----- - * EXP1 EXP2 + * ------ ------ + * D37 |10 9 | D35 (MISO) D50 |10 9 | D52 (SCK) + * D17 | 8 7 | D16 D31 | 8 7 | D53 + * D23 6 5 D25 D33 6 5 D51 (MOSI) + * D27 | 4 3 | D29 D49 | 4 3 | D41 + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - #ifndef EXP1_03_PIN - #define EXP1_03_PIN 29 - #define EXP1_04_PIN 27 - #define EXP1_05_PIN 25 - #define EXP1_06_PIN 23 - #define EXP1_07_PIN 16 - #define EXP1_08_PIN 17 - #define EXP1_09_PIN 35 - #define EXP1_10_PIN 37 - - #define EXP2_03_PIN 41 - #define EXP2_04_PIN 49 - #define EXP2_05_PIN 51 - #define EXP2_06_PIN 33 - #define EXP2_07_PIN 53 - #define EXP2_08_PIN 31 - #define EXP2_09_PIN 52 - #define EXP2_10_PIN 50 + #define EXP1_03_PIN AUX4_13_PIN + #define EXP1_04_PIN AUX4_14_PIN + #define EXP1_05_PIN AUX4_15_PIN + #define EXP1_06_PIN AUX4_16_PIN + #define EXP1_07_PIN AUX4_18_PIN + #define EXP1_08_PIN AUX4_17_PIN + #define EXP1_09_PIN AUX4_10_PIN + #define EXP1_10_PIN AUX4_09_PIN + + #define EXP2_03_PIN AUX4_07_PIN + #define EXP2_04_PIN AUX3_07_PIN + #define EXP2_05_PIN AUX3_05_PIN + #define EXP2_06_PIN AUX4_11_PIN + #define EXP2_07_PIN AUX3_03_PIN + #define EXP2_08_PIN AUX4_12_PIN + #define EXP2_09_PIN AUX3_04_PIN + #define EXP2_10_PIN AUX3_06_PIN #endif ////////////////////////// // LCDs and Controllers // ////////////////////////// -// GLCD features -// Uncomment screen orientation -//#define LCD_SCREEN_ROT_90 -//#define LCD_SCREEN_ROT_180 -//#define LCD_SCREEN_ROT_270 - #if HAS_WIRED_LCD + // Uncomment screen orientation + //#define LCD_SCREEN_ROT_90 + //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_270 + // // LCD Display output pins // @@ -587,7 +608,7 @@ #endif #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define LCD_BACKLIGHT_PIN 39 + #define LCD_BACKLIGHT_PIN AUX4_08_PIN #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) @@ -599,9 +620,9 @@ #elif ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 47 - #define BTN_EN2 43 - #define BTN_ENC 32 + #define BTN_EN1 AUX4_04_PIN + #define BTN_EN2 AUX4_06_PIN + #define BTN_ENC AUX4_03_PIN #define LCD_SDSS SDSS #define KILL_PIN EXP2_03_PIN @@ -725,13 +746,23 @@ // Pins only defined for RAMPS_SMART currently + #elif ENABLED(G3D_PANEL) + + #define BEEPER_PIN EXP2_06_PIN + + #define SD_DETECT_PIN EXP2_04_PIN + #define KILL_PIN EXP2_03_PIN + + #define BTN_EN1 EXP1_10_PIN + #define BTN_EN2 EXP1_09_PIN + #define BTN_ENC EXP2_08_PIN + #elif IS_TFTGLCD_PANEL #define SD_DETECT_PIN EXP2_04_PIN #else - // Beeper on AUX-4 #define BEEPER_PIN EXP2_06_PIN // Buttons are directly attached to AUX-2 @@ -745,11 +776,6 @@ #define BTN_ENC EXP2_08_PIN #endif - #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN EXP2_04_PIN - #define KILL_PIN EXP2_03_PIN - #endif - #endif #endif // IS_NEWPANEL diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h index de4dd1b01d10..8f2729f8f079 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI.h +++ b/Marlin/src/pins/sanguino/pins_MELZI.h @@ -31,4 +31,17 @@ #define IS_MELZI 1 +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 DELAY_NS(188) + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #endif +#endif + #include "pins_SANGUINOLOLU_12.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index d4915c9cca2e..81ccf5977e68 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -36,16 +36,10 @@ #define BOARD_INFO_NAME "Melzi (Creality)" // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif #include "pins_MELZI.h" @@ -137,11 +131,11 @@ /** * EXP1 Connector EXP1 as CR10 STOCKDISPLAY - * ----- ----- - * PA4 | 6 5 | PC0 BEEPER_PIN | 6 5 | BTN_ENC - * PD3 | 7 4 | RESET BTN_EN1 | 7 4 | RESET - * PD2 8 3 | PA1 BTN_EN2 8 3 | LCD_PINS_D4 (ST9720 CLK) - * PA3 | 9 2 | PC1 (ST9720 CS) LCD_PINS_RS | 9 2 | LCD_PINS_ENABLE (ST9720 DAT) - * GND |10 1 | 5V GND |10 1 | 5V - * ----- ----- + * ------ ------ + * PA4 |10 9 | PC0 BEEPER_PIN |10 9 | BTN_ENC + * PD3 | 8 7 | RESET BTN_EN1 | 8 7 | RESET + * PD2 6 5 | PA1 BTN_EN2 6 5 | LCD_PINS_D4 (ST9720 CLK) + * PA3 | 4 3 | PC1 (ST9720 CS) LCD_PINS_RS | 4 3 | LCD_PINS_ENABLE (ST9720 DAT) + * GND | 2 1 | 5V GND | 2 1 | 5V + * ------ ------ */ diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h index 8b4faeeaf909..3bf8f804570b 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h @@ -27,19 +27,6 @@ #define BOARD_INFO_NAME "Melzi (Malyan)" -// Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif -#endif - #include "pins_MELZI.h" #undef LCD_SDSS diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index f87894103771..e88a38561d1c 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -27,16 +27,11 @@ #define BOARD_INFO_NAME "Melzi (Tronxy)" -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h index e0369923c7d5..c1fb7fb6f787 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h @@ -24,16 +24,11 @@ #define BOARD_INFO_NAME "Melzi V2" -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(400) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_2 DELAY_NS(400) + #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index d79ad7a3dda8..8dd6171b9255 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -165,16 +165,6 @@ #define KILL_PIN 10 #define BEEPER_PIN 27 - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif - #elif ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if IS_MELZI @@ -185,19 +175,6 @@ // Marlin so this can be used for BEEPER_PIN. You can use this pin // with M42 instead of BEEPER_PIN. #define BEEPER_PIN 27 - - #if IS_RRD_FG_SC - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif - #endif - #else // Sanguinololu >=1.3 #define LCD_PINS_RS 4 #define LCD_PINS_ENABLE 17 diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index 0265ae0a64f5..cb2dec160029 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -189,10 +189,9 @@ #endif #define LCD_PINS_D4 10 // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module) - // Alter timing for graphical display - #define ST7920_DELAY_1 DELAY_2_NOP - #define ST7920_DELAY_2 DELAY_2_NOP - #define ST7920_DELAY_3 DELAY_2_NOP + #define BOARD_ST7920_DELAY_1 DELAY_2_NOP + #define BOARD_ST7920_DELAY_2 DELAY_2_NOP + #define BOARD_ST7920_DELAY_3 DELAY_2_NOP #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) // diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 441f9350e36f..5d23466071a3 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -68,7 +68,7 @@ #define E0_DIR_PIN PB0 #define E0_ENABLE_PIN PC4 -#if ENABLED(TMC_USE_SW_SPI) +#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2 #ifndef TMC_SW_SCK #define TMC_SW_SCK PB3 #endif @@ -93,33 +93,48 @@ #define TEMP_BED_PIN PB1 // Analog Input #define TEMP_0_PIN PA0 // Analog Input -// -// LCD Pins -// - -/** - * ----- ----- - * NC | · · | GND 5V | · · | GND - * RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6) - * (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4) - * (SD_SS) PA15 | · · | PD2 (BTN_EN1) (LCD_RS) PC12 | · · | PB6 (LCD_EN) - * (SCK) PB3 | · · | PB4 (MISO) (BTN_ENC) PC11 | · · | PC10 (BEEPER) - * ----- ----- - * EXP2 EXP1 +/** ------ ------ + * (BEEPER) PC10 |10 9 | PC11 (BTN_ENC) (MISO) PB4 |10 9 | PB3 (SCK) + * (LCD_EN) PB6 | 8 7 | PC12 (LCD_RS) (BTN_EN1) PD2 | 8 7 | PA15 (SD_SS) + * (LCD_D4) PC13 | 6 5 | PB7 (LCD_D5) (BTN_EN2) PB8 | 6 5 | PB5 (MOSI) + * (LCD_D6) PC15 | 4 3 | PC14 (LCD_D7) (SD_DETECT) PB9 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_03_PIN PC14 +#define EXP1_04_PIN PC15 +#define EXP1_05_PIN PB7 +#define EXP1_06_PIN PC13 +#define EXP1_07_PIN PC12 +#define EXP1_08_PIN PB6 +#define EXP1_09_PIN PC11 +#define EXP1_10_PIN PC10 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB9 +#define EXP2_05_PIN PB5 +#define EXP2_06_PIN PB8 +#define EXP2_07_PIN PA15 +#define EXP2_08_PIN PD2 +#define EXP2_09_PIN PB3 +#define EXP2_10_PIN PB4 +// +// LCD / Controller +// #if HAS_WIRED_LCD - #define BEEPER_PIN PC10 - #define BTN_ENC PC11 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS PC15 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 PB6 - #define BTN_EN2 PC13 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE PC14 - #define LCD_PINS_D4 PB7 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif IS_TFTGLCD_PANEL @@ -127,56 +142,56 @@ #undef BTN_ENC #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS PD2 + #define TFTGLCD_CS EXP2_08_PIN #endif - #define SD_DETECT_PIN PB9 + #define SD_DETECT_PIN EXP2_04_PIN #else - #define LCD_PINS_RS PC12 + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 PD2 - #define BTN_EN2 PB8 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_PINS_ENABLE PB6 + #define LCD_PINS_ENABLE EXP1_08_PIN #if ENABLED(FYSETC_MINI_12864) #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PC13 - #define DOGLCD_A0 PC12 - #define DOGLCD_CS PB6 - #define DOGLCD_SCK PB3 - #define DOGLCD_MOSI PB5 + #define LCD_RESET_PIN EXP1_06_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define FORCE_SOFT_SPI // SPI MODE3 - #define LED_PIN PB7 // red pwm - //#define LED_PIN PC15 // green - //#define LED_PIN PC14 // blue + #define LED_PIN EXP1_05_PIN // red pwm + //#define LED_PIN EXP1_04_PIN // green + //#define LED_PIN EXP1_03_PIN // blue //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) // #ifndef RGB_LED_R_PIN - // #define RGB_LED_R_PIN PB7 + // #define RGB_LED_R_PIN EXP1_05_PIN // #endif // #ifndef RGB_LED_G_PIN - // #define RGB_LED_G_PIN PC15 + // #define RGB_LED_G_PIN EXP1_04_PIN // #endif // #ifndef RGB_LED_B_PIN - // #define RGB_LED_B_PIN PC14 + // #define RGB_LED_B_PIN EXP1_03_PIN // #endif //#elif ENABLED(FYSETC_MINI_12864_2_1) - // #define NEOPIXEL_PIN PB7 + // #define NEOPIXEL_PIN EXP1_05_PIN //#endif #else // !FYSETC_MINI_12864 - #define LCD_PINS_D4 PC13 + #define LCD_PINS_D4 EXP1_06_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PB7 - #define LCD_PINS_D6 PC15 - #define LCD_PINS_D7 PC14 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -186,16 +201,11 @@ #endif // !FYSETC_MINI_12864 - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif #endif @@ -214,11 +224,11 @@ #if SD_CONNECTION_IS(LCD) #define SPI_DEVICE 3 - #define SD_DETECT_PIN PB9 - #define SD_SCK_PIN PB3 - #define SD_MISO_PIN PB4 - #define SD_MOSI_PIN PB5 - #define SD_SS_PIN PA15 + #define SD_DETECT_PIN EXP2_04_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_SS_PIN EXP2_07_PIN #elif SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PA3 #define SD_SCK_PIN PA5 diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index c2edcd367824..2ce1d49bb860 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -122,41 +122,43 @@ #define NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin /** - * 1 ----- 2 - * PB5 | · · | PB6 - * PA2 | · · | RESET - * PA3 | · · | PB8 - * PB7 | · · | PA4 - * GND | · · | VCC5 - * 9 ----- 10 - * LCD EXP + * ------ + * PB5 |10 9 | PB6 + * PA2 | 8 7 | RESET + * PA3 6 5 | PB8 + * PB7 | 4 3 | PA4 + * GND | 2 1 | VCC5 + * ------ + * EXP1 */ +#define EXP1_03_PIN PA4 +#define EXP1_04_PIN PB7 +#define EXP1_05_PIN PB8 +#define EXP1_06_PIN PA3 +#define EXP1_07_PIN -1 // RESET +#define EXP1_08_PIN PA2 +#define EXP1_09_PIN PB6 +#define EXP1_10_PIN PB5 // // LCD / Controller // #if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN PB5 - #define BTN_EN1 PA2 - #define BTN_EN2 PA3 - #define BTN_ENC PB6 - - #define LCD_PINS_RS PB7 // CS -- SOFT SPI for ENDER3 LCD - #define LCD_PINS_D4 PB8 // SCLK - #define LCD_PINS_ENABLE PA4 // DATA MOSI + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN + + #define LCD_PINS_RS EXP1_04_PIN // CS -- SOFT SPI for ENDER3 LCD + #define LCD_PINS_D4 EXP1_05_PIN // SCLK + #define LCD_PINS_ENABLE EXP1_03_PIN // DATA MOSI #endif // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif // diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index 08efa9a04e1e..7d0e15f57aa1 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -83,13 +83,13 @@ #if ENABLED(TMC_USE_SW_SPI) #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 + #define TMC_SW_MOSI EXP2_05_PIN #endif #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 + #define TMC_SW_MISO EXP2_10_PIN #endif #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 + #define TMC_SW_SCK EXP2_09_PIN #endif #endif @@ -120,52 +120,69 @@ #define TEMP_BED_PIN PC0 // Analog Input #define TEMP_0_PIN PC1 // Analog Input -// -// LCD Pins -// +/** ------ ------ + * (BEEPER) PC14 |10 9 | PC13 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK) + * (LCD_EN) PB9 | 8 7 | PB8 (LCD_RS) (BTN_EN1) PB3 | 8 7 | PB12 (SD_CS2) + * (LCD_D4) PB7 | 6 5 PB6 (LCD_D5) (BTN_EN2) PD2 | 6 5 PB15 (SD_MOSI) + * (LCD_D6) PB5 | 4 3 | PB4 (LCD_D7) (SD_DETECT) PB11 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PB4 +#define EXP1_04_PIN PB5 +#define EXP1_05_PIN PB6 +#define EXP1_06_PIN PB7 +#define EXP1_07_PIN PB8 +#define EXP1_08_PIN PB9 +#define EXP1_09_PIN PC13 +#define EXP1_10_PIN PC14 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB11 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PD2 +#define EXP2_07_PIN PB12 +#define EXP2_08_PIN PB3 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 // // LCD / Controller // -#define SPI_DEVICE 2 -#define SD_SS_PIN PB12 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 - -#define SDSS SD_SS_PIN -#define SD_DETECT_PIN PB11 - -#define BEEPER_PIN PC14 - -#define LCD_PINS_RS PB8 -#define LCD_PINS_ENABLE PB9 -#define LCD_PINS_D4 PB7 -#define LCD_PINS_D5 PB6 -#define LCD_PINS_D6 PB5 -#define LCD_PINS_D7 PB4 - -#define BTN_EN1 PD2 -#define BTN_EN2 PB3 -#define BTN_ENC PC13 - -#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder -#endif +#if HAS_WIRED_LCD -// -// Filament runout -// + #define SPI_DEVICE 2 + #define SD_SS_PIN EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN -// -// ST7920 Delays -// -#ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 DELAY_NS(96) -#endif -#ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 DELAY_NS(48) -#endif -#ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 DELAY_NS(715) -#endif + #define SDSS SD_SS_PIN + #define SD_DETECT_PIN EXP2_04_PIN + + #define BEEPER_PIN EXP1_10_PIN + + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + + #define BTN_EN1 EXP2_06_PIN + #define BTN_EN2 EXP2_08_PIN + #define BTN_ENC EXP1_09_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #endif + +#endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index 4edd67a14df2..797e13fd0748 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -157,16 +157,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(715) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index f346c3a9fdf1..64b1c6c040cc 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -165,16 +165,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(715) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 2545642bae17..992fc36f92c3 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -162,16 +162,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(715) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index 865de809e20a..d33ce461feef 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -167,16 +167,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(715) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 2cfb71380d37..4db596a1bc34 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -342,15 +342,9 @@ #endif - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 60d342c60200..8c0ff76ae60e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -133,54 +133,82 @@ #endif /** - * ----- ----- ----- - * (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK) 5V | 1 2 | GND - * (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA15 (SD_SS) (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) - * (LCD_D4) PA6 | 5 6 PA7 (LCD_D5) (BTN_EN2) PB0 | 5 6 PB15 (SD_MOSI) (LCD_D4) PA6 | 5 6 PB0 (BTN_EN2) - * (LCD_D6) PC4 | 7 8 | PC5 (LCD_D7) (SD_DETECT) PC10 | 7 8 | RESET RESET | 7 8 | PB11 (BTN_EN1) - * GND | 9 10| 5V GND | 9 10| NC (BTN_ENC) PC3 | 9 10| PC1 (BEEPER) - * ----- ----- ----- - * EXP1 EXP2 EXP3 + * ------ ------ ------ + * (BEEPER) PC1 |10 9 | PC3 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK) (BEEPER) PC1 |10 9 | PC3 (BTN_ENC) + * (LCD_EN) PA4 | 8 7 | PA5 (LCD_RS) (BTN_EN1) PB11 | 8 7 | PA15 (SD_SS) (BTN_EN1) PB11 | 8 7 | RESET + * (LCD_D4) PA6 6 5 | PA7 (LCD_D5) (BTN_EN2) PB0 6 5 | PB15 (SD_MOSI) (BTN_EN2) PB0 6 5 | PA6 (LCD_D4) + * (LCD_D6) PC4 | 4 3 | PC5 (LCD_D7) (SD_DETECT) PC10 | 4 3 | RESET (LCD_RS) PA5 | 4 3 | PA4 (LCD_EN) + * GND | 2 1 | 5V GND | 2 1 | NC GND | 2 1 | 5V + * ------ ------ ------ + * EXP1 EXP2 "Ender-3 EXP1" */ +#define EXP1_03_PIN PC5 +#define EXP1_04_PIN PC4 +#define EXP1_05_PIN PA7 +#define EXP1_06_PIN PA6 +#define EXP1_07_PIN PA5 +#define EXP1_08_PIN PA4 +#define EXP1_09_PIN PC3 +#define EXP1_10_PIN PC1 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PC10 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PB0 +#define EXP2_07_PIN PA15 +#define EXP2_08_PIN PB11 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 + +// "Ender-3 EXP1" +#define E3_EXP1_03_PIN PA4 +#define E3_EXP1_04_PIN PA5 +#define E3_EXP1_05_PIN PA6 +#define E3_EXP1_06_PIN PB0 +#define E3_EXP1_07_PIN -1 // RESET +#define E3_EXP1_08_PIN PB11 +#define E3_EXP1_09_PIN PC3 +#define E3_EXP1_10_PIN PC1 + #if HAS_WIRED_LCD - #define BEEPER_PIN PC1 - #define BTN_ENC PC3 - #define LCD_PINS_ENABLE PA4 - #define LCD_PINS_RS PA5 - #define BTN_EN1 PB11 - #define BTN_EN2 PB0 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN -1 - #define DOGLCD_A0 PC4 - #define DOGLCD_CS PA7 - #define DOGLCD_SCK PB13 - #define DOGLCD_MOSI PB15 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #elif ENABLED(MKS_MINI_12864_V3) - #define DOGLCD_CS PA4 - #define DOGLCD_A0 PA5 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN #define LCD_PINS_DC DOGLCD_A0 #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PA6 - #define NEOPIXEL_PIN PA7 - #define DOGLCD_MOSI PB15 - #define DOGLCD_SCK PB13 + #define LCD_RESET_PIN EXP1_06_PIN + #define NEOPIXEL_PIN EXP1_05_PIN + #define DOGLCD_MOSI EXP2_05_PIN + #define DOGLCD_SCK EXP2_09_PIN #define FORCE_SOFT_SPI #define SOFTWARE_SPI //#define LCD_SCREEN_ROT_180 #else - #define LCD_PINS_D4 PA6 + #define LCD_PINS_D4 EXP1_06_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PA7 - #define LCD_PINS_D6 PC4 - #define LCD_PINS_D7 PC5 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if !defined(BTN_ENC_EN) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -192,30 +220,33 @@ #endif // HAS_WIRED_LCD +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #endif +#endif + // // SD Card // +#define SDCARD_CONNECTION ONBOARD #define SPI_DEVICE 2 #define ONBOARD_SPI_DEVICE 2 #define SDSS SD_SS_PIN -#define SDCARD_CONNECTION ONBOARD -#define SD_DETECT_PIN PC10 #define ONBOARD_SD_CS_PIN SD_SS_PIN +#define SD_DETECT_PIN PC10 // EXP2_04_PIN #define NO_SD_HOST_DRIVE // TODO: This is the only way to set SPI for SD on STM32 (for now) #define ENABLE_SPI2 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 -#define SD_SS_PIN PA15 - -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) -#endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) -#endif -#ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) -#endif +#define SD_SCK_PIN EXP2_09_PIN +#define SD_MISO_PIN EXP2_10_PIN +#define SD_MOSI_PIN EXP2_05_PIN +#define SD_SS_PIN EXP2_07_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 73c77d092a0e..6373d70e38f0 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -112,16 +112,11 @@ #endif // !MKS_MINI_12864 - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index e83bcb0a5c37..204cd21c020b 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -365,13 +365,9 @@ #endif - #ifndef BOARD_ST7920_DELAY_1 + #if ENABLED(U8GLIB_ST7920) #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 6e19b441c6d6..8f03a3678f43 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -299,16 +299,11 @@ #endif -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 DELAY_NS(125) #endif #define HAS_SPI_FLASH 1 diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index 3674f10ce703..a7a1dacd5be2 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -331,7 +331,8 @@ #define ADC_KEYPAD_PIN PC0 // PIN6 of AUX1 #endif -#if HAS_MARLINUI_U8GLIB +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) #define BOARD_ST7920_DELAY_1 DELAY_NS(125) #define BOARD_ST7920_DELAY_2 DELAY_NS(250) #define BOARD_ST7920_DELAY_3 DELAY_NS(125) diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h index 017195edee09..ba6bf8aa7bdc 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -304,7 +304,8 @@ #define BTN_ENC EXP2_05_PIN // PE15 #endif -#if HAS_MARLINUI_U8GLIB +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) #define BOARD_ST7920_DELAY_1 DELAY_NS(200) // Tclk_fall <200ns #define BOARD_ST7920_DELAY_2 DELAY_NS(250) // Tdata_width >200ns #define BOARD_ST7920_DELAY_3 DELAY_NS(200) // Tclk_rise <200ns diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 79a414d7d46b..bb283201e483 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -182,7 +182,6 @@ * EXP2 EXP1 | * -------------------------------------------------------------------------------------- */ - #define EXP1_03_PIN PE13 #define EXP1_04_PIN PE12 #define EXP1_05_PIN PE11 @@ -286,16 +285,10 @@ #endif // Alter timing for graphical display - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index a768088c37a3..8d828f9e2797 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -282,16 +282,10 @@ #endif // Alter timing for graphical display - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index fa49ff149558..5a1efc252b9b 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -488,16 +488,10 @@ #endif // Alter timing for graphical display - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index ec9ca32f7e58..bb5800aee77f 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -310,17 +310,15 @@ #define TMC_BAUD_RATE 19200 #endif -/** - * ------ ------ - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | PC15 (SD_DETECT) (LCD_D7) PE15 | 3 4 | PE14 (LCD_D6) - * (MOSI) PA7 | 5 6 PB1 (BTN_EN2) (LCD_D5) PE13 | 5 6 PE12 (LCD_D4) - * (SD_SS) PA4 | 7 8 | PB2 (BTN_EN1) (LCD_RS) PE10 | 7 8 | PE9 (LCD_EN) - * (SCK) PA5 | 9 10 | PA6 (MISO) (BTN_ENC) PE7 | 9 10 | PE8 (BEEPER) - * ------ ----- - * EXP2 EXP1 +/** ------ ------ + * (BEEPER) PE8 |10 9 | PE7 (BTN_ENC) (MISO) PA6 |10 9 | PA5 (SCK) + * (LCD_EN) PE9 | 8 7 | PE10 (LCD_RS) (BTN_EN1) PB2 | 8 7 | PA4 (SD_SS) + * (LCD_D4) PE12 6 5 | PE13 (LCD_D5) (BTN_EN2) PB1 6 5 | PA7 (MOSI) + * (LCD_D6) PE14 | 4 3 | PE15 (LCD_D7) (SD_DETECT) PC15 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - #define EXP1_03_PIN PE15 #define EXP1_04_PIN PE14 #define EXP1_05_PIN PE13 @@ -485,16 +483,10 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(120) // DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(80) // DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(580) // DELAY_NS(600) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS(120) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 80) + #define BOARD_ST7920_DELAY_3 DELAY_NS(580) #endif #if HAS_SPI_TFT diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 6daa34e0592a..8690f41ec992 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -311,17 +311,15 @@ #define SDCARD_CONNECTION LCD #endif -/** - * ----- ----- - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | PF12(SD_DETECT) (LCD_D7) PG7 | 3 4 | PG6 (LCD_D6) - * (MOSI)PB15 | 5 6 PF11(BTN_EN2) (LCD_D5) PG3 | 5 6 PG2 (LCD_D4) - * (SD_SS)PB12 | 7 8 | PG10(BTN_EN1) (LCD_RS) PD10 | 7 8 | PD11 (LCD_EN) - * (SCK)PB13 | 9 10| PB14(MISO) (BTN_ENC) PA8 | 9 10| PG4 (BEEPER) - * ----- ----- - * EXP2 EXP1 +/** ------ ------ + * (BEEPER) PG4 |10 9 | PA8 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SCK) + * (LCD_EN) PD11 | 8 7 | PD10 (LCD_RS) (BTN_EN1) PG10 | 8 7 | PB12 (SD_SS) + * (LCD_D4) PG2 6 5 | PG3 (LCD_D5) (BTN_EN2) PF11 6 5 | PB15 (MOSI) + * (LCD_D6) PG6 | 4 3 | PG7 (LCD_D7) (SD_DETECT) PF12 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - #define EXP1_03_PIN PG7 #define EXP1_04_PIN PG6 #define EXP1_05_PIN PG3 @@ -506,12 +504,12 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB +#if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 DELAY_NS(125) #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(90) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 90) #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 DELAY_NS(600) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index e049f8fbd930..30163dc61d25 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -303,7 +303,6 @@ * ----- ----- * EXP2 EXP1 */ - #define EXP1_03_PIN PE13 #define EXP1_04_PIN PE12 #define EXP1_05_PIN PE11 @@ -489,12 +488,12 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB +#if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 DELAY_NS(120) #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(80) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 80) #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 DELAY_NS(580) diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 27ad7179dfdf..cbed56d20272 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -185,7 +185,6 @@ * ------ ------ * EXP1 EXP2 */ - #define EXP1_03_PIN PE7 #define EXP1_04_PIN PE8 #define EXP1_05_PIN PE9 @@ -305,17 +304,9 @@ #define FIL_RUNOUT_PIN PA3 -// -// ST7920 Delays -// -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(715) #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index b50f1e4966bf..c922f13c6093 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -250,16 +250,10 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif #if ENABLED(TOUCH_UI_FTDI_EVE) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 9ce8d33fa8ce..4bf8da564f5c 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -314,16 +314,10 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(640) #endif #ifndef RGB_LED_R_PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 5b5c24899f2d..4e0ff6f09d5e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -276,7 +276,6 @@ * ------ ------ * EXP1 EXP2 */ - #define EXP1_03_PIN PD10 #define EXP1_04_PIN PD11 #define EXP1_05_PIN PE15 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index 03d8d19e945a..af0f5fa17cc0 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -167,20 +167,13 @@ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - #endif - // Alter timing for graphical display - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) - #endif - #endif +#endif // HAS_WIRED_LCD +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(640) #endif diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index 9d122c264225..280f98eae82e 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -182,15 +182,9 @@ #define BTN_ENC PB12 #endif -// -// ST7920 Delays -// -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) -#endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) -#endif -#ifndef BOARD_ST7920_DELAY_3 +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) #define BOARD_ST7920_DELAY_3 DELAY_NS(715) #endif From d6501a93ec1c4e63e35f362b12ce332ce8f91336 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 29 Aug 2021 01:00:17 +0000 Subject: [PATCH 262/323] [cron] Bump distribution date (2021-08-29) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index e1dd602e1e5e..a9ecab7bbf49 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-28" +//#define STRING_DISTRIBUTION_DATE "2021-08-29" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2dff3aa92f8a..7a2510e0147e 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-28" + #define STRING_DISTRIBUTION_DATE "2021-08-29" #endif /** From 6d3dec8b6390bd1fb9ce24814249ab0e3cf8719e Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 13:51:57 -0500 Subject: [PATCH 263/323] =?UTF-8?q?=F0=9F=8E=A8=20Update=20more=20EXP=20He?= =?UTF-8?q?aders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 11 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 25 ++-- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 9 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 17 ++- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 4 +- Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 12 +- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 72 ++++++----- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 2 +- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 2 +- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 122 ++++++++++-------- 11 files changed, 154 insertions(+), 124 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index 9211a6a793bf..ff36796207aa 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -27,7 +27,7 @@ #include "env_validate.h" -#define BOARD_INFO_NAME "AZSMZ MINI" +#define BOARD_INFO_NAME "AZSMZ Mini" // // Servos @@ -76,6 +76,7 @@ // // Heaters / Fans // + // EFB #define HEATER_0_PIN P2_04 #define HEATER_BED_PIN P2_05 @@ -117,14 +118,14 @@ // // Ethernet pins // +#define REF_CLK P1_15 #define ENET_MDIO P1_17 -#define ENET_RX_ER P1_14 -#define ENET_RXD1 P1_10 #define ENET_MOC P1_16 -#define REF_CLK P1_15 -#define ENET_RXD0 P1_09 #define ENET_CRS P1_08 +#define ENET_RX_ER P1_14 #define ENET_TX_EN P1_04 +#define ENET_RXD0 P1_09 +#define ENET_RXD1 P1_10 #define ENET_TXD0 P1_00 #define ENET_TXD1 P1_01 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index b74870b30fef..6404fbbf2532 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -53,26 +53,25 @@ #define E0_ENABLE_PIN P2_12 -/** - * ------ ------ - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | 1.31 NC | 3 4 | NC - * 0.18 | 5 6 3.25 NC | 5 6 0.15 - * 1.23 | 7 8 | 3.26 0.16 | 7 8 | 0.18 - * 0.15 | 9 10 | 0.17 2.11 | 9 10 | 1.30 - * ------ ------ - * EXP2 EXP1 +/** ------ ------ + * 1.30 |10 9 | 2.11 0.17 |10 9 | 0.15 + * 0.18 | 8 7 | 0.16 3.26 | 8 7 | 1.23 + * 0.15 6 5 | NC 3.25 6 5 | 0.18 + * NC | 4 3 | NC 1.31 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ -#define EXP1_03_PIN -1 -#define EXP1_04_PIN -1 -#define EXP1_05_PIN -1 +#define EXP1_03_PIN -1 // NC +#define EXP1_04_PIN -1 // NC +#define EXP1_05_PIN -1 // NC #define EXP1_06_PIN P0_15 #define EXP1_07_PIN P0_16 #define EXP1_08_PIN P0_18 #define EXP1_09_PIN P2_11 #define EXP1_10_PIN P1_30 -#define EXP2_03_PIN -1 +#define EXP2_03_PIN -1 // RESET #define EXP2_04_PIN P1_31 #define EXP2_05_PIN P0_18 #define EXP2_06_PIN P3_25 diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index d1d1eccc458c..a9701bc8b522 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -215,6 +215,9 @@ * that the garbage/lines are erased immediately after the SD card accesses are completed. */ +// +// LCD / Controller +// #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) @@ -341,10 +344,8 @@ #endif // UNUSED -#define PIN_P0_27 P0_27 // EXP2/Onboard SD -#define PIN_P0_28 P0_28 // EXP2 -#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) -#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) +//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) +//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) /** * PWMs diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index a8a4d2de4e20..124f0301b180 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -255,15 +255,14 @@ #define LED4_PIN P1_21 #endif -/** - * ----- ----- - * (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK) - * (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2) - * (LCD_D4) 0.15 | · · | 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · | 0.9 (SD_MOSI) - * (LCD_D6) 1.0 | · · | 1.22 (LCD_D7) (SD_DETECT) 0.27 | · · | RST - * GND | · · | 5V GND | · · | NC - * ----- ----- - * EXP1 EXP2 +/** ------ ------ + * (BEEPER) 1.31 |10 9 | 1.30 (BTN_ENC) (MISO) 0.8 |10 9 | 0.7 (SD_SCK) + * (LCD_EN) 0.18 | 8 7 | 0.16 (LCD_RS) (BTN_EN1) 3.25 | 8 7 | 0.28 (SD_CS2) + * (LCD_D4) 0.15 | 6 5 | 0.17 (LCD_D5) (BTN_EN2) 3.26 | 6 5 | 0.9 (SD_MOSI) + * (LCD_D6) 1.0 | 4 3 | 1.22 (LCD_D7) (SD_DETECT) 0.27 | 4 3 | RST + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ #define EXP1_03_PIN P1_22 #define EXP1_04_PIN P1_00 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 5d23466071a3..6aa3372b3fa3 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -96,7 +96,7 @@ /** ------ ------ * (BEEPER) PC10 |10 9 | PC11 (BTN_ENC) (MISO) PB4 |10 9 | PB3 (SCK) * (LCD_EN) PB6 | 8 7 | PC12 (LCD_RS) (BTN_EN1) PD2 | 8 7 | PA15 (SD_SS) - * (LCD_D4) PC13 | 6 5 | PB7 (LCD_D5) (BTN_EN2) PB8 | 6 5 | PB5 (MOSI) + * (LCD_D4) PC13 6 5 | PB7 (LCD_D5) (BTN_EN2) PB8 6 5 | PB5 (MOSI) * (LCD_D6) PC15 | 4 3 | PC14 (LCD_D7) (SD_DETECT) PB9 | 4 3 | RESET * GND | 2 1 | 5V GND | 2 1 | NC * ------ ------ diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index 7694130a3eee..6062755d3c89 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -165,7 +165,7 @@ * ------ * PC6 |10 9 | PB2 * PB10 | 8 7 | PE8 - * PB14 | 6 5 | PB13 + * PB14 6 5 | PB13 * PB12 | 4 3 | PB15 * GND | 2 1 | 5V * ------ @@ -189,7 +189,7 @@ * ------ * ? |10 9 | PC5 * PB10 | 8 7 | ? - * PA6 | 6 5 | PA5 + * PA6 6 5 | PA5 * PA4 | 4 3 | PA7 * GND | 2 1 | 5V * ------ diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index f850b4a90b07..67174556926b 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -294,13 +294,14 @@ #define TFT_BACKLIGHT_PIN PD13 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_CS_PIN PD7 // NE4 - #define FSMC_RS_PIN PD11 // A0 #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 - #define TFT_CS_PIN TFT_CS_PIN - #define TFT_RS_PIN TFT_RS_PIN + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PD11 // A0 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #ifdef TFT_CLASSIC_UI #define TFT_MARLINBG_COLOR 0x3186 // Grey @@ -309,11 +310,14 @@ #define TFT_BTOKMENU_COLOR 0x145F // Cyan #endif #define TFT_BUFFER_SIZE 14400 + #elif HAS_GRAPHICAL_TFT + #define TFT_RESET_PIN PC6 #define TFT_BACKLIGHT_PIN PD13 #define TFT_CS_PIN PD7 // NE4 #define TFT_RS_PIN PD11 // A0 + #endif #if NEED_TOUCH_PINS diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index 2060ad86fe5b..0c2f2fc5db31 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -130,29 +130,39 @@ #define RGB_LED_B_PIN PB6 #endif -/* -* EXP1 pinout for the LCD according to Fysetcs schematic for the Cheetah board -* ----- -* (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) -* (BTN_EN2) PC11 | 3 4 | PB14 (LCD_RS / MISO) -* (BTN_EN1) PC10 5 6 | PB13 (SCK) -* (LCD_EN) PB12 | 7 8 | PB15 (MOSI) -* GND | 9 10| 5V -* ----- -* EXP1 -* Note: The pin-numbers match the connector correctly and are not in reverse order like on the Ender-3 board. -* Note: Functionally the pins are assigned in the same order as on the Ender-3 board. -* Note: Pin 4 on the Cheetah board is assigned to an I/O, it is assigned to RESET on the Ender-3 board. -*/ +/** + * EXP1 pinout for the LCD according to FYSETC's Cheetah board schematic + * ------ + * (BEEPER) PC9 |10 9 | PC12 (BTN_ENC) + * (BTN_EN2) PC11 | 8 7 | PB14 (LCD_RS / MISO) + * (BTN_EN1) PC10 6 5 | PB13 (SCK) + * (LCD_EN) PB12 | 4 3 | PB15 (MOSI) + * GND | 2 1 | 5V + * ------ + * EXP1 + * + * Notes: + * - The pin-numbers match the connector correctly and are not in reverse order like on the Ender-3 board. + * - Functionally the pins are assigned in the same order as on the Ender-3 board. + * - Pin 4 on the Cheetah board is assigned to an I/O, it is assigned to RESET on the Ender-3 board. + */ +#define EXP1_03_PIN PB15 +#define EXP1_04_PIN PB12 +#define EXP1_05_PIN PB13 +#define EXP1_06_PIN PC10 +#define EXP1_07_PIN PB14 +#define EXP1_08_PIN PC11 +#define EXP1_09_PIN PC12 +#define EXP1_10_PIN PC9 #if HAS_WIRED_LCD - #define BEEPER_PIN PC9 + #define BEEPER_PIN EXP1_10_PIN #if HAS_MARLINUI_U8GLIB - #define DOGLCD_A0 PB14 - #define DOGLCD_CS PB12 - #define DOGLCD_SCK PB13 - #define DOGLCD_MOSI PB15 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_SCK EXP1_05_PIN + #define DOGLCD_MOSI EXP1_03_PIN //#define LCD_SCREEN_ROT_90 //#define LCD_SCREEN_ROT_180 //#define LCD_SCREEN_ROT_270 @@ -162,30 +172,30 @@ #endif #endif - #define LCD_PINS_RS PB12 // CS -- SOFT SPI for ENDER3 LCD - #define LCD_PINS_D4 PB13 // SCLK - #define LCD_PINS_ENABLE PB15 // DATA MOSI + #define LCD_PINS_RS EXP1_04_PIN // CS -- SOFT SPI for ENDER3 LCD + #define LCD_PINS_D4 EXP1_05_PIN // SCLK + #define LCD_PINS_ENABLE EXP1_03_PIN // DATA MOSI //#define LCD_CONTRAST_INIT 190 #if IS_NEWPANEL - #define BTN_EN1 PC10 - #define BTN_EN2 PC11 - #define BTN_ENC PC12 + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_08_PIN + #define BTN_ENC EXP1_09_PIN #endif #endif #if ENABLED(TOUCH_UI_FTDI_EVE) - #define BEEPER_PIN PC9 - #define CLCD_MOD_RESET PC11 - #define CLCD_SPI_CS PB12 + #define BEEPER_PIN EXP1_10_PIN + #define CLCD_MOD_RESET EXP1_08_PIN + #define CLCD_SPI_CS EXP1_04_PIN //#define CLCD_USE_SOFT_SPI // the Cheetah can use hardware-SPI so we do not really need this #if ENABLED(CLCD_USE_SOFT_SPI) - #define CLCD_SOFT_SPI_MOSI PB15 - #define CLCD_SOFT_SPI_MISO PB14 - #define CLCD_SOFT_SPI_SCLK PB13 + #define CLCD_SOFT_SPI_MOSI EXP1_03_PIN + #define CLCD_SOFT_SPI_MISO EXP1_07_PIN + #define CLCD_SOFT_SPI_SCLK EXP1_05_PIN #else #define CLCD_SPI_BUS 2 #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index 4bf8da564f5c..da83ade4e094 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -195,7 +195,7 @@ * ------ ------ * PC9 |10 9 | PA8 PA6 |10 9 | PA5 * PC11 | 8 7 | PD2 PC6 | 8 7 | PA4 - * PC10 | 6 5 PC12 PC7 | 6 5 PA7 + * PC10 6 5 | PC12 PC7 6 5 | PA7 * PD0 | 4 3 | PD1 PB10 | 4 3 | RESET * GND | 2 1 | 5V GND | 2 1 | 5V * ------ ------ diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index 38714d7da9c9..3b6a3f74f60e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -237,7 +237,7 @@ * ------ ------ * (BEEPER) PB2 |10 9 | PE10 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) * (LCD_EN) PE11 | 8 7 | PD10 (LCD_RS) (BTN_EN1) PE9 | 8 7 | PA4 (SPI1 CS) - * (LCD_D4) PD9 | 6 5 PD8 (LCD_D5) (BTN_EN2) PE8 | 6 5 PA7 (SPI1 MOSI) + * (LCD_D4) PD9 6 5 | PD8 (LCD_D5) (BTN_EN2) PE8 6 5 | PA7 (SPI1 MOSI) * (LCD_D6) PE15 | 4 3 | PE7 (LCD_D7) (SPI1_RS) PB11 | 4 3 | RESET * GND | 2 1 | 5V GND | 2 1 | 3.3V * ------ ------ diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 88e2d1804e90..c28da7134746 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -215,8 +215,8 @@ // Onboard SD card // NOT compatible with LCD // -// detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled -#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD +// Detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled +#if SD_CONNECTION_IS(ONBOARD) #if USE_NEW_SPI_API #define SD_SPI MARLIN_SPI(HardwareSPI3, PC9) #else @@ -230,17 +230,44 @@ #define SD_DETECT_PIN PD12 #endif -/* +/** ------ ------ + * (BEEPER) PC5 |10 9 | PE13 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) + * (LCD_EN) PD13 | 8 7 | PC6 (LCD_RS) (BTN_EN1) PE8 | 8 7 | PE10 (SPI1 CS) + * (LCD_D4) PE14 6 5 | PE15 (LCD_D5) (BTN_EN2) PE11 6 5 | PA7 (SPI1 MOSI) + * (LCD_D6) PD11 | 4 3 | PD10 (LCD_D7) (SPI DET) PE12 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 3.3V + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PD10 +#define EXP1_04_PIN PD11 +#define EXP1_05_PIN PE15 +#define EXP1_06_PIN PE14 +#define EXP1_07_PIN PC6 +#define EXP1_08_PIN PD13 +#define EXP1_09_PIN PE13 +#define EXP1_10_PIN PC5 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PE12 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PE11 +#define EXP2_07_PIN PE10 +#define EXP2_08_PIN PE8 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + // // LCD SD // -#if SDCARD_CONNECTION == LCD +/* +#if SD_CONNECTION_IS(LCD) #define ENABLE_SPI1 - #define SDSS PE10 - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PE12 + #define SDSS EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_DETECT_PIN EXP2_04_PIN #endif */ @@ -257,17 +284,6 @@ #define SPI_FLASH_SCK_PIN PB13 #endif -/** - * ----- ----- - * (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) - * (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS) - * (LCD_D4)PE14 | · · | PE15(LCD_D5) (BTN_EN2) PE11 | · · | PA7 (SPI1 MOSI) - * (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI DET) PE12 | · · | RESET - * GND | · · | 5V GND | · · | 3.3V - * ----- ----- - * EXP1 EXP2 - */ - #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 @@ -285,21 +301,21 @@ #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif - #define TFT_CS_PIN PD11 - #define TFT_SCK_PIN PA5 - #define TFT_MISO_PIN PA6 - #define TFT_MOSI_PIN PA7 - #define TFT_DC_PIN PD10 - #define TFT_RST_PIN PC6 + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_RST_PIN EXP1_07_PIN #define TFT_A0_PIN TFT_DC_PIN - #define TFT_RESET_PIN PC6 - #define TFT_BACKLIGHT_PIN PD13 + #define TFT_RESET_PIN EXP1_07_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - #define LCD_BACKLIGHT_PIN PD13 + #define LCD_BACKLIGHT_PIN EXP1_08_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif @@ -307,15 +323,15 @@ #define TFT_HEIGHT 320 #endif - #define TOUCH_CS_PIN PE14 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI + #define TOUCH_CS_PIN EXP1_06_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_09_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_10_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_05_PIN // SPI1_MOSI - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI @@ -325,22 +341,22 @@ #elif HAS_WIRED_LCD - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 - #define LCD_PINS_ENABLE PD13 - #define LCD_PINS_RS PC6 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #define LCD_BACKLIGHT_PIN -1 // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) //#define LCD_BACKLIGHT_PIN -1 //#define LCD_RESET_PIN -1 - #define DOGLCD_A0 PD11 - #define DOGLCD_CS PE15 - //#define DOGLCD_SCK PA5 - //#define DOGLCD_MOSI PA7 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + //#define DOGLCD_SCK EXP2_09_PIN + //#define DOGLCD_MOSI EXP2_05_PIN // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B @@ -348,15 +364,15 @@ #else // !MKS_MINI_12864 - #define LCD_PINS_D4 PE14 + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(ULTIPANEL) - #define LCD_PINS_D5 PE15 - #define LCD_PINS_D6 PD11 - #define LCD_PINS_D7 PD10 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) + #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) #define BOARD_ST7920_DELAY_3 DELAY_NS(600) #endif // !MKS_MINI_12864 From 09a83d565e0db2157baa3662020500476b931ec6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 28 Aug 2021 17:46:22 -0500 Subject: [PATCH 264/323] =?UTF-8?q?=F0=9F=A9=B9=20Sensorless=20homing=20tw?= =?UTF-8?q?eak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 20243ae0ea20..fd49aada6bdb 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2005,7 +2005,7 @@ #define HAS_TMC_SW_SERIAL 1 #endif -#if !USE_SENSORLESS +#if DISABLED(SENSORLESS_HOMING) #undef SENSORLESS_BACKOFF_MM #endif From 4b4de71304a426e0d9b2696dae4e82eb55ba7079 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 13:57:47 -0500 Subject: [PATCH 265/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Improve=20G2/G3=20?= =?UTF-8?q?arc=20handling=20(#22599)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 25 ++-- Marlin/src/core/macros.h | 2 + Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/motion/G0_G1.cpp | 2 +- Marlin/src/gcode/motion/G2_G3.cpp | 241 ++++++++++++++++++------------ Marlin/src/inc/SanityCheck.h | 14 +- 6 files changed, 177 insertions(+), 109 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 80606df73396..9e232f95bb1d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2052,20 +2052,23 @@ // // G2/G3 Arc Support // -#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#define ARC_SUPPORT // Requires ~3226 bytes #if ENABLED(ARC_SUPPORT) - #define MM_PER_ARC_SEGMENT 1 // (mm) Length (or minimum length) of each arc segment - //#define ARC_SEGMENTS_PER_R 1 // Max segment length, MM_PER = Min - #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle - //#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum) - #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections - //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles - //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes - //#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure + #define MIN_ARC_SEGMENT_MM 0.1 // (mm) Minimum length of each arc segment + #define MAX_ARC_SEGMENT_MM 1.0 // (mm) Maximum length of each arc segment + #define MIN_CIRCLE_SEGMENTS 72 // Minimum number of segments in a complete circle + //#define ARC_SEGMENTS_PER_SEC 50 // Use the feedrate to choose the segment length + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure #endif -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -//#define BEZIER_CURVE_SUPPORT +// G5 Bézier Curve Support with XYZE destination and IJPQ offsets +//#define BEZIER_CURVE_SUPPORT // Requires ~2666 bytes + +#if EITHER(ARC_SUPPORT, BEZIER_CURVE_SUPPORT) + //#define CNC_WORKSPACE_PLANES // Allow G2/G3/G5 to operate in XY, ZX, or YZ planes +#endif /** * Direct Stepping diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 86368bf5e718..0174e21add27 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -260,6 +260,7 @@ #define CODE_3( A,B,C,...) A; B; C #define CODE_2( A,B,...) A; B #define CODE_1( A,...) A +#define CODE_0(...) #define _CODE_N(N,V...) CODE_##N(V) #define CODE_N(N,V...) _CODE_N(N,V) @@ -279,6 +280,7 @@ #define GANG_3( A,B,C,...) A B C #define GANG_2( A,B,...) A B #define GANG_1( A,...) A +#define GANG_0(...) #define _GANG_N(N,V...) GANG_##N(V) #define GANG_N(N,V...) _GANG_N(N,V) #define GANG_N_1(N,K) _GANG_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 7933c3141a11..94496f2b2576 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -136,7 +136,7 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() { } /** - * Set XYZE destination and feedrate from the current GCode command + * Set XYZIJKE destination and feedrate from the current GCode command * * - Set destination from included axis codes * - Set to current for missing axis codes diff --git a/Marlin/src/gcode/motion/G0_G1.cpp b/Marlin/src/gcode/motion/G0_G1.cpp index eb79180c6988..cc6979b74c12 100644 --- a/Marlin/src/gcode/motion/G0_G1.cpp +++ b/Marlin/src/gcode/motion/G0_G1.cpp @@ -71,7 +71,7 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) { #endif #endif - get_destination_from_command(); // Get X Y Z E F (and set cutter power) + get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power) #ifdef G0_FEEDRATE if (fast_move) { diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index 094afdb70e8f..f9f9c2b3da6c 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -39,14 +39,21 @@ #undef N_ARC_CORRECTION #define N_ARC_CORRECTION 1 #endif +#ifndef MIN_CIRCLE_SEGMENTS + #define MIN_CIRCLE_SEGMENTS 72 // 5° per segment +#endif +#if !defined(MAX_ARC_SEGMENT_MM) && defined(MIN_ARC_SEGMENT_MM) + #define MAX_ARC_SEGMENT_MM MIN_ARC_SEGMENT_MM +#elif !defined(MIN_ARC_SEGMENT_MM) && defined(MAX_ARC_SEGMENT_MM) + #define MIN_ARC_SEGMENT_MM MAX_ARC_SEGMENT_MM +#endif + +#define ARC_LIJK_CODE(L,I,J,K) CODE_N(SUB2(LINEAR_AXES),L,I,J,K) +#define ARC_LIJKE_CODE(L,I,J,K,E) ARC_LIJK_CODE(L,I,J,K); CODE_ITEM_E(E) /** - * Plan an arc in 2 dimensions, with optional linear motion in a 3rd dimension - * - * The arc is traced by generating many small linear segments, as configured by - * MM_PER_ARC_SEGMENT (Default 1mm). In the future we hope more slicers will include - * an option to generate G2/G3 arcs for curved surfaces, as this will allow faster - * boards to produce much smoother curved surfaces. + * Plan an arc in 2 dimensions, with linear motion in the other axes. + * The arc is traced with many small linear segments according to the configuration. */ void plan_arc( const xyze_pos_t &cart, // Destination position @@ -55,41 +62,45 @@ void plan_arc( const uint8_t circles // Take the scenic route ) { #if ENABLED(CNC_WORKSPACE_PLANES) - AxisEnum p_axis, q_axis, l_axis; + AxisEnum axis_p, axis_q, axis_l; switch (gcode.workspace_plane) { default: - case GcodeSuite::PLANE_XY: p_axis = X_AXIS; q_axis = Y_AXIS; l_axis = Z_AXIS; break; - case GcodeSuite::PLANE_YZ: p_axis = Y_AXIS; q_axis = Z_AXIS; l_axis = X_AXIS; break; - case GcodeSuite::PLANE_ZX: p_axis = Z_AXIS; q_axis = X_AXIS; l_axis = Y_AXIS; break; + case GcodeSuite::PLANE_XY: axis_p = X_AXIS; axis_q = Y_AXIS; axis_l = Z_AXIS; break; + case GcodeSuite::PLANE_YZ: axis_p = Y_AXIS; axis_q = Z_AXIS; axis_l = X_AXIS; break; + case GcodeSuite::PLANE_ZX: axis_p = Z_AXIS; axis_q = X_AXIS; axis_l = Y_AXIS; break; } #else - constexpr AxisEnum p_axis = X_AXIS, q_axis = Y_AXIS OPTARG(HAS_Z_AXIS, l_axis = Z_AXIS); + constexpr AxisEnum axis_p = X_AXIS, axis_q = Y_AXIS OPTARG(HAS_Z_AXIS, axis_l = Z_AXIS); #endif // Radius vector from center to current location ab_float_t rvec = -offset; const float radius = HYPOT(rvec.a, rvec.b), - center_P = current_position[p_axis] - rvec.a, - center_Q = current_position[q_axis] - rvec.b, - rt_X = cart[p_axis] - center_P, - rt_Y = cart[q_axis] - center_Q - OPTARG(HAS_Z_AXIS, start_L = current_position[l_axis]); - - #ifdef MIN_ARC_SEGMENTS - uint16_t min_segments = MIN_ARC_SEGMENTS; - #else - constexpr uint16_t min_segments = 1; - #endif + center_P = current_position[axis_p] - rvec.a, + center_Q = current_position[axis_q] - rvec.b, + rt_X = cart[axis_p] - center_P, + rt_Y = cart[axis_q] - center_Q; + + ARC_LIJK_CODE( + const float start_L = current_position[axis_l], + const float start_I = current_position.i, + const float start_J = current_position.j, + const float start_K = current_position.k + ); // Angle of rotation between position and target from the circle center. float angular_travel, abs_angular_travel; + // Minimum number of segments in an arc move + uint16_t min_segments = 1; + // Do a full circle if starting and ending positions are "identical" - if (NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis])) { + if (NEAR(current_position[axis_p], cart[axis_p]) && NEAR(current_position[axis_q], cart[axis_q])) { // Preserve direction for circles angular_travel = clockwise ? -RADIANS(360) : RADIANS(360); abs_angular_travel = RADIANS(360); + min_segments = MIN_CIRCLE_SEGMENTS; } else { // Calculate the angle @@ -106,61 +117,90 @@ void plan_arc( abs_angular_travel = ABS(angular_travel); - #ifdef MIN_ARC_SEGMENTS - min_segments = CEIL(min_segments * abs_angular_travel / RADIANS(360)); - NOLESS(min_segments, 1U); - #endif + // Apply minimum segments to the arc + const float portion_of_circle = abs_angular_travel / RADIANS(360); // Portion of a complete circle (0 < N < 1) + min_segments = CEIL((MIN_CIRCLE_SEGMENTS) * portion_of_circle); // Minimum segments for the arc } - #if HAS_Z_AXIS - float linear_travel = cart[l_axis] - start_L; - #endif - #if HAS_EXTRUDERS - float extruder_travel = cart.e - current_position.e; - #endif + ARC_LIJKE_CODE( + float travel_L = cart[axis_l] - start_L, + float travel_I = cart.i - start_I, + float travel_J = cart.j - start_J, + float travel_K = cart.k - start_K, + float travel_E = cart.e - current_position.e + ); - // If circling around... + // If "P" specified circles, call plan_arc recursively then continue with the rest of the arc if (TERN0(ARC_P_CIRCLES, circles)) { - const float total_angular = abs_angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder - part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total - - #if HAS_Z_AXIS - const float l_per_circle = linear_travel * part_per_circle; // L movement per circle - #endif - #if HAS_EXTRUDERS - const float e_per_circle = extruder_travel * part_per_circle; // E movement per circle - #endif - - xyze_pos_t temp_position = current_position; // for plan_arc to compare to current_position + const float total_angular = abs_angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder + part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total + + ARC_LIJKE_CODE( + const float per_circle_L = travel_L * part_per_circle, // L movement per circle + const float per_circle_I = travel_I * part_per_circle, + const float per_circle_J = travel_J * part_per_circle, + const float per_circle_K = travel_K * part_per_circle, + const float per_circle_E = travel_E * part_per_circle // E movement per circle + ); + + xyze_pos_t temp_position = current_position; for (uint16_t n = circles; n--;) { - TERN_(HAS_EXTRUDERS, temp_position.e += e_per_circle); // Destination E axis - TERN_(HAS_Z_AXIS, temp_position[l_axis] += l_per_circle); // Destination L axis - plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle + ARC_LIJKE_CODE( // Destination Linear Axes + temp_position[axis_l] += per_circle_L, + temp_position.i += per_circle_I, + temp_position.j += per_circle_J, + temp_position.k += per_circle_K, + temp_position.e += per_circle_E // Destination E axis + ); + plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle } - TERN_(HAS_Z_AXIS, linear_travel = cart[l_axis] - current_position[l_axis]); - TERN_(HAS_EXTRUDERS, extruder_travel = cart.e - current_position.e); + ARC_LIJKE_CODE( + travel_L = cart[axis_l] - current_position[axis_l], + travel_I = cart.i - current_position.i, + travel_J = cart.j - current_position.j, + travel_K = cart.k - current_position.k, + travel_E = cart.e - current_position.e + ); } - const float flat_mm = radius * abs_angular_travel, - mm_of_travel = TERN_(HAS_Z_AXIS, linear_travel ? HYPOT(flat_mm, linear_travel) :) flat_mm; - if (mm_of_travel < 0.001f) return; + // Millimeters in the arc, assuming it's flat + const float flat_mm = radius * abs_angular_travel; + // Return if the move is near zero + if (flat_mm < 0.0001f + GANG_N(SUB2(LINEAR_AXES), + && travel_L < 0.0001f, + && travel_I < 0.0001f, + && travel_J < 0.0001f, + && travel_K < 0.0001f + ) + ) return; + + // Feedrate for the move, scaled by the feedrate multiplier const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s); - // Start with a nominal segment length - float seg_length = ( - #ifdef ARC_SEGMENTS_PER_R - constrain(MM_PER_ARC_SEGMENT * radius, MM_PER_ARC_SEGMENT, ARC_SEGMENTS_PER_R) - #elif ARC_SEGMENTS_PER_SEC - _MAX(scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC), MM_PER_ARC_SEGMENT) + // Get the nominal segment length based on settings + const float nominal_segment_mm = ( + #if ARC_SEGMENTS_PER_SEC // Length based on segments per second and feedrate + constrain(scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC), MIN_ARC_SEGMENT_MM, MAX_ARC_SEGMENT_MM) #else - MM_PER_ARC_SEGMENT + MAX_ARC_SEGMENT_MM // Length using the maximum segment size #endif ); - // Divide total travel by nominal segment length - uint16_t segments = FLOOR(mm_of_travel / seg_length); - NOLESS(segments, min_segments); // At least some segments - seg_length = mm_of_travel / segments; + + // Number of whole segments based on the nominal segment length + const float nominal_segments = _MAX(FLOOR(flat_mm / nominal_segment_mm), min_segments); + + // A new segment length based on the required minimum + const float segment_mm = constrain(flat_mm / nominal_segments, MIN_ARC_SEGMENT_MM, MAX_ARC_SEGMENT_MM); + + // The number of whole segments in the arc, ignoring the remainder + uint16_t segments = FLOOR(flat_mm / segment_mm); + + // Are the segments now too few to reach the destination? + const float segmented_length = segment_mm * segments; + const bool tooshort = segmented_length < flat_mm - 0.0001f; + const float proportion = tooshort ? segmented_length / flat_mm : 1.0f; /** * Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector, @@ -190,26 +230,36 @@ void plan_arc( */ // Vector rotation matrix values xyze_pos_t raw; - const float theta_per_segment = angular_travel / segments, + const float theta_per_segment = proportion * angular_travel / segments, sq_theta_per_segment = sq(theta_per_segment), sin_T = theta_per_segment - sq_theta_per_segment * theta_per_segment / 6, cos_T = 1 - 0.5f * sq_theta_per_segment; // Small angle approximation - #if HAS_Z_AXIS && DISABLED(AUTO_BED_LEVELING_UBL) - const float linear_per_segment = linear_travel / segments; - #endif - #if HAS_EXTRUDERS - const float extruder_per_segment = extruder_travel / segments; + #if DISABLED(AUTO_BED_LEVELING_UBL) + ARC_LIJK_CODE( + const float per_segment_L = proportion * travel_L / segments, + const float per_segment_I = proportion * travel_I / segments, + const float per_segment_J = proportion * travel_J / segments, + const float per_segment_K = proportion * travel_K / segments + ); #endif - // Initialize the linear axis - TERN_(HAS_Z_AXIS, raw[l_axis] = current_position[l_axis]); + CODE_ITEM_E(const float extruder_per_segment = proportion * travel_E / segments); - // Initialize the extruder axis - TERN_(HAS_EXTRUDERS, raw.e = current_position.e); + // For shortened segments, run all but the remainder in the loop + if (tooshort) segments++; + + // Initialize all linear axes and E + ARC_LIJKE_CODE( + raw[axis_l] = current_position[axis_l], + raw.i = current_position.i, + raw.j = current_position.j, + raw.k = current_position.k, + raw.e = current_position.e + ); #if ENABLED(SCARA_FEEDRATE_SCALING) - const float inv_duration = scaled_fr_mm_s / seg_length; + const float inv_duration = scaled_fr_mm_s / segment_mm; #endif millis_t next_idle_ms = millis() + 200UL; @@ -221,8 +271,9 @@ void plan_arc( for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times thermalManager.manage_heater(); - if (ELAPSED(millis(), next_idle_ms)) { - next_idle_ms = millis() + 200UL; + const millis_t ms = millis(); + if (ELAPSED(ms, next_idle_ms)) { + next_idle_ms = ms + 200UL; idle(); } @@ -250,13 +301,16 @@ void plan_arc( } // Update raw location - raw[p_axis] = center_P + rvec.a; - raw[q_axis] = center_Q + rvec.b; - #if HAS_Z_AXIS - raw[l_axis] = TERN(AUTO_BED_LEVELING_UBL, start_L, raw[l_axis] + linear_per_segment); - #endif - - TERN_(HAS_EXTRUDERS, raw.e += extruder_per_segment); + raw[axis_p] = center_P + rvec.a; + raw[axis_q] = center_Q + rvec.b; + ARC_LIJKE_CODE( + #if ENABLED(AUTO_BED_LEVELING_UBL) + raw[axis_l] = start_L, raw.i = start_I, raw.j = start_J, raw.k = start_K + #else + raw[axis_l] += per_segment_L, raw.i += per_segment_I, raw.j += per_segment_J, raw.k += per_segment_K + #endif + , raw.e += extruder_per_segment + ); apply_motion_limits(raw); @@ -264,14 +318,15 @@ void plan_arc( planner.apply_leveling(raw); #endif - if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 - OPTARG(SCARA_FEEDRATE_SCALING, inv_duration) - )) break; + if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 OPTARG(SCARA_FEEDRATE_SCALING, inv_duration))) + break; } // Ensure last segment arrives at target location. raw = cart; - TERN_(AUTO_BED_LEVELING_UBL, TERN_(HAS_Z_AXIS, raw[l_axis] = start_L)); + #if ENABLED(AUTO_BED_LEVELING_UBL) + ARC_LIJK_CODE(raw[axis_l] = start_L, raw.i = start_I, raw.j = start_J, raw.k = start_K); + #endif apply_motion_limits(raw); @@ -279,11 +334,11 @@ void plan_arc( planner.apply_leveling(raw); #endif - planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 - OPTARG(SCARA_FEEDRATE_SCALING, inv_duration) - ); + planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 OPTARG(SCARA_FEEDRATE_SCALING, inv_duration)); - TERN_(AUTO_BED_LEVELING_UBL, TERN_(HAS_Z_AXIS, raw[l_axis] = start_L)); + #if ENABLED(AUTO_BED_LEVELING_UBL) + ARC_LIJK_CODE(raw[axis_l] = start_L, raw.i = start_I, raw.j = start_J, raw.k = start_K); + #endif current_position = raw; } // plan_arc @@ -325,7 +380,7 @@ void GcodeSuite::G2_G3(const bool clockwise) { relative_mode = true; #endif - get_destination_from_command(); // Get X Y Z E F (and set cutter power) + get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power) TERN_(SF_ARC_FIX, relative_mode = relative_mode_backup); diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index e02e9035511e..a146b95ba619 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -585,12 +585,20 @@ #error "TEMP_SENSOR_1_AS_REDUNDANT is now TEMP_SENSOR_REDUNDANT, with associated TEMP_SENSOR_REDUNDANT_* config." #elif defined(MAX_REDUNDANT_TEMP_SENSOR_DIFF) #error "MAX_REDUNDANT_TEMP_SENSOR_DIFF is now TEMP_SENSOR_REDUNDANT_MAX_DIFF" -#elif MOTHERBOARD == BOARD_DUE3DOM_MINI && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) +#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) + #error "LCD_ALEPHOBJECTS_CLCD_UI is now LCD_LULZBOT_CLCD_UI." +#elif defined(MIN_ARC_SEGMENTS) + #error "MIN_ARC_SEGMENTS is now MIN_CIRCLE_SEGMENTS." +#elif defined(ARC_SEGMENTS_PER_R) + #error "ARC_SUPPORT no longer uses ARC_SEGMENTS_PER_R." +#elif ENABLED(ARC_SUPPORT) && (!defined(MIN_ARC_SEGMENT_MM) || !defined(MAX_ARC_SEGMENT_MM)) + #error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM." +#endif + +#if MOTHERBOARD == BOARD_DUE3DOM_MINI && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) #warning "Onboard temperature sensor for BOARD_DUE3DOM_MINI has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." #elif MOTHERBOARD == BOARD_BTT_SKR_E3_TURBO && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) #warning "Onboard temperature sensor for BOARD_BTT_SKR_E3_TURBO has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." -#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) - #warning "LCD_ALEPHOBJECTS_CLCD_UI is now LCD_LULZBOT_CLCD_UI." #endif constexpr float arm[] = AXIS_RELATIVE_MODES; From f721c44c225c084785b296dac43df7b272702b7d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 15:15:53 -0500 Subject: [PATCH 266/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20SDSUPPORT=20for=20?= =?UTF-8?q?SKR=20CR-6=20(#22668)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sebastiaan Dammann --- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index c614a2dbb962..f58f13dc2fcb 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -165,6 +165,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PC4 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card + #define SDSS ONBOARD_SD_CS_PIN #endif // From ab03c9a56063c4ae0e27f46a5622ffe1564b0c1b Mon Sep 17 00:00:00 2001 From: Marcio T Date: Sun, 29 Aug 2021 16:03:10 -0600 Subject: [PATCH 267/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Enhance=20and=20fi?= =?UTF-8?q?x=20FTDI=20Eve=20Touch=20UI=20file=20select=20(#22651)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/extended/arrows.cpp | 52 +++++ .../ftdi_eve_lib/extended/arrows.h | 28 +++ .../ftdi_eve_lib/extended/ftdi_extended.h | 1 + .../ftdi_eve_lib/extended/grid_layout.h | 36 ++-- .../generic/bed_mesh_view_screen.cpp | 6 - .../generic/bed_mesh_view_screen.h | 1 - .../generic/files_screen.cpp | 181 ++++++++++-------- .../ftdi_eve_touch_ui/generic/files_screen.h | 12 +- .../generic/leveling_menu.cpp | 5 +- 9 files changed, 209 insertions(+), 113 deletions(-) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp new file mode 100644 index 000000000000..0a45c0d33903 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp @@ -0,0 +1,52 @@ +/************** + * arrows.cpp * + **************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - SynDaver 3D * + * * + * 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 "ftdi_extended.h" + +#if ENABLED(FTDI_EXTENDED) + +#define COORD(X,Y) cx + s*(swapXY ? Y : (flipX ? -X : X)), cy + s*(swapXY ? (flipX ? -X : X) : Y) + +namespace FTDI { + + void drawArrow(int x, int y, int w, int h, Direction direction) { + const bool swapXY = direction == UP || direction == DOWN; + const bool flipX = direction == UP || direction == LEFT; + const int s = min(w,h); + const int cx = (x + w/2)*16; + const int cy = (y + h/2)*16; + + CommandProcessor cmd; + cmd.cmd(SAVE_CONTEXT()) + .cmd(LINE_WIDTH(s/2)) + .cmd(BEGIN(LINES)) + .cmd(VERTEX2F(COORD( 5, 0))) + .cmd(VERTEX2F(COORD( 2,-2))) + .cmd(VERTEX2F(COORD( 5, 0))) + .cmd(VERTEX2F(COORD( 2, 2))) + .cmd(VERTEX2F(COORD( 5, 0))) + .cmd(VERTEX2F(COORD(-5, 0))) + .cmd(RESTORE_CONTEXT()); + } + +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h new file mode 100644 index 000000000000..e9592d47a05f --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h @@ -0,0 +1,28 @@ +/************ + * arrows.h * + ************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - SynDaver 3D * + * * + * 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: . * + ****************************************************************************/ + +#pragma once + +namespace FTDI { + enum Direction {UP, DOWN, LEFT, RIGHT}; + + void drawArrow(int x, int y, int w, int h, Direction direction); +} diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h index bf9858f6eb91..e99c798eeae1 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h @@ -48,6 +48,7 @@ #include "sound_list.h" #include "polygon.h" #include "poly_ui.h" + #include "arrows.h" #include "text_box.h" #include "text_ellipsis.h" #include "adjuster_widget.h" diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h index dd94685c98ed..813f4f04844f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h @@ -54,23 +54,33 @@ #define EDGE_L 0 #define EDGE_R 0 -// GRID_X and GRID_Y computes the positions of the divisions on +// _GRID_X and _GRID_Y computes the positions of the divisions on // the layout grid. -#define GRID_X(x) ((x)*(FTDI::display_width-EDGE_R-EDGE_L)/GRID_COLS+EDGE_L) -#define GRID_Y(y) ((y)*(FTDI::display_height-EDGE_B-EDGE_T)/GRID_ROWS+EDGE_T) +#define _GRID_X(x) ((x)*(FTDI::display_width-EDGE_R-EDGE_L)/GRID_COLS+EDGE_L) +#define _GRID_Y(y) ((y)*(FTDI::display_height-EDGE_B-EDGE_T)/GRID_ROWS+EDGE_T) + +// BOX_X, BOX_Y, BOX_W and BOX_X returns the top-left and width +// and height of position on the grid. + +#define BOX_X(x) (_GRID_X((x)-1)) +#define BOX_Y(y) (_GRID_Y((y)-1)) +#define BOX_W(w) (_GRID_X(w) - _GRID_X(0)) +#define BOX_H(h) (_GRID_Y(h) - _GRID_Y(0)) // BTN_X, BTN_Y, BTN_W and BTN_X returns the top-left and width // and height of a button, taking into account the button margins. -#define BTN_X(x) (GRID_X((x)-1) + MARGIN_L) -#define BTN_Y(y) (GRID_Y((y)-1) + MARGIN_T) -#define BTN_W(w) (GRID_X(w) - GRID_X(0) - MARGIN_L - MARGIN_R) -#define BTN_H(h) (GRID_Y(h) - GRID_Y(0) - MARGIN_T - MARGIN_B) +#define BTN_X(x) (BOX_X(x) + MARGIN_L) +#define BTN_Y(y) (BOX_Y(y) + MARGIN_T) +#define BTN_W(w) (BOX_W(w) - MARGIN_L - MARGIN_R) +#define BTN_H(h) (BOX_H(h) - MARGIN_T - MARGIN_B) -// Abbreviations for common phrases, to allow a button to be -// defined in one line of source. +// Abbreviations for common phrases, to allow a box or button +// to be defined in one line of source. #define BTN_POS(x,y) BTN_X(x), BTN_Y(y) #define BTN_SIZE(w,h) BTN_W(w), BTN_H(h) +#define BOX_POS(x,y) BOX_X(x), BOX_Y(y) +#define BOX_SIZE(w,h) BOX_W(w), BOX_H(h) // Draw a reference grid for ease of spacing out widgets. #define DRAW_LAYOUT_GRID \ @@ -78,13 +88,13 @@ cmd.cmd(LINE_WIDTH(4)); \ for (int i = 1; i <= GRID_COLS; i++) { \ cmd.cmd(BEGIN(LINES)); \ - cmd.cmd(VERTEX2F(GRID_X(i) *16, 0 *16)); \ - cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \ + cmd.cmd(VERTEX2F(_GRID_X(i) *16, 0 *16)); \ + cmd.cmd(VERTEX2F(_GRID_X(i) *16, FTDI::display_height *16)); \ } \ for (int i = 1; i < GRID_ROWS; i++) { \ cmd.cmd(BEGIN(LINES)); \ - cmd.cmd(VERTEX2F(0 *16, GRID_Y(i) *16)); \ - cmd.cmd(VERTEX2F(FTDI::display_width *16, GRID_Y(i) *16)); \ + cmd.cmd(VERTEX2F(0 *16, _GRID_Y(i) *16)); \ + cmd.cmd(VERTEX2F(FTDI::display_width *16, _GRID_Y(i) *16)); \ } \ cmd.cmd(LINE_WIDTH(16)); \ } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp index 552cd831ea17..8db2d2ef708c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp @@ -157,12 +157,6 @@ void BedMeshViewScreen::doProbe() { injectCommands_P(PSTR(BED_LEVELING_COMMANDS)); } -void BedMeshViewScreen::doMeshValidation() { - mydata.count = 0; - GOTO_SCREEN(StatusScreen); - injectCommands_P(PSTR("G28\nM117 Heating...\nG26 R X0 Y0\nG27")); -} - void BedMeshViewScreen::show() { injectCommands_P(PSTR("G29 L1")); GOTO_SCREEN(BedMeshViewScreen); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h index 0bb88f7f9659..90a90c233e63 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h @@ -43,6 +43,5 @@ class BedMeshViewScreen : public BedMeshBase, public CachedScreen "), OPT_CENTERY | OPT_RIGHTX); - } + draw_text_with_ellipsis(cmd, bx,by, bw - (is_dir ? 20 : 0), bh, filename, OPT_CENTERY, font_medium); + if (is_dir && !is_highlighted) cmd.text(bx, by, bw, bh, F("> "), OPT_CENTERY | OPT_RIGHTX); #if ENABLED(SCROLL_LONG_FILENAMES) - if (is_highlighted) { - cmd.cmd(RESTORE_CONTEXT()); - } + if (is_highlighted) cmd.cmd(RESTORE_CONTEXT()); #endif } void FilesScreen::drawFileList() { FileList files; - mydata.num_page = max(1,ceil(float(files.count()) / files_per_page)); + mydata.num_page = max(1,ceil(float(files.count()) / FILES_PER_PAGE)); mydata.cur_page = min(mydata.cur_page, mydata.num_page-1); mydata.flags.is_root = files.isAtRootDir(); - #undef MARGIN_T - #undef MARGIN_B - #define MARGIN_T 0 - #define MARGIN_B 0 - uint16_t fileIndex = mydata.cur_page * files_per_page; - for (uint8_t i = 0; i < files_per_page; i++, fileIndex++) { - if (files.seek(fileIndex)) { + uint16_t fileIndex = mydata.cur_page * FILES_PER_PAGE; + for (uint8_t i = 0; i < FILES_PER_PAGE; i++, fileIndex++) { + if (files.seek(fileIndex)) drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false); - } - else { + else break; - } } } void FilesScreen::drawHeader() { - const bool prev_enabled = mydata.cur_page > 0; - const bool next_enabled = mydata.cur_page < (mydata.num_page - 1); - - #undef MARGIN_T - #undef MARGIN_B - #define MARGIN_T 0 - #define MARGIN_B 2 - char str[16]; - sprintf_P(str, PSTR("Page %d of %d"), - mydata.cur_page + 1, mydata.num_page); + sprintf_P(str, PSTR("Page %d of %d"), mydata.cur_page + 1, mydata.num_page); CommandProcessor cmd; cmd.colors(normal_btn) .font(font_small) - .tag(0).button(BTN_POS(2,1), BTN_SIZE(4,header_h), str, OPT_CENTER | OPT_FLAT) - .font(font_medium) - .colors(action_btn) - .tag(241).enabled(prev_enabled).button(BTN_POS(1,1), BTN_SIZE(1,header_h), F("<")) - .tag(242).enabled(next_enabled).button(BTN_POS(6,1), BTN_SIZE(1,header_h), F(">")); + .tag(0).button(HEAD_POS, str, OPT_CENTER | OPT_FLAT); +} + +void FilesScreen::drawArrows() { + const bool prev_enabled = mydata.cur_page > 0; + const bool next_enabled = mydata.cur_page < (mydata.num_page - 1); + + CommandProcessor cmd; + cmd.colors(normal_btn); + cmd.tag(242).enabled(prev_enabled).button(PREV_POS, F("")); if (prev_enabled) drawArrow(PREV_POS, PREV_DIR); + cmd.tag(243).enabled(next_enabled).button(NEXT_POS, F("")); if (next_enabled) drawArrow(NEXT_POS, NEXT_DIR); } void FilesScreen::drawFooter() { - #undef MARGIN_T - #undef MARGIN_B - #if ENABLED(TOUCH_UI_PORTRAIT) - #define MARGIN_T 15 - #define MARGIN_B 5 - #else - #define MARGIN_T 5 - #define MARGIN_B 5 - #endif - const bool has_selection = mydata.selected_tag != 0xFF; - const uint8_t back_tag = mydata.flags.is_root ? 240 : 245; - const uint8_t y = GRID_ROWS - footer_h + 1; - const uint8_t h = footer_h; + const bool has_selection = mydata.selected_tag != 0xFF; CommandProcessor cmd; cmd.colors(normal_btn) .font(font_medium) - .colors(has_selection ? normal_btn : action_btn) - .tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_DONE)) - .enabled(has_selection) + .colors(has_selection ? normal_btn : action_btn); + + if (mydata.flags.is_root) + cmd.tag(240).button(BTN2_POS, GET_TEXT_F(MSG_BUTTON_DONE)); + else + cmd.tag(245).button(BTN2_POS, F("Up Dir")); + + cmd.enabled(has_selection) .colors(has_selection ? action_btn : normal_btn); if (mydata.flags.is_dir) - cmd.tag(244).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_OPEN)); + cmd.tag(244).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_OPEN)); else - cmd.tag(243).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_PRINT)); + cmd.tag(241).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_PRINT)); +} + +void FilesScreen::drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted) { + #undef MARGIN_L + #undef MARGIN_R + #define MARGIN_L 0 + #define MARGIN_R 0 + drawFileButton(LIST_POS, filename, tag, is_dir, is_highlighted); } void FilesScreen::onRedraw(draw_mode_t what) { if (what & FOREGROUND) { drawHeader(); + drawArrows(); drawSelectedFile(); drawFooter(); } @@ -200,48 +215,50 @@ void FilesScreen::gotoPage(uint8_t page) { bool FilesScreen::onTouchEnd(uint8_t tag) { switch (tag) { - case 240: GOTO_PREVIOUS(); return true; - case 241: + case 240: // Done button + GOTO_PREVIOUS(); + return true; + case 241: // Print highlighted file + ConfirmStartPrintDialogBox::show(getSelectedFileIndex()); + return true; + case 242: // Previous page if (mydata.cur_page > 0) { gotoPage(mydata.cur_page-1); } break; - case 242: + case 243: // Next page if (mydata.cur_page < (mydata.num_page-1)) { gotoPage(mydata.cur_page+1); } break; - case 243: - ConfirmStartPrintDialogBox::show(getSelectedFileIndex()); - return true; - case 244: + case 244: // Select directory { FileList files; files.changeDir(getSelectedShortFilename()); gotoPage(0); } break; - case 245: + case 245: // Up directory { FileList files; files.upDir(); gotoPage(0); } break; - default: + default: // File selected if (tag < 240) { mydata.selected_tag = tag; #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + mydata.scroll_pos = 0; + mydata.scroll_max = 0; if (FTDI::ftdi_chip >= 810) { const char *longFilename = getSelectedLongFilename(); if (longFilename[0]) { CommandProcessor cmd; - uint16_t text_width = cmd.font(font_medium).text_width(longFilename); - mydata.scroll_pos = 0; - if (text_width > display_width) - mydata.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R; - else - mydata.scroll_max = 0; + constexpr int dim[4] = {LIST_POS}; + const uint16_t text_width = cmd.font(font_medium).text_width(longFilename); + if (text_width > dim[2]) + mydata.scroll_max = text_width - dim[2] + MARGIN_L + MARGIN_R + 10; } } #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h index be75684ceb90..bf2b4153640f 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h @@ -41,16 +41,6 @@ struct FilesScreenData { class FilesScreen : public BaseScreen, public CachedScreen { private: - #if ENABLED(TOUCH_UI_PORTRAIT) - static constexpr uint8_t header_h = 2; - static constexpr uint8_t footer_h = 2; - static constexpr uint8_t files_per_page = 11; - #else - static constexpr uint8_t header_h = 1; - static constexpr uint8_t footer_h = 1; - static constexpr uint8_t files_per_page = 6; - #endif - static uint8_t getTagForLine(uint8_t line) {return line + 2;} static uint8_t getLineForTag(uint8_t tag) {return tag - 2;} static uint16_t getFileForTag(uint8_t tag); @@ -60,9 +50,11 @@ class FilesScreen : public BaseScreen, public CachedScreen Date: Sun, 29 Aug 2021 16:05:30 -0600 Subject: [PATCH 268/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Fix,=20enhance=20F?= =?UTF-8?q?TDI=20Eve=20Touch=20UI=20(#22619)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ftdi_eve_lib/extended/text_box.cpp | 12 ++++++--- .../extui/ftdi_eve_touch_ui/theme/bitmaps.h | 26 +++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp index 544c5fed050e..342b1e4d2bd2 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp @@ -23,6 +23,10 @@ #if ENABLED(FTDI_EXTENDED) +#define IS_LINE_SEPARATOR(c) c == '\n' || c == '\t' +#define IS_WORD_SEPARATOR(c) c == ' ' +#define IS_SEPARATOR(c) IS_LINE_SEPARATOR(c) || IS_WORD_SEPARATOR(c) + namespace FTDI { /** * Given a str, end will be set to the position at which a line needs to @@ -37,11 +41,11 @@ namespace FTDI { const char *next = p; const utf8_char_t c = get_utf8_char_and_inc(next); // Decide whether to break the string at this location - if (c == '\n' || c == '\0' || c == ' ') { + if (IS_SEPARATOR(c) || c == '\0' ) { end = p; result = lw; } - if (c == '\n' || c == '\0') break; + if (IS_LINE_SEPARATOR(c) || c == '\0') break; // Measure the next character const uint16_t cw = use_utf8 ? utf8_fm.get_char_width(c) : clcd_fm.char_widths[(uint8_t)c]; // Stop processing once string exceeds the display width @@ -69,7 +73,7 @@ namespace FTDI { const uint16_t line_width = find_line_break(utf8_fm, clcd_fm, wrap_width, line_start, line_end, use_utf8); width = max(width, line_width); height += utf8_fm.get_height(); - if (*line_end == '\n' || *line_end == ' ') line_end++; + if (IS_SEPARATOR(*line_end)) line_end++; if (*line_end == '\0') break; if (line_end == line_start) break; line_start = line_end; @@ -124,7 +128,7 @@ namespace FTDI { } y += utf8_fm.get_height(); - if (*line_end == '\n' || *line_end == ' ') line_end++; + if (IS_SEPARATOR(*line_end)) line_end++; if (*line_end == '\0') break; if (line_end == line_start) break; line_start = line_end; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h index f7cb63125f4b..c689f239057e 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h @@ -229,5 +229,31 @@ namespace Theme { 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00 }; + constexpr PROGMEM bitmap_info_t Light_Bulb_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8685, + .width = 31, + .height = 32, + }; + + const unsigned char Light_Bulb[128] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, + 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x80, 0x02, 0x00, + 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x36, 0x18, 0x00, + 0x00, 0x2C, 0x08, 0x00, 0x00, 0x58, 0x04, 0x00, 0x00, 0x50, 0x04, 0x00, + 0x7C, 0x50, 0x04, 0x7C, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, + 0x00, 0x60, 0x0C, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x88, 0x22, 0x00, 0x01, 0x08, 0x21, 0x00, + 0x02, 0x08, 0x20, 0x80, 0x04, 0x0F, 0xE0, 0x40, 0x00, 0x07, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + constexpr PROGMEM uint32_t UTF8_FONT_OFFSET = 10000; + constexpr PROGMEM uint32_t BACKGROUND_OFFSET = 40000; }; // namespace Theme From 4d5f6b2a7817609f58f20aa8e1d2a40f139fa2ae Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 30 Aug 2021 00:57:24 +0000 Subject: [PATCH 269/323] [cron] Bump distribution date (2021-08-30) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index a9ecab7bbf49..ae244b1f513c 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-29" +//#define STRING_DISTRIBUTION_DATE "2021-08-30" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 7a2510e0147e..198dc15fb494 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-29" + #define STRING_DISTRIBUTION_DATE "2021-08-30" #endif /** From 8f57a21176d217c1c55c03be18876bf187ca786f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 20:04:14 -0500 Subject: [PATCH 270/323] =?UTF-8?q?=F0=9F=94=A8=20Three=20columns=20in=20m?= =?UTF-8?q?ftest=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/bin/mftest | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/buildroot/bin/mftest b/buildroot/bin/mftest index e0c1d8f38d2d..17605e3174d1 100755 --- a/buildroot/bin/mftest +++ b/buildroot/bin/mftest @@ -206,13 +206,26 @@ fi if [[ $TESTENV == '-' ]]; then IND=0 NAMES=() + MENU=() + BIGLEN=0 for FILE in $( ls -1 $TESTPATH/* ) do let IND++ TNAME=${FILE/$TESTPATH\//} NAMES+=($TNAME) - (( IND < 10 )) && echo -n " " - echo " $IND) $TNAME" + IFS="" + ITEM=$( printf "%2i) %s" $IND $TNAME ) + MENU+=($ITEM) + [[ ${#ITEM} -gt $BIGLEN ]] && BIGLEN=${#ITEM} + done + + (( BIGLEN += 2 )) + THIRD=$(( (${#MENU[@]} + 2) / 3 )) + for ((i = 0; i < $THIRD; i++)) + do + COL1=$i ; COL2=$(( $i + $THIRD )) ; COL3=$(( $i + 2 * $THIRD )) + FMT="%-${BIGLEN}s" + printf "${FMT}${FMT}${FMT}\n" ${MENU[$COL1]} ${MENU[$COL2]} ${MENU[$COL3]} done echo From d95d452b29b80e66d534b36c78262454664ce5a1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 23:02:53 -0500 Subject: [PATCH 271/323] =?UTF-8?q?=F0=9F=8C=90=20MSG=5FPROBING=5FMESH=20?= =?UTF-8?q?=3D>=20MSG=5FPROBING=5FPOINT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 2 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 4 ++-- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 2 +- Marlin/src/lcd/language/language_cz.h | 2 +- Marlin/src/lcd/language/language_de.h | 2 +- Marlin/src/lcd/language/language_en.h | 2 +- Marlin/src/lcd/language/language_es.h | 2 +- Marlin/src/lcd/language/language_fr.h | 2 +- Marlin/src/lcd/language/language_gl.h | 2 +- Marlin/src/lcd/language/language_hu.h | 2 +- Marlin/src/lcd/language/language_it.h | 2 +- Marlin/src/lcd/language/language_pl.h | 2 +- Marlin/src/lcd/language/language_pt_br.h | 2 +- Marlin/src/lcd/language/language_ro.h | 2 +- Marlin/src/lcd/language/language_ru.h | 2 +- Marlin/src/lcd/language/language_sk.h | 2 +- Marlin/src/lcd/language/language_sv.h | 2 +- Marlin/src/lcd/language/language_tr.h | 2 +- Marlin/src/lcd/language/language_uk.h | 2 +- Marlin/src/lcd/language/language_zh_CN.h | 2 +- Marlin/src/lcd/language/language_zh_TW.h | 2 +- Marlin/src/lcd/menu/menu_bed_corners.cpp | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index f8e446cf81be..84bb7f9c4cf7 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -736,7 +736,7 @@ void unified_bed_leveling::shift_mesh_height() { const uint8_t point_num = (GRID_MAX_POINTS - count) + 1; SERIAL_ECHOLNPAIR("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), point_num, int(GRID_MAX_POINTS))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS))); #if HAS_LCD_MENU if (ui.button_pressed()) { diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index c3c8d3c92bf1..ca36f6d46ed0 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -637,7 +637,7 @@ G29_TYPE GcodeSuite::G29() { if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue; if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl.abl_points, "."); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), int(pt_index), int(abl.abl_points))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points))); abl.measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(abl.probePos, raise_after, abl.verbose_level); @@ -682,7 +682,7 @@ G29_TYPE GcodeSuite::G29() { LOOP_L_N(i, 3) { if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3."); - TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_MESH), int(i + 1))); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1))); // Retain the last probe position abl.probePos = xy_pos_t(points[i]); diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index 984e008d2782..b8ca8bdee52c 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -211,7 +211,7 @@ void GcodeSuite::G29() { if (state == MeshNext) { SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS); - if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS))); + if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS))); } report_current_position(); diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index a6e97ea40ce2..b58fb05a1d16 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -114,7 +114,7 @@ namespace Language_cz { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor sítě"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Upravit síť bodů"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Konec úprav sítě"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Měření bodu"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Měření bodu"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Hodnota Z"); diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 0fa895638b12..318f00315b20 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -107,7 +107,7 @@ namespace Language_de { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Netz Editor"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Netz bearbeiten"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Netzbearb. angeh."); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Messpunkt"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Messpunkt"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z-Wert"); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index ede69046275e..3f1f744b55ac 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -147,7 +147,7 @@ namespace Language_en { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Mesh Editor"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Edit Mesh"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Mesh Editing Stopped"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Probing Point"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Probing Point"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Value"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 46e4e262e76c..f08cecf1e151 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -110,7 +110,7 @@ namespace Language_es { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mallado"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Mallado"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Ed. Mallado parada"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Sondear Punto"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Sondear Punto"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Índice X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Índice Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valor Z"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index e0f13356ba17..c0ee6b82cd0d 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -117,7 +117,7 @@ namespace Language_fr { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Modif. maille"); // 13 car. max PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Modifier grille"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Modification arrêtée"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Mesure point"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Mesure point"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valeur Z"); diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index f657d5e34d7f..e29a2772ff79 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -108,7 +108,7 @@ namespace Language_gl { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mallado"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Mallado"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Ed. Mallado Detida"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punto de Proba"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Punto de Proba"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Índice X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Índice Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valor Z"); diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 444c29560b14..04b266500ffd 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -141,7 +141,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Háló szerkesztö"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Háló szerkesztése"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Háló szerk. állj"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Próbapont"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Próbapont"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z érték"); diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 4ae85e7bbe16..ab05d5b64f56 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -145,7 +145,7 @@ namespace Language_it { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mesh"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Modifica Mesh"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Modif. Mesh Fermata"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punto sondato"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Punto sondato"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Indice X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Indice Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valore di Z"); diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index b55777717d37..c1620a8fa6fb 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -139,7 +139,7 @@ namespace Language_pl { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Edytor siatki"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Edycja siatki"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Edycja siatki zatrzymana"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punkt pomiarowy"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Punkt pomiarowy"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Indeks X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Indeks Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Wartość Z"); diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index 4b52ee97b806..21be3a29311c 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -99,7 +99,7 @@ namespace Language_pt_br { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor de Malha"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Malha"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Fim da Edição"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Sondando ponto"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Sondando ponto"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Índice X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Índice Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valor Z"); diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index aedc8c417332..b1208eac254c 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -107,7 +107,7 @@ namespace Language_ro { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mesh"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editeaza Mesh"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Editarea Meshului Oprita"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punctul de Probare"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Punctul de Probare"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valoare Z"); diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index e7eab72f6c4c..5f5afb049cb2 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -178,7 +178,7 @@ namespace Language_ru { PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Правка окончена"); #endif PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Редактировать сетку"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Точка сетки"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Точка сетки"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Индекс X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Индекс Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Значение Z"); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 079bcf55c813..2fda9b8794d1 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -141,7 +141,7 @@ namespace Language_sk { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor sieťe bodov"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Upraviť sieť bodov"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Koniec úprav siete"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Skúšam bod"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Skúšam bod"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Hodnota Z"); diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index cb33db5dfdff..af80c41a8226 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -130,7 +130,7 @@ namespace Language_sv { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Nät Redigerare"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Redigera Nät"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Nätredigering Stoppad"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Sonderingspunkt"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Sonderingspunkt"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Värde"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 66c7c1c1a26a..f31eb5b13ff4 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -110,7 +110,7 @@ namespace Language_tr { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Mesh Editörü"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Mesh Düzenle"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Mesh Düzenleme Durdu"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Prop Noktası"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Prop Noktası"); PROGMEM Language_Str MSG_MESH_X = _UxGT("İndeks X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("İndeks Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Değeri"); diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index e0ee2e39294d..1e6b49da766e 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -179,7 +179,7 @@ namespace Language_uk { #endif PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Редагувати сітку"); PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Редагув. зупинено"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Точка сітки"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("Точка сітки"); PROGMEM Language_Str MSG_MESH_X = _UxGT("Індекс X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("Індекс Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Значення Z"); diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index d3883ac88ddc..35642460fc49 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -105,7 +105,7 @@ namespace Language_zh_CN { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("网格编辑器"); PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("编辑网格"); // "Edit Mesh" PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("网格编辑已停止"); // "Mesh Editing Stopped" - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("探测点"); + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("探测点"); PROGMEM Language_Str MSG_MESH_X = _UxGT("索引X"); PROGMEM Language_Str MSG_MESH_Y = _UxGT("索引Y"); PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z 值"); diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index 2c7d1bf69ff4..467a2467f59c 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -103,7 +103,7 @@ namespace Language_zh_TW { PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("網格編輯器"); // "Mesh Editor" PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("編輯網格"); // "Edit Mesh" PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("網格編輯已停止"); // "Mesh Editing Stopped" - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("探測點"); // "Probing Point" + PROGMEM Language_Str MSG_PROBING_POINT = _UxGT("探測點"); // "Probing Point" PROGMEM Language_Str MSG_MESH_X = _UxGT("索引 X"); // "Index X" PROGMEM Language_Str MSG_MESH_Y = _UxGT("索引 Y"); // "Index Y" PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z 值"); // "Z Value" diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index 82f25ea6f359..ea9ef75aa199 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -172,7 +172,7 @@ static void _lcd_level_bed_corners_get_next_position() { TERN_(HAS_MARLINUI_U8GLIB, ui.set_font(FONT_MENU)); // Set up the font for extra info - MenuItem_static::draw(0, GET_TEXT(MSG_PROBING_MESH), SS_INVERT); // "Probing Mesh" heading + MenuItem_static::draw(0, GET_TEXT(MSG_PROBING_POINT), SS_INVERT); // "Probing Mesh" heading uint8_t cy = TERN(TFT_COLOR_UI, 3, LCD_HEIGHT - 1), y = LCD_ROW_Y(cy); From 90cd1ca68d3f4f5ede56cbea4913f06ca4782a94 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 23:06:24 -0500 Subject: [PATCH 272/323] =?UTF-8?q?=F0=9F=8E=A8=20screws=5Ftilt=5Fadjust?= =?UTF-8?q?=5Fpos=20=3D>=20tramming=5Fpoints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/tramming.h | 6 +++--- Marlin/src/gcode/bedlevel/G35.cpp | 6 +++--- Marlin/src/lcd/menu/menu_tramming.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/feature/tramming.h b/Marlin/src/feature/tramming.h index eb27fe82fe2a..925659e29db2 100644 --- a/Marlin/src/feature/tramming.h +++ b/Marlin/src/feature/tramming.h @@ -28,12 +28,12 @@ #error "TRAMMING_SCREW_THREAD must be equal to 30, 31, 40, 41, 50, or 51." #endif -constexpr xy_pos_t screws_tilt_adjust_pos[] = TRAMMING_POINT_XY; +constexpr xy_pos_t tramming_points[] = TRAMMING_POINT_XY; -#define G35_PROBE_COUNT COUNT(screws_tilt_adjust_pos) +#define G35_PROBE_COUNT COUNT(tramming_points) static_assert(WITHIN(G35_PROBE_COUNT, 3, 6), "TRAMMING_POINT_XY requires between 3 and 6 XY positions."); -#define VALIDATE_TRAMMING_POINT(N) static_assert(N >= G35_PROBE_COUNT || Probe::build_time::can_reach(screws_tilt_adjust_pos[N]), \ +#define VALIDATE_TRAMMING_POINT(N) static_assert(N >= G35_PROBE_COUNT || Probe::build_time::can_reach(tramming_points[N]), \ "TRAMMING_POINT_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.") VALIDATE_TRAMMING_POINT(0); VALIDATE_TRAMMING_POINT(1); VALIDATE_TRAMMING_POINT(2); VALIDATE_TRAMMING_POINT(3); VALIDATE_TRAMMING_POINT(4); VALIDATE_TRAMMING_POINT(5); diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 3d75a7691537..3a4e1bdd5a19 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -103,13 +103,13 @@ void GcodeSuite::G35() { // Users of G35 might have a badly misaligned bed, so raise Z by the // length of the deployed pin (BLTOUCH stroke < 7mm) do_blocking_move_to_z(SUM_TERN(BLTOUCH_HS_MODE, Z_CLEARANCE_BETWEEN_PROBES, 7)); - const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true); + const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true); if (isnan(z_probed_height)) { SERIAL_ECHOPAIR("G35 failed at point ", i + 1, " ("); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); SERIAL_CHAR(')'); - SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y); + SERIAL_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y); err_break = true; break; } @@ -118,7 +118,7 @@ void GcodeSuite::G35() { DEBUG_ECHOPAIR("Probing point ", i + 1, " ("); DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); DEBUG_CHAR(')'); - DEBUG_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height); + DEBUG_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height); } z_measured[i] = z_probed_height; diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index b5868f40566c..d230ca6397d4 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -49,7 +49,7 @@ static uint8_t tram_index = 0; static bool probe_single_point() { do_blocking_move_to_z(TERN(BLTOUCH, Z_CLEARANCE_DEPLOY_PROBE, Z_CLEARANCE_BETWEEN_PROBES)); // Stow after each point with BLTouch "HIGH SPEED" mode for push-pin safety - const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[tram_index], TERN(BLTOUCH_HS_MODE, PROBE_PT_STOW, PROBE_PT_RAISE), 0, true); + const float z_probed_height = probe.probe_at_point(tramming_points[tram_index], TERN(BLTOUCH_HS_MODE, PROBE_PT_STOW, PROBE_PT_RAISE), 0, true); DEBUG_ECHOLNPAIR("probe_single_point: ", z_probed_height, "mm"); z_measured[tram_index] = z_probed_height; move_to_tramming_wait_pos(); From efb9ea92b85ec469e9436969129bcee33aadd3bc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 30 Aug 2021 17:02:12 -0500 Subject: [PATCH 273/323] =?UTF-8?q?=F0=9F=94=A8=20Fix=20HAL/STM32=20F103Zx?= =?UTF-8?q?=20builds=20(#22610)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/motion/G2_G3.cpp | 2 +- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 3 + .../MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h | 2 +- .../MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h | 2 +- .../hal_conf_extra.h | 2 +- .../hal_conf_extra.h | 2 +- .../MARLIN_F103VE_LONGER/hal_conf_custom.h | 41 +++-------- .../variants/MARLIN_F103Zx/PinNamesVar.h | 3 +- .../variants/MARLIN_F103Zx/hal_conf_custom.h | 71 ++++++++++--------- ini/stm32f1.ini | 12 +++- 10 files changed, 66 insertions(+), 74 deletions(-) diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index f9f9c2b3da6c..33167d9dff8d 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -217,7 +217,7 @@ void plan_arc( * tool precision in some cases. Therefore, arc path correction is implemented. * * Small angle approximation may be used to reduce computation overhead further. This approximation - * holds for everything, but very small circles and large MM_PER_ARC_SEGMENT values. In other words, + * holds for everything, but very small circles and large MAX_ARC_SEGMENT_MM values. In other words, * theta_per_segment would need to be greater than 0.1 rad and N_ARC_CORRECTION would need to be large * to cause an appreciable drift error. N_ARC_CORRECTION~=25 is more than small enough to correct for * numerical drift error. N_ARC_CORRECTION may be on the order a hundred(s) before error becomes an diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index 5b59a157f163..bf38955127e4 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -147,6 +147,9 @@ #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h index 6c4a991f33b8..2c1557cbbbc5 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h @@ -8,7 +8,7 @@ #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED Real Time Clock...do we use it? +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h index e6d558b3e174..40b340c20560 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h @@ -8,7 +8,7 @@ #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED Real Time Clock...do we use it? +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h index da974b1ba761..42c76a4bbffb 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h @@ -8,7 +8,7 @@ #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED Real Time Clock...do we use it? +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h index e6d558b3e174..40b340c20560 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h @@ -8,7 +8,7 @@ #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED Real Time Clock...do we use it? +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h index e2247addb964..fd20d8fe6f07 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h @@ -20,25 +20,18 @@ extern "C" { */ #include "stm32yyxx_hal_conf.h" -#ifdef HAL_PWR_MODULE_ENABLED - #undef HAL_PWR_MODULE_ENABLED // only way to disable it -#endif +#undef HAL_PWR_MODULE_ENABLED +#define HAL_PWR_MODULE_ONLY // disable low power & PA0 wakeup pin (its T°c pin) -#if defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY) - #define HAL_PWR_MODULE_ONLY // disable low power & PA0 wakeup pin (its T°c pin) -#endif - -#ifndef HAL_IWDG_MODULE_ENABLED - #define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG -#endif +#define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG #ifdef HAL_PCD_MODULE_ENABLED - #warning No direct STM32 USB pins on Longer3D board + #warning "No direct STM32 USB pins on Longer3D board" #undef HAL_PCD_MODULE_ENABLED // USB Device #endif #ifdef HAL_HCD_MODULE_ENABLED - #warning No direct STM32 USB pins on Longer3D board + #warning "No direct STM32 USB pins on Longer3D board" #undef HAL_HCD_MODULE_ENABLED // USB Host #endif @@ -46,25 +39,12 @@ extern "C" { //#define HAL_USART_MODULE_ENABLED // Useless.... UART_MODULE do it #endif -#ifdef HAL_CAN_LEGACY_MODULE_ENABLED - #undef HAL_CAN_LEGACY_MODULE_ENABLED -#endif - -#ifdef HAL_CAN_MODULE_ENABLED - #undef HAL_CAN_MODULE_ENABLED -#endif - -#ifdef HAL_DAC_MODULE_ENABLED - #undef HAL_DAC_MODULE_ENABLED -#endif +#undef HAL_CAN_LEGACY_MODULE_ENABLED +#undef HAL_CAN_MODULE_ENABLED +#undef HAL_DAC_MODULE_ENABLED +#undef HAL_RTC_MODULE_ENABLED -#ifdef HAL_RTC_MODULE_ENABLED - #undef HAL_RTC_MODULE_ENABLED -#endif - -#ifndef HAL_EXTI_MODULE_ENABLED - #define HAL_EXTI_MODULE_ENABLED // for ENDSTOP_INTERRUPTS_FEATURE -#endif +#define HAL_EXTI_MODULE_ENABLED // for ENDSTOP_INTERRUPTS_FEATURE /** * @brief List of modules in the framework (first ones enabled by default) @@ -345,4 +325,3 @@ extern "C" { #ifdef __cplusplus } #endif - diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h index d9076b4dfb59..b0259ab3355a 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h @@ -1,5 +1,6 @@ /* SYS_WKUP */ -#ifdef PWR_WAKEUP_PIN1 +#if defined(PWR_WAKEUP_PIN1) && defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY) + #error "PA0 is used by thermal sensor. Disable low power wake with -DHAL_PWR_MODULE_ONLY." SYS_WKUP1 = PA_0, #endif #ifdef PWR_WAKEUP_PIN2 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h index 4e55fe1240f3..7d19d532a597 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h @@ -37,40 +37,43 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -//#define HAL_MODULE_ENABLED -//#define HAL_ADC_MODULE_ENABLED -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_CRC_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_DMA_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_GPIO_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_I2C_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED -//#define HAL_PWR_MODULE_ENABLED -//#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED -//#define HAL_SD_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_SPI_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_TIM_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default +//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#define HAL_SD_MODULE_ENABLED + +#undef HAL_CAN_MODULE_ENABLED +#undef HAL_CAN_LEGACY_MODULE_ENABLED +#undef HAL_CEC_MODULE_ENABLED +#undef HAL_DAC_MODULE_ENABLED +#undef HAL_ETH_MODULE_ENABLED +#undef HAL_HCD_MODULE_ENABLED // USB Host +#undef HAL_I2S_MODULE_ENABLED +#undef HAL_IRDA_MODULE_ENABLED +#undef HAL_NAND_MODULE_ENABLED +#undef HAL_NOR_MODULE_ENABLED +#undef HAL_PCCARD_MODULE_ENABLED +#undef HAL_PWR_MODULE_ENABLED +#undef HAL_RTC_MODULE_ENABLED +#undef HAL_SMARTCARD_MODULE_ENABLED +#undef HAL_WWDG_MODULE_ENABLED +#undef HAL_MMC_MODULE_ENABLED + +#define HAL_PWR_MODULE_ONLY /* ########################## Oscillator Values adaptation ####################*/ /** diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini index f1cb078fd81c..a27d275fc112 100644 --- a/ini/stm32f1.ini +++ b/ini/stm32f1.ini @@ -348,9 +348,15 @@ debug_tool = stlink # TRIGORILLA PRO (STM32F103ZET6) # [env:trigorilla_pro] -platform = ${common_stm32.platform} -extends = env:mks_robin -extra_scripts = ${common_stm32.extra_scripts} +platform = ${stm32_variant.platform} +extends = stm32_variant +board = genericSTM32F103ZE +board_build.variant = MARLIN_F103Zx +board_build.offset = 0x7000 +build_flags = ${stm32_variant.build_flags} + -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC # # Chitu boards like Tronxy X5s (STM32F103ZET6) From 6ff2be329e0ac81ea56066353f2bb1469ae02eda Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:05:11 +0200 Subject: [PATCH 274/323] =?UTF-8?q?=F0=9F=8C=90=20Update=20Italian=20langu?= =?UTF-8?q?age=20(#22645)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_it.h | 33 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index ab05d5b64f56..388498fe8fea 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -62,7 +62,7 @@ namespace Language_it { PROGMEM Language_Str MSG_MAIN = _UxGT("Menu principale"); PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Impostaz. avanzate"); PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configurazione"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostart"); + PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Esegui files auto"); PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Disabilita Motori"); PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu di debug"); PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test barra avanzam."); @@ -137,7 +137,7 @@ namespace Language_it { PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Livella piano"); PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Livella piano"); PROGMEM Language_Str MSG_BED_TRAMMING = _UxGT("Tramming piano"); - PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Regola la vite finche' la sonda non rileva il piano."); + PROGMEM Language_Str MSG_BED_TRAMMING_RAISE = _UxGT("Regola la vite finché la sonda non rileva il piano."); PROGMEM Language_Str MSG_BED_TRAMMING_IN_RANGE = _UxGT("Tolleranza raggiunta su tutti gli angoli. Piano livellato!"); PROGMEM Language_Str MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Punti buoni: "); PROGMEM Language_Str MSG_BED_TRAMMING_LAST_Z = _UxGT("Ultimo Z: "); @@ -244,7 +244,7 @@ namespace Language_it { PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Controllo LED"); PROGMEM Language_Str MSG_LEDS = _UxGT("Luci"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Preset luce"); + PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Presets luce"); PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Rosso"); PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Arancione"); PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Giallo"); @@ -256,7 +256,7 @@ namespace Language_it { PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Predefinito"); PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Canale ="); PROGMEM Language_Str MSG_LEDS2 = _UxGT("Luci #2"); - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Luce #2 Presets"); + PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Presets luce #2"); PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Luminosità"); PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Luci personalizzate"); PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intensità rosso"); @@ -318,6 +318,7 @@ namespace Language_it { PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Off"); PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("Calibrazione PID"); PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("Calibraz. PID *"); + PROGMEM Language_Str MSG_PID_CYCLE = _UxGT("Ciclo PID"); PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("Calibr.PID eseguita"); PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Calibrazione fallita. Estrusore errato."); PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Calibrazione fallita. Temperatura troppo alta."); @@ -502,8 +503,8 @@ namespace Language_it { PROGMEM Language_Str MSG_BABYSTEP_J = _UxGT("Babystep ") LCD_STR_J; PROGMEM Language_Str MSG_BABYSTEP_K = _UxGT("Babystep ") LCD_STR_K; PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Totali"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Finecorsa annullati"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Risc.Fallito"); // Max 12 caratteri + PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Interrompi se FC"); + PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Risc.Fallito"); // Max 12 characters PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP RIDONDANTE"); PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("TEMP FUORI CONTROLLO"); PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("TEMP PIAT.FUORI CTRL"); @@ -514,9 +515,9 @@ namespace Language_it { PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: TEMP MINIMA"); PROGMEM Language_Str MSG_HALTED = _UxGT("STAMPANTE FERMATA"); PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Riavviare prego"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("g"); // Un solo carattere - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // Un solo carattere - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // Un solo carattere + PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("g"); // One character + PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character + PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character PROGMEM Language_Str MSG_HEATING = _UxGT("Riscaldamento..."); PROGMEM Language_Str MSG_COOLING = _UxGT("Raffreddamento.."); PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Risc. piatto..."); @@ -538,7 +539,7 @@ namespace Language_it { PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonale"); PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Altezza"); PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Raggio"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Riguardo stampante"); + PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Info su stampante"); PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info. stampante"); PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Livel. a 3 punti"); PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Livel. Lineare"); @@ -660,8 +661,9 @@ namespace Language_it { PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Password eliminata"); // - // Le schermate di Cambio Filamento possono visualizzare fino a 3 linee su un display a 4 righe - // ...o fino a 2 linee su un display a 3 righe. + // Filament Change screens show up to 3 lines on a 4-line display + // ...or up to 2 lines on a 3-line display + // #if LCD_HEIGHT >= 4 PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_3_LINE("Premi per", "riprendere", "la stampa")); PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parcheggiando...")); @@ -709,9 +711,14 @@ namespace Language_it { PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Livello asse X"); PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto Calibra"); - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Timeout riscaldatore"); + #if ENABLED(TOUCH_UI_FTDI_EVE) + PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Timeout inattività, temperatura diminuita. Premere OK per riscaldare e riprendere di nuovo."); + #else + PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Timeout riscaldatore"); + #endif PROGMEM Language_Str MSG_REHEAT = _UxGT("Riscalda"); PROGMEM Language_Str MSG_REHEATING = _UxGT("Riscaldando..."); + PROGMEM Language_Str MSG_REHEATDONE = _UxGT("Riscaldato"); PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Wizard Z offset"); PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Altezza di riferimento sonda"); From fff1ed3369200306b313186643ca14ffa7fc36b1 Mon Sep 17 00:00:00 2001 From: "Zs.Antal" <45710979+AntoszHUN@users.noreply.github.com> Date: Tue, 31 Aug 2021 02:30:14 +0200 Subject: [PATCH 275/323] =?UTF-8?q?=F0=9F=8C=90=20Update=20Hungarian=20lan?= =?UTF-8?q?guage=20(#22678)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_hu.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 04b266500ffd..2b879a7d6fd7 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -26,11 +26,11 @@ * * LCD Menu Messages. See also https://marlinfw.org/docs/development/lcd_language.html * Hungarian translation by AntoszHUN. I am constantly improving and updating the translation. - * Translation last updated: 07/07/2021 - 11:20 + * Translation last updated: 08/30/2021 - 22:20 * * LCD Menü Üzenetek. Lásd még https://marlinfw.org/docs/development/lcd_language.html * A Magyar fordítást készítette: AntoszHUN. A fordítást folyamatosan javítom és frissítem. - * A Fordítás utolsó frissítése: 2021.07.07. - 11:20 + * A Fordítás utolsó frissítése: 2021.08.30. - 22:20 */ namespace Language_hu { @@ -312,6 +312,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Ki"); PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID hangolás"); PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID hangolás *"); + PROGMEM Language_Str MSG_PID_CYCLE = _UxGT("PID ciklus"); PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID hangolás kész"); PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba. Rossz adagoló."); PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Hangolási hiba. Magas hömérséklet."); @@ -493,7 +494,7 @@ namespace Language_hu { PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI használ"); PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Z-Szonda telepítés"); PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Z-Szonda elhelyezés"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Elsö %s%s%s kell"); + PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Elöször %s%s%s kell"); PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Szonda eltolások"); PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("X szonda eltolás"); PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Y szonda eltolás"); From 7378e7c2db379f57e99a3b3b7ea1700e5031460a Mon Sep 17 00:00:00 2001 From: Christian Schuster Date: Tue, 31 Aug 2021 02:32:02 +0200 Subject: [PATCH 276/323] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20LPC176x=20M43=20fo?= =?UTF-8?q?rmatting=20(#22680)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/LPC1768/pinsDebug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/HAL/LPC1768/pinsDebug.h b/Marlin/src/HAL/LPC1768/pinsDebug.h index c622a2622ed1..466bf170b4e8 100644 --- a/Marlin/src/HAL/LPC1768/pinsDebug.h +++ b/Marlin/src/HAL/LPC1768/pinsDebug.h @@ -35,7 +35,7 @@ #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0) -#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin +#define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities #ifndef M43_NEVER_TOUCH From ef2d0b8d5353460ba8b6698281c8d4987217eb07 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 31 Aug 2021 00:59:16 +0000 Subject: [PATCH 277/323] [cron] Bump distribution date (2021-08-31) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ae244b1f513c..df5f54a55052 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-30" +//#define STRING_DISTRIBUTION_DATE "2021-08-31" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 198dc15fb494..c5fc257800ca 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-30" + #define STRING_DISTRIBUTION_DATE "2021-08-31" #endif /** From 66ded801b734fbb597ab1c1497d347544b3aa05c Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 31 Aug 2021 15:40:49 +1200 Subject: [PATCH 278/323] =?UTF-8?q?=E2=8F=AA=EF=B8=8F=20Revert=20MAX31865?= =?UTF-8?q?=20recent=20changes=20(#22660)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 6 ++--- Marlin/src/libs/MAX31865.cpp | 38 ++++++++++++++++++------------ Marlin/src/libs/MAX31865.h | 1 - Marlin/src/module/temperature.cpp | 6 ++--- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index fd49aada6bdb..a43e57d15839 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -755,13 +755,13 @@ // to select a USER library for MAX6675, MAX31855, MAX31865 // #if BOTH(HAS_MAX6675, LIB_MAX6675) - #define LIB_USR_MAX6675 1 + #define USE_LIB_MAX6675 1 #endif #if BOTH(HAS_MAX31855, LIB_MAX31855) - #define LIB_USR_MAX31855 1 + #define USE_ADAFRUIT_MAX31855 1 #endif #if BOTH(HAS_MAX31865, LIB_MAX31865) - #define LIB_USR_MAX31865 1 + #define USE_ADAFRUIT_MAX31865 1 #elif HAS_MAX31865 #define LIB_INTERNAL_MAX31865 1 #endif diff --git a/Marlin/src/libs/MAX31865.cpp b/Marlin/src/libs/MAX31865.cpp index 86c31edee983..1264c6fbe88e 100644 --- a/Marlin/src/libs/MAX31865.cpp +++ b/Marlin/src/libs/MAX31865.cpp @@ -44,12 +44,11 @@ //#define MAX31865_DEBUG //#define MAX31865_DEBUG_SPI -#include - #include "../inc/MarlinConfig.h" -#if HAS_MAX31865 && !LIB_USR_MAX31865 +#if HAS_MAX31865 && !USE_ADAFRUIT_MAX31865 +//#include // TODO: switch to SPIclass/SoftSPI #include "MAX31865.h" // The maximum speed the MAX31865 can do is 5 MHz @@ -62,7 +61,7 @@ SPISettings MAX31865::spiConfig = SPISettings( 500000 #endif , MSBFIRST - , SPI_MODE1 // CPOL0 CPHA1 + , SPI_MODE_1 // CPOL0 CPHA1 ); #ifndef LARGE_PINMAP @@ -153,15 +152,17 @@ void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { OUT_WRITE(_cs, HIGH); if (_sclk != TERN(LARGE_PINMAP, -1UL, -1)) { - // define pin modes for Software SPI + // Define pin modes for Software SPI #ifdef MAX31865_DEBUG SERIAL_ECHOLN("Initializing MAX31865 Software SPI"); #endif - - swSpiBegin(_sclk, _miso, _mosi); - - } else { - // start and configure hardware SPI + + OUT_WRITE(_sclk, LOW); + SET_OUTPUT(_mosi); + SET_INPUT(_miso); + } + else { + // Start and configure hardware SPI #ifdef MAX31865_DEBUG SERIAL_ECHOLN("Initializing MAX31865 Hardware SPI"); #endif @@ -169,9 +170,6 @@ void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { SPI.begin(); } - // SPI Begin must be called first, then init - _spi_speed = swSpiInit(SPI_QUARTER_SPEED, _sclk, _mosi); - setWires(wires); enableBias(false); autoConvert(false); @@ -486,7 +484,17 @@ uint8_t MAX31865::spixfer(uint8_t x) { if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) return SPI.transfer(x); - return swSpiTransfer(x, _spi_speed, _sclk, _miso, _mosi); + uint8_t reply = 0; + for (int i = 7; i >= 0; i--) { + reply <<= 1; + WRITE(_sclk, HIGH); + WRITE(_mosi, x & (1 << i)); + WRITE(_sclk, LOW); + if (READ(_miso)) + reply |= 1; + } + + return reply; } -#endif // HAS_MAX31865 && !LIB_USR_MAX31865 +#endif // HAS_MAX31865 && !USE_ADAFRUIT_MAX31865 diff --git a/Marlin/src/libs/MAX31865.h b/Marlin/src/libs/MAX31865.h index 13a117447dca..5d50e870ecd2 100644 --- a/Marlin/src/libs/MAX31865.h +++ b/Marlin/src/libs/MAX31865.h @@ -90,7 +90,6 @@ class MAX31865 { static SPISettings spiConfig; TERN(LARGE_PINMAP, uint32_t, uint8_t) _sclk, _miso, _mosi, _cs; - uint8_t _spi_speed; float Rzero, Rref; void setConfig(uint8_t config, bool enable); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 0475db486c1c..935de772f452 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -63,21 +63,21 @@ // LIB_MAX6675 can be added to the build_flags in platformio.ini to use a user-defined library // If LIB_MAX6675 is not on the build_flags then raw SPI reads will be used. -#if HAS_MAX6675 && LIB_USR_MAX6675 +#if HAS_MAX6675 && USE_LIB_MAX6675 #include #define HAS_MAX6675_LIBRARY 1 #endif // LIB_MAX31855 can be added to the build_flags in platformio.ini to use a user-defined library. // If LIB_MAX31855 is not on the build_flags then raw SPI reads will be used. -#if HAS_MAX31855 && LIB_USR_MAX31855 +#if HAS_MAX31855 && USE_ADAFRUIT_MAX31855 #include #define HAS_MAX31855_LIBRARY 1 typedef Adafruit_MAX31855 MAX31855; #endif #if HAS_MAX31865 - #if LIB_USR_MAX31865 + #if USE_ADAFRUIT_MAX31865 #include typedef Adafruit_MAX31865 MAX31865; #else From 485a1864673d14177622e30d4f77de799e6d910a Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 31 Aug 2021 00:00:59 -0700 Subject: [PATCH 279/323] =?UTF-8?q?=F0=9F=9A=B8=20Improve=20Tramming=20Wiz?= =?UTF-8?q?ard=20usability=20(#22672)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/example/example.cpp | 1 + Marlin/src/lcd/menu/menu_tramming.cpp | 28 ++++++++++++++---------- buildroot/tests/DUE | 2 +- buildroot/tests/LPC1768 | 1 + 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Marlin/src/lcd/extui/example/example.cpp b/Marlin/src/lcd/extui/example/example.cpp index 0e7d71ff4da4..f74cbee91cf7 100644 --- a/Marlin/src/lcd/extui/example/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -120,6 +120,7 @@ namespace ExtUI { void onPidTuning(const result_t rst) { // Called for temperature PID tuning result switch (rst) { + case PID_STARTED: break; case PID_BAD_EXTRUDER_NUM: break; case PID_TEMP_TOO_HIGH: break; case PID_TUNING_TIMEOUT: break; diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index d230ca6397d4..c3090bcc5b5d 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -39,8 +39,10 @@ //#define DEBUG_OUT 1 #include "../../core/debug_out.h" -float z_measured[G35_PROBE_COUNT] = { 0 }; +static float z_measured[G35_PROBE_COUNT]; +static bool z_isvalid[G35_PROBE_COUNT]; static uint8_t tram_index = 0; +static int8_t reference_index; // = 0 #if HAS_LEVELING #include "../../feature/bedlevel/bedlevel.h" @@ -50,32 +52,31 @@ static bool probe_single_point() { do_blocking_move_to_z(TERN(BLTOUCH, Z_CLEARANCE_DEPLOY_PROBE, Z_CLEARANCE_BETWEEN_PROBES)); // Stow after each point with BLTouch "HIGH SPEED" mode for push-pin safety const float z_probed_height = probe.probe_at_point(tramming_points[tram_index], TERN(BLTOUCH_HS_MODE, PROBE_PT_STOW, PROBE_PT_RAISE), 0, true); - DEBUG_ECHOLNPAIR("probe_single_point: ", z_probed_height, "mm"); z_measured[tram_index] = z_probed_height; + if (reference_index < 0) reference_index = tram_index; move_to_tramming_wait_pos(); - return !isnan(z_probed_height); + DEBUG_ECHOLNPAIR("probe_single_point(", tram_index, ") = ", z_probed_height, "mm"); + return (z_isvalid[tram_index] = !isnan(z_probed_height)); } -static void _menu_single_probe(const uint8_t point) { - tram_index = point; - DEBUG_ECHOLNPAIR("Screen: single probe screen Arg:", point); +static void _menu_single_probe() { + DEBUG_ECHOLNPAIR("Screen: single probe screen Arg:", tram_index); START_MENU(); STATIC_ITEM(MSG_BED_TRAMMING, SS_LEFT); - STATIC_ITEM(MSG_LAST_VALUE_SP, SS_LEFT, ftostr42_52(z_measured[0] - z_measured[point])); // Print diff + STATIC_ITEM(MSG_LAST_VALUE_SP, SS_LEFT, z_isvalid[tram_index] ? ftostr42_52(z_measured[reference_index] - z_measured[tram_index]) : "---"); ACTION_ITEM(MSG_UBL_BC_INSERT2, []{ if (probe_single_point()) ui.refresh(); }); - ACTION_ITEM(MSG_BUTTON_DONE, []{ ui.goto_previous_screen(); }); // Back + ACTION_ITEM(MSG_BUTTON_DONE, []{ ui.goto_previous_screen(); }); END_MENU(); } static void tramming_wizard_menu() { - DEBUG_ECHOLNPAIR("Screen: tramming_wizard_menu"); START_MENU(); STATIC_ITEM(MSG_SELECT_ORIGIN); // Draw a menu item for each tramming point - LOOP_L_N(i, G35_PROBE_COUNT) - SUBMENU_N_P(i, (char*)pgm_read_ptr(&tramming_point_name[i]), []{ _menu_single_probe(MenuItemBase::itemIndex); }); + for (tram_index = 0; tram_index < G35_PROBE_COUNT; tram_index++) + SUBMENU_P((char*)pgm_read_ptr(&tramming_point_name[tram_index]), _menu_single_probe); ACTION_ITEM(MSG_BUTTON_DONE, []{ probe.stow(); // Stow before exiting Tramming Wizard @@ -87,9 +88,12 @@ static void tramming_wizard_menu() { // Init the wizard and enter the submenu void goto_tramming_wizard() { DEBUG_ECHOLNPAIR("Screen: goto_tramming_wizard", 1); - tram_index = 0; ui.defer_status_screen(); + // Initialize measured point flags + ZERO(z_isvalid); + reference_index = -1; + // Inject G28, wait for homing to complete, set_all_unhomed(); queue.inject_P(TERN(CAN_SET_LEVELING_AFTER_G28, PSTR("G28L0"), G28_STR)); diff --git a/buildroot/tests/DUE b/buildroot/tests/DUE index 9eb2157428e4..37678501e431 100755 --- a/buildroot/tests/DUE +++ b/buildroot/tests/DUE @@ -15,7 +15,7 @@ opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB \ TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 6 HEATER_CHAMBER_PIN 45 opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \ FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING \ - ASSISTED_TRAMMING ASSISTED_TRAMMING_WIZARD REPORT_TRAMMING_MM ASSISTED_TRAMMING_WAIT_POSITION \ + ASSISTED_TRAMMING REPORT_TRAMMING_MM ASSISTED_TRAMMING_WAIT_POSITION \ EEPROM_SETTINGS SDSUPPORT BINARY_FILE_TRANSFER \ BLINKM PCA9533 PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \ NEOPIXEL_LED NEOPIXEL_PIN CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_USE_RGB_LED CASE_LIGHT_MENU \ diff --git a/buildroot/tests/LPC1768 b/buildroot/tests/LPC1768 index b4e489d31018..26e37108905d 100755 --- a/buildroot/tests/LPC1768 +++ b/buildroot/tests/LPC1768 @@ -42,6 +42,7 @@ opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EEB \ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \ FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY PID_EXTRUSION_SCALING SOUND_MENU_ITEM \ NOZZLE_AS_PROBE AUTO_BED_LEVELING_BILINEAR PREHEAT_BEFORE_LEVELING G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ + ASSISTED_TRAMMING ASSISTED_TRAMMING_WIZARD REPORT_TRAMMING_MM ASSISTED_TRAMMING_WAIT_POSITION \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \ PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \ Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE \ From 2c5daa07228e153a14b6df5a784b1c1ef0e35e46 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 31 Aug 2021 02:23:49 -0500 Subject: [PATCH 280/323] =?UTF-8?q?=F0=9F=A9=B9=20Clean=20up=20BTT=5FSKR?= =?UTF-8?q?=5FCR6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #22665 --- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index f58f13dc2fcb..8bae916a463c 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -49,25 +49,21 @@ #define I2C_EEPROM #endif -/* I2C */ #if ENABLED(I2C_EEPROM) #define IIC_EEPROM_SDA PB7 #define IIC_EEPROM_SCL PB6 - #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #elif ENABLED(SDCARD_EEPROM_EMULATION) #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -#define E2END (MARLIN_EEPROM_SIZE - 1) // 2KB - // // Limit Switches // #define X_STOP_PIN PC0 #define Y_STOP_PIN PC1 -#define Z_STOP_PIN PC14 // Endtop or Probe +#define Z_STOP_PIN PC14 // Endstop or Probe #define FIL_RUNOUT_PIN PC15 @@ -165,7 +161,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PC4 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card - #define SDSS ONBOARD_SD_CS_PIN + #define SDSS ONBOARD_SD_CS_PIN #endif // From 1f5eacac09d694c2b69c223aba7bf8c422d16241 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:26:12 +1200 Subject: [PATCH 281/323] =?UTF-8?q?=F0=9F=94=A7=20Set=20Z=5FPROBE=5FOFFSET?= =?UTF-8?q?=5FRANGE=5FMIN/MAX=20for=20MBL=20(#22663)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index a43e57d15839..d82b651650ae 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2862,16 +2862,18 @@ /** * Bed Probe dependencies */ -#if HAS_BED_PROBE - #if BOTH(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN) - #define ENDSTOPPULLUP_ZMIN_PROBE - #endif +#if EITHER(MESH_BED_LEVELING, HAS_BED_PROBE) #ifndef Z_PROBE_OFFSET_RANGE_MIN #define Z_PROBE_OFFSET_RANGE_MIN -20 #endif #ifndef Z_PROBE_OFFSET_RANGE_MAX #define Z_PROBE_OFFSET_RANGE_MAX 20 #endif +#endif +#if HAS_BED_PROBE + #if BOTH(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN) + #define ENDSTOPPULLUP_ZMIN_PROBE + #endif #ifndef XY_PROBE_FEEDRATE #define XY_PROBE_FEEDRATE ((homing_feedrate_mm_m.x + homing_feedrate_mm_m.y) / 2) #endif From eccd82b7c1049b098546334fab7ac152e1fa1ce7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 11 Dec 2020 18:15:36 -0600 Subject: [PATCH 282/323] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Add=20PROBE=5FPT?= =?UTF-8?q?=5FLAST=5FSTOW?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 2 +- Marlin/src/module/probe.cpp | 4 ++-- Marlin/src/module/probe.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 84bb7f9c4cf7..ceedd316e374 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -1479,7 +1479,7 @@ void unified_bed_leveling::smart_fill_mesh() { SERIAL_ECHOLNPGM("Tilting mesh (3/3)"); TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); - measured_z = probe.probe_at_point(points[2], PROBE_PT_STOW, param.V_verbosity); + measured_z = probe.probe_at_point(points[2], PROBE_PT_LAST_STOW, param.V_verbosity); #ifdef VALIDATE_MESH_TILT z3 = measured_z; #endif diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index ded5d438934b..cbadda2eef7c 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -751,7 +751,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai if (DEBUGGING(LEVELING)) { DEBUG_ECHOLNPAIR( "...(", LOGICAL_X_POSITION(rx), ", ", LOGICAL_Y_POSITION(ry), - ", ", raise_after == PROBE_PT_RAISE ? "raise" : raise_after == PROBE_PT_STOW ? "stow" : "none", + ", ", raise_after == PROBE_PT_RAISE ? "raise" : raise_after == PROBE_PT_LAST_STOW ? "stow (last)" : raise_after == PROBE_PT_STOW ? "stow" : "none", ", ", verbose_level, ", ", probe_relative ? "probe" : "nozzle", "_relative)" ); @@ -782,7 +782,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai const bool big_raise = raise_after == PROBE_PT_BIG_RAISE; if (big_raise || raise_after == PROBE_PT_RAISE) do_blocking_move_to_z(current_position.z + (big_raise ? 25 : Z_CLEARANCE_BETWEEN_PROBES), z_probe_fast_mm_s); - else if (raise_after == PROBE_PT_STOW) + else if (raise_after == PROBE_PT_STOW || raise_after == PROBE_PT_LAST_STOW) if (stow()) measured_z = NAN; // Error on stow? if (verbose_level > 2) diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index ce690593f229..5da5ea3a22b6 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -33,6 +33,7 @@ enum ProbePtRaise : uint8_t { PROBE_PT_NONE, // No raise or stow after run_z_probe PROBE_PT_STOW, // Do a complete stow after run_z_probe + PROBE_PT_LAST_STOW, // Stow for sure, even in BLTouch HS mode PROBE_PT_RAISE, // Raise to "between" clearance after run_z_probe PROBE_PT_BIG_RAISE // Raise to big clearance after run_z_probe }; From f55a28b01599692ca7a149571c6ae94e3b6b017d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 20:52:48 -0500 Subject: [PATCH 283/323] =?UTF-8?q?=F0=9F=8C=90=20Tweak=20language=20selec?= =?UTF-8?q?tion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/multi_language.h | 13 ++++++------- Marlin/src/lcd/language/language_en.h | 22 ++++++++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Marlin/src/core/multi_language.h b/Marlin/src/core/multi_language.h index 1eaef6930524..5063faf60c49 100644 --- a/Marlin/src/core/multi_language.h +++ b/Marlin/src/core/multi_language.h @@ -36,9 +36,8 @@ typedef const char Language_Str[]; #define NUM_LANGUAGES 1 #endif -// Setting the unused languages equal to each other allows -// the compiler to optimize away the conditionals - +// Set unused languages equal to each other so the +// compiler can optimize away the conditionals. #ifndef LCD_LANGUAGE_2 #define LCD_LANGUAGE_2 LCD_LANGUAGE #endif @@ -58,11 +57,11 @@ typedef const char Language_Str[]; #if NUM_LANGUAGES > 1 #define HAS_MULTI_LANGUAGE 1 #define GET_TEXT(MSG) ( \ - ui.language == 0 ? GET_LANG(LCD_LANGUAGE )::MSG : \ - ui.language == 1 ? GET_LANG(LCD_LANGUAGE_2)::MSG : \ - ui.language == 2 ? GET_LANG(LCD_LANGUAGE_3)::MSG : \ + ui.language == 4 ? GET_LANG(LCD_LANGUAGE_5)::MSG : \ ui.language == 3 ? GET_LANG(LCD_LANGUAGE_4)::MSG : \ - GET_LANG(LCD_LANGUAGE_5)::MSG ) + ui.language == 2 ? GET_LANG(LCD_LANGUAGE_3)::MSG : \ + ui.language == 1 ? GET_LANG(LCD_LANGUAGE_2)::MSG : \ + GET_LANG(LCD_LANGUAGE )::MSG ) #define MAX_LANG_CHARSIZE _MAX(GET_LANG(LCD_LANGUAGE )::CHARSIZE, \ GET_LANG(LCD_LANGUAGE_2)::CHARSIZE, \ GET_LANG(LCD_LANGUAGE_3)::CHARSIZE, \ diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 3f1f744b55ac..85bf685e3129 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -41,6 +41,8 @@ #endif #undef en +#define MEDIA_TYPE_EN "Media" + namespace Language_en { constexpr uint8_t CHARSIZE = 2; PROGMEM Language_Str LANGUAGE = _UxGT("English"); @@ -51,11 +53,11 @@ namespace Language_en { PROGMEM Language_Str MSG_NO = _UxGT("NO"); PROGMEM Language_Str MSG_BACK = _UxGT("Back"); PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Aborting..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Media Inserted"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Media Removed"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Waiting for media"); + PROGMEM Language_Str MSG_MEDIA_INSERTED = MEDIA_TYPE_EN _UxGT(" Inserted"); + PROGMEM Language_Str MSG_MEDIA_REMOVED = MEDIA_TYPE_EN _UxGT(" Removed"); + PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Waiting for card"); PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("SD Init Fail"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Media read error"); + PROGMEM Language_Str MSG_MEDIA_READ_ERROR = MEDIA_TYPE_EN _UxGT(" read error"); PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB device removed"); PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB start failed"); PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow"); @@ -399,7 +401,7 @@ namespace Language_en { PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Error"); PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Error"); PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Settings Stored"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Media Update"); + PROGMEM Language_Str MSG_MEDIA_UPDATE = MEDIA_TYPE_EN _UxGT(" Update"); PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Reset Printer"); PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh"); PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info Screen"); @@ -431,8 +433,8 @@ namespace Language_en { PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Power Outage"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Print from Media"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("No Media"); + PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Print from ") MEDIA_TYPE_EN; + PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("No ") MEDIA_TYPE_EN; PROGMEM Language_Str MSG_DWELL = _UxGT("Sleep..."); PROGMEM Language_Str MSG_USERWAIT = _UxGT("Click to Resume..."); PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Print Paused"); @@ -475,9 +477,9 @@ namespace Language_en { PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Unload Filament"); PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Unload *"); PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Unload All"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Attach Media"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Change Media"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Release Media"); + PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Attach ") MEDIA_TYPE_EN; + PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Change ") MEDIA_TYPE_EN; + PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Release ") MEDIA_TYPE_EN; PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed"); PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Skew Factor"); PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); From ba10816c51804433446a5221759a794aaac5bac2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 20:54:17 -0500 Subject: [PATCH 284/323] =?UTF-8?q?=F0=9F=92=84=20Extended=20Info=20Menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_info.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index cecccd115d4d..bcdea7f92d45 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -273,6 +273,14 @@ void menu_info_board() { void menu_info() { START_MENU(); BACK_ITEM(MSG_MAIN); + STATIC_ITEM(MSG_MARLIN); + STATIC_ITEM_P(PSTR(SHORT_BUILD_VERSION)); + STATIC_ITEM_P(PSTR(STRING_DISTRIBUTION_DATE)); + STATIC_ITEM_P(PSTR(MACHINE_NAME)); + STATIC_ITEM_P(PSTR(WEBSITE_URL)); + STATIC_ITEM_P(PSTR(BOARD_INFO_NAME), SS_CENTER); + VALUE_ITEM_P(MSG_INFO_EXTRUDERS, STRINGIFY(EXTRUDERS), SS_CENTER); + VALUE_ITEM_P(MSG_INFO_BAUDRATE, STRINGIFY(BAUDRATE), SS_CENTER); #if ENABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN) SUBMENU(MSG_INFO_PRINTER_MENU, TERN(SHOW_CUSTOM_BOOTSCREEN, menu_show_custom_bootscreen, menu_show_marlin_bootscreen)); #else From e33e101850797f4d3edecd4eb18e9ae63c89ef13 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 20:54:51 -0500 Subject: [PATCH 285/323] =?UTF-8?q?=F0=9F=8E=A8=20Tweak=20pins,=20comment?= =?UTF-8?q?=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/settings.cpp | 12 +++--- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 46 +++++++++++----------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index fca33c98c2fd..632f95558dea 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -2397,13 +2397,15 @@ void MarlinSettings::postprocess() { UNUSED(s); } - const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; // 128 (+1 because of the change to capacity rather than last valid address) - // is a placeholder for the size of the MAT; the MAT will always - // live at the very end of the eeprom + // 128 (+1 because of the change to capacity rather than last valid address) + // is a placeholder for the size of the MAT; the MAT will always + // live at the very end of the eeprom + const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; uint16_t MarlinSettings::meshes_start_index() { - return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; // Pad the end of configuration data so it can float up - // or down a little bit without disrupting the mesh data + // Pad the end of configuration data so it can float up + // or down a little bit without disrupting the mesh data + return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; } #define MESH_STORE_SIZE sizeof(TERN(OPTIMIZED_MESH_STORAGE, mesh_store_t, ubl.z_values)) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 056fdf4c29de..65d3fe731de8 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -154,35 +154,37 @@ #define SDIO_SUPPORT #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD) - #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." -#endif +#if ENABLED(CR10_STOCKDISPLAY) -#if ENABLED(RET6_12864_LCD) + #if ENABLED(RET6_12864_LCD) - // RET6 12864 LCD - #define LCD_PINS_RS PB12 - #define LCD_PINS_ENABLE PB15 - #define LCD_PINS_D4 PB13 + // RET6 12864 LCD + #define LCD_PINS_RS PB12 + #define LCD_PINS_ENABLE PB15 + #define LCD_PINS_D4 PB13 - #define BTN_ENC PB2 - #define BTN_EN1 PB10 - #define BTN_EN2 PB14 + #define BTN_ENC PB2 + #define BTN_EN1 PB10 + #define BTN_EN2 PB14 - #ifndef HAS_PIN_27_BOARD - #define BEEPER_PIN PC6 - #endif + #ifndef HAS_PIN_27_BOARD + #define BEEPER_PIN PC6 + #endif -#elif ENABLED(VET6_12864_LCD) + #elif ENABLED(VET6_12864_LCD) - // VET6 12864 LCD - #define LCD_PINS_RS PA4 - #define LCD_PINS_ENABLE PA7 - #define LCD_PINS_D4 PA5 + // VET6 12864 LCD + #define LCD_PINS_RS PA4 + #define LCD_PINS_ENABLE PA7 + #define LCD_PINS_D4 PA5 - #define BTN_ENC PC5 - #define BTN_EN1 PB10 - #define BTN_EN2 PA6 + #define BTN_ENC PC5 + #define BTN_EN1 PB10 + #define BTN_EN2 PA6 + + #else + #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." + #endif #elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) From fb29135c74a258eaa0ba824c9c1f00762ed59183 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 29 Aug 2021 20:44:55 -0500 Subject: [PATCH 286/323] =?UTF-8?q?=E2=9C=A8=20Creality3D=20CR-30=20PrintM?= =?UTF-8?q?ill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 3 +++ Marlin/src/feature/pause.cpp | 4 +++- Marlin/src/feature/powerloss.cpp | 2 +- Marlin/src/inc/SanityCheck.h | 7 +++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index ac98b1b322b7..c9a900062cb8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -758,6 +758,9 @@ //#define COREZY //#define MARKFORGED_XY // MarkForged. See https://reprap.org/forum/read.php?152,504042 +// Enable for a belt style printer with endless "Z" motion +//#define BELTPRINTER + //=========================================================================== //============================== Endstop Settings =========================== //=========================================================================== diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 79a8af66e2a4..9a402141e65f 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -213,6 +213,8 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load set_duplication_enabled(false, DXC_ext); #endif + TERN_(BELTPRINTER, do_blocking_move_to_xy(0.00, 50.00)); + // Slow Load filament if (slow_load_length) unscaled_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE); @@ -606,7 +608,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_ ui.pause_show_message(PAUSE_MESSAGE_RESUME); // Check Temperature before moving hotend - ensure_safe_temperature(); + ensure_safe_temperature(DISABLED(BELTPRINTER)); // Retract to prevent oozing unscaled_e_move(-(PAUSE_PARK_RETRACT_LENGTH), feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE)); diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index a512022320db..3409e6714d9e 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -386,7 +386,7 @@ void PrintJobRecovery::resume() { ), dtostrf(z_now, 1, 3, str_1)); gcode.process_subcommands_now(cmd); - #else + #elif DISABLED(BELTPRINTER) #if ENABLED(POWER_LOSS_RECOVER_ZHOME) && defined(POWER_LOSS_ZHOME_POS) #define HOMING_Z_DOWN 1 diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a146b95ba619..d6f911cd4c7e 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1469,6 +1469,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "CLASSIC_JERK is required for DELTA and SCARA." #endif +/** + * Some things should not be used on Belt Printers + */ +#if BOTH(BELTPRINTER, HAS_LEVELING) + #error "Bed Leveling is not compatible with BELTPRINTER." +#endif + /** * Probes */ From bad46796495403fddfb65e793f4ca4d0e47b9843 Mon Sep 17 00:00:00 2001 From: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Tue, 31 Aug 2021 03:36:00 -0400 Subject: [PATCH 287/323] =?UTF-8?q?=E2=9C=A8=20GT2560=20V4.x=20A20=20(#226?= =?UTF-8?q?64)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 7 ++-- Marlin/src/pins/mega/pins_GT2560_V4_A20.h | 43 +++++++++++++++++++++++ Marlin/src/pins/pins.h | 2 ++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 Marlin/src/pins/mega/pins_GT2560_V4_A20.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 6eeed447f727..d37fa0cdbc84 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -149,10 +149,10 @@ #define BOARD_GT2560_REV_A 1314 // Geeetech GT2560 Rev A #define BOARD_GT2560_REV_A_PLUS 1315 // Geeetech GT2560 Rev A+ (with auto level probe) #define BOARD_GT2560_REV_B 1316 // Geeetech GT2560 Rev B -#define BOARD_GT2560_V3 1317 // Geeetech GT2560 Rev B for A10(M/D) -#define BOARD_GT2560_V4 1318 // Geeetech GT2560 Rev B for A10(M/D) +#define BOARD_GT2560_V3 1317 // Geeetech GT2560 Rev B for A10(M/T/D) +#define BOARD_GT2560_V4 1318 // Geeetech GT2560 Rev B for A10(M/T/D) #define BOARD_GT2560_V3_MC2 1319 // Geeetech GT2560 Rev B for Mecreator2 -#define BOARD_GT2560_V3_A20 1320 // Geeetech GT2560 Rev B for A20(M/D) +#define BOARD_GT2560_V3_A20 1320 // Geeetech GT2560 Rev B for A20(M/T/D) #define BOARD_EINSTART_S 1321 // Einstart retrofit #define BOARD_WANHAO_ONEPLUS 1322 // Wanhao 0ne+ i3 Mini #define BOARD_LEAPFROG_XEED2015 1323 // Leapfrog Xeed 2015 @@ -160,6 +160,7 @@ #define BOARD_PICA 1325 // PICA Shield (rev C or later) #define BOARD_INTAMSYS40 1326 // Intamsys 4.0 (Funmat HT) #define BOARD_MALYAN_M180 1327 // Malyan M180 Mainboard Version 2 (no display function, direct gcode only) +#define BOARD_GT2560_V4_A20 1328 // Geeetech GT2560 Rev B for A20(M/T/D) // // ATmega1281, ATmega2561 diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h new file mode 100644 index 000000000000..83a612e67cdc --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Geeetech A20 GT2560 V4.x board pin assignments + */ + +#define BOARD_INFO_NAME "GT2560 4.x" + +#define LCD_PINS_RS 5 +#define LCD_PINS_ENABLE 36 +#define LCD_PINS_D4 21 +#define LCD_PINS_D7 6 + +#define SPEAKER // The speaker can produce tones + +#if IS_NEWPANEL + #define BTN_EN1 16 + #define BTN_EN2 17 + #define BTN_ENC 19 +#endif + +#include "pins_GT2560_V3.h" diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 86283dae24fe..064a4bb99e4d 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -243,6 +243,8 @@ #include "mega/pins_GT2560_REV_B.h" // ATmega2560 env:mega2560 #elif MB(GT2560_V4) #include "mega/pins_GT2560_V4.h" // ATmega2560 env:mega2560 + #elif MB(GT2560_V4_A20) + #include "mega/pins_GT2560_V4_A20.h" // ATmega2560 env:mega2560 #elif MB(GT2560_V3_MC2) #include "mega/pins_GT2560_V3_MC2.h" // ATmega2560 env:mega2560 #elif MB(GT2560_V3_A20) From fc22f1f84337b5d8f93fa3fe9c06ab7911d43dc4 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 1 Sep 2021 01:03:17 +0000 Subject: [PATCH 288/323] [cron] Bump distribution date (2021-09-01) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index df5f54a55052..eca04a9631cb 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-08-31" +//#define STRING_DISTRIBUTION_DATE "2021-09-01" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c5fc257800ca..74e68f0911e7 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-08-31" + #define STRING_DISTRIBUTION_DATE "2021-09-01" #endif /** From 01d1192a441f5afb753185eb103be64baa81bd43 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 1 Sep 2021 22:33:24 +1200 Subject: [PATCH 289/323] =?UTF-8?q?=F0=9F=90=9B=20BTT=20Octopus=20X=20MAX?= =?UTF-8?q?=20pin=20for=20IDEX=20(#22654)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index bb5800aee77f..d133a457181a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -72,7 +72,7 @@ #else #define X_MIN_PIN E0_DIAG_PIN // E0DET #endif -#elif ENABLED(X_DUAL_ENDSTOPS) +#elif EITHER(X_DUAL_ENDSTOPS, DUAL_X_CARRIAGE) #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif From 9a9d55ceb0183640147c997fefeef375fa105a2f Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 2 Sep 2021 01:45:17 +0200 Subject: [PATCH 290/323] =?UTF-8?q?=F0=9F=A9=B9=20Allow=20M42=20S0/1=20ana?= =?UTF-8?q?logWrite=20on=20PWM=20pins=20(STM32)=20(#22631)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/control/M42.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/control/M42.cpp b/Marlin/src/gcode/control/M42.cpp index 908260ed25dd..eead971a012c 100644 --- a/Marlin/src/gcode/control/M42.cpp +++ b/Marlin/src/gcode/control/M42.cpp @@ -127,7 +127,7 @@ void GcodeSuite::M42() { #ifdef ARDUINO_ARCH_STM32 // A simple I/O will be set to 0 by analogWrite() - if (pin_status <= 1) return; + if (pin_status <= 1 && !PWM_PIN(pin)) return; #endif analogWrite(pin, pin_status); } From 71a2a958858f47545bb9f02764af26fb68991b36 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Thu, 2 Sep 2021 01:55:36 +0200 Subject: [PATCH 291/323] =?UTF-8?q?=F0=9F=94=A8=20Enhance=20Lerdge=20pins,?= =?UTF-8?q?=20TFTs,=20and=20variants=20(#22658)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 1 + Marlin/src/inc/Conditionals_LCD.h | 36 ++------- Marlin/src/lcd/tft_io/st7796s.h | 38 ++-------- Marlin/src/lcd/tft_io/tft_ids.h | 1 - Marlin/src/lcd/tft_io/tft_io.cpp | 4 - Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 4 +- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 74 +++++++++++-------- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 71 +++++++++++------- Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 68 ++++++++++------- buildroot/share/PlatformIO/scripts/lerdge.py | 5 +- .../PlatformIO/scripts/offset_and_rename.py | 3 +- .../MARLIN_BIGTREE_BTT002/hal_conf_extra.h | 2 +- .../MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h | 2 +- .../MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h | 2 +- .../PeripheralPins.c | 2 - .../hal_conf_extra.h | 2 +- .../hal_conf_extra.h | 2 +- .../MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h | 2 +- .../MARLIN_F103VE_LONGER/hal_conf_custom.h | 23 ++---- .../variants/MARLIN_F103Zx/hal_conf_custom.h | 2 +- .../variants/MARLIN_F407VE/hal_conf_custom.h | 2 +- .../variants/MARLIN_F4x7Vx/hal_conf_extra.h | 2 +- .../hal_conf_custom.h | 2 +- .../variants/MARLIN_LERDGE/PeripheralPins.c | 18 +++++ .../variants/MARLIN_LERDGE/variant.h | 49 ++++++------ .../MARLIN_STEVAL_F401VE/hal_conf_custom.h | 2 +- .../hal_conf_extra.h | 25 ++++--- ini/stm32f4.ini | 9 +-- 28 files changed, 232 insertions(+), 221 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index c9a900062cb8..418c25aef758 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2710,6 +2710,7 @@ //#define TFT_RES_320x240 //#define TFT_RES_480x272 //#define TFT_RES_480x320 + //#define TFT_RES_1024x600 #endif /** diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index bfbe5ba6cf1a..13af3c25f5ff 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -1219,30 +1219,19 @@ */ #if ENABLED(MKS_TS35_V2_0) // ST7796 #define TFT_DEFAULT_DRIVER ST7796 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY) + #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 #define TFT_INTERFACE_SPI -#elif ENABLED(ANET_ET5_TFT35) // ST7796 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY) +#elif EITHER(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796 + #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 #define TFT_INTERFACE_FSMC -#elif ENABLED(ANET_ET4_TFT28) // ST7789 +#elif ANY(ANET_ET4_TFT28, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32) // ST7789 #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) #define TFT_RES_320x240 #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT24) // ST7789 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) - #define TFT_RES_320x240 - #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT28) // ST7789 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) - #define TFT_RES_320x240 - #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT32) // ST7789 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) - #define TFT_RES_320x240 - #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT35) // ILI9488 +#elif ANY(MKS_ROBIN_TFT35, TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488 + #define TFT_DRIVER ILI9488 #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) #define TFT_RES_480x320 #define TFT_INTERFACE_FSMC @@ -1251,21 +1240,12 @@ #define TFT_DEFAULT_ORIENTATION 0 #define TFT_RES_480x272 #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT_V1_1R) // ILI9328 or R61505 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) - #define TFT_RES_320x240 - #define TFT_INTERFACE_FSMC -#elif EITHER(TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488 - #define TFT_DRIVER ILI9488 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) - #define TFT_RES_480x320 - #define TFT_INTERFACE_FSMC -#elif ENABLED(LONGER_LK_TFT28) +#elif ANY(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505 #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) #define TFT_RES_320x240 #define TFT_INTERFACE_FSMC #elif ENABLED(BIQU_BX_TFT70) // RGB - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY) + #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_1024x600 #define TFT_INTERFACE_LTDC #if ENABLED(TOUCH_SCREEN) diff --git a/Marlin/src/lcd/tft_io/st7796s.h b/Marlin/src/lcd/tft_io/st7796s.h index e1931ed55148..6d79dd882ac2 100644 --- a/Marlin/src/lcd/tft_io/st7796s.h +++ b/Marlin/src/lcd/tft_io/st7796s.h @@ -144,39 +144,11 @@ static const uint16_t st7796s_init[] = { ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D, ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D, - ESC_REG(ST7796S_NORON), - ESC_REG(ST7796S_WRCTRLD), 0x0024, - ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I - ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II - ESC_REG(ST7796S_DISPON), - ESC_END -}; - -static const uint16_t lerdge_st7796s_init[] = { - DATASIZE_8BIT, - ESC_REG(ST7796S_SWRESET), ESC_DELAY(100), - ESC_REG(ST7796S_SLPOUT), ESC_DELAY(20), - - ESC_REG(ST7796S_CSCON), 0x00C3, // enable command 2 part I - ESC_REG(ST7796S_CSCON), 0x0096, // enable command 2 part II - - ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA, - ESC_REG(ST7796S_COLMOD), 0x0055, - - ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion - ESC_REG(ST7796S_EM), 0x00C6, - - ESC_REG(ST7796S_PWR2), 0x0015, - ESC_REG(ST7796S_PWR3), 0x00AF, - ESC_REG(ST7796S_VCMPCTL), 0x0022, - ESC_REG(ST7796S_VCMOST), 0x0000, - ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033, - - /* Gamma Correction. */ - ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D, - ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D, - - ESC_REG(ST7796S_INVON), // Display inversion ON + #if ENABLED(ST7796S_INVERTED) + ESC_REG(ST7796S_INVON), // Display inversion ON + #else + ESC_REG(ST7796S_NORON), + #endif ESC_REG(ST7796S_WRCTRLD), 0x0024, ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II diff --git a/Marlin/src/lcd/tft_io/tft_ids.h b/Marlin/src/lcd/tft_io/tft_ids.h index c4f6127c685a..2de111366c45 100644 --- a/Marlin/src/lcd/tft_io/tft_ids.h +++ b/Marlin/src/lcd/tft_io/tft_ids.h @@ -31,5 +31,4 @@ #define ILI9341 0x9341 #define ILI9488 0x9488 #define ILI9488_ID1 0x8066 // Some ILI9488 have 0x8066 in the 0x04 -#define LERDGE_ST7796 0xFFFE #define AUTO 0xFFFF diff --git a/Marlin/src/lcd/tft_io/tft_io.cpp b/Marlin/src/lcd/tft_io/tft_io.cpp index ded711b57768..707232b4bb48 100644 --- a/Marlin/src/lcd/tft_io/tft_io.cpp +++ b/Marlin/src/lcd/tft_io/tft_io.cpp @@ -97,10 +97,6 @@ if (lcd_id != 0xFFFFFFFF) return; write_esc_sequence(ili9341_init); #elif TFT_DRIVER == ILI9488 write_esc_sequence(ili9488_init); - #elif TFT_DRIVER == LERDGE_ST7796 - lcd_id = ST7796; - write_esc_sequence(lerdge_st7796s_init); - #elif TFT_DRIVER == AUTO // autodetect lcd_id = io.GetID() & 0xFFFF; diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 1b3cf15e5afe..04f9afaad212 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -427,10 +427,10 @@ #define TFT_DRIVER ST7796 #endif #ifndef XPT2046_X_CALIBRATION - #define XPT2046_X_CALIBRATION 63934 + #define XPT2046_X_CALIBRATION 63934 #endif #ifndef XPT2046_Y_CALIBRATION - #define XPT2046_Y_CALIBRATION 63598 + #define XPT2046_Y_CALIBRATION 63598 #endif #ifndef XPT2046_X_OFFSET #define XPT2046_X_OFFSET -1 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 4adc2f65a2f2..3cfa3cd3e5c2 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -72,42 +72,43 @@ #define X_DIR_PIN PB10 #define X_ENABLE_PIN PG0 //#ifndef X_CS_PIN -// #define X_CS_PIN PE0 +// #define X_CS_PIN PB2 //#endif #define Y_STEP_PIN PF14 #define Y_DIR_PIN PF15 #define Y_ENABLE_PIN PF13 //#ifndef Y_CS_PIN -// #define Y_CS_PIN PE1 +// #define Y_CS_PIN PE2 //#endif #define Z_STEP_PIN PF11 #define Z_DIR_PIN PF12 #define Z_ENABLE_PIN PC5 //#ifndef Z_CS_PIN -// #define Z_CS_PIN PE2 +// #define Z_CS_PIN PE3 //#endif #define E0_STEP_PIN PC14 #define E0_DIR_PIN PC13 #define E0_ENABLE_PIN PC15 //#ifndef E0_CS_PIN -// #define E0_CS_PIN PE3 +// #define E0_CS_PIN PE4 //#endif #define E1_STEP_PIN PF1 #define E1_DIR_PIN PF0 #define E1_ENABLE_PIN PF2 //#ifndef E1_CS_PIN -// #define E1_CS_PIN PE4 +// #define E1_CS_PIN PE1 //#endif -//#define E2_STEP_PIN PF4 // best guess -//#define E2_DIR_PIN PF3 // best guess -//#define E2_ENABLE_PIN PF5 // best guess -//#ifndef E2_CS_PIN -// #define E2_CS_PIN PB2 // best guess +//#define Z2_STEP_PIN PF4 +//#define Z2_DIR_PIN PF3 +//#define Z2_ENABLE_PIN PF5 +//#define Z2_STOP_PIN PG2 +//#ifndef Z2_CS_PIN +// #define Z2_CS_PIN PE0 //#endif #if HAS_TMC_UART @@ -144,12 +145,17 @@ #ifndef E1_SERIAL_RX_PIN #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif + // Ex-motor can be any... X2/Y2/Z2 or E2 #ifndef EX_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PE0 + #define EX_SERIAL_TX_PIN PE0 #endif #ifndef EX_SERIAL_RX_PIN - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN + #define EX_SERIAL_RX_PIN EX_SERIAL_TX_PIN #endif + //#define Z2_SERIAL_RX_PIN EX_SERIAL_RX_PIN + //#define Z2_SERIAL_TX_PIN EX_SERIAL_TX_PIN + //#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN + //#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 #endif @@ -193,8 +199,8 @@ // // LED / Lighting // -//#define CASE_LIGHT_PIN_CI -1 -//#define CASE_LIGHT_PIN_DO -1 +#define LED_PIN PA15 // Status LED +//#define CASE_LIGHT_PIN PB6 // LED Ribbon Connector (PWM TIM4_CH1) //#define NEOPIXEL_PIN -1 #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB8 // swap R and G pin for compatibility with real wires @@ -211,44 +217,54 @@ // #define SDIO_SUPPORT #define SDIO_CLOCK 4800000 +#define SD_DETECT_PIN PA8 +#if DISABLED(SDIO_SUPPORT) + #define SOFTWARE_SPI + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 + #define SD_SS_PIN PC11 + #define SDSS PC11 +#endif // // Misc. Functions // -#define SDSS PC11 -#define LED_PIN PA15 // Alive #define PS_ON_PIN PA4 #define KILL_PIN -1 #define POWER_LOSS_PIN PA4 // Power-loss / nAC_FAULT -#define SD_SCK_PIN PC12 -#define SD_MISO_PIN PC8 -#define SD_MOSI_PIN PD2 -#define SD_SS_PIN PC11 - -#define SD_DETECT_PIN PA8 -#define BEEPER_PIN PC7 - // // TFT with FSMC interface // #if HAS_FSMC_TFT - //#define TFT_DRIVER LERDGE_ST7796 + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #define ST7796S_INVERTED #define TFT_RESET_PIN PD6 #define TFT_BACKLIGHT_PIN PD3 - #define TFT_CS_PIN PD7 - #define TFT_RS_PIN PD11 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_CS_PIN PG15 #define TOUCH_SCK_PIN PB3 #define TOUCH_MOSI_PIN PB5 #define TOUCH_MISO_PIN PB4 + #define TOUCH_INT_PIN PG12 #endif #if IS_NEWPANEL - #define BTN_EN1 PG10 - #define BTN_EN2 PG11 + #define BEEPER_PIN PC7 + #define BTN_EN1 PG11 + #define BTN_EN2 PG10 #define BTN_ENC PG9 + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 2 + #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index 4707a16e1432..2d5a45eee0af 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -31,8 +31,6 @@ #define STEP_TIMER 4 #define TEMP_TIMER 2 -//#define I2C_EEPROM - // USB Flash Drive support #define HAS_OTG_USB_HOST_SUPPORT @@ -150,7 +148,6 @@ // // Misc. Functions // -#define SDSS PC11 // SD is working using SDIO, not sure if this definition is needed? #define LED_PIN PC6 // Mainboard soldered green LED #define PS_ON_PIN PB2 // Board has a power module connector #define KILL_PIN -1 // There is no reset button on the LCD @@ -161,23 +158,25 @@ // #define SDIO_SUPPORT #define SDIO_CLOCK 4800000 - -#define SD_SCK_PIN PC12 -#define SD_MISO_PIN PC8 -#define SD_MOSI_PIN PD2 -#define SD_SS_PIN PC11 - #define SD_DETECT_PIN PG15 +#if DISABLED(SDIO_SUPPORT) + #define SOFTWARE_SPI + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 + #define SD_SS_PIN PC11 + #define SDSS PC11 +#endif // // Persistent Storage // If no option is selected below the SD Card will be used -// (this section modelled after pins_LONGER3D_LK.h) -// Warning: Not tested yet! Pins traced with multimeter, mistakes are possible +// Prefer the I2C option (F-RAM) to store Marlin settings, SPI option is not working yet + //#define SPI_EEPROM +//#define I2C_EEPROM -#if ENABLED(SPI_EEPROM) - // Lerdge has an SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf +#if ENABLED(SPI_EEPROM) // SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf #define SPI_CHAN_EEPROM1 1 #define SPI_EEPROM1_CS_PIN PB12 // datasheet: /CS pin, found with multimeter, not tested #define EEPROM_SCK_PIN PB13 // datasheet: CLK pin, found with multimeter, not tested @@ -185,29 +184,45 @@ #define EEPROM_MOSI_PIN PB15 // datasheet: DI pin, found with multimeter, not tested #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now... +#elif ENABLED(I2C_EEPROM) // FM24CL64BG (CYP1813) 64Kbit F-RAM + #define SOFT_I2C_EEPROM // Force the use of Software I2C + #define I2C_SDA_PIN PG13 + #define I2C_SCL_PIN PG14 // To be confirmed on the Lerdge S, but probably same as the K + #define MARLIN_EEPROM_SIZE 0x10000 #else #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM #endif // -// LCD / Controller +// TFT with FSMC interface // +#if HAS_FSMC_TFT + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #define ST7796S_INVERTED -// The LCD is initialized in FSMC mode -#define BEEPER_PIN PD13 + #define TFT_RESET_PIN PD6 + #define TFT_BACKLIGHT_PIN PD3 -#define BTN_EN1 PC14 -#define BTN_EN2 PC15 -#define BTN_ENC PC13 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 -#define TFT_RESET_PIN PD6 -#define TFT_BACKLIGHT_PIN PD3 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN -#define TFT_CS_PIN PD7 // TFT works -#define TFT_RS_PIN PD11 // TFT works + #define TOUCH_CS_PIN PB6 + #define TOUCH_SCK_PIN PB3 + #define TOUCH_MOSI_PIN PB5 + #define TOUCH_MISO_PIN PB4 +#endif -// There is touch, but calibration is off -#define TOUCH_CS_PIN PB6 -#define TOUCH_SCK_PIN PB3 -#define TOUCH_MOSI_PIN PB5 -#define TOUCH_MISO_PIN PB4 +#if IS_NEWPANEL + #define BEEPER_PIN PD13 + #define BTN_EN1 PC15 + #define BTN_EN2 PC14 + #define BTN_ENC PC13 + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 2 + #endif +#endif diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index 3a9c286e001e..f65476c0b705 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -113,10 +113,24 @@ //#define CASE_LIGHT_PIN_DO -1 //#define NEOPIXEL_PIN -1 +// +// SD support (On board) +// +#define SDIO_SUPPORT +#define SD_DETECT_PIN PA8 +#define SDIO_CLOCK 4800000 +#if DISABLED(SDIO_SUPPORT) + #define SOFTWARE_SPI + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 + #define SD_SS_PIN PC11 + #define SDSS PC11 +#endif + // // Misc. Functions // -#define SDSS PC11 #define LED_PIN PC7 // Alive #define PS_ON_PIN -1 #define KILL_PIN -1 @@ -124,36 +138,36 @@ // Lerdge supports auto-power off and power loss sense through a single pin. #define POWER_LOSS_PIN PC14 // Power-loss / nAC_FAULT -#define SD_SCK_PIN PC12 -#define SD_MISO_PIN PC8 -#define SD_MOSI_PIN PD2 -#define SD_SS_PIN PC11 - // -// SD support -// -#define SDIO_SUPPORT -#define SD_DETECT_PIN PA8 -#define SDIO_CLOCK 4800000 - -// -// LCD / Controller +// TFT with FSMC interface // +#if HAS_FSMC_TFT + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #define ST7796S_INVERTED -// The LCD is initialized in FSMC mode -#define BEEPER_PIN PD12 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 -#define BTN_EN1 PE3 -#define BTN_EN2 PE4 -#define BTN_ENC PE2 + #define TFT_RESET_PIN PD6 + #define TFT_BACKLIGHT_PIN PD3 -#define TFT_RESET_PIN PD6 -#define TFT_BACKLIGHT_PIN PD3 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN -#define TFT_CS_PIN PD7 -#define TFT_RS_PIN PD11 + #define TOUCH_CS_PIN PB6 + #define TOUCH_SCK_PIN PB3 + #define TOUCH_MOSI_PIN PB5 + #define TOUCH_MISO_PIN PB4 +#endif -#define TOUCH_CS_PIN PB6 -#define TOUCH_SCK_PIN PB3 -#define TOUCH_MOSI_PIN PB5 -#define TOUCH_MISO_PIN PB4 +#if IS_NEWPANEL + #define BEEPER_PIN PD12 + #define BTN_EN1 PE4 + #define BTN_EN2 PE3 + #define BTN_ENC PE2 + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 2 + #endif +#endif diff --git a/buildroot/share/PlatformIO/scripts/lerdge.py b/buildroot/share/PlatformIO/scripts/lerdge.py index 5c35c19e7df2..654f0ad4df92 100644 --- a/buildroot/share/PlatformIO/scripts/lerdge.py +++ b/buildroot/share/PlatformIO/scripts/lerdge.py @@ -41,7 +41,8 @@ def encrypt(source, target, env): renamed.close() if 'encrypt' in board.get("build").keys(): - marlin.add_post_action(encrypt); + if board.get("build.encrypt") != "": + marlin.add_post_action(encrypt) else: print("LERDGE builds require output file via board_build.encrypt = 'filename' parameter") - exit(1); + exit(1) diff --git a/buildroot/share/PlatformIO/scripts/offset_and_rename.py b/buildroot/share/PlatformIO/scripts/offset_and_rename.py index b42b2f35317c..9caed298e434 100644 --- a/buildroot/share/PlatformIO/scripts/offset_and_rename.py +++ b/buildroot/share/PlatformIO/scripts/offset_and_rename.py @@ -45,7 +45,8 @@ def encrypt(source, target, env): marlin.encrypt_mks(source, target, env, board.get("build.encrypt")) - marlin.add_post_action(encrypt); + if board.get("build.encrypt") != "": + marlin.add_post_action(encrypt) # # For build.rename simply rename the firmware file. diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h index 40b340c20560..ef621d57bf29 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h @@ -4,6 +4,7 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED @@ -32,7 +33,6 @@ //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h index 2c1557cbbbc5..b4eb0f9b5f79 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h @@ -4,6 +4,7 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED @@ -32,7 +33,6 @@ #undef HAL_SRAM_MODULE_ENABLED #undef HAL_SDRAM_MODULE_ENABLED #undef HAL_HASH_MODULE_ENABLED -#undef HAL_EXTI_MODULE_ENABLED #undef HAL_SMBUS_MODULE_ENABLED #undef HAL_I2S_MODULE_ENABLED #undef HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h index 40b340c20560..ef621d57bf29 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h @@ -4,6 +4,7 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED @@ -32,7 +33,6 @@ //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c index a4f8f696ee82..9df61baf9b1d 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c @@ -392,9 +392,7 @@ const PinMap PinMap_USB_OTG_FS[] = { {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP {NC, NP, 0} }; -#endif -#ifdef HAL_PCD_MODULE_ENABLED const PinMap PinMap_USB_OTG_HS[] = { //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h index 42c76a4bbffb..d62c510095c9 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h @@ -4,6 +4,7 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED @@ -33,7 +34,6 @@ #undef HAL_SRAM_MODULE_ENABLED #undef HAL_SDRAM_MODULE_ENABLED #undef HAL_HASH_MODULE_ENABLED -#undef HAL_EXTI_MODULE_ENABLED #undef HAL_SMBUS_MODULE_ENABLED #undef HAL_I2S_MODULE_ENABLED #undef HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h index 40b340c20560..ef621d57bf29 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h @@ -4,6 +4,7 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED @@ -32,7 +33,6 @@ //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h index 4050fe810f9d..99f3a30443b6 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h @@ -51,7 +51,7 @@ extern "C" { #define HAL_DMA2D_MODULE_ENABLED #define HAL_DSI_MODULE_ENABLED #define HAL_ETH_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FDCAN_MODULE_ENABLED #define HAL_FLASH_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h index fd20d8fe6f07..3a6b7037adf0 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h @@ -20,11 +20,6 @@ extern "C" { */ #include "stm32yyxx_hal_conf.h" -#undef HAL_PWR_MODULE_ENABLED -#define HAL_PWR_MODULE_ONLY // disable low power & PA0 wakeup pin (its T°c pin) - -#define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG - #ifdef HAL_PCD_MODULE_ENABLED #warning "No direct STM32 USB pins on Longer3D board" #undef HAL_PCD_MODULE_ENABLED // USB Device @@ -35,20 +30,20 @@ extern "C" { #undef HAL_HCD_MODULE_ENABLED // USB Host #endif -#ifndef HAL_USART_MODULE_ENABLED - //#define HAL_USART_MODULE_ENABLED // Useless.... UART_MODULE do it -#endif +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG + +#undef HAL_PWR_MODULE_ENABLED +#define HAL_PWR_MODULE_ONLY // disable low power & PA0 wakeup pin (its T°c pin) #undef HAL_CAN_LEGACY_MODULE_ENABLED #undef HAL_CAN_MODULE_ENABLED #undef HAL_DAC_MODULE_ENABLED #undef HAL_RTC_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // for ENDSTOP_INTERRUPTS_FEATURE - /** - * @brief List of modules in the framework (first ones enabled by default) - */ + * @brief List of modules in the framework (first ones enabled by default) + */ //#define HAL_MODULE_ENABLED //#define HAL_ADC_MODULE_ENABLED //#define HAL_CORTEX_MODULE_ENABLED @@ -66,13 +61,11 @@ extern "C" { //#define HAL_SRAM_MODULE_ENABLED //#define HAL_TIM_MODULE_ENABLED //#define HAL_UART_MODULE_ENABLED - //#define HAL_CAN_MODULE_ENABLED //#define HAL_CAN_LEGACY_MODULE_ENABLED //#define HAL_CEC_MODULE_ENABLED //#define HAL_CRC_MODULE_ENABLED //#define HAL_ETH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_HCD_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_IRDA_MODULE_ENABLED @@ -81,7 +74,7 @@ extern "C" { //#define HAL_NOR_MODULE_ENABLED //#define HAL_PCCARD_MODULE_ENABLED //#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED +//#define HAL_USART_MODULE_ENABLED // Useless.... UART_MODULE does it //#define HAL_WWDG_MODULE_ENABLED //#define HAL_MMC_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h index 7d19d532a597..a41247b9b1f6 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h @@ -41,7 +41,7 @@ extern "C" { #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h index 1252bc705952..58e9646b57f5 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h @@ -36,6 +36,7 @@ extern "C" { #define HAL_CRC_MODULE_ENABLED #define HAL_DAC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED @@ -61,7 +62,6 @@ extern "C" { //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h index 0c44f0874224..952fe3c5b881 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h @@ -40,6 +40,7 @@ #define HAL_CRC_MODULE_ENABLED #define HAL_DAC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED @@ -64,7 +65,6 @@ //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h index 395bfcd4b764..2ff2fd686ea4 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h @@ -35,6 +35,7 @@ extern "C" { #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED @@ -61,7 +62,6 @@ extern "C" { //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_LTDC_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c index 044f555a4105..7f6b32c22800 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c @@ -398,3 +398,21 @@ const PinMap PinMap_USB_OTG_HS[] = { {NC, NP, 0} }; #endif + +//*** SD *** + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { +//{PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 +//{PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 +//{PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 +//{PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h index 87033a68e5f6..f4488356b7d0 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h @@ -163,32 +163,37 @@ extern "C" { // Below SPI and I2C definitions already done in the core // Could be redefined here if differs from the default one // SPI Definitions -#define PIN_SPI_SS PF11 -#define PIN_SPI_MOSI PB15 -#define PIN_SPI_MISO PB14 -#define PIN_SPI_SCK PB13 +// SPI1 (Winbond on the Lerdge-K) +//#define PIN_SPI_SS PC4 +//#define PIN_SPI_SCK PA5 +//#define PIN_SPI_MISO PA6 +//#define PIN_SPI_MOSI PA7 +// SPI2 (Winbond on the Lerdge-S) +//#define PIN_SPI_SS PB12 +//#define PIN_SPI_SCK PB13 +//#define PIN_SPI_MISO PB14 +//#define PIN_SPI_MOSI PB15 -//max6675 -//#define PIN_SPI_SS PA4 -//#define PIN_SPI_SCK PA5 -//#define PIN_SPI_MISO PA6 -//#define PIN_SPI_MOSI PA7 - - - - -// I2C Definitions -#define PIN_WIRE_SDA PB7 -#define PIN_WIRE_SCL PB6 +// I2C Definitions (Software I2C) +//#define PIN_WIRE_SDA PG13 +//#define PIN_WIRE_SCL PG14 // Timer Definitions -//Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM6 - -// Do not use basic timer: OC is required -#define TIMER_SERVO TIM1 //TODO: advanced-control timers don't work +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +// FANs may require PWM timers 3 10 11 13 +// The LED/RGB connectors timer 4 +// Beware: STEP_TIMER default is 6 and TEMP_TIMER 14 for the F407 +#ifndef TIMER_TONE + #define TIMER_TONE TIM8 // TIM3 or TIM8 for SPEAKER compat on the lerdge K (PC6) +#endif // TIM4 for that on the Lerdge S (PD11) +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM1 // Ideally TIM2 for Hardware PWM (PB11) +#endif // TIM4 on the S (PD12) +#ifndef TIMER_SERIAL + #define TIMER_SERIAL TIM7 // Default used in SoftwareSerial lib +#endif // UART Definitions // Define here Serial instance number to map on Serial generic name @@ -208,6 +213,8 @@ extern "C" { /* Extra HAL modules */ //#define HAL_DAC_MODULE_ENABLED #define HAL_SD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #ifdef __cplusplus } // extern "C" diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h index aeaaf890f24b..7d013d2b27f4 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h @@ -35,6 +35,7 @@ extern "C" { #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED @@ -62,7 +63,6 @@ extern "C" { //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_LTDC_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h index 8c46edb50e6e..2ad290502338 100755 --- a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h @@ -36,6 +36,19 @@ */ #define HAL_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default + //#define HAL_CAN_MODULE_ENABLED //#define HAL_CAN_LEGACY_MODULE_ENABLED //#define HAL_CRC_MODULE_ENABLED @@ -43,40 +56,28 @@ //#define HAL_CRYP_MODULE_ENABLED //#define HAL_DAC_MODULE_ENABLED //#define HAL_DCMI_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED //#define HAL_DMA2D_MODULE_ENABLED //#define HAL_ETH_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED //#define HAL_NAND_MODULE_ENABLED //#define HAL_NOR_MODULE_ENABLED //#define HAL_PCCARD_MODULE_ENABLED //#define HAL_SRAM_MODULE_ENABLED //#define HAL_SDRAM_MODULE_ENABLED //#define HAL_HASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED //#define HAL_I2C_MODULE_ENABLED //#define HAL_SMBUS_MODULE_ENABLED //#define HAL_I2S_MODULE_ENABLED //#define HAL_IWDG_MODULE_ENABLED //#define HAL_LTDC_MODULE_ENABLED //#define HAL_DSI_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED //#define HAL_QSPI_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED //#define HAL_RNG_MODULE_ENABLED //#define HAL_RTC_MODULE_ENABLED //#define HAL_SAI_MODULE_ENABLED //#define HAL_SD_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -#define HAL_USART_MODULE_ENABLED //#define HAL_IRDA_MODULE_ENABLED //#define HAL_SMARTCARD_MODULE_ENABLED //#define HAL_WWDG_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_PCD_MODULE_ENABLED //#define HAL_HCD_MODULE_ENABLED //#define HAL_FMPI2C_MODULE_ENABLED //#define HAL_SPDIFRX_MODULE_ENABLED diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 29dd93307826..6870345121d8 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -255,14 +255,13 @@ board_build.encrypt = firmware.bin board_build.offset = 0x10000 build_flags = ${stm32_variant.build_flags} -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4 - -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE - -DHAL_SRAM_MODULE_ENABLED + -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35 build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 extra_scripts = ${stm32_variant.extra_scripts} buildroot/share/PlatformIO/scripts/lerdge.py # -# Lerdge X +# Lerdge X (STM32F407VE) # [env:LERDGEX] platform = ${lerdge_common.platform} @@ -279,7 +278,7 @@ platform_packages = ${stm_flash_drive.platform_packages} build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags} # -# Lerdge S +# Lerdge S (STM32F407ZG) # [env:LERDGES] platform = ${lerdge_common.platform} @@ -296,7 +295,7 @@ platform_packages = ${stm_flash_drive.platform_packages} build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags} # -# Lerdge K +# Lerdge K (STM32F407ZG) # [env:LERDGEK] platform = ${lerdge_common.platform} From 3a2eb574e2027b966fb398959f8c8750ae3a3c73 Mon Sep 17 00:00:00 2001 From: DvoraNoob <62312359+DvoraNoob@users.noreply.github.com> Date: Wed, 1 Sep 2021 21:29:20 -0300 Subject: [PATCH 292/323] =?UTF-8?q?=F0=9F=9A=B8=20MKS=20UI=20extrusion=20s?= =?UTF-8?q?peed/steps=20config=20(#22656)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lcd/extui/mks_ui/draw_extrusion.cpp | 90 ++++++++----------- Marlin/src/lcd/extui/mks_ui/draw_ui.cpp | 15 ++-- Marlin/src/lcd/extui/mks_ui/draw_ui.h | 10 ++- Marlin/src/lcd/extui/mks_ui/wifi_module.cpp | 20 ++--- buildroot/bin/mftest | 2 +- buildroot/tests/mks_robin_nano35 | 32 +++---- 6 files changed, 75 insertions(+), 94 deletions(-) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp index 2f9009bcdbdd..d1132a33d825 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp @@ -89,20 +89,18 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { disp_extru_amount(); break; case ID_E_STEP: - switch (ABS(uiCfg.extruStep)) { - case 1: uiCfg.extruStep = 5; break; - case 5: uiCfg.extruStep = 10; break; - case 10: uiCfg.extruStep = 1; break; - default: break; + switch (uiCfg.extruStep) { + case uiCfg.eStepMin: uiCfg.extruStep = uiCfg.eStepMed; break; + case uiCfg.eStepMed: uiCfg.extruStep = uiCfg.eStepMax; break; + case uiCfg.eStepMax: uiCfg.extruStep = uiCfg.eStepMin; break; } disp_ext_step(); break; case ID_E_SPEED: switch (uiCfg.extruSpeed) { - case 1: uiCfg.extruSpeed = 10; break; - case 10: uiCfg.extruSpeed = 20; break; - case 20: uiCfg.extruSpeed = 1; break; - default: break; + case uiCfg.eSpeedL: uiCfg.extruSpeed = uiCfg.eSpeedN; break; + case uiCfg.eSpeedN: uiCfg.extruSpeed = uiCfg.eSpeedH; break; + case uiCfg.eSpeedH: uiCfg.extruSpeed = uiCfg.eSpeedL; break; } disp_ext_speed(); break; @@ -155,41 +153,30 @@ void lv_draw_extrusion() { void disp_ext_type() { if (uiCfg.extruderIndex == 1) { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); - if (gCfgItems.multiple_language) { - lv_label_set_text(labelType, extrude_menu.ext2); - lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } + if (gCfgItems.multiple_language) lv_label_set_text(labelType, extrude_menu.ext2); } else { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru1.bin"); - if (gCfgItems.multiple_language) { - lv_label_set_text(labelType, extrude_menu.ext1); - lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } + if (gCfgItems.multiple_language) lv_label_set_text(labelType, extrude_menu.ext1); } + if (gCfgItems.multiple_language) + lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } void disp_ext_speed() { - if (uiCfg.extruSpeed == 20) - lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_high.bin"); - else if (uiCfg.extruSpeed == 1) - lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_slow.bin"); - else - lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_normal.bin"); + switch (uiCfg.extruSpeed) { + case uiCfg.eSpeedH: lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_high.bin"); break; + case uiCfg.eSpeedL: lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_slow.bin"); break; + case uiCfg.eSpeedN: lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_normal.bin"); break; + } if (gCfgItems.multiple_language) { - if (uiCfg.extruSpeed == 20) { - lv_label_set_text(labelSpeed, extrude_menu.high); - lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else if (uiCfg.extruSpeed == 1) { - lv_label_set_text(labelSpeed, extrude_menu.low); - lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else { - lv_label_set_text(labelSpeed, extrude_menu.normal); - lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); + switch (uiCfg.extruSpeed) { + case uiCfg.eSpeedH: lv_label_set_text(labelSpeed, extrude_menu.high); break; + case uiCfg.eSpeedL: lv_label_set_text(labelSpeed, extrude_menu.low); break; + case uiCfg.eSpeedN: lv_label_set_text(labelSpeed, extrude_menu.normal); break; } + lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } } @@ -221,33 +208,28 @@ void disp_extru_amount() { } void disp_ext_step() { - if (uiCfg.extruStep == 1) - lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step1_mm.bin"); - else if (uiCfg.extruStep == 5) - lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step5_mm.bin"); - else if (uiCfg.extruStep == 10) - lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step10_mm.bin"); + char buf3[12]; + sprintf_P(buf3, PSTR("%dmm"), uiCfg.extruStep); + + switch (uiCfg.extruStep) { + case uiCfg.eStepMin: lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step1_mm.bin"); break; + case uiCfg.eStepMed: lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step5_mm.bin"); break; + case uiCfg.eStepMax: lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step10_mm.bin"); break; + } if (gCfgItems.multiple_language) { - if (uiCfg.extruStep == 1) { - lv_label_set_text(labelStep, extrude_menu.step_1mm); - lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else if (uiCfg.extruStep == 5) { - lv_label_set_text(labelStep, extrude_menu.step_5mm); - lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else if (uiCfg.extruStep == 10) { - lv_label_set_text(labelStep, extrude_menu.step_10mm); - lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); + switch (uiCfg.extruStep) { + case uiCfg.eStepMin: lv_label_set_text(labelStep, buf3); break; + case uiCfg.eStepMed: lv_label_set_text(labelStep, buf3); break; + case uiCfg.eStepMax: lv_label_set_text(labelStep, buf3); break; } + lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } } void lv_clear_extrusion() { - #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); - #endif + if (TERN0(HAS_ROTARY_ENCODER, gCfgItems.encoder_enable)) + lv_group_remove_all_objs(g); lv_obj_del(scr); } diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 7dfbea5bae18..e324c32def53 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -186,10 +186,10 @@ void ui_cfg_init() { uiCfg.stepHeat = 10; uiCfg.leveling_first_time = false; uiCfg.para_ui_page = false; - uiCfg.extruStep = 5; - uiCfg.extruSpeed = 10; + uiCfg.extruStep = uiCfg.eStepMed; + uiCfg.extruSpeed = uiCfg.eSpeedN; uiCfg.move_dist = 1; - uiCfg.moveSpeed = 3000; + uiCfg.moveSpeed = 1000; uiCfg.stepPrintSpeed = 10; uiCfg.command_send = false; uiCfg.dialogType = 0; @@ -609,9 +609,9 @@ char *creat_title_text() { gPicturePreviewStart += (uintptr_t)p1 - (uintptr_t)((uint32_t *)(&public_buf[0])); break; } - else { + else gPicturePreviewStart += br; - } + if (br < 400) break; } } @@ -623,11 +623,8 @@ char *creat_title_text() { while (1) { card.read(public_buf, 400); - for (i = 0; i < 400;) { + for (i = 0; i < 400; i += 2, j++) bmp_public_buf[j] = ascii2dec_test((char*)&public_buf[i]) << 4 | ascii2dec_test((char*)&public_buf[i + 1]); - i += 2; - j++; - } if (j >= 400) break; } for (i = 0; i < 400; i += 2) { diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ui.h b/Marlin/src/lcd/extui/mks_ui/draw_ui.h index 37b19ebd46bd..b7e66a2727df 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_ui.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.h @@ -208,7 +208,7 @@ typedef struct { uint32_t curFilesize; } CFG_ITMES; -typedef struct { +typedef struct UI_Config_Struct { uint8_t curTempType:1, extruderIndex:3, stepHeat:4, @@ -228,8 +228,16 @@ typedef struct { uint8_t wifi_name[32]; uint8_t wifi_key[64]; uint8_t cloud_hostUrl[96]; + // Extruder Steps distances (mm) uint8_t extruStep; + static constexpr uint8_t eStepMin = 1, + eStepMed = 5, + eStepMax = 10; + // Extruder speed (mm/s) uint8_t extruSpeed; + static constexpr uint8_t eSpeedH = 1, + eSpeedN = 10, + eSpeedL = 20; uint8_t print_state; uint8_t stepPrintSpeed; uint8_t waitEndMoves; diff --git a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index b53586c75672..998393ebd59e 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -1445,16 +1445,12 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { ZERO(FileName_unicode); - while (1) { + for (;;) { char_byte_num = source[i] & 0xF0; - if (source[i] < 0x80) { - //ASCII --1byte - FileName_unicode[char_i] = source[i]; - i += 1; - char_i += 1; + if (source[i] < 0x80) { // ASCII -- 1 byte + FileName_unicode[char_i++] = source[i++]; } - else if (char_byte_num == 0xC0 || char_byte_num == 0xD0) { - //--2byte + else if (char_byte_num == 0xC0 || char_byte_num == 0xD0) { // -- 2 byte u16_h = (((uint16_t)source[i] << 8) & 0x1F00) >> 2; u16_l = ((uint16_t)source[i + 1] & 0x003F); u16_value = (u16_h | u16_l); @@ -1463,8 +1459,7 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { i += 2; char_i += 2; } - else if (char_byte_num == 0xE0) { - //--3byte + else if (char_byte_num == 0xE0) { // -- 3 byte u16_h = (((uint16_t)source[i] << 8) & 0x0F00) << 4; u16_m = (((uint16_t)source[i + 1] << 8) & 0x3F00) >> 2; u16_l = ((uint16_t)source[i + 2] & 0x003F); @@ -1474,8 +1469,7 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { i += 3; char_i += 2; } - else if (char_byte_num == 0xF0) { - //--4byte + else if (char_byte_num == 0xF0) { // -- 4 byte i += 4; //char_i += 3; } @@ -1510,7 +1504,7 @@ static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { TERN_(SDSUPPORT, card.mount()); } else if (gCfgItems.fileSysType == FILE_SYS_USB) { - + // nothing } file_writer.write_index = 0; lastFragment = -1; diff --git a/buildroot/bin/mftest b/buildroot/bin/mftest index 17605e3174d1..7a55033e9eb5 100755 --- a/buildroot/bin/mftest +++ b/buildroot/bin/mftest @@ -133,7 +133,7 @@ lp9|lpc9) TESTENV='LPC1769' ;; t36) TESTENV='teensy35' ;; t40) TESTENV='teensy41' ;; t41) TESTENV='teensy41' ;; -[1-9][1-9]|[1-9]) TESTNUM=$TESTENV ; TESTENV=- ;; +[1-9]|[1-9][0-9]) TESTNUM=$TESTENV ; TESTENV=- ;; esac if ((AUTO_BUILD)); then diff --git a/buildroot/tests/mks_robin_nano35 b/buildroot/tests/mks_robin_nano35 index bd16fe48e934..f892d42d9ecb 100755 --- a/buildroot/tests/mks_robin_nano35 +++ b/buildroot/tests/mks_robin_nano35 @@ -15,15 +15,15 @@ opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO exec_test $1 $2 "MKS Robin nano v1.2 Emulated DOGM FSMC" "$3" # -# MKS Robin v2 nano Emulated DOGM SPI -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 Emulated DOGM SPI +# (Robin nano v2 has no FSMC interface) # use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC opt_enable TFT_INTERFACE_SPI MKS_WIFI_MODULE opt_add MKS_TEST -exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI, MKS_WIFI_MODULE" "$3" +exec_test $1 $2 "MKS Robin nano v2 Emulated DOGM SPI, MKS_WIFI_MODULE" "$3" # # MKS Robin nano v1.2 LVGL FSMC @@ -35,34 +35,34 @@ exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI, MKS_WIFI_MODULE" "$3" # exec_test $1 $2 "MKS Robin nano v1.2 LVGL FSMC" "$3" # -# MKS Robin v2 nano LVGL SPI -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 LVGL SPI +# (Robin nano v2 has no FSMC interface) # # use_example_configs Mks/Robin # opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 # opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 # opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 -# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI" "$3" +# exec_test $1 $2 "MKS Robin nano v2 LVGL SPI" "$3" # -# MKS Robin v2 nano New Color UI 480x320 SPI -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 New Color UI 480x320 SPI +# (Robin nano v2 has no FSMC interface) # use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240 opt_enable TFT_INTERFACE_SPI TFT_RES_480x320 -exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI" "$3" +exec_test $1 $2 "MKS Robin nano v2 with New Color UI 480x320 SPI" "$3" # -# MKS Robin v2 nano LVGL SPI + TMC -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 LVGL SPI + TMC +# (Robin nano v2 has no FSMC interface) # -# use_example_configs Mks/Robin -# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 -# opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 -# opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 -# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI + TMC" "$3" +use_example_configs Mks/Robin +opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 +opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 +opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 +exec_test $1 $2 "MKS Robin nano v2 LVGL SPI + TMC" "$3" # cleanup restore_configs From 682d6c99c7d9d0f89a260e1e72b9e776327bb82e Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 2 Sep 2021 01:03:55 +0000 Subject: [PATCH 293/323] [cron] Bump distribution date (2021-09-02) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index eca04a9631cb..174752711a40 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-01" +//#define STRING_DISTRIBUTION_DATE "2021-09-02" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 74e68f0911e7..c839ceb5bdf5 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-01" + #define STRING_DISTRIBUTION_DATE "2021-09-02" #endif /** From 43135114837b3dbe95bdf5b63ddcdec4a812813b Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 3 Sep 2021 00:58:08 +0000 Subject: [PATCH 294/323] [cron] Bump distribution date (2021-09-03) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 174752711a40..cdb1027194b3 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-02" +//#define STRING_DISTRIBUTION_DATE "2021-09-03" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c839ceb5bdf5..10b6a371a426 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-02" + #define STRING_DISTRIBUTION_DATE "2021-09-03" #endif /** From ff95a93ecc299dc8c811012e7e77e32427649cf8 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 3 Sep 2021 05:08:40 +0200 Subject: [PATCH 295/323] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Mixing=20code=20ty?= =?UTF-8?q?pos=20(#22697)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/planner.cpp | 2 +- Marlin/src/module/stepper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 00173e9ad1f8..04d32f9c1805 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -2131,7 +2131,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, // Bail if this is a zero-length block if (block->step_event_count < MIN_STEPS_PER_SEGMENT) return false; - TERN_(MIXING_EXTRUDER, mixer.populate_block(block->b_color)) + TERN_(MIXING_EXTRUDER, mixer.populate_block(block->b_color)); TERN_(HAS_CUTTER, block->cutter_power = cutter.power); diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 86e469827d79..50d8ad426072 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2205,7 +2205,7 @@ uint32_t Stepper::block_phase_isr() { accelerate_until = current_block->accelerate_until << oversampling; decelerate_after = current_block->decelerate_after << oversampling; - TERN_(MIXING_EXTRUDER, mixer.stepper_setup(current_block->b_color)) + TERN_(MIXING_EXTRUDER, mixer.stepper_setup(current_block->b_color)); TERN_(HAS_MULTI_EXTRUDER, stepper_extruder = current_block->extruder); From e1056378f1bbba01fd846c5af2ba339739c271e3 Mon Sep 17 00:00:00 2001 From: Elliott Indiran Date: Thu, 2 Sep 2021 20:41:41 -0700 Subject: [PATCH 296/323] =?UTF-8?q?=F0=9F=93=9D=20Update=20PID=5FPARAMS=5F?= =?UTF-8?q?PER=5FHOTEND=20comment=20(#22694)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 418c25aef758..5a70d3267186 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -595,8 +595,8 @@ // Set/get with gcode: M301 E[extruder number, 0-2] #if ENABLED(PID_PARAMS_PER_HOTEND) - // Specify between 1 and HOTENDS values per array. - // If fewer than EXTRUDER values are provided, the last element will be repeated. + // Specify up to one value per hotend here, according to your setup. + // If there are fewer values, the last one applies to the remaining hotends. #define DEFAULT_Kp_LIST { 22.20, 22.20 } #define DEFAULT_Ki_LIST { 1.08, 1.08 } #define DEFAULT_Kd_LIST { 114.00, 114.00 } From 18d82c1988624c48b459352fa02a352b34d2eff7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 3 Sep 2021 12:30:24 +0800 Subject: [PATCH 297/323] =?UTF-8?q?=E2=9C=A8=20Homing=20submenu=20option?= =?UTF-8?q?=20(#22692)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 1 + .../extui/ftdi_eve_touch_ui/theme/bitmaps.h | 2 +- Marlin/src/lcd/language/language_en.h | 1 + Marlin/src/lcd/menu/menu_motion.cpp | 68 ++++++++++++++----- Marlin/src/pins/pins.h | 6 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 2 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 2 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 2 +- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 2 +- 9 files changed, 61 insertions(+), 25 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 5a70d3267186..bfc39298a210 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2159,6 +2159,7 @@ // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. // //#define INDIVIDUAL_AXIS_HOMING_MENU +//#define INDIVIDUAL_AXIS_HOMING_SUBMENU // // SPEAKER/BUZZER diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h index c689f239057e..59394b89a68a 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h @@ -239,7 +239,7 @@ namespace Theme { .width = 31, .height = 32, }; - + const unsigned char Light_Bulb[128] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 85bf685e3129..bddddb75bff1 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -70,6 +70,7 @@ namespace Language_en { PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Disable Steppers"); PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Debug Menu"); PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Progress Bar Test"); + PROGMEM Language_Str MSG_HOMING = _UxGT("Homing"); PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Auto Home"); PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Home X"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Home Y"); diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 3e7977bac6ed..948c8807b2e2 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -320,6 +320,36 @@ void menu_move() { END_MENU(); } +#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + // + // "Motion" > "Homing" submenu + // + void menu_home() { + START_MENU(); + BACK_ITEM(MSG_MOTION); + + GCODES_ITEM(MSG_AUTO_HOME, G28_STR); + GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X")); + #if HAS_Y_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y")); + #endif + #if HAS_Z_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z")); + #endif + #if LINEAR_AXES >= 4 + GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR)); + #endif + #if LINEAR_AXES >= 5 + GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR)); + #endif + #if LINEAR_AXES >= 6 + GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR)); + #endif + + END_MENU(); + } +#endif + #if ENABLED(AUTO_BED_LEVELING_UBL) void _lcd_ubl_level_bed(); #elif ENABLED(LCD_BED_LEVELING) @@ -347,23 +377,27 @@ void menu_motion() { // // Auto Home // - GCODES_ITEM(MSG_AUTO_HOME, G28_STR); - #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) - GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X")); - #if HAS_Y_AXIS - GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y")); - #endif - #if HAS_Z_AXIS - GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z")); - #endif - #if LINEAR_AXES >= 4 - GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR)); - #endif - #if LINEAR_AXES >= 5 - GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR)); - #endif - #if LINEAR_AXES >= 6 - GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR)); + #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + SUBMENU(MSG_HOMING, menu_home); + #else + GCODES_ITEM(MSG_AUTO_HOME, G28_STR); + #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) + GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X")); + #if HAS_Y_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y")); + #endif + #if HAS_Z_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z")); + #endif + #if LINEAR_AXES >= 4 + GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR)); + #endif + #if LINEAR_AXES >= 5 + GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR)); + #endif + #if LINEAR_AXES >= 6 + GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR)); + #endif #endif #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 064a4bb99e4d..af14f9ec1c3d 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -564,11 +564,11 @@ #elif MB(MINGDA_MPX_ARM_MINI) #include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1 env:mingda_mpx_arm_mini #elif MB(ZONESTAR_ZM3E2) - #include "stm32f1/pins_ZM3E2_V1_0.h" // STM32F1 env:STM32F103RC_ZM3E2_USB env:STM32F103RC_ZM3E2_USB_maple + #include "stm32f1/pins_ZM3E2_V1_0.h" // STM32F1 env:STM32F103RC_ZM3E2_USB env:STM32F103RC_ZM3E2_USB_maple #elif MB(ZONESTAR_ZM3E4) - #include "stm32f1/pins_ZM3E4_V1_0.h" // STM32F1 env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple + #include "stm32f1/pins_ZM3E4_V1_0.h" // STM32F1 env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple #elif MB(ZONESTAR_ZM3E4V2) - #include "stm32f1/pins_ZM3E4_V2_0.h" // STM32F1 env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple + #include "stm32f1/pins_ZM3E4_V2_0.h" // STM32F1 env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple // // ARM Cortex-M4F diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 4db596a1bc34..846a21eea518 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -326,7 +326,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif - //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_180 #else // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 8c0ff76ae60e..39920122d357 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -200,7 +200,7 @@ #define DOGLCD_SCK EXP2_09_PIN #define FORCE_SOFT_SPI #define SOFTWARE_SPI - //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_180 #else diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 204cd21c020b..ec1ec17d3f05 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -349,7 +349,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif - //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_180 #else // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 4e0ff6f09d5e..d55b152a8b4b 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -389,7 +389,7 @@ #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif - //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_180 #else // !MKS_MINI_12864 From 5dbb15539502da2bbc4ece99a3f5fc123801cdbe Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 3 Sep 2021 17:26:36 -0500 Subject: [PATCH 298/323] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20'ms'=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/marlinui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 1472f5c32aa5..8911941ee0c5 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1444,7 +1444,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; UNUSED(persist); #endif - #if ENABLED(LCD_PROGRESS_BAR) || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BASIC_PROGRESS_BAR || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) const millis_t ms = millis(); #endif From a3557e63bf6669820d24a568030436979529f182 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 4 Sep 2021 01:20:32 +0200 Subject: [PATCH 299/323] =?UTF-8?q?=F0=9F=8C=90=20Update=20"Homing"=20for?= =?UTF-8?q?=20some=20languages=20(#22706)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_an.h | 1 + Marlin/src/lcd/language/language_ca.h | 1 + Marlin/src/lcd/language/language_es.h | 1 + Marlin/src/lcd/language/language_fr.h | 1 + 4 files changed, 4 insertions(+) diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index e5fc965ed1fa..1bc6d75f3bc1 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -44,6 +44,7 @@ namespace Language_an { PROGMEM Language_Str MSG_MAIN = _UxGT("Menu prencipal"); PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Inicio automatico"); PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Amortar motors"); + PROGMEM Language_Str MSG_HOMING = _UxGT("Orichen"); PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Levar a l'orichen"); PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Orichen X"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Orichen Y"); diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index 19ba9acab74f..a554fafdfd52 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -42,6 +42,7 @@ namespace Language_ca { PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Desactiva motors"); PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu de depuracio"); PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test barra progres"); + PROGMEM Language_Str MSG_HOMING = _UxGT("Origen"); PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Ves a l'origen"); PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X a origen"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y a origen"); diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index f08cecf1e151..1213d9e1fe45 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -57,6 +57,7 @@ namespace Language_es { PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Apagar motores"); PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menú depuración"); PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Prob. barra progreso"); + PROGMEM Language_Str MSG_HOMING = _UxGT("Origen"); PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Llevar al origen"); PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Origen X"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Origen Y"); diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index c0ee6b82cd0d..ef15d069dc6d 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -56,6 +56,7 @@ namespace Language_fr { PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Arrêter moteurs"); PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu debug"); PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test barre progress."); + PROGMEM Language_Str MSG_HOMING = _UxGT("Origine"); PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Origine auto"); PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Origine X auto"); PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Origine Y auto"); From 88fc449c7bfef94782458c5b7ec3aeb0889f0bb5 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 4 Sep 2021 00:58:22 +0000 Subject: [PATCH 300/323] [cron] Bump distribution date (2021-09-04) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index cdb1027194b3..3e8e7e47a242 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-03" +//#define STRING_DISTRIBUTION_DATE "2021-09-04" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 10b6a371a426..78683e651116 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-03" + #define STRING_DISTRIBUTION_DATE "2021-09-04" #endif /** From 73bc81739799cf50a70cb6dfd2045b57591f50d3 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 5 Sep 2021 01:01:15 +0000 Subject: [PATCH 301/323] [cron] Bump distribution date (2021-09-05) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 3e8e7e47a242..436deb5e7ac6 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-04" +//#define STRING_DISTRIBUTION_DATE "2021-09-05" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 78683e651116..3f5497b7194b 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-04" + #define STRING_DISTRIBUTION_DATE "2021-09-05" #endif /** From 76fb131f14dfc4108c4f6491d84827b8813d3973 Mon Sep 17 00:00:00 2001 From: Justin Nesselrotte Date: Sun, 5 Sep 2021 14:21:45 -0600 Subject: [PATCH 302/323] =?UTF-8?q?=E2=9C=A8=20Index=20Pick-and-Place=20bo?= =?UTF-8?q?ard=20Rev.3=20(#22647)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gonçalo Pereira Co-authored-by: Scott Lahteine --- .github/workflows/test-builds.yml | 1 + Marlin/src/core/boards.h | 1 + Marlin/src/pins/pins.h | 2 + Marlin/src/pins/stm32f4/pins_INDEX_REV03.h | 157 ++++++++++++++++++ .../boards/marlin_index_mobo_rev03.json | 51 ++++++ buildroot/tests/Index_Mobo_Rev03 | 13 ++ ini/stm32f4.ini | 12 ++ 7 files changed, 237 insertions(+) create mode 100644 Marlin/src/pins/stm32f4/pins_INDEX_REV03.h create mode 100644 buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json create mode 100755 buildroot/tests/Index_Mobo_Rev03 diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index c6afaffebf7a..f5ce466d9051 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -97,6 +97,7 @@ jobs: - REMRAM_V1 - BTT_SKR_SE_BX - chitu_f103 + - Index_Mobo_Rev03 # Put lengthy tests last diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index d37fa0cdbc84..be78c96b222c 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -395,6 +395,7 @@ #define BOARD_ANET_ET4P 4230 // ANET ET4P V1.x (STM32F407VGT6) #define BOARD_FYSETC_CHEETAH_V20 4231 // FYSETC Cheetah V2.0 #define BOARD_TH3D_EZBOARD_LITE_V2 4232 // TH3D EZBoard Lite v2.0 +#define BOARD_INDEX_REV03 4233 // Index PnP Controller REV03 (STM32F407VET6/VGT6) // // ARM Cortex M7 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index af14f9ec1c3d..8c41a8a67274 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -645,6 +645,8 @@ #include "stm32f4/pins_MKS_MONSTER8.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc #elif MB(TH3D_EZBOARD_LITE_V2) #include "stm32f4/pins_TH3D_EZBOARD_LITE_V2.h" // STM32F4 env:TH3D_EZBoard_Lite_V2 +#elif MB(INDEX_REV03) + #include "stm32f4/pins_INDEX_REV03.h" // STM32F4 env:Index_Mobo_Rev03 // // ARM Cortex M7 diff --git a/Marlin/src/pins/stm32f4/pins_INDEX_REV03.h b/Marlin/src/pins/stm32f4/pins_INDEX_REV03.h new file mode 100644 index 000000000000..8761ca955a8f --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_INDEX_REV03.h @@ -0,0 +1,157 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * STM32F407VET6 on Index PnP Mobo Rev03 + * Website - https://indexmachines.io/ + */ + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#define BOARD_INFO_NAME "Index Mobo Rev03" +#define DEFAULT_MACHINE_NAME "Index Pick and Place" + +/** + * By default, the extra stepper motor configuration is: + * I = Left Head + * J = Right Head + * K = Auxiliary (Conveyor belt) + */ + +#define SRAM_EEPROM_EMULATION +#define MARLIN_EEPROM_SIZE 0x2000 // 8KB + +// +// Servos +// +#define SERVO0_PIN PB10 +#define SERVO1_PIN PB11 + +// +// Limit Switches +// +#define X_STOP_PIN PC6 +#define Y_STOP_PIN PD15 +#define Z_STOP_PIN PD14 + +// None of these require limit switches by default, so we leave these commented +// here for your reference. +// #define I_MIN_PIN PA8 +// #define I_MAX_PIN PA8 +// #define J_MIN_PIN PD13 +// #define J_MAX_PIN PD13 +// #define K_MIN_PIN PC9 +// #define K_MAX_PIN PC9 + +// +// Steppers +// +#define X_STEP_PIN PB15 +#define X_DIR_PIN PB14 +#define X_ENABLE_PIN PD9 +#define X_SERIAL_TX_PIN PD8 +#define X_SERIAL_RX_PIN PD8 + +#define Y_STEP_PIN PE15 +#define Y_DIR_PIN PE14 +#define Y_ENABLE_PIN PB13 +#define Y_SERIAL_TX_PIN PB12 +#define Y_SERIAL_RX_PIN PB12 + +#define Z_STEP_PIN PE7 +#define Z_DIR_PIN PB1 +#define Z_ENABLE_PIN PE9 +#define Z_SERIAL_TX_PIN PE8 +#define Z_SERIAL_RX_PIN PE8 + +#define I_STEP_PIN PC4 +#define I_DIR_PIN PA4 +#define I_ENABLE_PIN PB0 +#define I_SERIAL_TX_PIN PC5 +#define I_SERIAL_RX_PIN PC5 + +#define J_STEP_PIN PE11 +#define J_DIR_PIN PE10 +#define J_ENABLE_PIN PE13 +#define J_SERIAL_TX_PIN PE12 +#define J_SERIAL_RX_PIN PE12 +#define K_SERIAL_TX_PIN PA2 +#define K_SERIAL_RX_PIN PA2 + +#define K_STEP_PIN PD6 +#define K_DIR_PIN PD7 +#define K_ENABLE_PIN PA3 + +// Reduce baud rate to improve software serial reliability +#define TMC_BAUD_RATE 19200 + +// Not required for this board. Fails to compile otherwise. +// PD0 is not connected on this board. +#define TEMP_0_PIN PD0 + +// General use mosfets, useful for things like pumps and solenoids +#define FAN_PIN PE2 +#define FAN1_PIN PE3 +#define FAN2_PIN PE4 +#define FAN3_PIN PE5 + +// Neopixel Rings +#define NEOPIXEL_PIN PC7 +#define NEOPIXEL2_PIN PC8 + +// SPI +#define MISO_PIN PB4 +#define MOSI_PIN PB5 +#define SCK_PIN PB3 + +// I2C +#define I2C_SDA_PIN PB7 +#define I2C_SCL_PIN PB6 + +/** + * The index mobo rev03 has 3 aux ports. We define them here so they may be used + * in other places and to make sure someone doesn't have to go look up the pinout + * in the board files. Each 12 pin aux port has this pinout: + * + * VDC 1 2 GND + * 3.3V 3 4 SCL (I2C_SCL_PIN) + * PWM1 5 6 SDA (I2C_SDA_PIN) + * PWM2 7 8 CIPO (MISO_PIN) + * A1 9 10 COPI (MOSI_PIN) + * A2 11 12 SCK (SCK_PIN) + */ +#define INDEX_AUX1_PWM1 PA15 +#define INDEX_AUX1_PWM2 PA5 +#define INDEX_AUX1_A1 PC0 +#define INDEX_AUX1_A2 PC1 + +#define INDEX_AUX2_PWM1 PA6 +#define INDEX_AUX2_PWM2 PA7 +#define INDEX_AUX2_A1 PC2 +#define INDEX_AUX2_A2 PC3 + +#define INDEX_AUX3_PWM1 PB8 +#define INDEX_AUX3_PWM2 PB9 +#define INDEX_AUX3_A1 PA0 +#define INDEX_AUX3_A2 PA1 diff --git a/buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json b/buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json new file mode 100644 index 000000000000..c65f1dd70356 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json @@ -0,0 +1,51 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F407xx", + "f_cpu": "168000000L", + "hwids": [ + [ + "0x1EAF", + "0x0003" + ], + [ + "0x0483", + "0x3748" + ], + [ + "0x0483", + "0xdf11" + ] + ], + "mcu": "stm32f407vet6", + "variant": "MARLIN_F407VE" + }, + "debug": { + "jlink_device": "STM32F407VE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F40x.svd" + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32F407VE (192k RAM. 512k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 131072, + "maximum_size": 524288, + "protocol": "stlink", + "protocols": [ + "stlink", + "dfu", + "jlink", + "blackmagic" + ], + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html", + "vendor": "Generic" +} diff --git a/buildroot/tests/Index_Mobo_Rev03 b/buildroot/tests/Index_Mobo_Rev03 new file mode 100755 index 000000000000..501386489df0 --- /dev/null +++ b/buildroot/tests/Index_Mobo_Rev03 @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +# Build tests for Index_Mobo_Rev03 +# + +# exit on first failure +set -e + +use_example_configs Index/REV_03 +exec_test $1 $2 "Index REV03 Pick and Place" "$3" + +# cleanup +restore_configs diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 6870345121d8..84256d3be989 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -99,6 +99,18 @@ board = marlin_blackSTM32F407VET6 build_flags = ${stm32_variant.build_flags} -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS +# +# STM32F407VET6 Index Mobo Rev 03 +# +[env:Index_Mobo_Rev03] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_index_mobo_rev03 +build_flags = ${stm32_variant.build_flags} + -DARDUINO_BLACK_F407VE + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS +extra_scripts = ${stm32_variant.extra_scripts} + # # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4) # For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases From 51c66881c26e1db1d4eff925f0f0157ab65f83d0 Mon Sep 17 00:00:00 2001 From: Dan Date: Sun, 5 Sep 2021 13:32:09 -0700 Subject: [PATCH 303/323] =?UTF-8?q?=E2=9C=A8=20Protoneer=20CNC-Shield=203.?= =?UTF-8?q?00=20(#22715)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/boards.h | 1 + .../pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h | 77 +++++++++++++++++++ Marlin/src/pins/pins.h | 2 + 3 files changed, 80 insertions(+) create mode 100644 Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index be78c96b222c..dd181baed959 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -161,6 +161,7 @@ #define BOARD_INTAMSYS40 1326 // Intamsys 4.0 (Funmat HT) #define BOARD_MALYAN_M180 1327 // Malyan M180 Mainboard Version 2 (no display function, direct gcode only) #define BOARD_GT2560_V4_A20 1328 // Geeetech GT2560 Rev B for A20(M/T/D) +#define BOARD_PROTONEER_CNC_SHIELD_V3 1329 // Mega controller & Protoneer CNC Shield V3.00 // // ATmega1281, ATmega2561 diff --git a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h new file mode 100644 index 000000000000..31bab5b2dc1b --- /dev/null +++ b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h @@ -0,0 +1,77 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Protoneer v3.00 pin assignments + * + * This CNC shield has an UNO pinout and fits all Arduino-compatibles. + * + * Referenced docs: + * - https://blog.protoneer.co.nz/arduino-cnc-shield-v3-00-assembly-guide/ + * - https://blog.protoneer.co.nz/arduino-cnc-shield/ + */ + +#include "env_validate.h" + +#define BOARD_INFO_NAME "Protoneer CNC Shield v3.00" + +// +// Limit Switches +// +#define X_STOP_PIN 9 +#define Y_STOP_PIN 10 +#define Z_STOP_PIN 11 + +// +// Steppers +// +#define X_STEP_PIN 2 +#define X_DIR_PIN 5 +#define X_ENABLE_PIN 8 // Shared enable pin + +#define Y_STEP_PIN 3 +#define Y_DIR_PIN 6 +#define Y_ENABLE_PIN X_ENABLE_PIN + +#define Z_STEP_PIN 4 +#define Z_DIR_PIN 7 +#define Z_ENABLE_PIN X_ENABLE_PIN + +// Designated with letter "A" on BOARD +#define E0_STEP_PIN 12 +#define E0_DIR_PIN 13 +#define E0_ENABLE_PIN X_ENABLE_PIN + +// +// Temperature sensors - These could be any analog output not hidden by board +// +#define TEMP_0_PIN 8 // Analog Input +//#define TEMP_1_PIN 9 // Analog Input +//#define TEMP_BED_PIN 10 // Analog Input + +// +// Heaters / Fans - These could be any digital input not hidden by board +// +//#define HEATER_0_PIN 22 // EXTRUDER 1 +//#define HEATER_1_PIN 23 // EXTRUDER 2 +//#define HEATER_BED_PIN 24 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 8c41a8a67274..7a0d932c6134 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -269,6 +269,8 @@ #include "mega/pins_INTAMSYS40.h" // ATmega2560 env:mega2560 #elif MB(MALYAN_M180) #include "mega/pins_MALYAN_M180.h" // ATmega2560 env:mega2560 +#elif MB(PROTONEER_CNC_SHIELD_V3) + #include "mega/pins_PROTONEER_CNC_SHIELD_V3.h"// ATmega2560 env:mega2560 // // ATmega1281, ATmega2561 From c881fab1280f338e32015e1556890d647ee967fb Mon Sep 17 00:00:00 2001 From: dotdash32 Date: Sun, 5 Sep 2021 17:21:25 -0700 Subject: [PATCH 304/323] =?UTF-8?q?=F0=9F=8E=A8=20Use=20largest=20default?= =?UTF-8?q?=20ST9720=20delays=20(#22713)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/src/HAL/AVR/HAL.h | 12 ++--- Marlin/src/HAL/LINUX/HAL.h | 6 +-- Marlin/src/HAL/LPC1768/HAL.h | 6 +-- Marlin/src/HAL/NATIVE_SIM/HAL.h | 6 +-- Marlin/src/HAL/STM32/HAL.h | 6 +-- Marlin/src/HAL/STM32F1/HAL.h | 6 +-- Marlin/src/HAL/TEENSY31_32/HAL.h | 6 +-- Marlin/src/HAL/TEENSY35_36/HAL.h | 6 +-- Marlin/src/HAL/TEENSY40_41/HAL.h | 6 +-- Marlin/src/inc/Conditionals_LCD.h | 12 ++--- .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 50 +++++++++++++++++++ Marlin/src/pins/mega/pins_SILVER_GATE.h | 6 +-- Marlin/src/pins/pins_postprocess.h | 30 +---------- Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 6 +-- Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 6 +-- Marlin/src/pins/rambo/pins_MINIRAMBO.h | 6 +-- Marlin/src/pins/rambo/pins_RAMBO.h | 6 +-- Marlin/src/pins/ramps/pins_3DRAG.h | 6 +-- Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h | 6 +-- Marlin/src/pins/ramps/pins_DAGOMA_F5.h | 6 +-- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 6 +-- Marlin/src/pins/sanguino/pins_ANET_10.h | 12 ++--- Marlin/src/pins/sanguino/pins_MELZI.h | 6 +-- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 6 +-- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 6 +-- Marlin/src/pins/sanguino/pins_MELZI_V2.h | 6 +-- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 6 +-- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 6 +-- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 6 +-- Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 6 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 6 +-- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 6 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 6 +-- .../src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h | 6 +-- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 6 +-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 6 +-- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 6 +-- Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 6 +-- Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 6 +-- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 6 +-- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 11 ++-- Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 11 ++-- .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 11 ++-- .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 11 ++-- .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 11 ++-- Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 6 +-- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 11 ++-- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 6 +-- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 6 +-- .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 6 +-- .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 6 +-- Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 6 +-- .../pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h | 9 ++-- Marlin/src/pins/stm32f4/pins_VAKE403D.h | 6 +-- Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 6 +-- .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 6 +-- 59 files changed, 231 insertions(+), 242 deletions(-) diff --git a/Marlin/src/HAL/AVR/HAL.h b/Marlin/src/HAL/AVR/HAL.h index dc0a4f2074be..a22daf9b5c88 100644 --- a/Marlin/src/HAL/AVR/HAL.h +++ b/Marlin/src/HAL/AVR/HAL.h @@ -43,13 +43,13 @@ // Default graphical display delays // #if F_CPU >= 20000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(150) - #define CPU_ST7920_DELAY_2 DELAY_NS( 0) - #define CPU_ST7920_DELAY_3 DELAY_NS(150) + #define CPU_ST7920_DELAY_1 150 + #define CPU_ST7920_DELAY_2 0 + #define CPU_ST7920_DELAY_3 150 #elif F_CPU == 16000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(125) - #define CPU_ST7920_DELAY_2 DELAY_NS( 0) - #define CPU_ST7920_DELAY_3 DELAY_NS(188) + #define CPU_ST7920_DELAY_1 125 + #define CPU_ST7920_DELAY_2 0 + #define CPU_ST7920_DELAY_3 188 #endif #ifndef pgm_read_ptr diff --git a/Marlin/src/HAL/LINUX/HAL.h b/Marlin/src/HAL/LINUX/HAL.h index 07ab85a9a090..79639f4993ac 100644 --- a/Marlin/src/HAL/LINUX/HAL.h +++ b/Marlin/src/HAL/LINUX/HAL.h @@ -63,9 +63,9 @@ uint8_t _getc(); extern MSerialT usb_serial; #define MYSERIAL1 usb_serial -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // // Interrupts diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h index f0a1185ff246..fc2fc5737887 100644 --- a/Marlin/src/HAL/LPC1768/HAL.h +++ b/Marlin/src/HAL/LPC1768/HAL.h @@ -50,9 +50,9 @@ extern "C" volatile uint32_t _millis; // // Default graphical display delays // -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1; extern DefaultSerial1 USBSerial; diff --git a/Marlin/src/HAL/NATIVE_SIM/HAL.h b/Marlin/src/HAL/NATIVE_SIM/HAL.h index 400fafd711ca..235c24808cb4 100644 --- a/Marlin/src/HAL/NATIVE_SIM/HAL.h +++ b/Marlin/src/HAL/NATIVE_SIM/HAL.h @@ -99,9 +99,9 @@ extern MSerialT serial_stream_3; #endif -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // // Interrupts diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h index d73f8b2d54d0..7a04c9ceebb4 100644 --- a/Marlin/src/HAL/STM32/HAL.h +++ b/Marlin/src/HAL/STM32/HAL.h @@ -40,9 +40,9 @@ // // Default graphical display delays // -#define CPU_ST7920_DELAY_1 DELAY_NS(300) -#define CPU_ST7920_DELAY_2 DELAY_NS( 40) -#define CPU_ST7920_DELAY_3 DELAY_NS(340) +#define CPU_ST7920_DELAY_1 300 +#define CPU_ST7920_DELAY_2 40 +#define CPU_ST7920_DELAY_3 340 // // Serial Ports diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index 7efb761c2806..1d30f43c4831 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -54,9 +54,9 @@ // // Default graphical display delays // -#define CPU_ST7920_DELAY_1 DELAY_NS(300) -#define CPU_ST7920_DELAY_2 DELAY_NS( 40) -#define CPU_ST7920_DELAY_3 DELAY_NS(340) +#define CPU_ST7920_DELAY_1 300 +#define CPU_ST7920_DELAY_2 40 +#define CPU_ST7920_DELAY_3 340 #ifndef STM32_FLASH_SIZE #if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE) diff --git a/Marlin/src/HAL/TEENSY31_32/HAL.h b/Marlin/src/HAL/TEENSY31_32/HAL.h index d4b3c0a772aa..aa195845fb17 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL.h +++ b/Marlin/src/HAL/TEENSY31_32/HAL.h @@ -36,9 +36,9 @@ #include -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 //#undef MOTHERBOARD //#define MOTHERBOARD BOARD_TEENSY31_32 diff --git a/Marlin/src/HAL/TEENSY35_36/HAL.h b/Marlin/src/HAL/TEENSY35_36/HAL.h index 0b82a569f904..0093294a2aa5 100644 --- a/Marlin/src/HAL/TEENSY35_36/HAL.h +++ b/Marlin/src/HAL/TEENSY35_36/HAL.h @@ -37,9 +37,9 @@ #include #include -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // ------------------------ // Defines diff --git a/Marlin/src/HAL/TEENSY40_41/HAL.h b/Marlin/src/HAL/TEENSY40_41/HAL.h index 14f14bf446c7..ea51f15ba1b5 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL.h +++ b/Marlin/src/HAL/TEENSY40_41/HAL.h @@ -41,9 +41,9 @@ #include "../../feature/ethernet.h" #endif -#define CPU_ST7920_DELAY_1 DELAY_NS(600) -#define CPU_ST7920_DELAY_2 DELAY_NS(750) -#define CPU_ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // ------------------------ // Defines diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 13af3c25f5ff..b6f76564f921 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -237,16 +237,16 @@ #elif ENABLED(CR10_STOCKDISPLAY) #define IS_RRD_FG_SC 1 - #define LCD_ST7920_DELAY_1 DELAY_NS(125) - #define LCD_ST7920_DELAY_2 DELAY_NS(125) - #define LCD_ST7920_DELAY_3 DELAY_NS(125) + #define LCD_ST7920_DELAY_1 125 + #define LCD_ST7920_DELAY_2 125 + #define LCD_ST7920_DELAY_3 125 #elif ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) #define IS_RRD_FG_SC 1 - #define LCD_ST7920_DELAY_1 DELAY_NS(150) - #define LCD_ST7920_DELAY_2 DELAY_NS(150) - #define LCD_ST7920_DELAY_3 DELAY_NS(150) + #define LCD_ST7920_DELAY_1 150 + #define LCD_ST7920_DELAY_2 150 + #define LCD_ST7920_DELAY_3 150 #elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER) diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index 20c8cec0cf34..9367ed75a98b 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -36,11 +36,61 @@ // Optimize this code with -O3 #pragma GCC optimize (3) +#ifndef ST7920_DELAY_1 + #ifndef LCD_ST7920_DELAY_1 + #define LCD_ST7920_DELAY_1 0 + #endif + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 0 + #endif + #ifndef CPU_ST7920_DELAY_1 + #define CPU_ST7920_DELAY_1 0 + #endif + #if LCD_ST7920_DELAY_1 || BOARD_ST7920_DELAY_1 || CPU_ST7920_DELAY_1 + #define ST7920_DELAY_1 DELAY_NS(_MAX(LCD_ST7920_DELAY_1, BOARD_ST7920_DELAY_1, CPU_ST7920_DELAY_1)) + #else + #define ST7920_DELAY_1 + #endif +#endif +#ifndef ST7920_DELAY_2 + #ifndef LCD_ST7920_DELAY_2 + #define LCD_ST7920_DELAY_2 0 + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 0 + #endif + #ifndef CPU_ST7920_DELAY_2 + #define CPU_ST7920_DELAY_2 0 + #endif + #if LCD_ST7920_DELAY_2 || BOARD_ST7920_DELAY_2 || CPU_ST7920_DELAY_2 + #define ST7920_DELAY_2 DELAY_NS(_MAX(LCD_ST7920_DELAY_2, BOARD_ST7920_DELAY_2, CPU_ST7920_DELAY_2)) + #else + #define ST7920_DELAY_2 + #endif +#endif +#ifndef ST7920_DELAY_3 + #ifndef LCD_ST7920_DELAY_3 + #define LCD_ST7920_DELAY_3 0 + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 0 + #endif + #ifndef CPU_ST7920_DELAY_3 + #define CPU_ST7920_DELAY_3 0 + #endif + #if LCD_ST7920_DELAY_3 || BOARD_ST7920_DELAY_3 || CPU_ST7920_DELAY_3 + #define ST7920_DELAY_3 DELAY_NS(_MAX(LCD_ST7920_DELAY_3, BOARD_ST7920_DELAY_3, CPU_ST7920_DELAY_3)) + #else + #define ST7920_DELAY_3 + #endif +#endif + #ifdef ARDUINO_ARCH_STM32F1 #define ST7920_DAT(V) !!((V) & 0x80) #else #define ST7920_DAT(V) ((V) & 0x80) #endif + #define ST7920_SND_BIT do{ \ WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \ WRITE(ST7920_DAT_PIN, ST7920_DAT(val)); ST7920_DELAY_2; \ diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 0828b32aa90c..7b4f53a764ac 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -86,9 +86,9 @@ #define KILL_PIN 21 #define HOME_PIN 28 #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif #endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index aa2bc07908c0..6b5c695e854d 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -1221,35 +1221,7 @@ // // Default DOGLCD SPI delays // -#if ENABLED(U8GLIB_ST7920) - #ifndef ST7920_DELAY_1 - #ifdef LCD_ST7920_DELAY_1 - #define ST7920_DELAY_1 LCD_ST7920_DELAY_1 - #elif defined(BOARD_ST7920_DELAY_1) - #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1 - #elif defined(CPU_ST7920_DELAY_1) - #define ST7920_DELAY_1 CPU_ST7920_DELAY_1 - #endif - #endif - #ifndef ST7920_DELAY_2 - #ifdef LCD_ST7920_DELAY_2 - #define ST7920_DELAY_2 LCD_ST7920_DELAY_2 - #elif defined(BOARD_ST7920_DELAY_2) - #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2 - #elif defined(CPU_ST7920_DELAY_2) - #define ST7920_DELAY_2 CPU_ST7920_DELAY_2 - #endif - #endif - #ifndef ST7920_DELAY_3 - #ifdef LCD_ST7920_DELAY_3 - #define ST7920_DELAY_3 LCD_ST7920_DELAY_3 - #elif defined(BOARD_ST7920_DELAY_3) - #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3 - #elif defined(CPU_ST7920_DELAY_3) - #define ST7920_DELAY_3 CPU_ST7920_DELAY_3 - #endif - #endif -#else +#if DISABLED(U8GLIB_ST7920) #undef ST7920_DELAY_1 #undef ST7920_DELAY_2 #undef ST7920_DELAY_3 diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index dbb34f6585be..25decbf0354c 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -206,9 +206,9 @@ #endif // HAS_WIRED_LCD #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif #undef MK3_FAN_PINS diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index 5d8ffc07aad4..48c68d55f949 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -202,7 +202,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index 62575506971a..c49687890839 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -194,7 +194,7 @@ #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index a77cb3d93f30..8153103a38ac 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -271,7 +271,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(0) - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 0 + #define BOARD_ST7920_DELAY_3 0 #endif diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 3f38ecb2118d..316323ef9c14 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -109,9 +109,9 @@ #endif // IS_ULTRA_LCD && IS_NEWPANEL #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 188 + #define BOARD_ST7920_DELAY_3 0 #endif /** diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index 5b3ed4c6a5b2..14f54cdcf3e8 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -126,7 +126,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_3 DELAY_NS(189) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 0 + #define BOARD_ST7920_DELAY_3 189 #endif diff --git a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h index 4f25110ca249..4bebd6ded6e9 100644 --- a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h +++ b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h @@ -41,9 +41,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(250) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 250 #endif // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 0398d36f93f1..94c4551fc2ed 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -200,7 +200,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(200) - #define BOARD_ST7920_DELAY_2 DELAY_NS(200) - #define BOARD_ST7920_DELAY_3 DELAY_NS(200) + #define BOARD_ST7920_DELAY_1 200 + #define BOARD_ST7920_DELAY_2 200 + #define BOARD_ST7920_DELAY_3 200 #endif diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index e54209ed6ac7..bd69e167dc05 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -195,9 +195,9 @@ #define BTN_EN1 28 #define BTN_EN2 10 #define BTN_ENC 17 - #define BOARD_ST7920_DELAY_1 DELAY_NS(250) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(250) + #define BOARD_ST7920_DELAY_1 250 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 250 #else #define SERVO0_PIN 29 // free for BLTouch/3D-Touch #define BEEPER_PIN 17 @@ -207,9 +207,9 @@ #define BTN_EN1 11 #define BTN_EN2 10 #define BTN_ENC 16 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(63) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 63 + #define BOARD_ST7920_DELAY_3 125 #endif #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h index 8f2729f8f079..31583fd10955 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI.h +++ b/Marlin/src/pins/sanguino/pins_MELZI.h @@ -34,13 +34,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) + #define BOARD_ST7920_DELAY_2 188 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_3 0 #endif #endif diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 81ccf5977e68..3c6dd901c044 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -37,9 +37,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index e88a38561d1c..8abed5c30c2e 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -29,9 +29,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 0 #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h index c1fb7fb6f787..badf53a641bd 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h @@ -26,9 +26,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(400) - #define BOARD_ST7920_DELAY_3 DELAY_NS( 0) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 400 + #define BOARD_ST7920_DELAY_3 0 #endif #include "pins_MELZI.h" diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 6aa3372b3fa3..650357ee9e5a 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -203,9 +203,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index 2ce1d49bb860..77eb6aaf14bb 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -156,9 +156,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index 7d0e15f57aa1..3f02d7082f80 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -180,9 +180,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index 797e13fd0748..b3da8d884e1f 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -159,9 +159,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index 64b1c6c040cc..3650ffde5c84 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -167,9 +167,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 992fc36f92c3..56dda2b143cc 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -164,9 +164,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index d33ce461feef..c9a20fd66ea7 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -169,9 +169,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 846a21eea518..c5080b5227cd 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -342,9 +342,9 @@ #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 39920122d357..489da083939e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -223,13 +223,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) + #define BOARD_ST7920_DELAY_2 125 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_3 125 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 6373d70e38f0..6388e1723c05 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -114,9 +114,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h index 73fefddf8fbc..416a061412e1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h @@ -138,9 +138,9 @@ #endif // !MKS_MINI_12864 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index ec1ec17d3f05..d19343386e23 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -366,9 +366,9 @@ #endif #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 8f03a3678f43..fdee79669240 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -301,9 +301,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #define HAS_SPI_FLASH 1 diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h index 0d413d3651b9..d4f77d5f8421 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -201,9 +201,9 @@ #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_06_PIN #define BTN_ENC EXP1_04_PIN - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(200) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 200 + #define BOARD_ST7920_DELAY_3 125 #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h index a7a1dacd5be2..daacd0c124e5 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -333,9 +333,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 125 #endif // Remap SERVO0 PIN for BLTouch diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h index ba6bf8aa7bdc..e0b2f6adfcd8 100644 --- a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -306,9 +306,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(200) // Tclk_fall <200ns - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) // Tdata_width >200ns - #define BOARD_ST7920_DELAY_3 DELAY_NS(200) // Tclk_rise <200ns + #define BOARD_ST7920_DELAY_1 200 // Tclk_fall <200ns + #define BOARD_ST7920_DELAY_2 250 // Tdata_width >200ns + #define BOARD_ST7920_DELAY_3 200 // Tclk_rise <200ns #endif // Remap SERVO0 PIN for BLTouch diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index bb283201e483..86851a7840a5 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -286,9 +286,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 8d828f9e2797..eb0c3bdbb92a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -207,11 +207,6 @@ #define LCD_PINS_ENABLE PE11 #define LCD_PINS_D4 PE10 - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue." @@ -283,9 +278,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index 5a1efc252b9b..68948f7de934 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -425,11 +425,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN #define DOGLCD_CS EXP1_05_PIN @@ -489,9 +484,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index d133a457181a..ab0a7dd96268 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -433,11 +433,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #else #define LCD_PINS_RS EXP1_07_PIN @@ -484,9 +479,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS(120) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 80) - #define BOARD_ST7920_DELAY_3 DELAY_NS(580) + #define BOARD_ST7920_DELAY_1 120 + #define BOARD_ST7920_DELAY_2 80 + #define BOARD_ST7920_DELAY_3 580 #endif #if HAS_SPI_TFT diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 8690f41ec992..72154be2ee0a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -446,11 +446,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN @@ -506,13 +501,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS( 90) + #define BOARD_ST7920_DELAY_2 90 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_3 600 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 30163dc61d25..a05f4fb5b9ce 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -430,11 +430,6 @@ #define LCD_PINS_ENABLE EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN @@ -490,13 +485,13 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(120) + #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS( 80) + #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(580) + #define BOARD_ST7920_DELAY_3 580 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index cbed56d20272..8a9ac56e9e87 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -306,7 +306,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index c922f13c6093..3fe744933080 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -192,11 +192,6 @@ #define LCD_PINS_ENABLE EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN @@ -251,9 +246,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #if ENABLED(TOUCH_UI_FTDI_EVE) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index da83ade4e094..6b6f6441596d 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -315,9 +315,9 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 640 #endif #ifndef RGB_LED_R_PIN diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index 3b6a3f74f60e..8fa211dc9502 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -369,9 +369,9 @@ #define LCD_PINS_D7 EXP1_03_PIN #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index d55b152a8b4b..e78807e1afc0 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -400,9 +400,9 @@ #define LCD_PINS_D7 EXP1_03_PIN #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index c28da7134746..46dec71c11c1 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -371,9 +371,9 @@ #define LCD_PINS_D7 EXP1_03_PIN #endif - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index af0f5fa17cc0..4c0e3515f6c7 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -173,7 +173,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 640 #endif diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h index c04341a24352..bff3f5b6ee4c 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h @@ -225,12 +225,9 @@ #define LCD_PINS_D4 EXP1_05_PIN //#define KILL_PIN -1 - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_1 DELAY_NS(600) - #define BOARD_ST7920_DELAY_2 DELAY_NS(750) - #define BOARD_ST7920_DELAY_3 DELAY_NS(750) + #define BOARD_ST7920_DELAY_1 600 + #define BOARD_ST7920_DELAY_2 750 + #define BOARD_ST7920_DELAY_3 750 #elif ENABLED(MKS_MINI_12864) /** ______ diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index 280f98eae82e..f936df2c2c3a 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -184,7 +184,7 @@ // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) - #define BOARD_ST7920_DELAY_1 DELAY_NS( 96) - #define BOARD_ST7920_DELAY_2 DELAY_NS( 48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index 217664e5bc2b..c41b5ab1dec2 100644 --- a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -191,7 +191,7 @@ #define BTN_EN1 PF13 // BTN_EN1 #define BTN_EN2 PE9 // BTN_EN2 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(63) - #define BOARD_ST7920_DELAY_3 DELAY_NS(780) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 63 + #define BOARD_ST7920_DELAY_3 780 #endif diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 539a3bb8f3df..76b98ccbeb33 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -245,9 +245,9 @@ //#define MISO 23 // 13 B3 ICSP-06 EXP2-05 // Alter timing for graphical display - #define BOARD_ST7920_DELAY_1 DELAY_NS(313) - #define BOARD_ST7920_DELAY_2 DELAY_NS(313) - #define BOARD_ST7920_DELAY_3 DELAY_NS(313) + #define BOARD_ST7920_DELAY_1 313 + #define BOARD_ST7920_DELAY_2 313 + #define BOARD_ST7920_DELAY_3 313 #else From 6098150a857d15cd735f8c2309ca4b2d3f624974 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 6 Sep 2021 01:05:05 +0000 Subject: [PATCH 305/323] [cron] Bump distribution date (2021-09-06) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 436deb5e7ac6..45d4db726445 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-05" +//#define STRING_DISTRIBUTION_DATE "2021-09-06" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 3f5497b7194b..2dbbd144e7e1 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-05" + #define STRING_DISTRIBUTION_DATE "2021-09-06" #endif /** From b0a91073b25f53e9e377f0ef4e01c9dd6fefd021 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 5 Sep 2021 20:32:29 -0500 Subject: [PATCH 306/323] =?UTF-8?q?=F0=9F=94=A7=20Sanity=20checks=20for=20?= =?UTF-8?q?Ender=203=20V2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 25 +++++++++++++++++++++---- Marlin/src/lcd/e3v2/creality/dwin.cpp | 2 +- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index d6f911cd4c7e..01fdaa3451e2 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1750,8 +1750,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS * LCD_BED_LEVELING requirements */ #if ENABLED(LCD_BED_LEVELING) - #if !HAS_LCD_MENU - #error "LCD_BED_LEVELING requires a programmable LCD controller." + #if NONE(HAS_LCD_MENU, DWIN_CREALITY_LCD) + #error "LCD_BED_LEVELING is not supported by the selected LCD controller." #elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL) #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING." #elif ENABLED(MESH_EDIT_MENU) && !HAS_MESH @@ -2656,8 +2656,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \ + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \ + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) \ - + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY, DWIN_CREALITY_LCD) \ - + COUNT_ENABLED(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ + + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1) \ + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ @@ -2750,6 +2750,23 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "Please select only one of CHIRON_TFT_STANDARD or CHIRON_TFT_NEW." #endif +/** + * Ender 3 V2 controller has some limitations + */ +#if ENABLED(DWIN_CREALITY_LCD) + #if DISABLED(SDSUPPORT) + #error "DWIN_CREALITY_LCD requires SDSUPPORT to be enabled." + #elif ENABLED(PID_EDIT_MENU) + #error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU." + #elif ENABLED(PID_AUTOTUNE_MENU) + #error "DWIN_CREALITY_LCD does not support PID_AUTOTUNE_MENU." + #elif ENABLED(LEVEL_BED_CORNERS) + #error "DWIN_CREALITY_LCD does not support LEVEL_BED_CORNERS." + #elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) + #error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY." + #endif +#endif + /** * Some boards forbid the use of -1 Native USB */ diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 5ddc23181772..a6218609df56 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -30,7 +30,7 @@ #include "dwin.h" -#if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) && DISABLED(PROBE_MANUALLY) +#if ENABLED(LCD_BED_LEVELING) && DISABLED(PROBE_MANUALLY) && ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) #define HAS_ONESTEP_LEVELING 1 #endif From 521fda0235bc07c5e07889373a2a22c57fadf07f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 27 Aug 2021 16:12:08 -0500 Subject: [PATCH 307/323] =?UTF-8?q?=F0=9F=8E=A8=20MarlinUI=20for=20E3V2=20?= =?UTF-8?q?tweaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/e3v2/creality/dwin.cpp | 10 ++-------- Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h | 1 - Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp | 10 +++++----- Marlin/src/lcd/e3v2/marlinui/dwin_string.h | 20 +++++++++---------- .../src/lcd/e3v2/marlinui/lcdprint_dwin.cpp | 16 +++++++-------- 5 files changed, 24 insertions(+), 33 deletions(-) diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index a6218609df56..d14d6f10dda9 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -579,14 +579,8 @@ void DWIN_Draw_Label(const uint8_t row, const __FlashStringHelper *title) { } void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { - if (value < 0) { - DWIN_Draw_String(true, size, Color_White, bColor, x - 8, y, F("-")); - DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, -value); - } - else { - DWIN_Draw_String(true, size, Color_White, bColor, x - 8, y, F(" ")); - DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value); - } + DWIN_Draw_String(true, size, Color_White, bColor, x - 8, y, value < 0 ? F("-") : F(" ")); + DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value < 0 ? -value : value); } void Draw_Edit_Integer3(const uint8_t row, const uint16_t value, const bool active=false) { diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h index 09d7b5ddd228..4d8e670e1c30 100644 --- a/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h @@ -67,7 +67,6 @@ #define DWIN_FONT_MENU font10x20 #define DWIN_FONT_STAT font14x28 -#define DWIN_FONT_HEAD font10x20 #define DWIN_FONT_ALERT font14x28 // Color diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp index c7b37319c4df..89e001b29c39 100644 --- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp @@ -47,7 +47,7 @@ uint8_t read_byte(uint8_t *byte) { return *byte; } * ~ displays '1'....'11' for indexes 0 - 10 * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) */ -void DWIN_String::add(uint8_t *string, int8_t index, uint8_t *itemString) { +void DWIN_String::add(uint8_t *string, const int8_t index, uint8_t *itemString/*=nullptr*/) { wchar_t wchar; while (*string) { @@ -127,7 +127,7 @@ void DWIN_String::add(wchar_t character) { if (str[1]) add_character(str[1]); } -void DWIN_String::add_character(uint8_t character) { +void DWIN_String::add_character(const uint8_t character) { if (len < MAX_STRING_LENGTH) { data[len] = character; len++; @@ -135,7 +135,7 @@ void DWIN_String::add_character(uint8_t character) { } } -void DWIN_String::rtrim(uint8_t character) { +void DWIN_String::rtrim(const uint8_t character) { while (len) { if (data[len - 1] == 0x20 || data[len - 1] == character) { len--; @@ -147,7 +147,7 @@ void DWIN_String::rtrim(uint8_t character) { } } -void DWIN_String::ltrim(uint8_t character) { +void DWIN_String::ltrim(const uint8_t character) { uint16_t i, j; for (i = 0; (i < len) && (data[i] == 0x20 || data[i] == character); i++) { //span -= glyph(data[i])->DWidth; @@ -158,7 +158,7 @@ void DWIN_String::ltrim(uint8_t character) { eol(); } -void DWIN_String::trim(uint8_t character) { +void DWIN_String::trim(const uint8_t character) { rtrim(character); ltrim(character); } diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h index d78d774095bf..08566407b740 100644 --- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h @@ -46,7 +46,7 @@ class DWIN_String { static uint16_t span; // in pixels static uint8_t len; // in characters - static void add_character(uint8_t character); + static void add_character(const uint8_t character); static void eol() { data[len] = 0x00; } public: @@ -62,7 +62,7 @@ class DWIN_String { //static void add(uint8_t character) { add_character(character); eol(); } static void add(wchar_t character); static void add(uint8_t *string, uint8_t max_len=MAX_STRING_LENGTH); - static void add(uint8_t *string, int8_t index, uint8_t *itemString=nullptr); + static void add(uint8_t *string, const int8_t index, uint8_t *itemString=nullptr); static void set(uint8_t *string) { set(); add(string); } static void set(wchar_t character) { set(); add(character); } static void set(uint8_t *string, int8_t index, const char *itemString=nullptr) { set(); add(string, index, (uint8_t *)itemString); } @@ -71,20 +71,20 @@ class DWIN_String { static inline void set(const char *string, int8_t index, const char *itemString=nullptr) { set((uint8_t *)string, index, itemString); } static inline void add(const char *string) { add((uint8_t *)string); } - static void trim(uint8_t character=0x20); - static void rtrim(uint8_t character=0x20); - static void ltrim(uint8_t character=0x20); + static void trim(const uint8_t character=0x20); + static void rtrim(const uint8_t character=0x20); + static void ltrim(const uint8_t character=0x20); static void truncate(uint8_t maxlen) { if (len > maxlen) { len = maxlen; eol(); } } - static uint8_t length() { return len; } - static uint16_t width() { return span; } - static uint8_t *string() { return data; } + static inline uint8_t length() { return len; } + static inline uint16_t width() { return span; } + static inline uint8_t *string() { return data; } static uint16_t center(uint16_t width) { return span > width ? 0 : (width - span) / 2; } }; int dwin_charmap_compare(dwin_charmap_t *v1, dwin_charmap_t *v2); -int pf_bsearch_cb_comp_dwinmap_pgm(void *userdata, size_t idx, void * data_pin); +int pf_bsearch_cb_comp_dwinmap_pgm(void *userdata, size_t idx, void *data_pin); extern DWIN_String dwin_string; @@ -664,7 +664,7 @@ const dwin_charmap_t g_dwin_charmap_device[] PROGMEM = { #endif }; -// the plain ASCII replacement for various char +// ASCII replacement for various characters const dwin_charmap_t g_dwin_charmap_common[] PROGMEM = { {IV('¡'), 'i', 0}, // A1 {IV('¢'), 'c', 0}, // A2 diff --git a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp index 20b3727dbc93..069272f6c15b 100644 --- a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp +++ b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp @@ -46,11 +46,10 @@ extern dwin_font_t dwin_font; void lcd_moveto_xy(const lcd_uint_t x, const lcd_uint_t y) { cursor.x = x; cursor.y = y; } void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) { - cursor.x = col * dwin_font.width; - cursor.y = (row * (dwin_font.height + EXTRA_ROW_HEIGHT)) + (EXTRA_ROW_HEIGHT / 2); + lcd_moveto_xy(col * dwin_font.width, row * (dwin_font.height + EXTRA_ROW_HEIGHT) + EXTRA_ROW_HEIGHT / 2); } -inline void lcd_advance_cursor() { cursor.x += dwin_font.width; } +inline void lcd_advance_cursor(const uint8_t len=1) { cursor.x += len * dwin_font.width; } void lcd_put_int(const int i) { // TODO: Draw an int at the cursor position, advance the cursor @@ -58,19 +57,18 @@ void lcd_put_int(const int i) { int lcd_put_dwin_string() { DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); - cursor.x += dwin_string.length() * dwin_font.width; + lcd_advance_cursor(dwin_string.length()); return dwin_string.length(); } // return < 0 on error // return the advanced cols int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) { - dwin_string.set(); - dwin_string.add(c); + dwin_string.set(c); dwin_string.truncate(max_length); // Draw the char(s) at the cursor and advance the cursor DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); - cursor.x += dwin_string.length() * dwin_font.width; + lcd_advance_cursor(dwin_string.length()); return dwin_string.length(); } @@ -95,7 +93,7 @@ static int lcd_put_u8str_max_cb(const char * utf8_str, uint8_t (*cb_read_byte)(u dwin_string.add(ch); } DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); - cursor.x += dwin_string.length() * dwin_font.width; + lcd_advance_cursor(dwin_string.length()); return dwin_string.length(); } @@ -112,7 +110,7 @@ lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const i dwin_string.add((uint8_t*)pstr, ind, (uint8_t*)inStr); dwin_string.truncate(maxlen); DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); - cursor.x += dwin_string.length() * dwin_font.width; + lcd_advance_cursor(dwin_string.length()); return dwin_string.length(); } From ba62f24717f8ce7a452a07208f0b571d932c16c5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 5 Sep 2021 21:00:42 -0500 Subject: [PATCH 308/323] =?UTF-8?q?=E2=8F=AA=EF=B8=8F=20Clean=20up=20Info?= =?UTF-8?q?=20Menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_info.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index bcdea7f92d45..9b7bf58fd780 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -250,7 +250,7 @@ void menu_info_board() { STATIC_ITEM(MSG_MARLIN, SS_DEFAULT|SS_INVERT); // Marlin STATIC_ITEM_P(PSTR(SHORT_BUILD_VERSION)); // x.x.x-Branch STATIC_ITEM_P(PSTR(STRING_DISTRIBUTION_DATE)); // YYYY-MM-DD HH:MM - STATIC_ITEM_P(PSTR(MACHINE_NAME)); // My3DPrinter + STATIC_ITEM_P(PSTR(MACHINE_NAME), SS_DEFAULT|SS_INVERT); // My3DPrinter STATIC_ITEM_P(PSTR(WEBSITE_URL)); // www.my3dprinter.com PSTRING_ITEM(MSG_INFO_EXTRUDERS, STRINGIFY(EXTRUDERS), SS_CENTER); // Extruders: 2 #if HAS_LEVELING @@ -273,14 +273,6 @@ void menu_info_board() { void menu_info() { START_MENU(); BACK_ITEM(MSG_MAIN); - STATIC_ITEM(MSG_MARLIN); - STATIC_ITEM_P(PSTR(SHORT_BUILD_VERSION)); - STATIC_ITEM_P(PSTR(STRING_DISTRIBUTION_DATE)); - STATIC_ITEM_P(PSTR(MACHINE_NAME)); - STATIC_ITEM_P(PSTR(WEBSITE_URL)); - STATIC_ITEM_P(PSTR(BOARD_INFO_NAME), SS_CENTER); - VALUE_ITEM_P(MSG_INFO_EXTRUDERS, STRINGIFY(EXTRUDERS), SS_CENTER); - VALUE_ITEM_P(MSG_INFO_BAUDRATE, STRINGIFY(BAUDRATE), SS_CENTER); #if ENABLED(LCD_PRINTER_INFO_IS_BOOTSCREEN) SUBMENU(MSG_INFO_PRINTER_MENU, TERN(SHOW_CUSTOM_BOOTSCREEN, menu_show_custom_bootscreen, menu_show_marlin_bootscreen)); #else From dc6b86065e53f82e309a13b710863617f9bdce82 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 5 Sep 2021 21:23:56 -0500 Subject: [PATCH 309/323] =?UTF-8?q?=F0=9F=9A=B8=20Per-hotend=20Watch=20ite?= =?UTF-8?q?ms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu_info.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index 9b7bf58fd780..388aebb74469 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -106,6 +106,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E0 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_0_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_0_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_1 != 0 @@ -115,6 +116,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E1 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_1_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_1_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_2 != 0 @@ -124,6 +126,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E2 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_2_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_2_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_3 != 0 @@ -133,6 +136,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E3 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_3_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_3_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_4 != 0 @@ -142,6 +146,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E4 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_4_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_4_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_5 != 0 @@ -151,6 +156,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E5 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_5_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_6 != 0 @@ -160,6 +166,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E6 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_6_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_6_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_7 != 0 @@ -169,9 +176,6 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E7 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_7_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_7_MAXTEMP), SS_LEFT); - #endif - - #if HAS_EXTRUDERS STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif From 845d42ef40e1adc04315779d31eb55dac2218689 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Sep 2021 15:34:12 -0500 Subject: [PATCH 310/323] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20Spindle/Laser=20?= =?UTF-8?q?(etc.)=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/spindle_laser.cpp | 40 ++++++----- Marlin/src/feature/spindle_laser.h | 66 +++++++++++-------- Marlin/src/gcode/control/M3-M5.cpp | 2 +- Marlin/src/module/stepper.cpp | 16 ++--- .../pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h | 4 +- 5 files changed, 70 insertions(+), 58 deletions(-) diff --git a/Marlin/src/feature/spindle_laser.cpp b/Marlin/src/feature/spindle_laser.cpp index 539fafeb3498..68a84e1aba7c 100644 --- a/Marlin/src/feature/spindle_laser.cpp +++ b/Marlin/src/feature/spindle_laser.cpp @@ -52,9 +52,9 @@ cutter_power_t SpindleLaser::menuPower, // Power s #endif #define SPINDLE_LASER_PWM_OFF TERN(SPINDLE_LASER_PWM_INVERT, 255, 0) -// -// Init the cutter to a safe OFF state -// +/** + * Init the cutter to a safe OFF state + */ void SpindleLaser::init() { #if ENABLED(SPINDLE_SERVO) MOVE_SERVO(SPINDLE_SERVO_NR, SPINDLE_SERVO_MIN); @@ -86,6 +86,8 @@ void SpindleLaser::init() { #if ENABLED(SPINDLE_LASER_PWM) /** * Set the cutter PWM directly to the given ocr value + * + * @param ocr Power value */ void SpindleLaser::_set_ocr(const uint8_t ocr) { #if NEEDS_HARDWARE_PWM && SPINDLE_LASER_FREQUENCY @@ -105,11 +107,15 @@ void SpindleLaser::init() { WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_STATE); // Cutter OFF _set_ocr(0); } -#endif +#endif // SPINDLE_LASER_PWM -// -// Set cutter ON/OFF state (and PWM) to the given cutter power value -// +/** + * Apply power for laser/spindle + * + * Apply cutter power value for PWM, Servo, and on/off pin. + * + * @param opwr Power value. Range 0 to MAX. When 0 disable spindle/laser. + */ void SpindleLaser::apply_power(const uint8_t opwr) { static uint8_t last_power_applied = 0; if (opwr == last_power_applied) return; @@ -137,10 +143,10 @@ void SpindleLaser::apply_power(const uint8_t opwr) { } #if ENABLED(SPINDLE_CHANGE_DIR) - // - // Set the spindle direction and apply immediately - // Stop on direction change if SPINDLE_STOP_ON_DIR_CHANGE is enabled - // + /** + * Set the spindle direction and apply immediately + * Stop on direction change if SPINDLE_STOP_ON_DIR_CHANGE is enabled + */ void SpindleLaser::set_reverse(const bool reverse) { const bool dir_state = (reverse == SPINDLE_INVERT_DIR); // Forward (M3) HIGH when not inverted if (TERN0(SPINDLE_STOP_ON_DIR_CHANGE, enabled()) && READ(SPINDLE_DIR_PIN) != dir_state) disable(); @@ -149,25 +155,17 @@ void SpindleLaser::apply_power(const uint8_t opwr) { #endif #if ENABLED(AIR_EVACUATION) - // Enable / disable Cutter Vacuum or Laser Blower motor void SpindleLaser::air_evac_enable() { WRITE(AIR_EVACUATION_PIN, AIR_EVACUATION_ACTIVE); } // Turn ON - void SpindleLaser::air_evac_disable() { WRITE(AIR_EVACUATION_PIN, !AIR_EVACUATION_ACTIVE); } // Turn OFF - void SpindleLaser::air_evac_toggle() { TOGGLE(AIR_EVACUATION_PIN); } // Toggle state - -#endif // AIR_EVACUATION +#endif #if ENABLED(AIR_ASSIST) - // Enable / disable air assist void SpindleLaser::air_assist_enable() { WRITE(AIR_ASSIST_PIN, AIR_ASSIST_PIN); } // Turn ON - void SpindleLaser::air_assist_disable() { WRITE(AIR_ASSIST_PIN, !AIR_ASSIST_PIN); } // Turn OFF - void SpindleLaser::air_assist_toggle() { TOGGLE(AIR_ASSIST_PIN); } // Toggle state - -#endif // AIR_ASSIST +#endif #endif // HAS_CUTTER diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index da228cf8a706..9a2d05c79d16 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -132,54 +132,50 @@ class SpindleLaser { public: static void set_ocr(const uint8_t ocr); - static inline void set_ocr_power(const uint8_t ocr) { power = ocr; set_ocr(ocr); } + static inline void ocr_set_power(const uint8_t ocr) { power = ocr; set_ocr(ocr); } static void ocr_off(); - // Used to update output for power->OCR translation + + /** + * Update output for power->OCR translation + */ static inline uint8_t upower_to_ocr(const cutter_power_t upwr) { - return ( + return uint8_t( #if CUTTER_UNIT_IS(PWM255) - uint8_t(upwr) + upwr #elif CUTTER_UNIT_IS(PERCENT) pct_to_ocr(upwr) #else - uint8_t(pct_to_ocr(cpwr_to_pct(upwr))) + pct_to_ocr(cpwr_to_pct(upwr)) #endif ); } - // Correct power to configured range + /** + * Correct power to configured range + */ static inline cutter_power_t power_to_range(const cutter_power_t pwr) { - return power_to_range(pwr, ( - #if CUTTER_UNIT_IS(PWM255) - 0 - #elif CUTTER_UNIT_IS(PERCENT) - 1 - #elif CUTTER_UNIT_IS(RPM) - 2 - #else - #error "CUTTER_UNIT_IS(unknown)" - #endif - )); + return power_to_range(pwr, _CUTTER_POWER(CUTTER_POWER_UNIT)); } + static inline cutter_power_t power_to_range(const cutter_power_t pwr, const uint8_t pwrUnit) { if (pwr <= 0) return 0; cutter_power_t upwr; switch (pwrUnit) { - case 0: // PWM + case _CUTTER_POWER_PWM255: upwr = cutter_power_t( (pwr < pct_to_ocr(min_pct)) ? pct_to_ocr(min_pct) // Use minimum if set below : (pwr > pct_to_ocr(max_pct)) ? pct_to_ocr(max_pct) // Use maximum if set above : pwr ); break; - case 1: // PERCENT + case _CUTTER_POWER_PERCENT: upwr = cutter_power_t( (pwr < min_pct) ? min_pct // Use minimum if set below : (pwr > max_pct) ? max_pct // Use maximum if set above : pwr // PCT ); break; - case 2: // RPM + case _CUTTER_POWER_RPM: upwr = cutter_power_t( (pwr < SPEED_POWER_MIN) ? SPEED_POWER_MIN // Use minimum if set below : (pwr > SPEED_POWER_MAX) ? SPEED_POWER_MAX // Use maximum if set above @@ -190,14 +186,34 @@ class SpindleLaser { } return upwr; } - #endif // SPINDLE_LASER_PWM + /** + * Enable/Disable spindle/laser + * @param enable true = enable; false = disable + */ static inline void set_enabled(const bool enable) { - set_power(enable ? TERN(SPINDLE_LASER_PWM, (power ?: (unitPower ? upower_to_ocr(cpwr_to_upwr(SPEED_POWER_STARTUP)) : 0)), 255) : 0); + uint8_t value = 0; + if (enable) { + #if ENABLED(SPINDLE_LASER_PWM) + if (power) + value = power; + else if (unitPower) + value = upower_to_ocr(cpwr_to_upwr(SPEED_POWER_STARTUP)); + #else + value = 255; + #endif + } + set_power(value); } - // Wait for spindle to spin up or spin down + static inline void disable() { isReady = false; set_enabled(false); } + + /** + * Wait for spindle to spin up or spin down + * + * @param on true = state to on; false = state to off. + */ static inline void power_delay(const bool on) { #if DISABLED(LASER_POWER_INLINE) safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY); @@ -230,8 +246,6 @@ class SpindleLaser { } #endif - static inline void disable() { isReady = false; set_enabled(false); } - #if HAS_LCD_MENU static inline void enable_with_dir(const bool reverse) { isReady = true; @@ -325,7 +339,7 @@ class SpindleLaser { planner.laser_inline.power = ocrpwr; } #endif - #endif // LASER_POWER_INLINE + #endif // LASER_POWER_INLINE static inline void kill() { TERN_(LASER_POWER_INLINE, inline_disable()); diff --git a/Marlin/src/gcode/control/M3-M5.cpp b/Marlin/src/gcode/control/M3-M5.cpp index 711bb7e5e4a7..ff5ab5086e3b 100644 --- a/Marlin/src/gcode/control/M3-M5.cpp +++ b/Marlin/src/gcode/control/M3-M5.cpp @@ -108,7 +108,7 @@ void GcodeSuite::M3_M4(const bool is_M4) { #if ENABLED(SPINDLE_LASER_PWM) if (parser.seenval('O')) { cutter.unitPower = cutter.power_to_range(parser.value_byte(), 0); - cutter.set_ocr_power(cutter.unitPower); // The OCR is a value from 0 to 255 (uint8_t) + cutter.ocr_set_power(cutter.unitPower); // The OCR is a value from 0 to 255 (uint8_t) } else cutter.set_power(cutter.upower_to_ocr(get_s_power())); diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 50d8ad426072..f9245336f368 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1914,7 +1914,7 @@ uint32_t Stepper::block_phase_isr() { laser_trap.acc_step_count += current_block->laser.entry_per; if (laser_trap.cur_power < current_block->laser.power) laser_trap.cur_power++; } - cutter.set_ocr_power(laser_trap.cur_power); + cutter.ocr_set_power(laser_trap.cur_power); } } #else @@ -1923,7 +1923,7 @@ uint32_t Stepper::block_phase_isr() { else { laser_trap.till_update = LASER_POWER_INLINE_TRAPEZOID_CONT_PER; laser_trap.cur_power = (current_block->laser.power * acc_step_rate) / current_block->nominal_rate; - cutter.set_ocr_power(laser_trap.cur_power); // Cycle efficiency is irrelevant it the last line was many cycles + cutter.ocr_set_power(laser_trap.cur_power); // Cycle efficiency is irrelevant it the last line was many cycles } #endif } @@ -1991,7 +1991,7 @@ uint32_t Stepper::block_phase_isr() { laser_trap.acc_step_count += current_block->laser.exit_per; if (laser_trap.cur_power > current_block->laser.power_exit) laser_trap.cur_power--; } - cutter.set_ocr_power(laser_trap.cur_power); + cutter.ocr_set_power(laser_trap.cur_power); } } #else @@ -2000,7 +2000,7 @@ uint32_t Stepper::block_phase_isr() { else { laser_trap.till_update = LASER_POWER_INLINE_TRAPEZOID_CONT_PER; laser_trap.cur_power = (current_block->laser.power * step_rate) / current_block->nominal_rate; - cutter.set_ocr_power(laser_trap.cur_power); // Cycle efficiency isn't relevant when the last line was many cycles + cutter.ocr_set_power(laser_trap.cur_power); // Cycle efficiency isn't relevant when the last line was many cycles } #endif } @@ -2028,7 +2028,7 @@ uint32_t Stepper::block_phase_isr() { if (laser_trap.enabled) { if (!laser_trap.cruise_set) { laser_trap.cur_power = current_block->laser.power; - cutter.set_ocr_power(laser_trap.cur_power); + cutter.ocr_set_power(laser_trap.cur_power); laser_trap.cruise_set = true; } #if ENABLED(LASER_POWER_INLINE_TRAPEZOID_CONT) @@ -2249,14 +2249,14 @@ uint32_t Stepper::block_phase_isr() { #endif // Always have PWM in this case if (stat.isPlanned) { // Planner controls the laser - cutter.set_ocr_power( + cutter.ocr_set_power( stat.isEnabled ? laser_trap.cur_power : 0 // ON with power or OFF ); } #else if (stat.isPlanned) { // Planner controls the laser #if ENABLED(SPINDLE_LASER_PWM) - cutter.set_ocr_power( + cutter.ocr_set_power( stat.isEnabled ? current_block->laser.power : 0 // ON with power or OFF ); #else @@ -2304,7 +2304,7 @@ uint32_t Stepper::block_phase_isr() { const power_status_t stat = planner.laser_inline.status; if (stat.isPlanned) { // Planner controls the laser #if ENABLED(SPINDLE_LASER_PWM) - cutter.set_ocr_power( + cutter.ocr_set_power( stat.isEnabled ? planner.laser_inline.power : 0 // ON with power or OFF ); #else diff --git a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h index 31bab5b2dc1b..f2e4d3da0266 100644 --- a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h +++ b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h @@ -23,9 +23,9 @@ /** * Protoneer v3.00 pin assignments - * + * * This CNC shield has an UNO pinout and fits all Arduino-compatibles. - * + * * Referenced docs: * - https://blog.protoneer.co.nz/arduino-cnc-shield-v3-00-assembly-guide/ * - https://blog.protoneer.co.nz/arduino-cnc-shield/ From 83a1d3a46b1e12c65d0eadbd663315c400fe022f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Sep 2021 16:33:24 -0500 Subject: [PATCH 311/323] =?UTF-8?q?=F0=9F=8E=A8=20Misc.=20code=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/stats/M75-M78.cpp | 22 +++++++++---------- Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h | 1 - Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h | 2 -- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Marlin/src/gcode/stats/M75-M78.cpp b/Marlin/src/gcode/stats/M75-M78.cpp index f74d9204bde0..66f9f8eb8dd6 100644 --- a/Marlin/src/gcode/stats/M75-M78.cpp +++ b/Marlin/src/gcode/stats/M75-M78.cpp @@ -54,24 +54,24 @@ void GcodeSuite::M77() { #if ENABLED(PRINTCOUNTER) /** - * M78: Show print statistics - */ + * M78: Show print statistics + */ void GcodeSuite::M78() { if (parser.intval('S') == 78) { // "M78 S78" will reset the statistics - print_job_timer.initStats(); - ui.reset_status(); + print_job_timer.initStats(); + ui.reset_status(); return; - } + } - #if HAS_SERVICE_INTERVALS + #if HAS_SERVICE_INTERVALS if (parser.seenval('R')) { - print_job_timer.resetServiceInterval(parser.value_int()); - ui.reset_status(); + print_job_timer.resetServiceInterval(parser.value_int()); + ui.reset_status(); return; - } - #endif + } + #endif - print_job_timer.showStats(); + print_job_timer.showStats(); } #endif // PRINTCOUNTER diff --git a/Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h index f6b3231737d8..fd52f2cfa9ed 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h @@ -194,7 +194,6 @@ #define TITLE_HOME_RU "Home" #define TITLE_EXTRUDE_RU "экструзия" #define TITLE_LEVELING_RU "уровень" -#define TITLE_MLEVELING_RU "углы" #define TITLE_SET_RU "настройки" #define TITLE_MORE_RU "больше" #define TITLE_CHOOSEFILE_RU "файла" diff --git a/Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h index a75bc69ab738..6bba3a3edfe2 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h @@ -29,7 +29,6 @@ #define PRINT_TEXT_SP "Imprimir" #define EXTRUDE_TEXT_SP "Extrusor" #define LEVELING_TEXT_SP "Leveling" -#define MLEVELING_TEXT_SP "Leveling" #define AUTO_LEVELING_TEXT_SP "Autolevel" #define SET_TEXT_SP "Config" #define MORE_TEXT_SP "Más" @@ -53,7 +52,6 @@ #define TOOL_MOVE_SP "Mover" #define TOOL_HOME_SP "Origen" #define TOOL_LEVELING_SP "Leveling" -#define TOOL_MLEVELING_SP "Leveling" #define TOOL_AUTO_LEVELING_SP "Autolevel" #define TOOL_FILAMENT_SP "Filamento" #define TOOL_MORE_SP "Más" From 853eebc3f2f6326000da790cfd549c2a44dfeae2 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Sep 2021 17:38:47 -0500 Subject: [PATCH 312/323] =?UTF-8?q?=F0=9F=9A=B8=20Show=20ExtUI=20message?= =?UTF-8?q?=20for=20PID=5FSTARTED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_LCD.h | 2 +- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 4 +++- Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 3 +++ Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index b6f76564f921..9875422742a8 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -478,7 +478,7 @@ #endif // Aliases for LCD features -#if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY,DGUS_LCD_UI_MKS) +#if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) #define HAS_DGUS_LCD 1 #endif diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 589821e23a64..4b4521c47f96 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -135,6 +135,9 @@ namespace ExtUI { void onPidTuning(const result_t rst) { // Called for temperature PID tuning result switch (rst) { + case PID_STARTED: + ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_AUTOTUNE)); + break; case PID_BAD_EXTRUDER_NUM: ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); break; @@ -147,7 +150,6 @@ namespace ExtUI { case PID_DONE: ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_AUTOTUNE_DONE)); break; - case PID_STARTED: break; } ScreenHandler.GotoScreen(DGUSLCD_SCREEN_MAIN); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp index 9faedae711d8..a696ca3413ab 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp @@ -133,6 +133,9 @@ namespace ExtUI { // Called for temperature PID tuning result //SERIAL_ECHOLNPAIR("OnPidTuning:", rst); switch (rst) { + case PID_STARTED: + StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); + break; case PID_BAD_EXTRUDER_NUM: StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_BAD_EXTRUDER_NUM)); break; diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index 5815522afca2..8a237999886d 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -108,6 +108,9 @@ namespace ExtUI { // Called for temperature PID tuning result //SERIAL_ECHOLNPAIR("OnPidTuning:", rst); switch (rst) { + case PID_STARTED: + set_lcd_error_P(GET_TEXT(MSG_PID_AUTOTUNE)); + break; case PID_BAD_EXTRUDER_NUM: set_lcd_error_P(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); break; From b0e798330d8f5ade4a230e0a91f05482d100bb97 Mon Sep 17 00:00:00 2001 From: mrv96 Date: Tue, 7 Sep 2021 02:51:04 +0200 Subject: [PATCH 313/323] =?UTF-8?q?=E2=9C=A8Add=20DGUS=5FLCD=5FUI=5FRELOAD?= =?UTF-8?q?ED=20(#21931)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 5 + Marlin/src/inc/Conditionals_LCD.h | 4 + Marlin/src/inc/SanityCheck.h | 31 +- Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp | 4 +- .../src/lcd/extui/dgus/DGUSScreenHandler.cpp | 4 +- Marlin/src/lcd/extui/dgus/dgus_extui.cpp | 4 +- .../lcd/extui/dgus_reloaded/DGUSDisplay.cpp | 407 +++++++ .../src/lcd/extui/dgus_reloaded/DGUSDisplay.h | 171 +++ .../lcd/extui/dgus_reloaded/DGUSRxHandler.cpp | 1059 +++++++++++++++++ .../lcd/extui/dgus_reloaded/DGUSRxHandler.h | 123 ++ .../extui/dgus_reloaded/DGUSScreenHandler.cpp | 540 +++++++++ .../extui/dgus_reloaded/DGUSScreenHandler.h | 152 +++ .../extui/dgus_reloaded/DGUSSetupHandler.cpp | 209 ++++ .../extui/dgus_reloaded/DGUSSetupHandler.h | 43 + .../lcd/extui/dgus_reloaded/DGUSTxHandler.cpp | 632 ++++++++++ .../lcd/extui/dgus_reloaded/DGUSTxHandler.h | 127 ++ .../extui/dgus_reloaded/config/DGUS_Addr.h | 173 +++ .../dgus_reloaded/config/DGUS_Constants.h | 96 ++ .../extui/dgus_reloaded/config/DGUS_Control.h | 50 + .../extui/dgus_reloaded/config/DGUS_Data.h | 148 +++ .../extui/dgus_reloaded/config/DGUS_Screen.h | 52 + .../definition/DGUS_ScreenAddrList.cpp | 240 ++++ .../definition/DGUS_ScreenAddrList.h | 32 + .../definition/DGUS_ScreenSetup.cpp | 57 + .../definition/DGUS_ScreenSetup.h | 31 + .../extui/dgus_reloaded/definition/DGUS_VP.h | 40 + .../dgus_reloaded/definition/DGUS_VPList.cpp | 368 ++++++ .../dgus_reloaded/definition/DGUS_VPList.h | 26 + .../dgus_reloaded/dgus_reloaded_extui.cpp | 142 +++ ini/features.ini | 3 +- platformio.ini | 1 + 31 files changed, 4966 insertions(+), 8 deletions(-) create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index bfc39298a210..fea0d51e5f1f 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2565,10 +2565,15 @@ // - Download https://github.com/makerbase-mks/MKS-H43 // - Copy the downloaded DWIN_SET folder to the SD card. // +// RELOADED (T5UID1) +// - Download https://github.com/Desuuuu/DGUS-reloaded +// - Copy the downloaded DWIN_SET folder to the SD card. +// //#define DGUS_LCD_UI_ORIGIN //#define DGUS_LCD_UI_FYSETC //#define DGUS_LCD_UI_HIPRECY //#define DGUS_LCD_UI_MKS +//#define DGUS_LCD_UI_RELOADED #if ENABLED(DGUS_LCD_UI_MKS) #define USE_MKS_GREEN_UI #endif diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 9875422742a8..0715b1f5145c 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -479,6 +479,10 @@ // Aliases for LCD features #if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) + #define HAS_DGUS_LCD_CLASSIC 1 +#endif + +#if ANY(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED) #define HAS_DGUS_LCD 1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 01fdaa3451e2..75df13127ca1 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -2655,7 +2655,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \ + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \ + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \ - + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) \ + + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) \ + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1) \ @@ -3798,6 +3798,35 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #undef _BAD_DRIVER +/** + * Require certain features for DGUS_LCD_UI_RELOADED. + */ +#if ENABLED(DGUS_LCD_UI_RELOADED) + #if BUFSIZE < 4 + #error "DGUS_LCD_UI_RELOADED requires a BUFSIZE of at least 4." + #elif HOTENDS < 1 + #error "DGUS_LCD_UI_RELOADED requires at least 1 hotend." + #elif EXTRUDERS < 1 + #error "DGUS_LCD_UI_RELOADED requires at least 1 extruder." + #elif !HAS_HEATED_BED + #error "DGUS_LCD_UI_RELOADED requires a heated bed." + #elif FAN_COUNT < 1 + #error "DGUS_LCD_UI_RELOADED requires a fan." + #elif !HAS_BED_PROBE + #error "DGUS_LCD_UI_RELOADED requires a bed probe." + #elif !HAS_MESH + #error "DGUS_LCD_UI_RELOADED requires mesh leveling." + #elif DISABLED(LEVEL_BED_CORNERS) + #error "DGUS_LCD_UI_RELOADED requires LEVEL_BED_CORNERS." + #elif DISABLED(BABYSTEP_ALWAYS_AVAILABLE) + #error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ALWAYS_AVAILABLE." + #elif DISABLED(BABYSTEP_ZPROBE_OFFSET) + #error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ZPROBE_OFFSET." + #elif ENABLED(AUTO_BED_LEVELING_UBL) && DISABLED(UBL_SAVE_ACTIVE_ON_M500) + #warning "Without UBL_SAVE_ACTIVE_ON_M500, your mesh will not be saved when using the touchscreen." + #endif +#endif + // Misc. Cleanup #undef _TEST_PWM #undef _LINEAR_AXES_STR diff --git a/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp index c2390d63a661..535bc965912f 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if HAS_DGUS_LCD +#if HAS_DGUS_LCD_CLASSIC #if HOTENDS > 2 #warning "More than 2 hotends not implemented on DGUS Display UI." @@ -268,4 +268,4 @@ bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) { return true; } -#endif // HAS_DGUS_LCD +#endif // HAS_DGUS_LCD_CLASSIC diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index 5c108d07092a..9e44cf13318f 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if HAS_DGUS_LCD +#if HAS_DGUS_LCD_CLASSIC #include "DGUSScreenHandler.h" @@ -772,4 +772,4 @@ void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) { WriteVariable(0x84, gotoscreen, sizeof(gotoscreen)); } -#endif // HAS_DGUS_LCD +#endif // HAS_DGUS_LCD_CLASSIC diff --git a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 4b4521c47f96..4f15827a4938 100644 --- a/Marlin/src/lcd/extui/dgus/dgus_extui.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -26,7 +26,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if HAS_DGUS_LCD +#if HAS_DGUS_LCD_CLASSIC #include "../ui_api.h" #include "DGUSDisplay.h" @@ -159,4 +159,4 @@ namespace ExtUI { void onSteppersEnabled() {} } -#endif // HAS_DGUS_LCD +#endif // HAS_DGUS_LCD_CLASSIC diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp new file mode 100644 index 000000000000..e82f63bce108 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp @@ -0,0 +1,407 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/* DGUS implementation written by coldtobi in 2019 for Marlin */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSDisplay.h" + +#include "config/DGUS_Addr.h" +#include "config/DGUS_Constants.h" +#include "definition/DGUS_VPList.h" + +#include "../ui_api.h" +#include "../../../gcode/gcode.h" + +long map_precise(float x, long in_min, long in_max, long out_min, long out_max) { + return LROUND((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); +} + +uint8_t DGUSDisplay::gui_version = 0; +uint8_t DGUSDisplay::os_version = 0; + +uint8_t DGUSDisplay::volume = 255; +uint8_t DGUSDisplay::brightness = 100; + +DGUSDisplay::rx_datagram_state_t DGUSDisplay::rx_datagram_state = DGUS_IDLE; +uint8_t DGUSDisplay::rx_datagram_len = 0; + +bool DGUSDisplay::initialized = false; + +void DGUSDisplay::Loop() { + ProcessRx(); +} + +void DGUSDisplay::Init() { + LCD_SERIAL.begin(LCD_BAUDRATE); + + Read(DGUS_VERSION, 1); +} + +void DGUSDisplay::Read(uint16_t addr, uint8_t size) { + WriteHeader(addr, DGUS_READVAR, size); + + LCD_SERIAL.write(size); +} + +void DGUSDisplay::Write(uint16_t addr, const void* data_ptr, uint8_t size) { + if (!data_ptr) return; + + WriteHeader(addr, DGUS_WRITEVAR, size); + + const char* data = static_cast(data_ptr); + + while (size--) { + LCD_SERIAL.write(*data++); + } +} + +void DGUSDisplay::WriteString(uint16_t addr, const void* data_ptr, uint8_t size, bool left, bool right, bool use_space) { + if (!data_ptr) return; + + WriteHeader(addr, DGUS_WRITEVAR, size); + + const char* data = static_cast(data_ptr); + size_t len = strlen(data); + uint8_t left_spaces = 0; + uint8_t right_spaces = 0; + + if (len < size) { + if (!len) { + right_spaces = size; + } + else if ((left && right) || (!left && !right)) { + left_spaces = (size - len) / 2; + right_spaces = size - len - left_spaces; + } + else if (left) { + right_spaces = size - len; + } + else { + left_spaces = size - len; + } + } + else { + len = size; + } + + while (left_spaces--) { + LCD_SERIAL.write(' '); + } + while (len--) { + LCD_SERIAL.write(*data++); + } + while (right_spaces--) { + LCD_SERIAL.write(use_space ? ' ' : '\0'); + } +} + +void DGUSDisplay::WriteStringPGM(uint16_t addr, const void* data_ptr, uint8_t size, bool left, bool right, bool use_space) { + if (!data_ptr) return; + + WriteHeader(addr, DGUS_WRITEVAR, size); + + const char* data = static_cast(data_ptr); + size_t len = strlen_P(data); + uint8_t left_spaces = 0; + uint8_t right_spaces = 0; + + if (len < size) { + if (!len) { + right_spaces = size; + } + else if ((left && right) || (!left && !right)) { + left_spaces = (size - len) / 2; + right_spaces = size - len - left_spaces; + } + else if (left) { + right_spaces = size - len; + } + else { + left_spaces = size - len; + } + } + else { + len = size; + } + + while (left_spaces--) { + LCD_SERIAL.write(' '); + } + while (len--) { + LCD_SERIAL.write(pgm_read_byte(data++)); + } + while (right_spaces--) { + LCD_SERIAL.write(use_space ? ' ' : '\0'); + } +} + +void DGUSDisplay::SwitchScreen(DGUS_Screen screen) { + DEBUG_ECHOLNPAIR("SwitchScreen ", (uint8_t)screen); + const uint8_t command[] = { 0x5A, 0x01, 0x00, (uint8_t)screen }; + Write(0x84, command, sizeof(command)); +} + +void DGUSDisplay::PlaySound(uint8_t start, uint8_t len, uint8_t volume) { + if (volume == 0) volume = DGUSDisplay::volume; + if (volume == 0) return; + DEBUG_ECHOLNPAIR("PlaySound ", start, ":", len, "\nVolume ", volume); + const uint8_t command[] = { start, len, volume, 0x00 }; + Write(0xA0, command, sizeof(command)); +} + +void DGUSDisplay::EnableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control) { + DEBUG_ECHOLNPAIR("EnableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); + + const uint8_t command[] = { 0x5A, 0xA5, 0x00, (uint8_t)screen, (uint8_t)control, type, 0x00, 0x01 }; + Write(0xB0, command, sizeof(command)); + + FlushTx(); + delay(50); +} + +void DGUSDisplay::DisableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control) { + DEBUG_ECHOLNPAIR("DisableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); + + const uint8_t command[] = { 0x5A, 0xA5, 0x00, (uint8_t)screen, (uint8_t)control, type, 0x00, 0x00 }; + Write(0xB0, command, sizeof(command)); + + FlushTx(); + delay(50); +} + +uint8_t DGUSDisplay::GetBrightness() { + return brightness; +} + +uint8_t DGUSDisplay::GetVolume() { + return map_precise(volume, 0, 255, 0, 100); +} + +void DGUSDisplay::SetBrightness(uint8_t new_brightness) { + brightness = constrain(new_brightness, 0, 100); + new_brightness = map_precise(brightness, 0, 100, 5, 100); + DEBUG_ECHOLNPAIR("SetBrightness ", new_brightness); + const uint8_t command[] = { new_brightness, new_brightness }; + Write(0x82, command, sizeof(command)); +} + +void DGUSDisplay::SetVolume(uint8_t new_volume) { + volume = map_precise(constrain(new_volume, 0, 100), 0, 100, 0, 255); + DEBUG_ECHOLNPAIR("SetVolume ", volume); + const uint8_t command[] = { volume, 0x00 }; + Write(0xA1, command, sizeof(command)); +} + +void DGUSDisplay::ProcessRx() { + + #if ENABLED(LCD_SERIAL_STATS_RX_BUFFER_OVERRUNS) + if (!LCD_SERIAL.available() && LCD_SERIAL.buffer_overruns()) { + // Overrun, but reset the flag only when the buffer is empty + // We want to extract as many as valid datagrams possible... + DEBUG_ECHOPGM("OVFL"); + rx_datagram_state = DGUS_IDLE; + //LCD_SERIAL.reset_rx_overun(); + LCD_SERIAL.flush(); + } + #endif + + uint8_t receivedbyte; + while (LCD_SERIAL.available()) { + switch (rx_datagram_state) { + + case DGUS_IDLE: // Waiting for the first header byte + receivedbyte = LCD_SERIAL.read(); + DEBUG_ECHOPAIR("< ", receivedbyte); + if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN; + break; + + case DGUS_HEADER1_SEEN: // Waiting for the second header byte + receivedbyte = LCD_SERIAL.read(); + DEBUG_ECHOPAIR(" ", receivedbyte); + rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE; + break; + + case DGUS_HEADER2_SEEN: // Waiting for the length byte + rx_datagram_len = LCD_SERIAL.read(); + DEBUG_ECHOPAIR(" (", rx_datagram_len, ") "); + + // Telegram min len is 3 (command and one word of payload) + rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE; + break; + + case DGUS_WAIT_TELEGRAM: // wait for complete datagram to arrive. + if (LCD_SERIAL.available() < rx_datagram_len) return; + + initialized = true; // We've talked to it, so we defined it as initialized. + uint8_t command = LCD_SERIAL.read(); + + DEBUG_ECHOPAIR("# ", command); + + uint8_t readlen = rx_datagram_len - 1; // command is part of len. + unsigned char tmp[rx_datagram_len - 1]; + unsigned char *ptmp = tmp; + + while (readlen--) { + receivedbyte = LCD_SERIAL.read(); + DEBUG_ECHOPAIR(" ", receivedbyte); + *ptmp++ = receivedbyte; + } + DEBUG_ECHOPGM(" # "); + // mostly we'll get this: 5A A5 03 82 4F 4B -- ACK on 0x82, so discard it. + if (command == DGUS_WRITEVAR && 'O' == tmp[0] && 'K' == tmp[1]) { + DEBUG_ECHOLNPGM(">"); + rx_datagram_state = DGUS_IDLE; + break; + } + + /* AutoUpload, (and answer to) Command 0x83 : + | tmp[0 1 2 3 4 ... ] + | Example 5A A5 06 83 20 01 01 78 01 …… + | / / | | \ / | \ \ + | Header | | | | \_____\_ DATA (Words!) + | DatagramLen / VPAdr | + | Command DataLen (in Words) */ + if (command == DGUS_READVAR) { + const uint16_t addr = tmp[0] << 8 | tmp[1]; + const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words) + DEBUG_ECHOPAIR("addr=", addr, " dlen=", dlen, "> "); + + if (addr == DGUS_VERSION && dlen == 2) { + DEBUG_ECHOLNPGM("VERSIONS"); + gui_version = tmp[3]; + os_version = tmp[4]; + rx_datagram_state = DGUS_IDLE; + break; + } + + DGUS_VP vp; + if (!DGUS_PopulateVP((DGUS_Addr)addr, &vp)) { + DEBUG_ECHOLNPGM("VP not found"); + rx_datagram_state = DGUS_IDLE; + break; + } + + if (!vp.rx_handler) { + DEBUG_ECHOLNPGM("VP found, no handler."); + rx_datagram_state = DGUS_IDLE; + break; + } + + gcode.reset_stepper_timeout(); + + if (!vp.size) { + DEBUG_ECHOLN(); + vp.rx_handler(vp, nullptr); + + rx_datagram_state = DGUS_IDLE; + break; + } + + if (vp.flags & VPFLAG_RXSTRING) { + unsigned char buffer[vp.size]; + memset(buffer, 0, vp.size); + + for (uint8_t i = 0; i < dlen; i++) { + if (i >= vp.size) { + break; + } + + if (i + 1 < dlen && tmp[i + 3] == 0xFF && tmp[i + 4] == 0xFF) { + break; + } + + buffer[i] = tmp[i + 3]; + } + + DEBUG_ECHOLN(); + vp.rx_handler(vp, buffer); + + rx_datagram_state = DGUS_IDLE; + break; + } + + if (dlen != vp.size) { + DEBUG_ECHOLNPGM("VP found, size mismatch."); + rx_datagram_state = DGUS_IDLE; + break; + } + + DEBUG_ECHOLN(); + vp.rx_handler(vp, &tmp[3]); + + rx_datagram_state = DGUS_IDLE; + break; + } + + DEBUG_ECHOLNPGM(">"); + rx_datagram_state = DGUS_IDLE; + break; + } + } +} + +size_t DGUSDisplay::GetFreeTxBuffer() { + #ifdef LCD_SERIAL_GET_TX_BUFFER_FREE + return LCD_SERIAL_GET_TX_BUFFER_FREE(); + #else + return SIZE_MAX; + #endif +} + +void DGUSDisplay::FlushTx() { + #ifdef ARDUINO_ARCH_STM32 + LCD_SERIAL.flush(); + #else + LCD_SERIAL.flushTX(); + #endif +} + +void DGUSDisplay::WriteHeader(uint16_t addr, uint8_t command, uint8_t len) { + LCD_SERIAL.write(DGUS_HEADER1); + LCD_SERIAL.write(DGUS_HEADER2); + LCD_SERIAL.write(len + 3); + LCD_SERIAL.write(command); + LCD_SERIAL.write(addr >> 8); + LCD_SERIAL.write(addr & 0xFF); +} + +bool DGUS_PopulateVP(const DGUS_Addr addr, DGUS_VP * const buffer) { + const DGUS_VP *ret = vp_list; + + do { + const uint16_t *paddr = (uint16_t *)(&ret->addr); + const uint16_t addrcheck = pgm_read_word(paddr); + if (addrcheck == 0) break; + if ((DGUS_Addr)addrcheck == addr) { + memcpy_P(buffer, ret, sizeof(*ret)); + return true; + } + } while (++ret); + DEBUG_ECHOLNPAIR("VP not found: ", (uint16_t)addr); + return false; +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h new file mode 100644 index 000000000000..2a679648d11e --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h @@ -0,0 +1,171 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/* DGUS implementation written by coldtobi in 2019 for Marlin */ + +#include "config/DGUS_Screen.h" +#include "config/DGUS_Control.h" +#include "definition/DGUS_VP.h" + +#include "../../../inc/MarlinConfigPre.h" +#include "../../../MarlinCore.h" + +#define DEBUG_OUT ENABLED(DEBUG_DGUSLCD) +#include "../../../core/debug_out.h" + +#define Swap16(val) ((uint16_t)(((uint16_t)(val) >> 8) |\ + ((uint16_t)(val) << 8))) + +// Low-Level access to the display. +class DGUSDisplay { +public: + + enum DGUS_ControlType : uint8_t { + VARIABLE_DATA_INPUT = 0x00, + POPUP_WINDOW = 0x01, + INCREMENTAL_ADJUST = 0x02, + SLIDER_ADJUST = 0x03, + RTC_SETTINGS = 0x04, + RETURN_KEY_CODE = 0x05, + TEXT_INPUT = 0x06, + FIRMWARE_SETTINGS = 0x07 + }; + + DGUSDisplay() = default; + + static void Init(); + + static void Read(uint16_t addr, uint8_t size); + static void Write(uint16_t addr, const void* data_ptr, uint8_t size); + + static void WriteString(uint16_t addr, const void* data_ptr, uint8_t size, bool left = true, bool right = false, bool use_space = true); + static void WriteStringPGM(uint16_t addr, const void* data_ptr, uint8_t size, bool left = true, bool right = false, bool use_space = true); + + template + static void Write(uint16_t addr, T data) { + Write(addr, static_cast(&data), sizeof(T)); + } + + // Until now I did not need to actively read from the display. That's why there is no ReadVariable + // (I extensively use the auto upload of the display) + + // Force display into another screen. + static void SwitchScreen(DGUS_Screen screen); + // Play sounds using the display speaker. + // start: position at which the sound was stored on the display. + // len: how many sounds to play. Sounds will play consecutively from start to start+len-1. + // volume: playback volume. 0 keeps the current volume. + static void PlaySound(uint8_t start, uint8_t len = 1, uint8_t volume = 0); + // Enable/disable a specific touch control. + // type: control type. + // control: index of the control on the page (set during screen development). + static void EnableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control); + static void DisableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control); + + static uint8_t GetBrightness(); + static uint8_t GetVolume(); + + // Set the display brightness/volume, ranging 0 - 100 + static void SetBrightness(uint8_t brightness); + static void SetVolume(uint8_t volume); + + // Periodic tasks, eg. Rx-Queue handling. + static void Loop(); + + // Helper for users of this class to estimate if an interaction would be blocking. + static size_t GetFreeTxBuffer(); + static void FlushTx(); + + // Checks two things: Can we confirm the presence of the display and has we initiliazed it. + // (both boils down that the display answered to our chatting) + static inline bool IsInitialized() { + return initialized; + } + + static uint8_t gui_version; + static uint8_t os_version; + + template + static T SwapBytes(const T value) { + union { + T val; + char byte[sizeof(T)]; + } src, dst; + + src.val = value; + LOOP_L_N(i, sizeof(T)) dst.byte[i] = src.byte[sizeof(T) - i - 1]; + return dst.val; + } + + template + T_out FromFixedPoint(const T_in value) { + return (T_out)((float)value / POW(10, decimals)); + } + + template + T_out ToFixedPoint(const T_in value) { + return (T_out)LROUND((float)value * POW(10, decimals)); + } + +private: + enum dgus_header : uint8_t { + DGUS_HEADER1 = 0x5A, + DGUS_HEADER2 = 0xA5 + }; + + enum dgus_command : uint8_t { + DGUS_WRITEVAR = 0x82, + DGUS_READVAR = 0x83 + }; + + enum rx_datagram_state_t : uint8_t { + DGUS_IDLE, //< waiting for DGUS_HEADER1. + DGUS_HEADER1_SEEN, //< DGUS_HEADER1 received + DGUS_HEADER2_SEEN, //< DGUS_HEADER2 received + DGUS_WAIT_TELEGRAM, //< LEN received, Waiting for to receive all bytes. + }; + + enum dgus_system_addr : uint16_t { + DGUS_VERSION = 0x000f // OS/GUI version + }; + + static void WriteHeader(uint16_t addr, uint8_t command, uint8_t len); + static void ProcessRx(); + + static uint8_t volume; + static uint8_t brightness; + + static rx_datagram_state_t rx_datagram_state; + static uint8_t rx_datagram_len; + + static bool initialized; +}; + +template<> inline uint16_t DGUSDisplay::SwapBytes(const uint16_t value) { + return ((value << 8) | (value >> 8)); +} + +extern DGUSDisplay dgus_display; + +/// Helper to populate a DGUS_VP for a given VP. Return false if not found. +extern bool DGUS_PopulateVP(const DGUS_Addr addr, DGUS_VP * const buffer); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp new file mode 100644 index 000000000000..5f36dac7f616 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp @@ -0,0 +1,1059 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSRxHandler.h" + +#include "DGUSScreenHandler.h" +#include "config/DGUS_Screen.h" + +#include "../ui_api.h" +#include "../../../core/language.h" +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" +#include "../../../gcode/queue.h" +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "../../../feature/pause.h" +#endif +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { + const DGUS_Screen screen = (DGUS_Screen)((uint8_t*)data_ptr)[1]; + + if (vp.addr == DGUS_Addr::SCREENCHANGE_SD) { + #if ENABLED(SDSUPPORT) + #if !PIN_EXISTS(SD_DETECT) + card.mount(); + #endif + + if (!ExtUI::isMediaInserted()) { + dgus_screen_handler.SetStatusMessagePGM(GET_TEXT(MSG_NO_MEDIA)); + return; + } + + card.cdroot(); + #else + dgus_screen_handler.SetStatusMessagePGM(GET_TEXT(MSG_NO_MEDIA)); + return; + #endif + } + + if (vp.addr == DGUS_Addr::SCREENCHANGE_Idle + && (printingIsActive() || printingIsPaused())) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while printing")); + return; + } + + if (vp.addr == DGUS_Addr::SCREENCHANGE_Printing + && (!printingIsActive() && !printingIsPaused())) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while idle")); + return; + } + + dgus_screen_handler.TriggerScreenChange(screen); +} + +#if ENABLED(SDSUPPORT) + void DGUSRxHandler::Scroll(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Scroll scroll = (DGUS_Data::Scroll)((uint8_t*)data_ptr)[1]; + + switch (scroll) { + case DGUS_Data::Scroll::GO_BACK: + if (dgus_screen_handler.filelist.isAtRootDir()) { + return; + } + + dgus_screen_handler.filelist_offset = 0; + dgus_screen_handler.filelist_selected = -1; + dgus_screen_handler.filelist.upDir(); + break; + case DGUS_Data::Scroll::UP: + if (dgus_screen_handler.filelist_offset < 1) { + return; + } + + --dgus_screen_handler.filelist_offset; + break; + case DGUS_Data::Scroll::DOWN: + if (dgus_screen_handler.filelist_offset + 1 + DGUS_FILE_COUNT > dgus_screen_handler.filelist.count()) { + return; + } + + ++dgus_screen_handler.filelist_offset; + break; + } + + dgus_screen_handler.TriggerFullUpdate(); + } + + void DGUSRxHandler::SelectFile(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const uint8_t index = ((uint8_t*)data_ptr)[1]; + + if (!dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_offset + index)) { + return; + } + + if (dgus_screen_handler.filelist.isDir()) { + dgus_screen_handler.filelist_offset = 0; + dgus_screen_handler.filelist_selected = -1; + dgus_screen_handler.filelist.changeDir(dgus_screen_handler.filelist.filename()); + } + else { + dgus_screen_handler.filelist_selected = dgus_screen_handler.filelist_offset + index; + } + + dgus_screen_handler.TriggerFullUpdate(); + } + + void DGUSRxHandler::PrintFile(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (dgus_screen_handler.filelist_selected < 0) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("No file selected")); + return; + } + + if (!dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_selected) + || dgus_screen_handler.filelist.isDir()) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::printFile(dgus_screen_handler.filelist.shortFilename()); + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_STATUS); + } +#endif // SDSUPPORT + +void DGUSRxHandler::PrintAbort(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!printingIsActive() && !printingIsPaused()) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + ExtUI::stopPrint(); +} + +void DGUSRxHandler::PrintPause(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!printingIsActive()) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + ExtUI::pausePrint(); +} + +void DGUSRxHandler::PrintResume(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!printingIsPaused()) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::resumePrint(); +} + +void DGUSRxHandler::Feedrate(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const int16_t feedrate = Swap16(*(int16_t*)data_ptr); + + ExtUI::setFeedrate_percent(feedrate); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::Flowrate(DGUS_VP &vp, void *data_ptr) { + const int16_t flowrate = Swap16(*(int16_t*)data_ptr); + + switch (vp.addr) { + default: return; + case DGUS_Addr::ADJUST_SetFlowrate_CUR: + #if EXTRUDERS > 1 + ExtUI::setFlow_percent(flowrate, ExtUI::getActiveTool()); + #else + ExtUI::setFlow_percent(flowrate, ExtUI::E0); + #endif + break; + #if EXTRUDERS > 1 + case DGUS_Addr::ADJUST_SetFlowrate_E0: + ExtUI::setFlow_percent(flowrate, ExtUI::E0); + break; + case DGUS_Addr::ADJUST_SetFlowrate_E1: + ExtUI::setFlow_percent(flowrate, ExtUI::E1); + break; + #endif + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::BabystepSet(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const int16_t data = Swap16(*(int16_t*)data_ptr); + const float offset = dgus_display.FromFixedPoint(data); + + const int16_t steps = ExtUI::mmToWholeSteps(offset - ExtUI::getZOffset_mm(), ExtUI::Z); + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::Babystep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Adjust adjust = (DGUS_Data::Adjust)((uint8_t*)data_ptr)[1]; + int16_t steps; + + switch (adjust) { + default: return; + case DGUS_Data::Adjust::INCREMENT: + steps = ExtUI::mmToWholeSteps(DGUS_PRINT_BABYSTEP, ExtUI::Z); + break; + case DGUS_Data::Adjust::DECREMENT: + steps = ExtUI::mmToWholeSteps(-DGUS_PRINT_BABYSTEP, ExtUI::Z); + break; + } + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::TempPreset(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::TempPreset preset = (DGUS_Data::TempPreset)((uint8_t*)data_ptr)[1]; + + switch (preset) { + case DGUS_Data::TempPreset::PLA: + #if HOTENDS < 2 + ExtUI::setTargetTemp_celsius(DGUS_PLA_TEMP_HOTEND, ExtUI::H0); + #else + ExtUI::setTargetTemp_celsius(DGUS_PLA_TEMP_HOTEND, ExtUI::getActiveTool()); + #endif + ExtUI::setTargetTemp_celsius(DGUS_PLA_TEMP_BED, ExtUI::BED); + break; + case DGUS_Data::TempPreset::ABS: + #if HOTENDS < 2 + ExtUI::setTargetTemp_celsius(DGUS_ABS_TEMP_HOTEND, ExtUI::H0); + #else + ExtUI::setTargetTemp_celsius(DGUS_ABS_TEMP_HOTEND, ExtUI::getActiveTool()); + #endif + ExtUI::setTargetTemp_celsius(DGUS_ABS_TEMP_BED, ExtUI::BED); + break; + case DGUS_Data::TempPreset::PETG: + #if HOTENDS < 2 + ExtUI::setTargetTemp_celsius(DGUS_PETG_TEMP_HOTEND, ExtUI::H0); + #else + ExtUI::setTargetTemp_celsius(DGUS_PETG_TEMP_HOTEND, ExtUI::getActiveTool()); + #endif + ExtUI::setTargetTemp_celsius(DGUS_PETG_TEMP_BED, ExtUI::BED); + break; + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::TempTarget(DGUS_VP &vp, void *data_ptr) { + const int16_t temp = Swap16(*(int16_t*)data_ptr); + + switch (vp.addr) { + default: return; + case DGUS_Addr::TEMP_SetTarget_Bed: + ExtUI::setTargetTemp_celsius(temp, ExtUI::BED); + break; + case DGUS_Addr::TEMP_SetTarget_H0: + ExtUI::setTargetTemp_celsius(temp, ExtUI::H0); + break; + #if HOTENDS > 1 + case DGUS_Addr::TEMP_SetTarget_H1: + ExtUI::setTargetTemp_celsius(temp, ExtUI::H1); + break; + #endif + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::TempCool(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Heater heater = (DGUS_Data::Heater)Swap16(*(uint16_t*)data_ptr); + + switch (heater) { + default: return; + case DGUS_Data::Heater::ALL: + ExtUI::setTargetTemp_celsius(0, ExtUI::BED); + ExtUI::setTargetTemp_celsius(0, ExtUI::H0); + #if HOTENDS > 1 + ExtUI::setTargetTemp_celsius(0, ExtUI::H1); + #endif + break; + case DGUS_Data::Heater::BED: + ExtUI::setTargetTemp_celsius(0, ExtUI::BED); + break; + case DGUS_Data::Heater::H0: + ExtUI::setTargetTemp_celsius(0, ExtUI::H0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + ExtUI::setTargetTemp_celsius(0, ExtUI::H1); + break; + #endif + } + + dgus_screen_handler.SetStatusMessagePGM(PSTR("Cooling...")); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::Steppers(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Control control = (DGUS_Data::Control)((uint8_t*)data_ptr)[1]; + + switch (control) { + case DGUS_Data::Control::ENABLE: + enable_all_steppers(); + break; + case DGUS_Data::Control::DISABLE: + disable_all_steppers(); + break; + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::ZOffset(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + const int16_t data = Swap16(*(int16_t*)data_ptr); + const float offset = dgus_display.FromFixedPoint(data); + + const int16_t steps = ExtUI::mmToWholeSteps(offset - ExtUI::getZOffset_mm(), ExtUI::Z); + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::ZOffsetStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + const DGUS_Data::Adjust adjust = (DGUS_Data::Adjust)((uint8_t*)data_ptr)[1]; + int16_t steps; + + switch (dgus_screen_handler.offset_steps) { + default: return; + case DGUS_Data::StepSize::MMP1: + steps = ExtUI::mmToWholeSteps((adjust == DGUS_Data::Adjust::INCREMENT ? 0.1f : -0.1f), ExtUI::Z); + break; + case DGUS_Data::StepSize::MMP01: + steps = ExtUI::mmToWholeSteps((adjust == DGUS_Data::Adjust::INCREMENT ? 0.01f : -0.01f), ExtUI::Z); + break; + } + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::ZOffsetSetStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::StepSize size = (DGUS_Data::StepSize)((uint8_t*)data_ptr)[1]; + + dgus_screen_handler.offset_steps = size; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::MoveToPoint(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!ExtUI::isPositionKnown()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + const uint8_t point = ((uint8_t*)data_ptr)[1]; + constexpr float lfrb[4] = LEVEL_CORNERS_INSET_LFRB; + float x, y; + + switch (point) { + default: return; + case 1: + x = DGUS_LEVEL_CENTER_X; + y = DGUS_LEVEL_CENTER_Y; + break; + case 2: + x = X_MIN_POS + lfrb[0]; + y = Y_MIN_POS + lfrb[1]; + break; + case 3: + x = X_MAX_POS - lfrb[2]; + y = Y_MIN_POS + lfrb[1]; + break; + case 4: + x = X_MAX_POS - lfrb[2]; + y = Y_MAX_POS - lfrb[3]; + break; + case 5: + x = X_MIN_POS + lfrb[0]; + y = Y_MAX_POS - lfrb[3]; + break; + } + + if (ExtUI::getAxisPosition_mm(ExtUI::Z) < Z_MIN_POS + LEVEL_CORNERS_Z_HOP) { + ExtUI::setAxisPosition_mm(Z_MIN_POS + LEVEL_CORNERS_Z_HOP, ExtUI::Z); + } + ExtUI::setAxisPosition_mm(x, ExtUI::X); + ExtUI::setAxisPosition_mm(y, ExtUI::Y); + ExtUI::setAxisPosition_mm(Z_MIN_POS + LEVEL_CORNERS_HEIGHT, ExtUI::Z); +} + +void DGUSRxHandler::Probe(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + #if ENABLED(MESH_BED_LEVELING) + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_ABL_REQUIRED); + return; + #endif + + if (!ExtUI::isPositionKnown()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::LEVELING_PROBING); + + #if ENABLED(AUTO_BED_LEVELING_UBL) + queue.enqueue_now_P(PSTR("G29P1\nG29P3\nG29P5C")); + #else + queue.enqueue_now_P(PSTR("G29")); + #endif + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); +} + +void DGUSRxHandler::DisableABL(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::setLevelingActive(false); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FilamentSelect(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Extruder extruder = (DGUS_Data::Extruder)Swap16(*(uint16_t*)data_ptr); + + switch (extruder) { + default: return; + case DGUS_Data::Extruder::CURRENT: + case DGUS_Data::Extruder::E0: + #if EXTRUDERS > 1 + case DGUS_Data::Extruder::E1: + #endif + dgus_screen_handler.filament_extruder = extruder; + break; + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FilamentLength(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const uint16_t length = Swap16(*(uint16_t*)data_ptr); + + dgus_screen_handler.filament_length = constrain(length, 0, EXTRUDE_MAXLENGTH); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FilamentMove(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::extruder_t extruder; + + switch (dgus_screen_handler.filament_extruder) { + default: return; + case DGUS_Data::Extruder::CURRENT: + #if EXTRUDERS > 1 + extruder = ExtUI::getActiveTool(); + break; + #endif + case DGUS_Data::Extruder::E0: + extruder = ExtUI::E0; + break; + #if EXTRUDERS > 1 + case DGUS_Data::Extruder::E1: + extruder = ExtUI::E1; + break; + #endif + } + + if (ExtUI::getActualTemp_celsius(extruder) < (float)EXTRUDE_MINTEMP) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Temperature too low")); + return; + } + + const DGUS_Data::FilamentMove move = (DGUS_Data::FilamentMove)((uint8_t*)data_ptr)[1]; + + switch (move) { + case DGUS_Data::FilamentMove::RETRACT: + UI_DECREMENT_BY(AxisPosition_mm, (float)dgus_screen_handler.filament_length, extruder); + break; + case DGUS_Data::FilamentMove::EXTRUDE: + UI_INCREMENT_BY(AxisPosition_mm, (float)dgus_screen_handler.filament_length, extruder); + break; + } +} + +void DGUSRxHandler::Home(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + DGUS_Data::Axis axis = (DGUS_Data::Axis)((uint8_t*)data_ptr)[1]; + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(dgus_screen_handler.GetCurrentScreen()); + + switch (axis) { + case DGUS_Data::Axis::X_Y_Z: + queue.enqueue_now_P(PSTR("G28XYZ")); + break; + case DGUS_Data::Axis::X_Y: + queue.enqueue_now_P(PSTR("G28XY")); + break; + case DGUS_Data::Axis::Z: + queue.enqueue_now_P(PSTR("G28Z")); + break; + } +} + +void DGUSRxHandler::Move(DGUS_VP &vp, void *data_ptr) { + const int16_t data = Swap16(*(int16_t*)data_ptr); + const float position = dgus_display.FromFixedPoint(data); + ExtUI::axis_t axis; + + switch (vp.addr) { + default: return; + case DGUS_Addr::MOVE_SetX: + axis = ExtUI::X; + break; + case DGUS_Addr::MOVE_SetY: + axis = ExtUI::Y; + break; + case DGUS_Addr::MOVE_SetZ: + axis = ExtUI::Z; + break; + } + + if (!ExtUI::isAxisPositionKnown(axis)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + ExtUI::setAxisPosition_mm(position, axis); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::MoveStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + float offset; + + switch (dgus_screen_handler.move_steps) { + default: return; + case DGUS_Data::StepSize::MM10: + offset = 10.0f; + break; + case DGUS_Data::StepSize::MM1: + offset = 1.0f; + break; + case DGUS_Data::StepSize::MMP1: + offset = 0.1f; + break; + } + + const DGUS_Data::MoveDirection direction = (DGUS_Data::MoveDirection)((uint8_t*)data_ptr)[1]; + ExtUI::axis_t axis; + + switch (direction) { + default: return; + case DGUS_Data::MoveDirection::XP: + axis = ExtUI::X; + break; + case DGUS_Data::MoveDirection::XM: + axis = ExtUI::X; + offset = -offset; + break; + case DGUS_Data::MoveDirection::YP: + axis = ExtUI::Y; + break; + case DGUS_Data::MoveDirection::YM: + axis = ExtUI::Y; + offset = -offset; + break; + case DGUS_Data::MoveDirection::ZP: + axis = ExtUI::Z; + break; + case DGUS_Data::MoveDirection::ZM: + axis = ExtUI::Z; + offset = -offset; + break; + } + + if (!ExtUI::isAxisPositionKnown(axis)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + UI_INCREMENT_BY(AxisPosition_mm, offset, axis); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::MoveSetStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::StepSize size = (DGUS_Data::StepSize)((uint8_t*)data_ptr)[1]; + + dgus_screen_handler.move_steps = size; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::GcodeClear(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + ZERO(dgus_screen_handler.gcode); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::GcodeExecute(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (!strlen(dgus_screen_handler.gcode)) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(PSTR("Executing command..."), 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::GCODE); + + queue.enqueue_one_now(dgus_screen_handler.gcode); +} + +void DGUSRxHandler::ResetEEPROM(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + queue.enqueue_now_P(PSTR("M502")); + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); +} + +void DGUSRxHandler::SettingsExtra(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Extra extra = (DGUS_Data::Extra)((uint8_t*)data_ptr)[1]; + + switch (extra) { + default: return; + case DGUS_Data::Extra::BUTTON1: + #if ENABLED(BLTOUCH) + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + queue.enqueue_now_P(PSTR(DGUS_RESET_BLTOUCH)); + #else + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::INFOS); + #endif + break; + #if ENABLED(BLTOUCH) + case DGUS_Data::Extra::BUTTON2: + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::INFOS); + break; + #endif + } +} + +void DGUSRxHandler::PIDSelect(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Heater heater = (DGUS_Data::Heater)Swap16(*(uint16_t*)data_ptr); + + switch (heater) { + default: return; + case DGUS_Data::Heater::BED: + dgus_screen_handler.pid_temp = DGUS_PLA_TEMP_BED; + dgus_screen_handler.pid_heater = heater; + break; + case DGUS_Data::Heater::H0: + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + #endif + dgus_screen_handler.pid_temp = DGUS_PLA_TEMP_HOTEND; + dgus_screen_handler.pid_heater = heater; + break; + } + + dgus_screen_handler.pid_cycles = 5; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::PIDSetTemp(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + uint16_t temp = Swap16(*(uint16_t*)data_ptr); + + switch (dgus_screen_handler.pid_heater) { + default: return; + case DGUS_Data::Heater::BED: + temp = constrain(temp, BED_MINTEMP, BED_MAX_TARGET); + break; + case DGUS_Data::Heater::H0: + temp = constrain(temp, HEATER_0_MINTEMP, (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT)); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + temp = constrain(temp, HEATER_1_MINTEMP, (HEATER_1_MAXTEMP - HOTEND_OVERSHOOT)); + break; + #endif + } + + dgus_screen_handler.pid_temp = temp; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + heater_id_t heater; + uint8_t cycles = constrain(dgus_screen_handler.pid_cycles, 3, 10); + + switch (dgus_screen_handler.pid_heater) { + default: return; + case DGUS_Data::Heater::BED: + #if ENABLED(PIDTEMPBED) + heater = H_BED; + break; + #else + dgus_screen_handler.SetStatusMessagePGM(PSTR("Bed PID disabled")); + return; + #endif + case DGUS_Data::Heater::H0: + #if ENABLED(PIDTEMP) + heater = H_E0; + break; + #else + dgus_screen_handler.SetStatusMessagePGM(PSTR("PID disabled")); + return; + #endif + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + #if ENABLED(PIDTEMP) + heater = H_E1; + break; + #else + dgus_screen_handler.SetStatusMessagePGM(PSTR("PID disabled")); + return; + #endif + #endif + } + + char buffer[24]; + snprintf_P(buffer, sizeof(buffer), PSTR("M303C%dE%dS%dU1"), cycles, heater, dgus_screen_handler.pid_temp); + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(PSTR("PID autotuning..."), 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::PID); + + queue.enqueue_one_now(buffer); + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); +} + +#if ENABLED(POWER_LOSS_RECOVERY) + void DGUSRxHandler::PowerLossAbort(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::HOME); + + queue.enqueue_now_P(PSTR("M1000C")); + } + + void DGUSRxHandler::PowerLossResume(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + if (!recovery.valid()) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Invalid recovery data")); + return; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_STATUS); + + queue.enqueue_now_P(PSTR("M1000")); + } +#endif // POWER_LOSS_RECOVERY + +void DGUSRxHandler::WaitAbort(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!printingIsPaused() + #if ENABLED(ADVANCED_PAUSE_FEATURE) + || !did_pause_print + #endif + ) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + did_pause_print = 0; + #endif + + ExtUI::setUserConfirmed(); + ExtUI::stopPrint(); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::WaitContinue(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + ExtUI::setUserConfirmed(); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FanSpeed(DGUS_VP &vp, void *data_ptr) { + uint8_t speed = ((uint8_t*)data_ptr)[1]; + switch (vp.addr) { + default: return; + case DGUS_Addr::FAN0_Speed: + ExtUI::setTargetFan_percent(speed, ExtUI::FAN0); + break; + } +} + +void DGUSRxHandler::Volume(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + uint8_t volume = ((uint8_t*)data_ptr)[1]; + dgus_display.SetVolume(volume); + + dgus_screen_handler.TriggerEEPROMSave(); +} + +void DGUSRxHandler::Brightness(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + uint8_t brightness = ((uint8_t*)data_ptr)[1]; + dgus_display.SetBrightness(brightness); + + dgus_screen_handler.TriggerEEPROMSave(); +} + +void DGUSRxHandler::Debug(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + ++dgus_screen_handler.debug_count; + + if (dgus_screen_handler.debug_count >= 10) { + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::DEBUG); + } +} + +void DGUSRxHandler::StringToExtra(DGUS_VP &vp, void *data_ptr) { + if (!vp.size || !vp.extra) return; + memcpy(vp.extra, data_ptr, vp.size); +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h new file mode 100644 index 000000000000..d092d3a5b74f --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h @@ -0,0 +1,123 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include "DGUSDisplay.h" +#include "definition/DGUS_VP.h" + +namespace DGUSRxHandler { + + void ScreenChange(DGUS_VP &, void *); + + #if ENABLED(SDSUPPORT) + void Scroll(DGUS_VP &, void *); + void SelectFile(DGUS_VP &, void *); + void PrintFile(DGUS_VP &, void *); + #endif + + void PrintAbort(DGUS_VP &, void *); + void PrintPause(DGUS_VP &, void *); + void PrintResume(DGUS_VP &, void *); + + void Feedrate(DGUS_VP &, void *); + void Flowrate(DGUS_VP &, void *); + void BabystepSet(DGUS_VP &, void *); + void Babystep(DGUS_VP &, void *); + + void TempPreset(DGUS_VP &, void *); + void TempTarget(DGUS_VP &, void *); + void TempCool(DGUS_VP &, void *); + + void Steppers(DGUS_VP &, void *); + + void ZOffset(DGUS_VP &, void *); + void ZOffsetStep(DGUS_VP &, void *); + void ZOffsetSetStep(DGUS_VP &, void *); + + void MoveToPoint(DGUS_VP &, void *); + + void Probe(DGUS_VP &, void *); + void DisableABL(DGUS_VP &, void *); + + void FilamentSelect(DGUS_VP &, void *); + void FilamentLength(DGUS_VP &, void *); + void FilamentMove(DGUS_VP &, void *); + + void Home(DGUS_VP &, void *); + void Move(DGUS_VP &, void *); + void MoveStep(DGUS_VP &, void *); + void MoveSetStep(DGUS_VP &, void *); + + void GcodeClear(DGUS_VP &, void *); + void GcodeExecute(DGUS_VP &, void *); + + void ResetEEPROM(DGUS_VP &, void *); + + void SettingsExtra(DGUS_VP &, void *); + + void PIDSelect(DGUS_VP &, void *); + void PIDSetTemp(DGUS_VP &, void *); + void PIDRun(DGUS_VP &, void *); + + #if ENABLED(POWER_LOSS_RECOVERY) + void PowerLossAbort(DGUS_VP &, void *); + void PowerLossResume(DGUS_VP &, void *); + #endif + + void WaitAbort(DGUS_VP &, void *); + void WaitContinue(DGUS_VP &, void *); + + void FanSpeed(DGUS_VP &, void *); + + void Volume(DGUS_VP &, void *); + + void Brightness(DGUS_VP &, void *); + + void Debug(DGUS_VP &, void *); + + void StringToExtra(DGUS_VP &, void *); + + template + void IntegerToExtra(DGUS_VP &vp, void *data_ptr) { + if (!vp.size || !vp.extra) return; + switch (vp.size) { + default: return; + case 1: { + const uint8_t data = *(uint8_t*)data_ptr; + *(T*)vp.extra = (T)data; + break; + } + case 2: { + const uint16_t data = Swap16(*(uint16_t*)data_ptr); + *(T*)vp.extra = (T)data; + break; + } + case 4: { + const uint32_t data = dgus_display.SwapBytes(*(uint32_t*)data_ptr); + *(T*)vp.extra = (T)data; + break; + } + } + } + +} diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp new file mode 100644 index 000000000000..6316f1194b7e --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -0,0 +1,540 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSScreenHandler.h" + +#include "DGUSDisplay.h" +#include "definition/DGUS_ScreenAddrList.h" +#include "definition/DGUS_ScreenSetup.h" + +#include "../../../gcode/queue.h" + +uint8_t DGUSScreenHandler::debug_count = 0; + +#if ENABLED(SDSUPPORT) + ExtUI::FileList DGUSScreenHandler::filelist; + uint16_t DGUSScreenHandler::filelist_offset = 0; + int16_t DGUSScreenHandler::filelist_selected = -1; +#endif + +DGUS_Data::StepSize DGUSScreenHandler::offset_steps = DGUS_Data::StepSize::MMP1; +DGUS_Data::StepSize DGUSScreenHandler::move_steps = DGUS_Data::StepSize::MM10; + +uint16_t DGUSScreenHandler::probing_icons[] = { 0, 0 }; + +DGUS_Data::Extruder DGUSScreenHandler::filament_extruder = DGUS_Data::Extruder::CURRENT; +uint16_t DGUSScreenHandler::filament_length = DGUS_DEFAULT_FILAMENT_LEN; + +char DGUSScreenHandler::gcode[] = ""; + +DGUS_Data::Heater DGUSScreenHandler::pid_heater = DGUS_Data::Heater::H0; +uint16_t DGUSScreenHandler::pid_temp = DGUS_PLA_TEMP_HOTEND; +uint8_t DGUSScreenHandler::pid_cycles = 5; + +bool DGUSScreenHandler::settings_ready = false; +bool DGUSScreenHandler::booted = false; + +DGUS_Screen DGUSScreenHandler::current_screen = DGUS_Screen::BOOT; +DGUS_Screen DGUSScreenHandler::new_screen = DGUS_Screen::BOOT; +bool DGUSScreenHandler::full_update = false; + +DGUS_Screen DGUSScreenHandler::wait_return_screen = DGUS_Screen::HOME; +bool DGUSScreenHandler::wait_continue = false; + +bool DGUSScreenHandler::leveling_active = false; + +millis_t DGUSScreenHandler::status_expire = 0; +millis_t DGUSScreenHandler::eeprom_save = 0; + +const char DGUS_MSG_HOMING_REQUIRED[] PROGMEM = "Homing required", + DGUS_MSG_BUSY[] PROGMEM = "Busy", + DGUS_MSG_UNDEF[] PROGMEM = "-", + DGUS_MSG_HOMING[] PROGMEM = "Homing...", + DGUS_MSG_FW_OUTDATED[] PROGMEM = "DWIN GUI/OS update required", + DGUS_MSG_ABL_REQUIRED[] PROGMEM = "Auto bed leveling required"; + +const char DGUS_CMD_HOME[] PROGMEM = "G28", + DGUS_CMD_EEPROM_SAVE[] PROGMEM = "M500"; + +void DGUSScreenHandler::Init() { + dgus_display.Init(); + + MoveToScreen(DGUS_Screen::BOOT, true); +} + +void DGUSScreenHandler::Ready() { + dgus_display.PlaySound(1); +} + +void DGUSScreenHandler::Loop() { + if (!settings_ready || current_screen == DGUS_Screen::KILL) { + return; + } + + const millis_t ms = ExtUI::safe_millis(); + static millis_t next_event_ms = 0; + + if (new_screen != DGUS_Screen::BOOT) { + const DGUS_Screen screen = new_screen; + new_screen = DGUS_Screen::BOOT; + + if (current_screen == screen) { + TriggerFullUpdate(); + } + else { + MoveToScreen(screen); + } + return; + } + + if (!booted && ELAPSED(ms, 3000)) { + booted = true; + + if (current_screen == DGUS_Screen::BOOT) { + MoveToScreen(DGUS_Screen::HOME); + } + return; + } + + if (ELAPSED(ms, next_event_ms) || full_update) { + next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS; + + if (!SendScreenVPData(current_screen, full_update)) { + DEBUG_ECHOLNPGM("SendScreenVPData failed"); + } + return; + } + + if (current_screen == DGUS_Screen::WAIT + && ((wait_continue && !wait_for_user) + || (!wait_continue && IsPrinterIdle()))) { + MoveToScreen(wait_return_screen, true); + return; + } + + if (current_screen == DGUS_Screen::LEVELING_PROBING + && IsPrinterIdle()) { + dgus_display.PlaySound(3); + + SetStatusMessagePGM(ExtUI::getMeshValid() ? + PSTR("Probing successful") + : PSTR("Probing failed")); + + MoveToScreen(DGUS_Screen::LEVELING_AUTOMATIC); + return; + } + + if (status_expire > 0 && ELAPSED(ms, status_expire)) { + SetStatusMessagePGM(NUL_STR, 0); + return; + } + + if (eeprom_save > 0 && ELAPSED(ms, eeprom_save) && IsPrinterIdle()) { + eeprom_save = 0; + + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); + return; + } + + dgus_display.Loop(); +} + +void DGUSScreenHandler::PrinterKilled(PGM_P error, PGM_P component) { + SetMessageLinePGM(error, 1); + SetMessageLinePGM(component, 2); + SetMessageLinePGM(NUL_STR, 3); + SetMessageLinePGM(GET_TEXT(MSG_PLEASE_RESET), 4); + + dgus_display.PlaySound(3, 1, 200); + + MoveToScreen(DGUS_Screen::KILL, true); +} + +void DGUSScreenHandler::UserConfirmRequired(const char * const msg) { + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLine(msg, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + + dgus_display.PlaySound(3); + + dgus_screen_handler.ShowWaitScreen(current_screen, true); +} + +void DGUSScreenHandler::SettingsReset() { + dgus_display.SetVolume(DGUS_DEFAULT_VOLUME); + dgus_display.SetBrightness(DGUS_DEFAULT_BRIGHTNESS); + + if (!settings_ready) { + settings_ready = true; + + Ready(); + } + + SetStatusMessagePGM(PSTR("EEPROM reset")); +} + +void DGUSScreenHandler::StoreSettings(char *buff) { + eeprom_data_t data; + + static_assert(sizeof(data) <= ExtUI::eeprom_data_size, "sizeof(eeprom_data_t) > eeprom_data_size."); + + data.initialized = true; + data.volume = dgus_display.GetVolume(); + data.brightness = dgus_display.GetBrightness(); + data.abl = (ExtUI::getLevelingActive() && ExtUI::getMeshValid()); + + memcpy(buff, &data, sizeof(data)); +} + +void DGUSScreenHandler::LoadSettings(const char *buff) { + eeprom_data_t data; + + static_assert(sizeof(data) <= ExtUI::eeprom_data_size, "sizeof(eeprom_data_t) > eeprom_data_size."); + + memcpy(&data, buff, sizeof(data)); + + dgus_display.SetVolume(data.initialized ? data.volume : DGUS_DEFAULT_VOLUME); + dgus_display.SetBrightness(data.initialized ? data.brightness : DGUS_DEFAULT_BRIGHTNESS); + + if (data.initialized) { + leveling_active = (data.abl && ExtUI::getMeshValid()); + + ExtUI::setLevelingActive(leveling_active); + } +} + +void DGUSScreenHandler::ConfigurationStoreWritten(bool success) { + if (!success) { + SetStatusMessagePGM(PSTR("EEPROM write failed")); + } +} + +void DGUSScreenHandler::ConfigurationStoreRead(bool success) { + if (!success) { + SetStatusMessagePGM(PSTR("EEPROM read failed")); + } + else if (!settings_ready) { + settings_ready = true; + + Ready(); + } +} + +void DGUSScreenHandler::PlayTone(const uint16_t frequency, const uint16_t duration) { + UNUSED(duration); + + if (frequency >= 1 && frequency <= 255) { + if (duration >= 1 && duration <= 255) { + dgus_display.PlaySound((uint8_t)frequency, (uint8_t)duration); + } + else { + dgus_display.PlaySound((uint8_t)frequency); + } + } +} + +void DGUSScreenHandler::MeshUpdate(const int8_t xpos, const int8_t ypos) { + if (current_screen != DGUS_Screen::LEVELING_PROBING) { + if (current_screen == DGUS_Screen::LEVELING_AUTOMATIC) { + TriggerFullUpdate(); + } + + return; + } + + uint8_t point = ypos * GRID_MAX_POINTS_X + xpos; + probing_icons[point < 16 ? 0 : 1] |= (1U << (point % 16)); + + if (xpos >= GRID_MAX_POINTS_X - 1 + && ypos >= GRID_MAX_POINTS_Y - 1 + && !ExtUI::getMeshValid()) { + probing_icons[0] = 0; + probing_icons[1] = 0; + } + + TriggerFullUpdate(); +} + +void DGUSScreenHandler::PrintTimerStarted() { + TriggerScreenChange(DGUS_Screen::PRINT_STATUS); +} + +void DGUSScreenHandler::PrintTimerPaused() { + dgus_display.PlaySound(3); + + TriggerFullUpdate(); +} + +void DGUSScreenHandler::PrintTimerStopped() { + if (current_screen != DGUS_Screen::PRINT_STATUS + && current_screen != DGUS_Screen::PRINT_ADJUST) { + return; + } + + dgus_display.PlaySound(3); + + TriggerScreenChange(DGUS_Screen::PRINT_FINISHED); +} + +void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) { + char buffer[21]; + snprintf_P(buffer, sizeof(buffer), PSTR("Filament runout E%d"), extruder); + + SetStatusMessage(buffer); + + dgus_display.PlaySound(3); +} + +#if ENABLED(SDSUPPORT) + + void DGUSScreenHandler::SDCardInserted() { + if (current_screen == DGUS_Screen::HOME) { + TriggerScreenChange(DGUS_Screen::PRINT); + } + } + + void DGUSScreenHandler::SDCardRemoved() { + if (current_screen == DGUS_Screen::PRINT) { + TriggerScreenChange(DGUS_Screen::HOME); + } + } + + void DGUSScreenHandler::SDCardError() { + SetStatusMessagePGM(GET_TEXT(MSG_MEDIA_READ_ERROR)); + + if (current_screen == DGUS_Screen::PRINT) { + TriggerScreenChange(DGUS_Screen::HOME); + } + } + +#endif // SDSUPPORT + +#if ENABLED(POWER_LOSS_RECOVERY) + + void DGUSScreenHandler::PowerLossResume() { + MoveToScreen(DGUS_Screen::POWERLOSS, true); + } + +#endif // POWER_LOSS_RECOVERY + +#if HAS_PID_HEATING + + void DGUSScreenHandler::PidTuning(const ExtUI::result_t rst) { + switch (rst) { + case ExtUI::PID_STARTED: + SetStatusMessagePGM(GET_TEXT(MSG_PID_AUTOTUNE)); + break; + case ExtUI::PID_BAD_EXTRUDER_NUM: + SetStatusMessagePGM(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); + break; + case ExtUI::PID_TEMP_TOO_HIGH: + SetStatusMessagePGM(GET_TEXT(MSG_PID_TEMP_TOO_HIGH)); + break; + case ExtUI::PID_TUNING_TIMEOUT: + SetStatusMessagePGM(GET_TEXT(MSG_PID_TIMEOUT)); + break; + case ExtUI::PID_DONE: + SetStatusMessagePGM(GET_TEXT(MSG_PID_AUTOTUNE_DONE)); + break; + default: + return; + } + + dgus_display.PlaySound(3); + } + +#endif // HAS_PID_HEATING + +void DGUSScreenHandler::SetMessageLine(const char* msg, uint8_t line) { + switch (line) { + default: return; + case 1: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line1, msg, DGUS_LINE_LEN, true, true); + break; + case 2: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line2, msg, DGUS_LINE_LEN, true, true); + break; + case 3: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line3, msg, DGUS_LINE_LEN, true, true); + break; + case 4: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line4, msg, DGUS_LINE_LEN, true, true); + break; + } +} + +void DGUSScreenHandler::SetMessageLinePGM(PGM_P msg, uint8_t line) { + switch (line) { + default: return; + case 1: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line1, msg, DGUS_LINE_LEN, true, true); + break; + case 2: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line2, msg, DGUS_LINE_LEN, true, true); + break; + case 3: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line3, msg, DGUS_LINE_LEN, true, true); + break; + case 4: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line4, msg, DGUS_LINE_LEN, true, true); + break; + } +} + +void DGUSScreenHandler::SetStatusMessage(const char* msg, const millis_t duration) { + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Status, msg, DGUS_STATUS_LEN, false, true); + + status_expire = (duration > 0 ? ExtUI::safe_millis() + duration : 0); +} + +void DGUSScreenHandler::SetStatusMessagePGM(PGM_P msg, const millis_t duration) { + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Status, msg, DGUS_STATUS_LEN, false, true); + + status_expire = (duration > 0 ? ExtUI::safe_millis() + duration : 0); +} + +void DGUSScreenHandler::ShowWaitScreen(DGUS_Screen return_screen, bool has_continue) { + if (return_screen != DGUS_Screen::WAIT) { + wait_return_screen = return_screen; + } + wait_continue = has_continue; + + TriggerScreenChange(DGUS_Screen::WAIT); +} + +DGUS_Screen DGUSScreenHandler::GetCurrentScreen() { + return current_screen; +} + +void DGUSScreenHandler::TriggerScreenChange(DGUS_Screen screen) { + new_screen = screen; +} + +void DGUSScreenHandler::TriggerFullUpdate() { + full_update = true; +} + +void DGUSScreenHandler::TriggerEEPROMSave() { + eeprom_save = ExtUI::safe_millis() + 500; +} + +bool DGUSScreenHandler::IsPrinterIdle() { + return (!ExtUI::commandsInQueue() + && !ExtUI::isMoving()); +} + +const DGUS_Addr* DGUSScreenHandler::FindScreenAddrList(DGUS_Screen screen) { + DGUS_ScreenAddrList list; + const DGUS_ScreenAddrList *map = screen_addr_list_map; + + do { + memcpy_P(&list, map, sizeof(*map)); + if (!list.addr_list) break; + if (list.screen == screen) { + return list.addr_list; + } + } while (++map); + + return nullptr; +} + +bool DGUSScreenHandler::CallScreenSetup(DGUS_Screen screen) { + DGUS_ScreenSetup setup; + const DGUS_ScreenSetup *list = screen_setup_list; + + do { + memcpy_P(&setup, list, sizeof(*list)); + if (!setup.setup_fn) break; + if (setup.screen == screen) { + return setup.setup_fn(); + } + } while (++list); + + return true; +} + +void DGUSScreenHandler::MoveToScreen(DGUS_Screen screen, bool abort_wait) { + if (current_screen == DGUS_Screen::KILL) { + return; + } + + if (current_screen == DGUS_Screen::WAIT) { + if (screen != DGUS_Screen::WAIT) { + wait_return_screen = screen; + } + + if (!abort_wait) return; + + if (wait_continue && wait_for_user) { + ExtUI::setUserConfirmed(); + } + } + + if (!CallScreenSetup(screen)) return; + + if (!SendScreenVPData(screen, true)) { + DEBUG_ECHOLNPGM("SendScreenVPData failed"); + return; + } + + current_screen = screen; + dgus_display.SwitchScreen(current_screen); +} + +bool DGUSScreenHandler::SendScreenVPData(DGUS_Screen screen, bool complete_update) { + if (complete_update) { + full_update = false; + } + + const DGUS_Addr *list = FindScreenAddrList(screen); + + while (true) { + if (!list) return true; // Nothing left to send + + const uint16_t addr = pgm_read_word(list++); + if (!addr) return true; // Nothing left to send + + DGUS_VP vp; + if (!DGUS_PopulateVP((DGUS_Addr)addr, &vp)) continue; // Invalid VP + if (!vp.tx_handler) continue; // Nothing to send + if (!complete_update && !(vp.flags & VPFLAG_AUTOUPLOAD)) continue; // Unnecessary VP + + uint8_t expected_tx = 6 + vp.size; // 6 bytes header + payload. + const millis_t try_until = ExtUI::safe_millis() + 1000; + + while (expected_tx > dgus_display.GetFreeTxBuffer()) { + if (ELAPSED(ExtUI::safe_millis(), try_until)) return false; // Stop trying after 1 second + + dgus_display.FlushTx(); // Flush the TX buffer + delay(50); + } + + vp.tx_handler(vp); + } +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h new file mode 100644 index 000000000000..056757fedf6c --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h @@ -0,0 +1,152 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include "config/DGUS_Addr.h" +#include "config/DGUS_Data.h" +#include "config/DGUS_Screen.h" +#include "config/DGUS_Constants.h" + +#include "../ui_api.h" +#include "../../../inc/MarlinConfigPre.h" + +class DGUSScreenHandler { +public: + DGUSScreenHandler() = default; + + static void Init(); + static void Ready(); + static void Loop(); + + static void PrinterKilled(PGM_P error, PGM_P component); + static void UserConfirmRequired(const char * const msg); + static void SettingsReset(); + static void StoreSettings(char *buff); + static void LoadSettings(const char *buff); + static void ConfigurationStoreWritten(bool success); + static void ConfigurationStoreRead(bool success); + + static void PlayTone(const uint16_t frequency, const uint16_t duration); + static void MeshUpdate(const int8_t xpos, const int8_t ypos); + static void PrintTimerStarted(); + static void PrintTimerPaused(); + static void PrintTimerStopped(); + static void FilamentRunout(const ExtUI::extruder_t extruder); + + #if ENABLED(SDSUPPORT) + /// Marlin informed us that a new SD has been inserted. + static void SDCardInserted(); + /// Marlin informed us that the SD Card has been removed(). + static void SDCardRemoved(); + /// Marlin informed us about a bad SD Card. + static void SDCardError(); + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + static void PowerLossResume(); + #endif + + #if HAS_PID_HEATING + static void PidTuning(const ExtUI::result_t rst); + #endif + + static void SetMessageLine(const char* msg, uint8_t line); + static void SetMessageLinePGM(PGM_P msg, uint8_t line); + + static void SetStatusMessage(const char* msg, const millis_t duration = DGUS_STATUS_EXPIRATION_MS); + static void SetStatusMessagePGM(PGM_P msg, const millis_t duration = DGUS_STATUS_EXPIRATION_MS); + + static void ShowWaitScreen(DGUS_Screen return_screen, bool has_continue = false); + + static DGUS_Screen GetCurrentScreen(); + static void TriggerScreenChange(DGUS_Screen screen); + static void TriggerFullUpdate(); + + static void TriggerEEPROMSave(); + + static bool IsPrinterIdle(); + + static uint8_t debug_count; + + #if ENABLED(SDSUPPORT) + static ExtUI::FileList filelist; + static uint16_t filelist_offset; + static int16_t filelist_selected; + #endif + + static DGUS_Data::StepSize offset_steps; + static DGUS_Data::StepSize move_steps; + + static uint16_t probing_icons[2]; + + static DGUS_Data::Extruder filament_extruder; + static uint16_t filament_length; + + static char gcode[DGUS_GCODE_LEN + 1]; + + static DGUS_Data::Heater pid_heater; + static uint16_t pid_temp; + static uint8_t pid_cycles; + + static bool wait_continue; + + static bool leveling_active; + +private: + static const DGUS_Addr* FindScreenAddrList(DGUS_Screen screen); + static bool CallScreenSetup(DGUS_Screen screen); + + static void MoveToScreen(DGUS_Screen screen, bool abort_wait = false); + static bool SendScreenVPData(DGUS_Screen screen, bool complete_update); + + static bool settings_ready; + static bool booted; + + static DGUS_Screen current_screen; + static DGUS_Screen new_screen; + static bool full_update; + + static DGUS_Screen wait_return_screen; + + static millis_t status_expire; + static millis_t eeprom_save; + + typedef struct { + bool initialized; + uint8_t volume; + uint8_t brightness; + bool abl; + } eeprom_data_t; +}; + +extern DGUSScreenHandler dgus_screen_handler; + +extern const char DGUS_MSG_HOMING_REQUIRED[], + DGUS_MSG_BUSY[], + DGUS_MSG_UNDEF[], + DGUS_MSG_HOMING[], + DGUS_MSG_FW_OUTDATED[], + DGUS_MSG_ABL_REQUIRED[]; + +extern const char DGUS_CMD_HOME[], + DGUS_CMD_EEPROM_SAVE[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp new file mode 100644 index 000000000000..c12282c4efae --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp @@ -0,0 +1,209 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSSetupHandler.h" + +#include "DGUSDisplay.h" +#include "DGUSScreenHandler.h" + +#include "../../../gcode/queue.h" + +#if ENABLED(SDSUPPORT) + bool DGUSSetupHandler::Print() { + dgus_screen_handler.filelist.refresh(); + + while (!dgus_screen_handler.filelist.isAtRootDir()) { + dgus_screen_handler.filelist.upDir(); + } + + dgus_screen_handler.filelist_offset = 0; + dgus_screen_handler.filelist_selected = -1; + + return true; + } +#endif + +bool DGUSSetupHandler::PrintStatus() { + if (printingIsActive() || printingIsPaused()) { + return true; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_FINISHED); + return false; +} + +bool DGUSSetupHandler::PrintAdjust() { + if (printingIsActive() || printingIsPaused()) { + return true; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_FINISHED); + return false; +} + +bool DGUSSetupHandler::LevelingMenu() { + ExtUI::setLevelingActive(dgus_screen_handler.leveling_active); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + if (ExtUI::isPositionKnown()) { + if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 10.0f) { + queue.enqueue_now_P(PSTR("G0Z10")); + } + + return true; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_MENU); + + queue.enqueue_now_P(DGUS_CMD_HOME); + + return false; +} + +bool DGUSSetupHandler::LevelingManual() { + ExtUI::setLevelingActive(false); + + if (ExtUI::isPositionKnown()) { + return true; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_MANUAL); + + queue.enqueue_now_P(DGUS_CMD_HOME); + + return false; +} + +bool DGUSSetupHandler::LevelingOffset() { + dgus_screen_handler.offset_steps = DGUS_Data::StepSize::MMP1; + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + if (ExtUI::isPositionKnown()) { + if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 4.0f) { + queue.enqueue_now_P(PSTR("G0Z4")); + } + + char buffer[20]; + snprintf_P(buffer, sizeof(buffer), PSTR("G0X%dY%d"), DGUS_LEVEL_CENTER_X, DGUS_LEVEL_CENTER_Y); + + queue.enqueue_one_now(buffer); + queue.enqueue_now_P(PSTR("G0Z0")); + + return true; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_OFFSET); + + queue.enqueue_now_P(DGUS_CMD_HOME); + + return false; +} + +bool DGUSSetupHandler::LevelingAutomatic() { + if (ExtUI::getMeshValid()) { + dgus_screen_handler.leveling_active = true; + + ExtUI::setLevelingActive(true); + } + + return true; +} + +bool DGUSSetupHandler::LevelingProbing() { + dgus_screen_handler.probing_icons[0] = 0; + dgus_screen_handler.probing_icons[1] = 0; + + return true; +} + +bool DGUSSetupHandler::Filament() { + dgus_screen_handler.filament_extruder = DGUS_Data::Extruder::CURRENT; + dgus_screen_handler.filament_length = DGUS_DEFAULT_FILAMENT_LEN; + + return true; +} + +bool DGUSSetupHandler::Move() { + dgus_screen_handler.move_steps = DGUS_Data::StepSize::MM10; + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + return true; +} + +bool DGUSSetupHandler::Gcode() { + ZERO(dgus_screen_handler.gcode); + + if (dgus_display.gui_version < 0x30 || dgus_display.os_version < 0x21) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_FW_OUTDATED); + return false; + } + + return true; +} + +bool DGUSSetupHandler::PID() { + dgus_screen_handler.pid_heater = DGUS_Data::Heater::H0; + dgus_screen_handler.pid_temp = DGUS_PLA_TEMP_HOTEND; + + return true; +} + +bool DGUSSetupHandler::Infos() { + dgus_screen_handler.debug_count = 0; + + return true; +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h new file mode 100644 index 000000000000..b1159ff7083c --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +namespace DGUSSetupHandler { + + #if ENABLED(SDSUPPORT) + bool Print(); + #endif + bool PrintStatus(); + bool PrintAdjust(); + bool LevelingMenu(); + bool LevelingOffset(); + bool LevelingManual(); + bool LevelingAutomatic(); + bool LevelingProbing(); + bool Filament(); + bool Move(); + bool Gcode(); + bool PID(); + bool Infos(); + +} diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp new file mode 100644 index 000000000000..04362b07e8ed --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp @@ -0,0 +1,632 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSTxHandler.h" + +#include "DGUSScreenHandler.h" +#include "config/DGUS_Data.h" + +#include "../ui_api.h" +#include "../../../module/stepper.h" +#include "../../../module/printcounter.h" +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "../../../feature/pause.h" +#endif + +#if ENABLED(SDSUPPORT) + void DGUSTxHandler::SetFileControlState(int file, bool state) { + DGUS_Control control; + + switch (file) { + default: return; + case 0: + control = DGUS_Control::FILE0; + break; + case 1: + control = DGUS_Control::FILE1; + break; + case 2: + control = DGUS_Control::FILE2; + break; + case 3: + control = DGUS_Control::FILE3; + break; + case 4: + control = DGUS_Control::FILE4; + break; + } + + if (state) { + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + control); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + control); + } + } + + void DGUSTxHandler::FileType(DGUS_VP &vp) { + // Batch send + uint16_t data[DGUS_FILE_COUNT]; + + for (int i = 0; i < DGUS_FILE_COUNT; i++) { + if (!dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_offset + i)) { + data[i] = Swap16((uint16_t)DGUS_Data::SDType::NONE); + + SetFileControlState(i, false); + continue; + } + + data[i] = dgus_screen_handler.filelist.isDir() ? + Swap16((uint16_t)DGUS_Data::SDType::DIRECTORY) + : Swap16((uint16_t)DGUS_Data::SDType::FILE); + + SetFileControlState(i, true); + } + + dgus_display.Write((uint16_t)vp.addr, data, sizeof(*data) * DGUS_FILE_COUNT); + } + + void DGUSTxHandler::FileName(DGUS_VP &vp) { + uint8_t offset; + + switch (vp.addr) { + default: return; + case DGUS_Addr::SD_FileName0: + offset = 0; + break; + case DGUS_Addr::SD_FileName1: + offset = 1; + break; + case DGUS_Addr::SD_FileName2: + offset = 2; + break; + case DGUS_Addr::SD_FileName3: + offset = 3; + break; + case DGUS_Addr::SD_FileName4: + offset = 4; + break; + } + + if (dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_offset + offset)) { + dgus_display.WriteString((uint16_t)vp.addr, dgus_screen_handler.filelist.filename(), vp.size); + } + else { + dgus_display.WriteStringPGM((uint16_t)vp.addr, NUL_STR, vp.size); + } + } + + void DGUSTxHandler::ScrollIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + if (!dgus_screen_handler.filelist.isAtRootDir()) { + icons |= (uint16_t)DGUS_Data::ScrollIcon::GO_BACK; + + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::GO_BACK); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::GO_BACK); + } + + if (dgus_screen_handler.filelist_offset > 0) { + icons |= (uint16_t)DGUS_Data::ScrollIcon::UP; + + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_UP); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_UP); + } + + if (dgus_screen_handler.filelist_offset + DGUS_FILE_COUNT < dgus_screen_handler.filelist.count()) { + icons |= (uint16_t)DGUS_Data::ScrollIcon::DOWN; + + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_DOWN); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_DOWN); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); + } + + void DGUSTxHandler::SelectedFileName(DGUS_VP &vp) { + if (dgus_screen_handler.filelist_selected < 0 + || !dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_selected)) { + dgus_display.WriteStringPGM((uint16_t)vp.addr, NUL_STR, vp.size); + return; + } + + dgus_display.WriteString((uint16_t)vp.addr, dgus_screen_handler.filelist.filename(), vp.size); + } +#endif // SDSUPPORT + +void DGUSTxHandler::PositionZ(DGUS_VP &vp) { + float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? + planner.get_axis_position_mm(Z_AXIS) + : 0; + + const int16_t data = dgus_display.ToFixedPoint(position); + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); +} + +void DGUSTxHandler::Ellapsed(DGUS_VP &vp) { + char buffer[21]; + duration_t(print_job_timer.duration()).toString(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); +} + +void DGUSTxHandler::Percent(DGUS_VP &vp) { + uint16_t progress; + + switch (vp.addr) { + default: return; + case DGUS_Addr::STATUS_Percent: + progress = constrain(ExtUI::getProgress_percent(), 0, 100); + break; + case DGUS_Addr::STATUS_Percent_Complete: + progress = 100; + break; + } + + dgus_display.Write((uint16_t)DGUS_Addr::STATUS_Percent, Swap16(progress)); +} + +void DGUSTxHandler::StatusIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + if (printingIsActive()) { + icons |= (uint16_t)DGUS_Data::StatusIcon::PAUSE; + + dgus_display.EnableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::PAUSE); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::PAUSE); + } + + if (printingIsPaused()) { + icons |= (uint16_t)DGUS_Data::StatusIcon::RESUME; + + dgus_display.EnableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::RESUME); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::RESUME); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::Flowrate(DGUS_VP &vp) { + int16_t flowrate; + + switch (vp.addr) { + default: return; + case DGUS_Addr::ADJUST_Flowrate_CUR: + #if EXTRUDERS > 1 + flowrate = ExtUI::getFlow_percent(ExtUI::getActiveTool()); + #else + flowrate = ExtUI::getFlow_percent(ExtUI::E0); + #endif + break; + #if EXTRUDERS > 1 + case DGUS_Addr::ADJUST_Flowrate_E0: + flowrate = ExtUI::getFlow_percent(ExtUI::E0); + break; + case DGUS_Addr::ADJUST_Flowrate_E1: + flowrate = ExtUI::getFlow_percent(ExtUI::E1); + break; + #endif + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(flowrate)); +} + +void DGUSTxHandler::TempMax(DGUS_VP &vp) { + uint16_t temp; + + switch (vp.addr) { + default: return; + case DGUS_Addr::TEMP_Max_Bed: + temp = BED_MAX_TARGET; + break; + case DGUS_Addr::TEMP_Max_H0: + temp = HEATER_0_MAXTEMP - HOTEND_OVERSHOOT; + break; + #if HOTENDS > 1 + case DGUS_Addr::TEMP_Max_H1: + temp = HEATER_1_MAXTEMP - HOTEND_OVERSHOOT; + break; + #endif + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(temp)); +} + +void DGUSTxHandler::StepperStatus(DGUS_VP &vp) { + if (X_ENABLE_READ() == X_ENABLE_ON + && Y_ENABLE_READ() == Y_ENABLE_ON + && Z_ENABLE_READ() == Z_ENABLE_ON) { + dgus_display.Write((uint16_t)vp.addr, Swap16((uint16_t)DGUS_Data::Status::ENABLED)); + } + else { + dgus_display.Write((uint16_t)vp.addr, Swap16((uint16_t)DGUS_Data::Status::DISABLED)); + } +} + +void DGUSTxHandler::StepIcons(DGUS_VP &vp) { + if (!vp.extra) return; + uint16_t icons = 0; + DGUS_Data::StepSize size = *(DGUS_Data::StepSize*)vp.extra; + + switch (size) { + case DGUS_Data::StepSize::MM10: + icons |= (uint16_t)DGUS_Data::StepIcon::MM10; + break; + case DGUS_Data::StepSize::MM1: + icons |= (uint16_t)DGUS_Data::StepIcon::MM1; + break; + case DGUS_Data::StepSize::MMP1: + icons |= (uint16_t)DGUS_Data::StepIcon::MMP1; + break; + case DGUS_Data::StepSize::MMP01: + icons |= (uint16_t)DGUS_Data::StepIcon::MMP01; + break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::ABLDisableIcon(DGUS_VP &vp) { + uint16_t data; + + if (ExtUI::getLevelingActive()) { + data = (uint16_t)DGUS_Data::Status::ENABLED; + + dgus_display.EnableControl(DGUS_Screen::LEVELING_AUTOMATIC, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::DISABLE); + } + else { + data = (uint16_t)DGUS_Data::Status::DISABLED; + + dgus_display.DisableControl(DGUS_Screen::LEVELING_AUTOMATIC, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::DISABLE); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); +} + +void DGUSTxHandler::ABLGrid(DGUS_VP &vp) { + // Batch send + int16_t data[DGUS_LEVEL_GRID_SIZE]; + xy_uint8_t point; + int16_t fixed; + + for (int i = 0; i < DGUS_LEVEL_GRID_SIZE; i++) { + point.x = i % GRID_MAX_POINTS_X; + point.y = i / GRID_MAX_POINTS_X; + fixed = dgus_display.ToFixedPoint(ExtUI::getMeshPoint(point)); + data[i] = Swap16(fixed); + } + + dgus_display.Write((uint16_t)vp.addr, data, sizeof(*data) * DGUS_LEVEL_GRID_SIZE); +} + +void DGUSTxHandler::FilamentIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + switch (dgus_screen_handler.filament_extruder) { + default: return; + case DGUS_Data::Extruder::CURRENT: + #if EXTRUDERS > 1 + switch (ExtUI::getActiveTool()) { + default: break; + case ExtUI::E0: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E0; + break; + case ExtUI::E1: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E1; + break; + } + break; + #endif + case DGUS_Data::Extruder::E0: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E0; + break; + case DGUS_Data::Extruder::E1: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E1; + break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::BLTouch(DGUS_VP &vp) { + #if ENABLED(BLTOUCH) + dgus_display.EnableControl(DGUS_Screen::SETTINGS_MENU2, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::EXTRA2); + + dgus_display.Write((uint16_t)vp.addr, Swap16((uint16_t)DGUS_Data::Status::ENABLED)); + #else + dgus_display.DisableControl(DGUS_Screen::SETTINGS_MENU2, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::EXTRA2); + + dgus_display.Write((uint16_t)vp.addr, Swap16((uint16_t)DGUS_Data::Status::DISABLED)); + #endif +} + +void DGUSTxHandler::PIDIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + switch (dgus_screen_handler.pid_heater) { + default: return; + case DGUS_Data::Heater::BED: + icons |= (uint16_t)DGUS_Data::HeaterIcon::BED; + break; + case DGUS_Data::Heater::H0: + icons |= (uint16_t)DGUS_Data::HeaterIcon::H0; + break; + case DGUS_Data::Heater::H1: + icons |= (uint16_t)DGUS_Data::HeaterIcon::H1; + break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::PIDKp(DGUS_VP &vp) { + float value; + + switch (dgus_screen_handler.pid_heater) { + default: return; + #if ENABLED(PIDTEMPBED) + case DGUS_Data::Heater::BED: + value = ExtUI::getBedPIDValues_Kp(); + break; + #endif + #if ENABLED(PIDTEMP) + case DGUS_Data::Heater::H0: + value = ExtUI::getPIDValues_Kp(ExtUI::E0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + value = ExtUI::getPIDValues_Kp(ExtUI::E1); + break; + #endif + #endif + } + + const int32_t data = dgus_display.ToFixedPoint(value); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); +} + +void DGUSTxHandler::PIDKi(DGUS_VP &vp) { + float value; + + switch (dgus_screen_handler.pid_heater) { + default: return; + #if ENABLED(PIDTEMPBED) + case DGUS_Data::Heater::BED: + value = ExtUI::getBedPIDValues_Ki(); + break; + #endif + #if ENABLED(PIDTEMP) + case DGUS_Data::Heater::H0: + value = ExtUI::getPIDValues_Ki(ExtUI::E0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + value = ExtUI::getPIDValues_Ki(ExtUI::E1); + break; + #endif + #endif + } + + const int32_t data = dgus_display.ToFixedPoint(value); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); +} + +void DGUSTxHandler::PIDKd(DGUS_VP &vp) { + float value; + + switch (dgus_screen_handler.pid_heater) { + default: return; + #if ENABLED(PIDTEMPBED) + case DGUS_Data::Heater::BED: + value = ExtUI::getBedPIDValues_Kd(); + break; + #endif + #if ENABLED(PIDTEMP) + case DGUS_Data::Heater::H0: + value = ExtUI::getPIDValues_Kd(ExtUI::E0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + value = ExtUI::getPIDValues_Kd(ExtUI::E1); + break; + #endif + #endif + } + + const int32_t data = dgus_display.ToFixedPoint(value); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); +} + +void DGUSTxHandler::BuildVolume(DGUS_VP &vp) { + char buffer[vp.size]; + snprintf_P(buffer, vp.size, PSTR("%dx%dx%d"), X_BED_SIZE, Y_BED_SIZE, (Z_MAX_POS - Z_MIN_POS)); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); +} + +void DGUSTxHandler::TotalPrints(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(print_job_timer.getStats().totalPrints)); + #else + UNUSED(vp); + #endif +} + +void DGUSTxHandler::FinishedPrints(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(print_job_timer.getStats().finishedPrints)); + #else + UNUSED(vp); + #endif +} + +void DGUSTxHandler::PrintTime(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + char buffer[21]; + ExtUI::getTotalPrintTime_str(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); + #else + dgus_display.WriteStringPGM((uint16_t)vp.addr, DGUS_MSG_UNDEF, vp.size); + #endif +} + +void DGUSTxHandler::LongestPrint(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + char buffer[21]; + ExtUI::getLongestPrint_str(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); + #else + dgus_display.WriteStringPGM((uint16_t)vp.addr, DGUS_MSG_UNDEF, vp.size); + #endif +} + +void DGUSTxHandler::FilamentUsed(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + char buffer[21]; + ExtUI::getFilamentUsed_str(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); + #else + dgus_display.WriteStringPGM((uint16_t)vp.addr, DGUS_MSG_UNDEF, vp.size); + #endif +} + +void DGUSTxHandler::WaitIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + if (printingIsPaused() + #if ENABLED(ADVANCED_PAUSE_FEATURE) + && did_pause_print + #endif + ) { + icons |= (uint16_t)DGUS_Data::WaitIcon::ABORT; + + dgus_display.EnableControl(DGUS_Screen::WAIT, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::ABORT); + } + else { + dgus_display.DisableControl(DGUS_Screen::WAIT, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::ABORT); + } + + if (dgus_screen_handler.wait_continue) { + icons |= (uint16_t)DGUS_Data::WaitIcon::CONTINUE; + + dgus_display.EnableControl(DGUS_Screen::WAIT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::CONTINUE); + } + else { + dgus_display.DisableControl(DGUS_Screen::WAIT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::CONTINUE); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::FanSpeed(DGUS_VP &vp) { + uint16_t fan_speed; + + switch (vp.addr) { + default: return; + case DGUS_Addr::FAN0_Speed: fan_speed = ExtUI::getTargetFan_percent(ExtUI::FAN0); break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(fan_speed)); +} + +void DGUSTxHandler::Volume(DGUS_VP &vp) { + const uint16_t volume = dgus_display.GetVolume(); + + dgus_display.Write((uint16_t)vp.addr, Swap16(volume)); +} + +void DGUSTxHandler::Brightness(DGUS_VP &vp) { + const uint16_t brightness = dgus_display.GetBrightness(); + + dgus_display.Write((uint16_t)vp.addr, Swap16(brightness)); +} + +void DGUSTxHandler::ExtraToString(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + + dgus_display.WriteString((uint16_t)vp.addr, vp.extra, vp.size, true, false, false); +} + +void DGUSTxHandler::ExtraPGMToString(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + + dgus_display.WriteStringPGM((uint16_t)vp.addr, vp.extra, vp.size, true, false, false); +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h new file mode 100644 index 000000000000..5715abbedfd7 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h @@ -0,0 +1,127 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +#include "DGUSDisplay.h" +#include "definition/DGUS_VP.h" + +namespace DGUSTxHandler { + + #if ENABLED(SDSUPPORT) + void SetFileControlState(int, bool); + void FileType(DGUS_VP &); + void FileName(DGUS_VP &); + void ScrollIcons(DGUS_VP &); + void SelectedFileName(DGUS_VP &); + #endif + + void PositionZ(DGUS_VP &); + void Ellapsed(DGUS_VP &); + void Percent(DGUS_VP &); + void StatusIcons(DGUS_VP &); + + void Flowrate(DGUS_VP &); + + void TempMax(DGUS_VP &); + + void StepperStatus(DGUS_VP &); + + void StepIcons(DGUS_VP &); + + void ABLDisableIcon(DGUS_VP &); + void ABLGrid(DGUS_VP &); + + void FilamentIcons(DGUS_VP &); + + void BLTouch(DGUS_VP &); + + void PIDIcons(DGUS_VP &); + void PIDKp(DGUS_VP &); + void PIDKi(DGUS_VP &); + void PIDKd(DGUS_VP &); + + void BuildVolume(DGUS_VP &); + void TotalPrints(DGUS_VP &); + void FinishedPrints(DGUS_VP &); + void PrintTime(DGUS_VP &); + void LongestPrint(DGUS_VP &); + void FilamentUsed(DGUS_VP &); + + void WaitIcons(DGUS_VP &); + + void FanSpeed(DGUS_VP &); + + void Volume(DGUS_VP &); + + void Brightness(DGUS_VP &); + + void ExtraToString(DGUS_VP &); + void ExtraPGMToString(DGUS_VP &); + + template + void ExtraToInteger(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + switch (vp.size) { + default: return; + case 1: { + const uint8_t data = (uint8_t)(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, data); + break; + } + case 2: { + const uint16_t data = (uint16_t)(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); + break; + } + case 4: { + const uint32_t data = (uint32_t)(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); + break; + } + } + } + + template + void ExtraToFixedPoint(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + switch (vp.size) { + default: return; + case 1: { + const uint8_t data = dgus_display.ToFixedPoint(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, data); + break; + } + case 2: { + const uint16_t data = dgus_display.ToFixedPoint(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); + break; + } + case 4: { + const uint32_t data = dgus_display.ToFixedPoint(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); + break; + } + } + } + +} diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h new file mode 100644 index 000000000000..de64fe2b106b --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h @@ -0,0 +1,173 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +constexpr uint8_t DGUS_LINE_LEN = 32; +constexpr uint8_t DGUS_STATUS_LEN = 32; +constexpr uint8_t DGUS_FILE_COUNT = 5; +constexpr uint8_t DGUS_FILENAME_LEN = 32; +constexpr uint8_t DGUS_ELLAPSED_LEN = 15; +constexpr uint8_t DGUS_LEVEL_GRID_SIZE = 25; +constexpr uint8_t DGUS_MACHINE_LEN = 24; +constexpr uint8_t DGUS_BUILDVOLUME_LEN = 24; +constexpr uint8_t DGUS_VERSION_LEN = 16; +constexpr uint8_t DGUS_PRINTTIME_LEN = 24; +constexpr uint8_t DGUS_LONGESTPRINT_LEN = 24; +constexpr uint8_t DGUS_FILAMENTUSED_LEN = 24; +constexpr uint8_t DGUS_GCODE_LEN = 32; + +enum class DGUS_Addr : uint16_t { + MESSAGE_Line1 = 0x1100, // 0x1100 - 0x111F + MESSAGE_Line2 = 0x1120, // 0x1120 - 0x113F + MESSAGE_Line3 = 0x1140, // 0x1140 - 0x115F + MESSAGE_Line4 = 0x1160, // 0x1160 - 0x117F + + // READ-ONLY VARIABLES + + SCREENCHANGE = 0x2000, // Screen change request. Data contains target screen in low byte. + SCREENCHANGE_SD = 0x2001, // Only change if SD card present. + SCREENCHANGE_Idle = 0x2002, // Only change if not printing. + SCREENCHANGE_Printing = 0x2003, // Only change if printing. + SD_SelectFile = 0x2004, // Data: file index (0-4) + SD_Scroll = 0x2005, // Data: DGUS_Data::Scroll + SD_Print = 0x2006, + STATUS_Abort = 0x2007, // Popup / Data: DGUS_Data::Popup + STATUS_Pause = 0x2008, // Popup / Data: DGUS_Data::Popup + STATUS_Resume = 0x2009, // Popup / Data: DGUS_Data::Popup + ADJUST_SetFeedrate = 0x200A, // Type: Integer (16 bits signed) + ADJUST_SetFlowrate_CUR = 0x200B, // Type: Integer (16 bits signed) + #if EXTRUDERS > 1 + ADJUST_SetFlowrate_E0 = 0x200C, // Type: Integer (16 bits signed) + ADJUST_SetFlowrate_E1 = 0x200D, // Type: Integer (16 bits signed) + #endif + ADJUST_SetBabystep = 0x200E, // Type: Fixed point, 2 decimals (16 bits signed) + ADJUST_Babystep = 0x200F, // Data: DGUS_Data::Adjust + TEMP_Preset = 0x2010, // Popup / Data: DGUS_Data::TempPreset + TEMP_SetTarget_Bed = 0x2011, // Type: Integer (16 bits signed) + TEMP_SetTarget_H0 = 0x2012, // Type: Integer (16 bits signed) + #if HOTENDS > 1 + TEMP_SetTarget_H1 = 0x2013, // Type: Integer (16 bits signed) + #endif + TEMP_Cool = 0x2014, // Data: DGUS_Data::Heater + STEPPER_Control = 0x2015, // Popup / Data: DGUS_Data::Control + LEVEL_OFFSET_Set = 0x2016, // Type: Fixed point, 2 decimals (16 bits signed) + LEVEL_OFFSET_Step = 0x2017, // Data: DGUS_Data::Adjust + LEVEL_OFFSET_SetStep = 0x2018, // Data: DGUS_Data::StepSize + LEVEL_MANUAL_Point = 0x2019, // Data: point index (1-5) + LEVEL_AUTO_Probe = 0x201A, + LEVEL_AUTO_Disable = 0x201B, + FILAMENT_Select = 0x201C, // Data: DGUS_Data::Extruder + FILAMENT_SetLength = 0x201D, // Type: Integer (16 bits unsigned) + FILAMENT_Move = 0x201E, // Data: DGUS_Data::FilamentMove + MOVE_Home = 0x201F, // Data: DGUS_Data::Axis + MOVE_SetX = 0x2020, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_SetY = 0x2021, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_SetZ = 0x2022, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_Step = 0x2023, // Data: DGUS_Data::MoveDirection + MOVE_SetStep = 0x2024, // Data: DGUS_Data::StepSize + GCODE_Clear = 0x2025, + GCODE_Execute = 0x2026, + EEPROM_Reset = 0x2027, // Popup / Data: DGUS_Data::Popup + SETTINGS2_Extra = 0x2028, // Data: DGUS_Data::Extra + PID_Select = 0x2029, // Data: DGUS_Data::Heater + PID_SetTemp = 0x202A, // Type: Integer (16 bits unsigned) + PID_Run = 0x202B, + POWERLOSS_Abort = 0x202C, // Popup / Data: DGUS_Data::Popup + POWERLOSS_Resume = 0x202D, // Popup / Data: DGUS_Data::Popup + WAIT_Abort = 0x202E, // Popup / Data: DGUS_Data::Popup + WAIT_Continue = 0x202F, + + // WRITE-ONLY VARIABLES + + MESSAGE_Status = 0x3000, // 0x3000 - 0x301F + SD_Type = 0x3020, // 0x3020 - 0x3024 / Data: DGUS_Data::SDType + SD_FileName0 = 0x3025, // 0x3025 - 0x3044 + SD_FileName1 = 0x3045, // 0x3045 - 0x3064 + SD_FileName2 = 0x3065, // 0x3065 - 0x3084 + SD_FileName3 = 0x3085, // 0x3085 - 0x30A4 + SD_FileName4 = 0x30A5, // 0x30A5 - 0x30C4 + SD_ScrollIcons = 0x30C5, // Bits: DGUS_Data::ScrollIcon + SD_SelectedFileName = 0x30C6, // 0x30C6 - 0x30E5 + STATUS_PositionZ = 0x30E6, // Type: Fixed point, 1 decimal (16 bits signed) + STATUS_Ellapsed = 0x30E7, // 0x30E7 - 0x30F5 + STATUS_Percent = 0x30F6, // Type: Integer (16 bits unsigned) + STATUS_Icons = 0x30F7, // Bits: DGUS_Data::StatusIcon + ADJUST_Feedrate = 0x30F8, // Type: Integer (16 bits signed) + ADJUST_Flowrate_CUR = 0x30F9, // Type: Integer (16 bits signed) + #if EXTRUDERS > 1 + ADJUST_Flowrate_E0 = 0x30FA, // Type: Integer (16 bits signed) + ADJUST_Flowrate_E1 = 0x30FB, // Type: Integer (16 bits signed) + #endif + TEMP_Current_Bed = 0x30FC, // Type: Integer (16 bits signed) + TEMP_Target_Bed = 0x30FD, // Type: Integer (16 bits signed) + TEMP_Max_Bed = 0x30FE, // Type: Integer (16 bits unsigned) + TEMP_Current_H0 = 0x30FF, // Type: Integer (16 bits signed) + TEMP_Target_H0 = 0x3100, // Type: Integer (16 bits signed) + TEMP_Max_H0 = 0x3101, // Type: Integer (16 bits unsigned) + #if HOTENDS > 1 + TEMP_Current_H1 = 0x3102, // Type: Integer (16 bits signed) + TEMP_Target_H1 = 0x3103, // Type: Integer (16 bits signed) + TEMP_Max_H1 = 0x3104, // Type: Integer (16 bits unsigned) + #endif + STEPPER_Status = 0x3105, // Data: DGUS_Data::Status + LEVEL_OFFSET_Current = 0x3106, // Type: Fixed point, 2 decimals (16 bits signed) + LEVEL_OFFSET_StepIcons = 0x3107, // Bits: DGUS_Data::StepIcon + LEVEL_AUTO_DisableIcon = 0x3108, // Data: DGUS_Data::Status + LEVEL_AUTO_Grid = 0x3109, // 0x3109 - 0x3121 / Type: Fixed point, 3 decimals (16 bits signed) + LEVEL_PROBING_Icons1 = 0x3122, // Type: Integer (16 bits unsigned) / Each bit represents a grid point + LEVEL_PROBING_Icons2 = 0x3123, // Type: Integer (16 bits unsigned) / Each bit represents a grid point + FILAMENT_ExtruderIcons = 0x3124, // Data: DGUS_Data::ExtruderIcon + FILAMENT_Length = 0x3125, // Type: Integer (16 bits unsigned) + MOVE_CurrentX = 0x3126, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_CurrentY = 0x3127, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_CurrentZ = 0x3128, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_StepIcons = 0x3129, // Bits: DGUS_Data::StepIcon + SETTINGS2_BLTouch = 0x312A, // Data: DGUS_Data::Status + PID_HeaterIcons = 0x312B, // Data: DGUS_Data::HeaterIcon + PID_Temp = 0x312C, // Type: Integer (16 bits unsigned) + PID_Kp = 0x312D, // Type: Fixed point, 2 decimals (32 bits signed) + PID_Ki = 0x312F, // Type: Fixed point, 2 decimals (32 bits signed) + PID_Kd = 0x3131, // Type: Fixed point, 2 decimals (32 bits signed) + INFOS_Machine = 0x3133, // 0x3133 - 0x314A + INFOS_BuildVolume = 0x314B, // 0x314B - 0x3162 + INFOS_Version = 0x3163, // 0x3163 - 0x3172 + INFOS_TotalPrints = 0x3173, // Type: Integer (16 bits unsigned) + INFOS_FinishedPrints = 0x3174, // Type: Integer (16 bits unsigned) + INFOS_PrintTime = 0x3175, // 0x3175 - 0x318C + INFOS_LongestPrint = 0x318D, // 0x318D - 0x31A4 + INFOS_FilamentUsed = 0x31A5, // 0x31A5 - 0x31BC + WAIT_Icons = 0x31BD, // Bits: DGUS_Data::WaitIcon + + // READ-WRITE VARIABLES + + FAN0_Speed = 0x4000, // Type: Integer (16 bits unsigned) / Data: fan speed as percent (0-100) + GCODE_Data = 0x4001, // 0x4001 - 0x4020 + PID_Cycles = 0x4021, // Type: Integer (16 bits unsigned) + VOLUME_Level = 0x4022, // Type: Integer (16 bits unsigned) / Data: volume as percent (0-100) + BRIGHTNESS_Level = 0x4023, // Type: Integer (16 bits unsigned) / Data: brightness as percent (0-100) + + // SPECIAL CASES + + STATUS_Percent_Complete = 0x5000, // Same as STATUS_Percent, but always 100% + INFOS_Debug = 0x5001, + +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h new file mode 100644 index 000000000000..4047a6d6dcb9 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h @@ -0,0 +1,96 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../../inc/MarlinConfigPre.h" + +#include "DGUS_Addr.h" + +static_assert((DGUS_LEVEL_GRID_SIZE == GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y), "DGUS_LEVEL_GRID_SIZE incompatible with current mesh."); + +#ifndef DGUS_DEFAULT_VOLUME + #define DGUS_DEFAULT_VOLUME 50 +#endif + +#ifndef DGUS_DEFAULT_BRIGHTNESS + #define DGUS_DEFAULT_BRIGHTNESS 100 +#endif + +#ifndef DGUS_STATUS_EXPIRATION_MS + #define DGUS_STATUS_EXPIRATION_MS 30000 +#endif + +#ifndef DGUS_PRINT_BABYSTEP + #define DGUS_PRINT_BABYSTEP 0.01f +#endif + +#ifndef DGUS_PLA_TEMP_HOTEND + #define DGUS_PLA_TEMP_HOTEND 200 +#endif + +#ifndef DGUS_PLA_TEMP_BED + #define DGUS_PLA_TEMP_BED 60 +#endif + +#ifndef DGUS_ABS_TEMP_HOTEND + #define DGUS_ABS_TEMP_HOTEND 240 +#endif + +#ifndef DGUS_ABS_TEMP_BED + #define DGUS_ABS_TEMP_BED 80 +#endif + +#ifndef DGUS_PETG_TEMP_HOTEND + #define DGUS_PETG_TEMP_HOTEND 240 +#endif + +#ifndef DGUS_PETG_TEMP_BED + #define DGUS_PETG_TEMP_BED 60 +#endif + +#ifndef DGUS_DEFAULT_FILAMENT_LEN + #define DGUS_DEFAULT_FILAMENT_LEN 10 +#endif + +#ifndef LEVEL_CORNERS_Z_HOP + #define LEVEL_CORNERS_Z_HOP 4.0 +#endif + +#ifndef LEVEL_CORNERS_HEIGHT + #define LEVEL_CORNERS_HEIGHT 0.0 +#endif + +static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_Z_HOP must be >= 0. Please update your configuration."); + +#ifndef DGUS_LEVEL_CENTER_X + #define DGUS_LEVEL_CENTER_X ((X_BED_SIZE) / 2) +#endif + +#ifndef DGUS_LEVEL_CENTER_Y + #define DGUS_LEVEL_CENTER_Y ((Y_BED_SIZE) / 2) +#endif + +#if ENABLED(BLTOUCH) + #ifndef DGUS_RESET_BLTOUCH + #define DGUS_RESET_BLTOUCH "M999\nM280P0S160" + #endif +#endif diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h new file mode 100644 index 000000000000..92d2f5ece215 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h @@ -0,0 +1,50 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +enum class DGUS_Control : uint8_t { + + // PRINT + FILE0 = 1, // RETURN_KEY_CODE + FILE1 = 2, // RETURN_KEY_CODE + FILE2 = 3, // RETURN_KEY_CODE + FILE3 = 4, // RETURN_KEY_CODE + FILE4 = 5, // RETURN_KEY_CODE + GO_BACK = 6, // RETURN_KEY_CODE + SCROLL_UP = 7, // RETURN_KEY_CODE + SCROLL_DOWN = 8, // RETURN_KEY_CODE + + // PRINT_STATUS + PAUSE = 1, // POPUP_WINDOW + RESUME = 2, // POPUP_WINDOW + + // LEVELING_AUTOMATIC + DISABLE = 5, // RETURN_KEY_CODE + + // SETTINGS_MENU2 + EXTRA2 = 6, // RETURN_KEY_CODE + + // WAIT + ABORT = 1, // POPUP_WINDOW + CONTINUE = 2 // RETURN_KEY_CODE + +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h new file mode 100644 index 000000000000..886109054c3b --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h @@ -0,0 +1,148 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +namespace DGUS_Data { + + // RX constants + + enum class Scroll : uint8_t { + GO_BACK = 0, + UP = 1, + DOWN = 2 + }; + + enum class Popup : uint8_t { + CONFIRMED = 1 + }; + + enum class Adjust : uint8_t { + INCREMENT = 0, + DECREMENT = 1 + }; + + enum class TempPreset : uint8_t { + PLA = 1, + ABS = 2, + PETG = 3 + }; + + enum class Extruder : int8_t { + CURRENT = -1, + E0 = 0, + E1 = 1 + }; + + enum class Heater : int8_t { + ALL = -2, + BED = -1, + H0 = 0, + H1 = 1 + }; + + enum class Control : uint8_t { + ENABLE = 1, + DISABLE = 2 + }; + + enum class StepSize : uint8_t { + MM10 = 0, // 10mm + MM1 = 1, // 1mm + MMP1 = 2, // 0.1mm + MMP01 = 3 // 0.01mm + }; + + enum class FilamentMove : uint8_t { + RETRACT = 0, + EXTRUDE = 1 + }; + + enum class Axis : uint8_t { + X_Y_Z = 0, + X_Y = 1, + Z = 2 + }; + + enum class MoveDirection : uint8_t { + XP = 0, // X+ + XM = 1, // X- + YP = 2, // Y+ + YM = 3, // Y- + ZP = 4, // Z+ + ZM = 5 // Z- + }; + + enum class Extra : uint8_t { + BUTTON1 = 0, + BUTTON2 = 1 + }; + + // TX constants + + enum class SDType : uint16_t { + NONE = 0, + FILE = 1, + DIRECTORY = 2 + }; + + enum class ScrollIcon : uint16_t { + GO_BACK = 1U << 0, + UP = 1U << 1, + DOWN = 1U << 2 + }; + + enum class StatusIcon : uint16_t { + PAUSE = 1U << 0, + RESUME = 1U << 1 + }; + + enum class Status : uint16_t { + DISABLED = 0, + ENABLED = 1 + }; + + enum class StepIcon : uint16_t { + MM10 = 1U << 0, // 10mm + MM1 = 1U << 1, // 1mm + MMP1 = 1U << 2, // 0.1mm + MMP01 = 1U << 3 // 0.01mm + }; + + enum class ExtruderIcon : uint16_t { + E0 = 1U << 0, + E1 = 1U << 1 + }; + + enum class HeaterIcon : uint16_t { + BED = 1U << 0, + H0 = 1U << 1, + H1 = 1U << 2 + }; + + enum class WaitIcon : uint16_t { + ABORT = 1U << 0, + CONTINUE = 1U << 1 + }; + +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h new file mode 100644 index 000000000000..b3d2ad6d3c07 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +enum class DGUS_Screen : uint8_t { + BOOT = 0, + HOME = 1, + PRINT = 2, + PRINT_STATUS = 3, + PRINT_ADJUST = 4, + PRINT_FINISHED = 5, + TEMP_MENU = 6, + TEMP_MANUAL = 7, + FAN = 8, + SETTINGS_MENU = 9, + LEVELING_MENU = 10, + LEVELING_OFFSET = 11, + LEVELING_MANUAL = 12, + LEVELING_AUTOMATIC = 13, + LEVELING_PROBING = 14, + FILAMENT = 15, + MOVE = 16, + GCODE = 17, + SETTINGS_MENU2 = 18, + PID = 19, + VOLUME = 20, + BRIGHTNESS = 21, + INFOS = 22, + DEBUG = 240, + POWERLOSS = 248, + WAIT = 249, + KILL = 250 +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp new file mode 100644 index 000000000000..95e6444956bc --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp @@ -0,0 +1,240 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUS_ScreenAddrList.h" + +#include "../../ui_api.h" + +constexpr DGUS_Addr LIST_HOME[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + (DGUS_Addr)0 +}; + +#if ENABLED(SDSUPPORT) + constexpr DGUS_Addr LIST_PRINT[] PROGMEM = { + DGUS_Addr::SD_Type, + DGUS_Addr::SD_FileName0, + DGUS_Addr::SD_FileName1, + DGUS_Addr::SD_FileName2, + DGUS_Addr::SD_FileName3, + DGUS_Addr::SD_FileName4, + DGUS_Addr::SD_ScrollIcons, + DGUS_Addr::SD_SelectedFileName, + (DGUS_Addr)0 + }; +#endif + +constexpr DGUS_Addr LIST_PRINT_STATUS[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::STATUS_PositionZ, + DGUS_Addr::STATUS_Ellapsed, + DGUS_Addr::STATUS_Percent, + DGUS_Addr::STATUS_Icons, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_PRINT_ADJUST[] PROGMEM = { + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::FAN0_Speed, + DGUS_Addr::ADJUST_Feedrate, + DGUS_Addr::ADJUST_Flowrate_CUR, + DGUS_Addr::LEVEL_OFFSET_Current, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_PRINT_FINISHED[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::STATUS_PositionZ, + DGUS_Addr::STATUS_Ellapsed, + DGUS_Addr::STATUS_Percent_Complete, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_TEMP_MENU[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_TEMP_MANUAL[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Max_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::TEMP_Max_Bed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_FAN[] PROGMEM = { + DGUS_Addr::FAN0_Speed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_SETTINGS_MENU[] PROGMEM = { + DGUS_Addr::STEPPER_Status, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_OFFSET[] PROGMEM = { + DGUS_Addr::LEVEL_OFFSET_Current, + DGUS_Addr::LEVEL_OFFSET_StepIcons, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_MANUAL[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_AUTOMATIC[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::LEVEL_AUTO_DisableIcon, + DGUS_Addr::LEVEL_AUTO_Grid, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_PROBING[] PROGMEM = { + DGUS_Addr::LEVEL_PROBING_Icons1, + DGUS_Addr::LEVEL_PROBING_Icons2, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_FILAMENT[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::FILAMENT_ExtruderIcons, + DGUS_Addr::FILAMENT_Length, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_MOVE[] PROGMEM = { + DGUS_Addr::MOVE_CurrentX, + DGUS_Addr::MOVE_CurrentY, + DGUS_Addr::MOVE_CurrentZ, + DGUS_Addr::MOVE_StepIcons, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_GCODE[] PROGMEM = { + DGUS_Addr::GCODE_Data, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_SETTINGS_MENU2[] PROGMEM = { + DGUS_Addr::SETTINGS2_BLTouch, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_PID[] PROGMEM = { + DGUS_Addr::PID_HeaterIcons, + DGUS_Addr::PID_Temp, + DGUS_Addr::PID_Cycles, + DGUS_Addr::PID_Kp, + DGUS_Addr::PID_Ki, + DGUS_Addr::PID_Kd, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_VOLUME[] PROGMEM = { + DGUS_Addr::VOLUME_Level, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_BRIGHTNESS[] PROGMEM = { + DGUS_Addr::BRIGHTNESS_Level, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_INFOS[] PROGMEM = { + DGUS_Addr::INFOS_Machine, + DGUS_Addr::INFOS_BuildVolume, + DGUS_Addr::INFOS_Version, + DGUS_Addr::INFOS_TotalPrints, + DGUS_Addr::INFOS_FinishedPrints, + DGUS_Addr::INFOS_PrintTime, + DGUS_Addr::INFOS_LongestPrint, + DGUS_Addr::INFOS_FilamentUsed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_WAIT[] PROGMEM = { + DGUS_Addr::WAIT_Icons, + (DGUS_Addr)0 +}; + +#define MAP_HELPER(SCREEN, LIST) \ + { .screen = SCREEN, \ + .addr_list = LIST } + +const struct DGUS_ScreenAddrList screen_addr_list_map[] PROGMEM = { + MAP_HELPER(DGUS_Screen::HOME, LIST_HOME), + #if ENABLED(SDSUPPORT) + MAP_HELPER(DGUS_Screen::PRINT, LIST_PRINT), + #endif + MAP_HELPER(DGUS_Screen::PRINT_STATUS, LIST_PRINT_STATUS), + MAP_HELPER(DGUS_Screen::PRINT_ADJUST, LIST_PRINT_ADJUST), + MAP_HELPER(DGUS_Screen::PRINT_FINISHED, LIST_PRINT_FINISHED), + MAP_HELPER(DGUS_Screen::TEMP_MENU, LIST_TEMP_MENU), + MAP_HELPER(DGUS_Screen::TEMP_MANUAL, LIST_TEMP_MANUAL), + MAP_HELPER(DGUS_Screen::FAN, LIST_FAN), + MAP_HELPER(DGUS_Screen::SETTINGS_MENU, LIST_SETTINGS_MENU), + MAP_HELPER(DGUS_Screen::LEVELING_OFFSET, LIST_LEVELING_OFFSET), + MAP_HELPER(DGUS_Screen::LEVELING_MANUAL, LIST_LEVELING_MANUAL), + MAP_HELPER(DGUS_Screen::LEVELING_AUTOMATIC, LIST_LEVELING_AUTOMATIC), + MAP_HELPER(DGUS_Screen::LEVELING_PROBING, LIST_LEVELING_PROBING), + MAP_HELPER(DGUS_Screen::FILAMENT, LIST_FILAMENT), + MAP_HELPER(DGUS_Screen::MOVE, LIST_MOVE), + MAP_HELPER(DGUS_Screen::GCODE, LIST_GCODE), + MAP_HELPER(DGUS_Screen::SETTINGS_MENU2, LIST_SETTINGS_MENU2), + MAP_HELPER(DGUS_Screen::PID, LIST_PID), + MAP_HELPER(DGUS_Screen::VOLUME, LIST_VOLUME), + MAP_HELPER(DGUS_Screen::BRIGHTNESS, LIST_BRIGHTNESS), + MAP_HELPER(DGUS_Screen::INFOS, LIST_INFOS), + MAP_HELPER(DGUS_Screen::WAIT, LIST_WAIT), + + MAP_HELPER((DGUS_Screen)0, nullptr) +}; + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h new file mode 100644 index 000000000000..af05c46d28fd --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h @@ -0,0 +1,32 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../config/DGUS_Screen.h" +#include "../config/DGUS_Addr.h" + +struct DGUS_ScreenAddrList { + DGUS_Screen screen; + const DGUS_Addr *addr_list; +}; + +extern const struct DGUS_ScreenAddrList screen_addr_list_map[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp new file mode 100644 index 000000000000..213e430334f2 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp @@ -0,0 +1,57 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUS_ScreenSetup.h" + +#include "../DGUSSetupHandler.h" + +#include "../../ui_api.h" + +#define SETUP_HELPER(SCREEN, SETUP) \ + { .screen = SCREEN, \ + .setup_fn = SETUP } + +const struct DGUS_ScreenSetup screen_setup_list[] PROGMEM = { + #if ENABLED(SDSUPPORT) + SETUP_HELPER(DGUS_Screen::PRINT, &DGUSSetupHandler::Print), + #endif + SETUP_HELPER(DGUS_Screen::PRINT_STATUS, &DGUSSetupHandler::PrintStatus), + SETUP_HELPER(DGUS_Screen::PRINT_ADJUST, &DGUSSetupHandler::PrintAdjust), + SETUP_HELPER(DGUS_Screen::LEVELING_MENU, &DGUSSetupHandler::LevelingMenu), + SETUP_HELPER(DGUS_Screen::LEVELING_OFFSET, &DGUSSetupHandler::LevelingOffset), + SETUP_HELPER(DGUS_Screen::LEVELING_MANUAL, &DGUSSetupHandler::LevelingManual), + SETUP_HELPER(DGUS_Screen::LEVELING_AUTOMATIC, &DGUSSetupHandler::LevelingAutomatic), + SETUP_HELPER(DGUS_Screen::LEVELING_PROBING, &DGUSSetupHandler::LevelingProbing), + SETUP_HELPER(DGUS_Screen::FILAMENT, &DGUSSetupHandler::Filament), + SETUP_HELPER(DGUS_Screen::MOVE, &DGUSSetupHandler::Move), + SETUP_HELPER(DGUS_Screen::GCODE, &DGUSSetupHandler::Gcode), + SETUP_HELPER(DGUS_Screen::PID, &DGUSSetupHandler::PID), + SETUP_HELPER(DGUS_Screen::INFOS, &DGUSSetupHandler::Infos), + + SETUP_HELPER((DGUS_Screen)0, nullptr) +}; + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h new file mode 100644 index 000000000000..3b9208e5ec2b --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h @@ -0,0 +1,31 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../config/DGUS_Screen.h" + +struct DGUS_ScreenSetup { + DGUS_Screen screen; + bool (*setup_fn)(void); +}; + +extern const struct DGUS_ScreenSetup screen_setup_list[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h new file mode 100644 index 000000000000..b1b6792224c5 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h @@ -0,0 +1,40 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../config/DGUS_Addr.h" + +#define VPFLAG_NONE 0 +#define VPFLAG_AUTOUPLOAD (1U << 0) // Upload on every DGUS update +#define VPFLAG_RXSTRING (1U << 1) // Treat the received data as a string (terminated with 0xFFFF) + +struct DGUS_VP { + DGUS_Addr addr; + uint8_t size; + uint8_t flags; + void *extra; + + // Callback that will be called if the display modified the value. + // nullptr makes it readonly for the display. + void (*rx_handler)(DGUS_VP &, void *); + void (*tx_handler)(DGUS_VP &); +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp new file mode 100644 index 000000000000..3f5690cfe7bd --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp @@ -0,0 +1,368 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUS_VPList.h" + +#include "../config/DGUS_Addr.h" +#include "../DGUSScreenHandler.h" +#include "../DGUSRxHandler.h" +#include "../DGUSTxHandler.h" + +#include "../../ui_api.h" +#include "../../../../module/probe.h" +#include "../../../../module/motion.h" +#include "../../../../module/temperature.h" + +const char DGUS_MACHINENAME[] PROGMEM = MACHINE_NAME; +const char DGUS_MARLINVERSION[] PROGMEM = SHORT_BUILD_VERSION; + +#define VP_HELPER(ADDR, SIZE, FLAGS, EXTRA, RXHANDLER, TXHANDLER) \ + { .addr = ADDR, \ + .size = SIZE, \ + .flags = FLAGS, \ + .extra = EXTRA, \ + .rx_handler = RXHANDLER, \ + .tx_handler = TXHANDLER } + +#define VP_HELPER_WORD(ADDR, FLAGS, EXTRA, RXHANDLER, TXHANDLER) \ + VP_HELPER(ADDR, 2, FLAGS, EXTRA, RXHANDLER, TXHANDLER) + +#define VP_HELPER_DWORD(ADDR, FLAGS, EXTRA, RXHANDLER, TXHANDLER) \ + VP_HELPER(ADDR, 4, FLAGS, EXTRA, RXHANDLER, TXHANDLER) + +#define VP_HELPER_RX(ADDR, RXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_NONE, nullptr, RXHANDLER, nullptr) + +#define VP_HELPER_RX_NODATA(ADDR, RXHANDLER) \ + VP_HELPER(ADDR, 0, VPFLAG_NONE, nullptr, RXHANDLER, nullptr) + +#define VP_HELPER_TX(ADDR, TXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_NONE, nullptr, nullptr, TXHANDLER) + +#define VP_HELPER_TX_SIZE(ADDR, SIZE, TXHANDLER) \ + VP_HELPER(ADDR, SIZE, VPFLAG_NONE, nullptr, nullptr, TXHANDLER) + +#define VP_HELPER_TX_EXTRA(ADDR, EXTRA, TXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_NONE, EXTRA, nullptr, TXHANDLER) + +#define VP_HELPER_TX_AUTO(ADDR, EXTRA, TXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_AUTOUPLOAD, EXTRA, nullptr, TXHANDLER) + +const struct DGUS_VP vp_list[] PROGMEM = { + + // READ-ONLY VARIABLES + + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE, &DGUSRxHandler::ScreenChange), + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_SD, &DGUSRxHandler::ScreenChange), + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_Idle, &DGUSRxHandler::ScreenChange), + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_Printing, &DGUSRxHandler::ScreenChange), + + #if ENABLED(SDSUPPORT) + VP_HELPER_RX(DGUS_Addr::SD_SelectFile, &DGUSRxHandler::SelectFile), + VP_HELPER_RX(DGUS_Addr::SD_Scroll, &DGUSRxHandler::Scroll), + VP_HELPER_RX_NODATA(DGUS_Addr::SD_Print, &DGUSRxHandler::PrintFile), + #endif + + VP_HELPER_RX(DGUS_Addr::STATUS_Abort, &DGUSRxHandler::PrintAbort), + VP_HELPER_RX(DGUS_Addr::STATUS_Pause, &DGUSRxHandler::PrintPause), + VP_HELPER_RX(DGUS_Addr::STATUS_Resume, &DGUSRxHandler::PrintResume), + + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFeedrate, &DGUSRxHandler::Feedrate), + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_CUR, &DGUSRxHandler::Flowrate), + #if EXTRUDERS > 1 + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E0, &DGUSRxHandler::Flowrate), + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E1, &DGUSRxHandler::Flowrate), + #endif + VP_HELPER_RX(DGUS_Addr::ADJUST_SetBabystep, &DGUSRxHandler::BabystepSet), + VP_HELPER_RX(DGUS_Addr::ADJUST_Babystep, &DGUSRxHandler::Babystep), + + VP_HELPER_RX(DGUS_Addr::TEMP_Preset, &DGUSRxHandler::TempPreset), + VP_HELPER_RX(DGUS_Addr::TEMP_SetTarget_Bed, &DGUSRxHandler::TempTarget), + VP_HELPER_RX(DGUS_Addr::TEMP_SetTarget_H0, &DGUSRxHandler::TempTarget), + #if HOTENDS > 1 + VP_HELPER_RX(DGUS_Addr::TEMP_SetTarget_H1, &DGUSRxHandler::TempTarget), + #endif + VP_HELPER_RX(DGUS_Addr::TEMP_Cool, &DGUSRxHandler::TempCool), + + VP_HELPER_RX(DGUS_Addr::STEPPER_Control, &DGUSRxHandler::Steppers), + + VP_HELPER_RX(DGUS_Addr::LEVEL_OFFSET_Set, &DGUSRxHandler::ZOffset), + VP_HELPER_RX(DGUS_Addr::LEVEL_OFFSET_Step, &DGUSRxHandler::ZOffsetStep), + VP_HELPER_RX(DGUS_Addr::LEVEL_OFFSET_SetStep, &DGUSRxHandler::ZOffsetSetStep), + + VP_HELPER_RX(DGUS_Addr::LEVEL_MANUAL_Point, &DGUSRxHandler::MoveToPoint), + + VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Probe, &DGUSRxHandler::Probe), + VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable, + &DGUSRxHandler::DisableABL), + + VP_HELPER_RX(DGUS_Addr::FILAMENT_Select, &DGUSRxHandler::FilamentSelect), + VP_HELPER_RX(DGUS_Addr::FILAMENT_SetLength, &DGUSRxHandler::FilamentLength), + VP_HELPER_RX(DGUS_Addr::FILAMENT_Move, &DGUSRxHandler::FilamentMove), + + VP_HELPER_RX(DGUS_Addr::MOVE_Home, &DGUSRxHandler::Home), + VP_HELPER_RX(DGUS_Addr::MOVE_SetX, &DGUSRxHandler::Move), + VP_HELPER_RX(DGUS_Addr::MOVE_SetY, &DGUSRxHandler::Move), + VP_HELPER_RX(DGUS_Addr::MOVE_SetZ, &DGUSRxHandler::Move), + VP_HELPER_RX(DGUS_Addr::MOVE_Step, &DGUSRxHandler::MoveStep), + VP_HELPER_RX(DGUS_Addr::MOVE_SetStep, &DGUSRxHandler::MoveSetStep), + + VP_HELPER_RX_NODATA(DGUS_Addr::GCODE_Clear, &DGUSRxHandler::GcodeClear), + VP_HELPER_RX_NODATA(DGUS_Addr::GCODE_Execute, &DGUSRxHandler::GcodeExecute), + + VP_HELPER_RX(DGUS_Addr::EEPROM_Reset, &DGUSRxHandler::ResetEEPROM), + + VP_HELPER_RX(DGUS_Addr::SETTINGS2_Extra, &DGUSRxHandler::SettingsExtra), + + VP_HELPER_RX(DGUS_Addr::PID_Select, &DGUSRxHandler::PIDSelect), + VP_HELPER_RX(DGUS_Addr::PID_SetTemp, &DGUSRxHandler::PIDSetTemp), + VP_HELPER_RX_NODATA(DGUS_Addr::PID_Run, &DGUSRxHandler::PIDRun), + + #if ENABLED(POWER_LOSS_RECOVERY) + VP_HELPER_RX(DGUS_Addr::POWERLOSS_Abort, &DGUSRxHandler::PowerLossAbort), + VP_HELPER_RX(DGUS_Addr::POWERLOSS_Resume, &DGUSRxHandler::PowerLossResume), + #endif + + VP_HELPER_RX(DGUS_Addr::WAIT_Abort, &DGUSRxHandler::WaitAbort), + VP_HELPER_RX_NODATA(DGUS_Addr::WAIT_Continue, &DGUSRxHandler::WaitContinue), + + // WRITE-ONLY VARIABLES + + #if ENABLED(SDSUPPORT) + VP_HELPER_TX(DGUS_Addr::SD_Type, &DGUSTxHandler::FileType), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName0, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName1, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName2, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName3, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName4, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX(DGUS_Addr::SD_ScrollIcons, &DGUSTxHandler::ScrollIcons), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_SelectedFileName, + DGUS_FILENAME_LEN, + &DGUSTxHandler::SelectedFileName), + #endif + + VP_HELPER_TX_AUTO(DGUS_Addr::STATUS_PositionZ, + nullptr, + &DGUSTxHandler::PositionZ), + VP_HELPER(DGUS_Addr::STATUS_Ellapsed, + DGUS_ELLAPSED_LEN, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::Ellapsed), + VP_HELPER_TX_AUTO(DGUS_Addr::STATUS_Percent, + nullptr, + &DGUSTxHandler::Percent), + VP_HELPER_TX(DGUS_Addr::STATUS_Icons, &DGUSTxHandler::StatusIcons), + + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Feedrate, + &feedrate_percentage, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_CUR, + nullptr, + &DGUSTxHandler::Flowrate), + #if EXTRUDERS > 1 + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_E0, + nullptr, + &DGUSTxHandler::Flowrate), + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_E1, + nullptr, + &DGUSTxHandler::Flowrate), + #endif + + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_Bed, + &thermalManager.temp_bed.celsius, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_Bed, + &thermalManager.temp_bed.target, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX(DGUS_Addr::TEMP_Max_Bed, &DGUSTxHandler::TempMax), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H0, + &thermalManager.temp_hotend[ExtUI::heater_t::H0].celsius, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H0, + &thermalManager.temp_hotend[ExtUI::heater_t::H0].target, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX(DGUS_Addr::TEMP_Max_H0, &DGUSTxHandler::TempMax), + #if HOTENDS > 1 + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H1, + &thermalManager.temp_hotend[ExtUI::heater_t::H1].celsius, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H1, + &thermalManager.temp_hotend[ExtUI::heater_t::H1].target, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX(DGUS_Addr::TEMP_Max_H1, &DGUSTxHandler::TempMax), + #endif + + VP_HELPER_TX_AUTO(DGUS_Addr::STEPPER_Status, + nullptr, + &DGUSTxHandler::StepperStatus), + + VP_HELPER_TX_AUTO(DGUS_Addr::LEVEL_OFFSET_Current, + &probe.offset.z, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_EXTRA(DGUS_Addr::LEVEL_OFFSET_StepIcons, + &DGUSScreenHandler::offset_steps, + &DGUSTxHandler::StepIcons), + + VP_HELPER_TX_AUTO(DGUS_Addr::LEVEL_AUTO_DisableIcon, + nullptr, + &DGUSTxHandler::ABLDisableIcon), + VP_HELPER_TX(DGUS_Addr::LEVEL_AUTO_Grid, &DGUSTxHandler::ABLGrid), + + VP_HELPER_TX_EXTRA(DGUS_Addr::LEVEL_PROBING_Icons1, + &DGUSScreenHandler::probing_icons[0], + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_EXTRA(DGUS_Addr::LEVEL_PROBING_Icons2, + &DGUSScreenHandler::probing_icons[1], + &DGUSTxHandler::ExtraToInteger), + + VP_HELPER_TX(DGUS_Addr::FILAMENT_ExtruderIcons, &DGUSTxHandler::FilamentIcons), + VP_HELPER_TX_EXTRA(DGUS_Addr::FILAMENT_Length, + &DGUSScreenHandler::filament_length, + &DGUSTxHandler::ExtraToInteger), + + VP_HELPER_TX_AUTO(DGUS_Addr::MOVE_CurrentX, + ¤t_position.x, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_AUTO(DGUS_Addr::MOVE_CurrentY, + ¤t_position.y, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_AUTO(DGUS_Addr::MOVE_CurrentZ, + ¤t_position.z, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_EXTRA(DGUS_Addr::MOVE_StepIcons, + &DGUSScreenHandler::move_steps, + &DGUSTxHandler::StepIcons), + + VP_HELPER_TX(DGUS_Addr::SETTINGS2_BLTouch, &DGUSTxHandler::BLTouch), + + VP_HELPER_TX(DGUS_Addr::PID_HeaterIcons, &DGUSTxHandler::PIDIcons), + VP_HELPER_TX_EXTRA(DGUS_Addr::PID_Temp, + &DGUSScreenHandler::pid_temp, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_DWORD(DGUS_Addr::PID_Kp, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::PIDKp), + VP_HELPER_DWORD(DGUS_Addr::PID_Ki, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::PIDKi), + VP_HELPER_DWORD(DGUS_Addr::PID_Kd, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::PIDKd), + + VP_HELPER(DGUS_Addr::INFOS_Machine, + DGUS_MACHINE_LEN, + VPFLAG_NONE, + (void*)DGUS_MACHINENAME, + nullptr, + &DGUSTxHandler::ExtraPGMToString), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_BuildVolume, + DGUS_BUILDVOLUME_LEN, + &DGUSTxHandler::BuildVolume), + VP_HELPER(DGUS_Addr::INFOS_Version, + DGUS_VERSION_LEN, + VPFLAG_NONE, + (void*)DGUS_MARLINVERSION, + nullptr, + &DGUSTxHandler::ExtraPGMToString), + VP_HELPER_TX(DGUS_Addr::INFOS_TotalPrints, &DGUSTxHandler::TotalPrints), + VP_HELPER_TX(DGUS_Addr::INFOS_FinishedPrints, &DGUSTxHandler::FinishedPrints), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_PrintTime, + DGUS_PRINTTIME_LEN, + &DGUSTxHandler::PrintTime), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_LongestPrint, + DGUS_LONGESTPRINT_LEN, + &DGUSTxHandler::LongestPrint), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_FilamentUsed, + DGUS_FILAMENTUSED_LEN, + &DGUSTxHandler::FilamentUsed), + + VP_HELPER_TX(DGUS_Addr::WAIT_Icons, &DGUSTxHandler::WaitIcons), + + // READ-WRITE VARIABLES + + VP_HELPER(DGUS_Addr::FAN0_Speed, + 2, + VPFLAG_AUTOUPLOAD, + nullptr, + &DGUSRxHandler::FanSpeed, + &DGUSTxHandler::FanSpeed), + + VP_HELPER(DGUS_Addr::GCODE_Data, + DGUS_GCODE_LEN, + VPFLAG_RXSTRING, + (void*)DGUSScreenHandler::gcode, + &DGUSRxHandler::StringToExtra, + &DGUSTxHandler::ExtraToString), + + VP_HELPER(DGUS_Addr::PID_Cycles, + 2, + VPFLAG_NONE, + &DGUSScreenHandler::pid_cycles, + &DGUSRxHandler::IntegerToExtra, + &DGUSTxHandler::ExtraToInteger), + + VP_HELPER(DGUS_Addr::VOLUME_Level, + 2, + VPFLAG_NONE, + nullptr, + &DGUSRxHandler::Volume, + &DGUSTxHandler::Volume), + + VP_HELPER(DGUS_Addr::BRIGHTNESS_Level, + 2, + VPFLAG_NONE, + nullptr, + &DGUSRxHandler::Brightness, + &DGUSTxHandler::Brightness), + + // SPECIAL CASES + + VP_HELPER_TX(DGUS_Addr::STATUS_Percent_Complete, &DGUSTxHandler::Percent), + VP_HELPER_RX_NODATA(DGUS_Addr::INFOS_Debug, &DGUSRxHandler::Debug), + + VP_HELPER((DGUS_Addr)0, 0, VPFLAG_NONE, nullptr, nullptr, nullptr) + +}; + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h new file mode 100644 index 000000000000..d481fbab5c42 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "DGUS_VP.h" + +extern const struct DGUS_VP vp_list[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp new file mode 100644 index 000000000000..4d57fbd7e2f8 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp @@ -0,0 +1,142 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "../ui_api.h" +#include "DGUSScreenHandler.h" + +namespace ExtUI { + + void onStartup() { dgus_screen_handler.Init(); } + + void onIdle() { + static bool processing = false; + + // Prevent recursion + if (!processing) { + processing = true; + dgus_screen_handler.Loop(); + processing = false; + } + } + + void onPrinterKilled(PGM_P error, PGM_P component) { + dgus_screen_handler.PrinterKilled(error, component); + } + + void onMediaInserted() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardInserted()); } + void onMediaError() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardError()); } + void onMediaRemoved() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardRemoved()); } + + void onPlayTone(const uint16_t frequency, const uint16_t duration) { + dgus_screen_handler.PlayTone(frequency, duration); + } + + void onPrintTimerStarted() { + dgus_screen_handler.PrintTimerStarted(); + } + + void onPrintTimerPaused() { + dgus_screen_handler.PrintTimerPaused(); + } + + void onPrintTimerStopped() { + dgus_screen_handler.PrintTimerStopped(); + } + + void onFilamentRunout(const extruder_t extruder) { + dgus_screen_handler.FilamentRunout(extruder); + } + + void onUserConfirmRequired(const char * const msg) { + dgus_screen_handler.UserConfirmRequired(msg); + } + + void onStatusChanged(const char * const msg) { + dgus_screen_handler.SetStatusMessage(msg); + } + + void onHomingStart() {} + void onHomingComplete() {} + void onPrintFinished() {} + + void onFactoryReset() { + dgus_screen_handler.SettingsReset(); + } + + void onStoreSettings(char *buff) { + dgus_screen_handler.StoreSettings(buff); + } + + void onLoadSettings(const char *buff) { + dgus_screen_handler.LoadSettings(buff); + } + + void onPostprocessSettings() {} + + void onConfigurationStoreWritten(bool success) { + dgus_screen_handler.ConfigurationStoreWritten(success); + } + + void onConfigurationStoreRead(bool success) { + dgus_screen_handler.ConfigurationStoreRead(success); + } + + #if HAS_MESH + void onMeshLevelingStart() {} + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { + dgus_screen_handler.MeshUpdate(xpos, ypos); + } + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { + if (state == G29_POINT_FINISH) + dgus_screen_handler.MeshUpdate(xpos, ypos); + } + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + void onPowerLossResume() { + // Called on resume from power-loss + dgus_screen_handler.PowerLossResume(); + } + #endif + + #if HAS_PID_HEATING + void onPidTuning(const result_t rst) { + // Called for temperature PID tuning result + dgus_screen_handler.PidTuning(rst); + } + #endif + + void onSteppersDisabled() {} + void onSteppersEnabled() {} +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/ini/features.ini b/ini/features.ini index fa7d1519389e..4a1c638de273 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -78,7 +78,8 @@ HAS_MENU_TRAMMING = src_filter=+ ANYCUBIC_LCD_CHIRON = src_filter=+ ANYCUBIC_LCD_I3MEGA = src_filter=+ -HAS_DGUS_LCD = src_filter=+ +HAS_DGUS_LCD_CLASSIC = src_filter=+ +DGUS_LCD_UI_RELOADED = src_filter=+ DGUS_LCD_UI_FYSETC = src_filter=+ DGUS_LCD_UI_HIPRECY = src_filter=+ DGUS_LCD_UI_MKS = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 9ee1e76a5b14..55c7577e3731 100644 --- a/platformio.ini +++ b/platformio.ini @@ -77,6 +77,7 @@ default_src_filter = + - - + - - - - - - - + - - - - From ed0c5aefd8c79d88f5b5fb69baae161b58c72eae Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 7 Sep 2021 00:57:25 +0000 Subject: [PATCH 314/323] [cron] Bump distribution date (2021-09-07) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 45d4db726445..d11b20166e8f 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-06" +//#define STRING_DISTRIBUTION_DATE "2021-09-07" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 2dbbd144e7e1..3139e964752c 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-06" + #define STRING_DISTRIBUTION_DATE "2021-09-07" #endif /** From 43a9c71ef7a1c9e9e294707017d372d344c774ce Mon Sep 17 00:00:00 2001 From: Jyers <76993396+Jyers@users.noreply.github.com> Date: Mon, 6 Sep 2021 21:06:27 -0700 Subject: [PATCH 315/323] =?UTF-8?q?=E2=9C=A8=20Ender-3=20V2=20with=20Jyers?= =?UTF-8?q?=20UI=20(#22422)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 5 + Marlin/Configuration_adv.h | 2 +- Marlin/src/MarlinCore.cpp | 3 + Marlin/src/gcode/feature/powerloss/M1000.cpp | 4 + Marlin/src/inc/Conditionals_LCD.h | 10 +- Marlin/src/inc/Conditionals_adv.h | 2 +- Marlin/src/inc/Conditionals_post.h | 10 +- Marlin/src/inc/SanityCheck.h | 8 +- Marlin/src/lcd/buttons.h | 2 +- .../src/lcd/e3v2/creality/rotary_encoder.cpp | 9 +- Marlin/src/lcd/e3v2/jyersui/README.md | 7 + Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 5041 +++++++++++++++++ Marlin/src/lcd/e3v2/jyersui/dwin.h | 364 ++ Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp | 474 ++ Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h | 218 + .../src/lcd/e3v2/jyersui/rotary_encoder.cpp | 261 + Marlin/src/lcd/e3v2/jyersui/rotary_encoder.h | 91 + Marlin/src/lcd/extui/ui_api.h | 2 +- Marlin/src/lcd/marlinui.cpp | 30 +- Marlin/src/lcd/marlinui.h | 15 +- Marlin/src/module/settings.cpp | 37 + Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 2 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 4 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 2 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 2 +- buildroot/tests/STM32F103RET6_creality | 5 + ini/features.ini | 1 + platformio.ini | 2 +- 29 files changed, 6575 insertions(+), 40 deletions(-) create mode 100644 Marlin/src/lcd/e3v2/jyersui/README.md create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin.cpp create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin.h create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h create mode 100644 Marlin/src/lcd/e3v2/jyersui/rotary_encoder.cpp create mode 100644 Marlin/src/lcd/e3v2/jyersui/rotary_encoder.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index fea0d51e5f1f..a424b1967e37 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2756,6 +2756,11 @@ // //#define DWIN_CREALITY_LCD +// +// Ender-3 v2 OEM display with enhancements by Jacob Myers +// +//#define DWIN_CREALITY_LCD_JYERSUI + // // MarlinUI for Creality's DWIN display (and others) // diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 9e232f95bb1d..6857c4063bba 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1196,7 +1196,7 @@ // @section lcd -#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI) +#if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, HAS_DWIN_E3V2) #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel #define FINE_MANUAL_MOVE 0.025 // (mm) Smallest manual move (< 0.1mm) applying to Z on most machines #if IS_ULTIPANEL diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 6d4e0eab9054..d68e87eb892b 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -77,6 +77,9 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "lcd/e3v2/creality/dwin.h" #include "lcd/e3v2/creality/rotary_encoder.h" +#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "lcd/e3v2/jyersui/dwin.h" + #include "lcd/e3v2/jyersui/rotary_encoder.h" #endif #if ENABLED(EXTENSIBLE_UI) diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index ea92dc66b307..0e731016ddce 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -30,6 +30,8 @@ #include "../../../lcd/marlinui.h" #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented #endif #define DEBUG_OUT ENABLED(DEBUG_POWER_LOSS_RECOVERY) @@ -64,6 +66,8 @@ void GcodeSuite::M1000() { ui.goto_screen(menu_job_recovery); #elif ENABLED(DWIN_CREALITY_LCD) recovery.dwin_flag = true; + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented + CrealityDWIN.Popup_Handler(Resume); #elif ENABLED(EXTENSIBLE_UI) ExtUI::onPowerLossResume(); #else diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 0715b1f5145c..825ad58f9adc 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -493,6 +493,10 @@ #endif // Aliases for LCD features +#if ANY(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_JYERSUI) + #define HAS_DWIN_E3V2 1 +#endif + #if IS_ULTRA_LCD #define HAS_WIRED_LCD 1 #if ENABLED(DOGLCD) @@ -507,11 +511,11 @@ #endif #endif -#if EITHER(HAS_WIRED_LCD, EXTENSIBLE_UI) +#if ANY(HAS_WIRED_LCD, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) #define HAS_DISPLAY 1 #endif -#if ANY(HAS_DISPLAY, DWIN_CREALITY_LCD, GLOBAL_STATUS_MESSAGE) +#if ANY(HAS_DISPLAY, HAS_DWIN_E3V2, GLOBAL_STATUS_MESSAGE) #define HAS_STATUS_MESSAGE 1 #endif @@ -1101,7 +1105,7 @@ #define HAS_ETHERNET 1 #endif -#if EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) #define SERIAL_CATCHALL 0 #ifndef LCD_SERIAL_PORT #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO) diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index c259750c6f6e..9fae92affecd 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -594,7 +594,7 @@ #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define HAS_SOFTWARE_ENDSTOPS 1 #endif -#if ANY(EXTENSIBLE_UI, IS_NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, DWIN_CREALITY_LCD) +#if ANY(EXTENSIBLE_UI, IS_NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, HAS_DWIN_E3V2) #define HAS_RESUME_CONTINUE 1 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index d82b651650ae..6de8dc98608c 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -421,6 +421,10 @@ #endif #endif +#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #define HAS_LCD_BRIGHTNESS 1 +#endif + /** * Override the SD_DETECT_STATE set in Configuration_adv.h * and enable sharing of onboard SD host drives (all platforms but AGCM4) @@ -2828,7 +2832,7 @@ #define HAS_TEMPERATURE 1 #endif -#if HAS_TEMPERATURE && EITHER(HAS_LCD_MENU, DWIN_CREALITY_LCD) +#if HAS_TEMPERATURE && EITHER(HAS_LCD_MENU, HAS_DWIN_E3V2) #ifdef PREHEAT_6_LABEL #define PREHEAT_COUNT 6 #elif defined(PREHEAT_5_LABEL) @@ -2949,7 +2953,7 @@ * Advanced Pause - Filament Change */ #if ENABLED(ADVANCED_PAUSE_FEATURE) - #if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) + #if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) #define M600_PURGE_MORE_RESUMABLE 1 #endif #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH @@ -3205,7 +3209,7 @@ #endif // Number of VFAT entries used. Each entry has 13 UTF-16 characters -#if EITHER(SCROLL_LONG_FILENAMES, DWIN_CREALITY_LCD) +#if EITHER(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2) #define MAX_VFAT_ENTRIES (5) #else #define MAX_VFAT_ENTRIES (2) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 75df13127ca1..59b4a68ff1bc 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -807,10 +807,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #elif PROGRESS_MSG_EXPIRE < 0 #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0." #endif -#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) - #if NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI, IS_DWIN_MARLINUI) - #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, EXTENSIBLE_UI, OR DWIN MarlinUI." - #endif +#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) + #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_*, or EXTENSIBLE_UI." #endif #if ENABLED(USE_M73_REMAINING_TIME) && DISABLED(LCD_SET_PROGRESS_MANUALLY) @@ -2657,7 +2655,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \ + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) \ + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ - + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1) \ + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ diff --git a/Marlin/src/lcd/buttons.h b/Marlin/src/lcd/buttons.h index f39cb0a9aa03..6d028e9bc65a 100644 --- a/Marlin/src/lcd/buttons.h +++ b/Marlin/src/lcd/buttons.h @@ -75,7 +75,7 @@ #endif #endif -#if EITHER(HAS_DIGITAL_BUTTONS, DWIN_CREALITY_LCD) +#if EITHER(HAS_DIGITAL_BUTTONS, HAS_DWIN_E3V2) // Wheel spin pins where BA is 00, 10, 11, 01 (1 bit always changes) #define BLEN_A 0 #define BLEN_B 1 diff --git a/Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp b/Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp index 4fc10393b974..f46fef073e07 100644 --- a/Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp +++ b/Marlin/src/lcd/e3v2/creality/rotary_encoder.cpp @@ -122,8 +122,13 @@ ENCODER_DiffState Encoder_ReceiveAnalyze() { } if (ABS(temp_diff) >= ENCODER_PULSES_PER_STEP) { - if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CW; - else temp_diffState = ENCODER_DIFF_CCW; + #if ENABLED(REVERSE_ENCODER_DIRECTION) + if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CCW; + else temp_diffState = ENCODER_DIFF_CW; + #else + if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CW; + else temp_diffState = ENCODER_DIFF_CCW; + #endif #if ENABLED(ENCODER_RATE_MULTIPLIER) diff --git a/Marlin/src/lcd/e3v2/jyersui/README.md b/Marlin/src/lcd/e3v2/jyersui/README.md new file mode 100644 index 000000000000..10b05455fdaf --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/README.md @@ -0,0 +1,7 @@ +# DWIN for Creality Ender 3 v2 + +Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.0.x/config/examples/Creality/Ender-3%20V2). + +## Easy Install + +Copy the `DWIN_SET` folder onto a Micro-SD card and insert the card into the slot on the DWIN screen. Cycle the machine and wait for the screen to go from blue to orange. Turn the machine off and remove the SD card. When you turn on the machine the screen will display a "Creality" loading screen. diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp new file mode 100644 index 000000000000..e41e51bee42b --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -0,0 +1,5041 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/e3v2/jyersui/dwin.cpp + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + +#include "dwin.h" + +#include "../../marlinui.h" +#include "../../../MarlinCore.h" + +#include "../../../module/temperature.h" +#include "../../../module/planner.h" +#include "../../../module/settings.h" +#include "../../../libs/buzzer.h" +#include "../../../inc/Conditionals_post.h" + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "../../../feature/pause.h" +#endif + +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #include "../../../feature/runout.h" +#endif + +#if ENABLED(HOST_ACTION_COMMANDS) + #include "../../../feature/host_actions.h" +#endif + +#if ANY(BABYSTEPPING, HAS_BED_PROBE, HAS_WORKSPACE_OFFSET) + #define HAS_ZOFFSET_ITEM 1 +#endif + +#ifndef strcasecmp_P + #define strcasecmp_P(a, b) strcasecmp((a), (b)) +#endif + +#if HAS_LEVELING + #include "../../../feature/bedlevel/bedlevel.h" +#endif + +#if ENABLED(AUTO_BED_LEVELING_UBL) + #include "../../../libs/least_squares_fit.h" + #include "../../../libs/vector_3.h" +#endif + +#if HAS_BED_PROBE + #include "../../../module/probe.h" +#endif + +#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT + #define HAS_PREHEAT 1 +#endif + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +#define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) + +#ifndef CORP_WEBSITE + #define CORP_WEBSITE WEBSITE_URL + #endif + +#define DWIN_FONT_MENU font8x16 +#define DWIN_FONT_STAT font10x20 +#define DWIN_FONT_HEAD font10x20 + +#define MENU_CHAR_LIMIT 24 +#define STATUS_Y 352 + +#define MAX_PRINT_SPEED 500 +#define MIN_PRINT_SPEED 10 + +#if HAS_FAN + #define MAX_FAN_SPEED 255 + #define MIN_FAN_SPEED 0 +#endif + +#define MAX_XY_OFFSET 100 + +#if HAS_ZOFFSET_ITEM + #define MAX_Z_OFFSET 9.99 + #if HAS_BED_PROBE + #define MIN_Z_OFFSET -9.99 + #else + #define MIN_Z_OFFSET -1 + #endif +#endif + +#if HAS_HOTEND + #define MAX_FLOW_RATE 200 + #define MIN_FLOW_RATE 10 + + #define MAX_E_TEMP (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT) + #define MIN_E_TEMP 0 +#endif + +#if HAS_HEATED_BED + #define MAX_BED_TEMP BED_MAXTEMP + #define MIN_BED_TEMP 0 +#endif + +constexpr uint16_t TROWS = 6, MROWS = TROWS - 1, + TITLE_HEIGHT = 30, + MLINE = 53, + LBLX = 60, + MENU_CHR_W = 8, MENU_CHR_H = 16, STAT_CHR_W = 10; + +#define MBASE(L) (49 + MLINE * (L)) + +constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; +constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; +constexpr float default_steps[] = DEFAULT_AXIS_STEPS_PER_UNIT; +#if HAS_CLASSIC_JERK + constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; +#endif + +uint8_t active_menu = MainMenu; +uint8_t last_menu = MainMenu; +uint8_t selection = 0; +uint8_t last_selection = 0; +uint8_t scrollpos = 0; +uint8_t process = Main; +uint8_t last_process = Main; +PopupID popup; +PopupID last_popup; + +void (*funcpointer)() = nullptr; +void *valuepointer = nullptr; +float tempvalue; +float valuemin; +float valuemax; +uint8_t valueunit; +uint8_t valuetype; + +char cmd[MAX_CMD_SIZE+16], str_1[16], str_2[16], str_3[16]; +char statusmsg[64]; +char filename[LONG_FILENAME_LENGTH]; +bool printing = false; +bool paused = false; +bool sdprint = false; + +int16_t pausetemp, pausebed, pausefan; + +bool livemove = false; +bool liveadjust = false; +uint8_t preheatmode = 0; +float zoffsetvalue = 0; +uint8_t gridpoint; +float corner_avg; +float corner_pos; + +bool probe_deployed = false; + +CrealityDWINClass CrealityDWIN; + +#if HAS_MESH + struct Mesh_Settings { + bool viewer_asymmetric_range = false; + bool viewer_print_value = false; + bool goto_mesh_value = false; + bool drawing_mesh = false; + uint8_t mesh_x = 0; + uint8_t mesh_y = 0; + + #if ENABLED(AUTO_BED_LEVELING_UBL) + bed_mesh_t &mesh_z_values = ubl.z_values; + uint8_t tilt_grid = 1; + + void manual_value_update(bool undefined=false) { + sprintf_P(cmd, PSTR("M421 I%i J%i Z%s %s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1), undefined ? "N" : ""); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + } + + bool create_plane_from_mesh() { + struct linear_fit_data lsf_results; + incremental_LSF_reset(&lsf_results); + GRID_LOOP(x, y) { + if (!isnan(mesh_z_values[x][y])) { + xy_pos_t rpos; + rpos.x = ubl.mesh_index_to_xpos(x); + rpos.y = ubl.mesh_index_to_ypos(y); + incremental_LSF(&lsf_results, rpos, mesh_z_values[x][y]); + } + } + + if (finish_incremental_LSF(&lsf_results)) { + SERIAL_ECHOPGM("Could not complete LSF!"); + return true; + } + + ubl.set_all_mesh_points_to_value(0); + + matrix_3x3 rotation = matrix_3x3::create_look_at(vector_3(lsf_results.A, lsf_results.B, 1)); + GRID_LOOP(i, j) { + float mx = ubl.mesh_index_to_xpos(i), + my = ubl.mesh_index_to_ypos(j), + mz = mesh_z_values[i][j]; + + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPAIR_F("before rotation = [", mx, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(my, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(mz, 7); + DEBUG_ECHOPGM("] ---> "); + DEBUG_DELAY(20); + } + + rotation.apply_rotation_xyz(mx, my, mz); + + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPAIR_F("after rotation = [", mx, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(my, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(mz, 7); + DEBUG_ECHOLNPGM("]"); + DEBUG_DELAY(20); + } + + mesh_z_values[i][j] = mz - lsf_results.D; + } + return false; + } + + #else + bed_mesh_t &mesh_z_values = z_values; + + void manual_value_update() { + sprintf_P(cmd, PSTR("G29 I%i J%i Z%s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + } + + #endif + + void manual_move(bool zmove=false) { + if (zmove) { + planner.synchronize(); + current_position.z = goto_mesh_value ? mesh_z_values[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES; + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + } + else { + CrealityDWIN.Popup_Handler(MoveWait); + sprintf_P(cmd, PSTR("G0 F300 Z%s"), dtostrf(Z_CLEARANCE_BETWEEN_PROBES, 1, 3, str_1)); + gcode.process_subcommands_now_P(cmd); + sprintf_P(cmd, PSTR("G42 F4000 I%i J%i"), mesh_x, mesh_y); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + current_position.z = goto_mesh_value ? mesh_z_values[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES; + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + CrealityDWIN.Redraw_Menu(); + } + } + + float get_max_value() { + float max = __FLT_MIN__; + GRID_LOOP(x, y) { + if (!isnan(mesh_z_values[x][y]) && mesh_z_values[x][y] > max) + max = mesh_z_values[x][y]; + } + return max; + } + + float get_min_value() { + float min = __FLT_MAX__; + GRID_LOOP(x, y) { + if (!isnan(mesh_z_values[x][y]) && mesh_z_values[x][y] < min) + min = mesh_z_values[x][y]; + } + return min; + } + + void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7) { + drawing_mesh = true; + const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x; + const uint16_t cell_width_px = total_width_px / GRID_MAX_POINTS_X; + const uint16_t cell_height_px = total_width_px / GRID_MAX_POINTS_Y; + const float v_max = abs(get_max_value()), v_min = abs(get_min_value()), range = max(v_min, v_max); + + // Clear background from previous selection and select new square + DWIN_Draw_Rectangle(1, Color_Bg_Black, max(0, padding_x - gridline_width), max(0, padding_y_top - gridline_width), padding_x + total_width_px, padding_y_top + total_width_px); + if (selected >= 0) { + const auto selected_y = selected / GRID_MAX_POINTS_X; + const auto selected_x = selected - (GRID_MAX_POINTS_X * selected_y); + const auto start_y_px = padding_y_top + selected_y * cell_height_px; + const auto start_x_px = padding_x + selected_x * cell_width_px; + DWIN_Draw_Rectangle(1, Color_White, max(0, start_x_px - gridline_width), max(0, start_y_px - gridline_width), start_x_px + cell_width_px, start_y_px + cell_height_px); + } + + // Draw value square grid + char buf[8]; + GRID_LOOP(x, y) { + const auto start_x_px = padding_x + x * cell_width_px; + const auto end_x_px = start_x_px + cell_width_px - 1 - gridline_width; + const auto start_y_px = padding_y_top + (GRID_MAX_POINTS_Y - y - 1) * cell_height_px; + const auto end_y_px = start_y_px + cell_height_px - 1 - gridline_width; + DWIN_Draw_Rectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/ + isnan(mesh_z_values[x][y]) ? Color_Grey : ( // gray if undefined + (mesh_z_values[x][y] < 0 ? + (uint16_t)round(0b11111 * -mesh_z_values[x][y] / (!viewer_asymmetric_range ? range : v_min)) << 11 : // red if mesh point value is negative + (uint16_t)round(0b111111 * mesh_z_values[x][y] / (!viewer_asymmetric_range ? range : v_max)) << 5) | // green if mesh point value is positive + min(0b11111, (((uint8_t)abs(mesh_z_values[x][y]) / 10) * 4))), // + blue stepping for every mm + start_x_px, start_y_px, end_x_px, end_y_px); + while (LCD_SERIAL.availableForWrite() < 32) { // wait for serial to be available without blocking and resetting the MCU + gcode.process_subcommands_now_P("G4 P10"); + planner.synchronize(); + } + // Draw value text on + if (viewer_print_value) { + gcode.process_subcommands_now_P("G4 P10"); // still fails without additional delay... + planner.synchronize(); + int8_t offset_x, offset_y = cell_height_px / 2 - 6; + if (isnan(mesh_z_values[x][y])) { // undefined + DWIN_Draw_String(false, false, font6x12, Color_White, Color_Bg_Blue, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X")); + } + else { // has value + if (GRID_MAX_POINTS_X < 10) + sprintf_P(buf, PSTR("%s"), dtostrf(abs(mesh_z_values[x][y]), 1, 2, str_1)); + else + sprintf_P(buf, PSTR("%02i"), (uint16_t)(abs(mesh_z_values[x][y] - (int16_t)mesh_z_values[x][y]) * 100)); + offset_x = cell_width_px / 2 - 3 * (strlen(buf)) - 2; + if (!(GRID_MAX_POINTS_X < 10)) + DWIN_Draw_String(false, false, font6x12, Color_White, Color_Bg_Blue, start_x_px - 2 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, F(".")); + DWIN_Draw_String(false, false, font6x12, Color_White, Color_Bg_Blue, start_x_px + 1 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, buf); + } + } + } + } + + void Set_Mesh_Viewer_Status() { // TODO: draw gradient with values as a legend instead + float v_max = abs(get_max_value()), v_min = abs(get_min_value()), range = max(v_min, v_max); + if (v_min > 3e+10F) v_min = 0.0000001; + if (v_max > 3e+10F) v_max = 0.0000001; + if (range > 3e+10F) range = 0.0000001; + char msg[32]; + if (viewer_asymmetric_range) { + dtostrf(-v_min, 1, 3, str_1); + dtostrf( v_max, 1, 3, str_2); + } + else { + dtostrf(-range, 1, 3, str_1); + dtostrf( range, 1, 3, str_2); + } + sprintf_P(msg, PSTR("Red %s..0..%s Green"), str_1, str_2); + CrealityDWIN.Update_Status(msg); + drawing_mesh = false; + } + + }; + Mesh_Settings mesh_conf; +#endif + +/* General Display Functions */ + +struct CrealityDWINClass::EEPROM_Settings CrealityDWINClass::eeprom_settings{0}; +constexpr const char * const CrealityDWINClass::color_names[11]; +constexpr const char * const CrealityDWINClass::preheat_modes[3]; + +// Clear a part of the screen +// 4=Entire screen +// 3=Title bar and Menu area (default) +// 2=Menu area +// 1=Title bar +void CrealityDWINClass::Clear_Screen(uint8_t e/*=3*/) { + if (e == 1 || e == 3 || e == 4) DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.menu_top_bg, Color_Bg_Blue, false), 0, 0, DWIN_WIDTH, TITLE_HEIGHT); // Clear Title Bar + if (e == 2 || e == 3) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y); // Clear Menu Area + if (e == 4) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); // Clear Popup Area +} + +void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=false*/, uint8_t minunit/*=10*/) { + const uint8_t digits = (uint8_t)floor(log10(abs(value))) + log10(minunit) + (minunit > 1); + const uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black; + const uint16_t xpos = 240 - (digits * 8); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 194, MBASE(row), 234 - (digits * 8), MBASE(row) + 16); + if (isnan(value)) { + DWIN_Draw_String(false, true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), F(" NaN")); + } + else if (value < 0) { + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), -value * minunit); + DWIN_Draw_String(false, true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), F("-")); + } + else { + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), value * minunit); + DWIN_Draw_String(false, true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), F(" ")); + } +} + +void CrealityDWINClass::Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected/*=false*/, bool color/*=false*/) { + uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black; + uint16_t tColor = (color) ? GetColor(value, Color_White, false) : Color_White; + DWIN_Draw_Rectangle(1, bColor, 202, MBASE(row) + 14, 258, MBASE(row) - 2); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, tColor, bColor, 202, MBASE(row) - 1, options[value]); +} + +uint16_t CrealityDWINClass::GetColor(uint8_t color, uint16_t original, bool light/*=false*/) { + switch (color){ + case Default: + return original; + break; + case White: + return (light) ? Color_Light_White : Color_White; + break; + case Green: + return (light) ? Color_Light_Green : Color_Green; + break; + case Cyan: + return (light) ? Color_Light_Cyan : Color_Cyan; + break; + case Blue: + return (light) ? Color_Light_Blue : Color_Blue; + break; + case Magenta: + return (light) ? Color_Light_Magenta : Color_Magenta; + break; + case Red: + return (light) ? Color_Light_Red : Color_Red; + break; + case Orange: + return (light) ? Color_Light_Orange : Color_Orange; + break; + case Yellow: + return (light) ? Color_Light_Yellow : Color_Yellow; + break; + case Brown: + return (light) ? Color_Light_Brown : Color_Brown; + break; + case Black: + return Color_Black; + break; + } + return Color_White; +} + +void CrealityDWINClass::Draw_Title(const char * title) { + DWIN_Draw_String(false, false, DWIN_FONT_HEAD, GetColor(eeprom_settings.menu_top_txt, Color_White, false), Color_Bg_Blue, (DWIN_WIDTH - strlen(title) * STAT_CHR_W) / 2, 5, title); +} + +void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, const char * label1, const char * label2, bool more/*=false*/, bool centered/*=false*/) { + const uint8_t label_offset_y = !(label1 && label2) ? 0 : MENU_CHR_H * 3 / 5; + const uint8_t label1_offset_x = !centered ? LBLX : LBLX * 4/5 + max(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label1 ? strlen(label1) : 0) * MENU_CHR_W) / 2); + const uint8_t label2_offset_x = !centered ? LBLX : LBLX * 4/5 + max(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label2 ? strlen(label2) : 0) * MENU_CHR_W) / 2); + if (label1) DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, label1_offset_x, MBASE(row) - 1 - label_offset_y, label1); // Draw Label + if (label2) DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, label2_offset_x, MBASE(row) - 1 + label_offset_y, label2); // Draw Label + if (icon) DWIN_ICON_Show(ICON, icon, 26, MBASE(row) - 3); //Draw Menu Icon + if (more) DWIN_ICON_Show(ICON, ICON_More, 226, MBASE(row) - 3); // Draw More Arrow + DWIN_Draw_Line(GetColor(eeprom_settings.menu_split_line, Line_Color, true), 16, MBASE(row) + 33, 256, MBASE(row) + 33); // Draw Menu Line +} + +void CrealityDWINClass::Draw_Checkbox(uint8_t row, bool value) { + #if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS) // Draw appropriate checkbox icon + DWIN_ICON_Show(ICON, (value ? ICON_Checkbox_T : ICON_Checkbox_F), 226, MBASE(row) - 3); + #else // Draw a basic checkbox using rectangles and lines + DWIN_Draw_Rectangle(1, Color_Bg_Black, 226, MBASE(row) - 3, 226 + 20, MBASE(row) - 3 + 20); + DWIN_Draw_Rectangle(0, Color_White, 226, MBASE(row) - 3, 226 + 20, MBASE(row) - 3 + 20); + if (value) { + DWIN_Draw_Line(Check_Color, 227, MBASE(row) - 3 + 11, 226 + 8, MBASE(row) - 3 + 17); + DWIN_Draw_Line(Check_Color, 227 + 8, MBASE(row) - 3 + 17, 226 + 19, MBASE(row) - 3 + 1); + DWIN_Draw_Line(Check_Color, 227, MBASE(row) - 3 + 12, 226 + 8, MBASE(row) - 3 + 18); + DWIN_Draw_Line(Check_Color, 227 + 8, MBASE(row) - 3 + 18, 226 + 19, MBASE(row) - 3 + 2); + DWIN_Draw_Line(Check_Color, 227, MBASE(row) - 3 + 13, 226 + 8, MBASE(row) - 3 + 19); + DWIN_Draw_Line(Check_Color, 227 + 8, MBASE(row) - 3 + 19, 226 + 19, MBASE(row) - 3 + 3); + } + #endif +} + +void CrealityDWINClass::Draw_Menu(uint8_t menu, uint8_t select/*=0*/, uint8_t scroll/*=0*/) { + if (active_menu != menu) { + last_menu = active_menu; + if (process == Menu) last_selection = selection; + } + selection = min(select, Get_Menu_Size(menu)); + scrollpos = scroll; + if (selection - scrollpos > MROWS) + scrollpos = selection - MROWS; + process = Menu; + active_menu = menu; + Clear_Screen(); + Draw_Title(Get_Menu_Title(menu)); + LOOP_L_N(i, TROWS) Menu_Item_Handler(menu, i + scrollpos); + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); +} + +void CrealityDWINClass::Redraw_Menu(bool lastprocess/*=true*/, bool lastselection/*=false*/, bool lastmenu/*=false*/) { + switch ((lastprocess) ? last_process : process) { + case Menu: + Draw_Menu((lastmenu) ? last_menu : active_menu, (lastselection) ? last_selection : selection, (lastmenu) ? 0 : scrollpos); + break; + case Main: Draw_Main_Menu((lastselection) ? last_selection : selection); break; + case Print: Draw_Print_Screen(); break; + case File: Draw_SD_List(); break; + default: break; + } +} + +void CrealityDWINClass::Redraw_Screen() { + Redraw_Menu(false); + Draw_Status_Area(true); + Update_Status_Bar(true); +} + +/* Primary Menus and Screen Elements */ + +void CrealityDWINClass::Main_Menu_Icons() { + if (selection == 0) { + DWIN_ICON_Show(ICON, ICON_Print_1, 17, 130); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 17, 130, 126, 229); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 52, 200, F("Print")); + } + else { + DWIN_ICON_Show(ICON, ICON_Print_0, 17, 130); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 52, 200, F("Print")); + } + if (selection == 1) { + DWIN_ICON_Show(ICON, ICON_Prepare_1, 145, 130); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 145, 130, 254, 229); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 170, 200, F("Prepare")); + } + else { + DWIN_ICON_Show(ICON, ICON_Prepare_0, 145, 130); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 170, 200, F("Prepare")); + } + if (selection == 2) { + DWIN_ICON_Show(ICON, ICON_Control_1, 17, 246); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 17, 246, 126, 345); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 43, 317, F("Control")); + } + else { + DWIN_ICON_Show(ICON, ICON_Control_0, 17, 246); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 43, 317, F("Control")); + } + #if HAS_ABL_OR_UBL + if (selection == 3) { + DWIN_ICON_Show(ICON, ICON_Leveling_1, 145, 246); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 145, 246, 254, 345); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 179, 317, F("Level")); + } + else { + DWIN_ICON_Show(ICON, ICON_Leveling_0, 145, 246); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 179, 317, F("Level")); + } + #else + if (selection == 3) { + DWIN_ICON_Show(ICON, ICON_Info_1, 145, 246); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 145, 246, 254, 345); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 181, 317, F("Info")); + } + else { + DWIN_ICON_Show(ICON, ICON_Info_0, 145, 246); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 181, 317, F("Info")); + //DWIN_Frame_AreaCopy(1, 132, 423, 159, 435, 186, 318); + } + #endif +} + +void CrealityDWINClass::Draw_Main_Menu(uint8_t select/*=0*/) { + process = Main; + active_menu = MainMenu; + selection = select; + Clear_Screen(); + Draw_Title(Get_Menu_Title(MainMenu)); + SERIAL_ECHOPGM("\nDWIN handshake "); + DWIN_ICON_Show(ICON, ICON_LOGO, 71, 72); + Main_Menu_Icons(); +} + +void CrealityDWINClass::Print_Screen_Icons() { + if (selection == 0) { + DWIN_ICON_Show(ICON, ICON_Setup_1, 8, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 8, 252, 87, 351); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 30, 322, F("Tune")); + } + else { + DWIN_ICON_Show(ICON, ICON_Setup_0, 8, 252); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 30, 322, F("Tune")); + } + if (selection == 2) { + DWIN_ICON_Show(ICON, ICON_Stop_1, 184, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 184, 252, 263, 351); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 205, 322, F("Stop")); + } + else { + DWIN_ICON_Show(ICON, ICON_Stop_0, 184, 252); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 205, 322, F("Stop")); + } + if (paused) { + if (selection == 1) { + DWIN_ICON_Show(ICON, ICON_Continue_1, 96, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 96, 252, 175, 351); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Print")); + } + else { + DWIN_ICON_Show(ICON, ICON_Continue_0, 96, 252); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Print")); + } + } + else { + if (selection == 1) { + DWIN_ICON_Show(ICON, ICON_Pause_1, 96, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 96, 252, 175, 351); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Pause")); + } + else { + DWIN_ICON_Show(ICON, ICON_Pause_0, 96, 252); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Pause")); + } + } +} + +void CrealityDWINClass::Draw_Print_Screen() { + process = Print; + selection = 0; + Clear_Screen(); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 352, DWIN_WIDTH - 8, 376); + Draw_Title("Printing..."); + Print_Screen_Icons(); + DWIN_ICON_Show(ICON, ICON_PrintTime, 14, 171); + DWIN_ICON_Show(ICON, ICON_RemainTime, 147, 169); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, 41, 163, "Elapsed"); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, 176, 163, "Remaining"); + Update_Status_Bar(true); + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + TERN_(USE_M73_REMAINING_TIME, Draw_Print_ProgressRemain()); + Draw_Print_Filename(true); +} + +void CrealityDWINClass::Draw_Print_Filename(const bool reset/*=false*/) { + static uint8_t namescrl = 0; + if (reset) namescrl = 0; + if (process == Print) { + size_t len = strlen(filename); + int8_t pos = len; + if (pos > 30) { + pos -= namescrl; + len = _MIN(pos, 30); + char dispname[len + 1]; + if (pos >= 0) { + LOOP_L_N(i, len) dispname[i] = filename[i + namescrl]; + } + else { + LOOP_L_N(i, 30 + pos) dispname[i] = ' '; + LOOP_S_L_N(i, 30 + pos, 30) dispname[i] = filename[i - (30 + pos)]; + } + dispname[len] = '\0'; + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 50, DWIN_WIDTH - 8, 80); + const int8_t npos = (DWIN_WIDTH - 30 * MENU_CHR_W) / 2; + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, npos, 60, dispname); + if (-pos >= 30) namescrl = 0; + namescrl++; + } + else { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 50, DWIN_WIDTH - 8, 80); + const int8_t npos = (DWIN_WIDTH - strlen(filename) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, npos, 60, filename); + } + } +} + +void CrealityDWINClass::Draw_Print_ProgressBar() { + uint8_t printpercent = sdprint ? card.percentDone() : (ui._get_progress() / 100); + DWIN_ICON_Show(ICON, ICON_Bar, 15, 93); + DWIN_Draw_Rectangle(1, BarFill_Color, 16 + printpercent * 240 / 100, 93, 256, 113); + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_percent, Percent_Color), Color_Bg_Black, 3, 109, 133, printpercent); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_percent, Percent_Color), Color_Bg_Black, 133, 133, "%"); +} + +#if ENABLED(USE_M73_REMAINING_TIME) + + void CrealityDWINClass::Draw_Print_ProgressRemain() { + uint16_t remainingtime = ui.get_remaining_time(); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 176, 187, remainingtime / 3600); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 200, 187, (remainingtime % 3600) / 60); + if (eeprom_settings.time_format_textual) { + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 192, 187, "h"); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 216, 187, "m"); + } + else + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 192, 187, ":"); + } + +#endif + +void CrealityDWINClass::Draw_Print_ProgressElapsed() { + duration_t elapsed = print_job_timer.duration(); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 42, 187, elapsed.value / 3600); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 66, 187, (elapsed.value % 3600) / 60); + if (eeprom_settings.time_format_textual) { + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 58, 187, "h"); + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 82, 187, "m"); + } + else + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 58, 187, ":"); +} + +void CrealityDWINClass::Draw_Print_confirm() { + Draw_Print_Screen(); + process = Confirm; + popup = Complete; + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 252, 263, 351); + DWIN_ICON_Show(ICON, ICON_Confirm_E, 87, 283); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 86, 282, 187, 321); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 85, 281, 188, 322); +} + +void CrealityDWINClass::Draw_SD_Item(uint8_t item, uint8_t row) { + if (item == 0) + Draw_Menu_Item(0, ICON_Back, card.flag.workDirIsRoot ? "Back" : ".."); + else { + card.getfilename_sorted(SD_ORDER(item - 1, card.get_num_Files())); + char * const filename = card.longest_filename(); + size_t max = MENU_CHAR_LIMIT; + size_t pos = strlen(filename), len = pos; + if (!card.flag.filenameIsDir) + while (pos && filename[pos] != '.') pos--; + len = pos; + if (len > max) len = max; + char name[len + 1]; + LOOP_L_N(i, len) name[i] = filename[i]; + if (pos > max) + LOOP_S_L_N(i, len - 3, len) name[i] = '.'; + name[len] = '\0'; + Draw_Menu_Item(row, card.flag.filenameIsDir ? ICON_More : ICON_File, name); + } +} + +void CrealityDWINClass::Draw_SD_List(bool removed/*=false*/) { + Clear_Screen(); + Draw_Title("Select File"); + selection = 0; + scrollpos = 0; + process = File; + if (card.isMounted() && !removed) { + LOOP_L_N(i, _MIN(card.get_num_Files() + 1, TROWS)) + Draw_SD_Item(i, i); + } + else { + Draw_Menu_Item(0, ICON_Back, "Back"); + DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4)); + DWIN_Draw_String(false, false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), "No Media"); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(0) - 18, 14, MBASE(0) + 33); +} + +void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) { + + if (icons) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, STATUS_Y, DWIN_WIDTH, DWIN_HEIGHT - 1); + + #if HAS_HOTEND + static float hotend = -1; + static int16_t hotendtarget = -1, flow = -1; + if (icons) { + hotend = -1; + hotendtarget = -1; + DWIN_ICON_Show(ICON, ICON_HotendTemp, 10, 383); + DWIN_Draw_String(false, false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); + } + if (thermalManager.temp_hotend[0].celsius != hotend) { + hotend = thermalManager.temp_hotend[0].celsius; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 28, 384, thermalManager.temp_hotend[0].celsius); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 3 * STAT_CHR_W + 5, 386); + } + if (thermalManager.temp_hotend[0].target != hotendtarget) { + hotendtarget = thermalManager.temp_hotend[0].target; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.temp_hotend[0].target); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 4 * STAT_CHR_W + 39, 386); + } + if (icons) { + flow = -1; + DWIN_ICON_Show(ICON, ICON_StepE, 112, 417); + DWIN_Draw_String(false, false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); + } + if (planner.flow_percentage[0] != flow) { + flow = planner.flow_percentage[0]; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); + } + #endif + + #if HAS_HEATED_BED + static float bed = -1; + static int16_t bedtarget = -1; + if (icons) { + bed = -1; + bedtarget = -1; + DWIN_ICON_Show(ICON, ICON_BedTemp, 10, 416); + DWIN_Draw_String(false, false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); + } + if (thermalManager.temp_bed.celsius != bed) { + bed = thermalManager.temp_bed.celsius; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 28, 417, thermalManager.temp_bed.celsius); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 3 * STAT_CHR_W + 5, 419); + } + if (thermalManager.temp_bed.target != bedtarget) { + bedtarget = thermalManager.temp_bed.target; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.temp_bed.target); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 4 * STAT_CHR_W + 39, 419); + } + #endif + + #if HAS_FAN + static uint8_t fan = -1; + if (icons) { + fan = -1; + DWIN_ICON_Show(ICON, ICON_FanSpeed, 187, 383); + } + if (thermalManager.fan_speed[0] != fan) { + fan = thermalManager.fan_speed[0]; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 195 + 2 * STAT_CHR_W, 384, thermalManager.fan_speed[0]); + } + #endif + + #if HAS_ZOFFSET_ITEM + static float offset = -1; + + if (icons) { + offset = -1; + DWIN_ICON_Show(ICON, ICON_Zoffset, 187, 416); + } + if (zoffsetvalue != offset) { + offset = zoffsetvalue; + if (zoffsetvalue < 0) { + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, -zoffsetvalue * 100); + DWIN_Draw_String(false, true, DWIN_FONT_MENU, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 205, 419, "-"); + } + else { + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, zoffsetvalue* 100); + DWIN_Draw_String(false, true, DWIN_FONT_MENU, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 205, 419, " "); + } + } + #endif + + static int16_t feedrate = -1; + if (icons) { + feedrate = -1; + DWIN_ICON_Show(ICON, ICON_Speed, 113, 383); + DWIN_Draw_String(false, false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); + } + if (feedrate_percentage != feedrate) { + feedrate = feedrate_percentage; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 384, feedrate_percentage); + } + + static float x = -1, y = -1, z = -1; + static bool update_x = false, update_y = false, update_z = false; + update_x = (current_position.x != x || axis_should_home(X_AXIS) || update_x); + update_y = (current_position.y != y || axis_should_home(Y_AXIS) || update_y); + update_z = (current_position.z != z || axis_should_home(Z_AXIS) || update_z); + if (icons) { + x = y = z = -1; + DWIN_Draw_Line(GetColor(eeprom_settings.coordinates_split_line, Line_Color, true), 16, 450, 256, 450); + DWIN_ICON_Show(ICON, ICON_MaxSpeedX, 10, 456); + DWIN_ICON_Show(ICON, ICON_MaxSpeedY, 95, 456); + DWIN_ICON_Show(ICON, ICON_MaxSpeedZ, 180, 456); + } + if (update_x) { + x = current_position.x; + if ((update_x = axis_should_home(X_AXIS) && ui.get_blink())) + DWIN_Draw_String(false, true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 35, 459, " -?- "); + else + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 1, 35, 459, current_position.x * 10); + } + if (update_y) { + y = current_position.y; + if ((update_y = axis_should_home(Y_AXIS) && ui.get_blink())) + DWIN_Draw_String(false, true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 120, 459, " -?- "); + else + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 1, 120, 459, current_position.y * 10); + } + if (update_z) { + z = current_position.z; + if ((update_z = axis_should_home(Z_AXIS) && ui.get_blink())) + DWIN_Draw_String(false, true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 205, 459, " -?- "); + else + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 2, 205, 459, (current_position.z>=0) ? current_position.z * 100 : 0); + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Draw_Popup(PGM_P const line1, PGM_P const line2, PGM_P const line3, uint8_t mode, uint8_t icon/*=0*/) { + if (process != Confirm && process != Popup && process != Wait) last_process = process; + if ((process == Menu || process == Wait) && mode == Popup) last_selection = selection; + process = mode; + Clear_Screen(); + DWIN_Draw_Rectangle(0, Color_White, 13, 59, 259, 351); + DWIN_Draw_Rectangle(1, Color_Bg_Window, 14, 60, 258, 350); + const uint8_t ypos = (mode == Popup || mode == Confirm) ? 150 : 230; + if (icon > 0) DWIN_ICON_Show(ICON, icon, 101, 105); + DWIN_Draw_String(false, true, DWIN_FONT_MENU, Popup_Text_Color, Color_Bg_Window, (272 - 8 * strlen_P(line1)) / 2, ypos, line1); + DWIN_Draw_String(false, true, DWIN_FONT_MENU, Popup_Text_Color, Color_Bg_Window, (272 - 8 * strlen_P(line2)) / 2, ypos + 30, line2); + DWIN_Draw_String(false, true, DWIN_FONT_MENU, Popup_Text_Color, Color_Bg_Window, (272 - 8 * strlen_P(line3)) / 2, ypos + 60, line3); + if (mode == Popup) { + selection = 0; + DWIN_Draw_Rectangle(1, Confirm_Color, 26, 280, 125, 317); + DWIN_Draw_Rectangle(1, Cancel_Color, 146, 280, 245, 317); + DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Window, 39, 290, "Confirm"); + DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Window, 165, 290, "Cancel"); + Popup_Select(); + } + else if (mode == Confirm) { + DWIN_Draw_Rectangle(1, Confirm_Color, 87, 280, 186, 317); + DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Window, 96, 290, "Continue"); + } +} + +void MarlinUI::kill_screen(PGM_P const error, PGM_P const component) { + CrealityDWIN.Draw_Popup(PSTR("Printer Kill Reason:"), error, PSTR("Restart Required"), Wait, ICON_BLTouch); +} + +void CrealityDWINClass::Popup_Select() { + const uint16_t c1 = (selection == 0) ? GetColor(eeprom_settings.highlight_box, Color_White) : Color_Bg_Window, + c2 = (selection == 0) ? Color_Bg_Window : GetColor(eeprom_settings.highlight_box, Color_White); + DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); + DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); + DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); + DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); +} + +void CrealityDWINClass::Update_Status_Bar(bool refresh/*=false*/) { + static bool new_msg; + static uint8_t msgscrl = 0; + static char lastmsg[64]; + if (strcmp_P(lastmsg, statusmsg) != 0 || refresh) { + strcpy_P(lastmsg, statusmsg); + msgscrl = 0; + new_msg = true; + } + size_t len = strlen(statusmsg); + int8_t pos = len; + if (pos > 30) { + pos -= msgscrl; + len = pos; + if (len > 30) + len = 30; + char dispmsg[len + 1]; + if (pos >= 0) { + LOOP_L_N(i, len) dispmsg[i] = statusmsg[i + msgscrl]; + } + else { + LOOP_L_N(i, 30 + pos) dispmsg[i] = ' '; + LOOP_S_L_N(i, 30 + pos, 30) dispmsg[i] = statusmsg[i - (30 + pos)]; + } + dispmsg[len] = '\0'; + if (process == Print) { + DWIN_Draw_Rectangle(1, Color_Grey, 8, 214, DWIN_WIDTH - 8, 238); + const int8_t npos = (DWIN_WIDTH - 30 * MENU_CHR_W) / 2; + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 219, dispmsg); + } + else { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 352, DWIN_WIDTH - 8, 376); + const int8_t npos = (DWIN_WIDTH - 30 * MENU_CHR_W) / 2; + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 357, dispmsg); + } + if (-pos >= 30) msgscrl = 0; + msgscrl++; + } + else { + if (new_msg) { + new_msg = false; + if (process == Print) { + DWIN_Draw_Rectangle(1, Color_Grey, 8, 214, DWIN_WIDTH - 8, 238); + const int8_t npos = (DWIN_WIDTH - strlen(statusmsg) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 219, statusmsg); + } + else { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 352, DWIN_WIDTH - 8, 376); + const int8_t npos = (DWIN_WIDTH - strlen(statusmsg) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 357, statusmsg); + } + } + } +} + +/* Menu Item Config */ + +void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/*=true*/) { + uint8_t row = item - scrollpos; + #if HAS_LEVELING + static bool level_state; + #endif + switch (menu) { + case Prepare: + + #define PREPARE_BACK 0 + #define PREPARE_MOVE (PREPARE_BACK + 1) + #define PREPARE_DISABLE (PREPARE_MOVE + 1) + #define PREPARE_HOME (PREPARE_DISABLE + 1) + #define PREPARE_MANUALLEVEL (PREPARE_HOME + 1) + #define PREPARE_ZOFFSET (PREPARE_MANUALLEVEL + ENABLED(HAS_ZOFFSET_ITEM)) + #define PREPARE_PREHEAT (PREPARE_ZOFFSET + ENABLED(HAS_PREHEAT)) + #define PREPARE_COOLDOWN (PREPARE_PREHEAT + ENABLED(HAS_PREHEAT)) + #define PREPARE_CHANGEFIL (PREPARE_COOLDOWN + ENABLED(ADVANCED_PAUSE_FEATURE)) + #define PREPARE_TOTAL PREPARE_CHANGEFIL + + switch (item) { + case PREPARE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Main_Menu(1); + break; + case PREPARE_MOVE: + if (draw) + Draw_Menu_Item(row, ICON_Axis, "Move", nullptr, true); + else + Draw_Menu(Move); + break; + case PREPARE_DISABLE: + if (draw) + Draw_Menu_Item(row, ICON_CloseMotor, "Disable Stepper"); + else + queue.inject_P(PSTR("M84")); + break; + case PREPARE_HOME: + if (draw) + Draw_Menu_Item(row, ICON_SetHome, "Homing", nullptr, true); + else + Draw_Menu(HomeMenu); + break; + case PREPARE_MANUALLEVEL: + if (draw) + Draw_Menu_Item(row, ICON_PrintSize, "Manual Leveling", nullptr, true); + else { + if (axes_should_home()) { + Popup_Handler(Home); + gcode.home_all_axes(true); + } + #if HAS_LEVELING + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + #endif + Draw_Menu(ManualLevel); + } + break; + + #if HAS_ZOFFSET_ITEM + case PREPARE_ZOFFSET: + if (draw) + Draw_Menu_Item(row, ICON_Zoffset, "Z-Offset", nullptr, true); + else { + #if HAS_LEVELING + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + #endif + Draw_Menu(ZOffset); + } + break; + #endif + + #if HAS_PREHEAT + case PREPARE_PREHEAT: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, "Preheat", nullptr, true); + else + Draw_Menu(Preheat); + break; + case PREPARE_COOLDOWN: + if (draw) + Draw_Menu_Item(row, ICON_Cool, "Cooldown"); + else { + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + thermalManager.disable_all_heaters(); + } + break; + #endif + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case PREPARE_CHANGEFIL: + if (draw) { + Draw_Menu_Item(row, ICON_ResumeEEPROM, "Change Filament" + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + , nullptr, true + #endif + ); + } + else { + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + Draw_Menu(ChangeFilament); + #else + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + } + #endif + } + break; + #endif + } + break; + + case HomeMenu: + + #define HOME_BACK 0 + #define HOME_ALL (HOME_BACK + 1) + #define HOME_X (HOME_ALL + 1) + #define HOME_Y (HOME_X + 1) + #define HOME_Z (HOME_Y + 1) + #define HOME_SET (HOME_Z + 1) + #define HOME_TOTAL HOME_SET + + switch (item) { + case HOME_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Prepare, PREPARE_HOME); + break; + case HOME_ALL: + if (draw) + Draw_Menu_Item(row, ICON_Homing, "Home All"); + else { + Popup_Handler(Home); + gcode.home_all_axes(true); + Redraw_Menu(); + } + break; + case HOME_X: + if (draw) + Draw_Menu_Item(row, ICON_MoveX, "Home X"); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 X")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOME_Y: + if (draw) + Draw_Menu_Item(row, ICON_MoveY, "Home Y"); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 Y")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOME_Z: + if (draw) + Draw_Menu_Item(row, ICON_MoveZ,"Home Z"); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 Z")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOME_SET: + if (draw) + Draw_Menu_Item(row, ICON_SetHome, "Set Home Position"); + else { + gcode.process_subcommands_now_P(PSTR("G92 X0 Y0 Z0")); + AudioFeedback(); + } + break; + } + break; + + case Move: + + #define MOVE_BACK 0 + #define MOVE_X (MOVE_BACK + 1) + #define MOVE_Y (MOVE_X + 1) + #define MOVE_Z (MOVE_Y + 1) + #define MOVE_E (MOVE_Z + ENABLED(HAS_HOTEND)) + #define MOVE_P (MOVE_E + ENABLED(HAS_BED_PROBE)) + #define MOVE_LIVE (MOVE_P + 1) + #define MOVE_TOTAL MOVE_LIVE + + switch (item) { + case MOVE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else { + #if HAS_BED_PROBE + probe_deployed = false; + probe.set_deployed(probe_deployed); + #endif + Draw_Menu(Prepare, PREPARE_MOVE); + } + break; + case MOVE_X: + if (draw) { + Draw_Menu_Item(row, ICON_MoveX, "Move X"); + Draw_Float(current_position.x, row, false); + } + else + Modify_Value(current_position.x, X_MIN_POS, X_MAX_POS, 10); + break; + case MOVE_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MoveY, "Move Y"); + Draw_Float(current_position.y, row); + } + else + Modify_Value(current_position.y, Y_MIN_POS, Y_MAX_POS, 10); + break; + case MOVE_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MoveZ, "Move Z"); + Draw_Float(current_position.z, row); + } + else + Modify_Value(current_position.z, Z_MIN_POS, Z_MAX_POS, 10); + break; + + #if HAS_HOTEND + case MOVE_E: + if (draw) { + Draw_Menu_Item(row, ICON_Extruder, "Extruder"); + current_position.e = 0; + sync_plan_position(); + Draw_Float(current_position.e, row); + } + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) { + Popup_Handler(ETemp); + } + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + Redraw_Menu(); + } + current_position.e = 0; + sync_plan_position(); + Modify_Value(current_position.e, -500, 500, 10); + } + } + break; + #endif // HAS_HOTEND + + #if HAS_BED_PROBE + case MOVE_P: + if (draw) { + Draw_Menu_Item(row, ICON_StockConfiguraton, "Probe"); + Draw_Checkbox(row, probe_deployed); + } + else { + probe_deployed = !probe_deployed; + probe.set_deployed(probe_deployed); + Draw_Checkbox(row, probe_deployed); + } + break; + #endif + + case MOVE_LIVE: + if (draw) { + Draw_Menu_Item(row, ICON_Axis, "Live Movement"); + Draw_Checkbox(row, livemove); + } + else { + livemove = !livemove; + Draw_Checkbox(row, livemove); + } + break; + } + break; + case ManualLevel: + + #define MLEVEL_BACK 0 + #define MLEVEL_PROBE (MLEVEL_BACK + ENABLED(HAS_BED_PROBE)) + #define MLEVEL_BL (MLEVEL_PROBE + 1) + #define MLEVEL_TL (MLEVEL_BL + 1) + #define MLEVEL_TR (MLEVEL_TL + 1) + #define MLEVEL_BR (MLEVEL_TR + 1) + #define MLEVEL_C (MLEVEL_BR + 1) + #define MLEVEL_ZPOS (MLEVEL_C + 1) + #define MLEVEL_TOTAL MLEVEL_ZPOS + + static float mlev_z_pos = 0; + static bool use_probe = false; + + switch (item) { + case MLEVEL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else { + TERN_(HAS_LEVELING, set_bed_leveling_enabled(level_state)); + Draw_Menu(Prepare, PREPARE_MANUALLEVEL); + } + break; + #if HAS_BED_PROBE + case MLEVEL_PROBE: + if (draw) { + Draw_Menu_Item(row, ICON_Zoffset, "Use Probe"); + Draw_Checkbox(row, use_probe); + } + else { + use_probe = !use_probe; + Draw_Checkbox(row, use_probe); + if (use_probe) { + Popup_Handler(Level); + corner_avg = 0; + #define PROBE_X_MIN _MAX(0 + corner_pos, X_MIN_POS + probe.offset.x, X_MIN_POS + PROBING_MARGIN) - probe.offset.x + #define PROBE_X_MAX _MIN((X_BED_SIZE + X_MIN_POS) - corner_pos, X_MAX_POS + probe.offset.x, X_MAX_POS - PROBING_MARGIN) - probe.offset.x + #define PROBE_Y_MIN _MAX(0 + corner_pos, Y_MIN_POS + probe.offset.y, Y_MIN_POS + PROBING_MARGIN) - probe.offset.y + #define PROBE_Y_MAX _MIN((Y_BED_SIZE + Y_MIN_POS) - corner_pos, Y_MAX_POS + probe.offset.y, Y_MAX_POS - PROBING_MARGIN) - probe.offset.y + corner_avg += probe.probe_at_point(PROBE_X_MIN, PROBE_Y_MIN, PROBE_PT_RAISE, 0, false); + corner_avg += probe.probe_at_point(PROBE_X_MIN, PROBE_Y_MAX, PROBE_PT_RAISE, 0, false); + corner_avg += probe.probe_at_point(PROBE_X_MAX, PROBE_Y_MAX, PROBE_PT_RAISE, 0, false); + corner_avg += probe.probe_at_point(PROBE_X_MAX, PROBE_Y_MIN, PROBE_PT_STOW, 0, false); + corner_avg /= 4; + Redraw_Menu(); + } + } + break; + #endif + case MLEVEL_BL: + if (draw) + Draw_Menu_Item(row, ICON_AxisBL, "Bottom Left"); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_TL: + if (draw) + Draw_Menu_Item(row, ICON_AxisTL, "Top Left"); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_TR: + if (draw) + Draw_Menu_Item(row, ICON_AxisTR, "Top Right"); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_BR: + if (draw) + Draw_Menu_Item(row, ICON_AxisBR, "Bottom Right"); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_C: + if (draw) + Draw_Menu_Item(row, ICON_AxisC, "Center"); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(X_MAX_POS / 2.0f - probe.offset.x, 1, 3, str_1), dtostrf(Y_MAX_POS / 2.0f - probe.offset.y, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_ZPOS: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, "Z Position"); + Draw_Float(mlev_z_pos, row, false, 100); + } + else + Modify_Value(mlev_z_pos, 0, MAX_Z_OFFSET, 100); + break; + } + break; + #if HAS_ZOFFSET_ITEM + case ZOffset: + + #define ZOFFSET_BACK 0 + #define ZOFFSET_HOME (ZOFFSET_BACK + 1) + #define ZOFFSET_MODE (ZOFFSET_HOME + 1) + #define ZOFFSET_OFFSET (ZOFFSET_MODE + 1) + #define ZOFFSET_UP (ZOFFSET_OFFSET + 1) + #define ZOFFSET_DOWN (ZOFFSET_UP + 1) + #define ZOFFSET_SAVE (ZOFFSET_DOWN + ENABLED(EEPROM_SETTINGS)) + #define ZOFFSET_TOTAL ZOFFSET_SAVE + + switch (item) { + case ZOFFSET_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else { + liveadjust = false; + TERN_(HAS_LEVELING, set_bed_leveling_enabled(level_state)); + Draw_Menu(Prepare, PREPARE_ZOFFSET); + } + break; + case ZOFFSET_HOME: + if (draw) + Draw_Menu_Item(row, ICON_Homing, "Home Z Axis"); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 Z")); + Popup_Handler(MoveWait); + #if ENABLED(Z_SAFE_HOMING) + planner.synchronize(); + sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + #else + gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5")); + #endif + gcode.process_subcommands_now_P(PSTR("G0 F300 Z0")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case ZOFFSET_MODE: + if (draw) { + Draw_Menu_Item(row, ICON_Zoffset, "Live Adjustment"); + Draw_Checkbox(row, liveadjust); + } + else { + if (!liveadjust) { + if (axes_should_home()) { + Popup_Handler(Home); + gcode.home_all_axes(true); + } + Popup_Handler(MoveWait); + #if ENABLED(Z_SAFE_HOMING) + planner.synchronize(); + sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + #else + gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5")); + #endif + gcode.process_subcommands_now_P(PSTR("G0 F300 Z0")); + planner.synchronize(); + Redraw_Menu(); + } + liveadjust = !liveadjust; + Draw_Checkbox(row, liveadjust); + } + break; + case ZOFFSET_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, "Z Offset"); + Draw_Float(zoffsetvalue, row, false, 100); + } + else + Modify_Value(zoffsetvalue, MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + break; + case ZOFFSET_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, "Microstep Up"); + else { + if (zoffsetvalue < MAX_Z_OFFSET) { + if (liveadjust) { + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + } + zoffsetvalue += 0.01; + Draw_Float(zoffsetvalue, row - 1, false, 100); + } + } + break; + case ZOFFSET_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, "Microstep Down"); + else { + if (zoffsetvalue > MIN_Z_OFFSET) { + if (liveadjust) { + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + } + zoffsetvalue -= 0.01; + Draw_Float(zoffsetvalue, row - 2, false, 100); + } + } + break; + #if ENABLED(EEPROM_SETTINGS) + case ZOFFSET_SAVE: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, "Save"); + else + AudioFeedback(settings.save()); + break; + #endif + } + break; + #endif + #if HAS_PREHEAT + case Preheat: + + #define PREHEAT_BACK 0 + #define PREHEAT_MODE (PREHEAT_BACK + 1) + #define PREHEAT_1 (PREHEAT_MODE + (PREHEAT_COUNT >= 1)) + #define PREHEAT_2 (PREHEAT_1 + (PREHEAT_COUNT >= 2)) + #define PREHEAT_3 (PREHEAT_2 + (PREHEAT_COUNT >= 3)) + #define PREHEAT_4 (PREHEAT_3 + (PREHEAT_COUNT >= 4)) + #define PREHEAT_5 (PREHEAT_4 + (PREHEAT_COUNT >= 5)) + #define PREHEAT_TOTAL PREHEAT_5 + + switch (item) { + case PREHEAT_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Prepare, PREPARE_PREHEAT); + break; + case PREHEAT_MODE: + if (draw) { + Draw_Menu_Item(row, ICON_Homing, "Preheat Mode"); + Draw_Option(preheatmode, preheat_modes, row); + } + else + Modify_Option(preheatmode, preheat_modes, 2); + break; + + #if PREHEAT_COUNT >= 1 + case PREHEAT_1: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_1_LABEL); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[0].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 2 + case PREHEAT_2: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_2_LABEL); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[1].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 3 + case PREHEAT_3: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_3_LABEL); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[2].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[2].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[2].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 4 + case PREHEAT_4: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_4_LABEL); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[3].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[3].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[3].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 5 + case PREHEAT_5: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_5_LABEL); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[4].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[4].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[4].bed_temp); + #endif + } + break; + #endif + } + break; + #endif + + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: + + #define CHANGEFIL_BACK 0 + #define CHANGEFIL_LOAD (CHANGEFIL_BACK + 1) + #define CHANGEFIL_UNLOAD (CHANGEFIL_LOAD + 1) + #define CHANGEFIL_CHANGE (CHANGEFIL_UNLOAD + 1) + #define CHANGEFIL_TOTAL CHANGEFIL_CHANGE + + switch (item) { + case CHANGEFIL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Prepare, PREPARE_CHANGEFIL); + break; + case CHANGEFIL_LOAD: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, "Load Filament"); + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilLoad); + gcode.process_subcommands_now_P(PSTR("M701")); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case CHANGEFIL_UNLOAD: + if (draw) + Draw_Menu_Item(row, ICON_ReadEEPROM, "Unload Filament"); + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) { + Popup_Handler(ETemp); + } + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilLoad, true); + gcode.process_subcommands_now_P(PSTR("M702")); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case CHANGEFIL_CHANGE: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, "Change Filament"); + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + } + } + break; + } + break; + #endif // FILAMENT_LOAD_UNLOAD_GCODES + + case Control: + + #define CONTROL_BACK 0 + #define CONTROL_TEMP (CONTROL_BACK + 1) + #define CONTROL_MOTION (CONTROL_TEMP + 1) + #define CONTROL_VISUAL (CONTROL_MOTION + 1) + #define CONTROL_ADVANCED (CONTROL_VISUAL + 1) + #define CONTROL_SAVE (CONTROL_ADVANCED + ENABLED(EEPROM_SETTINGS)) + #define CONTROL_RESTORE (CONTROL_SAVE + ENABLED(EEPROM_SETTINGS)) + #define CONTROL_RESET (CONTROL_RESTORE + ENABLED(EEPROM_SETTINGS)) + #define CONTROL_INFO (CONTROL_RESET + 1) + #define CONTROL_TOTAL CONTROL_INFO + + switch (item) { + case CONTROL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Main_Menu(2); + break; + case CONTROL_TEMP: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, "Temperature", nullptr, true); + else + Draw_Menu(TempMenu); + break; + case CONTROL_MOTION: + if (draw) + Draw_Menu_Item(row, ICON_Motion, "Motion", nullptr, true); + else + Draw_Menu(Motion); + break; + case CONTROL_VISUAL: + if (draw) + Draw_Menu_Item(row, ICON_PrintSize, "Visual", nullptr, true); + else + Draw_Menu(Visual); + break; + case CONTROL_ADVANCED: + if (draw) + Draw_Menu_Item(row, ICON_Version, "Advanced", nullptr, true); + else + Draw_Menu(Advanced); + break; + #if ENABLED(EEPROM_SETTINGS) + case CONTROL_SAVE: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, "Store Settings"); + else + AudioFeedback(settings.save()); + break; + case CONTROL_RESTORE: + if (draw) + Draw_Menu_Item(row, ICON_ReadEEPROM, "Restore Settings"); + else + AudioFeedback(settings.load()); + break; + case CONTROL_RESET: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, "Reset to Defaults"); + else { + settings.reset(); + AudioFeedback(); + } + break; + #endif + case CONTROL_INFO: + if (draw) + Draw_Menu_Item(row, ICON_Info, "Info"); + else + Draw_Menu(Info); + break; + } + break; + + case TempMenu: + + #define TEMP_BACK 0 + #define TEMP_HOTEND (TEMP_BACK + ENABLED(HAS_HOTEND)) + #define TEMP_BED (TEMP_HOTEND + ENABLED(HAS_HEATED_BED)) + #define TEMP_FAN (TEMP_BED + ENABLED(HAS_FAN)) + #define TEMP_PID (TEMP_FAN + ANY(HAS_HOTEND, HAS_HEATED_BED)) + #define TEMP_PREHEAT1 (TEMP_PID + (PREHEAT_COUNT >= 1)) + #define TEMP_PREHEAT2 (TEMP_PREHEAT1 + (PREHEAT_COUNT >= 2)) + #define TEMP_PREHEAT3 (TEMP_PREHEAT2 + (PREHEAT_COUNT >= 3)) + #define TEMP_PREHEAT4 (TEMP_PREHEAT3 + (PREHEAT_COUNT >= 4)) + #define TEMP_PREHEAT5 (TEMP_PREHEAT4 + (PREHEAT_COUNT >= 5)) + #define TEMP_TOTAL TEMP_PREHEAT5 + + switch (item) { + case TEMP_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Control, CONTROL_TEMP); + break; + #if HAS_HOTEND + case TEMP_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, "Hotend"); + Draw_Float(thermalManager.temp_hotend[0].target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_hotend[0].target, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case TEMP_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, "Bed"); + Draw_Float(thermalManager.temp_bed.target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_bed.target, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case TEMP_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Fan"); + Draw_Float(thermalManager.fan_speed[0], row, false, 1); + } + else + Modify_Value(thermalManager.fan_speed[0], MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + #if HAS_HOTEND || HAS_HEATED_BED + case TEMP_PID: + if (draw) + Draw_Menu_Item(row, ICON_Step, "PID", nullptr, true); + else + Draw_Menu(PID); + break; + #endif + #if PREHEAT_COUNT >= 1 + case TEMP_PREHEAT1: + if (draw) + Draw_Menu_Item(row, ICON_Step, PREHEAT_1_LABEL, nullptr, true); + else + Draw_Menu(Preheat1); + break; + #endif + #if PREHEAT_COUNT >= 2 + case TEMP_PREHEAT2: + if (draw) + Draw_Menu_Item(row, ICON_Step, PREHEAT_2_LABEL, nullptr, true); + else + Draw_Menu(Preheat2); + break; + #endif + #if PREHEAT_COUNT >= 3 + case TEMP_PREHEAT3: + if (draw) + Draw_Menu_Item(row, ICON_Step, PREHEAT_3_LABEL, nullptr, true); + else + Draw_Menu(Preheat3); + break; + #endif + #if PREHEAT_COUNT >= 4 + case TEMP_PREHEAT4: + if (draw) + Draw_Menu_Item(row, ICON_Step, PREHEAT_4_LABEL, nullptr, true); + else + Draw_Menu(Preheat4); + break; + #endif + #if PREHEAT_COUNT >= 5 + case TEMP_PREHEAT5: + if (draw) + Draw_Menu_Item(row, ICON_Step, PREHEAT_5_LABEL, nullptr, true); + else + Draw_Menu(Preheat5); + break; + #endif + } + break; + + #if HAS_HOTEND || HAS_HEATED_BED + case PID: + + #define PID_BACK 0 + #define PID_HOTEND (PID_BACK + ENABLED(HAS_HOTEND)) + #define PID_BED (PID_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PID_CYCLES (PID_BED + 1) + #define PID_TOTAL PID_CYCLES + + static uint8_t PID_cycles = 5; + + switch (item) { + case PID_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(TempMenu, TEMP_PID); + break; + #if HAS_HOTEND + case PID_HOTEND: + if (draw) + Draw_Menu_Item(row, ICON_HotendTemp, "Hotend", nullptr, true); + else + Draw_Menu(HotendPID); + break; + #endif + #if HAS_HEATED_BED + case PID_BED: + if (draw) + Draw_Menu_Item(row, ICON_BedTemp, "Bed", nullptr, true); + else + Draw_Menu(BedPID); + break; + #endif + case PID_CYCLES: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Cycles"); + Draw_Float(PID_cycles, row, false, 1); + } + else + Modify_Value(PID_cycles, 3, 50, 1); + break; + } + break; + #endif // HAS_HOTEND || HAS_HEATED_BED + + #if HAS_HOTEND + case HotendPID: + + #define HOTENDPID_BACK 0 + #define HOTENDPID_TUNE (HOTENDPID_BACK + 1) + #define HOTENDPID_TEMP (HOTENDPID_TUNE + 1) + #define HOTENDPID_KP (HOTENDPID_TEMP + 1) + #define HOTENDPID_KI (HOTENDPID_KP + 1) + #define HOTENDPID_KD (HOTENDPID_KI + 1) + #define HOTENDPID_TOTAL HOTENDPID_KD + + static uint16_t PID_e_temp = 180; + + switch (item) { + case HOTENDPID_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(PID, PID_HOTEND); + break; + case HOTENDPID_TUNE: + if (draw) + Draw_Menu_Item(row, ICON_HotendTemp, "Autotune"); + else { + Popup_Handler(PIDWait); + sprintf_P(cmd, PSTR("M303 E0 C%i S%i U1"), PID_cycles, PID_e_temp); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOTENDPID_TEMP: + if (draw) { + Draw_Menu_Item(row, ICON_Temperature, "Temperature"); + Draw_Float(PID_e_temp, row, false, 1); + } + else + Modify_Value(PID_e_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + case HOTENDPID_KP: + if (draw) { + Draw_Menu_Item(row, ICON_Version, "Kp Value"); + Draw_Float(thermalManager.temp_hotend[0].pid.Kp, row, false, 100); + } + else + Modify_Value(thermalManager.temp_hotend[0].pid.Kp, 0, 5000, 100, thermalManager.updatePID); + break; + case HOTENDPID_KI: + if (draw) { + Draw_Menu_Item(row, ICON_Version, "Ki Value"); + Draw_Float(unscalePID_i(thermalManager.temp_hotend[0].pid.Ki), row, false, 100); + } + else + Modify_Value(thermalManager.temp_hotend[0].pid.Ki, 0, 5000, 100, thermalManager.updatePID); + break; + case HOTENDPID_KD: + if (draw) { + Draw_Menu_Item(row, ICON_Version, "Kd Value"); + Draw_Float(unscalePID_d(thermalManager.temp_hotend[0].pid.Kd), row, false, 100); + } + else + Modify_Value(thermalManager.temp_hotend[0].pid.Kd, 0, 5000, 100, thermalManager.updatePID); + break; + } + break; + #endif // HAS_HOTEND + + #if HAS_HEATED_BED + case BedPID: + + #define BEDPID_BACK 0 + #define BEDPID_TUNE (BEDPID_BACK + 1) + #define BEDPID_TEMP (BEDPID_TUNE + 1) + #define BEDPID_KP (BEDPID_TEMP + 1) + #define BEDPID_KI (BEDPID_KP + 1) + #define BEDPID_KD (BEDPID_KI + 1) + #define BEDPID_TOTAL BEDPID_KD + + static uint16_t PID_bed_temp = 60; + + switch (item) { + case BEDPID_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(PID, PID_BED); + break; + case BEDPID_TUNE: + if (draw) + Draw_Menu_Item(row, ICON_HotendTemp, "Autotune"); + else { + Popup_Handler(PIDWait); + sprintf_P(cmd, PSTR("M303 E-1 C%i S%i U1"), PID_cycles, PID_bed_temp); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + break; + case BEDPID_TEMP: + if (draw) { + Draw_Menu_Item(row, ICON_Temperature, "Temperature"); + Draw_Float(PID_bed_temp, row, false, 1); + } + else + Modify_Value(PID_bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + case BEDPID_KP: + if (draw) { + Draw_Menu_Item(row, ICON_Version, "Kp Value"); + Draw_Float(thermalManager.temp_bed.pid.Kp, row, false, 100); + } + else { + Modify_Value(thermalManager.temp_bed.pid.Kp, 0, 5000, 100, thermalManager.updatePID); + } + break; + case BEDPID_KI: + if (draw) { + Draw_Menu_Item(row, ICON_Version, "Ki Value"); + Draw_Float(unscalePID_i(thermalManager.temp_bed.pid.Ki), row, false, 100); + } + else + Modify_Value(thermalManager.temp_bed.pid.Ki, 0, 5000, 100, thermalManager.updatePID); + break; + case BEDPID_KD: + if (draw) { + Draw_Menu_Item(row, ICON_Version, "Kd Value"); + Draw_Float(unscalePID_d(thermalManager.temp_bed.pid.Kd), row, false, 100); + } + else + Modify_Value(thermalManager.temp_bed.pid.Kd, 0, 5000, 100, thermalManager.updatePID); + break; + } + break; + #endif // HAS_HEATED_BED + + #if PREHEAT_COUNT >= 1 + case Preheat1: + + #define PREHEAT1_BACK 0 + #define PREHEAT1_HOTEND (PREHEAT1_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT1_BED (PREHEAT1_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT1_FAN (PREHEAT1_BED + ENABLED(HAS_FAN)) + #define PREHEAT1_TOTAL PREHEAT1_FAN + + switch (item) { + case PREHEAT1_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(TempMenu, TEMP_PREHEAT1); + break; + #if HAS_HOTEND + case PREHEAT1_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, "Hotend"); + Draw_Float(ui.material_preset[0].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[0].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT1_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, "Bed"); + Draw_Float(ui.material_preset[0].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[0].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT1_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Fan"); + Draw_Float(ui.material_preset[0].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[0].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 1 + + #if PREHEAT_COUNT >= 2 + case Preheat2: + + #define PREHEAT2_BACK 0 + #define PREHEAT2_HOTEND (PREHEAT2_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT2_BED (PREHEAT2_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT2_FAN (PREHEAT2_BED + ENABLED(HAS_FAN)) + #define PREHEAT2_TOTAL PREHEAT2_FAN + + switch (item) { + case PREHEAT2_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(TempMenu, TEMP_PREHEAT2); + break; + #if HAS_HOTEND + case PREHEAT2_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, "Hotend"); + Draw_Float(ui.material_preset[1].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[1].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT2_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, "Bed"); + Draw_Float(ui.material_preset[1].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[1].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT2_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Fan"); + Draw_Float(ui.material_preset[1].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[1].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 2 + + #if PREHEAT_COUNT >= 3 + case Preheat3: + + #define PREHEAT3_BACK 0 + #define PREHEAT3_HOTEND (PREHEAT3_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT3_BED (PREHEAT3_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT3_FAN (PREHEAT3_BED + ENABLED(HAS_FAN)) + #define PREHEAT3_TOTAL PREHEAT3_FAN + + switch (item) { + case PREHEAT3_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(TempMenu, TEMP_PREHEAT3); + break; + #if HAS_HOTEND + case PREHEAT3_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, "Hotend"); + Draw_Float(ui.material_preset[2].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[2].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT3_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, "Bed"); + Draw_Float(ui.material_preset[2].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[2].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT3_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Fan"); + Draw_Float(ui.material_preset[2].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[2].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 3 + + #if PREHEAT_COUNT >= 4 + case Preheat4: + + #define PREHEAT4_BACK 0 + #define PREHEAT4_HOTEND (PREHEAT4_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT4_BED (PREHEAT4_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT4_FAN (PREHEAT4_BED + ENABLED(HAS_FAN)) + #define PREHEAT4_TOTAL PREHEAT4_FAN + + switch (item) { + case PREHEAT4_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(TempMenu, TEMP_PREHEAT4); + break; + #if HAS_HOTEND + case PREHEAT4_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, "Hotend"); + Draw_Float(ui.material_preset[3].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[3].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT4_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, "Bed"); + Draw_Float(ui.material_preset[3].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[3].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT4_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Fan"); + Draw_Float(ui.material_preset[3].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[3].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 4 + + #if PREHEAT_COUNT >= 5 + case Preheat5: + + #define PREHEAT5_BACK 0 + #define PREHEAT5_HOTEND (PREHEAT5_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT5_BED (PREHEAT5_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT5_FAN (PREHEAT5_BED + ENABLED(HAS_FAN)) + #define PREHEAT5_TOTAL PREHEAT5_FAN + + switch (item) { + case PREHEAT5_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(TempMenu, TEMP_PREHEAT5); + break; + #if HAS_HOTEND + case PREHEAT5_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, "Hotend"); + Draw_Float(ui.material_preset[4].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[4].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT5_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, "Bed"); + Draw_Float(ui.material_preset[4].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[4].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT5_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Fan"); + Draw_Float(ui.material_preset[4].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[4].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 5 + + case Motion: + + #define MOTION_BACK 0 + #define MOTION_HOMEOFFSETS (MOTION_BACK + 1) + #define MOTION_SPEED (MOTION_HOMEOFFSETS + 1) + #define MOTION_ACCEL (MOTION_SPEED + 1) + #define MOTION_JERK (MOTION_ACCEL + ENABLED(HAS_CLASSIC_JERK)) + #define MOTION_STEPS (MOTION_JERK + 1) + #define MOTION_FLOW (MOTION_STEPS + ENABLED(HAS_HOTEND)) + #define MOTION_TOTAL MOTION_FLOW + + switch (item) { + case MOTION_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Control, CONTROL_MOTION); + break; + case MOTION_HOMEOFFSETS: + if (draw) + Draw_Menu_Item(row, ICON_SetHome, "Home Offsets", nullptr, true); + else + Draw_Menu(HomeOffsets); + break; + case MOTION_SPEED: + if (draw) + Draw_Menu_Item(row, ICON_MaxSpeed, "Max Speed", nullptr, true); + else + Draw_Menu(MaxSpeed); + break; + case MOTION_ACCEL: + if (draw) + Draw_Menu_Item(row, ICON_MaxAccelerated, "Max Acceleration", nullptr, true); + else + Draw_Menu(MaxAcceleration); + break; + #if HAS_CLASSIC_JERK + case MOTION_JERK: + if (draw) + Draw_Menu_Item(row, ICON_MaxJerk, "Max Jerk", nullptr, true); + else + Draw_Menu(MaxJerk); + break; + #endif + case MOTION_STEPS: + if (draw) + Draw_Menu_Item(row, ICON_Step, "Steps/mm", nullptr, true); + else + Draw_Menu(Steps); + break; + #if HAS_HOTEND + case MOTION_FLOW: + if (draw) { + Draw_Menu_Item(row, ICON_Speed, "Flow Rate"); + Draw_Float(planner.flow_percentage[0], row, false, 1); + } + else + Modify_Value(planner.flow_percentage[0], MIN_FLOW_RATE, MAX_FLOW_RATE, 1); + break; + #endif + } + break; + + case HomeOffsets: + + #define HOMEOFFSETS_BACK 0 + #define HOMEOFFSETS_XOFFSET (HOMEOFFSETS_BACK + 1) + #define HOMEOFFSETS_YOFFSET (HOMEOFFSETS_XOFFSET + 1) + #define HOMEOFFSETS_TOTAL HOMEOFFSETS_YOFFSET + + switch (item) { + case HOMEOFFSETS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Motion, MOTION_HOMEOFFSETS); + break; + case HOMEOFFSETS_XOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepX, "X Offset"); + Draw_Float(home_offset.x, row, false, 100); + } + else + Modify_Value(home_offset.x, -MAX_XY_OFFSET, MAX_XY_OFFSET, 100); + break; + case HOMEOFFSETS_YOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, "Y Offset"); + Draw_Float(home_offset.y, row, false, 100); + } + else + Modify_Value(home_offset.y, -MAX_XY_OFFSET, MAX_XY_OFFSET, 100); + break; + } + break; + case MaxSpeed: + + #define SPEED_BACK 0 + #define SPEED_X (SPEED_BACK + 1) + #define SPEED_Y (SPEED_X + 1) + #define SPEED_Z (SPEED_Y + 1) + #define SPEED_E (SPEED_Z + ENABLED(HAS_HOTEND)) + #define SPEED_TOTAL SPEED_E + + switch (item) { + case SPEED_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Motion, MOTION_SPEED); + break; + case SPEED_X: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedX, "X Axis"); + Draw_Float(planner.settings.max_feedrate_mm_s[X_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[X_AXIS], 0, default_max_feedrate[X_AXIS] * 2, 1); + break; + + #if HAS_Y_AXIS + case SPEED_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedY, "Y Axis"); + Draw_Float(planner.settings.max_feedrate_mm_s[Y_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[Y_AXIS], 0, default_max_feedrate[Y_AXIS] * 2, 1); + break; + #endif + + #if HAS_Z_AXIS + case SPEED_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedZ, "Z Axis"); + Draw_Float(planner.settings.max_feedrate_mm_s[Z_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[Z_AXIS], 0, default_max_feedrate[Z_AXIS] * 2, 1); + break; + #endif + + #if HAS_HOTEND + case SPEED_E: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedE, "Extruder"); + Draw_Float(planner.settings.max_feedrate_mm_s[E_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[E_AXIS], 0, default_max_feedrate[E_AXIS] * 2, 1); + break; + #endif + } + break; + + case MaxAcceleration: + + #define ACCEL_BACK 0 + #define ACCEL_X (ACCEL_BACK + 1) + #define ACCEL_Y (ACCEL_X + 1) + #define ACCEL_Z (ACCEL_Y + 1) + #define ACCEL_E (ACCEL_Z + ENABLED(HAS_HOTEND)) + #define ACCEL_TOTAL ACCEL_E + + switch (item) { + case ACCEL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Motion, MOTION_ACCEL); + break; + case ACCEL_X: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccX, "X Axis"); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[X_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[X_AXIS], 0, default_max_acceleration[X_AXIS] * 2, 1); + break; + case ACCEL_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccY, "Y Axis"); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], 0, default_max_acceleration[Y_AXIS] * 2, 1); + break; + case ACCEL_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccZ, "Z Axis"); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], 0, default_max_acceleration[Z_AXIS] * 2, 1); + break; + #if HAS_HOTEND + case ACCEL_E: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccE, "Extruder"); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[E_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[E_AXIS], 0, default_max_acceleration[E_AXIS] * 2, 1); + break; + #endif + } + break; + #if HAS_CLASSIC_JERK + case MaxJerk: + + #define JERK_BACK 0 + #define JERK_X (JERK_BACK + 1) + #define JERK_Y (JERK_X + 1) + #define JERK_Z (JERK_Y + 1) + #define JERK_E (JERK_Z + ENABLED(HAS_HOTEND)) + #define JERK_TOTAL JERK_E + + switch (item) { + case JERK_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Motion, MOTION_JERK); + break; + case JERK_X: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkX, "X Axis"); + Draw_Float(planner.max_jerk[X_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[X_AXIS], 0, default_max_jerk[X_AXIS] * 2, 10); + break; + case JERK_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkY, "Y Axis"); + Draw_Float(planner.max_jerk[Y_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[Y_AXIS], 0, default_max_jerk[Y_AXIS] * 2, 10); + break; + case JERK_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkZ, "Z Axis"); + Draw_Float(planner.max_jerk[Z_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[Z_AXIS], 0, default_max_jerk[Z_AXIS] * 2, 10); + break; + #if HAS_HOTEND + case JERK_E: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkE, "Extruder"); + Draw_Float(planner.max_jerk[E_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[E_AXIS], 0, default_max_jerk[E_AXIS] * 2, 10); + break; + #endif + } + break; + #endif + case Steps: + + #define STEPS_BACK 0 + #define STEPS_X (STEPS_BACK + 1) + #define STEPS_Y (STEPS_X + 1) + #define STEPS_Z (STEPS_Y + 1) + #define STEPS_E (STEPS_Z + ENABLED(HAS_HOTEND)) + #define STEPS_TOTAL STEPS_E + + switch (item) { + case STEPS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Motion, MOTION_STEPS); + break; + case STEPS_X: + if (draw) { + Draw_Menu_Item(row, ICON_StepX, "X Axis"); + Draw_Float(planner.settings.axis_steps_per_mm[X_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[X_AXIS], 0, default_steps[X_AXIS] * 2, 10); + break; + case STEPS_Y: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, "Y Axis"); + Draw_Float(planner.settings.axis_steps_per_mm[Y_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[Y_AXIS], 0, default_steps[Y_AXIS] * 2, 10); + break; + case STEPS_Z: + if (draw) { + Draw_Menu_Item(row, ICON_StepZ, "Z Axis"); + Draw_Float(planner.settings.axis_steps_per_mm[Z_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[Z_AXIS], 0, default_steps[Z_AXIS] * 2, 10); + break; + #if HAS_HOTEND + case STEPS_E: + if (draw) { + Draw_Menu_Item(row, ICON_StepE, "Extruder"); + Draw_Float(planner.settings.axis_steps_per_mm[E_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[E_AXIS], 0, 1000, 10); + break; + #endif + } + break; + + case Visual: + + #define VISUAL_BACK 0 + #define VISUAL_BACKLIGHT (VISUAL_BACK + 1) + #define VISUAL_BRIGHTNESS (VISUAL_BACKLIGHT + 1) + #define VISUAL_TIME_FORMAT (VISUAL_BRIGHTNESS + 1) + #define VISUAL_COLOR_THEMES (VISUAL_TIME_FORMAT + 1) + #define VISUAL_TOTAL VISUAL_COLOR_THEMES + + switch (item) { + case VISUAL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Control, CONTROL_VISUAL); + break; + case VISUAL_BACKLIGHT: + if (draw) + Draw_Menu_Item(row, ICON_Brightness, "Display Off"); + else + ui.set_brightness(0); + break; + case VISUAL_BRIGHTNESS: + if (draw) { + Draw_Menu_Item(row, ICON_Brightness, "LCD Brightness"); + Draw_Float(ui.brightness, row, false, 1); + } + else + Modify_Value(ui.brightness, MIN_LCD_BRIGHTNESS, MAX_LCD_BRIGHTNESS, 1, ui.refresh_brightness); + break; + case VISUAL_TIME_FORMAT: + if (draw) { + Draw_Menu_Item(row, ICON_PrintTime, "Progress as __h__m"); + Draw_Checkbox(row, eeprom_settings.time_format_textual); + } + else { + eeprom_settings.time_format_textual = !eeprom_settings.time_format_textual; + Draw_Checkbox(row, eeprom_settings.time_format_textual); + } + break; + case VISUAL_COLOR_THEMES: + if (draw) + Draw_Menu_Item(row, ICON_MaxSpeed, "UI Color Settings", nullptr, true); + else + Draw_Menu(ColorSettings); + break; + } + break; + + case ColorSettings: + + #define COLORSETTINGS_BACK 0 + #define COLORSETTINGS_CURSOR (COLORSETTINGS_BACK + 1) + #define COLORSETTINGS_SPLIT_LINE (COLORSETTINGS_CURSOR + 1) + #define COLORSETTINGS_MENU_TOP_TXT (COLORSETTINGS_SPLIT_LINE + 1) + #define COLORSETTINGS_MENU_TOP_BG (COLORSETTINGS_MENU_TOP_TXT + 1) + #define COLORSETTINGS_HIGHLIGHT_BORDER (COLORSETTINGS_MENU_TOP_BG + 1) + #define COLORSETTINGS_PROGRESS_PERCENT (COLORSETTINGS_HIGHLIGHT_BORDER + 1) + #define COLORSETTINGS_PROGRESS_TIME (COLORSETTINGS_PROGRESS_PERCENT + 1) + #define COLORSETTINGS_PROGRESS_STATUS_BAR (COLORSETTINGS_PROGRESS_TIME + 1) + #define COLORSETTINGS_PROGRESS_STATUS_AREA (COLORSETTINGS_PROGRESS_STATUS_BAR + 1) + #define COLORSETTINGS_PROGRESS_COORDINATES (COLORSETTINGS_PROGRESS_STATUS_AREA + 1) + #define COLORSETTINGS_PROGRESS_COORDINATES_LINE (COLORSETTINGS_PROGRESS_COORDINATES + 1) + #define COLORSETTINGS_TOTAL COLORSETTINGS_PROGRESS_COORDINATES_LINE + + switch (item) { + case COLORSETTINGS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Visual, VISUAL_COLOR_THEMES); + break; + case COLORSETTINGS_CURSOR: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Cursor"); + Draw_Option(eeprom_settings.cursor_color, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.cursor_color, color_names, Custom_Colors); + break; + case COLORSETTINGS_SPLIT_LINE: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Menu Split Line"); + Draw_Option(eeprom_settings.menu_split_line, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.menu_split_line, color_names, Custom_Colors); + break; + case COLORSETTINGS_MENU_TOP_TXT: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Menu Header Text"); + Draw_Option(eeprom_settings.menu_top_txt, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.menu_top_txt, color_names, Custom_Colors); + break; + case COLORSETTINGS_MENU_TOP_BG: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Menu Header Bg"); + Draw_Option(eeprom_settings.menu_top_bg, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.menu_top_bg, color_names, Custom_Colors); + break; + case COLORSETTINGS_HIGHLIGHT_BORDER: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Highlight Box"); + Draw_Option(eeprom_settings.highlight_box, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.highlight_box, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_PERCENT: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Progress Percent"); + Draw_Option(eeprom_settings.progress_percent, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.progress_percent, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_TIME: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Progress Time"); + Draw_Option(eeprom_settings.progress_time, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.progress_time, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_STATUS_BAR: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Status Bar Text"); + Draw_Option(eeprom_settings.status_bar_text, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.status_bar_text, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_STATUS_AREA: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Status Area Text"); + Draw_Option(eeprom_settings.status_area_text, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.status_area_text, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_COORDINATES: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Coordinates Text"); + Draw_Option(eeprom_settings.coordinates_text, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.coordinates_text, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_COORDINATES_LINE: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, "Coordinates Line"); + Draw_Option(eeprom_settings.coordinates_split_line, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.coordinates_split_line, color_names, Custom_Colors); + break; + } // switch (item) + break; + + case Advanced: + + #define ADVANCED_BACK 0 + #define ADVANCED_BEEPER (ADVANCED_BACK + 1) + #define ADVANCED_PROBE (ADVANCED_BEEPER + ENABLED(HAS_BED_PROBE)) + #define ADVANCED_CORNER (ADVANCED_PROBE + 1) + #define ADVANCED_LA (ADVANCED_CORNER + ENABLED(LIN_ADVANCE)) + #define ADVANCED_LOAD (ADVANCED_LA + ENABLED(ADVANCED_PAUSE_FEATURE)) + #define ADVANCED_UNLOAD (ADVANCED_LOAD + ENABLED(ADVANCED_PAUSE_FEATURE)) + #define ADVANCED_COLD_EXTRUDE (ADVANCED_UNLOAD + ENABLED(PREVENT_COLD_EXTRUSION)) + #define ADVANCED_FILSENSORENABLED (ADVANCED_COLD_EXTRUDE + ENABLED(FILAMENT_RUNOUT_SENSOR)) + #define ADVANCED_FILSENSORDISTANCE (ADVANCED_FILSENSORENABLED + ENABLED(HAS_FILAMENT_RUNOUT_DISTANCE)) + #define ADVANCED_POWER_LOSS (ADVANCED_FILSENSORDISTANCE + ENABLED(POWER_LOSS_RECOVERY)) + #define ADVANCED_TOTAL ADVANCED_POWER_LOSS + + switch (item) { + case ADVANCED_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Control, CONTROL_ADVANCED); + break; + + case ADVANCED_BEEPER: + if (draw) { + Draw_Menu_Item(row, ICON_Version, "LCD Beeper"); + Draw_Checkbox(row, eeprom_settings.beeperenable); + } + else { + eeprom_settings.beeperenable = !eeprom_settings.beeperenable; + Draw_Checkbox(row, eeprom_settings.beeperenable); + } + break; + + #if HAS_BED_PROBE + case ADVANCED_PROBE: + if (draw) + Draw_Menu_Item(row, ICON_StepX, "Probe", nullptr, true); + else + Draw_Menu(ProbeMenu); + break; + #endif + + case ADVANCED_CORNER: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccelerated, "Bed Screw Inset"); + Draw_Float(corner_pos, row, false, 10); + } + else + Modify_Value(corner_pos, 1, 100, 10); + break; + + #if ENABLED(LIN_ADVANCE) + case ADVANCED_LA: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccelerated, "Lin Advance Kp"); + Draw_Float(planner.extruder_advance_K[0], row, false, 100); + } + else + Modify_Value(planner.extruder_advance_K[0], 0, 10, 100); + break; + #endif + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case ADVANCED_LOAD: + if (draw) { + Draw_Menu_Item(row, ICON_WriteEEPROM, "Load Length"); + Draw_Float(fc_settings[0].load_length, row, false, 1); + } + else + Modify_Value(fc_settings[0].load_length, 0, EXTRUDE_MAXLENGTH, 1); + break; + case ADVANCED_UNLOAD: + if (draw) { + Draw_Menu_Item(row, ICON_ReadEEPROM, "Unload Length"); + Draw_Float(fc_settings[0].unload_length, row, false, 1); + } + else + Modify_Value(fc_settings[0].unload_length, 0, EXTRUDE_MAXLENGTH, 1); + break; + #endif // ADVANCED_PAUSE_FEATURE + + #if ENABLED(PREVENT_COLD_EXTRUSION) + case ADVANCED_COLD_EXTRUDE: + if (draw) { + Draw_Menu_Item(row, ICON_Cool, "Min Extrusion T"); + Draw_Float(thermalManager.extrude_min_temp, row, false, 1); + } + else { + Modify_Value(thermalManager.extrude_min_temp, 0, MAX_E_TEMP, 1); + thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0); + } + break; + #endif + + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + case ADVANCED_FILSENSORENABLED: + if (draw) { + Draw_Menu_Item(row, ICON_Extruder, "Filament Sensor"); + Draw_Checkbox(row, runout.enabled); + } + else { + runout.enabled = !runout.enabled; + Draw_Checkbox(row, runout.enabled); + } + break; + + #if ENABLED(HAS_FILAMENT_RUNOUT_DISTANCE) + case ADVANCED_FILSENSORDISTANCE: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccE, "Runout Distance"); + Draw_Float(runout.runout_distance(), row, false, 10); + } + else + Modify_Value(runout.runout_distance(), 0, 999, 10); + break; + #endif + #endif // FILAMENT_RUNOUT_SENSOR + + #if ENABLED(POWER_LOSS_RECOVERY) + case ADVANCED_POWER_LOSS: + if (draw) { + Draw_Menu_Item(row, ICON_Motion, "Power-loss recovery"); + Draw_Checkbox(row, recovery.enabled); + } + else { + recovery.enable(!recovery.enabled); + Draw_Checkbox(row, recovery.enabled); + } + break; + #endif + } + break; + + #if HAS_BED_PROBE + case ProbeMenu: + + #define PROBE_BACK 0 + #define PROBE_XOFFSET (PROBE_BACK + 1) + #define PROBE_YOFFSET (PROBE_XOFFSET + 1) + #define PROBE_TEST (PROBE_YOFFSET + 1) + #define PROBE_TEST_COUNT (PROBE_TEST + 1) + #define PROBE_TOTAL PROBE_TEST_COUNT + + static uint8_t testcount = 4; + + switch (item) { + case PROBE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Advanced, ADVANCED_PROBE); + break; + + case PROBE_XOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepX, "Probe X Offset"); + Draw_Float(probe.offset.x, row, false, 10); + } + else + Modify_Value(probe.offset.x, -MAX_XY_OFFSET, MAX_XY_OFFSET, 10); + break; + case PROBE_YOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, "Probe Y Offset"); + Draw_Float(probe.offset.y, row, false, 10); + } + else + Modify_Value(probe.offset.y, -MAX_XY_OFFSET, MAX_XY_OFFSET, 10); + break; + case PROBE_TEST: + if (draw) + Draw_Menu_Item(row, ICON_StepY, "M48 Probe Test"); + else { + sprintf_P(cmd, PSTR("G28O\nM48 X%s Y%s P%i"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), testcount); + gcode.process_subcommands_now_P(cmd); + } + break; + case PROBE_TEST_COUNT: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, "Probe Test Count"); + Draw_Float(testcount, row, false, 1); + } + else + Modify_Value(testcount, 4, 50, 1); + break; + } + break; + #endif + + case InfoMain: + case Info: + + #define INFO_BACK 0 + #define INFO_PRINTCOUNT (INFO_BACK + ENABLED(PRINTCOUNTER)) + #define INFO_PRINTTIME (INFO_PRINTCOUNT + ENABLED(PRINTCOUNTER)) + #define INFO_SIZE (INFO_PRINTTIME + 1) + #define INFO_VERSION (INFO_SIZE + 1) + #define INFO_CONTACT (INFO_VERSION + 1) + #define INFO_TOTAL INFO_BACK + + switch (item) { + case INFO_BACK: + if (draw) { + Draw_Menu_Item(row, ICON_Back, "Back"); + + #if ENABLED(PRINTCOUNTER) + char row1[50], row2[50], buf[32]; + printStatistics ps = print_job_timer.getStats(); + + sprintf_P(row1, PSTR("%i prints, %i finished"), ps.totalPrints, ps.finishedPrints); + sprintf_P(row2, PSTR("%s m filament used"), dtostrf(ps.filamentUsed / 1000, 1, 2, str_1)); + Draw_Menu_Item(INFO_PRINTCOUNT, ICON_HotendTemp, row1, row2, false, true); + + duration_t(print_job_timer.getStats().printTime).toString(buf); + sprintf_P(row1, PSTR("Printed: %s"), buf); + duration_t(print_job_timer.getStats().longestPrint).toString(buf); + sprintf_P(row2, PSTR("Longest: %s"), buf); + Draw_Menu_Item(INFO_PRINTTIME, ICON_PrintTime, row1, row2, false, true); + #endif + + Draw_Menu_Item(INFO_SIZE, ICON_PrintSize, MACHINE_SIZE, nullptr, false, true); + Draw_Menu_Item(INFO_VERSION, ICON_Version, SHORT_BUILD_VERSION, nullptr, false, true); + Draw_Menu_Item(INFO_CONTACT, ICON_Contact, CORP_WEBSITE, nullptr, false, true); + } + else { + if (menu == Info) + Draw_Menu(Control, CONTROL_INFO); + else + Draw_Main_Menu(3); + } + break; + } + break; + + #if HAS_MESH + case Leveling: + + #define LEVELING_BACK 0 + #define LEVELING_ACTIVE (LEVELING_BACK + 1) + #define LEVELING_GET_TILT (LEVELING_ACTIVE + BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL)) + #define LEVELING_GET_MESH (LEVELING_GET_TILT + 1) + #define LEVELING_MANUAL (LEVELING_GET_MESH + 1) + #define LEVELING_VIEW (LEVELING_MANUAL + 1) + #define LEVELING_SETTINGS (LEVELING_VIEW + 1) + #define LEVELING_SLOT (LEVELING_SETTINGS + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_LOAD (LEVELING_SLOT + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SAVE (LEVELING_LOAD + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_TOTAL LEVELING_SAVE + + switch (item) { + case LEVELING_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Main_Menu(3); + break; + case LEVELING_ACTIVE: + if (draw) { + Draw_Menu_Item(row, ICON_StockConfiguraton, "Leveling Active"); + Draw_Checkbox(row, planner.leveling_active); + } + else { + if (!planner.leveling_active) { + set_bed_leveling_enabled(!planner.leveling_active); + if (!planner.leveling_active) { + Confirm_Handler(LevelError); + break; + } + } + else + set_bed_leveling_enabled(!planner.leveling_active); + Draw_Checkbox(row, planner.leveling_active); + } + break; + #if BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL) + case LEVELING_GET_TILT: + if (draw) + Draw_Menu_Item(row, ICON_Tilt, "Autotilt Current Mesh"); + else { + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + Popup_Handler(Home); + gcode.home_all_axes(true); + Popup_Handler(Level); + if (mesh_conf.tilt_grid > 1) + sprintf_P(cmd, PSTR("G29 J%i"), mesh_conf.tilt_grid); + else + sprintf_P(cmd, PSTR("G29 J")); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + break; + #endif + case LEVELING_GET_MESH: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, "Create New Mesh"); + else { + Popup_Handler(Home); + gcode.home_all_axes(true); + #if ENABLED(AUTO_BED_LEVELING_UBL) + #if ENABLED(PREHEAT_BEFORE_LEVELING) + Popup_Handler(Heating); + #if HAS_HOTEND + if (thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP) + thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0); + #endif + #if HAS_HEATED_BED + if (thermalManager.degTargetBed() < LEVELING_BED_TEMP) + thermalManager.setTargetBed(LEVELING_BED_TEMP); + #endif + thermalManager.wait_for_hotend(0); + TERN_(HAS_HEATED_BED, thermalManager.wait_for_bed_heating()); + #endif + #if HAS_BED_PROBE + Popup_Handler(Level); + gcode.process_subcommands_now_P(PSTR("G29 P0\nG29 P1")); + gcode.process_subcommands_now_P(PSTR("G29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nM420 S1")); + planner.synchronize(); + Update_Status("Probed all reachable points"); + Popup_Handler(SaveLevel); + #else + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + mesh_conf.goto_mesh_value = true; + mesh_conf.mesh_x = mesh_conf.mesh_y = 0; + Popup_Handler(MoveWait); + mesh_conf.manual_move();; + Draw_Menu(UBLMesh); + #endif + #elif HAS_BED_PROBE + Popup_Handler(Level); + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + Popup_Handler(SaveLevel); + #else + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + gridpoint = 1; + Popup_Handler(MoveWait); + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + Draw_Menu(ManualMesh); + #endif + } + break; + case LEVELING_MANUAL: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, "Manual Tuning", nullptr, true); + else { + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + if (!leveling_is_valid()) { + Confirm_Handler(InvalidMesh); + break; + } + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + #endif + if (axes_should_home()) { + Popup_Handler(Home); + gcode.home_all_axes(true); + } + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + mesh_conf.goto_mesh_value = false; + #if ENABLED(PREHEAT_BEFORE_LEVELING) + Popup_Handler(Heating); + #if HAS_HOTEND + if (thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP) + thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0); + #endif + #if HAS_HEATED_BED + if (thermalManager.degTargetBed() < LEVELING_BED_TEMP) + thermalManager.setTargetBed(LEVELING_BED_TEMP); + #endif + TERN_(HAS_HOTEND, thermalManager.wait_for_hotend(0)); + TERN_(HAS_HEATED_BED, thermalManager.wait_for_bed_heating()); + #endif + Popup_Handler(MoveWait); + mesh_conf.manual_move(); + Draw_Menu(LevelManual); + } + break; + case LEVELING_VIEW: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, "Mesh Viewer", nullptr, true); + else { + #if ENABLED(AUTO_BED_LEVELING_UBL) + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + #endif + Draw_Menu(LevelView); + } + break; + case LEVELING_SETTINGS: + if (draw) + Draw_Menu_Item(row, ICON_Step, "Leveling Settings", nullptr, true); + else + Draw_Menu(LevelSettings); + break; + #if ENABLED(AUTO_BED_LEVELING_UBL) + case LEVELING_SLOT: + if (draw) { + Draw_Menu_Item(row, ICON_PrintSize, "Mesh Slot"); + Draw_Float(ubl.storage_slot, row, false, 1); + } + else + Modify_Value(ubl.storage_slot, 0, settings.calc_num_meshes() - 1, 1); + break; + case LEVELING_LOAD: + if (draw) + Draw_Menu_Item(row, ICON_ReadEEPROM, "Load Mesh"); + else { + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + gcode.process_subcommands_now_P(PSTR("G29 L")); + planner.synchronize(); + AudioFeedback(true); + } + break; + case LEVELING_SAVE: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, "Save Mesh"); + else { + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + gcode.process_subcommands_now_P(PSTR("G29 S")); + planner.synchronize(); + AudioFeedback(true); + } + break; + #endif + } + break; + + case LevelView: + + #define LEVELING_VIEW_BACK 0 + #define LEVELING_VIEW_MESH (LEVELING_VIEW_BACK + 1) + #define LEVELING_VIEW_TEXT (LEVELING_VIEW_MESH + 1) + #define LEVELING_VIEW_ASYMMETRIC (LEVELING_VIEW_TEXT + 1) + #define LEVELING_VIEW_TOTAL LEVELING_VIEW_ASYMMETRIC + + switch (item) { + case LEVELING_VIEW_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Leveling, LEVELING_VIEW); + break; + case LEVELING_VIEW_MESH: + if (draw) + Draw_Menu_Item(row, ICON_PrintSize, "Mesh Viewer", nullptr, true); + else + Draw_Menu(MeshViewer); + break; + case LEVELING_VIEW_TEXT: + if (draw) { + Draw_Menu_Item(row, ICON_Contact, "Viewer Show Values"); + Draw_Checkbox(row, mesh_conf.viewer_print_value); + } + else { + mesh_conf.viewer_print_value = !mesh_conf.viewer_print_value; + Draw_Checkbox(row, mesh_conf.viewer_print_value); + } + break; + case LEVELING_VIEW_ASYMMETRIC: + if (draw) { + Draw_Menu_Item(row, ICON_Axis, "Viewer Asymmetric"); + Draw_Checkbox(row, mesh_conf.viewer_asymmetric_range); + } + else { + mesh_conf.viewer_asymmetric_range = !mesh_conf.viewer_asymmetric_range; + Draw_Checkbox(row, mesh_conf.viewer_asymmetric_range); + } + break; + } + break; + + case LevelSettings: + + #define LEVELING_SETTINGS_BACK 0 + #define LEVELING_SETTINGS_FADE (LEVELING_SETTINGS_BACK + 1) + #define LEVELING_SETTINGS_TILT (LEVELING_SETTINGS_FADE + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_PLANE (LEVELING_SETTINGS_TILT + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_ZERO (LEVELING_SETTINGS_PLANE + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_UNDEF (LEVELING_SETTINGS_ZERO + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_TOTAL LEVELING_SETTINGS_UNDEF + + switch (item) { + case LEVELING_SETTINGS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Menu(Leveling, LEVELING_SETTINGS); + break; + case LEVELING_SETTINGS_FADE: + if (draw) { + Draw_Menu_Item(row, ICON_Fade, "Fade Mesh within"); + Draw_Float(planner.z_fade_height, row, false, 1); + } + else { + Modify_Value(planner.z_fade_height, 0, Z_MAX_POS, 1); + planner.z_fade_height = -1; + set_z_fade_height(planner.z_fade_height); + } + break; + + #if ENABLED(AUTO_BED_LEVELING_UBL) + case LEVELING_SETTINGS_TILT: + if (draw) { + Draw_Menu_Item(row, ICON_Tilt, "Tilting Grid Size"); + Draw_Float(mesh_conf.tilt_grid, row, false, 1); + } + else + Modify_Value(mesh_conf.tilt_grid, 1, 8, 1); + break; + case LEVELING_SETTINGS_PLANE: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, "Convert Mesh to Plane"); + else { + if (mesh_conf.create_plane_from_mesh()) break; + gcode.process_subcommands_now_P(PSTR("M420 S1")); + planner.synchronize(); + AudioFeedback(true); + } + break; + case LEVELING_SETTINGS_ZERO: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, "Zero Current Mesh"); + else + ZERO(mesh_conf.mesh_z_values); + break; + case LEVELING_SETTINGS_UNDEF: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, "Clear Current Mesh"); + else + ubl.invalidate(); + break; + #endif // AUTO_BED_LEVELING_UBL + } + break; + + case MeshViewer: + #define MESHVIEW_BACK 0 + #define MESHVIEW_TOTAL MESHVIEW_BACK + + if (item == MESHVIEW_BACK) { + if (draw) { + Draw_Menu_Item(0, ICON_Back, "Back"); + mesh_conf.Draw_Bed_Mesh(); + mesh_conf.Set_Mesh_Viewer_Status(); + } + else if (!mesh_conf.drawing_mesh) { + Draw_Menu(LevelView, LEVELING_VIEW_MESH); + Update_Status(""); + } + } + break; + + case LevelManual: + + #define LEVELING_M_BACK 0 + #define LEVELING_M_X (LEVELING_M_BACK + 1) + #define LEVELING_M_Y (LEVELING_M_X + 1) + #define LEVELING_M_NEXT (LEVELING_M_Y + 1) + #define LEVELING_M_OFFSET (LEVELING_M_NEXT + 1) + #define LEVELING_M_UP (LEVELING_M_OFFSET + 1) + #define LEVELING_M_DOWN (LEVELING_M_UP + 1) + #define LEVELING_M_GOTO_VALUE (LEVELING_M_DOWN + 1) + #define LEVELING_M_UNDEF (LEVELING_M_GOTO_VALUE + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_M_TOTAL LEVELING_M_UNDEF + + switch (item) { + case LEVELING_M_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else { + set_bed_leveling_enabled(level_state); + TERN_(AUTO_BED_LEVELING_BILINEAR, refresh_bed_level()); + Draw_Menu(Leveling, LEVELING_MANUAL); + } + break; + case LEVELING_M_X: + if (draw) { + Draw_Menu_Item(row, ICON_MoveX, "Mesh Point X"); + Draw_Float(mesh_conf.mesh_x, row, 0, 1); + } + else + Modify_Value(mesh_conf.mesh_x, 0, GRID_MAX_POINTS_X - 1, 1); + break; + case LEVELING_M_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MoveY, "Mesh Point Y"); + Draw_Float(mesh_conf.mesh_y, row, 0, 1); + } + else + Modify_Value(mesh_conf.mesh_y, 0, GRID_MAX_POINTS_Y - 1, 1); + break; + case LEVELING_M_NEXT: + if (draw) + Draw_Menu_Item(row, ICON_More, "Next Point"); + else { + if (mesh_conf.mesh_x != (GRID_MAX_POINTS_X - 1) || mesh_conf.mesh_y != (GRID_MAX_POINTS_Y - 1)) { + if ((mesh_conf.mesh_x == (GRID_MAX_POINTS_X - 1) && mesh_conf.mesh_y % 2 == 0) || (mesh_conf.mesh_x == 0 && mesh_conf.mesh_y % 2 == 1)) + mesh_conf.mesh_y++; + else if (mesh_conf.mesh_y % 2 == 0) + mesh_conf.mesh_x++; + else + mesh_conf.mesh_x--; + mesh_conf.manual_move(); + } + } + break; + case LEVELING_M_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, "Point Z Offset"); + Draw_Float(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], row, false, 100); + } + else { + if (isnan(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y])) + mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] = 0; + Modify_Value(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + } + break; + case LEVELING_M_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, "Microstep Up"); + else if (mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { + mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + current_position.z += 0.01f; + sync_plan_position(); + Draw_Float(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 1, false, 100); + } + break; + case LEVELING_M_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, "Microstep Down"); + else if (mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { + mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + current_position.z -= 0.01f; + sync_plan_position(); + Draw_Float(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 2, false, 100); + } + break; + case LEVELING_M_GOTO_VALUE: + if (draw) { + Draw_Menu_Item(row, ICON_StockConfiguraton, "Go to Mesh Z Value"); + Draw_Checkbox(row, mesh_conf.goto_mesh_value); + } + else { + mesh_conf.goto_mesh_value = !mesh_conf.goto_mesh_value; + current_position.z = 0; + mesh_conf.manual_move(true); + Draw_Checkbox(row, mesh_conf.goto_mesh_value); + } + break; + #if ENABLED(AUTO_BED_LEVELING_UBL) + case LEVELING_M_UNDEF: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, "Clear Point Value"); + else { + mesh_conf.manual_value_update(true); + Redraw_Menu(false); + } + break; + #endif + } + break; + #endif // HAS_MESH + + #if ENABLED(AUTO_BED_LEVELING_UBL) && !HAS_BED_PROBE + case UBLMesh: + + #define UBL_M_BACK 0 + #define UBL_M_NEXT (UBL_M_BACK + 1) + #define UBL_M_PREV (UBL_M_NEXT + 1) + #define UBL_M_OFFSET (UBL_M_PREV + 1) + #define UBL_M_UP (UBL_M_OFFSET + 1) + #define UBL_M_DOWN (UBL_M_UP + 1) + #define UBL_M_TOTAL UBL_M_DOWN + + switch (item) { + case UBL_M_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else { + set_bed_leveling_enabled(level_state); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + break; + case UBL_M_NEXT: + if (draw) { + if (mesh_conf.mesh_x != (GRID_MAX_POINTS_X - 1) || mesh_conf.mesh_y != (GRID_MAX_POINTS_Y - 1)) + Draw_Menu_Item(row, ICON_More, "Next Point"); + else + Draw_Menu_Item(row, ICON_More, "Save Mesh"); + } + else { + if (mesh_conf.mesh_x != (GRID_MAX_POINTS_X - 1) || mesh_conf.mesh_y != (GRID_MAX_POINTS_Y - 1)) { + if ((mesh_conf.mesh_x == (GRID_MAX_POINTS_X - 1) && mesh_conf.mesh_y % 2 == 0) || (mesh_conf.mesh_x == 0 && mesh_conf.mesh_y % 2 == 1)) + mesh_conf.mesh_y++; + else if (mesh_conf.mesh_y % 2 == 0) + mesh_conf.mesh_x++; + else + mesh_conf.mesh_x--; + mesh_conf.manual_move(); + } + else { + gcode.process_subcommands_now_P(PSTR("G29 S")); + planner.synchronize(); + AudioFeedback(true); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + } + break; + case UBL_M_PREV: + if (draw) + Draw_Menu_Item(row, ICON_More, "Previous Point"); + else { + if (mesh_conf.mesh_x != 0 || mesh_conf.mesh_y != 0) { + if ((mesh_conf.mesh_x == (GRID_MAX_POINTS_X - 1) && mesh_conf.mesh_y % 2 == 1) || (mesh_conf.mesh_x == 0 && mesh_conf.mesh_y % 2 == 0)) + mesh_conf.mesh_y--; + else if (mesh_conf.mesh_y % 2 == 0) + mesh_conf.mesh_x--; + else + mesh_conf.mesh_x++; + mesh_conf.manual_move(); + } + } + break; + case UBL_M_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, "Point Z Offset"); + Draw_Float(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], row, false, 100); + } + else { + if (isnan(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y])) + mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] = 0; + Modify_Value(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + } + break; + case UBL_M_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, "Microstep Up"); + else if (mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { + mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + current_position.z += 0.01f; + sync_plan_position(); + Draw_Float(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 1, false, 100); + } + break; + case UBL_M_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_Axis, "Microstep Down"); + else if (mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { + mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + current_position.z -= 0.01f; + sync_plan_position(); + Draw_Float(mesh_conf.mesh_z_values[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 2, false, 100); + } + break; + } + break; + #endif // AUTO_BED_LEVELING_UBL && !HAS_BED_PROBE + + #if ENABLED(PROBE_MANUALLY) + case ManualMesh: + + #define MMESH_BACK 0 + #define MMESH_NEXT (MMESH_BACK + 1) + #define MMESH_OFFSET (MMESH_NEXT + 1) + #define MMESH_UP (MMESH_OFFSET + 1) + #define MMESH_DOWN (MMESH_UP + 1) + #define MMESH_OLD (MMESH_DOWN + 1) + #define MMESH_TOTAL MMESH_OLD + + switch (item) { + case MMESH_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Cancel"); + else { + gcode.process_subcommands_now_P(PSTR("G29 A")); + planner.synchronize(); + set_bed_leveling_enabled(level_state); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + break; + case MMESH_NEXT: + if (draw) { + if (gridpoint < GRID_MAX_POINTS) + Draw_Menu_Item(row, ICON_More, "Next Point"); + else + Draw_Menu_Item(row, ICON_More, "Save Mesh"); + } + else if (gridpoint < GRID_MAX_POINTS) { + Popup_Handler(MoveWait); + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + gridpoint++; + Redraw_Menu(); + } + else { + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + AudioFeedback(settings.save()); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + break; + case MMESH_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, "Z Position"); + current_position.z = MANUAL_PROBE_START_Z; + Draw_Float(current_position.z, row, false, 100); + } + else + Modify_Value(current_position.z, MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + break; + case MMESH_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, "Microstep Up"); + else if (current_position.z < MAX_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + current_position.z += 0.01f; + sync_plan_position(); + Draw_Float(current_position.z, row - 1, false, 100); + } + break; + case MMESH_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, "Microstep Down"); + else if (current_position.z > MIN_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + current_position.z -= 0.01f; + sync_plan_position(); + Draw_Float(current_position.z, row - 2, false, 100); + } + break; + case MMESH_OLD: + uint8_t mesh_x, mesh_y; + // 0,0 -> 1,0 -> 2,0 -> 2,1 -> 1,1 -> 0,1 -> 0,2 -> 1,2 -> 2,2 + mesh_y = (gridpoint - 1) / GRID_MAX_POINTS_Y; + mesh_x = (gridpoint - 1) % GRID_MAX_POINTS_X; + + if (mesh_y % 2 == 1) + mesh_x = GRID_MAX_POINTS_X - mesh_x - 1; + + const float currval = mesh_conf.mesh_z_values[mesh_x][mesh_y]; + + if (draw) { + Draw_Menu_Item(row, ICON_Zoffset, "Goto Mesh Value"); + Draw_Float(currval, row, false, 100); + } + else if (!isnan(currval)) { + current_position.z = currval; + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + Draw_Float(current_position.z, row - 3, false, 100); + } + break; + } + break; + #endif // PROBE_MANUALLY + + case Tune: + + #define TUNE_BACK 0 + #define TUNE_SPEED (TUNE_BACK + 1) + #define TUNE_FLOW (TUNE_SPEED + ENABLED(HAS_HOTEND)) + #define TUNE_HOTEND (TUNE_FLOW + ENABLED(HAS_HOTEND)) + #define TUNE_BED (TUNE_HOTEND + ENABLED(HAS_HEATED_BED)) + #define TUNE_FAN (TUNE_BED + ENABLED(HAS_FAN)) + #define TUNE_ZOFFSET (TUNE_FAN + ENABLED(HAS_ZOFFSET_ITEM)) + #define TUNE_ZUP (TUNE_ZOFFSET + ENABLED(HAS_ZOFFSET_ITEM)) + #define TUNE_ZDOWN (TUNE_ZUP + ENABLED(HAS_ZOFFSET_ITEM)) + #define TUNE_CHANGEFIL (TUNE_ZDOWN + ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)) + #define TUNE_FILSENSORENABLED (TUNE_CHANGEFIL + ENABLED(FILAMENT_RUNOUT_SENSOR)) + #define TUNE_BACKLIGHT_OFF (TUNE_FILSENSORENABLED + 1) + #define TUNE_BACKLIGHT (TUNE_BACKLIGHT_OFF + 1) + #define TUNE_TOTAL TUNE_BACKLIGHT + + switch (item) { + case TUNE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Back"); + else + Draw_Print_Screen(); + break; + case TUNE_SPEED: + if (draw) { + Draw_Menu_Item(row, ICON_Speed, "Print Speed"); + Draw_Float(feedrate_percentage, row, false, 1); + } + else + Modify_Value(feedrate_percentage, MIN_PRINT_SPEED, MAX_PRINT_SPEED, 1); + break; + + #if HAS_HOTEND + case TUNE_FLOW: + if (draw) { + Draw_Menu_Item(row, ICON_Speed, "Flow Rate"); + Draw_Float(planner.flow_percentage[0], row, false, 1); + } + else + Modify_Value(planner.flow_percentage[0], MIN_FLOW_RATE, MAX_FLOW_RATE, 1); + break; + case TUNE_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, "Hotend"); + Draw_Float(thermalManager.temp_hotend[0].target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_hotend[0].target, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + + #if HAS_HEATED_BED + case TUNE_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, "Bed"); + Draw_Float(thermalManager.temp_bed.target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_bed.target, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + + #if HAS_FAN + case TUNE_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Fan"); + Draw_Float(thermalManager.fan_speed[0], row, false, 1); + } + else + Modify_Value(thermalManager.fan_speed[0], MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + + #if HAS_ZOFFSET_ITEM + case TUNE_ZOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, "Z-Offset"); + Draw_Float(zoffsetvalue, row, false, 100); + } + else + Modify_Value(zoffsetvalue, MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + break; + case TUNE_ZUP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, "Z-Offset Up"); + else if (zoffsetvalue < MAX_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + zoffsetvalue += 0.01; + Draw_Float(zoffsetvalue, row - 1, false, 100); + } + break; + case TUNE_ZDOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, "Z-Offset Down"); + else if (zoffsetvalue > MIN_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + zoffsetvalue -= 0.01; + Draw_Float(zoffsetvalue, row - 2, false, 100); + } + break; + #endif + + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case TUNE_CHANGEFIL: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, "Change Filament"); + else + Popup_Handler(ConfFilChange); + break; + #endif + + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + case TUNE_FILSENSORENABLED: + if (draw) { + Draw_Menu_Item(row, ICON_Extruder, "Filament Sensor"); + Draw_Checkbox(row, runout.enabled); + } + else { + runout.enabled = !runout.enabled; + Draw_Checkbox(row, runout.enabled); + } + break; + #endif + + case TUNE_BACKLIGHT_OFF: + if (draw) + Draw_Menu_Item(row, ICON_Brightness, "Display Off"); + else + ui.set_brightness(0); + break; + case TUNE_BACKLIGHT: + if (draw) { + Draw_Menu_Item(row, ICON_Brightness, "LCD Brightness"); + Draw_Float(ui.brightness, row, false, 1); + } + else + Modify_Value(ui.brightness, MIN_LCD_BRIGHTNESS, MAX_LCD_BRIGHTNESS, 1, ui.refresh_brightness); + break; + } + break; + + case PreheatHotend: + + #define PREHEATHOTEND_BACK 0 + #define PREHEATHOTEND_CONTINUE (PREHEATHOTEND_BACK + 1) + #define PREHEATHOTEND_1 (PREHEATHOTEND_CONTINUE + (PREHEAT_COUNT >= 1)) + #define PREHEATHOTEND_2 (PREHEATHOTEND_1 + (PREHEAT_COUNT >= 2)) + #define PREHEATHOTEND_3 (PREHEATHOTEND_2 + (PREHEAT_COUNT >= 3)) + #define PREHEATHOTEND_4 (PREHEATHOTEND_3 + (PREHEAT_COUNT >= 4)) + #define PREHEATHOTEND_5 (PREHEATHOTEND_4 + (PREHEAT_COUNT >= 5)) + #define PREHEATHOTEND_CUSTOM (PREHEATHOTEND_5 + 1) + #define PREHEATHOTEND_TOTAL PREHEATHOTEND_CUSTOM + + switch (item) { + case PREHEATHOTEND_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, "Cancel"); + else { + thermalManager.setTargetHotend(0, 0); + thermalManager.set_fan_speed(0, 0); + Redraw_Menu(false, true, true); + } + break; + case PREHEATHOTEND_CONTINUE: + if (draw) + Draw_Menu_Item(row, ICON_SetEndTemp, "Continue"); + else { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + switch (last_menu) { + case Prepare: + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + break; + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: + switch (last_selection) { + case CHANGEFIL_LOAD: + Popup_Handler(FilLoad); + gcode.process_subcommands_now_P("M701"); + planner.synchronize(); + Redraw_Menu(true, true, true); + break; + case CHANGEFIL_UNLOAD: + Popup_Handler(FilLoad, true); + gcode.process_subcommands_now_P("M702"); + planner.synchronize(); + Redraw_Menu(true, true, true); + break; + case CHANGEFIL_CHANGE: + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + break; + } + break; + #endif + default: + Redraw_Menu(true, true, true); + break; + } + } + break; + #if PREHEAT_COUNT >= 1 + case PREHEATHOTEND_1: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_1_LABEL); + else { + thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 2 + case PREHEATHOTEND_2: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_2_LABEL); + else { + thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 3 + case PREHEATHOTEND_3: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_3_LABEL); + else { + thermalManager.setTargetHotend(ui.material_preset[2].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[2].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 4 + case PREHEATHOTEND_4: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_4_LABEL); + else { + thermalManager.setTargetHotend(ui.material_preset[3].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[3].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 5 + case PREHEATHOTEND_5: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, PREHEAT_5_LABEL); + else { + thermalManager.setTargetHotend(ui.material_preset[4].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[4].fan_speed); + } + break; + #endif + case PREHEATHOTEND_CUSTOM: + if (draw) { + Draw_Menu_Item(row, ICON_Temperature, "Custom"); + Draw_Float(thermalManager.temp_hotend[0].target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_hotend[0].target, EXTRUDE_MINTEMP, MAX_E_TEMP, 1); + break; + } + break; + } +} + +const char * CrealityDWINClass::Get_Menu_Title(uint8_t menu) { + switch (menu) { + case MainMenu: return "Main Menu"; + case Prepare: return "Prepare"; + case HomeMenu: return "Homing Menu"; + case Move: return "Move"; + case ManualLevel: return "Manual Leveling"; + #if HAS_ZOFFSET_ITEM + case ZOffset: return "Z Offset"; + #endif + #if HAS_PREHEAT + case Preheat: return "Preheat"; + #endif + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: return "Change Filament"; + #endif + case Control: return "Control"; + case TempMenu: return "Temperature"; + #if HAS_HOTEND || HAS_HEATED_BED + case PID: return "PID Menu"; + #endif + #if HAS_HOTEND + case HotendPID: return "Hotend PID Settings"; + #endif + #if HAS_HEATED_BED + case BedPID: return "Bed PID Settings"; + #endif + #if PREHEAT_COUNT >= 1 + case Preheat1: return (PREHEAT_1_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 2 + case Preheat2: return (PREHEAT_2_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 3 + case Preheat3: return (PREHEAT_3_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 4 + case Preheat4: return (PREHEAT_4_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 5 + case Preheat5: return (PREHEAT_5_LABEL " Settings"); + #endif + case Motion: return "Motion Settings"; + case HomeOffsets: return "Home Offsets"; + case MaxSpeed: return "Max Speed"; + case MaxAcceleration: return "Max Acceleration"; + #if HAS_CLASSIC_JERK + case MaxJerk: return "Max Jerk"; + #endif + case Steps: return "Steps/mm"; + case Visual: return "Visual Settings"; + case Advanced: return "Advanced Settings"; + #if HAS_BED_PROBE + case ProbeMenu: return "Probe Menu"; + #endif + case ColorSettings: return "UI Color Settings"; + case Info: return "Info"; + case InfoMain: return "Info"; + #if HAS_MESH + case Leveling: return "Leveling"; + case LevelView: return "Mesh View"; + case LevelSettings: return "Leveling Settings"; + case MeshViewer: return "Mesh Viewer"; + case LevelManual: return "Manual Tuning"; + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) && !HAS_BED_PROBE + case UBLMesh: return "UBL Bed Leveling"; + #endif + #if ENABLED(PROBE_MANUALLY) + case ManualMesh: return "Mesh Bed Leveling"; + #endif + case Tune: return "Tune"; + case PreheatHotend: return "Preheat Hotend"; + } + return ""; +} + +uint8_t CrealityDWINClass::Get_Menu_Size(uint8_t menu) { + switch (menu) { + case Prepare: return PREPARE_TOTAL; + case HomeMenu: return HOME_TOTAL; + case Move: return MOVE_TOTAL; + case ManualLevel: return MLEVEL_TOTAL; + #if HAS_ZOFFSET_ITEM + case ZOffset: return ZOFFSET_TOTAL; + #endif + #if HAS_PREHEAT + case Preheat: return PREHEAT_TOTAL; + #endif + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: return CHANGEFIL_TOTAL; + #endif + case Control: return CONTROL_TOTAL; + case TempMenu: return TEMP_TOTAL; + #if HAS_HOTEND || HAS_HEATED_BED + case PID: return PID_TOTAL; + #endif + #if HAS_HOTEND + case HotendPID: return HOTENDPID_TOTAL; + #endif + #if HAS_HEATED_BED + case BedPID: return BEDPID_TOTAL; + #endif + #if PREHEAT_COUNT >= 1 + case Preheat1: return PREHEAT1_TOTAL; + #endif + #if PREHEAT_COUNT >= 2 + case Preheat2: return PREHEAT2_TOTAL; + #endif + #if PREHEAT_COUNT >= 3 + case Preheat3: return PREHEAT3_TOTAL; + #endif + #if PREHEAT_COUNT >= 4 + case Preheat4: return PREHEAT4_TOTAL; + #endif + #if PREHEAT_COUNT >= 5 + case Preheat5: return PREHEAT5_TOTAL; + #endif + case Motion: return MOTION_TOTAL; + case HomeOffsets: return HOMEOFFSETS_TOTAL; + case MaxSpeed: return SPEED_TOTAL; + case MaxAcceleration: return ACCEL_TOTAL; + #if HAS_CLASSIC_JERK + case MaxJerk: return JERK_TOTAL; + #endif + case Steps: return STEPS_TOTAL; + case Visual: return VISUAL_TOTAL; + case Advanced: return ADVANCED_TOTAL; + #if HAS_BED_PROBE + case ProbeMenu: return PROBE_TOTAL; + #endif + case Info: return INFO_TOTAL; + case InfoMain: return INFO_TOTAL; + #if ENABLED(AUTO_BED_LEVELING_UBL) && !HAS_BED_PROBE + case UBLMesh: return UBL_M_TOTAL; + #endif + #if ENABLED(PROBE_MANUALLY) + case ManualMesh: return MMESH_TOTAL; + #endif + #if HAS_MESH + case Leveling: return LEVELING_TOTAL; + case LevelView: return LEVELING_VIEW_TOTAL; + case LevelSettings: return LEVELING_SETTINGS_TOTAL; + case MeshViewer: return MESHVIEW_TOTAL; + case LevelManual: return LEVELING_M_TOTAL; + #endif + case Tune: return TUNE_TOTAL; + case PreheatHotend: return PREHEATHOTEND_TOTAL; + case ColorSettings: return COLORSETTINGS_TOTAL; + } + return 0; +} + +/* Popup Config */ + +void CrealityDWINClass::Popup_Handler(PopupID popupid, bool option/*=false*/) { + popup = last_popup = popupid; + switch (popupid) { + case Pause: Draw_Popup(PSTR("Pause Print"), PSTR(""), PSTR(""), Popup); break; + case Stop: Draw_Popup(PSTR("Stop Print"), PSTR(""), PSTR(""), Popup); break; + case Resume: Draw_Popup(PSTR("Resume Print?"), PSTR("Looks Like the last"), PSTR("print was interupted."), Popup); break; + case ConfFilChange: Draw_Popup(PSTR("Confirm Filament Change"), PSTR(""), PSTR(""), Popup); break; + case PurgeMore: Draw_Popup(PSTR("Purge more filament?"), PSTR("(Cancel to finish process)"), PSTR(""), Popup); break; + case SaveLevel: Draw_Popup(PSTR("Leveling Complete"), PSTR("Save to EEPROM?"), PSTR(""), Popup); break; + case MeshSlot: Draw_Popup(PSTR("Mesh slot not selected"), PSTR("(Confirm to select slot 0)"), PSTR(""), Popup); break; + case ETemp: Draw_Popup(PSTR("Nozzle is too cold"), PSTR("Open Preheat Menu?"), PSTR(""), Popup); break; + case ManualProbing: Draw_Popup(PSTR("Manual Probing"), PSTR("(Confirm to probe)"), PSTR("(cancel to exit)"), Popup); break; + case Level: Draw_Popup(PSTR("Auto Bed Leveling"), PSTR("Please wait until done."), PSTR(""), Wait, ICON_AutoLeveling); break; + case Home: Draw_Popup(option ? PSTR("Parking") : PSTR("Homing"), PSTR("Please wait until done."), PSTR(""), Wait, ICON_BLTouch); break; + case MoveWait: Draw_Popup(PSTR("Moving to Point"), PSTR("Please wait until done."), PSTR(""), Wait, ICON_BLTouch); break; + case Heating: Draw_Popup(PSTR("Heating"), PSTR("Please wait until done."), PSTR(""), Wait, ICON_BLTouch); break; + case FilLoad: Draw_Popup(option ? PSTR("Unloading Filament") : PSTR("Loading Filament"), PSTR("Please wait until done."), PSTR(""), Wait, ICON_BLTouch); break; + case FilChange: Draw_Popup(PSTR("Filament Change"), PSTR("Please wait for prompt."), PSTR(""), Wait, ICON_BLTouch); break; + case TempWarn: Draw_Popup(option ? PSTR("Nozzle temp too low!") : PSTR("Nozzle temp too high!"), PSTR(""), PSTR(""), Wait, option ? ICON_TempTooLow : ICON_TempTooHigh); break; + case Runout: Draw_Popup(PSTR("Filament Runout"), PSTR(""), PSTR(""), Wait, ICON_BLTouch); break; + case PIDWait: Draw_Popup(PSTR("PID Autotune"), PSTR("in process"), PSTR("Please wait until done."), Wait, ICON_BLTouch); break; + case Resuming: Draw_Popup(PSTR("Resuming Print"), PSTR("Please wait until done."), PSTR(""), Wait, ICON_BLTouch); break; + default: break; + } +} + +void CrealityDWINClass::Confirm_Handler(PopupID popupid) { + popup = popupid; + switch (popupid) { + case FilInsert: Draw_Popup(PSTR("Insert Filament"), PSTR("Press to Continue"), PSTR(""), Confirm); break; + case HeaterTime: Draw_Popup(PSTR("Heater Timed Out"), PSTR("Press to Reheat"), PSTR(""), Confirm); break; + case UserInput: Draw_Popup(PSTR("Waiting for Input"), PSTR("Press to Continue"), PSTR(""), Confirm); break; + case LevelError: Draw_Popup(PSTR("Couldn't enable Leveling"), PSTR("(Valid mesh must exist)"), PSTR(""), Confirm); break; + case InvalidMesh: Draw_Popup(PSTR("Valid mesh must exist"), PSTR("before tuning can be"), PSTR("performed"), Confirm); break; + default: break; + } +} + +/* Navigation and Control */ + +void CrealityDWINClass::Main_Menu_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < 3) { + selection++; // Select Down + Main_Menu_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + selection--; // Select Up + Main_Menu_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) + switch (selection) { + case 0: card.mount(); Draw_SD_List(); break; + case 1: Draw_Menu(Prepare); break; + case 2: Draw_Menu(Control); break; + case 3: Draw_Menu(TERN(HAS_MESH, Leveling, InfoMain)); break; + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Menu_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < Get_Menu_Size(active_menu)) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + selection++; // Select Down + if (selection > scrollpos+MROWS) { + scrollpos++; + DWIN_Frame_AreaMove(1, 2, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Menu_Item_Handler(active_menu, selection); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + selection--; // Select Up + if (selection < scrollpos) { + scrollpos--; + DWIN_Frame_AreaMove(1, 3, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Menu_Item_Handler(active_menu, selection); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) + Menu_Item_Handler(active_menu, selection, false); + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Value_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW) + tempvalue += EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_CCW) + tempvalue -= EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + process = Menu; + EncoderRate.enabled = false; + Draw_Float(tempvalue / valueunit, selection - scrollpos, false, valueunit); + DWIN_UpdateLCD(); + if (active_menu == ZOffset && liveadjust) { + planner.synchronize(); + current_position.z += (tempvalue / valueunit - zoffsetvalue); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + current_position.z = 0; + sync_plan_position(); + } + else if (active_menu == Tune && selection == TUNE_ZOFFSET) { + sprintf_P(cmd, PSTR("M290 Z%s"), dtostrf((tempvalue / valueunit - zoffsetvalue), 1, 3, str_1)); + gcode.process_subcommands_now_P(cmd); + } + if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki)) + tempvalue = scalePID_i(tempvalue); + if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Kd) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Kd)) + tempvalue = scalePID_d(tempvalue); + switch (valuetype) { + case 0: *(float*)valuepointer = tempvalue / valueunit; break; + case 1: *(uint8_t*)valuepointer = tempvalue / valueunit; break; + case 2: *(uint16_t*)valuepointer = tempvalue / valueunit; break; + case 3: *(int16_t*)valuepointer = tempvalue / valueunit; break; + case 4: *(uint32_t*)valuepointer = tempvalue / valueunit; break; + case 5: *(int8_t*)valuepointer = tempvalue / valueunit; break; + } + switch (active_menu) { + case Move: + planner.synchronize(); + planner.buffer_line(current_position, manual_feedrate_mm_s[selection - 1], active_extruder); + break; + #if HAS_MESH + case ManualMesh: + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + break; + case UBLMesh: mesh_conf.manual_move(true); break; + case LevelManual: mesh_conf.manual_move(selection == LEVELING_M_OFFSET); break; + #endif + } + if (valuepointer == &planner.flow_percentage[0]) + planner.refresh_e_factor(0); + if (funcpointer) funcpointer(); + return; + } + NOLESS(tempvalue, (valuemin * valueunit)); + NOMORE(tempvalue, (valuemax * valueunit)); + Draw_Float(tempvalue / valueunit, selection - scrollpos, true, valueunit); + DWIN_UpdateLCD(); + if (active_menu == Move && livemove) { + *(float*)valuepointer = tempvalue / valueunit; + planner.buffer_line(current_position, manual_feedrate_mm_s[selection - 1], active_extruder); + } +} + +void CrealityDWINClass::Option_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW) + tempvalue += EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_CCW) + tempvalue -= EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + process = Menu; + EncoderRate.enabled = false; + if (valuepointer == &color_names) { + switch (selection) { + case COLORSETTINGS_CURSOR: eeprom_settings.cursor_color = tempvalue; break; + case COLORSETTINGS_SPLIT_LINE: eeprom_settings.menu_split_line = tempvalue; break; + case COLORSETTINGS_MENU_TOP_BG: eeprom_settings.menu_top_bg = tempvalue; break; + case COLORSETTINGS_MENU_TOP_TXT: eeprom_settings.menu_top_txt = tempvalue; break; + case COLORSETTINGS_HIGHLIGHT_BORDER: eeprom_settings.highlight_box = tempvalue; break; + case COLORSETTINGS_PROGRESS_PERCENT: eeprom_settings.progress_percent = tempvalue; break; + case COLORSETTINGS_PROGRESS_TIME: eeprom_settings.progress_time = tempvalue; break; + case COLORSETTINGS_PROGRESS_STATUS_BAR: eeprom_settings.status_bar_text = tempvalue; break; + case COLORSETTINGS_PROGRESS_STATUS_AREA: eeprom_settings.status_area_text = tempvalue; break; + case COLORSETTINGS_PROGRESS_COORDINATES: eeprom_settings.coordinates_text = tempvalue; break; + case COLORSETTINGS_PROGRESS_COORDINATES_LINE: eeprom_settings.coordinates_split_line = tempvalue; break; + } + Redraw_Screen(); + } + else if (valuepointer == &preheat_modes) + preheatmode = tempvalue; + + Draw_Option(tempvalue, static_cast(valuepointer), selection - scrollpos, false, (valuepointer == &color_names)); + DWIN_UpdateLCD(); + return; + } + NOLESS(tempvalue, valuemin); + NOMORE(tempvalue, valuemax); + Draw_Option(tempvalue, static_cast(valuepointer), selection - scrollpos, true); + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::File_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + static uint8_t filescrl = 0; + if (encoder_diffState == ENCODER_DIFF_NO) { + if (selection > 0) { + card.getfilename_sorted(SD_ORDER(selection - 1, card.get_num_Files())); + char * const filename = card.longest_filename(); + size_t len = strlen(filename); + int8_t pos = len; + if (!card.flag.filenameIsDir) + while (pos && filename[pos] != '.') pos--; + if (pos > MENU_CHAR_LIMIT) { + static millis_t time = 0; + if (PENDING(millis(), time)) return; + time = millis() + 200; + pos -= filescrl; + len = _MIN(pos, MENU_CHAR_LIMIT); + char name[len + 1]; + if (pos >= 0) { + LOOP_L_N(i, len) name[i] = filename[i + filescrl]; + } + else { + LOOP_L_N(i, MENU_CHAR_LIMIT + pos) name[i] = ' '; + LOOP_S_L_N(i, MENU_CHAR_LIMIT + pos, MENU_CHAR_LIMIT) name[i] = filename[i - (MENU_CHAR_LIMIT + pos)]; + } + name[len] = '\0'; + DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(selection - scrollpos) - 14, 271, MBASE(selection - scrollpos) + 28); + Draw_Menu_Item(selection - scrollpos, card.flag.filenameIsDir ? ICON_More : ICON_File, name); + if (-pos >= MENU_CHAR_LIMIT) filescrl = 0; + filescrl++; + DWIN_UpdateLCD(); + } + } + return; + } + if (encoder_diffState == ENCODER_DIFF_CW && selection < card.get_num_Files()) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + if (selection > 0) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(selection - scrollpos) - 14, 271, MBASE(selection - scrollpos) + 28); + Draw_SD_Item(selection, selection - scrollpos); + } + filescrl = 0; + selection++; // Select Down + if (selection > scrollpos + MROWS) { + scrollpos++; + DWIN_Frame_AreaMove(1, 2, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Draw_SD_Item(selection, selection - scrollpos); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(selection - scrollpos) - 14, 271, MBASE(selection - scrollpos) + 28); + Draw_SD_Item(selection, selection - scrollpos); + filescrl = 0; + selection--; // Select Up + if (selection < scrollpos) { + scrollpos--; + DWIN_Frame_AreaMove(1, 3, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Draw_SD_Item(selection, selection - scrollpos); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (selection == 0) { + if (card.flag.workDirIsRoot) { + process = Main; + Draw_Main_Menu(); + } + else { + card.cdup(); + Draw_SD_List(); + } + } + else { + card.getfilename_sorted(SD_ORDER(selection - 1, card.get_num_Files())); + if (card.flag.filenameIsDir) { + card.cd(card.filename); + Draw_SD_List(); + } + else { + card.openAndPrintFile(card.filename); + } + } + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Print_Screen_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < 2) { + selection++; // Select Down + Print_Screen_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + selection--; // Select Up + Print_Screen_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (selection) { + case 0: + Draw_Menu(Tune); + Update_Status_Bar(true); + break; + case 1: + if (paused) { + if (sdprint) { + wait_for_user = false; + #if ENABLED(PARK_HEAD_ON_PAUSE) + card.startOrResumeFilePrinting(); + TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); + #else + char cmnd[20]; + #if HAS_HEATED_BED + cmnd[sprintf_P(cmnd, PSTR("M140 S%i"), pausebed)] = '\0'; + gcode.process_subcommands_now_P(PSTR(cmnd)); + #endif + #if HAS_EXTRUDERS + cmnd[sprintf_P(cmnd, PSTR("M109 S%i"), pausetemp)] = '\0'; + gcode.process_subcommands_now_P(PSTR(cmnd)); + #endif + TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan); + planner.synchronize(); + TERN_(SDSUPPORT, queue.inject_P(PSTR("M24"))); + #endif + } + else { + TERN_(HOST_ACTION_COMMANDS, host_action_resume()); + } + Draw_Print_Screen(); + } + else + Popup_Handler(Pause); + break; + case 2: + Popup_Handler(Stop); + break; + } + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Popup_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < 1) { + selection++; + Popup_Select(); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + selection--; + Popup_Select(); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (popup) { + case Pause: + if (selection == 0) { + if (sdprint) { + #if ENABLED(POWER_LOSS_RECOVERY) + if (recovery.enabled) recovery.save(true); + #endif + #if ENABLED(PARK_HEAD_ON_PAUSE) + Popup_Handler(Home, true); + #if ENABLED(SDSUPPORT) + if (IS_SD_PRINTING()) card.pauseSDPrint(); + #endif + planner.synchronize(); + queue.inject_P(PSTR("M125")); + planner.synchronize(); + #else + queue.inject_P(PSTR("M25")); + TERN_(HAS_HOTEND, pausetemp = thermalManager.temp_hotend[0].target); + TERN_(HAS_HEATED_BED, pausebed = thermalManager.temp_bed.target); + TERN_(HAS_FAN, pausefan = thermalManager.fan_speed[0]); + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + #endif + } + else { + TERN_(HOST_ACTION_COMMANDS, host_action_pause()); + } + } + Draw_Print_Screen(); + break; + case Stop: + if (selection == 0) { + if (sdprint) { + ui.abort_print(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + thermalManager.disable_all_heaters(); + } + else { + TERN_(HOST_ACTION_COMMANDS, host_action_cancel()); + } + } + else + Draw_Print_Screen(); + break; + case Resume: + if (selection == 0) + queue.inject_P(PSTR("M1000")); + else { + queue.inject_P(PSTR("M1000 C")); + Draw_Main_Menu(); + } + break; + + #if HAS_HOTEND + case ETemp: + if (selection == 0) { + thermalManager.setTargetHotend(EXTRUDE_MINTEMP, 0); + thermalManager.set_fan_speed(0, MAX_FAN_SPEED); + Draw_Menu(PreheatHotend); + } + else + Redraw_Menu(true, true, false); + break; + #endif + + #if HAS_BED_PROBE + case ManualProbing: + if (selection == 0) { + char buf[80]; + const float dif = probe.probe_at_point(current_position.x, current_position.y, PROBE_PT_STOW, 0, false) - corner_avg; + sprintf_P(buf, dif > 0 ? PSTR("Corner is %smm high") : PSTR("Corner is %smm low"), dtostrf(abs(dif), 1, 3, str_1)); + Update_Status(buf); + } + else { + Redraw_Menu(true, true, false); + Update_Status(""); + } + break; + #endif + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case ConfFilChange: + if (selection == 0) { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + } + } + else + Redraw_Menu(true, true, false); + break; + case PurgeMore: + if (selection == 0) { + pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; + Popup_Handler(FilChange); + } + else { + pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; + if (printing) Popup_Handler(Resuming); + else Redraw_Menu(true, true, (active_menu==PreheatHotend)); + } + break; + #endif // ADVANCED_PAUSE_FEATURE + + #if HAS_MESH + case SaveLevel: + if (selection == 0) { + #if ENABLED(AUTO_BED_LEVELING_UBL) + gcode.process_subcommands_now_P(PSTR("G29 S")); + planner.synchronize(); + AudioFeedback(true); + #else + AudioFeedback(settings.save()); + #endif + } + Draw_Menu(Leveling, LEVELING_GET_MESH); + break; + #endif + + #if ENABLED(AUTO_BED_LEVELING_UBL) + case MeshSlot: + if (selection == 0) ubl.storage_slot = 0; + Redraw_Menu(true, true); + break; + #endif + default: break; + } + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Confirm_Control() { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (popup) { + case Complete: + Draw_Main_Menu(); + break; + case FilInsert: + Popup_Handler(FilChange); + wait_for_user = false; + break; + case HeaterTime: + Popup_Handler(Heating); + wait_for_user = false; + break; + default: + Redraw_Menu(true, true, false); + wait_for_user = false; + break; + } + } + DWIN_UpdateLCD(); +} + +/* In-Menu Value Modification */ + +void CrealityDWINClass::Setup_Value(float value, float min, float max, float unit, uint8_t type) { + if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki)) + tempvalue = unscalePID_i(value) * unit; + else if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Kd) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Kd)) + tempvalue = unscalePID_d(value) * unit; + else + tempvalue = value * unit; + valuemin = min; + valuemax = max; + valueunit = unit; + valuetype = type; + process = Value; + EncoderRate.enabled = true; + Draw_Float(tempvalue / unit, selection - scrollpos, true, valueunit); +} + +void CrealityDWINClass::Modify_Value(float &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 0); +} +void CrealityDWINClass::Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 1); +} +void CrealityDWINClass::Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 2); +} +void CrealityDWINClass::Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 3); +} +void CrealityDWINClass::Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 4); +} +void CrealityDWINClass::Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 5); +} + +void CrealityDWINClass::Modify_Option(uint8_t value, const char * const * options, uint8_t max) { + tempvalue = value; + valuepointer = const_cast(options); + valuemin = 0; + valuemax = max; + process = Option; + EncoderRate.enabled = true; + Draw_Option(value, options, selection - scrollpos, true); +} + +/* Main Functions */ + +void CrealityDWINClass::Update_Status(const char * const text) { + char header[4]; + LOOP_L_N(i, 3) header[i] = text[i]; + header[3] = '\0'; + if (strcmp_P(header,"") == 0) { + LOOP_L_N(i, _MIN((size_t)LONG_FILENAME_LENGTH, strlen(text))) filename[i] = text[i + 3]; + filename[_MIN((size_t)LONG_FILENAME_LENGTH - 1, strlen(text))] = '\0'; + Draw_Print_Filename(true); + } + else { + LOOP_L_N(i, _MIN((size_t)64, strlen(text))) statusmsg[i] = text[i]; + statusmsg[_MIN((size_t)64, strlen(text))] = '\0'; + } +} + +void CrealityDWINClass::Start_Print(bool sd) { + sdprint = sd; + if (!printing) { + printing = true; + statusmsg[0] = '\0'; + if (sd) { + if (recovery.valid()) { + SdFile *diveDir = nullptr; + const char * const fname = card.diveToFile(true, diveDir, recovery.info.sd_filename); + card.selectFileByName(fname); + } + strcpy_P(filename, card.longest_filename()); + } + else + strcpy_P(filename, "Host Print"); + TERN_(LCD_SET_PROGRESS_MANUALLY, ui.set_progress(0)); + TERN_(USE_M73_REMAINING_TIME, ui.set_remaining_time(0)); + Draw_Print_Screen(); + } +} + +void CrealityDWINClass::Stop_Print() { + printing = false; + sdprint = false; + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + thermalManager.disable_all_heaters(); + TERN_(LCD_SET_PROGRESS_MANUALLY, ui.set_progress(100 * (PROGRESS_SCALE))); + TERN_(USE_M73_REMAINING_TIME, ui.set_remaining_time(0)); + Draw_Print_confirm(); +} + +void CrealityDWINClass::Update() { + State_Update(); + Screen_Update(); + switch (process) { + case Main: Main_Menu_Control(); break; + case Menu: Menu_Control(); break; + case Value: Value_Control(); break; + case Option: Option_Control(); break; + case File: File_Control(); break; + case Print: Print_Screen_Control(); break; + case Popup: Popup_Control(); break; + case Confirm: Confirm_Control(); break; + } +} + +void MarlinUI::update() { CrealityDWIN.Update(); } + +void CrealityDWINClass::State_Update() { + if ((print_job_timer.isRunning() || print_job_timer.isPaused()) != printing) { + if (!printing) Start_Print((card.isFileOpen() || recovery.valid())); + else Stop_Print(); + } + if (print_job_timer.isPaused() != paused) { + paused = print_job_timer.isPaused(); + if (process == Print) Print_Screen_Icons(); + if (process == Wait && !paused) Redraw_Menu(true, true); + } + if (wait_for_user && !(process == Confirm) && !print_job_timer.isPaused()) + Confirm_Handler(UserInput); + #if ENABLED(ADVANCED_PAUSE_FEATURE) + if (process == Popup && popup == PurgeMore) { + if (pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE) + Popup_Handler(FilChange); + else if (pause_menu_response == PAUSE_RESPONSE_RESUME_PRINT) { + if (printing) Popup_Handler(Resuming); + else Redraw_Menu(true, true, (active_menu==PreheatHotend)); + } + } + #endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + static bool ranout = false; + if (runout.filament_ran_out != ranout) { + ranout = runout.filament_ran_out; + if (ranout) Popup_Handler(Runout); + } + #endif +} + +void CrealityDWINClass::Screen_Update() { + static millis_t scrltime = 0; + if (ELAPSED(millis(), scrltime)) { + scrltime = millis() + 200; + Update_Status_Bar(); + if (process == Print) Draw_Print_Filename(); + } + + static millis_t statustime = 0; + if (ELAPSED(millis(), statustime)) { + statustime = millis() + 500; + Draw_Status_Area(); + } + + static millis_t printtime = 0; + if (ELAPSED(millis(), printtime)) { + printtime = millis() + 1000; + if (process == Print) { + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + TERN_(USE_M73_REMAINING_TIME, Draw_Print_ProgressRemain()); + } + } + + static bool mounted = card.isMounted(); + if (mounted != card.isMounted()) { + mounted = card.isMounted(); + if (process == File) + Draw_SD_List(); + } + + #if HAS_HOTEND + static int16_t hotendtarget = -1; + #endif + #if HAS_HEATED_BED + static int16_t bedtarget = -1; + #endif + #if HAS_FAN + static int16_t fanspeed = -1; + #endif + + #if HAS_ZOFFSET_ITEM + static float lastzoffset = zoffsetvalue; + if (zoffsetvalue != lastzoffset) { + lastzoffset = zoffsetvalue; + #if HAS_BED_PROBE + probe.offset.z = zoffsetvalue; + #else + set_home_offset(Z_AXIS, -zoffsetvalue); + #endif + } + + #if HAS_BED_PROBE + if (probe.offset.z != lastzoffset) + zoffsetvalue = lastzoffset = probe.offset.z; + #else + if (-home_offset.z != lastzoffset) + zoffsetvalue = lastzoffset = -home_offset.z; + #endif + #endif // HAS_ZOFFSET_ITEM + + if (process == Menu || process == Value) { + switch (active_menu) { + case TempMenu: + #if HAS_HOTEND + if (thermalManager.temp_hotend[0].target != hotendtarget) { + hotendtarget = thermalManager.temp_hotend[0].target; + if (scrollpos <= TEMP_HOTEND && TEMP_HOTEND <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_hotend[0].target, TEMP_HOTEND - scrollpos, false, 1); + } + } + #endif + #if HAS_HEATED_BED + if (thermalManager.temp_bed.target != bedtarget) { + bedtarget = thermalManager.temp_bed.target; + if (scrollpos <= TEMP_BED && TEMP_BED <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_bed.target, TEMP_BED - scrollpos, false, 1); + } + } + #endif + #if HAS_FAN + if (thermalManager.fan_speed[0] != fanspeed) { + fanspeed = thermalManager.fan_speed[0]; + if (scrollpos <= TEMP_FAN && TEMP_FAN <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.fan_speed[0], TEMP_FAN - scrollpos, false, 1); + } + } + #endif + break; + case Tune: + #if HAS_HOTEND + if (thermalManager.temp_hotend[0].target != hotendtarget) { + hotendtarget = thermalManager.temp_hotend[0].target; + if (scrollpos <= TUNE_HOTEND && TUNE_HOTEND <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_hotend[0].target, TUNE_HOTEND - scrollpos, false, 1); + } + } + #endif + #if HAS_HEATED_BED + if (thermalManager.temp_bed.target != bedtarget) { + bedtarget = thermalManager.temp_bed.target; + if (scrollpos <= TUNE_BED && TUNE_BED <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_bed.target, TUNE_BED - scrollpos, false, 1); + } + } + #endif + #if HAS_FAN + if (thermalManager.fan_speed[0] != fanspeed) { + fanspeed = thermalManager.fan_speed[0]; + if (scrollpos <= TUNE_FAN && TUNE_FAN <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.fan_speed[0], TUNE_FAN - scrollpos, false, 1); + } + } + #endif + break; + } + } +} + +void CrealityDWINClass::AudioFeedback(const bool success/*=true*/) { + if (success) { + if (eeprom_settings.beeperenable) { + BUZZ(100, 659); + BUZZ( 10, 0); + BUZZ(100, 698); + } + else Update_Status("Success"); + } + else if (eeprom_settings.beeperenable) + BUZZ(40, 440); + else + Update_Status("Failed"); +} + +void CrealityDWINClass::Save_Settings(char *buff) { + TERN_(AUTO_BED_LEVELING_UBL, eeprom_settings.tilt_grid_size = mesh_conf.tilt_grid - 1); + eeprom_settings.corner_pos = corner_pos * 10; + memcpy(buff, &eeprom_settings, min(sizeof(eeprom_settings), eeprom_data_size)); +} + +void CrealityDWINClass::Load_Settings(const char *buff) { + memcpy(&eeprom_settings, buff, min(sizeof(eeprom_settings), eeprom_data_size)); + TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1); + if (eeprom_settings.corner_pos == 0) eeprom_settings.corner_pos = 325; + corner_pos = eeprom_settings.corner_pos / 10.0f; + Redraw_Screen(); + #if ENABLED(POWER_LOSS_RECOVERY) + static bool init = true; + if (init) { + init = false; + queue.inject_P(PSTR("M1000 S")); + } + #endif +} + +void CrealityDWINClass::Reset_Settings() { + eeprom_settings.time_format_textual = false; + eeprom_settings.beeperenable = true; + TERN_(AUTO_BED_LEVELING_UBL, eeprom_settings.tilt_grid_size = 0); + eeprom_settings.corner_pos = 325; + eeprom_settings.cursor_color = 0; + eeprom_settings.menu_split_line = 0; + eeprom_settings.menu_top_bg = 0; + eeprom_settings.menu_top_txt = 0; + eeprom_settings.highlight_box = 0; + eeprom_settings.progress_percent = 0; + eeprom_settings.progress_time = 0; + eeprom_settings.status_bar_text = 0; + eeprom_settings.status_area_text = 0; + eeprom_settings.coordinates_text = 0; + eeprom_settings.coordinates_split_line = 0; + TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1); + corner_pos = eeprom_settings.corner_pos / 10.0f; + Redraw_Screen(); +} + +void MarlinUI::init() { + delay(800); + SERIAL_ECHOPGM("\nDWIN handshake "); + if (DWIN_Handshake()) SERIAL_ECHOLNPGM("ok."); else SERIAL_ECHOLNPGM("error."); + DWIN_Frame_SetDir(1); // Orientation 90° + DWIN_UpdateLCD(); // Show bootscreen (first image) + Encoder_Configuration(); + for (uint16_t t = 0; t <= 100; t += 2) { + DWIN_ICON_Show(ICON, ICON_Bar, 15, 260); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 15 + t * 242 / 100, 260, 257, 280); + DWIN_UpdateLCD(); + delay(20); + } + DWIN_JPG_CacheTo1(Language_English); + CrealityDWIN.Redraw_Screen(); +} + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) { + switch (message) { + case PAUSE_MESSAGE_INSERT: CrealityDWIN.Confirm_Handler(FilInsert); break; + case PAUSE_MESSAGE_OPTION: CrealityDWIN.Popup_Handler(PurgeMore); break; + case PAUSE_MESSAGE_HEAT: CrealityDWIN.Confirm_Handler(HeaterTime); break; + case PAUSE_MESSAGE_WAITING: CrealityDWIN.Draw_Print_Screen(); break; + default: break; + } + } +#endif + +#endif // DWIN_CREALITY_LCD_JYERSUI diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.h b/Marlin/src/lcd/e3v2/jyersui/dwin.h new file mode 100644 index 000000000000..d6c8539cc650 --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.h @@ -0,0 +1,364 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * lcd/e3v2/jyersui/dwin.h + */ + +#include "dwin_lcd.h" +#include "rotary_encoder.h" +#include "../../../libs/BL24CXX.h" +#include "../../../inc/MarlinConfigPre.h" + +enum processID : uint8_t { + Main, Print, Menu, Value, Option, File, Popup, Confirm, Wait +}; + +enum PopupID : uint8_t { + Pause, Stop, Resume, SaveLevel, ETemp, ConfFilChange, PurgeMore, MeshSlot, + Level, Home, MoveWait, Heating, FilLoad, FilChange, TempWarn, Runout, PIDWait, Resuming, ManualProbing, + FilInsert, HeaterTime, UserInput, LevelError, InvalidMesh, UI, Complete +}; + +enum menuID : uint8_t { + MainMenu, + Prepare, + Move, + HomeMenu, + ManualLevel, + ZOffset, + Preheat, + ChangeFilament, + Control, + TempMenu, + PID, + HotendPID, + BedPID, + Preheat1, + Preheat2, + Preheat3, + Preheat4, + Preheat5, + Motion, + HomeOffsets, + MaxSpeed, + MaxAcceleration, + MaxJerk, + Steps, + Visual, + ColorSettings, + Advanced, + ProbeMenu, + Info, + Leveling, + LevelManual, + LevelView, + MeshViewer, + LevelSettings, + ManualMesh, + UBLMesh, + InfoMain, + Tune, + PreheatHotend +}; + +#define Start_Process 0 +#define Language_English 1 +#define Language_Chinese 2 + +#define ICON 7 // Icon set file 7.ICO + +#define ICON_LOGO 0 +#define ICON_Print_0 1 +#define ICON_Print_1 2 +#define ICON_Prepare_0 3 +#define ICON_Prepare_1 4 +#define ICON_Control_0 5 +#define ICON_Control_1 6 +#define ICON_Leveling_0 7 +#define ICON_Leveling_1 8 +#define ICON_HotendTemp 9 +#define ICON_BedTemp 10 +#define ICON_Speed 11 +#define ICON_Zoffset 12 +#define ICON_Back 13 +#define ICON_File 14 +#define ICON_PrintTime 15 +#define ICON_RemainTime 16 +#define ICON_Setup_0 17 +#define ICON_Setup_1 18 +#define ICON_Pause_0 19 +#define ICON_Pause_1 20 +#define ICON_Continue_0 21 +#define ICON_Continue_1 22 +#define ICON_Stop_0 23 +#define ICON_Stop_1 24 +#define ICON_Bar 25 +#define ICON_More 26 + +#define ICON_Axis 27 +#define ICON_CloseMotor 28 +#define ICON_Homing 29 +#define ICON_SetHome 30 +#define ICON_PLAPreheat 31 +#define ICON_ABSPreheat 32 +#define ICON_Cool 33 +#define ICON_Language 34 + +#define ICON_MoveX 35 +#define ICON_MoveY 36 +#define ICON_MoveZ 37 +#define ICON_Extruder 38 + +#define ICON_Temperature 40 +#define ICON_Motion 41 +#define ICON_WriteEEPROM 42 +#define ICON_ReadEEPROM 43 +#define ICON_ResumeEEPROM 44 +#define ICON_Info 45 + +#define ICON_SetEndTemp 46 +#define ICON_SetBedTemp 47 +#define ICON_FanSpeed 48 +#define ICON_SetPLAPreheat 49 +#define ICON_SetABSPreheat 50 + +#define ICON_MaxSpeed 51 +#define ICON_MaxAccelerated 52 +#define ICON_MaxJerk 53 +#define ICON_Step 54 +#define ICON_PrintSize 55 +#define ICON_Version 56 +#define ICON_Contact 57 +#define ICON_StockConfiguraton 58 +#define ICON_MaxSpeedX 59 +#define ICON_MaxSpeedY 60 +#define ICON_MaxSpeedZ 61 +#define ICON_MaxSpeedE 62 +#define ICON_MaxAccX 63 +#define ICON_MaxAccY 64 +#define ICON_MaxAccZ 65 +#define ICON_MaxAccE 66 +#define ICON_MaxSpeedJerkX 67 +#define ICON_MaxSpeedJerkY 68 +#define ICON_MaxSpeedJerkZ 69 +#define ICON_MaxSpeedJerkE 70 +#define ICON_StepX 71 +#define ICON_StepY 72 +#define ICON_StepZ 73 +#define ICON_StepE 74 +#define ICON_Setspeed 75 +#define ICON_SetZOffset 76 +#define ICON_Rectangle 77 +#define ICON_BLTouch 78 +#define ICON_TempTooLow 79 +#define ICON_AutoLeveling 80 +#define ICON_TempTooHigh 81 +#define ICON_NoTips_C 82 +#define ICON_NoTips_E 83 +#define ICON_Continue_C 84 +#define ICON_Continue_E 85 +#define ICON_Cancel_C 86 +#define ICON_Cancel_E 87 +#define ICON_Confirm_C 88 +#define ICON_Confirm_E 89 +#define ICON_Info_0 90 +#define ICON_Info_1 91 + +// Custom icons +#if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS) + // index of every custom icon should be >= CUSTOM_ICON_START + #define CUSTOM_ICON_START ICON_Checkbox_F + #define ICON_Checkbox_F 200 + #define ICON_Checkbox_T 201 + #define ICON_Fade 202 + #define ICON_Mesh 203 + #define ICON_Tilt 204 + #define ICON_Brightness 205 + #define ICON_AxisD 249 + #define ICON_AxisBR 250 + #define ICON_AxisTR 251 + #define ICON_AxisBL 252 + #define ICON_AxisTL 253 + #define ICON_AxisC 254 +#else + #define ICON_Fade ICON_Version + #define ICON_Mesh ICON_Version + #define ICON_Tilt ICON_Version + #define ICON_Brightness ICON_Version + #define ICON_AxisD ICON_Axis + #define ICON_AxisBR ICON_Axis + #define ICON_AxisTR ICON_Axis + #define ICON_AxisBL ICON_Axis + #define ICON_AxisTL ICON_Axis + #define ICON_AxisC ICON_Axis +#endif + +#define font6x12 0x00 +#define font8x16 0x01 +#define font10x20 0x02 +#define font12x24 0x03 +#define font14x28 0x04 +#define font16x32 0x05 +#define font20x40 0x06 +#define font24x48 0x07 +#define font28x56 0x08 +#define font32x64 0x09 + +enum colorID : uint8_t { + Default, White, Green, Cyan, Blue, Magenta, Red, Orange, Yellow, Brown, Black +}; + +#define Custom_Colors 10 +#define Color_White 0xFFFF +#define Color_Light_White 0xBDD7 +#define Color_Green 0x07E0 +#define Color_Light_Green 0x3460 +#define Color_Cyan 0x07FF +#define Color_Light_Cyan 0x04F3 +#define Color_Blue 0x015F +#define Color_Light_Blue 0x3A6A +#define Color_Magenta 0xF81F +#define Color_Light_Magenta 0x9813 +#define Color_Red 0xF800 +#define Color_Light_Red 0x8800 +#define Color_Orange 0xFA20 +#define Color_Light_Orange 0xFBC0 +#define Color_Yellow 0xFF0F +#define Color_Light_Yellow 0x8BE0 +#define Color_Brown 0xCC27 +#define Color_Light_Brown 0x6204 +#define Color_Black 0x0000 +#define Color_Grey 0x18E3 +#define Color_Bg_Window 0x31E8 // Popup background color +#define Color_Bg_Blue 0x1125 // Dark blue background color +#define Color_Bg_Black 0x0841 // Black background color +#define Color_Bg_Red 0xF00F // Red background color +#define Popup_Text_Color 0xD6BA // Popup font background color +#define Line_Color 0x3A6A // Split line color +#define Rectangle_Color 0xEE2F // Blue square cursor color +#define Percent_Color 0xFE29 // Percentage color +#define BarFill_Color 0x10E4 // Fill color of progress bar +#define Select_Color 0x33BB // Selected color +#define Check_Color 0x4E5C // Check-box check color +#define Confirm_Color 0x34B9 +#define Cancel_Color 0x3186 + +class CrealityDWINClass { +public: + static constexpr size_t eeprom_data_size = 48; + static struct EEPROM_Settings { // use bit fields to save space, max 48 bytes + bool time_format_textual : 1; + bool beeperenable : 1; + #if ENABLED(AUTO_BED_LEVELING_UBL) + uint8_t tilt_grid_size : 3; + #endif + uint16_t corner_pos : 10; + uint8_t cursor_color : 4; + uint8_t menu_split_line : 4; + uint8_t menu_top_bg : 4; + uint8_t menu_top_txt : 4; + uint8_t highlight_box : 4; + uint8_t progress_percent : 4; + uint8_t progress_time : 4; + uint8_t status_bar_text : 4; + uint8_t status_area_text : 4; + uint8_t coordinates_text : 4; + uint8_t coordinates_split_line : 4; + } eeprom_settings; + + static constexpr const char * const color_names[11] = { "Default", "White", "Green", "Cyan", "Blue", "Magenta", "Red", "Orange", "Yellow", "Brown", "Black" }; + static constexpr const char * const preheat_modes[3] = { "Both", "Hotend", "Bed" }; + + static void Clear_Screen(uint8_t e=3); + static void Draw_Float(float value, uint8_t row, bool selected=false, uint8_t minunit=10); + static void Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected=false, bool color=false); + static uint16_t GetColor(uint8_t color, uint16_t original, bool light=false); + static void Draw_Checkbox(uint8_t row, bool value); + static void Draw_Title(const char * title); + static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, bool more=false, bool centered=false); + static void Draw_Menu(uint8_t menu, uint8_t select=0, uint8_t scroll=0); + static void Redraw_Menu(bool lastprocess=true, bool lastselection=false, bool lastmenu=false); + static void Redraw_Screen(); + + static void Main_Menu_Icons(); + static void Draw_Main_Menu(uint8_t select=0); + static void Print_Screen_Icons(); + static void Draw_Print_Screen(); + static void Draw_Print_Filename(const bool reset=false); + static void Draw_Print_ProgressBar(); + #if ENABLED(USE_M73_REMAINING_TIME) + static void Draw_Print_ProgressRemain(); + #endif + static void Draw_Print_ProgressElapsed(); + static void Draw_Print_confirm(); + static void Draw_SD_Item(uint8_t item, uint8_t row); + static void Draw_SD_List(bool removed=false); + static void Draw_Status_Area(bool icons=false); + static void Draw_Popup(PGM_P const line1, PGM_P const line2, PGM_P const line3, uint8_t mode, uint8_t icon=0); + static void Popup_Select(); + static void Update_Status_Bar(bool refresh=false); + + #if ENABLED(AUTO_BED_LEVELING_UBL) + static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7); + static void Set_Mesh_Viewer_Status(); + #endif + + static const char * Get_Menu_Title(uint8_t menu); + static uint8_t Get_Menu_Size(uint8_t menu); + static void Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw=true); + + static void Popup_Handler(PopupID popupid, bool option = false); + static void Confirm_Handler(PopupID popupid); + + static void Main_Menu_Control(); + static void Menu_Control(); + static void Value_Control(); + static void Option_Control(); + static void File_Control(); + static void Print_Screen_Control(); + static void Popup_Control(); + static void Confirm_Control(); + + static void Setup_Value(float value, float min, float max, float unit, uint8_t type); + static void Modify_Value(float &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Option(uint8_t value, const char * const * options, uint8_t max); + + static void Update_Status(const char * const text); + static void Start_Print(bool sd); + static void Stop_Print(); + static void Update(); + static void State_Update(); + static void Screen_Update(); + static void AudioFeedback(const bool success=true); + static void Save_Settings(char *buff); + static void Load_Settings(const char *buff); + static void Reset_Settings(); +}; + +extern CrealityDWINClass CrealityDWIN; diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp new file mode 100644 index 000000000000..5380d1b93e8c --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp @@ -0,0 +1,474 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/******************************************************************************** + * @file lcd/e3v2/jyersui/dwin_lcd.cpp + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + +#include "../../../inc/MarlinConfig.h" + +#include "dwin_lcd.h" +#include // for memset + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +// Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail. +// Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters. +uint8_t DWIN_SendBuf[11 + DWIN_WIDTH / 6 * 2] = { 0xAA }; +uint8_t DWIN_BufTail[4] = { 0xCC, 0x33, 0xC3, 0x3C }; +uint8_t databuf[26] = { 0 }; +uint8_t receivedType; + +int recnum = 0; + +inline void DWIN_Byte(size_t &i, const uint16_t bval) { + DWIN_SendBuf[++i] = bval; +} + +inline void DWIN_Word(size_t &i, const uint16_t wval) { + DWIN_SendBuf[++i] = wval >> 8; + DWIN_SendBuf[++i] = wval & 0xFF; +} + +inline void DWIN_Long(size_t &i, const uint32_t lval) { + DWIN_SendBuf[++i] = (lval >> 24) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 16) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 8) & 0xFF; + DWIN_SendBuf[++i] = lval & 0xFF; +} + +inline void DWIN_String(size_t &i, const char * const string) { + const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, strlen(string)); + memcpy(&DWIN_SendBuf[i + 1], string, len); + i += len; +} + +inline void DWIN_String(size_t &i, const __FlashStringHelper * string) { + if (!string) return; + const size_t len = strlen_P((PGM_P)string); // cast it to PGM_P, which is basically const char *, and measure it using the _P version of strlen. + if (len == 0) return; + memcpy(&DWIN_SendBuf[i + 1], string, len); + i += len; +} + +// Send the data in the buffer and the packet end +inline void DWIN_Send(size_t &i) { + ++i; + LOOP_L_N(n, i) { LCD_SERIAL.write(DWIN_SendBuf[n]); delayMicroseconds(1); } + LOOP_L_N(n, 4) { LCD_SERIAL.write(DWIN_BufTail[n]); delayMicroseconds(1); } +} + +/*-------------------------------------- System variable function --------------------------------------*/ + +// Handshake (1: Success, 0: Fail) +bool DWIN_Handshake(void) { + #ifndef LCD_BAUDRATE + #define LCD_BAUDRATE 115200 + #endif + LCD_SERIAL.begin(LCD_BAUDRATE); + const millis_t serial_connect_timeout = millis() + 1000UL; + while (!LCD_SERIAL && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + + size_t i = 0; + DWIN_Byte(i, 0x00); + DWIN_Send(i); + + while (LCD_SERIAL.available() > 0 && recnum < (signed)sizeof(databuf)) { + databuf[recnum] = LCD_SERIAL.read(); + // ignore the invalid data + if (databuf[0] != FHONE) { // prevent the program from running. + if (recnum > 0) { + recnum = 0; + ZERO(databuf); + } + continue; + } + delay(10); + recnum++; + } + + return ( recnum >= 3 + && databuf[0] == FHONE + && databuf[1] == '\0' + && databuf[2] == 'O' + && databuf[3] == 'K' ); +} + +// Set the backlight luminance +// luminance: (0x00-0xFF) +void DWIN_Backlight_SetLuminance(const uint8_t luminance) { + size_t i = 0; + DWIN_Byte(i, 0x30); + DWIN_Byte(i, luminance); + DWIN_Send(i); +} + +// Set screen display direction +// dir: 0=0°, 1=90°, 2=180°, 3=270° +void DWIN_Frame_SetDir(uint8_t dir) { + size_t i = 0; + DWIN_Byte(i, 0x34); + DWIN_Byte(i, 0x5A); + DWIN_Byte(i, 0xA5); + DWIN_Byte(i, dir); + DWIN_Send(i); +} + +// Update display +void DWIN_UpdateLCD(void) { + size_t i = 0; + DWIN_Byte(i, 0x3D); + DWIN_Send(i); +} + +/*---------------------------------------- Drawing functions ----------------------------------------*/ + +// Clear screen +// color: Clear screen color +void DWIN_Frame_Clear(const uint16_t color) { + size_t i = 0; + DWIN_Byte(i, 0x01); + DWIN_Word(i, color); + DWIN_Send(i); +} + +// Draw a point +// color: Pixel segment color +// width: point width 0x01-0x0F +// height: point height 0x01-0x0F +// x,y: upper left point +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x02); + DWIN_Word(i, color); + DWIN_Byte(i, width); + DWIN_Byte(i, height); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Draw a line +// color: Line segment color +// xStart/yStart: Start point +// xEnd/yEnd: End point +void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x03); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +// Draw a rectangle +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xEnd/yEnd: lower right point +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, + uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x05); + DWIN_Byte(i, mode); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +//Color: color +//x/y: Upper-left coordinate of the first pixel +void DWIN_Draw_DegreeSymbol(uint16_t Color, uint16_t x, uint16_t y) { + DWIN_Draw_Point(Color, 1, 1, x + 1, y); + DWIN_Draw_Point(Color, 1, 1, x + 2, y); + DWIN_Draw_Point(Color, 1, 1, x, y + 1); + DWIN_Draw_Point(Color, 1, 1, x + 3, y + 1); + DWIN_Draw_Point(Color, 1, 1, x, y + 2); + DWIN_Draw_Point(Color, 1, 1, x + 3, y + 2); + DWIN_Draw_Point(Color, 1, 1, x + 1, y + 3); + DWIN_Draw_Point(Color, 1, 1, x + 2, y + 3); +} + +// Move a screen area +// mode: 0, circle shift; 1, translation +// dir: 0=left, 1=right, 2=up, 3=down +// dis: Distance +// color: Fill color +// xStart/yStart: upper left point +// xEnd/yEnd: bottom right point +void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, + uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x09); + DWIN_Byte(i, (mode << 7) | dir); + DWIN_Word(i, dis); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +/*---------------------------------------- Text related functions ----------------------------------------*/ + +// Draw a string +// widthAdjust: true=self-adjust character width; false=no adjustment +// bShow: true=display background color; false=don't display background color +// size: Font size +// color: Character color +// bColor: Background color +// x/y: Upper-left coordinate of the string +// *string: The string +void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, + uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * string) { + size_t i = 0; + DWIN_Byte(i, 0x11); + // Bit 7: widthAdjust + // Bit 6: bShow + // Bit 5-4: Unused (0) + // Bit 3-0: size + DWIN_Byte(i, (widthAdjust * 0x80) | (bShow * 0x40) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_String(i, string); + DWIN_Send(i); +} + +// Draw a positive integer +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of digits +// x/y: Upper-left coordinate +// value: Integer value +void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + size_t i = 0; + DWIN_Byte(i, 0x14); + // Bit 7: bshow + // Bit 6: 1 = signed; 0 = unsigned number; + // Bit 5: zeroFill + // Bit 4: zeroMode + // Bit 3-0: size + DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Byte(i, iNum); + DWIN_Byte(i, 0); // fNum + DWIN_Word(i, x); + DWIN_Word(i, y); + #if 0 + for (char count = 0; count < 8; count++) { + DWIN_Byte(i, value); + value >>= 8; + if (!(value & 0xFF)) break; + } + #else + // Write a big-endian 64 bit integer + const size_t p = i + 1; + for (char count = 8; count--;) { // 7..0 + ++i; + DWIN_SendBuf[p + count] = value; + value >>= 8; + } + #endif + + DWIN_Send(i); +} + +// Draw a floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + //uint8_t *fvalue = (uint8_t*)&value; + size_t i = 0; + DWIN_Byte(i, 0x14); + DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Byte(i, iNum); + DWIN_Byte(i, fNum); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Long(i, value); + /* + DWIN_Byte(i, fvalue[3]); + DWIN_Byte(i, fvalue[2]); + DWIN_Byte(i, fvalue[1]); + DWIN_Byte(i, fvalue[0]); + */ + DWIN_Send(i); +} + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Draw JPG and cached in #0 virtual display area +// id: Picture ID +void DWIN_JPG_ShowAndCache(const uint8_t id) { + size_t i = 0; + DWIN_Word(i, 0x2200); + DWIN_Byte(i, id); + DWIN_Send(i); // AA 23 00 00 00 00 08 00 01 02 03 CC 33 C3 3C +} + +// Draw an Icon +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x23); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Byte(i, 0x80 | libID); + DWIN_Byte(i, picID); + DWIN_Send(i); +} + +// Unzip the JPG picture to a virtual display area +// n: Cache index +// id: Picture ID +void DWIN_JPG_CacheToN(uint8_t n, uint8_t id) { + size_t i = 0; + DWIN_Byte(i, 0x25); + DWIN_Byte(i, n); + DWIN_Byte(i, id); + DWIN_Send(i); +} + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x27); + DWIN_Byte(i, 0x80 | cacheID); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Animate a series of icons +// animID: Animation ID; 0x00-0x0F +// animate: true on; false off; +// libID: Icon library ID +// picIDs: Icon starting ID +// picIDe: Icon ending ID +// x/y: Upper-left point +// interval: Display time interval, unit 10mS +void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x28); + DWIN_Word(i, x); + DWIN_Word(i, y); + // Bit 7: animation on or off + // Bit 6: start from begin or end + // Bit 5-4: unused (0) + // Bit 3-0: animID + DWIN_Byte(i, (animate * 0x80) | 0x40 | animID); + DWIN_Byte(i, libID); + DWIN_Byte(i, picIDs); + DWIN_Byte(i, picIDe); + DWIN_Byte(i, interval); + DWIN_Send(i); +} + +// Animation Control +// state: 16 bits, each bit is the state of an animation id +void DWIN_ICON_AnimationControl(uint16_t state) { + size_t i = 0; + DWIN_Byte(i, 0x28); + DWIN_Word(i, state); + DWIN_Send(i); +} + +/*---------------------------------------- Memory functions ----------------------------------------*/ +// The LCD has an additional 32KB SRAM and 16KB Flash + +// Data can be written to the sram and save to one of the jpeg page files + +// Write Data Memory +// command 0x31 +// Type: Write memory selection; 0x5A=SRAM; 0xA5=Flash +// Address: Write data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash +// Data: data +// +// Flash writing returns 0xA5 0x4F 0x4B + +// Read Data Memory +// command 0x32 +// Type: Read memory selection; 0x5A=SRAM; 0xA5=Flash +// Address: Read data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash +// Length: leangth of data to read; 0x01-0xF0 +// +// Response: +// Type, Address, Length, Data + +// Write Picture Memory +// Write the contents of the 32KB SRAM data memory into the designated image memory space +// Issued: 0x5A, 0xA5, PIC_ID +// Response: 0xA5 0x4F 0x4B +// +// command 0x33 +// 0x5A, 0xA5 +// PicId: Picture Memory location, 0x00-0x0F +// +// Flash writing returns 0xA5 0x4F 0x4B + +#endif // DWIN_CREALITY_LCD_JYERSUI diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h new file mode 100644 index 000000000000..18b7c347440c --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h @@ -0,0 +1,218 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/******************************************************************************** + * @file lcd/e3v2/jyersui/dwin_lcd.h + * @brief DWIN screen control functions + ********************************************************************************/ + +#include + +#define RECEIVED_NO_DATA 0x00 +#define RECEIVED_SHAKE_HAND_ACK 0x01 + +#define FHONE 0xAA + +#define DWIN_SCROLL_UP 2 +#define DWIN_SCROLL_DOWN 3 + +#define DWIN_WIDTH 272 +#define DWIN_HEIGHT 480 + +/*-------------------------------------- System variable function --------------------------------------*/ + +// Handshake (1: Success, 0: Fail) +bool DWIN_Handshake(void); + +// Common DWIN startup +void DWIN_Startup(void); + +// Set the backlight luminance +// luminance: (0x00-0xFF) +void DWIN_Backlight_SetLuminance(const uint8_t luminance); + +// Set screen display direction +// dir: 0=0°, 1=90°, 2=180°, 3=270° +void DWIN_Frame_SetDir(uint8_t dir); + +// Update display +void DWIN_UpdateLCD(void); + +/*---------------------------------------- Drawing functions ----------------------------------------*/ + +// Clear screen +// color: Clear screen color +void DWIN_Frame_Clear(const uint16_t color); + +// Draw a point +// color: Line segment color +// width: point width 0x01-0x0F +// height: point height 0x01-0x0F +// x,y: upper left point +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y); + +// Draw a line +// color: Line segment color +// xStart/yStart: Start point +// xEnd/yEnd: End point +void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +// Draw a Horizontal line +// color: Line segment color +// xStart/yStart: Start point +// xLength: Line Length +inline void DWIN_Draw_HLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xLength) { + DWIN_Draw_Line(color, xStart, yStart, xStart + xLength - 1, yStart); +} + +// Draw a Vertical line +// color: Line segment color +// xStart/yStart: Start point +// yLength: Line Length +inline void DWIN_Draw_VLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t yLength) { + DWIN_Draw_Line(color, xStart, yStart, xStart, yStart + yLength - 1); +} + +// Draw a rectangle +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xEnd/yEnd: lower right point +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, + uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +// Draw a box +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xSize/ySize: box size +inline void DWIN_Draw_Box(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xSize, uint16_t ySize) { + DWIN_Draw_Rectangle(mode, color, xStart, yStart, xStart + xSize - 1, yStart + ySize - 1); +} + +//Color: color +//x: upper left point +//y: bottom right point +void DWIN_Draw_DegreeSymbol(uint16_t Color, uint16_t x, uint16_t y); + +// Move a screen area +// mode: 0, circle shift; 1, translation +// dir: 0=left, 1=right, 2=up, 3=down +// dis: Distance +// color: Fill color +// xStart/yStart: upper left point +// xEnd/yEnd: bottom right point +void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, + uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +/*---------------------------------------- Text related functions ----------------------------------------*/ + +// Draw a string +// widthAdjust: true=self-adjust character width; false=no adjustment +// bShow: true=display background color; false=don't display background color +// size: Font size +// color: Character color +// bColor: Background color +// x/y: Upper-left coordinate of the string +// *string: The string +void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, + uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * string); + +class __FlashStringHelper; + +inline void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + // Note that this won't work on AVR. This is for 32-bit systems only! + // Are __FlashStringHelper versions worth keeping? + DWIN_Draw_String(widthAdjust, bShow, size, color, bColor, x, y, reinterpret_cast(title)); +} + +// Draw a positive integer +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of digits +// x/y: Upper-left coordinate +// value: Integer value +void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value); + +// Draw a floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Draw JPG and cached in #0 virtual display area +// id: Picture ID +void DWIN_JPG_ShowAndCache(const uint8_t id); + +// Draw an Icon +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y); + +// Unzip the JPG picture to a virtual display area +// n: Cache index +// id: Picture ID +void DWIN_JPG_CacheToN(uint8_t n, uint8_t id); + +// Unzip the JPG picture to virtual display area #1 +// id: Picture ID +inline void DWIN_JPG_CacheTo1(uint8_t id) { DWIN_JPG_CacheToN(1, id); } + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Animate a series of icons +// animID: Animation ID up to 16 +// animate: animation on or off +// libID: Icon library ID +// picIDs: Icon starting ID +// picIDe: Icon ending ID +// x/y: Upper-left point +// interval: Display time interval, unit 10mS +void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, + uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval); + +// Animation Control +// state: 16 bits, each bit is the state of an animation id +void DWIN_ICON_AnimationControl(uint16_t state); diff --git a/Marlin/src/lcd/e3v2/jyersui/rotary_encoder.cpp b/Marlin/src/lcd/e3v2/jyersui/rotary_encoder.cpp new file mode 100644 index 000000000000..47ddc901841c --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/rotary_encoder.cpp @@ -0,0 +1,261 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/***************************************************************************** + * @file lcd/e3v2/jyersui/rotary_encoder.cpp + * @brief Rotary encoder functions + *****************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + +#include "rotary_encoder.h" +#include "../../buttons.h" + +#include "../../../MarlinCore.h" +#include "../../marlinui.h" +#include "../../../HAL/shared/Delay.h" + +#if HAS_BUZZER + #include "../../../libs/buzzer.h" + #include "dwin.h" +#endif + +#include + +#ifndef ENCODER_PULSES_PER_STEP + #define ENCODER_PULSES_PER_STEP 4 +#endif + +ENCODER_Rate EncoderRate; + +// Buzzer +void Encoder_tick() { + #if PIN_EXISTS(BEEPER) + if (CrealityDWIN.eeprom_settings.beeperenable) { + WRITE(BEEPER_PIN, HIGH); + delay(10); + WRITE(BEEPER_PIN, LOW); + } + #endif +} + +// Encoder initialization +void Encoder_Configuration() { + #if BUTTON_EXISTS(EN1) + SET_INPUT_PULLUP(BTN_EN1); + #endif + #if BUTTON_EXISTS(EN2) + SET_INPUT_PULLUP(BTN_EN2); + #endif + #if BUTTON_EXISTS(ENC) + SET_INPUT_PULLUP(BTN_ENC); + #endif + #if PIN_EXISTS(BEEPER) + SET_OUTPUT(BEEPER_PIN); + #endif +} + +// Analyze encoder value and return state +ENCODER_DiffState Encoder_ReceiveAnalyze() { + const millis_t now = millis(); + static uint8_t lastEncoderBits; + uint8_t newbutton = 0; + static signed char temp_diff = 0; + + ENCODER_DiffState temp_diffState = ENCODER_DIFF_NO; + if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; + if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; + if (BUTTON_PRESSED(ENC)) { + static millis_t next_click_update_ms; + if (ELAPSED(now, next_click_update_ms)) { + next_click_update_ms = millis() + 300; + Encoder_tick(); + #if PIN_EXISTS(LCD_LED) + //LED_Action(); + #endif + if (ui.backlight) return ENCODER_DIFF_ENTER; + ui.refresh_brightness(); + } + else return ENCODER_DIFF_NO; + } + if (newbutton != lastEncoderBits) { + switch (newbutton) { + case ENCODER_PHASE_0: + if (lastEncoderBits == ENCODER_PHASE_3) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_1) temp_diff--; + break; + case ENCODER_PHASE_1: + if (lastEncoderBits == ENCODER_PHASE_0) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_2) temp_diff--; + break; + case ENCODER_PHASE_2: + if (lastEncoderBits == ENCODER_PHASE_1) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_3) temp_diff--; + break; + case ENCODER_PHASE_3: + if (lastEncoderBits == ENCODER_PHASE_2) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_0) temp_diff--; + break; + } + lastEncoderBits = newbutton; + } + + if (ABS(temp_diff) >= ENCODER_PULSES_PER_STEP) { + #if ENABLED(REVERSE_ENCODER_DIRECTION) + if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CCW; + else temp_diffState = ENCODER_DIFF_CW; + #else + if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CW; + else temp_diffState = ENCODER_DIFF_CCW; + #endif + + #if ENABLED(ENCODER_RATE_MULTIPLIER) + + millis_t ms = millis(); + int32_t encoderMultiplier = 1; + + // if must encoder rati multiplier + if (EncoderRate.enabled) { + const float abs_diff = ABS(temp_diff), + encoderMovementSteps = abs_diff / (ENCODER_PULSES_PER_STEP); + if (EncoderRate.lastEncoderTime) { + // Note that the rate is always calculated between two passes through the + // loop and that the abs of the temp_diff value is tracked. + const float encoderStepRate = encoderMovementSteps / float(ms - EncoderRate.lastEncoderTime) * 1000; + if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; + else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; + else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5; + } + EncoderRate.lastEncoderTime = ms; + } + + #else + + constexpr int32_t encoderMultiplier = 1; + + #endif + + // EncoderRate.encoderMoveValue += (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP); + EncoderRate.encoderMoveValue = (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP); + if (EncoderRate.encoderMoveValue < 0) EncoderRate.encoderMoveValue = -EncoderRate.encoderMoveValue; + + temp_diff = 0; + } + return temp_diffState; +} + +#if PIN_EXISTS(LCD_LED) + + // Take the low 24 valid bits 24Bit: G7 G6 G5 G4 G3 G2 G1 G0 R7 R6 R5 R4 R3 R2 R1 R0 B7 B6 B5 B4 B3 B2 B1 B0 + uint16_t LED_DataArray[LED_NUM]; + + // LED light operation + void LED_Action() { + LED_Control(RGB_SCALE_WARM_WHITE,0x0F); + delay(30); + LED_Control(RGB_SCALE_WARM_WHITE,0x00); + } + + // LED initialization + void LED_Configuration() { + SET_OUTPUT(LCD_LED_PIN); + } + + // LED write data + void LED_WriteData() { + uint8_t tempCounter_LED, tempCounter_Bit; + for (tempCounter_LED = 0; tempCounter_LED < LED_NUM; tempCounter_LED++) { + for (tempCounter_Bit = 0; tempCounter_Bit < 24; tempCounter_Bit++) { + if (LED_DataArray[tempCounter_LED] & (0x800000 >> tempCounter_Bit)) { + LED_DATA_HIGH; + DELAY_NS(300); + LED_DATA_LOW; + DELAY_NS(200); + } + else { + LED_DATA_HIGH; + LED_DATA_LOW; + DELAY_NS(200); + } + } + } + } + + // LED control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + void LED_Control(const uint8_t RGB_Scale, const uint8_t luminance) { + for (uint8_t i = 0; i < LED_NUM; i++) { + LED_DataArray[i] = 0; + switch (RGB_Scale) { + case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 5/10; break; + case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 4/10; break; + case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 8/10) << 16 | luminance * 7/10; break; + } + } + LED_WriteData(); + } + + // LED gradient control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + // change_Time: gradient time (ms) + void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval) { + struct { uint8_t g, r, b; } led_data[LED_NUM]; + for (uint8_t i = 0; i < LED_NUM; i++) { + switch (RGB_Scale) { + case RGB_SCALE_R10_G7_B5: + led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 5/10 }; + break; + case RGB_SCALE_R10_G7_B4: + led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 4/10 }; + break; + case RGB_SCALE_R10_G8_B7: + led_data[i] = { luminance * 8/10, luminance * 10/10, luminance * 7/10 }; + break; + } + } + + struct { bool g, r, b; } led_flag = { false, false, false }; + for (uint8_t i = 0; i < LED_NUM; i++) { + while (1) { + const uint8_t g = uint8_t(LED_DataArray[i] >> 16), + r = uint8_t(LED_DataArray[i] >> 8), + b = uint8_t(LED_DataArray[i]); + if (g == led_data[i].g) led_flag.g = true; + else LED_DataArray[i] += (g > led_data[i].g) ? -0x010000 : 0x010000; + if (r == led_data[i].r) led_flag.r = true; + else LED_DataArray[i] += (r > led_data[i].r) ? -0x000100 : 0x000100; + if (b == led_data[i].b) led_flag.b = true; + else LED_DataArray[i] += (b > led_data[i].b) ? -0x000001 : 0x000001; + LED_WriteData(); + if (led_flag.r && led_flag.g && led_flag.b) break; + delay(change_Interval); + } + } + } + +#endif // LCD_LED + +#endif // DWIN_CREALITY_LCD_JYERSUI diff --git a/Marlin/src/lcd/e3v2/jyersui/rotary_encoder.h b/Marlin/src/lcd/e3v2/jyersui/rotary_encoder.h new file mode 100644 index 000000000000..0febe6bd359a --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/rotary_encoder.h @@ -0,0 +1,91 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/***************************************************************************** + * @file lcd/e3v2/jyersui/rotary_encoder.h + * @brief Rotary encoder functions + ****************************************************************************/ + +#include "../../../inc/MarlinConfig.h" + +/*********************** Encoder Set ***********************/ + +typedef struct { + bool enabled = false; + int encoderMoveValue = 0; + millis_t lastEncoderTime = 0; +} ENCODER_Rate; + +extern ENCODER_Rate EncoderRate; + +typedef enum { + ENCODER_DIFF_NO = 0, // no state + ENCODER_DIFF_CW = 1, // clockwise rotation + ENCODER_DIFF_CCW = 2, // counterclockwise rotation + ENCODER_DIFF_ENTER = 3 // click +} ENCODER_DiffState; + +// Encoder initialization +void Encoder_Configuration(); + +// Analyze encoder value and return state +ENCODER_DiffState Encoder_ReceiveAnalyze(); + +/*********************** Encoder LED ***********************/ + +#if PIN_EXISTS(LCD_LED) + + #define LED_NUM 4 + #define LED_DATA_HIGH WRITE(LCD_LED_PIN, 1) + #define LED_DATA_LOW WRITE(LCD_LED_PIN, 0) + + #define RGB_SCALE_R10_G7_B5 1 + #define RGB_SCALE_R10_G7_B4 2 + #define RGB_SCALE_R10_G8_B7 3 + #define RGB_SCALE_NEUTRAL_WHITE RGB_SCALE_R10_G7_B5 + #define RGB_SCALE_WARM_WHITE RGB_SCALE_R10_G7_B4 + #define RGB_SCALE_COOL_WHITE RGB_SCALE_R10_G8_B7 + + extern unsigned int LED_DataArray[LED_NUM]; + + // LED light operation + void LED_Action(); + + // LED initialization + void LED_Configuration(); + + // LED write data + void LED_WriteData(); + + // LED control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + void LED_Control(const uint8_t RGB_Scale, const uint8_t luminance); + + // LED gradient control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + // change_Time: gradient time (ms) + void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval); + +#endif // LCD_LED diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index faa6c8f41a85..59759319be30 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -195,7 +195,7 @@ namespace ExtUI { #endif inline void simulateUserClick() { - #if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) + #if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) ui.lcd_clicked = true; #endif } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 8911941ee0c5..51cbf4534fe7 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -48,6 +48,8 @@ MarlinUI ui; #if ENABLED(DWIN_CREALITY_LCD) #include "e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "e3v2/jyersui/dwin.h" #endif #if ENABLED(LCD_PROGRESS_BAR) && !IS_TFTGLCD_PANEL @@ -99,6 +101,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; backlight = !!value; if (backlight) brightness = constrain(value, MIN_LCD_BRIGHTNESS, MAX_LCD_BRIGHTNESS); // Set brightness on enabled LCD here + TERN_(DWIN_CREALITY_LCD_JYERSUI, DWIN_Backlight_SetLuminance(backlight ? brightness : 0)); } #endif @@ -136,6 +139,21 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; bool MarlinUI::lcd_clicked; #endif +#if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) + + bool MarlinUI::get_blink() { + static uint8_t blink = 0; + static millis_t next_blink_ms = 0; + millis_t ms = millis(); + if (ELAPSED(ms, next_blink_ms)) { + blink ^= 0xFF; + next_blink_ms = ms + 1000 - (LCD_UPDATE_INTERVAL) / 2; + } + return blink != 0; + } + +#endif + #if HAS_WIRED_LCD #if HAS_MARLINUI_U8GLIB @@ -415,17 +433,6 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; TERN_(HAS_ENCODER_ACTION, encoderDiff = 0); } - bool MarlinUI::get_blink() { - static uint8_t blink = 0; - static millis_t next_blink_ms = 0; - millis_t ms = millis(); - if (ELAPSED(ms, next_blink_ms)) { - blink ^= 0xFF; - next_blink_ms = ms + 1000 - (LCD_UPDATE_INTERVAL) / 2; - } - return blink != 0; - } - //////////////////////////////////////////// ///////////// Keypad Handling ////////////// //////////////////////////////////////////// @@ -1468,6 +1475,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message)); TERN_(DWIN_CREALITY_LCD, DWIN_StatusChanged(status_message)); + TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Update_Status(status_message)); } #if ENABLED(STATUS_MESSAGE_SCROLLING) diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index edee8f0cc2d0..268d01850854 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -55,7 +55,7 @@ #include "../module/printcounter.h" #endif -#if ENABLED(ADVANCED_PAUSE_FEATURE) && EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) +#if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) #include "../feature/pause.h" #include "../module/motion.h" // for active_extruder #endif @@ -76,8 +76,6 @@ uint8_t get_ADC_keyValue(); #endif - #define LCD_UPDATE_INTERVAL TERN(HAS_TOUCH_BUTTONS, 50, 100) - #if HAS_LCD_MENU #include "lcdprint.h" @@ -95,6 +93,10 @@ #endif // HAS_WIRED_LCD +#if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) + #define LCD_UPDATE_INTERVAL TERN(HAS_TOUCH_BUTTONS, 50, 100) +#endif + #if HAS_MARLINUI_U8GLIB enum MarlinFont : uint8_t { FONT_STATUSMENU = 1, @@ -363,6 +365,10 @@ class MarlinUI { static void poweroff(); #endif + #if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) + static bool get_blink(); + #endif + #if HAS_WIRED_LCD static millis_t next_button_update_ms; @@ -451,7 +457,6 @@ class MarlinUI { static bool did_first_redraw; #endif - static bool get_blink(); static void kill_screen(PGM_P const lcd_error, PGM_P const lcd_component); static void draw_kill_screen(); @@ -580,7 +585,7 @@ class MarlinUI { static inline bool use_click() { return false; } #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) && EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) + #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder); #else static inline void _pause_show_message() {} diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 632f95558dea..f2d2aeee92ce 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -73,6 +73,10 @@ #include "../lcd/extui/ui_api.h" #endif +#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "../lcd/e3v2/jyersui/dwin.h" +#endif + #if HAS_SERVOS #include "servo.h" #endif @@ -441,6 +445,13 @@ typedef struct SettingsDataStruct { uint8_t extui_data[ExtUI::eeprom_data_size]; #endif + // + // DWIN_CREALITY_LCD_JYERSUI + // + #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + uint8_t dwin_settings[CrealityDWIN.eeprom_data_size]; + #endif + // // CASELIGHT_USES_BRIGHTNESS // @@ -1346,6 +1357,18 @@ void MarlinSettings::postprocess() { } #endif + // + // Creality UI Settings + // + #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + { + char dwin_settings[CrealityDWIN.eeprom_data_size] = { 0 }; + CrealityDWIN.Save_Settings(dwin_settings); + _FIELD_TEST(dwin_settings); + EEPROM_WRITE(dwin_settings); + } + #endif + // // Case Light Brightness // @@ -2225,6 +2248,18 @@ void MarlinSettings::postprocess() { } #endif + // + // Creality UI Settings + // + #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + { + const char dwin_settings[CrealityDWIN.eeprom_data_size] = { 0 }; + _FIELD_TEST(dwin_settings); + EEPROM_READ(dwin_settings); + if (!validating) CrealityDWIN.Load_Settings(dwin_settings); + } + #endif + // // Case Light Brightness // @@ -2622,6 +2657,8 @@ void MarlinSettings::reset() { TERN_(EXTENSIBLE_UI, ExtUI::onFactoryReset()); + TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Reset_Settings()); + // // Case Light Brightness // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 58f2ac280849..56d548847cad 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -266,7 +266,7 @@ #define EXP2_09_PIN P0_15 #define EXP2_10_PIN P0_17 -#if EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD #define BTN_ENC EXP1_06_PIN diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index af7b7d7e58ae..8b855e8d01c9 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -197,8 +197,8 @@ #define EXP1_09_PIN P0_16 #define EXP1_10_PIN P2_08 -#if ENABLED(DWIN_CREALITY_LCD) - #error "DWIN_CREALITY_LCD requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue." +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) + #error "Ender-3 V2 display requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue." /** * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index fe4fd3a4a72c..9f923b4ea95b 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -134,7 +134,7 @@ #define EXP1_3 PB7 #endif -#if EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) /** * ------ ------ ------ * VCC | 1 2 | GND VCC | 1 2 | GND GND | 2 1 | VCC diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 65d3fe731de8..2aa48b749907 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -186,7 +186,7 @@ #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." #endif -#elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) +#elif EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD #define BTN_ENC PB14 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index 6062755d3c89..52ebdecc3576 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -216,7 +216,7 @@ #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_06_PIN -#elif EITHER(DWIN_CREALITY_LCD, IS_DWIN_MARLINUI) +#elif EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD #define BTN_ENC PB14 diff --git a/buildroot/tests/STM32F103RET6_creality b/buildroot/tests/STM32F103RET6_creality index a941eb906af2..0ad66bfdb92a 100755 --- a/buildroot/tests/STM32F103RET6_creality +++ b/buildroot/tests/STM32F103RET6_creality @@ -13,6 +13,11 @@ use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_enable MARLIN_DEV_MODE BUFFER_MONITORING exec_test $1 $2 "Ender 3 v2 with CrealityUI" "$3" +use_example_configs "Creality/Ender-3 V2/CrealityUI" +opt_disable DWIN_CREALITY_LCD +opt_enable DWIN_CREALITY_LCD_JYERSUI +exec_test $1 $2 "Ender 3 v2 with JyersUI" "$3" + use_example_configs "Creality/Ender-3 V2/MarlinUI" opt_add SDCARD_EEPROM_EMULATION exec_test $1 $2 "Ender 3 v2 with MarlinUI" "$3" diff --git a/ini/features.ini b/ini/features.ini index 4a1c638de273..acadd7763a85 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -45,6 +45,7 @@ I2C_EEPROM = src_filter=+ DWIN_CREALITY_LCD = src_filter=+ +DWIN_CREALITY_LCD_JYERSUI = src_filter=+ DWIN_MARLINUI_.+ = src_filter=+ HAS_GRAPHICAL_TFT = src_filter=+ IS_TFTGLCD_PANEL = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 55c7577e3731..23ee15d98b45 100644 --- a/platformio.ini +++ b/platformio.ini @@ -49,8 +49,8 @@ extra_scripts = lib_deps = default_src_filter = + - - + - - - - - - - - - - + - - - - - - - - - From 0f61d9e4dd4d4e4f27e5c688ab2c5dbd0f03af84 Mon Sep 17 00:00:00 2001 From: Miguel Risco-Castillo Date: Tue, 7 Sep 2021 02:15:24 -0500 Subject: [PATCH 316/323] =?UTF-8?q?=E2=9C=A8=20Ender-3=20V2=20CrealityUI?= =?UTF-8?q?=20Enhanced=20(#21942)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Scott Lahteine --- Marlin/Configuration.h | 5 + Marlin/src/MarlinCore.cpp | 13 +- Marlin/src/feature/pause.cpp | 13 +- Marlin/src/feature/powerloss.cpp | 2 +- Marlin/src/feature/powerloss.h | 2 +- Marlin/src/feature/runout.cpp | 3 + Marlin/src/gcode/bedlevel/abl/G29.cpp | 17 +- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 3 + Marlin/src/gcode/bedlevel/ubl/M421.cpp | 3 + Marlin/src/gcode/calibrate/G28.cpp | 11 +- Marlin/src/gcode/control/M997.cpp | 6 + Marlin/src/gcode/feature/powerloss/M1000.cpp | 7 +- Marlin/src/gcode/lcd/M0_M1.cpp | 4 + Marlin/src/gcode/lcd/M73.cpp | 28 +- Marlin/src/gcode/sd/M1001.cpp | 3 + Marlin/src/gcode/stats/M75-M78.cpp | 23 +- Marlin/src/gcode/temp/M303.cpp | 3 + Marlin/src/inc/Conditionals_LCD.h | 5 +- Marlin/src/inc/SanityCheck.h | 18 +- Marlin/src/lcd/e3v2/{creality => }/README.md | 0 Marlin/src/lcd/e3v2/creality/rotary_encoder.h | 12 +- Marlin/src/lcd/e3v2/enhanced/dwin.cpp | 3529 +++++++++++++++++ Marlin/src/lcd/e3v2/enhanced/dwin.h | 268 ++ Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp | 564 +++ Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h | 282 ++ Marlin/src/lcd/e3v2/enhanced/dwinui.cpp | 452 +++ Marlin/src/lcd/e3v2/enhanced/dwinui.h | 623 +++ Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp | 69 + Marlin/src/lcd/e3v2/enhanced/lockscreen.h | 35 + .../src/lcd/e3v2/enhanced/rotary_encoder.cpp | 261 ++ Marlin/src/lcd/e3v2/enhanced/rotary_encoder.h | 93 + Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h | 3 - Marlin/src/lcd/language/language_en.h | 17 +- Marlin/src/lcd/marlinui.cpp | 5 +- Marlin/src/lcd/marlinui.h | 21 +- Marlin/src/lcd/tft/ui_common.h | 2 +- Marlin/src/module/probe.cpp | 4 +- Marlin/src/module/settings.cpp | 40 +- Marlin/src/module/temperature.cpp | 29 +- .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 2 +- Marlin/src/sd/cardreader.cpp | 4 +- buildroot/tests/STM32F103RET6_creality | 5 + ini/features.ini | 1 + platformio.ini | 2 +- 44 files changed, 6408 insertions(+), 84 deletions(-) rename Marlin/src/lcd/e3v2/{creality => }/README.md (100%) create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwinui.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwinui.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/lockscreen.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/rotary_encoder.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/rotary_encoder.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index a424b1967e37..6a9641186351 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2756,6 +2756,11 @@ // //#define DWIN_CREALITY_LCD +// +// Ender-3 v2 OEM display, enhanced. +// +//#define DWIN_CREALITY_LCD_ENHANCED + // // Ender-3 v2 OEM display with enhancements by Jacob Myers // diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index d68e87eb892b..49db8c61b930 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -77,6 +77,9 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "lcd/e3v2/creality/dwin.h" #include "lcd/e3v2/creality/rotary_encoder.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "lcd/e3v2/enhanced/dwin.h" + #include "lcd/e3v2/enhanced/rotary_encoder.h" #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "lcd/e3v2/jyersui/dwin.h" #include "lcd/e3v2/jyersui/rotary_encoder.h" @@ -849,7 +852,7 @@ void idle(bool no_stepper_sleep/*=false*/) { TERN_(USE_BEEPER, buzzer.tick()); // Handle UI input / draw events - TERN(DWIN_CREALITY_LCD, DWIN_Update(), ui.update()); + TERN(HAS_DWIN_E3V2_BASIC, DWIN_Update(), ui.update()); // Run i2c Position Encoders #if ENABLED(I2C_POSITION_ENCODERS) @@ -904,7 +907,7 @@ void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr // Echo the LCD message to serial for extra context if (lcd_error) { SERIAL_ECHO_START(); SERIAL_ECHOLNPGM_P(lcd_error); } - #if HAS_DISPLAY + #if EITHER(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED) ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR); #else UNUSED(lcd_error); UNUSED(lcd_component); @@ -1315,7 +1318,7 @@ void setup() { // UI must be initialized before EEPROM // (because EEPROM code calls the UI). - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC SETUP_RUN(DWIN_Startup()); #else SETUP_RUN(ui.init()); @@ -1590,7 +1593,7 @@ void setup() { SERIAL_ECHO_TERNARY(err, "BL24CXX Check ", "failed", "succeeded", "!\n"); #endif - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC Encoder_Configuration(); HMI_Init(); HMI_SetLanguageCache(); @@ -1598,7 +1601,7 @@ void setup() { DWIN_StatusChanged_P(GET_TEXT(WELCOME_MSG)); #endif - #if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD) + #if HAS_SERVICE_INTERVALS && !HAS_DWIN_E3V2_BASIC ui.reset_status(true); // Show service messages or keep current status #endif diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 9a402141e65f..f1d6dbb985af 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -53,6 +53,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #include "../lcd/marlinui.h" @@ -242,6 +244,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE))); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_FILAMENT_CHANGE_PURGE), CONTINUE_STR)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT(MSG_FILAMENT_CHANGE_PURGE), CONTINUE_STR)); wait_for_user = true; // A click or M108 breaks the purge_length loop for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); @@ -265,7 +268,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load // Show "Purge More" / "Resume" menu and wait for reply KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = false; - #if HAS_LCD_MENU + #if EITHER(HAS_LCD_MENU, DWIN_CREALITY_LCD_ENHANCED) ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR #else pause_menu_response = PAUSE_RESPONSE_WAIT_FOR; @@ -525,6 +528,8 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged_P(GET_TEXT(MSG_REHEATING))); + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status_P(GET_TEXT(MSG_REHEATING))); + // Re-enable the heaters if they timed out HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e); @@ -538,8 +543,13 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep const millis_t nozzle_timeout = SEC_TO_MS(PAUSE_PARK_NOZZLE_TIMEOUT); HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout); + TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_REHEATDONE), CONTINUE_STR)); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_REHEATDONE))); + + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status_P(GET_TEXT(MSG_REHEATDONE))); + wait_for_user = true; nozzle_timed_out = false; @@ -675,6 +685,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_ TERN_(HAS_STATUS_MESSAGE, ui.reset_status()); TERN_(HAS_LCD_MENU, ui.return_to_status()); + TERN_(DWIN_CREALITY_LCD_ENHANCED, HMI_ReturnScreen()); } #endif // ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index 3409e6714d9e..c86cb4f0d6cf 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -40,7 +40,7 @@ uint8_t PrintJobRecovery::queue_index_r; uint32_t PrintJobRecovery::cmd_sdpos, // = 0 PrintJobRecovery::sdpos[BUFSIZE]; -#if ENABLED(DWIN_CREALITY_LCD) +#if HAS_DWIN_E3V2_BASIC bool PrintJobRecovery::dwin_flag; // = false #endif diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index d3ecc6c9cc0b..6a13c92df797 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -145,7 +145,7 @@ class PrintJobRecovery { static uint32_t cmd_sdpos, //!< SD position of the next command sdpos[BUFSIZE]; //!< SD positions of queued commands - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC static bool dwin_flag; #endif diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp index 531ca1081f0b..ef1f876bdfa5 100644 --- a/Marlin/src/feature/runout.cpp +++ b/Marlin/src/feature/runout.cpp @@ -68,6 +68,8 @@ bool FilamentMonitorBase::enabled = true, #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif void event_filament_runout(const uint8_t extruder) { @@ -86,6 +88,7 @@ void event_filament_runout(const uint8_t extruder) { #endif TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder))); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_FilamentRunout(extruder)); #if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR) const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder); diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index ca36f6d46ed0..f756aa89df4d 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -58,10 +58,10 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" -#endif - -#if ENABLED(DWIN_CREALITY_LCD) +#elif ENABLED(DWIN_CREALITY_LCD) #include "../../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" #endif #if HAS_MULTI_HOTEND @@ -403,10 +403,9 @@ G29_TYPE GcodeSuite::G29() { #if ENABLED(AUTO_BED_LEVELING_3POINT) if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling"); points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points - #endif - - #if BOTH(AUTO_BED_LEVELING_BILINEAR, EXTENSIBLE_UI) - ExtUI::onMeshLevelingStart(); + #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) + TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart()); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshLevelingStart()); #endif if (!faux) { @@ -886,9 +885,7 @@ G29_TYPE GcodeSuite::G29() { process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); #endif - #if ENABLED(DWIN_CREALITY_LCD) - DWIN_CompletedLeveling(); - #endif + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedLeveling()); report_current_position(); diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index b8ca8bdee52c..adfe61d3d2dd 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -40,6 +40,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -191,6 +193,7 @@ void GcodeSuite::G29() { if (parser.seenval('Z')) { mbl.z_values[ix][iy] = parser.value_linear_units(); TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, mbl.z_values[ix][iy])); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ix, iy, mbl.z_values[ix][iy])); } else return echo_not_entered('Z'); diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp index f1e1b76126ed..e6f0ef1f8907 100644 --- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp @@ -33,6 +33,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" #endif /** @@ -67,6 +69,7 @@ void GcodeSuite::M421() { float &zval = ubl.z_values[ij.x][ij.y]; // Altering this Mesh Point zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); // N=NAN, Z=NEWVAL, or Q=ADDVAL TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ij.x, ij.y, zval)); } } diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 89ad20d906c7..d85c0306d475 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -46,12 +46,13 @@ #endif #include "../../lcd/marlinui.h" -#if ENABLED(DWIN_CREALITY_LCD) - #include "../../lcd/e3v2/creality/dwin.h" -#endif #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD) + #include "../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif #if HAS_L64XX // set L6470 absolute position registers to counts @@ -238,7 +239,7 @@ void GcodeSuite::G28() { return; } - TERN_(DWIN_CREALITY_LCD, DWIN_StartHoming()); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StartHoming()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart()); planner.synchronize(); // Wait for planner moves to finish! @@ -522,7 +523,7 @@ void GcodeSuite::G28() { ui.refresh(); - TERN_(DWIN_CREALITY_LCD, DWIN_CompletedHoming()); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedHoming()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingComplete()); report_current_position(); diff --git a/Marlin/src/gcode/control/M997.cpp b/Marlin/src/gcode/control/M997.cpp index cdff96f1acd8..73d795bcefc8 100644 --- a/Marlin/src/gcode/control/M997.cpp +++ b/Marlin/src/gcode/control/M997.cpp @@ -24,11 +24,17 @@ #if ENABLED(PLATFORM_M997_SUPPORT) +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" +#endif + /** * M997: Perform in-application firmware update */ void GcodeSuite::M997() { + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_RebootScreen()); + flashFirmware(parser.intval('S')); } diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index 0e731016ddce..3ebb286b5775 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -27,9 +27,14 @@ #include "../../gcode.h" #include "../../../feature/powerloss.h" #include "../../../module/motion.h" + #include "../../../lcd/marlinui.h" #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD) + #include "../../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented #endif @@ -64,7 +69,7 @@ void GcodeSuite::M1000() { if (parser.seen_test('S')) { #if HAS_LCD_MENU ui.goto_screen(menu_job_recovery); - #elif ENABLED(DWIN_CREALITY_LCD) + #elif HAS_DWIN_E3V2_BASIC recovery.dwin_flag = true; #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented CrealityDWIN.Popup_Handler(Resume); diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 414c4ce02396..cb37bfec2484 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -35,6 +35,8 @@ #include "../../lcd/marlinui.h" #elif ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif #if ENABLED(HOST_PROMPT_SUPPORT) @@ -68,6 +70,8 @@ void GcodeSuite::M0_M1() { ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string?? else ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT)); + #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg ?: GET_TEXT(MSG_STOPPED), GET_TEXT(MSG_USERWAIT)); #else if (parser.string_arg) { diff --git a/Marlin/src/gcode/lcd/M73.cpp b/Marlin/src/gcode/lcd/M73.cpp index 8996e5c88ecb..b7a9b3459e52 100644 --- a/Marlin/src/gcode/lcd/M73.cpp +++ b/Marlin/src/gcode/lcd/M73.cpp @@ -28,6 +28,10 @@ #include "../../lcd/marlinui.h" #include "../../sd/cardreader.h" +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" +#endif + /** * M73: Set percentage complete (for display on LCD) * @@ -35,13 +39,23 @@ * M73 P25 ; Set progress to 25% */ void GcodeSuite::M73() { - if (parser.seenval('P')) - ui.set_progress((PROGRESS_SCALE) > 1 - ? parser.value_float() * (PROGRESS_SCALE) - : parser.value_byte() - ); - #if ENABLED(USE_M73_REMAINING_TIME) - if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong()); + + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + + DWIN_Progress_Update(); + + #else + + if (parser.seenval('P')) + ui.set_progress((PROGRESS_SCALE) > 1 + ? parser.value_float() * (PROGRESS_SCALE) + : parser.value_byte() + ); + + #if ENABLED(USE_M73_REMAINING_TIME) + if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong()); + #endif + #endif } diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index cd4933ff2765..14bd712d272e 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -48,6 +48,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif #if ENABLED(HOST_ACTION_COMMANDS) @@ -106,6 +108,7 @@ void GcodeSuite::M1001() { #endif TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished()); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Print_Finished()); // Re-select the last printed file in the UI TERN_(SD_REPRINT_LAST_SELECTED_FILE, ui.reselect_last_file()); diff --git a/Marlin/src/gcode/stats/M75-M78.cpp b/Marlin/src/gcode/stats/M75-M78.cpp index 66f9f8eb8dd6..b55409946ea3 100644 --- a/Marlin/src/gcode/stats/M75-M78.cpp +++ b/Marlin/src/gcode/stats/M75-M78.cpp @@ -29,11 +29,19 @@ #include "../../MarlinCore.h" // for startOrResumeJob +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" +#endif + /** * M75: Start print timer */ void GcodeSuite::M75() { startOrResumeJob(); + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT)); + DWIN_Print_Started(false); + #endif } /** @@ -49,29 +57,30 @@ void GcodeSuite::M76() { */ void GcodeSuite::M77() { print_job_timer.stop(); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Print_Finished()); } #if ENABLED(PRINTCOUNTER) -/** + /** * M78: Show print statistics */ -void GcodeSuite::M78() { - if (parser.intval('S') == 78) { // "M78 S78" will reset the statistics + void GcodeSuite::M78() { + if (parser.intval('S') == 78) { // "M78 S78" will reset the statistics print_job_timer.initStats(); ui.reset_status(); - return; + return; } #if HAS_SERVICE_INTERVALS - if (parser.seenval('R')) { + if (parser.seenval('R')) { print_job_timer.resetServiceInterval(parser.value_int()); ui.reset_status(); - return; + return; } #endif print_job_timer.showStats(); -} + } #endif // PRINTCOUNTER diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index ad3afe6e460b..0d0ce478eed8 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -30,6 +30,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif /** @@ -71,6 +73,7 @@ void GcodeSuite::M303() { default: SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_BAD_EXTRUDER_NUM)); return; } diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 825ad58f9adc..a7bde803ba64 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -493,7 +493,10 @@ #endif // Aliases for LCD features -#if ANY(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_JYERSUI) +#if EITHER(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED) + #define HAS_DWIN_E3V2_BASIC 1 +#endif +#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI) #define HAS_DWIN_E3V2 1 #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 59b4a68ff1bc..3c00d84142e7 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -808,7 +808,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0." #endif #elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) - #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_*, or EXTENSIBLE_UI." + #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_*, OR EXTENSIBLE_UI." #endif #if ENABLED(USE_M73_REMAINING_TIME) && DISABLED(LCD_SET_PROGRESS_MANUALLY) @@ -1748,7 +1748,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS * LCD_BED_LEVELING requirements */ #if ENABLED(LCD_BED_LEVELING) - #if NONE(HAS_LCD_MENU, DWIN_CREALITY_LCD) + #if NONE(HAS_LCD_MENU, DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED) #error "LCD_BED_LEVELING is not supported by the selected LCD controller." #elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL) #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING." @@ -2655,7 +2655,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \ + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) \ + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ - + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1) \ + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ @@ -2763,6 +2763,18 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) #error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY." #endif +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #if DISABLED(SDSUPPORT) + #error "DWIN_CREALITY_LCD_ENHANCED requires SDSUPPORT to be enabled." + #elif ENABLED(PID_EDIT_MENU) + #error "DWIN_CREALITY_LCD_ENHANCED does not support PID_EDIT_MENU." + #elif ENABLED(PID_AUTOTUNE_MENU) + #error "DWIN_CREALITY_LCD_ENHANCED does not support PID_AUTOTUNE_MENU." + #elif ENABLED(LEVEL_BED_CORNERS) + #error "DWIN_CREALITY_LCD_ENHANCED does not support LEVEL_BED_CORNERS." + #elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) + #error "DWIN_CREALITY_LCD_ENHANCED does not support LCD_BED_LEVELING with PROBE_MANUALLY." + #endif #endif /** diff --git a/Marlin/src/lcd/e3v2/creality/README.md b/Marlin/src/lcd/e3v2/README.md similarity index 100% rename from Marlin/src/lcd/e3v2/creality/README.md rename to Marlin/src/lcd/e3v2/README.md diff --git a/Marlin/src/lcd/e3v2/creality/rotary_encoder.h b/Marlin/src/lcd/e3v2/creality/rotary_encoder.h index f73577b3b031..48e13b7eceb7 100644 --- a/Marlin/src/lcd/e3v2/creality/rotary_encoder.h +++ b/Marlin/src/lcd/e3v2/creality/rotary_encoder.h @@ -22,12 +22,12 @@ #pragma once /***************************************************************************** - * @file lcd/e3v2/creality/rotary_encoder.h - * @author LEO / Creality3D - * @date 2019/07/06 - * @version 2.0.1 - * @brief Rotary encoder functions - ****************************************************************************/ + * @file lcd/e3v2/creality/rotary_encoder.h + * @author LEO / Creality3D + * @date 2019/07/06 + * @version 2.0.1 + * @brief Rotary encoder functions + ****************************************************************************/ #include "../../../inc/MarlinConfig.h" diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp new file mode 100644 index 000000000000..e446733d9b24 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp @@ -0,0 +1,3529 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "dwin.h" + +#include "../../fontutils.h" +#include "../../marlinui.h" + +#include "../../../sd/cardreader.h" + +#include "../../../MarlinCore.h" +#include "../../../core/serial.h" +#include "../../../core/macros.h" +#include "../../../gcode/queue.h" + +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" +#include "../../../module/motion.h" +#include "../../../module/planner.h" + +#if HAS_FILAMENT_SENSOR + #include "../../../feature/runout.h" +#endif + +#if ENABLED(EEPROM_SETTINGS) + #include "../../../module/settings.h" +#endif + +#if ENABLED(HOST_ACTION_COMMANDS) + #include "../../../feature/host_actions.h" +#endif + +#if HAS_ONESTEP_LEVELING + #include "../../../feature/bedlevel/bedlevel.h" +#endif + +#if HAS_BED_PROBE + #include "../../../module/probe.h" +#endif + +#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + #include "../../../feature/babystep.h" +#endif + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +#include +#include +#include + +#ifndef MACHINE_SIZE + #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) +#endif + +#include "lockscreen.h" + +#ifndef CORP_WEBSITE + #define CORP_WEBSITE WEBSITE_URL +#endif + +#define PAUSE_HEAT + +#define USE_STRING_HEADINGS +#define USE_STRING_TITLES + +#define MENU_CHAR_LIMIT 24 + +// Print speed limit +#define MIN_PRINT_SPEED 10 +#define MAX_PRINT_SPEED 999 + +// Print flow limit +#define MIN_PRINT_FLOW 10 +#define MAX_PRINT_FLOW 299 + +// Load and Unload limits +#define MAX_LOAD_UNLOAD 500 + +// Feedspeed limit (max feedspeed = DEFAULT_MAX_FEEDRATE * 2) +#define MIN_MAXFEEDSPEED 1 +#define MIN_MAXACCELERATION 1 +#define MIN_MAXJERK 0.1 +#define MIN_STEP 1 +#define MAX_STEP 999.9 + +// Extruder's temperature limits +#define MIN_ETEMP HEATER_0_MINTEMP +#define MAX_ETEMP (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT) + +#define FEEDRATE_E (60) + +// Minimum unit (0.1) : multiple (10) +#define UNITFDIGITS 1 +#define MINUNITMULT POW(10, UNITFDIGITS) + +#define ENCODER_WAIT_MS 20 +#define DWIN_VAR_UPDATE_INTERVAL 1024 +#define DWIN_SCROLL_UPDATE_INTERVAL SEC_TO_MS(2) +#define DWIN_REMAIN_TIME_UPDATE_INTERVAL SEC_TO_MS(20) + +#define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, dwin_zoffset) + +// Structs +HMI_value_t HMI_value; +HMI_flag_t HMI_flag{0}; +HMI_data_t HMI_data; + +millis_t dwin_heat_time = 0; + +uint8_t checkkey = MainMenu; +uint8_t last_checkkey = MainMenu; + +typedef struct { + uint8_t now, last; + void set(uint8_t v) { now = last = v; } + void reset() { set(0); } + bool changed() { bool c = (now != last); if (c) last = now; return c; } + bool dec() { if (now) now--; return changed(); } + bool inc(uint8_t v) { if (now < (v - 1)) now++; else now = (v - 1); return changed(); } +} select_t; + +select_t select_page{0}, select_file{0}, select_print{0}; +uint8_t index_file = MROWS; + +bool dwin_abort_flag = false; // Flag to reset feedrate, return to Home + +constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; +constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; + +#if HAS_CLASSIC_JERK + constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; +#endif + +static uint8_t _percent_done = 0; +static uint32_t _remain_time = 0; + +// Additional Aux Host Support +static bool sdprint = false; + +#if ENABLED(PAUSE_HEAT) + #if HAS_HOTEND + uint16_t resume_hotend_temp = 0; + #endif + #if HAS_HEATED_BED + uint16_t resume_bed_temp = 0; + #endif + #if HAS_FAN + uint16_t resume_fan = 0; + #endif +#endif + +#if HAS_ZOFFSET_ITEM + float dwin_zoffset = 0, last_zoffset = 0; +#endif + +#if HAS_HOTEND + float last_E = 0; +#endif + +// New menu system pointers +MenuClass *PrepareMenu = nullptr; +MenuClass *LevBedMenu = nullptr; +MenuClass *MoveMenu = nullptr; +MenuClass *ControlMenu = nullptr; +MenuClass *AdvancedSettings = nullptr; +TERN_(HAS_HOME_OFFSET, MenuClass *HomeOffMenu = nullptr); +TERN_(HAS_BED_PROBE, MenuClass *ProbeSetMenu = nullptr); +MenuClass *FilSetMenu = nullptr; +MenuClass *SelectColorMenu = nullptr; +MenuClass *GetColorMenu = nullptr; +MenuClass *TuneMenu = nullptr; +MenuClass *MotionMenu = nullptr; +MenuClass *FilamentMenu = nullptr; +TERN_(MESH_BED_LEVELING, MenuClass *ManualMesh = nullptr); +TERN_(HAS_HOTEND, MenuClass *PreheatMenu = nullptr); +MenuClass *TemperatureMenu = nullptr; +MenuClass *MaxSpeedMenu = nullptr; +MenuClass *MaxAccelMenu = nullptr; +MenuClass *MaxJerkMenu = nullptr; +MenuClass *StepsMenu = nullptr; +MenuClass *HotendPIDMenu = nullptr; +MenuClass *BedPIDMenu = nullptr; +#if EITHER(HAS_BED_PROBE, BABYSTEPPING) + MenuClass *ZOffsetWizMenu = nullptr; +#endif + +// Updatable menuitems pointers +MenuItemClass *HotendTargetItem = nullptr; +MenuItemClass *BedTargetItem = nullptr; +MenuItemClass *FanSpeedItem = nullptr; +MenuItemClass *MMeshMoveZItem = nullptr; + +#define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01 // Between 0x01 and 0x63 (EEPROM_OFFSET-1) + // BL24CXX::check() uses 0x00 + +inline bool HMI_IsChinese() { return HMI_flag.language == DWIN_CHINESE; } + +void HMI_SetLanguageCache() { + DWIN_JPG_CacheTo1(HMI_IsChinese() ? Language_Chinese : Language_English); +} + +void HMI_SetLanguage() { + #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); + #endif + HMI_SetLanguageCache(); +} + +void HMI_ToggleLanguage() { + HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; + HMI_SetLanguageCache(); + #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); + #endif +} + +typedef struct { uint16_t x, y[2], w, h; } text_info_t; + +void ICON_Button(const bool here, const int iconid, const frame_rect_t &ico, const text_info_t (&txt)[2]) { + const bool cn = HMI_IsChinese(); + DWIN_ICON_Show(1, 0, 0, ICON, iconid + here, ico.x, ico.y); + if (here) DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ico.x, ico.y, ico.x + ico.w - 1, ico.y + ico.h - 1); + DWIN_Frame_AreaCopy(1, txt[cn].x, txt[cn].y[here], txt[cn].x + txt[cn].w - 1, txt[cn].y[here] + txt[cn].h - 1, ico.x + (ico.w - txt[cn].w) / 2, (ico.y + ico.h - 28) - txt[cn].h/2); +} + +// +// Main Menu: "Print" +// +void ICON_Print() { + constexpr frame_rect_t ico = { 17, 110, 110, 100 }; + constexpr text_info_t txt[2] = { + { 1, { 417, 449 }, 30, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 0, ICON_Print_0, ico, txt); +} + +// +// Main Menu: "Prepare" +// +void ICON_Prepare() { + constexpr frame_rect_t ico = { 145, 110, 110, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 417, 449 }, 51, 14 }, + { 31, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 1, ICON_Prepare_0, ico, txt); +} + +// +// Main Menu: "Control" +// +void ICON_Control() { + constexpr frame_rect_t ico = { 17, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 85, { 417, 449 }, 46, 14 }, + { 61, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 2, ICON_Control_0, ico, txt); +} + +// +// Main Menu: "Info" +// +void ICON_StartInfo() { + constexpr frame_rect_t ico = { 145, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 133, { 417, 449 }, 23, 14 }, + { 91, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 3, ICON_Info_0, ico, txt); +} + +// +// Main Menu: "Level" +// +void ICON_Leveling() { + constexpr frame_rect_t ico = { 145, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 88, { 433, 464 }, 36, 14 }, + { 211, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == 3, ICON_Leveling_0, ico, txt); +} + +// +// Printing: "Tune" +// +void ICON_Tune() { + constexpr frame_rect_t ico = { 8, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 0, { 433, 464 }, 32, 14 }, + { 121, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == 0, ICON_Setup_0, ico, txt); +} + +// +// Printing: "Pause" +// +void ICON_Pause() { + constexpr frame_rect_t ico = { 96, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 157, { 417, 449 }, 39, 14 }, + { 181, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == 1, ICON_Pause_0, ico, txt); +} + +// +// Printing: "Resume" +// +void ICON_Resume() { + constexpr frame_rect_t ico = { 96, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 433, 464 }, 53, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == 1, ICON_Continue_0, ico, txt); +} + +// +// Printing: "Stop" +// +void ICON_Stop() { + constexpr frame_rect_t ico = { 184, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 196, { 417, 449 }, 29, 14 }, + { 151, { 405, 447 }, 27, 12 } + }; + ICON_Button(select_print.now == 2, ICON_Stop_0, ico, txt); +} + +void Draw_Menu_Cursor(const uint8_t line) { + DWIN_Draw_Rectangle(1, HMI_data.Cursor_color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); +} + +void Erase_Menu_Cursor(const uint8_t line) { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); +} + +void Move_Highlight(const int16_t from, const uint16_t newline) { + Erase_Menu_Cursor(newline - from); + Draw_Menu_Cursor(newline); +} + +void Add_Menu_Line() { + Move_Highlight(1, MROWS); + DWIN_Draw_Line(HMI_data.SplitLine_Color, 16, MBASE(MROWS + 1) - 20, 256, MBASE(MROWS + 1) - 19); +} + +void Scroll_Menu(const uint8_t dir) { + DWIN_Frame_AreaMove(1, dir, MLINE, HMI_data.Background_Color, 0, 31, DWIN_WIDTH, 349); + switch (dir) { + case DWIN_SCROLL_DOWN: Move_Highlight(-1, 0); break; + case DWIN_SCROLL_UP: Add_Menu_Line(); break; + } +} + +inline uint16_t nr_sd_menu_items() { + return card.get_num_Files() + !card.flag.workDirIsRoot; +} + +void Erase_Menu_Text(const uint8_t line) { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, LBLX, MBASE(line) - 14, 271, MBASE(line) + 28); +} + +void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) { + if (label) DWINUI::Draw_String(LBLX, MBASE(line) - 1, (char*)label); + if (icon) DWINUI::Draw_Icon(icon, 26, MBASE(line) - 3); + if (more) DWINUI::Draw_Icon(ICON_More, 226, MBASE(line) - 3); + DWIN_Draw_Line(HMI_data.SplitLine_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 33); +} + +void Draw_Chkb_Line(const uint8_t line, const bool checked) { + DWINUI::Draw_Checkbox(HMI_data.Text_Color, HMI_data.Background_Color, VALX + 16, MBASE(line) - 1, checked); +} + +void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const uint16_t value=0) { + DWINUI::Draw_Int(HMI_data.Text_Color, bcolor, iNum , VALX, MBASE(line) - 1, value); +} + +// The "Back" label is always on the first line +void Draw_Back_Label() { + if (HMI_IsChinese()) + DWIN_Frame_AreaCopy(1, 129, 72, 156, 84, LBLX, MBASE(0)); + else + DWIN_Frame_AreaCopy(1, 223, 179, 254, 189, LBLX, MBASE(0)); +} + +// Draw "Back" line at the top +void Draw_Back_First(const bool is_sel=true) { + Draw_Menu_Line(0, ICON_Back); + Draw_Back_Label(); + if (is_sel) Draw_Menu_Cursor(0); +} + +inline ENCODER_DiffState get_encoder_state() { + static millis_t Encoder_ms = 0; + const millis_t ms = millis(); + if (PENDING(ms, Encoder_ms)) return ENCODER_DIFF_NO; + const ENCODER_DiffState state = Encoder_ReceiveAnalyze(); + if (state != ENCODER_DIFF_NO) Encoder_ms = ms + ENCODER_WAIT_MS; + return state; +} + +template +inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, T &valref) { + if (encoder_diffState == ENCODER_DIFF_CW) + valref += EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_CCW) + valref -= EncoderRate.encoderMoveValue; + return encoder_diffState == ENCODER_DIFF_ENTER; +} + +// +// Draw Popup Windows +// + +inline void Draw_Popup_Bkgd_60() { + DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, 14, 60, 258, 330); + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, 14, 60, 258, 330); +} + +inline void Draw_Popup_Bkgd_105() { + DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, 14, 105, 258, 374); + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, 14, 105, 258, 374); +} + +void Clear_Popup_Area() { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); +} + +void DWIN_Draw_Popup(uint8_t icon=0, const char * const msg1=nullptr, const char * const msg2=nullptr, uint8_t button=0) { + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd_60(); + if (icon) DWINUI::Draw_Icon(icon, 101, 105); + if (msg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, msg1); + if (msg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, msg2); + if (button) DWINUI::Draw_Icon(button, 86, 280); +} + +void DWIN_Popup_Confirm(uint8_t icon, const char * const msg1, const char * const msg2) { + HMI_SaveProcessID(WaitResponse); + DWIN_Draw_Popup(icon, msg1, msg2, ICON_Confirm_E); // Button Confirm + DWIN_UpdateLCD(); +} + +void DWIN_Popup_Continue(uint8_t icon, const char * const msg1, const char * const msg2) { + HMI_SaveProcessID(WaitResponse); + DWIN_Draw_Popup(icon, msg1, msg2, ICON_Continue_E); // Button Continue + DWIN_UpdateLCD(); +} + +#if HAS_HOTEND + + void Popup_Window_ETempTooLow() { + if (HMI_IsChinese()) { + HMI_SaveProcessID(WaitResponse); + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd_60(); + DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105); + DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); + DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240); + DWINUI::Draw_Icon(ICON_Confirm_C, 86, 280); + DWIN_UpdateLCD(); + } + else + DWIN_Popup_Confirm(ICON_TempTooLow, "Nozzle is too cold", "Preheat the hotend"); + } + +#endif + +void Popup_Window_Resume() { + Clear_Popup_Area(); + Draw_Popup_Bkgd_105(); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 135); + DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 192); + DWINUI::Draw_Icon(ICON_Cancel_C, 26, 307); + DWINUI::Draw_Icon(ICON_Continue_C, 146, 307); + } + else { + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 115, F("Continue Print")); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 192, F("It looks like the last")); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 212, F("file was interrupted.")); + DWINUI::Draw_Icon(ICON_Cancel_E, 26, 307); + DWINUI::Draw_Icon(ICON_Continue_E, 146, 307); + } +} + +void Draw_Select_Highlight(const bool sel) { + HMI_flag.select_flag = sel; + const uint16_t c1 = sel ? HMI_data.Highlight_Color : HMI_data.PopupBg_color, + c2 = sel ? HMI_data.PopupBg_color : HMI_data.Highlight_Color; + DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); + DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); + DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); + DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); +} + +void Popup_window_PauseOrStop() { + if (HMI_IsChinese()) { + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd_60(); + if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); + else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); + DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); + DWINUI::Draw_Icon(ICON_Confirm_C, 26, 280); + DWINUI::Draw_Icon(ICON_Cancel_C, 146, 280); + } + else { + DWIN_Draw_Popup(ICON_BLTouch, "Please confirm",(select_print.now == 1) ? GET_TEXT(MSG_PAUSE_PRINT) : GET_TEXT(MSG_STOP_PRINT)); + DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280); + DWINUI::Draw_Icon(ICON_Cancel_E, 146, 280); + } + Draw_Select_Highlight(true); +} + +#if HAS_HOTEND || HAS_HEATED_BED + void DWIN_Popup_Temperature(const bool toohigh) { + Clear_Popup_Area(); + Draw_Popup_Bkgd_105(); + if (toohigh) { + DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285); + DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285); + DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); + } + else { + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 36, 300, F("Nozzle or Bed temperature")); + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 92, 300, F("is too high")); + } + } + else { + DWINUI::Draw_Icon(ICON_TempTooLow, 102, 165); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 103, 371, 270, 386, 52, 285); + DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); + } + else { + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 36, 300, F("Nozzle or Bed temperature")); + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 92, 300, F("is too low")); + } + } + } + +#endif + +void Draw_Print_Labels() { + if (HMI_IsChinese()) { + Title.FrameCopy(30, 1, 42, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 41, 173); // Printing Time + DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 176, 173); // Remain + } + else { + #ifdef USE_STRING_TITLES + Title.ShowCaption(GET_TEXT(MSG_PRINTING)); + DWINUI::Draw_String( 46, 173, F("Print Time")); + DWINUI::Draw_String(181, 173, F("Remain")); + #else + const uint16_t y = 168; + Title.FrameCopy(42, 0, 47, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 0, 44, 96, 58, 41, y); // Printing Time + DWIN_Frame_AreaCopy(1, 98, 44, 152, 58, 176, y); // Remain + #endif + } +} + +void Draw_Print_ProgressBar() { + DWINUI::Draw_Icon(ICON_Bar, 15, 93); + DWIN_Draw_Rectangle(1, HMI_data.Barfill_Color, 16 + _percent_done * 240 / 100, 93, 256, 113); + DWINUI::Draw_Int(HMI_data.PercentTxt_Color, HMI_data.Background_Color, 3, 117, 133, _percent_done); + DWINUI::Draw_String(HMI_data.PercentTxt_Color, 142, 133, F("%")); +} + +void Draw_Print_ProgressElapsed() { + char buf[10]; + duration_t elapsed = print_job_timer.duration(); // print timer + sprintf_P(buf, PSTR("%02i:%02i"), (uint16_t)(elapsed.value / 3600), ((uint16_t)elapsed.value % 3600) / 60); + DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 47, 192, buf); +} + +void Draw_Print_ProgressRemain() { + char buf[10]; + sprintf_P(buf, PSTR("%02i:%02i"), (uint16_t)(_remain_time / 3600), ((uint16_t)_remain_time % 3600) / 60); + DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 181, 192, buf); +} + +void ICON_ResumeOrPause() { + if (printingIsPaused() || HMI_flag.pause_flag || HMI_flag.pause_action) + ICON_Resume(); + else + ICON_Pause(); +} + +void Draw_PrintProcess() { + DWINUI::ClearMenuArea(); + Draw_Print_Labels(); + + ICON_Tune(); + ICON_ResumeOrPause(); + ICON_Stop(); + + DWIN_Print_Header(sdprint ? card.longest_filename() : nullptr); + + DWINUI::Draw_Icon(ICON_PrintTime, 15, 173); + DWINUI::Draw_Icon(ICON_RemainTime, 150, 171); + + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + Draw_Print_ProgressRemain(); + + DWIN_UpdateLCD(); +} + +void Goto_PrintProcess() { + checkkey = PrintProcess; + Draw_PrintProcess(); +} + +void Draw_PrintDone() { + // show percent bar and value + _percent_done = 100; + _remain_time = 0; + + DWINUI::ClearMenuArea(); + DWIN_Print_Header(nullptr); + Draw_Print_Labels(); + DWINUI::Draw_Icon(ICON_PrintTime, 15, 173); + DWINUI::Draw_Icon(ICON_RemainTime, 150, 171); + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + Draw_Print_ProgressRemain(); + + // show print done confirm + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 240, DWIN_WIDTH - 1, STATUS_Y - 1); + DWINUI::Draw_Icon(HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 283); +} + +void Draw_Main_Menu() { + DWINUI::ClearMenuArea(); + + if (HMI_IsChinese()) + Title.FrameCopy(2, 2, 26, 13); // "Home" etc + else { + #ifdef USE_STRING_HEADINGS + Title.ShowCaption(MACHINE_NAME); + #else + Title.FrameCopy(0, 2, 40, 11); // "Home" + #endif + } + + DWINUI::Draw_Icon(ICON_LOGO, 71, 52); // CREALITY logo + + ICON_Print(); + ICON_Prepare(); + ICON_Control(); + TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); + DWIN_UpdateLCD(); +} + +void Goto_Main_Menu() { + checkkey = MainMenu; + DWIN_StatusChanged(nullptr); + Draw_Main_Menu(); +} + +// Draw X, Y, Z and blink if in an un-homed or un-trusted state +void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y, const bool blink, const bool force) { + const bool draw_qmark = axis_should_home(axis), + draw_empty = NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !draw_qmark && !axis_is_trusted(axis); + + // Check for a position change + static xyz_pos_t oldpos = { -1, -1, -1 }; + const float p = current_position[axis]; + const bool changed = oldpos[axis] != p; + if (changed) oldpos[axis] = p; + + if (force || changed || draw_qmark || draw_empty) { + if (blink && draw_qmark) + DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F("--?--")); + else if (blink && draw_empty) + DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F(" ")); + else + DWINUI::Draw_Signed_Float(HMI_data.Coordinate_Color, HMI_data.Background_Color, 3, 1, x, y, p * 10); + } +} + +void _draw_xyz_position(const bool force) { + //SERIAL_ECHOPGM("Draw XYZ:"); + static bool _blink = false; + const bool blink = !!(millis() & 0x400UL); + if (force || blink != _blink) { + _blink = blink; + //SERIAL_ECHOPGM(" (blink)"); + _update_axis_value(X_AXIS, 35, 459, blink, true); + _update_axis_value(Y_AXIS, 120, 459, blink, true); + _update_axis_value(Z_AXIS, 205, 459, blink, true); + } + //SERIAL_EOL(); +} + +void update_variable() { + #if HAS_HOTEND + static celsius_t _hotendtemp = 0, _hotendtarget = 0; + const celsius_t hc = thermalManager.wholeDegHotend(0), + ht = thermalManager.degTargetHotend(0); + const bool _new_hotend_temp = _hotendtemp != hc, + _new_hotend_target = _hotendtarget != ht; + if (_new_hotend_temp) _hotendtemp = hc; + if (_new_hotend_target) _hotendtarget = ht; + #endif + #if HAS_HEATED_BED + static celsius_t _bedtemp = 0, _bedtarget = 0; + const celsius_t bc = thermalManager.wholeDegBed(), + bt = thermalManager.degTargetBed(); + const bool _new_bed_temp = _bedtemp != bc, + _new_bed_target = _bedtarget != bt; + if (_new_bed_temp) _bedtemp = bc; + if (_new_bed_target) _bedtarget = bt; + #endif + #if HAS_FAN + static uint8_t _fanspeed = 0; + const bool _new_fanspeed = _fanspeed != thermalManager.fan_speed[0]; + if (_new_fanspeed) _fanspeed = thermalManager.fan_speed[0]; + #endif + + if (checkkey == Menu && (CurrentMenu == TuneMenu || CurrentMenu == TemperatureMenu)) { + // Tune page temperature update + #if HAS_HOTEND + if (_new_hotend_target) + HotendTargetItem->Draw(CurrentMenu->line(HotendTargetItem->pos)); + #endif + #if HAS_HEATED_BED + if (_new_bed_target) + BedTargetItem->Draw(CurrentMenu->line(BedTargetItem->pos)); + #endif + #if HAS_FAN + if (_new_fanspeed) + FanSpeedItem->Draw(CurrentMenu->line(FanSpeedItem->pos)); + #endif + } + + // Bottom temperature update + + #if HAS_HOTEND + if (_new_hotend_temp) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 384, _hotendtemp); + if (_new_hotend_target) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 384, _hotendtarget); + + static int16_t _flow = planner.flow_percentage[0]; + if (_flow != planner.flow_percentage[0]) { + _flow = planner.flow_percentage[0]; + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 417, _flow); + } + #endif + + #if HAS_HEATED_BED + if (_new_bed_temp) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 417, _bedtemp); + if (_new_bed_target) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 417, _bedtarget); + #endif + + static int16_t _feedrate = 100; + if (_feedrate != feedrate_percentage) { + _feedrate = feedrate_percentage; + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 384, _feedrate); + } + + #if HAS_FAN + if (_new_fanspeed) { + _fanspeed = thermalManager.fan_speed[0]; + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 195 + 2 * STAT_CHR_W, 384, _fanspeed); + } + #endif + + static float _offset = 0; + if (BABY_Z_VAR != _offset) { + _offset = BABY_Z_VAR; + DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, _offset * 100); + } + + _draw_xyz_position(false); +} + +/** + * Read and cache the working directory. + * + * TODO: New code can follow the pattern of menu_media.cpp + * and rely on Marlin caching for performance. No need to + * cache files here. + */ + +#ifndef strcasecmp_P + #define strcasecmp_P(a, b) strcasecmp((a), (b)) +#endif + +void make_name_without_ext(char *dst, char *src, size_t maxlen=MENU_CHAR_LIMIT) { + char * const name = card.longest_filename(); + size_t pos = strlen(name); // index of ending nul + + // For files, remove the extension + // which may be .gcode, .gco, or .g + if (!card.flag.filenameIsDir) + while (pos && src[pos] != '.') pos--; // find last '.' (stop at 0) + + size_t len = pos; // nul or '.' + if (len > maxlen) { // Keep the name short + pos = len = maxlen; // move nul down + dst[--pos] = '.'; // insert dots + dst[--pos] = '.'; + dst[--pos] = '.'; + } + + dst[len] = '\0'; // end it + + // Copy down to 0 + while (pos--) dst[pos] = src[pos]; +} + +void HMI_SDCardInit() { card.cdroot(); } + +void MarlinUI::refresh() { /* Nothing to see here */ } + +#define ICON_Folder ICON_More + +#if ENABLED(SCROLL_LONG_FILENAMES) + + char shift_name[LONG_FILENAME_LENGTH + 1]; + int8_t shift_amt; // = 0 + millis_t shift_ms; // = 0 + + // Init the shift name based on the highlighted item + void Init_Shift_Name() { + const bool is_subdir = !card.flag.workDirIsRoot; + const int8_t filenum = select_file.now - 1 - is_subdir; // Skip "Back" and ".." + const uint16_t fileCnt = card.get_num_Files(); + if (WITHIN(filenum, 0, fileCnt - 1)) { + card.getfilename_sorted(SD_ORDER(filenum, fileCnt)); + char * const name = card.longest_filename(); + make_name_without_ext(shift_name, name, 100); + } + } + + void Init_SDItem_Shift() { + shift_amt = 0; + shift_ms = select_file.now > 0 && strlen(shift_name) > MENU_CHAR_LIMIT ? millis() + 750UL : 0; + } + +#endif + +/** + * Display an SD item, adding a CDUP for subfolders. + */ +void Draw_SDItem(const uint16_t item, int16_t row=-1) { + if (row < 0) row = item + 1 + MROWS - index_file; + const bool is_subdir = !card.flag.workDirIsRoot; + if (is_subdir && item == 0) + return Draw_Menu_Line(row, ICON_Folder, ".."); + + card.getfilename_sorted(SD_ORDER(item - is_subdir, card.get_num_Files())); + char * const name = card.longest_filename(); + + #if ENABLED(SCROLL_LONG_FILENAMES) + // Init the current selected name + // This is used during scroll drawing + if (item == select_file.now - 1) { + make_name_without_ext(shift_name, name, 100); + Init_SDItem_Shift(); + } + #endif + + // Draw the file/folder with name aligned left + char str[strlen(name) + 1]; + make_name_without_ext(str, name); + Draw_Menu_Line(row, card.flag.filenameIsDir ? ICON_Folder : ICON_File, str); +} + +#if ENABLED(SCROLL_LONG_FILENAMES) + + void Draw_SDItem_Shifted(uint8_t &shift) { + // Limit to the number of chars past the cutoff + const size_t len = strlen(shift_name); + NOMORE(shift, _MAX(len - MENU_CHAR_LIMIT, 0U)); + + // Shorten to the available space + const size_t lastchar = _MIN((signed)len, shift + MENU_CHAR_LIMIT); + + const char c = shift_name[lastchar]; + shift_name[lastchar] = '\0'; + + const uint8_t row = select_file.now + MROWS - index_file; // skip "Back" and scroll + Erase_Menu_Text(row); + Draw_Menu_Line(row, 0, &shift_name[shift]); + + shift_name[lastchar] = c; + } + +#endif + +// Redraw the first set of SD Files +void Redraw_SD_List() { + select_file.reset(); + index_file = MROWS; + + DWINUI::ClearMenuArea(); // Leave title bar unchanged + + Draw_Back_First(); + + if (card.isMounted()) { + // As many files as will fit + LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS)) + Draw_SDItem(i, i + 1); + + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); + } + else { + DWIN_Draw_Rectangle(1, HMI_data.AlertBg_Color, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4)); + DWINUI::Draw_CenteredString(font16x32, HMI_data.AlertTxt_Color, MBASE(3), F("No Media")); + } +} + +bool DWIN_lcd_sd_status = false; + +void SDCard_Up() { + card.cdup(); + Redraw_SD_List(); + DWIN_lcd_sd_status = false; // On next DWIN_Update +} + +void SDCard_Folder(char * const dirname) { + card.cd(dirname); + Redraw_SD_List(); + DWIN_lcd_sd_status = false; // On next DWIN_Update +} + +// +// Watch for media mount / unmount +// +void HMI_SDCardUpdate() { + if (HMI_flag.home_flag) return; + if (DWIN_lcd_sd_status != card.isMounted()) { + DWIN_lcd_sd_status = card.isMounted(); + //SERIAL_ECHOLNPAIR("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); + if (DWIN_lcd_sd_status) { + if (checkkey == SelectFile) + Redraw_SD_List(); + } + else { + // clean file icon + if (checkkey == SelectFile) { + Redraw_SD_List(); + } + else if (sdprint && card.isPrinting() && printingIsActive()) { + // TODO: Move card removed abort handling + // to CardReader::manage_media. + card.abortFilePrintSoon(); + wait_for_heatup = wait_for_user = false; + dwin_abort_flag = true; // Reset feedrate, return to Home + } + } + DWIN_UpdateLCD(); + } +} + +// +// The status area is always on-screen, except during +// full-screen modal dialogs. (TODO: Keep alive during dialogs) +// +void Draw_Status_Area(const bool with_update) { + + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, STATUS_Y + 21, DWIN_WIDTH, DWIN_HEIGHT - 1); + + #if HAS_HOTEND + DWINUI::Draw_Icon(ICON_HotendTemp, 10, 383); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 384, thermalManager.wholeDegHotend(0)); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0)); + + DWINUI::Draw_Icon(ICON_StepE, 112, 417); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); + #endif + + #if HAS_HEATED_BED + DWINUI::Draw_Icon(ICON_BedTemp, 10, 416); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 417, thermalManager.wholeDegBed()); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); + DWINUI::Draw_Int(true, true, 0, DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed()); + #endif + + DWINUI::Draw_Icon(ICON_Speed, 113, 383); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 384, feedrate_percentage); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); + + #if HAS_FAN + DWINUI::Draw_Icon(ICON_FanSpeed, 187, 383); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 195 + 2 * STAT_CHR_W, 384, thermalManager.fan_speed[0]); + #endif + + #if HAS_ZOFFSET_ITEM + DWINUI::Draw_Icon(ICON_Zoffset, 187, 416); + #endif + + if (BABY_Z_VAR < 0) { + DWINUI::Draw_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 207, 417, -BABY_Z_VAR * 100); + DWINUI::Draw_String(HMI_data.Indicator_Color, 205, 419, F("-")); + } + else { + DWINUI::Draw_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 207, 417, BABY_Z_VAR * 100); + DWINUI::Draw_String(HMI_data.Indicator_Color, 205, 419, F(" ")); + } + + DWIN_Draw_Rectangle(1, HMI_data.SplitLine_Color, 0, 449, DWIN_WIDTH, 451); + + DWINUI::Draw_Icon(ICON_MaxSpeedX, 10, 456); + DWINUI::Draw_Icon(ICON_MaxSpeedY, 95, 456); + DWINUI::Draw_Icon(ICON_MaxSpeedZ, 180, 456); + _draw_xyz_position(true); + + if (with_update) { + DWIN_UpdateLCD(); + delay(5); + } +} + +void HMI_StartFrame(const bool with_update) { + Goto_Main_Menu(); + Draw_Status_Area(with_update); +} + +void Draw_Info_Menu() { + DWINUI::ClearMenuArea(); + Draw_Back_First(); + + DWINUI::Draw_CenteredString(122, F(MACHINE_SIZE)); + DWINUI::Draw_CenteredString(195, F(SHORT_BUILD_VERSION)); + + if (HMI_IsChinese()) { + Title.FrameCopy(30, 17, 28, 13); // "Info" + + DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); // "Size" + DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); // "Contact Details" + } + else { + #ifdef USE_STRING_HEADINGS + Title.ShowCaption(GET_TEXT_F(MSG_INFO_SCREEN)); + #else + Title.FrameCopy(192, 15, 23, 12); // "Info" + #endif + + DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102); // "Size" + DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 1, 164, 96, 175, 89, 248); // "Contact details" + } + DWINUI::Draw_CenteredString(268, F(CORP_WEBSITE)); + + LOOP_L_N(i, 3) { + DWINUI::Draw_Icon(ICON_PrintSize + i, 26, 99 + i * 73); + DWIN_Draw_Line(HMI_data.SplitLine_Color, 16, MBASE(2) + i * 73, 256, 156 + i * 73); + } + + DWIN_UpdateLCD(); +} + +void Draw_Print_File_Menu() { + if (HMI_IsChinese()) + Title.FrameCopy(0, 31, 56, 14); // "Print file" + else { + #ifdef USE_STRING_HEADINGS + Title.ShowCaption(GET_TEXT_F(MSG_MEDIA_MENU)); + #else + Title.FrameCopy(52, 31, 86, 11); // "Print file" + #endif + } + Redraw_SD_List(); +} + +// Main Process +void HMI_MainMenu() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_page.inc(4)) { + switch (select_page.now) { + case 0: ICON_Print(); break; + case 1: ICON_Print(); ICON_Prepare(); break; + case 2: ICON_Prepare(); ICON_Control(); break; + case 3: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_page.dec()) { + switch (select_page.now) { + case 0: ICON_Print(); ICON_Prepare(); break; + case 1: ICON_Prepare(); ICON_Control(); break; + case 2: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + case 3: TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_page.now) { + case 0: // Print File + checkkey = SelectFile; + Draw_Print_File_Menu(); + break; + + case 1: // Prepare + Draw_Prepare_Menu(); + break; + + case 2: // Control + Draw_Control_Menu(); + break; + + case 3: // Leveling or Info + #if HAS_ONESTEP_LEVELING + queue.inject_P(PSTR("G28XYO\nG28Z\nG29")); + #else + checkkey = Info; + Draw_Info_Menu(); + #endif + break; + } + } + DWIN_UpdateLCD(); +} + +// Select (and Print) File +void HMI_SelectFile() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + + const uint16_t hasUpDir = !card.flag.workDirIsRoot; + + if (encoder_diffState == ENCODER_DIFF_NO) { + #if ENABLED(SCROLL_LONG_FILENAMES) + if (shift_ms && select_file.now >= 1 + hasUpDir) { + // Scroll selected filename every second + const millis_t ms = millis(); + if (ELAPSED(ms, shift_ms)) { + const bool was_reset = shift_amt < 0; + shift_ms = ms + 375UL + was_reset * 250UL; // ms per character + uint8_t shift_new = shift_amt + 1; // Try to shift by... + Draw_SDItem_Shifted(shift_new); // Draw the item + if (!was_reset && shift_new == 0) // Was it limited to 0? + shift_ms = 0; // No scrolling needed + else if (shift_new == shift_amt) // Scroll reached the end + shift_new = -1; // Reset + shift_amt = shift_new; // Set new scroll + } + } + #endif + return; + } + + // First pause is long. Easy. + // On reset, long pause must be after 0. + + const uint16_t fullCnt = nr_sd_menu_items(); + + if (encoder_diffState == ENCODER_DIFF_CW && fullCnt) { + if (select_file.inc(1 + fullCnt)) { + const uint8_t itemnum = select_file.now - 1; // -1 for "Back" + if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted + Erase_Menu_Text(itemnum + MROWS - index_file); // Erase and + Draw_SDItem(itemnum - 1); // redraw + } + if (select_file.now > MROWS && select_file.now > index_file) { // Cursor past the bottom + index_file = select_file.now; // New bottom line + Scroll_Menu(DWIN_SCROLL_UP); + Draw_SDItem(itemnum, MROWS); // Draw and init the shift name + } + else { + Move_Highlight(1, select_file.now + MROWS - index_file); // Just move highlight + TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name + } + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW && fullCnt) { + if (select_file.dec()) { + const uint8_t itemnum = select_file.now - 1; // -1 for "Back" + if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted + Erase_Menu_Text(select_file.now + 1 + MROWS - index_file); // Erase and + Draw_SDItem(itemnum + 1); // redraw + } + if (select_file.now < index_file - MROWS) { // Cursor past the top + index_file--; // New bottom line + Scroll_Menu(DWIN_SCROLL_DOWN); + if (index_file == MROWS) { + Draw_Back_First(); + TERN_(SCROLL_LONG_FILENAMES, shift_ms = 0); + } + else { + Draw_SDItem(itemnum, 0); // Draw the item (and init shift name) + } + } + else { + Move_Highlight(-1, select_file.now + MROWS - index_file); // Just move highlight + TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name + } + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); // Reset left. Init timer. + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (select_file.now == 0) { // Back + select_page.set(0); + Goto_Main_Menu(); + } + else if (hasUpDir && select_file.now == 1) { // CD-Up + SDCard_Up(); + goto HMI_SelectFileExit; + } + else { + const uint16_t filenum = select_file.now - 1 - hasUpDir; + card.getfilename_sorted(SD_ORDER(filenum, card.get_num_Files())); + + // Enter that folder! + if (card.flag.filenameIsDir) { + SDCard_Folder(card.filename); + goto HMI_SelectFileExit; + } + + // Reset highlight for next entry + select_print.reset(); + select_file.reset(); + + // Start choice and print SD file + HMI_flag.heat_flag = true; + HMI_flag.print_finish = false; + + card.openAndPrintFile(card.filename); + + #if HAS_FAN + // All fans on for Ender 3 v2 ? + // The slicer should manage this for us. + //for (uint8_t i = 0; i < FAN_COUNT; i++) + // thermalManager.fan_speed[i] = 255; + #endif + + DWIN_Print_Started(true); + } + } +HMI_SelectFileExit: + DWIN_UpdateLCD(); +} + +// Printing +void HMI_Printing() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_print.inc(3)) { + switch (select_print.now) { + case 0: ICON_Tune(); break; + case 1: + ICON_Tune(); + ICON_ResumeOrPause(); + break; + case 2: + ICON_ResumeOrPause(); + ICON_Stop(); + break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_print.dec()) { + switch (select_print.now) { + case 0: + ICON_Tune(); + ICON_ResumeOrPause(); + break; + case 1: + ICON_ResumeOrPause(); + ICON_Stop(); + break; + case 2: ICON_Stop(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_print.now) { + case 0: // Tune + Draw_Tune_Menu(); + break; + case 1: // Pause + if (HMI_flag.pause_flag) { + ICON_Pause(); + #ifndef ADVANCED_PAUSE_FEATURE + char cmd[40]; + cmd[0] = '\0'; + #if BOTH(HAS_HEATED_BED, PAUSE_HEAT) + if (resume_bed_temp) sprintf_P(cmd, PSTR("M190 S%i\n"), resume_bed_temp); + #endif + #if BOTH(HAS_HOTEND, PAUSE_HEAT) + if (resume_hotend_temp) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), resume_hotend_temp); + #endif + #if HAS_FAN + if (resume_fan) thermalManager.fan_speed[0] = resume_fan; + #endif + strcat_P(cmd, M24_STR); + queue.inject(cmd); + #endif + } + else { + HMI_flag.select_flag = true; + checkkey = PauseOrStop; + Popup_window_PauseOrStop(); + } + break; + + case 2: // Stop + HMI_flag.select_flag = true; + checkkey = PauseOrStop; + Popup_window_PauseOrStop(); + break; + + default: break; + } + } + DWIN_UpdateLCD(); +} + +// Print done +void HMI_PrintDone() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + dwin_abort_flag = true; // Reset feedrate, return to Home + Goto_Main_Menu(); // Return to Main menu after print done + } +} + +// Pause or Stop popup +void HMI_PauseOrStop() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (encoder_diffState == ENCODER_DIFF_CW) + Draw_Select_Highlight(false); + else if (encoder_diffState == ENCODER_DIFF_CCW) + Draw_Select_Highlight(true); + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (select_print.now == 1) { // pause window + if (HMI_flag.select_flag) { + HMI_flag.pause_action = true; + ICON_Resume(); + queue.inject_P(PSTR("M25")); + } + else { + // cancel pause + } + Goto_PrintProcess(); + } + else if (select_print.now == 2) { // stop window + if (HMI_flag.select_flag) { + checkkey = MainMenu; + if (HMI_flag.home_flag) planner.synchronize(); // Wait for planner moves to finish! + wait_for_heatup = wait_for_user = false; // Stop waiting for heating/user + card.abortFilePrintSoon(); // Let the main loop handle SD abort + dwin_abort_flag = true; // Reset feedrate, return to Home + #ifdef ACTION_ON_CANCEL + host_action_cancel(); + #endif + DWIN_Draw_Popup(ICON_BLTouch, "Stopping..." , "Please wait until done."); + } + else + Goto_PrintProcess(); // cancel stop + } + } + DWIN_UpdateLCD(); +} + +#include "../../../libs/buzzer.h" + +void HMI_AudioFeedback(const bool success/*=true*/) { + #if HAS_BUZZER + if (success) { + BUZZ(100, 659); + BUZZ(10, 0); + BUZZ(100, 698); + } + else + BUZZ(40, 440); + #endif +} + +void Draw_Main_Area() { + switch (checkkey) { + case MainMenu: Draw_Main_Menu(); break; + case SelectFile: Draw_Print_File_Menu(); break; + case PrintProcess: Draw_PrintProcess(); break; + case PrintDone: Draw_PrintDone(); break; + case Info: Draw_Info_Menu(); break; + case PauseOrStop: Popup_window_PauseOrStop(); break; + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case FilamentPurge: Draw_Popup_FilamentPurge(); break; + #endif + case Locked: LockScreen.Draw(); break; + case Menu: + case SetInt: + case SetPInt: + case SetIntNoDraw: + case SetFloat: + case SetPFloat: CurrentMenu->Draw(); break; + default: break; + } +} + +void HMI_ReturnScreen() { + checkkey = last_checkkey; + Draw_Main_Area(); + DWIN_UpdateLCD(); + return; +} + +void HMI_Popup() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + wait_for_user = false; + HMI_ReturnScreen(); + } +} + +void HMI_Init() { + HMI_SDCardInit(); + + for (uint16_t t = 0; t <= 100; t += 2) { + DWINUI::Draw_Icon(ICON_Bar, 15, 260); + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 15 + t * 242 / 100, 260, 257, 280); + DWIN_UpdateLCD(); + delay(20); + } + + HMI_SetLanguage(); +} + +void DWIN_Update() { + EachMomentUpdate(); // Status update + HMI_SDCardUpdate(); // SD card update + DWIN_HandleScreen(); // Rotary encoder update +} + +void EachMomentUpdate() { + static millis_t next_var_update_ms = 0, next_rts_update_ms = 0; + + const millis_t ms = millis(); + if (ELAPSED(ms, next_var_update_ms)) { + next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL; + update_variable(); + } + + if (PENDING(ms, next_rts_update_ms)) return; + next_rts_update_ms = ms + DWIN_SCROLL_UPDATE_INTERVAL; + + if (checkkey == PrintProcess) { + // if print done + if (HMI_flag.print_finish) { + HMI_flag.print_finish = false; + TERN_(POWER_LOSS_RECOVERY, recovery.cancel()); + planner.finish_and_disable(); + checkkey = PrintDone; + Draw_PrintDone(); + } + else if (HMI_flag.pause_flag != printingIsPaused()) { + // print status update + HMI_flag.pause_flag = printingIsPaused(); + ICON_ResumeOrPause(); + } + } + + // pause after homing + if (HMI_flag.pause_action && printingIsPaused() && !planner.has_blocks_queued()) { + HMI_flag.pause_action = false; + #if ENABLED(PAUSE_HEAT) + if (sdprint) { + TERN_(HAS_HOTEND, resume_hotend_temp = thermalManager.degTargetHotend(0)); + TERN_(HAS_HEATED_BED, resume_bed_temp = thermalManager.degTargetBed()); + } + else { + TERN_(HAS_HOTEND, resume_hotend_temp = thermalManager.wholeDegHotend(0)); + TERN_(HAS_HEATED_BED, resume_bed_temp = thermalManager.wholeDegBed()); + } + TERN_(HAS_FAN, resume_fan = thermalManager.fan_speed[0]); + #endif + #if DISABLED(ADVANCED_PAUSE_FEATURE) + thermalManager.disable_all_heaters(); + #endif + #if DISABLED(PARK_HEAD_ON_PAUSE) + queue.inject_P(PSTR("G1 F1200 X0 Y0")); + #endif + } + + if (checkkey == PrintProcess) { // print process + + duration_t elapsed = print_job_timer.duration(); // print timer + + if (sdprint && card.isPrinting()) { + uint8_t percentDone = card.percentDone(); + static uint8_t last_percentValue = 101; + if (last_percentValue != percentDone) { // print percent + last_percentValue = percentDone; + if (percentDone) { + _percent_done = percentDone; + Draw_Print_ProgressBar(); + } + } + + // Estimate remaining time every 20 seconds + static millis_t next_remain_time_update = 0; + if (_percent_done > 1 && ELAPSED(ms, next_remain_time_update) && !HMI_flag.heat_flag) { + _remain_time = (elapsed.value - dwin_heat_time) / (_percent_done * 0.01f) - (elapsed.value - dwin_heat_time); + next_remain_time_update += DWIN_REMAIN_TIME_UPDATE_INTERVAL; + Draw_Print_ProgressRemain(); + } + } + + // Print time so far + static uint16_t last_Printtime = 0; + const uint16_t min = (elapsed.value % 3600) / 60; + if (last_Printtime != min) { // 1 minute update + last_Printtime = min; + Draw_Print_ProgressElapsed(); + } + + } + else if (dwin_abort_flag && !HMI_flag.home_flag) { // Print Stop + dwin_abort_flag = false; + dwin_zoffset = BABY_Z_VAR; + select_page.set(0); + Goto_Main_Menu(); + } + #if ENABLED(POWER_LOSS_RECOVERY) + else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // resume print before power off + static bool recovery_flag = false; + + recovery.dwin_flag = false; + recovery_flag = true; + + auto update_selection = [&](const bool sel) { + HMI_flag.select_flag = sel; + const uint16_t c1 = sel ? HMI_data.PopupBg_color : HMI_data.Highlight_Color; + DWIN_Draw_Rectangle(0, c1, 25, 306, 126, 345); + DWIN_Draw_Rectangle(0, c1, 24, 305, 127, 346); + const uint16_t c2 = sel ? HMI_data.Highlight_Color : HMI_data.PopupBg_color; + DWIN_Draw_Rectangle(0, c2, 145, 306, 246, 345); + DWIN_Draw_Rectangle(0, c2, 144, 305, 247, 346); + }; + + Popup_Window_Resume(); + update_selection(true); + + // TODO: Get the name of the current file from someplace + // + //(void)recovery.interrupted_file_exists(); + SdFile *dir = nullptr; + const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename); + card.selectFileByName(filename); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 252, card.longest_filename()); + DWIN_UpdateLCD(); + + while (recovery_flag) { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (encoder_diffState == ENCODER_DIFF_ENTER) { + recovery_flag = false; + if (HMI_flag.select_flag) break; + TERN_(POWER_LOSS_RECOVERY, queue.inject_P(PSTR("M1000C"))); + return HMI_StartFrame(true); + } + else + update_selection(encoder_diffState == ENCODER_DIFF_CW); + + DWIN_UpdateLCD(); + } + watchdog_refresh(); + } + + select_print.set(0); + queue.inject_P(PSTR("M1000")); + sdprint = true; + Goto_PrintProcess(); + Draw_Status_Area(true); + } + #endif // POWER_LOSS_RECOVERY + + DWIN_UpdateLCD(); +} + +void DWIN_HandleScreen() { + switch (checkkey) { + case MainMenu: HMI_MainMenu(); break; + case Menu: HMI_Menu(); break; + case SetInt: HMI_SetInt(); break; + case SetPInt: HMI_SetPInt(); break; + case SetIntNoDraw: HMI_SetIntNoDraw(); break; + case SetFloat: HMI_SetFloat(); break; + case SetPFloat: HMI_SetPFloat(); break; + case SelectFile: HMI_SelectFile(); break; + case Homing: break; + case Leveling: break; + case PrintProcess: HMI_Printing(); break; + case PrintDone: HMI_PrintDone(); break; + case PauseOrStop: HMI_PauseOrStop(); break; + case Info: HMI_Popup(); break; + case WaitResponse: HMI_Popup(); break; + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case FilamentPurge: HMI_FilamentPurge(); break; + #endif + case NothingToDo: break; + case Locked: HMI_LockScreen(); break; + default: break; + } +} + +void HMI_SaveProcessID(const uint8_t id) { + if (checkkey != id) { + if ((checkkey != NothingToDo) && + (checkkey != WaitResponse) && + (checkkey != Homing) && + (checkkey != Leveling) && + (checkkey != PauseOrStop) && + (checkkey != FilamentPurge)) last_checkkey = checkkey; // if not a popup + checkkey = id; + } +} + +void DWIN_StartHoming() { + HMI_flag.home_flag = true; + HMI_SaveProcessID(Homing); + DWIN_Draw_Popup(ICON_BLTouch, "Axis Homing", "Please wait until done."); +} + +void DWIN_CompletedHoming() { + HMI_flag.home_flag = false; + dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); + if (dwin_abort_flag) { + planner.finish_and_disable(); + } + HMI_ReturnScreen(); +} + +void DWIN_MeshLevelingStart() { + #if HAS_ONESTEP_LEVELING + HMI_SaveProcessID(Leveling); + DWIN_Draw_Popup(ICON_AutoLeveling, GET_TEXT(MSG_BED_LEVELING), "Please wait until done."); + #elif ENABLED(MESH_BED_LEVELING) + Draw_ManualMesh_Menu(); + #endif +} + +void DWIN_CompletedLeveling() { HMI_ReturnScreen(); } + +#if ENABLED(MESH_BED_LEVELING) + void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { + char msg[33] = ""; + char str_1[6] = ""; + sprintf_P(msg, PSTR(S_FMT " %i/%i Z=%s"), GET_TEXT(MSG_PROBING_MESH), xpos, ypos, + dtostrf(zval, 1, 2, str_1)); + ui.set_status(msg); + } +#endif + +// PID process +void DWIN_PidTuning(pidresult_t result) { + switch (result) { + case PID_BED_START: + HMI_SaveProcessID(NothingToDo); + DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT(MSG_PID_AUTOTUNE), "for BED is running."); + break; + case PID_EXTR_START: + HMI_SaveProcessID(NothingToDo); + DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT(MSG_PID_AUTOTUNE), "for Nozzle is running."); + break; + case PID_BAD_EXTRUDER_NUM: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooLow, "PID Autotune failed!", "Bad extruder"); + break; + case PID_TUNING_TIMEOUT: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooHigh, "Error", GET_TEXT(MSG_PID_TIMEOUT)); + break; + case PID_TEMP_TOO_HIGH: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooHigh, "PID Autotune failed!", "Temperature too high"); + break; + case PID_DONE: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooLow, GET_TEXT(MSG_PID_AUTOTUNE), GET_TEXT(MSG_BUTTON_DONE)); + break; + default: + checkkey = last_checkkey; + break; + } +} + +// Update filename on print +void DWIN_Print_Header(const char *text = nullptr) { + + static char headertxt[31] = ""; // Print header text + + if (text != nullptr) { + const int8_t size = _MIN((unsigned) 30, strlen_P(text)); + LOOP_L_N(i, size) headertxt[i] = text[i]; + headertxt[size] = '\0'; + } + if (checkkey == PrintProcess || checkkey == PrintDone) { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 60, DWIN_WIDTH, 60+16); + DWINUI::Draw_CenteredString(60, headertxt); + } +} + +void Draw_Title(TitleClass* title) { + DWIN_Draw_Rectangle(1, HMI_data.TitleBg_color, 0, 0, DWIN_WIDTH - 1, TITLE_HEIGHT - 1); + if (title->frameid) + DWIN_Frame_AreaCopy(title->frameid, title->frame.left, title->frame.top, title->frame.right, title->frame.bottom, 14, (TITLE_HEIGHT - (title->frame.bottom - title->frame.top)) / 2 - 1); + else + DWIN_Draw_String(false, false, DWIN_FONT_HEAD, HMI_data.TitleTxt_color, HMI_data.TitleBg_color, 14, (TITLE_HEIGHT - DWINUI::Get_font_height(DWIN_FONT_HEAD)) / 2 - 1, title->caption); +} + +void Draw_Menu(MenuClass* menu) { + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + DWIN_Draw_Rectangle(1, DWINUI::backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1); + ui.set_status(""); +} + +// Startup routines +void DWIN_Startup() { + DWINUI::Init(); + DWINUI::onCursorDraw = Draw_Menu_Cursor; + DWINUI::onCursorErase = Erase_Menu_Cursor; + DWINUI::onTitleDraw = Draw_Title; + DWINUI::onMenuDraw = Draw_Menu; + HMI_SetLanguage(); +} + +void DWIN_DrawStatusLine(const uint16_t color, const uint16_t bgcolor, const char *text) { + DWIN_Draw_Rectangle(1, bgcolor, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20); + if (text) DWINUI::Draw_CenteredString(color, STATUS_Y + 2, text); + DWIN_UpdateLCD(); +} + +// Update Status line +void DWIN_StatusChanged(const char *text) { + DWIN_DrawStatusLine(HMI_data.StatusTxt_Color, HMI_data.StatusBg_Color, text); +} + +void DWIN_StatusChanged_P(PGM_P const pstr) { + char str[strlen_P((const char*)pstr) + 1]; + strcpy_P(str, (const char*)pstr); + DWIN_StatusChanged(str); +} + +// Started a Print Job +void DWIN_Print_Started(const bool sd) { + sdprint = card.isPrinting() || sd; + _percent_done = 0; + _remain_time = 0; + Goto_PrintProcess(); +} + +// Ended print job +void DWIN_Print_Finished() { + if (checkkey == PrintProcess || printingIsActive()) { + thermalManager.disable_all_heaters(); + thermalManager.zero_fan_speeds(); + HMI_flag.print_finish = true; + } +} + +// Progress Bar update +void DWIN_Progress_Update() { + if (parser.seenval('P')) _percent_done = parser.byteval('P'); + if (parser.seenval('R')) _remain_time = parser.ulongval('R') * 60; + if (checkkey == PrintProcess) { + Draw_Print_ProgressBar(); + Draw_Print_ProgressRemain(); + Draw_Print_ProgressElapsed(); + } +} + +#if HAS_FILAMENT_SENSOR + // Filament Runout process + void DWIN_FilamentRunout(const uint8_t extruder) { ui.set_status_P(GET_TEXT(MSG_RUNOUT_SENSOR)); } +#endif + +void DWIN_SetColorDefaults() { + HMI_data.Background_Color = Def_Background_Color; + HMI_data.Cursor_color = Def_Cursor_color; + HMI_data.TitleBg_color = Def_TitleBg_color; + HMI_data.TitleTxt_color = Def_TitleTxt_color; + HMI_data.Text_Color = Def_Text_Color; + HMI_data.Selected_Color = Def_Selected_Color; + HMI_data.SplitLine_Color = Def_SplitLine_Color; + HMI_data.Highlight_Color = Def_Highlight_Color; + HMI_data.StatusBg_Color = Def_StatusBg_Color; + HMI_data.StatusTxt_Color = Def_StatusTxt_Color; + HMI_data.PopupBg_color = Def_PopupBg_color; + HMI_data.PopupTxt_Color = Def_PopupTxt_Color; + HMI_data.AlertBg_Color = Def_AlertBg_Color; + HMI_data.AlertTxt_Color = Def_AlertTxt_Color; + HMI_data.PercentTxt_Color = Def_PercentTxt_Color; + HMI_data.Barfill_Color = Def_Barfill_Color; + HMI_data.Indicator_Color = Def_Indicator_Color; + HMI_data.Coordinate_Color = Def_Coordinate_Color; +} + +void DWIN_SetDataDefaults() { + DWIN_SetColorDefaults(); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + TERN_(HAS_HOTEND, HMI_data.HotendPidT = PREHEAT_1_TEMP_HOTEND); + TERN_(HAS_HEATED_BED, HMI_data.BedPidT = PREHEAT_1_TEMP_BED); + TERN_(HAS_HOTEND, HMI_data.PidCycles = 5); +} + +void DWIN_StoreSettings(char *buff) { + memcpy(buff, &HMI_data, min(sizeof(HMI_data), eeprom_data_size)); +} + +void DWIN_LoadSettings(const char *buff) { + memcpy(&HMI_data, buff, min(sizeof(HMI_data), eeprom_data_size)); + dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); + if (HMI_data.Text_Color == HMI_data.Background_Color) DWIN_SetColorDefaults(); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + TERN_(PREVENT_COLD_EXTRUSION, ApplyExtMinT()); +} + +void MarlinUI::kill_screen(PGM_P lcd_error, PGM_P lcd_component) { + DWIN_Draw_Popup(ICON_BLTouch, lcd_error, lcd_component); + DWIN_UpdateLCD(); +} + +void DWIN_RebootScreen() { + DWIN_Frame_Clear(Color_Bg_Black); + DWINUI::Draw_Icon(ICON_LOGO, 71, 150); // CREALITY logo + DWINUI::Draw_CenteredString(Color_White, 200, F("Please wait until reboot.")); + DWIN_UpdateLCD(); + delay(500); +} + +void DWIN_Redraw_screen() { + Draw_Main_Area(); + DWIN_StatusChanged(ui.status_message); + Draw_Status_Area(false); +} + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + + void DWIN_Popup_Pause(const char *msg, uint8_t button = 0) { + HMI_SaveProcessID(button ? WaitResponse : NothingToDo); + DWIN_Draw_Popup(ICON_BLTouch, "Advanced Pause", msg, button); + ui.reset_status(true); + } + + void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) { + switch (message) { + case PAUSE_MESSAGE_PARKING: DWIN_Popup_Pause(GET_TEXT(MSG_PAUSE_PRINT_PARKING)); break; + case PAUSE_MESSAGE_CHANGING: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_INIT)); break; + case PAUSE_MESSAGE_UNLOAD: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_UNLOAD)); break; + case PAUSE_MESSAGE_WAITING: DWIN_Popup_Pause(GET_TEXT(MSG_ADVANCED_PAUSE_WAITING), ICON_Continue_E); break; + case PAUSE_MESSAGE_INSERT: DWIN_Popup_Continue(ICON_BLTouch, "Advanced Pause", GET_TEXT(MSG_FILAMENT_CHANGE_INSERT)); break; + case PAUSE_MESSAGE_LOAD: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_LOAD)); break; + case PAUSE_MESSAGE_PURGE: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE)); break; + case PAUSE_MESSAGE_OPTION: DWIN_Popup_FilamentPurge(); break; + case PAUSE_MESSAGE_RESUME: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_RESUME)); break; + case PAUSE_MESSAGE_HEAT: DWIN_Popup_Pause(GET_TEXT(MSG_FILAMENT_CHANGE_HEAT), ICON_Continue_E); break; + case PAUSE_MESSAGE_HEATING: ui.set_status_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEATING)); break; + case PAUSE_MESSAGE_STATUS: HMI_ReturnScreen(); break; + default: break; + } + } + + void Draw_Popup_FilamentPurge() { + DWIN_Draw_Popup(ICON_BLTouch, "Advanced Pause", "Purge or Continue?"); + DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280); + DWINUI::Draw_Icon(ICON_Continue_E, 146, 280); + Draw_Select_Highlight(true); + } + + // Handle responses such as: + // - Purge More, Continue + // - General "Continue" response + void DWIN_Popup_FilamentPurge() { + HMI_SaveProcessID(FilamentPurge); + pause_menu_response = PAUSE_RESPONSE_WAIT_FOR; + Draw_Popup_FilamentPurge(); + } + + void HMI_FilamentPurge() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW) + Draw_Select_Highlight(false); + else if (encoder_diffState == ENCODER_DIFF_CCW) + Draw_Select_Highlight(true); + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (HMI_flag.select_flag) + pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // "Purge More" button + else { + HMI_SaveProcessID(NothingToDo); + pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; // "Continue" button + } + } + DWIN_UpdateLCD(); + } + +#endif // ADVANCED_PAUSE_FEATURE + +void HMI_LockScreen() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + LockScreen.onEncoderState(encoder_diffState); + if (LockScreen.isUnlocked()) { + if (CurrentMenu == AdvancedSettings) + Draw_AdvancedSettings_Menu(); + else + Draw_Tune_Menu(); + } +} + +void DWIN_LockScreen(const bool flag) { + HMI_flag.lock_flag = flag; + checkkey = Locked; + LockScreen.Init(); +} + +// +// NEW MENU SUBSYSTEM ========================================================= +// + +// On click functions + +// Generic onclick event without draw anything +// process: process id HMI destiny +// lo: low limit +// hi: high limit +// dp: decimal places, 0 for integers +// val: value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + last_checkkey = checkkey; + checkkey = process; + HMI_value.MinValue = lo; + HMI_value.MaxValue = hi; + HMI_value.dp = dp; + HMI_value.Apply = Apply; + HMI_value.LiveUpdate = LiveUpdate; + HMI_value.Value = val; + EncoderRate.enabled = true; +} + +// Generic onclick event for set values (dp = 0: integer, dp > 0: float) +// process: process id HMI destiny +// lo: scaled low limit +// hi: scaled high limit +// dp: decimal places, 0 for integers +// val: scaled value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetOnClick(process, lo, hi, dp, val, Apply, LiveUpdate); + dp ? DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value) + : Draw_Menu_IntValue(HMI_data.Selected_Color, CurrentMenu->line(), 4, HMI_value.Value); +} + +// Generic onclick event for integer values +// lo: scaled low limit +// hi: scaled high limit +// val: value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetValueOnClick(SetInt, lo, hi, 0, val, Apply, LiveUpdate); +} + +// Generic onclick event for set pointer to 16 bit uinteger values +// lo: low limit +// hi: high limit +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + HMI_value.P_Int = (int16_t*)static_cast(CurrentMenu->SelectedItem())->value; + const int32_t value = *HMI_value.P_Int; + SetValueOnClick(SetPInt, lo, hi, 0, value, Apply, LiveUpdate); +} + +// Generic onclick event for float values +// process: process id HMI destiny +// lo: low limit +// hi: high limit +// dp: decimal places +// val: value +void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetValueOnClick(SetFloat, lo * POW(10, dp), hi * POW(10, dp), dp, val * POW(10, dp), Apply, LiveUpdate); +} + +// Generic onclick event for set pointer to float values +// lo: low limit +// hi: high limit +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + HMI_value.P_Float = (float*)static_cast(CurrentMenu->SelectedItem())->value; + const int32_t value = *HMI_value.P_Float * POW(10, dp); + SetValueOnClick(SetPFloat, lo * POW(10, dp), hi * POW(10, dp), dp, value, Apply, LiveUpdate); +} + +#if ENABLED(EEPROM_SETTINGS) + void WriteEeprom() { + const bool success = settings.save(); + HMI_AudioFeedback(success); + } + + void ReadEeprom() { + const bool success = settings.load(); + DWIN_Redraw_screen(); + HMI_AudioFeedback(success); + } + + void ResetEeprom() { + settings.reset(); + DWIN_Redraw_screen(); + HMI_AudioFeedback(); + } +#endif + +// Reset Printer +void RebootPrinter() { + dwin_abort_flag = true; + wait_for_heatup = wait_for_user = false; // Stop waiting for heating/user + thermalManager.disable_all_heaters(); + planner.finish_and_disable(); + DWIN_RebootScreen(); + HAL_reboot(); +} + +void Goto_InfoMenu(){ + checkkey = Info; + Draw_Info_Menu(); +} + +void DisableMotors() { + queue.inject_P(PSTR("M84")); +} + +void AutoHome() { + queue.inject_P(G28_STR); +} + +void SetHome() { + // Apply workspace offset, making the current position 0,0,0 + queue.inject_P(PSTR("G92 X0 Y0 Z0")); + HMI_AudioFeedback(); +} + +#if HAS_ZOFFSET_ITEM + bool printer_busy() { return planner.movesplanned() || printingIsActive(); } + void ApplyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); } + void LiveZOffset() { + last_zoffset = dwin_zoffset; + dwin_zoffset = HMI_value.Value / 100.0f; + #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); + #endif + } + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void SetZOffset() { SetPFloatOnClick(Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, 2, ApplyZOffset, LiveZOffset); } + #endif +#endif + +#if HAS_PREHEAT + void SetPreheat(const uint8_t i) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[i].hotend_temp, 0)); + TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(ui.material_preset[i].bed_temp)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[i].fan_speed)); + } + void SetPreheat0() { SetPreheat(0); } + void SetPreheat1() { SetPreheat(1); } + void SetPreheat2() { SetPreheat(2); } + + void SetCoolDown() { + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + #if HAS_HOTEND || HAS_HEATED_BED + thermalManager.disable_all_heaters(); + #endif + } +#endif + +void SetLanguage() { + HMI_ToggleLanguage(); + CurrentMenu = nullptr; // Invalidate menu to full redraw + Draw_Prepare_Menu(); +} + +void LiveMove() { + *HMI_value.P_Float = HMI_value.Value / MINUNITMULT; + if (!planner.is_full()) { + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(HMI_value.axis)); + } +} +void ApplyMoveE() { + last_E = HMI_value.Value / MINUNITMULT; + if (!planner.is_full()) { + planner.synchronize(); + planner.buffer_line(current_position, MMM_TO_MMS(FEEDRATE_E)); + } +} +void SetMoveX() { HMI_value.axis = X_AXIS; SetPFloatOnClick(X_MIN_POS, X_MAX_POS, UNITFDIGITS, planner.synchronize, LiveMove);} +void SetMoveY() { HMI_value.axis = Y_AXIS; SetPFloatOnClick(Y_MIN_POS, Y_MAX_POS, UNITFDIGITS, planner.synchronize, LiveMove);} +void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS, UNITFDIGITS, planner.synchronize, LiveMove);} + +#if HAS_HOTEND + void SetMoveE() { + #ifdef PREVENT_COLD_EXTRUSION + if (thermalManager.tooColdToExtrude(0)) { + Popup_Window_ETempTooLow(); + return; + } + #endif + SetPFloatOnClick(last_E - (EXTRUDE_MAXLENGTH), last_E + (EXTRUDE_MAXLENGTH), UNITFDIGITS, ApplyMoveE); + } +#endif + +void SetMoveZto0() { + char cmd[48] = ""; + char str_1[5] = "", str_2[5] = ""; + sprintf_P(cmd, PSTR("G28OXY\nG28Z\nG0X%sY%sF5000\nG0Z0F300"), + dtostrf(X_CENTER, 1, 1, str_1), + dtostrf(Y_CENTER, 1, 1, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + ui.set_status_P(PSTR("Now adjust Z Offset")); + HMI_AudioFeedback(true); +} + +void SetPID(celsius_t t, heater_id_t h) { + char cmd[48] = ""; + char str_1[5] = "", str_2[5] = ""; + sprintf_P(cmd, PSTR("G28OXY\nG0Z5F300\nG0X%sY%sF5000\nM84"), + dtostrf(X_CENTER, 1, 1, str_1), + dtostrf(Y_CENTER, 1, 1, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + thermalManager.PID_autotune(t, h, HMI_data.PidCycles, true); +} +TERN_(HAS_HOTEND, void HotendPID() { SetPID(HMI_data.HotendPidT, H_E0); }) +TERN_(HAS_HEATED_BED, void BedPID() { SetPID(HMI_data.BedPidT, H_BED); }) + +void SetPwrLossr() { + recovery.enable(!recovery.enabled); + Draw_Chkb_Line(CurrentMenu->line(), recovery.enabled); + DWIN_UpdateLCD(); +} + +#if HAS_LCD_BRIGHTNESS + void ApplyBrightness() { ui.set_brightness(HMI_value.Value); } + void LiveBrightness() { DWIN_LCD_Brightness(HMI_value.Value); } + void SetBrightness() { SetIntOnClick(MIN_LCD_BRIGHTNESS, MAX_LCD_BRIGHTNESS, ui.brightness, ApplyBrightness, LiveBrightness); } +#endif + +#if ENABLED(SOUND_MENU_ITEM) + void SetEnableSound() { + ui.buzzer_enabled = !ui.buzzer_enabled; + Draw_Chkb_Line(CurrentMenu->line(), ui.buzzer_enabled); + DWIN_UpdateLCD(); + } +#endif + +void Goto_LockScreen() { + DWIN_LockScreen(true); +} + +#if HAS_HOME_OFFSET + void ApplyHomeOffset() { set_home_offset(HMI_value.axis, HMI_value.Value / MINUNITMULT); } + void SetHomeOffsetX() { HMI_value.axis = X_AXIS; SetPFloatOnClick(-50, 50, UNITFDIGITS, ApplyHomeOffset); } + void SetHomeOffsetY() { HMI_value.axis = Y_AXIS; SetPFloatOnClick(-50, 50, UNITFDIGITS, ApplyHomeOffset); } + void SetHomeOffsetZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick( -2, 2, UNITFDIGITS, ApplyHomeOffset); } +#endif + +#if HAS_BED_PROBE + void SetProbeOffsetX() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } + void SetProbeOffsetY() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } + void ProbeTest() { + ui.set_status_P(GET_TEXT(MSG_M48_TEST)); + queue.inject_P(PSTR("G28O\nM48 P10")); + } +#endif + +#if HAS_FILAMENT_SENSOR + void SetRunoutEnable() { + runout.reset(); + runout.enabled = !runout.enabled; + Draw_Chkb_Line(CurrentMenu->line(), runout.enabled); + DWIN_UpdateLCD(); + } + #if HAS_FILAMENT_RUNOUT_DISTANCE + void ApplyRunoutDistance() { runout.set_runout_distance(HMI_value.Value / MINUNITMULT); } + void SetRunoutDistance() { SetFloatOnClick(0, 999, UNITFDIGITS, runout.runout_distance(), ApplyRunoutDistance); } + #endif +#endif + +TERN_(ADVANCED_PAUSE_FEATURE, void SetFilLoad() { SetPFloatOnClick(0, MAX_LOAD_UNLOAD, UNITFDIGITS); }); +TERN_(ADVANCED_PAUSE_FEATURE, void SetFilUnload() { SetPFloatOnClick(0, MAX_LOAD_UNLOAD, UNITFDIGITS); }); + +TERN_(PREVENT_COLD_EXTRUSION, void ApplyExtMinT() { thermalManager.extrude_min_temp = HMI_data.ExtMinT; thermalManager.allow_cold_extrude = (HMI_data.ExtMinT == 0); }); +TERN_(PREVENT_COLD_EXTRUSION, void SetExtMinT() { SetPIntOnClick(MIN_ETEMP, MAX_ETEMP, ApplyExtMinT); }); + +void RestoreDefaultsColors() { + DWIN_SetColorDefaults(); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + DWIN_Redraw_screen(); +} + +void SelColor() { + HMI_value.P_Int = (int16_t*)static_cast(CurrentMenu->SelectedItem())->value; + HMI_value.Color[2] = GetRColor(*HMI_value.P_Int); // Red + HMI_value.Color[1] = GetGColor(*HMI_value.P_Int); // Green + HMI_value.Color[0] = GetBColor(*HMI_value.P_Int); // Blue + Draw_GetColor_Menu(); +} + +void LiveRGBColor() { + HMI_value.Color[CurrentMenu->line() - 2] = HMI_value.Value; + uint16_t color = RGB(HMI_value.Color[2], HMI_value.Color[1], HMI_value.Color[0]); + DWIN_Draw_Rectangle(1, color, 20, 315, DWIN_WIDTH - 20, 335); +} +void SetRGBColor() { + const uint8_t line = CurrentMenu->line() - 2; + SetIntOnClick(0, (line == 1) ? 63 : 31, HMI_value.Color[CurrentMenu->SelectedItem()->icon], nullptr, LiveRGBColor); +} + +void DWIN_ApplyColor() { + *HMI_value.P_Int = RGB(HMI_value.Color[2], HMI_value.Color[1], HMI_value.Color[0]); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + Draw_Status_Area(false); + Draw_SelectColors_Menu(); + ui.set_status_P(PSTR("Colors applied")); +} + +void SetSpeed() { SetPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); } + +#if HAS_HOTEND + void ApplyHotendTemp() { thermalManager.setTargetHotend(HMI_value.Value, 0); } + void SetHotendTemp() { SetIntOnClick(HEATER_0_MINTEMP, HEATER_0_MAXTEMP, thermalManager.degTargetHotend(0), ApplyHotendTemp); } +#endif + +#if HAS_HEATED_BED + void ApplyBedTemp() { thermalManager.setTargetBed(HMI_value.Value); } + void SetBedTemp() { SetIntOnClick(BED_MINTEMP, BED_MAX_TARGET, thermalManager.degTargetBed(), ApplyBedTemp); } +#endif + +#if HAS_FAN + void ApplyFanSpeed() { thermalManager.set_fan_speed(0, HMI_value.Value); } + void SetFanSpeed() { SetIntOnClick(0, 255, thermalManager.fan_speed[0], ApplyFanSpeed); } +#endif + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void ChangeFilament() { + HMI_SaveProcessID(NothingToDo); + queue.inject_P(PSTR("M600 B2")); + } + + void ParkHead(){ + ui.set_status_P(GET_TEXT(MSG_FILAMENT_PARK_ENABLED)); + queue.inject_P(PSTR("G28O\nG27")); + } + + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + void UnloadFilament(){ + ui.set_status_P(GET_TEXT(MSG_FILAMENTUNLOAD)); + queue.inject_P(PSTR("M702 Z20")); + } + + void LoadFilament(){ + ui.set_status_P(GET_TEXT(MSG_FILAMENTLOAD)); + queue.inject_P(PSTR("M701 Z20")); + } + #endif +#endif + +void SetFlow() { SetPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW); } + +// Leveling Bed Corners +void LevBed(uint8_t point) { + char cmd[100] = ""; + #if HAS_ONESTEP_LEVELING + char str_1[6] = "", str_2[6] = "", str_3[6] = ""; + #define fmt "X:%s, Y:%s, Z:%s" + float xpos = 0, ypos = 0, zval = 0; + float margin = PROBING_MARGIN; + #else + #define fmt "M420 S0\nG28O\nG90\nG0 Z5 F300\nG0 X%i Y%i F5000\nG0 Z0 F300" + int16_t xpos = 0, ypos = 0; + int16_t margin = 30; + #endif + + switch (point) { + case 0: + ui.set_status_P(GET_TEXT(MSG_LEVBED_FL)); + xpos = ypos = margin; + break; + case 1: + ui.set_status_P(GET_TEXT(MSG_LEVBED_FR)); + xpos = X_BED_SIZE - margin; ypos = margin; + break; + case 2: + ui.set_status_P(GET_TEXT(MSG_LEVBED_BR)); + xpos = X_BED_SIZE - margin; ypos = Y_BED_SIZE - margin; + break; + case 3: + ui.set_status_P(GET_TEXT(MSG_LEVBED_BL)); + xpos = margin; ypos = Y_BED_SIZE - margin; + break; + case 4: + ui.set_status_P(GET_TEXT(MSG_LEVBED_C)); + xpos = X_BED_SIZE / 2; ypos = Y_BED_SIZE / 2; + break; + } + + #if HAS_ONESTEP_LEVELING + planner.synchronize(); + gcode.process_subcommands_now_P(PSTR("M420S0\nG28O")); + planner.synchronize(); + zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW); + sprintf_P(cmd, PSTR(fmt), + dtostrf(xpos, 1, 1, str_1), + dtostrf(ypos, 1, 1, str_2), + dtostrf(zval, 1, 2, str_3) + ); + ui.set_status_P(cmd); + #else + planner.synchronize(); + sprintf_P(cmd, PSTR(fmt), xpos, ypos); + queue.inject(cmd); + #endif +} + +void LevBedFL() { LevBed(0); } +void LevBedFR() { LevBed(1); } +void LevBedBR() { LevBed(2); } +void LevBedBL() { LevBed(3); } +void LevBedC () { LevBed(4); } + +#if ENABLED(MESH_BED_LEVELING) + void ManualMeshStart(){ + ui.set_status_P(GET_TEXT(MSG_UBL_BUILD_MESH_MENU)); + gcode.process_subcommands_now_P(PSTR("G28 XYO\nG28 Z\nM211 S0\nG29S1")); + planner.synchronize(); + #ifdef MANUAL_PROBE_START_Z + MMeshMoveZItem->Draw(CurrentMenu->line(MMeshMoveZItem->pos)); + #endif + } + + void SetMMeshMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(-1, 1, 2, planner.synchronize, LiveMove);} + + void ManualMeshContinue(){ + gcode.process_subcommands_now_P(PSTR("G29S2")); + planner.synchronize(); + MMeshMoveZItem->Draw(CurrentMenu->line(MMeshMoveZItem->pos)); + } + + void ManualMeshSave(){ + ui.set_status_P(GET_TEXT(MSG_UBL_STORAGE_MESH_MENU)); + queue.inject_P(PSTR("M211 S1\nM500")); + } +#endif + +#if HAS_PREHEAT + TERN_(HAS_HOTEND, void SetPreheatEndTemp() { SetPIntOnClick(MIN_ETEMP, MAX_ETEMP); }); + TERN_(HAS_HEATED_BED, void SetPreheatBedTemp() { SetPIntOnClick(BED_MINTEMP, BED_MAX_TARGET); }); + TERN_(HAS_FAN, void SetPreheatFanSpeed() { SetPIntOnClick(0, 255); }); +#endif + +void ApplyMaxSpeed() { planner.set_max_feedrate(HMI_value.axis, HMI_value.Value / MINUNITMULT); } +void SetMaxSpeedX() { HMI_value.axis = X_AXIS, SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[X_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[X_AXIS], ApplyMaxSpeed); } +void SetMaxSpeedY() { HMI_value.axis = Y_AXIS, SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[Y_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Y_AXIS], ApplyMaxSpeed); } +void SetMaxSpeedZ() { HMI_value.axis = Z_AXIS, SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[Z_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Z_AXIS], ApplyMaxSpeed); } +TERN_(HAS_HOTEND, void SetMaxSpeedE() { HMI_value.axis = E_AXIS; SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[E_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[E_AXIS], ApplyMaxSpeed); }); + +void ApplyMaxAccel() { planner.set_max_acceleration(HMI_value.axis, HMI_value.Value); } +void SetMaxAccelX() { HMI_value.axis = X_AXIS, SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[X_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[X_AXIS], ApplyMaxAccel); } +void SetMaxAccelY() { HMI_value.axis = Y_AXIS, SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[Y_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[Y_AXIS], ApplyMaxAccel); } +void SetMaxAccelZ() { HMI_value.axis = Z_AXIS, SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[Z_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[Z_AXIS], ApplyMaxAccel); } +TERN_(HAS_HOTEND, void SetMaxAccelE() { HMI_value.axis = E_AXIS; SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[E_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[E_AXIS], ApplyMaxAccel); }); + +#if HAS_CLASSIC_JERK + void ApplyMaxJerk() { planner.set_max_jerk(HMI_value.axis, HMI_value.Value / MINUNITMULT); } + void SetMaxJerkX() { HMI_value.axis = X_AXIS, SetFloatOnClick(MIN_MAXJERK, default_max_jerk[X_AXIS] * 2, UNITFDIGITS, planner.max_jerk[X_AXIS], ApplyMaxJerk); } + void SetMaxJerkY() { HMI_value.axis = Y_AXIS, SetFloatOnClick(MIN_MAXJERK, default_max_jerk[Y_AXIS] * 2, UNITFDIGITS, planner.max_jerk[Y_AXIS], ApplyMaxJerk); } + void SetMaxJerkZ() { HMI_value.axis = Z_AXIS, SetFloatOnClick(MIN_MAXJERK, default_max_jerk[Z_AXIS] * 2, UNITFDIGITS, planner.max_jerk[Z_AXIS], ApplyMaxJerk); } + TERN_(HAS_HOTEND, void SetMaxJerkE() { HMI_value.axis = E_AXIS; SetFloatOnClick(MIN_MAXJERK, default_max_jerk[E_AXIS] * 2, UNITFDIGITS, planner.max_jerk[E_AXIS], ApplyMaxJerk); }); +#endif + +void SetStepsX() { HMI_value.axis = X_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); } +void SetStepsY() { HMI_value.axis = Y_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); } +void SetStepsZ() { HMI_value.axis = Z_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); } +TERN_(HAS_HOTEND, void SetStepsE() { HMI_value.axis = E_AXIS; SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); }); + +TERN_(HAS_HOTEND, void SetHotendPidT() { SetPIntOnClick(MIN_ETEMP, MAX_ETEMP); }) +TERN_(HAS_HEATED_BED, void SetBedPidT() { SetPIntOnClick(BED_MINTEMP, BED_MAX_TARGET); }) + +#if HAS_HOTEND || HAS_HEATED_BED + void SetPidCycles() { SetPIntOnClick(3, 50); } + void SetKp() { SetPFloatOnClick(0, 1000, 2); } + void ApplyPIDi() { + *HMI_value.P_Float = scalePID_i(HMI_value.Value / POW(10, 2)); + thermalManager.updatePID(); + } + void ApplyPIDd() { + *HMI_value.P_Float = scalePID_d(HMI_value.Value / POW(10, 2)); + thermalManager.updatePID(); + } + void SetKi() { + HMI_value.P_Float = (float*)static_cast(CurrentMenu->SelectedItem())->value; + const float value = unscalePID_i(*HMI_value.P_Float); + SetFloatOnClick(0, 1000, 2, value, ApplyPIDi); + } + void SetKd() { + HMI_value.P_Float = (float*)static_cast(CurrentMenu->SelectedItem())->value; + const float value = unscalePID_d(*HMI_value.P_Float); + SetFloatOnClick(0, 1000, 2, value, ApplyPIDd); + } +#endif +// Menuitem Drawing functions ================================================= + +void onDrawMenuItem(MenuItemClass* menuitem, int8_t line) { + if (menuitem->icon) DWINUI::Draw_Icon(menuitem->icon, ICOX, MBASE(line) - 3); + if (menuitem->frameid) + DWIN_Frame_AreaCopy(menuitem->frameid, menuitem->frame.left, menuitem->frame.top, menuitem->frame.right, menuitem->frame.bottom, LBLX, MBASE(line)); + else if (menuitem->caption) + DWINUI::Draw_String(LBLX, MBASE(line) - 1, menuitem->caption); + DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240); +} + +void onDrawSubMenu(MenuItemClass* menuitem, int8_t line) { + onDrawMenuItem(menuitem, line); + DWINUI::Draw_Icon(ICON_More, VALX + 16, MBASE(line) - 3); +} + +void onDrawIntMenu(MenuItemClass* menuitem, int8_t line, uint16_t value) { + onDrawMenuItem(menuitem, line); + Draw_Menu_IntValue(HMI_data.Background_Color, line, 4, value); +} + +void onDrawPIntMenu(MenuItemClass* menuitem, int8_t line) { + const uint16_t value = *(uint16_t*)static_cast(menuitem)->value; + onDrawIntMenu(menuitem, line, value); +} + +void onDrawPInt8Menu(MenuItemClass* menuitem, int8_t line) { + const uint8_t value = *(uint8_t*)static_cast(menuitem)->value; + onDrawIntMenu(menuitem, line, value); +} + +void onDrawPInt32Menu(MenuItemClass* menuitem, int8_t line) { + const uint32_t value = *(uint32_t*)static_cast(menuitem)->value; + onDrawIntMenu(menuitem, line, value); +} + +void onDrawFloatMenu(MenuItemClass* menuitem, int8_t line, uint8_t dp, const float value) { + onDrawMenuItem(menuitem, line); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(line), value * POW(10, dp)); +} + +void onDrawPFloatMenu(MenuItemClass* menuitem, int8_t line) { + const float value = *(float*)static_cast(menuitem)->value; + const int8_t dp = UNITFDIGITS; + onDrawFloatMenu(menuitem, line, dp, value); +} + +void onDrawPFloat2Menu(MenuItemClass* menuitem, int8_t line) { + const float value = *(float*)static_cast(menuitem)->value; + const int8_t dp = 2; + onDrawFloatMenu(menuitem, line, dp, value); +} + +void onDrawChkbMenu(MenuItemClass* menuitem, int8_t line, bool checked) { + onDrawMenuItem(menuitem, line); + Draw_Chkb_Line(line, checked); +} + +void onDrawBack(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 129, 72, 156, 84); + onDrawMenuItem(menuitem, line); +} + +void onDrawTempSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 57, 104, 84, 116); + onDrawSubMenu(menuitem, line); +} + +void onDrawMotionSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 87, 104, 114, 116); + onDrawSubMenu(menuitem, line); +} + +#if ENABLED(EEPROM_SETTINGS) + void onDrawWriteEeprom(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 117, 104, 172, 116); + onDrawMenuItem(menuitem, line); + } + + void onDrawReadEeprom(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 174, 103, 229, 116); + onDrawMenuItem(menuitem, line); + } + + void onDrawResetEeprom(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 118, 56, 131); + onDrawMenuItem(menuitem, line); + } +#endif + +void onDrawInfoSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 231, 104, 258, 116); + onDrawSubMenu(menuitem, line); +} + +void onDrawMoveX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 58, 118, 106, 132); + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMoveY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 109, 118, 157, 132); + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMoveZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 160, 118, 209, 132); + onDrawPFloatMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawMoveE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 212, 118, 253, 131); + onDrawPFloatMenu(menuitem, line); + } +#endif + +void onDrawMoveSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 159, 70, 200, 84); + onDrawSubMenu(menuitem, line); +} + +void onDrawDisableMotors(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 204, 70, 259, 82); + onDrawMenuItem(menuitem, line); +} + +void onDrawAutoHome(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 0, 89, 41, 101); + onDrawMenuItem(menuitem, line); +} + +#if HAS_ZOFFSET_ITEM + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void onDrawZOffset(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 174, 164, 223, 177); + onDrawPFloat2Menu(menuitem, line); + } + #else + void onDrawHomeOffset(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 43, 89, 98, 101); + onDrawMenuItem(menuitem, line); + } + #endif +#endif + +#if HAS_HOTEND + void onDrawPreheat1(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 100, 89, 151, 101); + onDrawMenuItem(menuitem, line); + } + void onDrawPreheat2(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 180, 89, 233, 100); + onDrawMenuItem(menuitem, line); + } +#endif + +#if HAS_PREHEAT + void onDrawCooldown(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 104, 56, 117); + onDrawMenuItem(menuitem, line); + } +#endif + +void onDrawLanguage(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 239, 134, 266, 146); + onDrawMenuItem(menuitem, line); + DWINUI::Draw_String(VALX, MBASE(line), HMI_IsChinese() ? F("CN") : F("EN")); +} + +void onDrawPwrLossR(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, recovery.enabled); } + +void onDrawEnableSound(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, ui.buzzer_enabled); } + +void onDrawSelColorItem(MenuItemClass* menuitem, int8_t line) { + const uint16_t color = *(uint16_t*)static_cast(menuitem)->value; + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ICOX + 1, MBASE(line) - 1 + 1, ICOX + 18, MBASE(line) - 1 + 18); + DWIN_Draw_Rectangle(1, color, ICOX + 2, MBASE(line) - 1 + 2, ICOX + 17, MBASE(line) - 1 + 17); + onDrawMenuItem(menuitem, line); +} + +void onDrawGetColorItem(MenuItemClass* menuitem, int8_t line) { + const uint8_t i = menuitem->icon; + uint16_t color; + switch (i) { + case 0: color = RGB(0, 0, 31); break; + case 1: color = RGB(0, 63, 0); break; + case 2: color = RGB(31, 0, 0); break; + default: color = 0; break; + } + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ICOX + 1, MBASE(line) - 1 + 1, ICOX + 18, MBASE(line) - 1 + 18); + DWIN_Draw_Rectangle(1, color, ICOX + 2, MBASE(line) - 1 + 2, ICOX + 17, MBASE(line) - 1 + 17); + DWINUI::Draw_String(LBLX, MBASE(line) - 1, menuitem->caption); + Draw_Menu_IntValue(HMI_data.Background_Color, line, 4, HMI_value.Color[i]); + DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240); +} + +#if HAS_FILAMENT_SENSOR + void onDrawRunoutEnable(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, runout.enabled); } +#endif + +void onDrawPIDi(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_i(*(float*)static_cast(menuitem)->value)); } +void onDrawPIDd(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_d(*(float*)static_cast(menuitem)->value)); } + + +void onDrawSpeedItem(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 116, 164, 171, 176); + onDrawPIntMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawHotendTemp(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 134, 56, 146); + onDrawPIntMenu(menuitem, line); + } +#endif + +#if HAS_HEATED_BED + void onDrawBedTemp(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 58, 134, 113, 146); + onDrawPIntMenu(menuitem, line); + } +#endif + +#if HAS_FAN + void onDrawFanSpeed(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 115, 134, 170, 146); + onDrawPInt8Menu(menuitem, line); + } +#endif + +void onDrawSpeed(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 173, 133, 228, 147); + onDrawSubMenu(menuitem, line); +} + +void onDrawAcc(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line) + 1); // ...Acceleration + } + onDrawSubMenu(menuitem, line); +} + +#if HAS_CLASSIC_JERK + void onDrawJerk(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line) + 1); // ... + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 54, MBASE(line)); // ...Jerk + } + onDrawSubMenu(menuitem, line); + } +#endif + +void onDrawSteps(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 153, 148, 194, 161); + onDrawSubMenu(menuitem, line); +} + +#if ENABLED(MESH_BED_LEVELING) + void onDrawMMeshMoveZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 160, 118, 209, 132); + onDrawPFloatMenu(menuitem, line); + } +#endif + +#if HAS_PREHEAT + #if HAS_HOTEND + void onDrawSetPreheatHotend(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 134, 56, 146); + onDrawPIntMenu(menuitem, line); + } + #endif + #if HAS_HEATED_BED + void onDrawSetPreheatBed(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 58, 134, 113, 146); + onDrawPIntMenu(menuitem, line); + } + #endif + #if HAS_FAN + void onDrawSetPreheatFan(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 115, 134, 170, 146); + onDrawPIntMenu(menuitem, line); + } + #endif + void onDrawPLAPreheatSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 100, 89, 178, 101); + onDrawSubMenu(menuitem,line); + } + void onDrawABSPreheatSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 180, 89, 260, 100); + onDrawSubMenu(menuitem,line); + } +#endif // HAS_HOTEND + +void onDrawMaxSpeedX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 58, MBASE(line)); // X + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMaxSpeedY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 58, MBASE(line)); // Y + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMaxSpeedZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 58, MBASE(line) + 3); // Z + } + onDrawPFloatMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawMaxSpeedE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 58, MBASE(line)); // E + } + onDrawPFloatMenu(menuitem, line); + } +#endif + +void onDrawMaxAccelX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 71, MBASE(line)); // X + } + onDrawPInt32Menu(menuitem, line); +} + +void onDrawMaxAccelY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 71, MBASE(line)); // Y + } + onDrawPInt32Menu(menuitem, line); +} + +void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 71, MBASE(line)); // Z + } + onDrawPInt32Menu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawMaxAccelE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 71, MBASE(line)); // E + } + onDrawPInt32Menu(menuitem, line); + } +#endif + +#if HAS_CLASSIC_JERK + void onDrawMaxJerkX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + + void onDrawMaxJerkY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + + void onDrawMaxJerkZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + + #if HAS_HOTEND + void onDrawMaxJerkE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + #endif +#endif // HAS_CLASSIC_JERK + +void onDrawStepsX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 44, MBASE(line)); // X + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawStepsY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 44, MBASE(line)); // Y + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawStepsZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 44, MBASE(line)); // Z + } + onDrawPFloatMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawStepsE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame (1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 44, MBASE(line)); // E + } + onDrawPFloatMenu(menuitem, line); + } +#endif + +// HMI Control functions ====================================================== + +// Generic menu control using the encoder +void HMI_Menu() { + ENCODER_DiffState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (CurrentMenu != nullptr) CurrentMenu->onClick(); + } else if (CurrentMenu != nullptr) CurrentMenu->onScroll(encoder_diffState == ENCODER_DIFF_CW); +} + +// Get an integer value using the encoder without draw anything +// lo: low limit +// hi: high limit +// Return value: +// 0 : no change +// 1 : live change +// 2 : apply change +int8_t HMI_GetIntNoDraw(const int32_t lo, const int32_t hi) { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (Apply_Encoder(encoder_diffState, HMI_value.Value)) { + EncoderRate.enabled = false; + checkkey = last_checkkey; + return 2; + } + LIMIT(HMI_value.Value, lo, hi); + return 1; + } + return 0; +} + +// Get an integer value using the encoder +// lo: low limit +// hi: high limit +// Return value: +// 0 : no change +// 1 : live change +// 2 : apply change +int8_t HMI_GetInt(const int32_t lo, const int32_t hi) { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (Apply_Encoder(encoder_diffState, HMI_value.Value)) { + EncoderRate.enabled = false; + DWINUI::Draw_Int(HMI_data.Text_Color, HMI_data.Background_Color, 4 , VALX, MBASE(CurrentMenu->line()) - 1, HMI_value.Value); + checkkey = last_checkkey; + return 2; + } + LIMIT(HMI_value.Value, lo, hi); + DWINUI::Draw_Int(HMI_data.Text_Color, HMI_data.Selected_Color, 4 , VALX, MBASE(CurrentMenu->line()) - 1, HMI_value.Value); + return 1; + } + return 0; +} + +// Set an integer using the encoder +void HMI_SetInt() { + int8_t val = HMI_GetInt(HMI_value.MinValue, HMI_value.MaxValue); + switch (val) { + case 0: return; break; + case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + } +} + +// Set an integer without drawing +void HMI_SetIntNoDraw() { + int8_t val = HMI_GetIntNoDraw(HMI_value.MinValue, HMI_value.MaxValue); + switch (val) { + case 0: return; break; + case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + } +} + +// Set an integer pointer variable using the encoder +void HMI_SetPInt() { + int8_t val = HMI_GetInt(HMI_value.MinValue, HMI_value.MaxValue); + if (!val) return; + else if (val == 2) { // Apply + *HMI_value.P_Int = HMI_value.Value; + if (HMI_value.Apply != nullptr) HMI_value.Apply(); + } else if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); +} + +// Get an scaled float value using the encoder +// dp: decimal places +// lo: scaled low limit +// hi: scaled high limit +// Return value: +// 0 : no change +// 1 : live change +// 2 : apply change +int8_t HMI_GetFloat(uint8_t dp, int32_t lo, int32_t hi) { + ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (Apply_Encoder(encoder_diffState, HMI_value.Value)) { + EncoderRate.enabled = false; + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value); + checkkey = last_checkkey; + return 2; + } + LIMIT(HMI_value.Value, lo, hi); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value); + return 1; + } + return 0; +} + +// Set an scaled float using the encoder +void HMI_SetFloat() { + int8_t val = HMI_GetFloat(HMI_value.dp, HMI_value.MinValue, HMI_value.MaxValue); + switch (val) { + case 0: return; break; + case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + } +} + +// Set an scaled float pointer variable using the encoder +void HMI_SetPFloat() { + int8_t val = HMI_GetFloat(HMI_value.dp, HMI_value.MinValue, HMI_value.MaxValue); + if (!val) return; + else if (val == 2) { // Apply + *HMI_value.P_Float = HMI_value.Value / POW(10, HMI_value.dp); + if (HMI_value.Apply != nullptr) HMI_value.Apply(); + } else if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); +} + +// Menu Creation and Drawing functions ====================================================== + +void SetMenuTitle(frame_rect_t cn, frame_rect_t en, const __FlashStringHelper* text) { + if (HMI_IsChinese() && (cn.w != 0)) + CurrentMenu->MenuTitle.SetFrame(cn.x, cn.y, cn.w, cn.h); + else { + #ifdef USE_STRING_HEADINGS + CurrentMenu->MenuTitle.SetCaption(text); + #else + if (en.w != 0) CurrentMenu->MenuTitle.SetFrame(en.x, en.y, en.w, en.h); + #endif + } +} + +void Draw_Prepare_Menu() { + checkkey = Menu; + if (PrepareMenu == nullptr) PrepareMenu = new MenuClass(); + if (CurrentMenu != PrepareMenu) { + CurrentMenu = PrepareMenu; + SetMenuTitle({133, 1, 28, 13}, {179, 0, 48, 14}, GET_TEXT_F(MSG_PREPARE)); + DWINUI::MenuItemsPrepare(13); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu); + TERN_(ADVANCED_PAUSE_FEATURE, ADDMENUITEM(ICON_FilMan, GET_TEXT(MSG_FILAMENT_MAN), onDrawSubMenu, Draw_FilamentMan_Menu)); + ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_MOVE_AXIS), onDrawMoveSubMenu, Draw_Move_Menu); + ADDMENUITEM(ICON_LevBed, GET_TEXT(MSG_BED_LEVELING), onDrawSubMenu, Draw_LevBedCorners_Menu); + ADDMENUITEM(ICON_CloseMotor, GET_TEXT(MSG_DISABLE_STEPPERS), onDrawDisableMotors, DisableMotors); + ADDMENUITEM(ICON_Homing, GET_TEXT(MSG_AUTO_HOME), onDrawAutoHome, AutoHome); + TERN_(MESH_BED_LEVELING, ADDMENUITEM(ICON_ManualMesh, GET_TEXT(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu)); + #if HAS_ZOFFSET_ITEM + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + ADDMENUITEM(ICON_SetZOffset, GET_TEXT(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu); + #else + ADDMENUITEM(ICON_SetHome, GET_TEXT(MSG_SET_HOME_OFFSETS), onDrawHomeOffset, SetHome); + #endif + #endif + #if HAS_HOTEND + ADDMENUITEM(ICON_PLAPreheat, GET_TEXT(MSG_PREHEAT_1), onDrawPreheat1, SetPreheat0); + ADDMENUITEM(ICON_ABSPreheat, PSTR("Preheat " PREHEAT_2_LABEL), onDrawPreheat2, SetPreheat1); + ADDMENUITEM(ICON_CustomPreheat, GET_TEXT(MSG_PREHEAT_CUSTOM), onDrawMenuItem, SetPreheat2); + #endif + TERN_(HAS_PREHEAT, ADDMENUITEM(ICON_Cool, GET_TEXT(MSG_COOLDOWN), onDrawCooldown, SetCoolDown)); + ADDMENUITEM(ICON_Language, PSTR("UI Language"), onDrawLanguage, SetLanguage); + } + CurrentMenu->Draw(); +} + +void Draw_LevBedCorners_Menu() { + DWINUI::ClearMenuArea(); + checkkey = Menu; + if (LevBedMenu == nullptr) LevBedMenu = new MenuClass(); + if (CurrentMenu != LevBedMenu) { + CurrentMenu = LevBedMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_BED_TRAMMING)); // TODO: Chinese, English "Bed Tramming" JPG + DWINUI::MenuItemsPrepare(6); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_FL), onDrawMenuItem, LevBedFL); + ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_FR), onDrawMenuItem, LevBedFR); + ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_BR), onDrawMenuItem, LevBedBR); + ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_BL), onDrawMenuItem, LevBedBL); + ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_LEVBED_C ), onDrawMenuItem, LevBedC ); + } + CurrentMenu->Draw(); +} + +void Draw_Control_Menu() { + checkkey = Menu; + if (ControlMenu == nullptr) ControlMenu = new MenuClass(); + if (CurrentMenu != ControlMenu) { + CurrentMenu = ControlMenu; + SetMenuTitle({103, 1, 28, 14}, {128, 2, 49, 11}, GET_TEXT_F(MSG_CONTROL)); + DWINUI::MenuItemsPrepare(9); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu); + ADDMENUITEM(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawTempSubMenu, Draw_Temperature_Menu); + ADDMENUITEM(ICON_Motion, GET_TEXT(MSG_MOTION), onDrawMotionSubMenu, Draw_Motion_Menu); + #if ENABLED(EEPROM_SETTINGS) + ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom); + ADDMENUITEM(ICON_ReadEEPROM, GET_TEXT(MSG_LOAD_EEPROM), onDrawReadEeprom, ReadEeprom); + ADDMENUITEM(ICON_ResumeEEPROM, GET_TEXT(MSG_RESTORE_DEFAULTS), onDrawResetEeprom, ResetEeprom); + #endif + ADDMENUITEM(ICON_Reboot, GET_TEXT(MSG_RESET_PRINTER), onDrawMenuItem, RebootPrinter); + ADDMENUITEM(ICON_AdvSet, GET_TEXT(MSG_ADVANCED_SETTINGS), onDrawSubMenu, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_Info, GET_TEXT(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_InfoMenu); + } + CurrentMenu->Draw(); +} + +void Draw_AdvancedSettings_Menu() { + checkkey = Menu; + if (AdvancedSettings == nullptr) AdvancedSettings = new MenuClass(); + if (CurrentMenu != AdvancedSettings) { + CurrentMenu = AdvancedSettings; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG + DWINUI::MenuItemsPrepare(11); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu); + TERN_(HAS_HOME_OFFSET, ADDMENUITEM(ICON_HomeOffset, GET_TEXT(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu)); + TERN_(HAS_BED_PROBE, ADDMENUITEM(ICON_ProbeSet, GET_TEXT(MSG_ZPROBE_SETTINGS), onDrawSubMenu, Draw_ProbeSet_Menu)); + TERN_(HAS_HOTEND, ADDMENUITEM(ICON_PIDNozzle, F("Hotend PID Settings"), onDrawSubMenu, Draw_HotendPID_Menu)); + TERN_(HAS_HEATED_BED, ADDMENUITEM(ICON_PIDbed, F("Bed PID Settings"), onDrawSubMenu, Draw_BedPID_Menu)); + TERN_(HAS_FILAMENT_SENSOR, ADDMENUITEM(ICON_FilSet, GET_TEXT(MSG_FILAMENT_SET), onDrawSubMenu, Draw_FilSet_Menu)); + TERN_(POWER_LOSS_RECOVERY, ADDMENUITEM(ICON_Pwrlossr, F("Power-loss recovery"), onDrawPwrLossR, SetPwrLossr)); + TERN_(HAS_LCD_BRIGHTNESS, ADDMENUITEM_P(ICON_Brightness, F("LCD Brightness"), onDrawPInt8Menu, SetBrightness, &ui.brightness)); + ADDMENUITEM(ICON_Scolor, F("Select Colors"), onDrawSubMenu, Draw_SelectColors_Menu); + TERN_(SOUND_MENU_ITEM, ADDMENUITEM(ICON_Sound, F("Enable Sound"), onDrawEnableSound, SetEnableSound)); + ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, Goto_LockScreen); + } + CurrentMenu->Draw(); +} + +void Draw_Move_Menu() { + checkkey = Menu; + if (MoveMenu == nullptr) MoveMenu = new MenuClass(); + if (CurrentMenu != MoveMenu) { + CurrentMenu = MoveMenu; + SetMenuTitle({192, 1, 42, 14}, {231, 2, 35, 11}, GET_TEXT_F(MSG_MOVE_AXIS)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM_P(ICON_MoveX, GET_TEXT(MSG_MOVE_X), onDrawMoveX, SetMoveX, ¤t_position.x); + ADDMENUITEM_P(ICON_MoveY, GET_TEXT(MSG_MOVE_Y), onDrawMoveY, SetMoveY, ¤t_position.y); + ADDMENUITEM_P(ICON_MoveZ, GET_TEXT(MSG_MOVE_Z), onDrawMoveZ, SetMoveZ, ¤t_position.z); + TERN_(HAS_HOTEND, ADDMENUITEM_P(ICON_Extruder, GET_TEXT(MSG_MOVE_E), onDrawMoveE, SetMoveE, ¤t_position.e)); + } + CurrentMenu->Draw(); + if (!all_axes_trusted()) ui.set_status_P(PSTR("WARNING: position is unknow")); +} + +#if HAS_HOME_OFFSET + void Draw_HomeOffset_Menu() { + checkkey = Menu; + if (HomeOffMenu == nullptr) HomeOffMenu = new MenuClass(); + if (CurrentMenu != HomeOffMenu) { + CurrentMenu = HomeOffMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); // TODO: Chinese, English "Set Home Offsets" JPG + DWINUI::MenuItemsPrepare(4); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); + ADDMENUITEM_P(ICON_HomeOffsetX, GET_TEXT(MSG_HOME_OFFSET_X), onDrawPFloatMenu, SetHomeOffsetX, &home_offset[X_AXIS]); + ADDMENUITEM_P(ICON_HomeOffsetY, GET_TEXT(MSG_HOME_OFFSET_Y), onDrawPFloatMenu, SetHomeOffsetY, &home_offset[Y_AXIS]); + ADDMENUITEM_P(ICON_HomeOffsetZ, GET_TEXT(MSG_HOME_OFFSET_Z), onDrawPFloatMenu, SetHomeOffsetZ, &home_offset[Z_AXIS]); + } + CurrentMenu->Draw(); + } +#endif + +#if HAS_BED_PROBE + void Draw_ProbeSet_Menu() { + checkkey = Menu; + if (ProbeSetMenu == nullptr) ProbeSetMenu = new MenuClass(); + if (CurrentMenu != ProbeSetMenu) { + CurrentMenu = ProbeSetMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ZPROBE_SETTINGS)); // TODO: Chinese, English "Probe Settings" JPG + DWINUI::MenuItemsPrepare(4); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); + ADDMENUITEM_P(ICON_ProbeOffsetX, GET_TEXT(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x); + ADDMENUITEM_P(ICON_ProbeOffsetY, GET_TEXT(MSG_ZPROBE_YOFFSET), onDrawPFloatMenu, SetProbeOffsetY, &probe.offset.y); + ADDMENUITEM(ICON_ProbeTest, GET_TEXT(MSG_M48_TEST), onDrawMenuItem, ProbeTest); + } + CurrentMenu->Draw(); + } +#endif + +#if HAS_FILAMENT_SENSOR + void Draw_FilSet_Menu() { + checkkey = Menu; + if (FilSetMenu == nullptr) FilSetMenu = new MenuClass(); + if (CurrentMenu != FilSetMenu) { + CurrentMenu = FilSetMenu; + CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_FILAMENT_SET)); + DWINUI::MenuItemsPrepare(6); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); + TERN_(HAS_FILAMENT_SENSOR, ADDMENUITEM(ICON_Runout, GET_TEXT(MSG_RUNOUT_ENABLE), onDrawRunoutEnable, SetRunoutEnable)); + TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, ADDMENUITEM_P(ICON_Runout, F("Runout Distance"), onDrawPFloatMenu, SetRunoutDistance, &runout.runout_distance())); + TERN_(PREVENT_COLD_EXTRUSION, ADDMENUITEM_P(ICON_ExtrudeMinT, F("Extrude Min Temp."), onDrawPIntMenu, SetExtMinT, &thermalManager.extrude_min_temp)); + TERN_(ADVANCED_PAUSE_FEATURE, ADDMENUITEM_P(ICON_FilLoad, GET_TEXT(MSG_FILAMENT_LOAD), onDrawPFloatMenu, SetFilLoad, &fc_settings[0].load_length)); + TERN_(ADVANCED_PAUSE_FEATURE, ADDMENUITEM_P(ICON_FilUnload, GET_TEXT(MSG_FILAMENT_UNLOAD), onDrawPFloatMenu, SetFilUnload, &fc_settings[0].unload_length)); + } + CurrentMenu->Draw(); + } +#endif +void Draw_SelectColors_Menu() { + checkkey = Menu; + if (SelectColorMenu == nullptr) SelectColorMenu = new MenuClass(); + if (CurrentMenu != SelectColorMenu) { + CurrentMenu = SelectColorMenu; + SetMenuTitle({0}, {0}, F("Select Colors")); // TODO: Chinese, English "Select Color" JPG + DWINUI::MenuItemsPrepare(20); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_StockConfiguration, GET_TEXT(MSG_RESTORE_DEFAULTS), onDrawMenuItem, RestoreDefaultsColors); + ADDMENUITEM_P(0, "Screen Background", onDrawSelColorItem, SelColor, &HMI_data.Background_Color); + ADDMENUITEM_P(0, "Cursor", onDrawSelColorItem, SelColor, &HMI_data.Cursor_color); + ADDMENUITEM_P(0, "Title Background", onDrawSelColorItem, SelColor, &HMI_data.TitleBg_color); + ADDMENUITEM_P(0, "Title Text", onDrawSelColorItem, SelColor, &HMI_data.TitleTxt_color); + ADDMENUITEM_P(0, "Text", onDrawSelColorItem, SelColor, &HMI_data.Text_Color); + ADDMENUITEM_P(0, "Selected", onDrawSelColorItem, SelColor, &HMI_data.Selected_Color); + ADDMENUITEM_P(0, "Split Line", onDrawSelColorItem, SelColor, &HMI_data.SplitLine_Color); + ADDMENUITEM_P(0, "Highlight", onDrawSelColorItem, SelColor, &HMI_data.Highlight_Color); + ADDMENUITEM_P(0, "Status Background", onDrawSelColorItem, SelColor, &HMI_data.StatusBg_Color); + ADDMENUITEM_P(0, "Status Text", onDrawSelColorItem, SelColor, &HMI_data.StatusTxt_Color); + ADDMENUITEM_P(0, "Popup Background", onDrawSelColorItem, SelColor, &HMI_data.PopupBg_color); + ADDMENUITEM_P(0, "Popup Text", onDrawSelColorItem, SelColor, &HMI_data.PopupTxt_Color); + ADDMENUITEM_P(0, "Alert Background", onDrawSelColorItem, SelColor, &HMI_data.AlertBg_Color); + ADDMENUITEM_P(0, "Alert Text", onDrawSelColorItem, SelColor, &HMI_data.AlertTxt_Color); + ADDMENUITEM_P(0, "Percent Text", onDrawSelColorItem, SelColor, &HMI_data.PercentTxt_Color); + ADDMENUITEM_P(0, "Bar Fill", onDrawSelColorItem, SelColor, &HMI_data.Barfill_Color); + ADDMENUITEM_P(0, "Indicator value", onDrawSelColorItem, SelColor, &HMI_data.Indicator_Color); + ADDMENUITEM_P(0, "Coordinate value", onDrawSelColorItem, SelColor, &HMI_data.Coordinate_Color); + } + CurrentMenu->Draw(); +} + +void Draw_GetColor_Menu() { + checkkey = Menu; + if (GetColorMenu == nullptr) GetColorMenu = new MenuClass(); + if (CurrentMenu != GetColorMenu) { + CurrentMenu = GetColorMenu; + SetMenuTitle({0}, {0}, F("Get Color")); // TODO: Chinese, English "Get Color" JPG + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, DWIN_ApplyColor); + ADDMENUITEM(ICON_Cancel, GET_TEXT(MSG_BUTTON_CANCEL), onDrawMenuItem, Draw_SelectColors_Menu); + ADDMENUITEM(0, "Blue", onDrawGetColorItem, SetRGBColor); + ADDMENUITEM(1, "Green", onDrawGetColorItem, SetRGBColor); + ADDMENUITEM(2, "Red", onDrawGetColorItem, SetRGBColor); + } + CurrentMenu->Draw(); + DWIN_Draw_Rectangle(1, *HMI_value.P_Int, 20, 315, DWIN_WIDTH - 20, 335); +} + +void Draw_Tune_Menu() { + checkkey = Menu; + if (TuneMenu == nullptr) TuneMenu = new MenuClass(); + if (CurrentMenu != TuneMenu) { + CurrentMenu = TuneMenu; + SetMenuTitle({73, 2, 28, 12}, {94, 2, 33, 11}, GET_TEXT_F(MSG_TUNE)); // TODO: Chinese, English "Tune" JPG + DWINUI::MenuItemsPrepare(10); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Goto_PrintProcess); + ADDMENUITEM_P(ICON_Speed, GET_TEXT(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage); + TERN_(HAS_HOTEND, HotendTargetItem = ADDMENUITEM_P(ICON_HotendTemp, GET_TEXT(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target)); + TERN_(HAS_HEATED_BED, BedTargetItem = ADDMENUITEM_P(ICON_BedTemp, GET_TEXT(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target)); + TERN_(HAS_FAN, FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0])); + #if HAS_ZOFFSET_ITEM + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawZOffset, SetZOffset, &BABY_Z_VAR); + #else + ADDMENUITEM(ICON_SetHome, GET_TEXT(MSG_SET_HOME_OFFSETS), onDrawHomeOffset, SetHome); + #endif + #endif + ADDMENUITEM_P(ICON_Flow, GET_TEXT(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]); + TERN_(ADVANCED_PAUSE_FEATURE, ADDMENUITEM(ICON_FilMan, GET_TEXT(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament)); + ADDMENUITEM(ICON_Lock, PSTR("Lock Screen"), onDrawMenuItem, Goto_LockScreen); + TERN_(HAS_LCD_BRIGHTNESS, ADDMENUITEM_P(ICON_Brightness, F("LCD Brightness"), onDrawPInt8Menu, SetBrightness, &ui.brightness)); + } + CurrentMenu->Draw(); +} + +void Draw_Motion_Menu() { + checkkey = Menu; + if (MotionMenu == nullptr) MotionMenu = new MenuClass(); + if (CurrentMenu != MotionMenu) { + CurrentMenu = MotionMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MOTION)); // TODO: Chinese, English "Motion" JPG + DWINUI::MenuItemsPrepare(6); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu); + ADDMENUITEM(ICON_MaxSpeed, GET_TEXT(MSG_SPEED), onDrawSpeed, Draw_MaxSpeed_Menu); + ADDMENUITEM(ICON_MaxAccelerated, GET_TEXT(MSG_ACCELERATION), onDrawAcc, Draw_MaxAccel_Menu); + TERN_(HAS_CLASSIC_JERK, ADDMENUITEM(ICON_MaxJerk, GET_TEXT(MSG_JERK), onDrawJerk, Draw_MaxJerk_Menu)); + ADDMENUITEM(ICON_Step, GET_TEXT(MSG_STEPS_PER_MM), onDrawSteps, Draw_Steps_Menu); + ADDMENUITEM_P(ICON_Flow, GET_TEXT(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]); + } + CurrentMenu->Draw(); + DWIN_StatusChanged(nullptr); +} + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void Draw_FilamentMan_Menu() { + checkkey = Menu; + if (FilamentMenu == nullptr) FilamentMenu = new MenuClass(); + if (CurrentMenu != FilamentMenu) { + CurrentMenu = FilamentMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_FILAMENT_MAN)); // TODO: Chinese, English "Filament Management" JPG + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM(ICON_Park, GET_TEXT(MSG_FILAMENT_PARK_ENABLED), onDrawMenuItem, ParkHead); + ADDMENUITEM(ICON_FilMan, GET_TEXT(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament); + TERN_(FILAMENT_LOAD_UNLOAD_GCODES, ADDMENUITEM(ICON_FilUnload, GET_TEXT(MSG_FILAMENTUNLOAD), onDrawMenuItem, UnloadFilament)); + TERN_(FILAMENT_LOAD_UNLOAD_GCODES, ADDMENUITEM(ICON_FilLoad, GET_TEXT(MSG_FILAMENTLOAD), onDrawMenuItem, LoadFilament)); + } + CurrentMenu->Draw(); + } +#endif + +#if ENABLED(MESH_BED_LEVELING) + void Draw_ManualMesh_Menu() { + checkkey = Menu; + if (ManualMesh == nullptr) ManualMesh = new MenuClass(); + if (CurrentMenu != ManualMesh) { + CurrentMenu = ManualMesh; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_MANUAL_MESH)); // TODO: Chinese, English "Manual Mesh Leveling" JPG + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM(ICON_ManualMesh, GET_TEXT(MSG_LEVEL_BED), onDrawMenuItem, ManualMeshStart); + MMeshMoveZItem = ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_MOVE_Z), onDrawMMeshMoveZ, SetMMeshMoveZ, ¤t_position.z); + ADDMENUITEM(ICON_Axis, GET_TEXT(MSG_UBL_CONTINUE_MESH), onDrawMenuItem, ManualMeshContinue); + ADDMENUITEM(ICON_MeshSave, GET_TEXT(MSG_UBL_SAVE_MESH), onDrawMenuItem, ManualMeshSave); + } + CurrentMenu->Draw(); + } +#endif + +#if HAS_PREHEAT + void Draw_Preheat_Menu(frame_rect_t cn, frame_rect_t en, const __FlashStringHelper* text) { + checkkey = Menu; + if (CurrentMenu != PreheatMenu) { + CurrentMenu = PreheatMenu; + SetMenuTitle(cn, en, text); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Temperature_Menu); + TERN_(HAS_HOTEND, ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT(MSG_UBL_SET_TEMP_HOTEND), onDrawSetPreheatHotend, SetPreheatEndTemp, &ui.material_preset[HMI_value.Preheat].hotend_temp)); + TERN_(HAS_HEATED_BED, ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT(MSG_UBL_SET_TEMP_BED), onDrawSetPreheatBed, SetPreheatBedTemp, &ui.material_preset[HMI_value.Preheat].bed_temp)); + TERN_(HAS_FAN, ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT(MSG_FAN_SPEED), onDrawSetPreheatFan, SetPreheatFanSpeed, &ui.material_preset[HMI_value.Preheat].fan_speed)); + TERN_(EEPROM_SETTINGS, ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom)); + } + CurrentMenu->Draw(); + } + + void Draw_Preheat1_Menu() { + HMI_value.Preheat = 0; + if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + Draw_Preheat_Menu({59, 16, 81, 14}, {56, 15, 85, 14}, F(PREHEAT_1_LABEL " Preheat Settings")); // TODO: English "PLA Settings" JPG + } + + void Draw_Preheat2_Menu() { + HMI_value.Preheat = 1; + if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + Draw_Preheat_Menu({142, 16, 82, 14}, {56, 15, 85, 14}, F(PREHEAT_2_LABEL " Preheat Settings")); // TODO: English "ABS Settings" JPG + } + + #ifdef PREHEAT_3_LABEL + void Draw_Preheat3_Menu() { + HMI_value.Preheat = 2; + if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + #define PREHEAT_3_TITLE PREHEAT_3_LABEL " Preheat Set." + Draw_Preheat_Menu({0}, {0}, F(PREHEAT_3_TITLE)); // TODO: Chinese, English "Custom Preheat Settings" JPG + } + #endif + +#endif + +void Draw_Temperature_Menu() { + checkkey = Menu; + if (TemperatureMenu == nullptr) TemperatureMenu = new MenuClass(); + if (CurrentMenu != TemperatureMenu) { + CurrentMenu = TemperatureMenu; + SetMenuTitle({236, 2, 28, 12}, {56, 15, 85, 14}, GET_TEXT_F(MSG_TEMPERATURE)); + DWINUI::MenuItemsPrepare(7); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu); + TERN_(HAS_HOTEND, HotendTargetItem = ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target)); + TERN_(HAS_HEATED_BED, BedTargetItem = ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target)); + TERN_(HAS_FAN, FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0])); + #if HAS_HOTEND + ADDMENUITEM(ICON_SetPLAPreheat, F(PREHEAT_1_LABEL " Preheat Settings"), onDrawPLAPreheatSubMenu, Draw_Preheat1_Menu); + ADDMENUITEM(ICON_SetABSPreheat, F(PREHEAT_2_LABEL " Preheat Settings"), onDrawABSPreheatSubMenu, Draw_Preheat2_Menu); + #ifdef PREHEAT_3_LABEL + ADDMENUITEM(ICON_SetCustomPreheat, PREHEAT_3_TITLE, onDrawSubMenu, Draw_Preheat3_Menu); + #endif + #endif + } + CurrentMenu->Draw(); +} + +void Draw_MaxSpeed_Menu() { + checkkey = Menu; + if (MaxSpeedMenu == nullptr) MaxSpeedMenu = new MenuClass(); + if (CurrentMenu != MaxSpeedMenu) { + CurrentMenu = MaxSpeedMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MAXSPEED)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_MaxSpeedX, GET_TEXT(MSG_MAXSPEED_X), onDrawMaxSpeedX, SetMaxSpeedX, &planner.settings.max_feedrate_mm_s[X_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedY, GET_TEXT(MSG_MAXSPEED_Y), onDrawMaxSpeedY, SetMaxSpeedY, &planner.settings.max_feedrate_mm_s[Y_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedZ, GET_TEXT(MSG_MAXSPEED_Z), onDrawMaxSpeedZ, SetMaxSpeedZ, &planner.settings.max_feedrate_mm_s[Z_AXIS]); + TERN_(HAS_HOTEND, ADDMENUITEM_P(ICON_MaxSpeedE, GET_TEXT(MSG_MAXSPEED_E), onDrawMaxSpeedE, SetMaxSpeedE, &planner.settings.max_feedrate_mm_s[Z_AXIS])); + } + CurrentMenu->Draw(); +} + +void Draw_MaxAccel_Menu() { + checkkey = Menu; + if (MaxAccelMenu == nullptr) MaxAccelMenu = new MenuClass(); + if (CurrentMenu != MaxAccelMenu) { + CurrentMenu = MaxAccelMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_ACCELERATION)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_MaxAccX, GET_TEXT(MSG_AMAX_A), onDrawMaxAccelX, SetMaxAccelX, &planner.settings.max_acceleration_mm_per_s2[X_AXIS]); + ADDMENUITEM_P(ICON_MaxAccY, GET_TEXT(MSG_AMAX_B), onDrawMaxAccelY, SetMaxAccelY, &planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); + ADDMENUITEM_P(ICON_MaxAccZ, GET_TEXT(MSG_AMAX_C), onDrawMaxAccelZ, SetMaxAccelZ, &planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); + TERN_(HAS_HOTEND, ADDMENUITEM_P(ICON_MaxAccE, GET_TEXT(MSG_AMAX_E), onDrawMaxAccelE, SetMaxAccelE, &planner.settings.max_acceleration_mm_per_s2[E_AXIS])); + } + CurrentMenu->Draw(); +} + +#if HAS_CLASSIC_JERK + void Draw_MaxJerk_Menu() { + checkkey = Menu; + if (MaxJerkMenu == nullptr) MaxJerkMenu = new MenuClass(); + if (CurrentMenu != MaxJerkMenu) { + CurrentMenu = MaxJerkMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_JERK)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_MaxSpeedJerkX, GET_TEXT(MSG_VA_JERK), onDrawMaxJerkX, SetMaxJerkX, &planner.max_jerk[X_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedJerkY, GET_TEXT(MSG_VB_JERK), onDrawMaxJerkY, SetMaxJerkY, &planner.max_jerk[Y_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedJerkZ, GET_TEXT(MSG_VC_JERK), onDrawMaxJerkZ, SetMaxJerkZ, &planner.max_jerk[Z_AXIS]); + TERN_(HAS_HOTEND, ADDMENUITEM_P(ICON_MaxSpeedJerkE, GET_TEXT(MSG_VE_JERK), onDrawMaxJerkE, SetMaxJerkE, &planner.max_jerk[E_AXIS])); + } + CurrentMenu->Draw(); + } +#endif + +void Draw_Steps_Menu() { + checkkey = Menu; + if (StepsMenu == nullptr) StepsMenu = new MenuClass(); + if (CurrentMenu != StepsMenu) { + CurrentMenu = StepsMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_STEPS_PER_MM)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_StepX, GET_TEXT(MSG_A_STEPS), onDrawStepsX, SetStepsX, &planner.settings.axis_steps_per_mm[X_AXIS]); + ADDMENUITEM_P(ICON_StepY, GET_TEXT(MSG_B_STEPS), onDrawStepsY, SetStepsY, &planner.settings.axis_steps_per_mm[Y_AXIS]); + ADDMENUITEM_P(ICON_StepZ, GET_TEXT(MSG_C_STEPS), onDrawStepsZ, SetStepsZ, &planner.settings.axis_steps_per_mm[Z_AXIS]); + TERN_(HAS_HOTEND, ADDMENUITEM_P(ICON_StepE, GET_TEXT(MSG_E_STEPS), onDrawStepsE, SetStepsE, &planner.settings.axis_steps_per_mm[E_AXIS])); + } + CurrentMenu->Draw(); +} + +#if HAS_HOTEND + void Draw_HotendPID_Menu() { + checkkey = Menu; + if (HotendPIDMenu == nullptr) HotendPIDMenu = new MenuClass(); + if (CurrentMenu != HotendPIDMenu) { + CurrentMenu = HotendPIDMenu; + CurrentMenu->MenuTitle.SetCaption(F("Hotend PID Settings")); + DWINUI::MenuItemsPrepare(8); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_PIDNozzle, F("Hotend PID"), onDrawMenuItem, HotendPID); + ADDMENUITEM_P(ICON_PIDValue, F(STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_hotend[0].pid.Kp); + ADDMENUITEM_P(ICON_PIDValue, F(STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_hotend[0].pid.Ki); + ADDMENUITEM_P(ICON_PIDValue, F(STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_hotend[0].pid.Kd); + ADDMENUITEM_P(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawPIntMenu, SetHotendPidT, &HMI_data.HotendPidT); + ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles); + TERN_(EEPROM_SETTINGS, ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom)); + } + CurrentMenu->Draw(); + } +#endif + +#if HAS_HEATED_BED + void Draw_BedPID_Menu() { + checkkey = Menu; + if (BedPIDMenu == nullptr) BedPIDMenu = new MenuClass(); + if (CurrentMenu != BedPIDMenu) { + CurrentMenu = BedPIDMenu; + CurrentMenu->MenuTitle.SetCaption(F("Bed PID Settings")); + DWINUI::MenuItemsPrepare(8); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_PIDNozzle, F("Bed PID"), onDrawMenuItem,BedPID); + ADDMENUITEM_P(ICON_PIDValue, F(STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_bed.pid.Kp); + ADDMENUITEM_P(ICON_PIDValue, F(STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_bed.pid.Ki); + ADDMENUITEM_P(ICON_PIDValue, F(STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_bed.pid.Kd); + ADDMENUITEM_P(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawPIntMenu, SetBedPidT, &HMI_data.BedPidT); + ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles); + TERN_(EEPROM_SETTINGS, ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom)); + } + CurrentMenu->Draw(); + } +#endif + +#if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void Draw_ZOffsetWiz_Menu() { + checkkey = Menu; + if (ZOffsetWizMenu == nullptr) ZOffsetWizMenu = new MenuClass(); + if (CurrentMenu != ZOffsetWizMenu) { + CurrentMenu = ZOffsetWizMenu; + CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_PROBE_WIZARD)); + DWINUI::MenuItemsPrepare(4); + ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_Prepare_Menu); + ADDMENUITEM(ICON_Homing, GET_TEXT(MSG_AUTO_HOME), onDrawMenuItem, AutoHome); + ADDMENUITEM(ICON_MoveZ0, F("Move Z to Home"), onDrawMenuItem, SetMoveZto0); + ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR); + } + CurrentMenu->Draw(); + } +#endif + + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.h b/Marlin/src/lcd/e3v2/enhanced/dwin.h new file mode 100644 index 000000000000..365ac9ed4b8a --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.h @@ -0,0 +1,268 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN by Creality3D + * Enhanced implementation by Miguel A. Risco-Castillo + */ + +#include "../../../inc/MarlinConfigPre.h" +#include "dwinui.h" +#include "rotary_encoder.h" +#include "../../../libs/BL24CXX.h" + +#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT + #define HAS_PREHEAT 1 + #if PREHEAT_COUNT < 2 + #error "Creality DWIN requires two material preheat presets." + #endif +#endif + +#if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) && DISABLED(PROBE_MANUALLY) + #define HAS_ONESTEP_LEVELING 1 +#endif + +#if !HAS_BED_PROBE && ENABLED(BABYSTEPPING) + #define JUST_BABYSTEP 1 +#endif + +#if ANY(BABYSTEPPING, HAS_BED_PROBE, HAS_WORKSPACE_OFFSET) + #define HAS_ZOFFSET_ITEM 1 +#endif + +static constexpr size_t eeprom_data_size = 64; + +enum processID : uint8_t { + // Process ID + MainMenu, + Menu, + SetInt, + SetPInt, + SetIntNoDraw, + SetFloat, + SetPFloat, + SelectFile, + PrintProcess, + PrintDone, + Info, + + // Popup Windows + Homing, + Leveling, + PauseOrStop, + FilamentPurge, + WaitResponse, + Locked, + NothingToDo, +}; + +enum pidresult_t : uint8_t { + PID_BAD_EXTRUDER_NUM, + PID_TEMP_TOO_HIGH, + PID_TUNING_TIMEOUT, + PID_EXTR_START, + PID_BED_START, + PID_DONE +}; + +// Picture ID +#define Start_Process 0 +#define Language_English 1 +#define Language_Chinese 2 + +#define DWIN_CHINESE 123 +#define DWIN_ENGLISH 0 + +typedef struct { + int8_t Color[3]; // Color components + int8_t Preheat = 0; // Material Select 0: PLA, 1: ABS, 2: Custom + AxisEnum axis = X_AXIS; // Axis Select + int32_t MaxValue = 0; // Auxiliar max integer/scaled float value + int32_t MinValue = 0; // Auxiliar min integer/scaled float value + int8_t dp = 0; // Auxiliar decimal places + int32_t Value = 0; // Auxiliar integer / scaled float value + int16_t *P_Int = nullptr; // Auxiliar pointer to 16 bit integer variable + float *P_Float = nullptr; // Auxiliar pointer to float variable + void (*Apply)() = nullptr; // Auxiliar apply function + void (*LiveUpdate)() = nullptr; // Auxiliar live update function +} HMI_value_t; + +typedef struct { + uint16_t Background_Color = Def_Background_Color; + uint16_t Cursor_color = Def_Cursor_color; + uint16_t TitleBg_color = Def_TitleBg_color; + uint16_t TitleTxt_color = Def_TitleTxt_color; + uint16_t Text_Color = Def_Text_Color; + uint16_t Selected_Color = Def_Selected_Color; + uint16_t SplitLine_Color = Def_SplitLine_Color; + uint16_t Highlight_Color = Def_Highlight_Color; + uint16_t StatusBg_Color = Def_StatusBg_Color; + uint16_t StatusTxt_Color = Def_StatusTxt_Color; + uint16_t PopupBg_color = Def_PopupBg_color; + uint16_t PopupTxt_Color = Def_PopupTxt_Color; + uint16_t AlertBg_Color = Def_AlertBg_Color; + uint16_t AlertTxt_Color = Def_AlertTxt_Color; + uint16_t PercentTxt_Color = Def_PercentTxt_Color; + uint16_t Barfill_Color = Def_Barfill_Color; + uint16_t Indicator_Color = Def_Indicator_Color; + uint16_t Coordinate_Color = Def_Coordinate_Color; + TERN_(HAS_HOTEND, int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND); + TERN_(HAS_HOTEND, int16_t PidCycles = 10); + #ifdef PREHEAT_1_TEMP_BED + int16_t BedPidT = PREHEAT_1_TEMP_BED; + #endif + TERN_(PREVENT_COLD_EXTRUSION, uint16_t ExtMinT = EXTRUDE_MINTEMP); +} HMI_data_t; + +typedef struct { + uint8_t language; + bool pause_flag:1; // printing is paused + bool pause_action:1; // flag a pause action + bool print_finish:1; // print was finished + bool select_flag:1; // Popup button selected + bool home_flag:1; // homing in course + bool heat_flag:1; // 0: heating done 1: during heating + bool lock_flag:1; // 0: lock called from AdvSet 1: lock called from Tune +} HMI_flag_t; + +extern HMI_value_t HMI_value; +extern HMI_flag_t HMI_flag; +extern HMI_data_t HMI_data; +extern uint8_t checkkey; +extern millis_t dwin_heat_time; + +// Popup windows +void DWIN_Popup_Confirm(uint8_t icon, const char * const msg1, const char * const msg2); +#if HAS_HOTEND || HAS_HEATED_BED + void DWIN_Popup_Temperature(const bool toohigh); +#endif +TERN_(HAS_HOTEND, void Popup_Window_ETempTooLow()); +void Popup_Window_Resume(); + +// SD Card +void HMI_SDCardInit(); +void HMI_SDCardUpdate(); + +// Main Process +//void Icon_print(); +//void Icon_control(); +//void Icon_leveling(bool value); + +// Other +void Goto_PrintProcess(); +void Goto_Main_Menu(); +void update_variable(); +void Draw_Select_Highlight(const bool sel); +void Draw_Status_Area(const bool with_update); // Status Area +void Draw_Main_Area(); // Redraw main area; +void DWIN_Redraw_screen(); // Redraw all screen elements +void HMI_StartFrame(const bool with_update); // Prepare the menu view +void HMI_MainMenu(); // Main process screen +void HMI_SelectFile(); // File page +void HMI_Printing(); // Print page +void HMI_ReturnScreen(); // Return to previous screen before popups +void ApplyExtMinT(); +void HMI_SetLanguageCache(); // Set the languaje image cache + +//void HMI_Leveling(); // Level the page +//void HMI_LevBedCorners(); // Tramming menu +//void HMI_Info(); // Information menu + + +void HMI_Init(); +void HMI_Popup(); +void HMI_SaveProcessID(const uint8_t id); +void HMI_AudioFeedback(const bool success=true); +void DWIN_Startup(); +void DWIN_Update(); +void EachMomentUpdate(); +void DWIN_HandleScreen(); +void DWIN_DrawStatusLine(const uint16_t color, const uint16_t bgcolor, const char *text); +void DWIN_StatusChanged(const char * const text); +void DWIN_StatusChanged_P(PGM_P const text); +void DWIN_StartHoming(); +void DWIN_CompletedHoming(); +TERN_(MESH_BED_LEVELING, void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const float zval)); +void DWIN_MeshLevelingStart(); +void DWIN_CompletedLeveling(); +void DWIN_PidTuning(pidresult_t result); +void DWIN_Print_Started(const bool sd = false); +void DWIN_Print_Finished(); +#if HAS_FILAMENT_SENSOR + void DWIN_FilamentRunout(const uint8_t extruder); +#endif +void DWIN_Progress_Update(); +void DWIN_Print_Header(const char *text); +void DWIN_SetColorDefaults(); +void DWIN_StoreSettings(char *buff); +void DWIN_LoadSettings(const char *buff); +void DWIN_SetDataDefaults(); +void DWIN_RebootScreen(); + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void Draw_Popup_FilamentPurge(); + void DWIN_Popup_FilamentPurge(); + void HMI_FilamentPurge(); +#endif + +// Utility and extensions +void HMI_LockScreen(); +void DWIN_LockScreen(const bool flag = true); + +// HMI user control functions +void HMI_Menu(); +void HMI_SetInt(); +void HMI_SetPInt(); +void HMI_SetIntNoDraw(); +void HMI_SetFloat(); +void HMI_SetPFloat(); + +// Menu drawing functions +void Draw_Control_Menu(); +void Draw_AdvancedSettings_Menu(); +void Draw_Prepare_Menu(); +void Draw_Move_Menu(); +void Draw_LevBedCorners_Menu(); +TERN_(HAS_HOME_OFFSET, void Draw_HomeOffset_Menu()); +TERN_(HAS_BED_PROBE, void Draw_ProbeSet_Menu()); +TERN_(HAS_FILAMENT_SENSOR, void Draw_FilSet_Menu()); +void Draw_SelectColors_Menu(); +void Draw_GetColor_Menu(); +void Draw_Tune_Menu(); +void Draw_Motion_Menu(); +TERN_(ADVANCED_PAUSE_FEATURE, void Draw_FilamentMan_Menu()); +TERN_(MESH_BED_LEVELING, void Draw_ManualMesh_Menu()); +#if HAS_HOTEND + void Draw_Preheat1_Menu(); + void Draw_Preheat2_Menu(); + void Draw_Preheat3_Menu(); +#endif +void Draw_Temperature_Menu(); +void Draw_MaxSpeed_Menu(); +void Draw_MaxAccel_Menu(); +TERN_(HAS_CLASSIC_JERK, void Draw_MaxJerk_Menu()); +void Draw_Steps_Menu(); +TERN_(HAS_HOTEND, void Draw_HotendPID_Menu()); +TERN_(HAS_HEATED_BED, void Draw_BedPID_Menu()); +#if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void Draw_ZOffsetWiz_Menu(); +#endif diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp new file mode 100644 index 000000000000..99ee74732e67 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp @@ -0,0 +1,564 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ + +/******************************************************************************** + * @file lcd/e3v2/enhanced/dwin_lcd.cpp + * @author LEO / Creality3D - Enhanced by Miguel A. Risco-Castillo + * @date 2021/08/29 + * @version 2.1.1 + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "../../../inc/MarlinConfig.h" + +#include "dwin_lcd.h" +#include // for memset + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +// Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail. +// Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters. +uint8_t DWIN_SendBuf[11 + DWIN_DataLength] = { 0xAA }; +uint8_t DWIN_BufTail[4] = { 0xCC, 0x33, 0xC3, 0x3C }; +uint8_t databuf[26] = { 0 }; +uint8_t receivedType; + +int recnum = 0; + +inline void DWIN_Byte(size_t &i, const uint16_t bval) { + DWIN_SendBuf[++i] = bval; +} + +inline void DWIN_Word(size_t &i, const uint16_t wval) { + DWIN_SendBuf[++i] = wval >> 8; + DWIN_SendBuf[++i] = wval & 0xFF; +} + +inline void DWIN_Long(size_t &i, const uint32_t lval) { + DWIN_SendBuf[++i] = (lval >> 24) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 16) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 8) & 0xFF; + DWIN_SendBuf[++i] = lval & 0xFF; +} + +inline void DWIN_String(size_t &i, const char * const string, uint16_t rlimit = 0xFFFF) { + if (!string) return; + const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, _MIN(strlen(string), rlimit)); + if (len == 0) return; + memcpy(&DWIN_SendBuf[i+1], string, len); + i += len; +} + +inline void DWIN_String(size_t &i, const __FlashStringHelper * string, uint16_t rlimit = 0xFFFF) { + if (!string) return; + const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, _MIN(rlimit, strlen_P((PGM_P)string))); // cast it to PGM_P, which is basically const char *, and measure it using the _P version of strlen. + if (len == 0) return; + memcpy(&DWIN_SendBuf[i+1], string, len); + i += len; +} + +// Send the data in the buffer and the packet end +inline void DWIN_Send(size_t &i) { + ++i; + LOOP_L_N(n, i) { LCD_SERIAL.write(DWIN_SendBuf[n]); delayMicroseconds(1); } + LOOP_L_N(n, 4) { LCD_SERIAL.write(DWIN_BufTail[n]); delayMicroseconds(1); } +} + +/*-------------------------------------- System variable function --------------------------------------*/ + +// Handshake (1: Success, 0: Fail) +bool DWIN_Handshake(void) { + #ifndef LCD_BAUDRATE + #define LCD_BAUDRATE 115200 + #endif + LCD_SERIAL.begin(LCD_BAUDRATE); + const millis_t serial_connect_timeout = millis() + 1000UL; + while (!LCD_SERIAL.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + + size_t i = 0; + DWIN_Byte(i, 0x00); + DWIN_Send(i); + + while (LCD_SERIAL.available() > 0 && recnum < (signed)sizeof(databuf)) { + databuf[recnum] = LCD_SERIAL.read(); + // ignore the invalid data + if (databuf[0] != FHONE) { // prevent the program from running. + if (recnum > 0) { + recnum = 0; + ZERO(databuf); + } + continue; + } + delay(10); + recnum++; + } + + return ( recnum >= 3 + && databuf[0] == FHONE + && databuf[1] == '\0' + && databuf[2] == 'O' + && databuf[3] == 'K' ); +} + +// Set screen display direction +// dir: 0=0°, 1=90°, 2=180°, 3=270° +void DWIN_Frame_SetDir(uint8_t dir) { + size_t i = 0; + DWIN_Byte(i, 0x34); + DWIN_Byte(i, 0x5A); + DWIN_Byte(i, 0xA5); + DWIN_Byte(i, dir); + DWIN_Send(i); +} + +// Update display +void DWIN_UpdateLCD(void) { + size_t i = 0; + DWIN_Byte(i, 0x3D); + DWIN_Send(i); +} + +/*---------------------------------------- Drawing functions ----------------------------------------*/ + +// Clear screen +// color: Clear screen color +void DWIN_Frame_Clear(const uint16_t color) { + size_t i = 0; + DWIN_Byte(i, 0x01); + DWIN_Word(i, color); + DWIN_Send(i); +} + +// Draw a point +// color: point color +// width: point width 0x01-0x0F +// height: point height 0x01-0x0F +// x,y: upper left point +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x02); + DWIN_Word(i, color); + DWIN_Byte(i, width); + DWIN_Byte(i, height); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Draw a line +// color: Line segment color +// xStart/yStart: Start point +// xEnd/yEnd: End point +void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x03); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +// Draw a rectangle +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xEnd/yEnd: lower right point +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, + uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x05); + DWIN_Byte(i, mode); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +// Move a screen area +// mode: 0, circle shift; 1, translation +// dir: 0=left, 1=right, 2=up, 3=down +// dis: Distance +// color: Fill color +// xStart/yStart: upper left point +// xEnd/yEnd: bottom right point +void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, + uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { + size_t i = 0; + DWIN_Byte(i, 0x09); + DWIN_Byte(i, (mode << 7) | dir); + DWIN_Word(i, dis); + DWIN_Word(i, color); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Send(i); +} + +/*---------------------------------------- Text related functions ----------------------------------------*/ + +// Draw a string +// widthAdjust: true=self-adjust character width; false=no adjustment +// bShow: true=display background color; false=don't display background color +// size: Font size +// color: Character color +// bColor: Background color +// x/y: Upper-left coordinate of the string +// *string: The string +// rlimit: For draw less chars than string length use rlimit +void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit) { + size_t i = 0; + DWIN_Byte(i, 0x11); + // Bit 7: widthAdjust + // Bit 6: bShow + // Bit 5-4: Unused (0) + // Bit 3-0: size + DWIN_Byte(i, (widthAdjust * 0x80) | (bShow * 0x40) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_String(i, string, rlimit); + DWIN_Send(i); +} + +// Draw a positive integer +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of digits +// x/y: Upper-left coordinate +// value: Integer value +void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + size_t i = 0; + DWIN_Byte(i, 0x14); + // Bit 7: bshow + // Bit 6: 1 = signed; 0 = unsigned number; + // Bit 5: zeroFill + // Bit 4: zeroMode + // Bit 3-0: size + DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Byte(i, iNum); + DWIN_Byte(i, 0); // fNum + DWIN_Word(i, x); + DWIN_Word(i, y); + #if 0 + for (char count = 0; count < 8; count++) { + DWIN_Byte(i, value); + value >>= 8; + if (!(value & 0xFF)) break; + } + #else + // Write a big-endian 64 bit integer + const size_t p = i + 1; + for (char count = 8; count--;) { // 7..0 + ++i; + DWIN_SendBuf[p + count] = value; + value >>= 8; + } + #endif + + DWIN_Send(i); +} + +// Draw a positive floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Scaled positive float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + size_t i = 0; + DWIN_Byte(i, 0x14); + DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size); + DWIN_Word(i, color); + DWIN_Word(i, bColor); + DWIN_Byte(i, iNum); + DWIN_Byte(i, fNum); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Long(i, value); + DWIN_Send(i); +} + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Display QR code +// The size of the QR code is (46*QR_Pixel)*(46*QR_Pixel) dot matrix +// QR_Pixel: The pixel size occupied by each point of the QR code: 0x01-0x0F (1-16) +// (Nx, Ny): The coordinates of the upper left corner displayed by the QR code +// str: multi-bit data +void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, char *string) { + size_t i = 0; + DWIN_Byte(i, 0x21); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Byte(i, QR_Pixel); + DWIN_String(i, string); + DWIN_Send(i); +} + +// Draw JPG and cached in #0 virtual display area +// id: Picture ID +void DWIN_JPG_ShowAndCache(const uint8_t id) { + size_t i = 0; + DWIN_Word(i, 0x2200); + DWIN_Byte(i, id); + DWIN_Send(i); +} + +// Draw an Icon +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t IBD, uint8_t BIR, uint8_t BFI, uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x23); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Byte(i, IBD%2<<7 | BIR%2<<6 | BFI%2<<5 | libID); + DWIN_Byte(i, picID); + DWIN_Send(i); +} + +// Draw an Icon from SRAM +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// x/y: Upper-left point +// addr: SRAM address +void DWIN_ICON_Show(uint8_t IBD, uint8_t BIR, uint8_t BFI, uint16_t x, uint16_t y, uint16_t addr) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x24); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Byte(i, IBD%2<<7 | BIR%2<<6 | BFI%2<<5 | 0x00); + DWIN_Word(i, addr); + DWIN_Send(i); +} + +// Unzip the JPG picture to a virtual display area +// n: Cache index +// id: Picture ID +void DWIN_JPG_CacheToN(uint8_t n, uint8_t id) { + size_t i = 0; + DWIN_Byte(i, 0x25); + DWIN_Byte(i, n); + DWIN_Byte(i, id); + DWIN_Send(i); +} + +// Copy area from current virtual display area to current screen +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x26); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Copy area from virtual display area to current screen +// IBD: background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t IBD, uint8_t BIR, uint8_t BFI, uint8_t cacheID, uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x27); + DWIN_Byte(i, IBD%2<<7 | BIR%2<<6 | BFI%2<<5 | cacheID); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Animate a series of icons +// animID: Animation ID; 0x00-0x0F +// animate: true on; false off; +// libID: Icon library ID +// picIDs: Icon starting ID +// picIDe: Icon ending ID +// x/y: Upper-left point +// interval: Display time interval, unit 10mS +void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x28); + DWIN_Word(i, x); + DWIN_Word(i, y); + // Bit 7: animation on or off + // Bit 6: start from begin or end + // Bit 5-4: unused (0) + // Bit 3-0: animID + DWIN_Byte(i, (animate * 0x80) | 0x40 | animID); + DWIN_Byte(i, libID); + DWIN_Byte(i, picIDs); + DWIN_Byte(i, picIDe); + DWIN_Byte(i, interval); + DWIN_Send(i); +} + +// Animation Control +// state: 16 bits, each bit is the state of an animation id +void DWIN_ICON_AnimationControl(uint16_t state) { + size_t i = 0; + DWIN_Byte(i, 0x29); + DWIN_Word(i, state); + DWIN_Send(i); +} + +// Set LCD Brightness 0x00-0xFF +void DWIN_LCD_Brightness(const uint8_t brightness) { + size_t i = 0; + DWIN_Byte(i, 0x30); + DWIN_Byte(i, brightness); + DWIN_Send(i); +} + +// Write buffer data to the SRAM or Flash +// mem: 0x5A=32KB SRAM, 0xA5=16KB Flash +// addr: start address +// length: Bytes to write +// data: address of the buffer with data +void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data) { + const uint8_t max_size = 128; + uint16_t pending = length; + uint16_t to_send; + uint16_t indx; + uint8_t block = 0; + + while (pending > 0) { + indx = block * max_size; + to_send = _MIN(pending, max_size); + size_t i = 0; + DWIN_Byte(i, 0x31); + DWIN_Byte(i, mem); + DWIN_Word(i, addr + indx); // start address of the data block + ++i; + LOOP_L_N(j, i) { LCD_SERIAL.write(DWIN_SendBuf[j]); delayMicroseconds(1); } // Buf header + for (uint16_t j = indx; j <= indx + to_send - 1; j++) LCD_SERIAL.write(*(data + j)); delayMicroseconds(1); // write block of data + LOOP_L_N(j, 4) { LCD_SERIAL.write(DWIN_BufTail[j]); delayMicroseconds(1); } + block++; + pending -= to_send; + } +} + +// Write the contents of the 32KB SRAM data memory into the designated image memory space. +// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes +void DWIN_SRAMToPic(uint8_t picID) { + size_t i = 0; + DWIN_Byte(i, 0x33); + DWIN_Byte(i, 0x5A); + DWIN_Byte(i, 0xA5); + DWIN_Byte(i, picID); + DWIN_Send(i); +} + +//--------------------------Test area ------------------------- + +// void DWIN_ReadSRAM(uint16_t addr, uint8_t length, const char * const data) { +// size_t i = 0; +// DWIN_Byte(i, 0x32); +// DWIN_Byte(i, 0x5A); // 0x5A Read from SRAM - 0xA5 Read from Flash +// DWIN_Word(i, addr); // 0x0000 to 0x7FFF +// const size_t len = _MIN(0xF0, length); +// DWIN_Byte(i, len); +// DWIN_Send(i); +// } + +/*---------------------------------------- Memory functions ----------------------------------------*/ +// The LCD has an additional 32KB SRAM and 16KB Flash + +// Data can be written to the sram and save to one of the jpeg page files + +// Write Data Memory +// command 0x31 +// Type: Write memory selection; 0x5A=SRAM; 0xA5=Flash +// Address: Write data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash +// Data: data +// +// Flash writing returns 0xA5 0x4F 0x4B + +// Read Data Memory +// command 0x32 +// Type: Read memory selection; 0x5A=SRAM; 0xA5=Flash +// Address: Read data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash +// Length: leangth of data to read; 0x01-0xF0 +// +// Response: +// Type, Address, Length, Data + +// Write Picture Memory +// Write the contents of the 32KB SRAM data memory into the designated image memory space +// Issued: 0x5A, 0xA5, PIC_ID +// Response: 0xA5 0x4F 0x4B +// +// command 0x33 +// 0x5A, 0xA5 +// PicId: Picture Memory location, 0x00-0x0F +// +// Flash writing returns 0xA5 0x4F 0x4B + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h new file mode 100644 index 000000000000..71e66301b4b5 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h @@ -0,0 +1,282 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ + +/******************************************************************************** + * @file lcd/e3v2/enhanced/dwin_lcd.h + * @author LEO / Creality3D - Enhanced by Miguel A. Risco-Castillo + * @date 2021/08/29 + * @version 2.1.1 + * @brief DWIN screen control functions + ********************************************************************************/ + +#pragma once + +#include + +#define RECEIVED_NO_DATA 0x00 +#define RECEIVED_SHAKE_HAND_ACK 0x01 + +#define FHONE 0xAA + +#define DWIN_SCROLL_UP 2 +#define DWIN_SCROLL_DOWN 3 + +#define DWIN_WIDTH 272 +#define DWIN_HEIGHT 480 + +#define DWIN_DataLength (DWIN_WIDTH / 6 * 2) + +/*-------------------------------------- System variable function --------------------------------------*/ + +// Handshake (1: Success, 0: Fail) +bool DWIN_Handshake(void); + +// Set the backlight luminance +// luminance: (0x00-0xFF) +void DWIN_Backlight_SetLuminance(const uint8_t luminance); + +// Set screen display direction +// dir: 0=0°, 1=90°, 2=180°, 3=270° +void DWIN_Frame_SetDir(uint8_t dir); + +// Update display +void DWIN_UpdateLCD(void); + +/*---------------------------------------- Drawing functions ----------------------------------------*/ + +// Clear screen +// color: Clear screen color +void DWIN_Frame_Clear(const uint16_t color); + +// Draw a point +// color: point color +// width: point width 0x01-0x0F +// height: point height 0x01-0x0F +// x,y: upper left point +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y); + +// Draw a line +// color: Line segment color +// xStart/yStart: Start point +// xEnd/yEnd: End point +void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +// Draw a Horizontal line +// color: Line segment color +// xStart/yStart: Start point +// xLength: Line Length +inline void DWIN_Draw_HLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xLength) { + DWIN_Draw_Line(color, xStart, yStart, xStart + xLength - 1, yStart); +} + +// Draw a Vertical line +// color: Line segment color +// xStart/yStart: Start point +// yLength: Line Length +inline void DWIN_Draw_VLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t yLength) { + DWIN_Draw_Line(color, xStart, yStart, xStart, yStart + yLength - 1); +} + +// Draw a rectangle +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xEnd/yEnd: lower right point +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +// Draw a box +// mode: 0=frame, 1=fill, 2=XOR fill +// color: Rectangle color +// xStart/yStart: upper left point +// xSize/ySize: box size +inline void DWIN_Draw_Box(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xSize, uint16_t ySize) { + DWIN_Draw_Rectangle(mode, color, xStart, yStart, xStart + xSize - 1, yStart + ySize - 1); +} + +// Move a screen area +// mode: 0, circle shift; 1, translation +// dir: 0=left, 1=right, 2=up, 3=down +// dis: Distance +// color: Fill color +// xStart/yStart: upper left point +// xEnd/yEnd: bottom right point +void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, + uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + +/*---------------------------------------- Text related functions ----------------------------------------*/ + +// Draw a string +// widthAdjust: true=self-adjust character width; false=no adjustment +// bShow: true=display background color; false=don't display background color +// size: Font size +// color: Character color +// bColor: Background color +// x/y: Upper-left coordinate of the string +// *string: The string +// rlimit: For draw less chars than string length use rlimit +void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit = 0xFFFF); +inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit = 0xFFFF) { + DWIN_Draw_String(0, bShow, size, color, bColor, x, y, string, rlimit); +} + +class __FlashStringHelper; + +inline void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(widthAdjust, bShow, size, color, bColor, x, y, (char *)title); +} +inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(0, bShow, size, color, bColor, x, y, (char *)title); +} + +// Draw a positive integer +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of digits +// x/y: Upper-left coordinate +// value: Integer value +void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value); + +// Draw a positive floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// color: Character color +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Scaled positive float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Display QR code +// The size of the QR code is (46*QR_Pixel)*(46*QR_Pixel) dot matrix +// QR_Pixel: The pixel size occupied by each point of the QR code: 0x01-0x0F (1-16) +// (Nx, Ny): The coordinates of the upper left corner displayed by the QR code +// str: multi-bit data +void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, char *string); + +inline void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_QR(QR_Pixel, x, y, (char *)title); +} + +// Draw JPG and cached in #0 virtual display area +// id: Picture ID +void DWIN_JPG_ShowAndCache(const uint8_t id); + +// Draw an Icon +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t IBD, uint8_t BIR, uint8_t BFI, uint8_t libID, uint8_t picID, uint16_t x, uint16_t y); + +// Draw an Icon with transparent background +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +inline void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + DWIN_ICON_Show(0, 0, 1, libID, picID, x, y); +} + +// Draw an Icon from SRAM +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// x/y: Upper-left point +// addr: SRAM address +void DWIN_ICON_Show(uint8_t IBD, uint8_t BIR, uint8_t BFI, uint16_t x, uint16_t y, uint16_t addr); + +// Unzip the JPG picture to a virtual display area +// n: Cache index +// id: Picture ID +void DWIN_JPG_CacheToN(uint8_t n, uint8_t id); + +// Unzip the JPG picture to virtual display area #1 +// id: Picture ID +inline void DWIN_JPG_CacheTo1(uint8_t id) { DWIN_JPG_CacheToN(1, id); } + +// Copy area from current virtual display area to current screen +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Copy area from virtual display area to current screen +// IBD: background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t IBD, uint8_t BIR, uint8_t BFI, uint8_t cacheID, uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Copy area from virtual display area to current screen with transparent background +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +inline void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, + uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + DWIN_Frame_AreaCopy(0, 0, 1, cacheID, xStart, yStart, xEnd, yEnd, x, y); +} + +// Animate a series of icons +// animID: Animation ID up to 16 +// animate: animation on or off +// libID: Icon library ID +// picIDs: Icon starting ID +// picIDe: Icon ending ID +// x/y: Upper-left point +// interval: Display time interval, unit 10mS +void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, + uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval); + +// Animation Control +// state: 16 bits, each bit is the state of an animation id +void DWIN_ICON_AnimationControl(uint16_t state); + +// Set LCD Brightness 0x00-0x0F +void DWIN_LCD_Brightness(const uint8_t brightness); + +// Write buffer data to the SRAM or Flash +// mem: 0x5A=32KB SRAM, 0xA5=16KB Flash +// addr: start address +// length: Bytes to write +// data: address of the buffer with data +void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data); + +// Write the contents of the 32KB SRAM data memory into the designated image memory space. +// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes +void DWIN_SRAMToPic(uint8_t picID); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp new file mode 100644 index 000000000000..db082421839e --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp @@ -0,0 +1,452 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "../../../inc/MarlinConfig.h" +#include "../../../core/macros.h" +#include "dwin_lcd.h" +#include "dwinui.h" + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +uint8_t MenuItemTotal = 0; +uint8_t MenuItemCount = 0; +MenuItemClass** MenuItems = nullptr; +MenuClass *CurrentMenu = nullptr; +MenuClass *PreviousMenu = nullptr; + +xy_int_t DWINUI::cursor = { 0 }; +uint16_t DWINUI::pencolor = Color_White; +uint16_t DWINUI::textcolor = Def_Text_Color; +uint16_t DWINUI::backcolor = Def_Background_Color; +uint8_t DWINUI::font = font8x16; + +void (*DWINUI::onCursorErase)(uint8_t line)=nullptr; +void (*DWINUI::onCursorDraw)(uint8_t line)=nullptr; +void (*DWINUI::onTitleDraw)(TitleClass* title)=nullptr; +void (*DWINUI::onMenuDraw)(MenuClass* menu)=nullptr; + +void DWINUI::Init(void) { + DEBUG_ECHOPGM("\r\nDWIN handshake "); + delay(750); // Delay here or init later in the boot process + const bool success = DWIN_Handshake(); + if (success) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error."); + DWIN_Frame_SetDir(1); + TERN(SHOW_BOOTSCREEN,,DWIN_Frame_Clear(Color_Bg_Black)); + DWIN_UpdateLCD(); + cursor.x = 0; + cursor.y = 0; + pencolor = Color_White; + textcolor = Def_Text_Color; + backcolor = Def_Background_Color; + font = font8x16; +} + +// Set text/number font +void DWINUI::SetFont(uint8_t cfont) { + font = cfont; +} + +// Get font character width +uint8_t DWINUI::Get_font_width(uint8_t cfont) { + switch (cfont) { + case font6x12 : return 6; + case font8x16 : return 8; + case font10x20: return 10; + case font12x24: return 12; + case font14x28: return 14; + case font16x32: return 16; + case font20x40: return 20; + case font24x48: return 24; + case font28x56: return 28; + case font32x64: return 32; + default: return 0; + } +} + +// Get font character heigh +uint8_t DWINUI::Get_font_height(uint8_t cfont) { + switch (cfont) { + case font6x12 : return 12; + case font8x16 : return 16; + case font10x20: return 20; + case font12x24: return 24; + case font14x28: return 28; + case font16x32: return 32; + case font20x40: return 40; + case font24x48: return 48; + case font28x56: return 56; + case font32x64: return 64; + default: return 0; + } +} + +// Get screen x coodinates from text column +uint16_t DWINUI::ColToX(uint8_t col) { + return col * Get_font_width(font); +} + +// Get screen y coodinates from text row +uint16_t DWINUI::RowToY(uint8_t row) { + return row * Get_font_height(font); +} + +// Set text/number color +void DWINUI::SetColors(uint16_t fgcolor, uint16_t bgcolor) { + textcolor = fgcolor; + backcolor = bgcolor; +} +void DWINUI::SetTextColor(uint16_t fgcolor) { + textcolor = fgcolor; +} +void DWINUI::SetBackgroundColor(uint16_t bgcolor) { + backcolor = bgcolor; +} + +// Moves cursor to point +// x: abscissa of the display +// y: ordinate of the display +// point: xy coordinate +void DWINUI::MoveTo(int16_t x, int16_t y) { + cursor.x = x; + cursor.y = y; +} +void DWINUI::MoveTo(xy_int_t point) { + cursor = point; +} + +// Moves cursor relative to the actual position +// x: abscissa of the display +// y: ordinate of the display +// point: xy coordinate +void DWINUI::MoveBy(int16_t x, int16_t y) { + cursor.x += x; + cursor.y += y; +} +void DWINUI::MoveBy(xy_int_t point) { + cursor += point; +} + +// Draw a Centered string using DWIN_WIDTH +void DWINUI::Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const char * const string) { + const int8_t x = _MAX(0U, DWIN_WIDTH - strlen_P(string) * Get_font_width(size)) / 2 - 1; + DWIN_Draw_String(bShow, size, color, bColor, x, y, string); +} + +// Draw a char at cursor position +void DWINUI::Draw_Char(const char c) { + const char string[2] = { c, 0}; + DWIN_Draw_String(false, font, textcolor, backcolor, cursor.x, cursor.y, string, 1); + MoveBy(Get_font_width(font), 0); +} + +// Draw a string at cursor position +// color: Character color +// *string: The string +// rlimit: For draw less chars than string length use rlimit +void DWINUI::Draw_String(const char * const string, uint16_t rlimit) { + DWIN_Draw_String(false, font, textcolor, backcolor, cursor.x, cursor.y, string, rlimit); + MoveBy(strlen(string) * Get_font_width(font), 0); +} +void DWINUI::Draw_String(uint16_t color, const char * const string, uint16_t rlimit) { + DWIN_Draw_String(false, font, color, backcolor, cursor.x, cursor.y, string, rlimit); + MoveBy(strlen(string) * Get_font_width(font), 0); +} + +// Draw a signed floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Float value +void DWINUI::Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + if (value < 0) { + DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, -value); + DWIN_Draw_String(bShow, size, color, bColor, x - 6, y, F("-")); + } + else { + DWIN_Draw_String(bShow, size, color, bColor, x - 6, y, F(" ")); + DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, value); + } +} + +// Draw a circle +// color: circle color +// x: the abscissa of the center of the circle +// y: ordinate of the center of the circle +// r: circle radius +void DWINUI::Draw_Circle(uint16_t color, uint16_t x, uint16_t y, uint8_t r) { + int a = 0, b = 0; + while (a <= b) { + b = SQRT(sq(r) - sq(a)); + if (a == 0) b--; + DWIN_Draw_Point(color, 1, 1, x + a, y + b); // Draw some sector 1 + DWIN_Draw_Point(color, 1, 1, x + b, y + a); // Draw some sector 2 + DWIN_Draw_Point(color, 1, 1, x + b, y - a); // Draw some sector 3 + DWIN_Draw_Point(color, 1, 1, x + a, y - b); // Draw some sector 4 + DWIN_Draw_Point(color, 1, 1, x - a, y - b); // Draw some sector 5 + DWIN_Draw_Point(color, 1, 1, x - b, y - a); // Draw some sector 6 + DWIN_Draw_Point(color, 1, 1, x - b, y + a); // Draw some sector 7 + DWIN_Draw_Point(color, 1, 1, x - a, y + b); // Draw some sector 8 + a++; + } +} + +// Draw a circle filled with color +// bcolor: fill color +// x: the abscissa of the center of the circle +// y: ordinate of the center of the circle +// r: circle radius +void DWINUI::Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r) { + int a = 0, b = 0; + while (a <= b) { + b = SQRT(sq(r) - sq(a)); // b=sqrt(r*r-a*a); + if (a == 0) b--; + DWIN_Draw_Line(bcolor, x-b,y-a,x+b,y-a); + DWIN_Draw_Line(bcolor, x-a,y-b,x+a,y-b); + DWIN_Draw_Line(bcolor, x-b,y+a,x+b,y+a); + DWIN_Draw_Line(bcolor, x-a,y+b,x+a,y+b); + a++; + } +} + +// Color Interpolator +// val : Interpolator minv..maxv +// minv : Minimum value +// maxv : Maximun value +// color1 : Start color +// color2 : End color +uint16_t DWINUI::ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2) { + uint8_t B,G,R; + float n; + n = (float)(val-minv)/(maxv-minv); + R = (1-n)*GetRColor(color1) + n*GetRColor(color2); + G = (1-n)*GetGColor(color1) + n*GetGColor(color2); + B = (1-n)*GetBColor(color1) + n*GetBColor(color2); + return RGB(R,G,B); +} + +// Color Interpolator through Red->Yellow->Green->Blue +// val : Interpolator minv..maxv +// minv : Minimum value +// maxv : Maximun value +uint16_t DWINUI::RainbowInt(int16_t val, int16_t minv, int16_t maxv) { + uint8_t B,G,R; + const uint8_t maxB = 28; + const uint8_t maxR = 28; + const uint8_t maxG = 38; + const int16_t limv = _MAX(abs(minv), abs(maxv)); + float n; + if (minv>=0) { + n = (float)(val-minv)/(maxv-minv); + } else { + n = (float)val/limv; + } + n = _MIN(1, n); + n = _MAX(-1, n); + if (n < 0) { + R = 0; + G = (1+n)*maxG; + B = (-n)*maxB; + } else if (n < 0.5) { + R = maxR*n*2; + G = maxG; + B = 0; + } else { + R = maxR; + G = maxG*(1-n); + B = 0; + } + return RGB(R,G,B); +} + +// Draw a checkbox +// Color: frame color +// bColor: Background color +// x/y: Upper-left point +// mode : 0 : unchecked, 1 : checked +void DWINUI::Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool checked=false) { + DWIN_Draw_String(false, true, font8x16, color, bcolor, x + 4, y, checked ? F("x") : F(" ")); + DWIN_Draw_Rectangle(0, color, x + 2, y + 2, x + 17, y + 17); +} + +// Clear Menu by filling the menu area with background color +void DWINUI::ClearMenuArea() { + DWIN_Draw_Rectangle(1, backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1); +} + +void DWINUI::MenuItemsClear() { + if (MenuItems == nullptr) return; + for (uint8_t i = 0; i < MenuItemCount; i++) delete MenuItems[i]; + delete[] MenuItems; + MenuItems = nullptr; + MenuItemCount = 0; + MenuItemTotal = 0; +} + +void DWINUI::MenuItemsPrepare(uint8_t totalitems) { + MenuItemsClear(); + MenuItemTotal = totalitems; + MenuItems = new MenuItemClass*[totalitems]; +} + +MenuItemClass* DWINUI::MenuItemsAdd(MenuItemClass* menuitem) { + if (MenuItemCount < MenuItemTotal) { + MenuItems[MenuItemCount] = menuitem; + menuitem->pos = MenuItemCount++; + return menuitem; + } + else { + delete menuitem; + return nullptr; + } +} + +/* Title Class ==============================================================*/ + +TitleClass Title; + +void TitleClass::Draw() { + if (DWINUI::onTitleDraw != nullptr) (*DWINUI::onTitleDraw)(this); +} + +void TitleClass::SetCaption(const char * const title) { + frameid = 0; + if ( caption == title ) return; + const uint8_t len = _MIN(sizeof(caption) - 1, strlen(title)); + memcpy(&caption[0], title, len); + caption[len] = '\0'; +} + +void TitleClass::ShowCaption(const char * const title) { + SetCaption(title); + Draw(); +} + +void TitleClass::SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { + caption[0] = '\0'; + frameid = id; + frame = { x1, y1, x2, y2 }; +} + +void TitleClass::SetFrame(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { + SetFrame(1, x, y, x + w - 1, y + h - 1); +} + +void TitleClass::FrameCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { + SetFrame(id, x1, y1, x2, y2); + Draw(); +} + +void TitleClass::FrameCopy(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { + FrameCopy(1, x, y, x + w - 1, y + h - 1); +} + +/* Menu Class ===============================================================*/ + +MenuClass::MenuClass() { + selected = 0; + topline = 0; +} + +void MenuClass::Draw() { + MenuTitle.Draw(); + if (DWINUI::onMenuDraw != nullptr) (*DWINUI::onMenuDraw)(this); + for (uint8_t i = 0; i < MenuItemCount; i++) + MenuItems[i]->Draw(i - topline); + if (DWINUI::onCursorDraw != nullptr) DWINUI::onCursorDraw(line()); + DWIN_UpdateLCD(); +} + +void MenuClass::onScroll(bool dir) { + int8_t sel = selected; + if (dir) sel++; else sel--; + LIMIT(sel, 0, MenuItemCount - 1); + if (sel != selected) { + if (DWINUI::onCursorErase != nullptr) DWINUI::onCursorErase(line()); + if ((sel - topline) == TROWS) { + DWIN_Frame_AreaMove(1, DWIN_SCROLL_UP, MLINE, DWINUI::backcolor, 0, TITLE_HEIGHT + 1, DWIN_WIDTH, STATUS_Y - 1); + topline++; + MenuItems[sel]->Draw(TROWS - 1); + } + if ((sel < topline)) { + DWIN_Frame_AreaMove(1, DWIN_SCROLL_DOWN, MLINE, DWINUI::backcolor, 0, TITLE_HEIGHT + 1, DWIN_WIDTH, STATUS_Y - 1); + topline--; + MenuItems[sel]->Draw(0); + } + selected = sel; + if (DWINUI::onCursorDraw != nullptr) DWINUI::onCursorDraw(line()); + DWIN_UpdateLCD(); + } +} + +void MenuClass::onClick() { + if (MenuItems[selected]->onClick != nullptr) (*MenuItems[selected]->onClick)(); +} + +MenuItemClass *MenuClass::SelectedItem() { + return MenuItems[selected]; +} + +/* MenuItem Class ===========================================================*/ + +MenuItemClass::MenuItemClass(uint8_t cicon, const char * const text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)()) { + icon = cicon; + onClick = onclick; + onDraw = ondraw; + const uint8_t len = _MIN(sizeof(caption) - 1, strlen(text)); + memcpy(&caption[0], text, len); + caption[len] = '\0'; +} + +MenuItemClass::MenuItemClass(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)()) { + icon = cicon; + onClick = onclick; + onDraw = ondraw; + caption[0] = '\0'; + frameid = id; + frame = { x1, y1, x2, y2 }; +} + +void MenuItemClass::SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { + caption[0] = '\0'; + frameid = id; + frame = { x1, y1, x2, y2 }; +} + +void MenuItemClass::Draw(int8_t line) { + if (line < 0 || line >= TROWS) return; + if (onDraw != nullptr) (*onDraw)(this, line); +}; + +MenuItemPtrClass::MenuItemPtrClass(uint8_t cicon, const char * const text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val) : MenuItemClass(cicon, text, ondraw, onclick) { + value = val; +}; + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.h b/Marlin/src/lcd/e3v2/enhanced/dwinui.h new file mode 100644 index 000000000000..0aec187049c6 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.h @@ -0,0 +1,623 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../core/types.h" +#include "dwin_lcd.h" + +// ICON ID +#define ICON 7 // Icon set file 7.ICO + +#define ICON_LOGO 0 +#define ICON_Print_0 1 +#define ICON_Print_1 2 +#define ICON_Prepare_0 3 +#define ICON_Prepare_1 4 +#define ICON_Control_0 5 +#define ICON_Control_1 6 +#define ICON_Leveling_0 7 +#define ICON_Leveling_1 8 +#define ICON_HotendTemp 9 +#define ICON_BedTemp 10 +#define ICON_Speed 11 +#define ICON_Zoffset 12 +#define ICON_Back 13 +#define ICON_File 14 +#define ICON_PrintTime 15 +#define ICON_RemainTime 16 +#define ICON_Setup_0 17 +#define ICON_Setup_1 18 +#define ICON_Pause_0 19 +#define ICON_Pause_1 20 +#define ICON_Continue_0 21 +#define ICON_Continue_1 22 +#define ICON_Stop_0 23 +#define ICON_Stop_1 24 +#define ICON_Bar 25 +#define ICON_More 26 + +#define ICON_Axis 27 +#define ICON_CloseMotor 28 +#define ICON_Homing 29 +#define ICON_SetHome 30 +#define ICON_PLAPreheat 31 +#define ICON_ABSPreheat 32 +#define ICON_Cool 33 +#define ICON_Language 34 + +#define ICON_MoveX 35 +#define ICON_MoveY 36 +#define ICON_MoveZ 37 +#define ICON_Extruder 38 + +#define ICON_Temperature 40 +#define ICON_Motion 41 +#define ICON_WriteEEPROM 42 +#define ICON_ReadEEPROM 43 +#define ICON_ResumeEEPROM 44 +#define ICON_Info 45 + +#define ICON_SetEndTemp 46 +#define ICON_SetBedTemp 47 +#define ICON_FanSpeed 48 +#define ICON_SetPLAPreheat 49 +#define ICON_SetABSPreheat 50 + +#define ICON_MaxSpeed 51 +#define ICON_MaxAccelerated 52 +#define ICON_MaxJerk 53 +#define ICON_Step 54 +#define ICON_PrintSize 55 +#define ICON_Version 56 +#define ICON_Contact 57 +#define ICON_StockConfiguration 58 +#define ICON_MaxSpeedX 59 +#define ICON_MaxSpeedY 60 +#define ICON_MaxSpeedZ 61 +#define ICON_MaxSpeedE 62 +#define ICON_MaxAccX 63 +#define ICON_MaxAccY 64 +#define ICON_MaxAccZ 65 +#define ICON_MaxAccE 66 +#define ICON_MaxSpeedJerkX 67 +#define ICON_MaxSpeedJerkY 68 +#define ICON_MaxSpeedJerkZ 69 +#define ICON_MaxSpeedJerkE 70 +#define ICON_StepX 71 +#define ICON_StepY 72 +#define ICON_StepZ 73 +#define ICON_StepE 74 +#define ICON_Setspeed 75 +#define ICON_SetZOffset 76 +#define ICON_Rectangle 77 +#define ICON_BLTouch 78 +#define ICON_TempTooLow 79 +#define ICON_AutoLeveling 80 +#define ICON_TempTooHigh 81 +#define ICON_NoTips_C 82 +#define ICON_NoTips_E 83 +#define ICON_Continue_C 84 +#define ICON_Continue_E 85 +#define ICON_Cancel_C 86 +#define ICON_Cancel_E 87 +#define ICON_Confirm_C 88 +#define ICON_Confirm_E 89 +#define ICON_Info_0 90 +#define ICON_Info_1 91 + +// Extra Icons +#define ICON_AdvSet ICON_Language +#define ICON_Brightness ICON_Motion +#define ICON_Cancel ICON_StockConfiguration +#define ICON_CustomPreheat ICON_SetEndTemp +#define ICON_Error ICON_TempTooHigh +#define ICON_ExtrudeMinT ICON_HotendTemp +#define ICON_FilLoad ICON_WriteEEPROM +#define ICON_FilMan ICON_ResumeEEPROM +#define ICON_FilSet ICON_ResumeEEPROM +#define ICON_FilUnload ICON_ReadEEPROM +#define ICON_Flow ICON_StepE +#define ICON_HomeOffset ICON_AdvSet +#define ICON_HomeOffsetX ICON_StepX +#define ICON_HomeOffsetY ICON_StepY +#define ICON_HomeOffsetZ ICON_StepZ +#define ICON_LevBed ICON_SetEndTemp +#define ICON_Lock ICON_Cool +#define ICON_ManualMesh ICON_HotendTemp +#define ICON_MeshNext ICON_Axis +#define ICON_MeshSave ICON_WriteEEPROM +#define ICON_MoveZ0 ICON_HotendTemp +#define ICON_Park ICON_Motion +#define ICON_PIDbed ICON_SetBedTemp +#define ICON_PIDcycles ICON_ResumeEEPROM +#define ICON_PIDNozzle ICON_SetEndTemp +#define ICON_PIDValue ICON_Contact +#define ICON_ProbeOffsetX ICON_StepX +#define ICON_ProbeOffsetY ICON_StepY +#define ICON_ProbeSet ICON_SetEndTemp +#define ICON_ProbeTest ICON_SetEndTemp +#define ICON_Pwrlossr ICON_Motion +#define ICON_Reboot ICON_ResumeEEPROM +#define ICON_Runout ICON_MaxAccE +#define ICON_Scolor ICON_MaxSpeed +#define ICON_SetCustomPreheat ICON_SetEndTemp +#define ICON_Sound ICON_Cool + +/** + * 3-.0:The font size, 0x00-0x09, corresponds to the font size below: + * 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28 + * 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64 + */ +#define font6x12 0x00 +#define font8x16 0x01 +#define font10x20 0x02 +#define font12x24 0x03 +#define font14x28 0x04 +#define font16x32 0x05 +#define font20x40 0x06 +#define font24x48 0x07 +#define font28x56 0x08 +#define font32x64 0x09 + +// Extended and default UI Colors +#define RGB(R,G,B) (R << 11) | (G << 5) | (B) // R,B: 0..31; G: 0..63 +#define GetRColor(color) ((color >> 11) & 0x1F) +#define GetGColor(color) ((color >> 5) & 0x3F) +#define GetBColor(color) ((color >> 0) & 0x1F) + +#define Color_White 0xFFFF +#define Color_Bg_Window 0x31E8 // Popup background color +#define Color_Bg_Blue 0x1125 // Dark blue background color +#define Color_Bg_Black 0x0841 // Black background color +#define Color_Bg_Red 0xF00F // Red background color +#define Popup_Text_Color 0xD6BA // Popup font background color +#define Line_Color 0x3A6A // Split line color +#define Rectangle_Color 0xEE2F // Blue square cursor color +#define Percent_Color 0xFE29 // Percentage color +#define BarFill_Color 0x10E4 // Fill color of progress bar +#define Select_Color 0x33BB // Selected color + +#define Color_Black 0 +#define Color_Red RGB(31,0,0) +#define Color_Yellow RGB(31,63,0) +#define Color_Green RGB(0,63,0) +#define Color_Aqua RGB(0,63,31) +#define Color_Blue RGB(0,0,31) + +// Default UI Colors +#define Def_Background_Color Color_Bg_Black +#define Def_Cursor_color Rectangle_Color +#define Def_TitleBg_color Color_Bg_Blue +#define Def_TitleTxt_color Color_White +#define Def_Text_Color Color_White +#define Def_Selected_Color Select_Color +#define Def_SplitLine_Color Line_Color +#define Def_Highlight_Color Color_White +#define Def_StatusBg_Color RGB(0,20,20) +#define Def_StatusTxt_Color Color_Yellow +#define Def_PopupBg_color Color_Bg_Window +#define Def_PopupTxt_Color Popup_Text_Color +#define Def_AlertBg_Color Color_Bg_Red +#define Def_AlertTxt_Color Color_Yellow +#define Def_PercentTxt_Color Percent_Color +#define Def_Barfill_Color BarFill_Color +#define Def_Indicator_Color Color_White +#define Def_Coordinate_Color Color_White + +//UI elements defines and constants +#define DWIN_FONT_MENU font8x16 +#define DWIN_FONT_STAT font10x20 +#define DWIN_FONT_HEAD font10x20 +#define DWIN_FONT_ALERT font10x20 +#define STATUS_Y 354 +#define LCD_WIDTH (DWIN_WIDTH / 8) + +constexpr uint16_t TITLE_HEIGHT = 30, // Title bar height + MLINE = 53, // Menu line height + TROWS = (STATUS_Y - TITLE_HEIGHT) / MLINE, // Total rows + MROWS = TROWS - 1, // Other-than-Back + ICOX = 26, // Menu item icon X position + LBLX = 60, // Menu item label X position + VALX = 210, // Menu item value X position + MENU_CHR_W = 8, MENU_CHR_H = 16, // Menu font 8x16 + STAT_CHR_W = 10; + +// Menuitem Y position +#define MYPOS(L) (TITLE_HEIGHT + MLINE * (L)) + +// Menuitem caption Offset +#define CAPOFF ((MLINE - MENU_CHR_H) / 2) + +// Menuitem caption Y position +#define MBASE(L) (MYPOS(L) + CAPOFF) + +// Create and add a MenuItem object to the menu array +#define ADDMENUITEM(V...) DWINUI::MenuItemsAdd(new MenuItemClass(V)) +#define ADDMENUITEM_P(V...) DWINUI::MenuItemsAdd(new MenuItemPtrClass(V)) + +typedef struct { uint16_t left, top, right, bottom; } rect_t; +typedef struct { uint16_t x, y, w, h; } frame_rect_t; + +class TitleClass { +public: + char caption[32] = ""; + uint8_t frameid = 0; + rect_t frame = {0}; + void Draw(); + void SetCaption(const char * const title); + inline void SetCaption(const __FlashStringHelper * title) { SetCaption((char *)title); } + void ShowCaption(const char * const title); + inline void ShowCaption(const __FlashStringHelper * title) { ShowCaption((char *)title); } + void SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + void SetFrame(uint16_t x, uint16_t y, uint16_t w, uint16_t h); + void FrameCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + void FrameCopy(uint16_t x, uint16_t y, uint16_t h, uint16_t v); +}; +extern TitleClass Title; + +class MenuItemClass { +protected: +public: + uint8_t pos = 0; + uint8_t icon = 0; + char caption[32] = ""; + uint8_t frameid = 0; + rect_t frame = {0}; + void (*onDraw)(MenuItemClass* menuitem, int8_t line) = nullptr; + void (*onClick)() = nullptr; + MenuItemClass() {}; + MenuItemClass(uint8_t cicon, const char * const text=nullptr, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr); + MenuItemClass(uint8_t cicon, const __FlashStringHelper * text = nullptr, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr) : MenuItemClass(cicon, (char*)text, ondraw, onclick){} + MenuItemClass(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr); + void SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + virtual ~MenuItemClass(){}; + virtual void Draw(int8_t line); +}; + +class MenuItemPtrClass: public MenuItemClass { +public: + void *value = nullptr; + using MenuItemClass::MenuItemClass; + MenuItemPtrClass(uint8_t cicon, const char * const text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val); + MenuItemPtrClass(uint8_t cicon, const __FlashStringHelper * text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val) : MenuItemPtrClass(cicon, (char*)text, ondraw, onclick, val){} +}; + +class MenuClass { +public: + int8_t topline = 0; + int8_t selected = 0; + TitleClass MenuTitle; + MenuClass(); + virtual ~MenuClass(){}; + inline int8_t line() { return selected - topline; }; + inline int8_t line(uint8_t pos) {return pos - topline; }; + void Draw(); + void onScroll(bool dir); + void onClick(); + MenuItemClass* SelectedItem(); +}; +extern MenuClass *CurrentMenu; + +namespace DWINUI { + extern xy_int_t cursor; + extern uint16_t pencolor; + extern uint16_t textcolor; + extern uint16_t backcolor; + extern uint8_t font; + + extern void (*onCursorErase)(uint8_t line); + extern void (*onCursorDraw)(uint8_t line); + extern void (*onTitleDraw)(TitleClass* title); + extern void (*onMenuDraw)(MenuClass* menu); + + // DWIN LCD Initialization + void Init(void); + + // Set text/number font + void SetFont(uint8_t cfont); + + // Get font character width + uint8_t Get_font_width(uint8_t cfont); + + // Get font character heigh + uint8_t Get_font_height(uint8_t cfont); + + // Get screen x coodinates from text column + uint16_t ColToX(uint8_t col); + + // Get screen y coodinates from text row + uint16_t RowToY(uint8_t row); + + // Set text/number color + void SetColors(uint16_t fgcolor, uint16_t bgcolor); + void SetTextColor(uint16_t fgcolor); + void SetBackgroundColor(uint16_t bgcolor); + + // Moves cursor to point + // x: abscissa of the display + // y: ordinate of the display + // point: xy coordinate + void MoveTo(int16_t x, int16_t y); + void MoveTo(xy_int_t point); + + // Moves cursor relative to the actual position + // x: abscissa of the display + // y: ordinate of the display + // point: xy coordinate + void MoveBy(int16_t x, int16_t y); + void MoveBy(xy_int_t point); + + // Draw a line from the cursor to xy position + // color: Line segment color + // x/y: End point + inline void LineTo(uint16_t color, uint16_t x, uint16_t y) { + DWIN_Draw_Line(color, cursor.x, cursor.y, x, y); + } + inline void LineTo(uint16_t x, uint16_t y) { + DWIN_Draw_Line(pencolor, cursor.x, cursor.y, x, y); + } + + // Draw an Icon with transparent background from the library ICON + // icon: Icon ID + // x/y: Upper-left point + inline void Draw_Icon(uint8_t icon, uint16_t x, uint16_t y) { + DWIN_ICON_Show(ICON, icon, x, y); + } + + // Draw a positive integer + // bShow: true=display background color; false=don't display background color + // zeroFill: true=zero fill; false=no zero fill + // zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space + // size: Font size + // color: Character color + // bColor: Background color + // iNum: Number of digits + // x/y: Upper-left coordinate + // value: Integer value + inline void Draw_Int(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + DWIN_Draw_IntValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, x, y, value); + } + inline void Draw_Int(uint8_t iNum, uint16_t value) { + DWIN_Draw_IntValue(false, true, 0, font, textcolor, backcolor, iNum, cursor.x, cursor.y, value); + MoveBy(iNum * Get_font_width(font), 0); + } + inline void Draw_Int(uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + DWIN_Draw_IntValue(false, true, 0, font, textcolor, backcolor, iNum, x, y, value); + } + inline void Draw_Int(uint16_t color, uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(false, true, 0, font, color, backcolor, iNum, x, y, value); + } + inline void Draw_Int(uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(true, true, 0, font, color, bColor, iNum, x, y, value); + } + inline void Draw_Int(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(true, true, 0, size, color, bColor, iNum, x, y, value); + } + + // Draw a floating point number + // bShow: true=display background color; false=don't display background color + // zeroFill: true=zero fill; false=no zero fill + // zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space + // size: Font size + // color: Character color + // bColor: Background color + // iNum: Number of whole digits + // fNum: Number of decimal digits + // x/y: Upper-left point + // value: Float value + inline void Draw_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint8_t iNum, uint8_t fNum, long value) { + DWIN_Draw_FloatValue(false, true, 0, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value); + MoveBy((iNum + fNum + 1) * Get_font_width(font), 0); + } + inline void Draw_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_FloatValue(false, true, 0, font, textcolor, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint16_t color, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_FloatValue(false, true, 0, font, color, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_FloatValue(true, true, 0, font, color, bColor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_FloatValue(true, true, 0, size, color, bColor, iNum, fNum, x, y, value); + } + + // Draw a signed floating point number + // bShow: true=display background color; false=don't display background color + // zeroFill: true=zero fill; false=no zero fill + // zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space + // size: Font size + // bColor: Background color + // iNum: Number of whole digits + // fNum: Number of decimal digits + // x/y: Upper-left point + // value: Float value + void Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); + inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, long value) { + Draw_Signed_Float(false, true, 0, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value); + MoveBy((iNum + fNum + 1) * Get_font_width(font), 0); + } + inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + Draw_Signed_Float(false, true, 0, font, textcolor, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Signed_Float(uint8_t size, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + Draw_Signed_Float(false, true, 0, size, textcolor, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Signed_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + Draw_Signed_Float(true, true, 0, font, color, bColor, iNum, fNum, x, y, value); + } + inline void Draw_Signed_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + Draw_Signed_Float(true, true, 0, size, color, bColor, iNum, fNum, x, y, value); + } + + // Draw a char at cursor position + void Draw_Char(const char c); + + // Draw a string at cursor position + // color: Character color + // *string: The string + // rlimit: For draw less chars than string length use rlimit + void Draw_String(const char * const string, uint16_t rlimit = 0xFFFF); + void Draw_String(uint16_t color, const char * const string, uint16_t rlimit = 0xFFFF); + + // Draw a string + // size: Font size + // color: Character color + // bColor: Background color + // x/y: Upper-left coordinate of the string + // *string: The string + inline void Draw_String(uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(false, font, textcolor, backcolor, x, y, string); + } + inline void Draw_String(uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(false, font, textcolor, backcolor, x, y, (char *)title); + } + inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(false, font, color, backcolor, x, y, string); + } + inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(false, font, color, backcolor, x, y, (char *)title); + } + inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(true, font, color, bgcolor, x, y, string); + } + inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(true, font, color, bgcolor, x, y, (char *)title); + } + inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(true, size, color, bgcolor, x, y, string); + } + inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { + DWIN_Draw_String(true, size, color, bgcolor, x, y, (char *)title); + } + + // Draw a centered string using DWIN_WIDTH + // bShow: true=display background color; false=don't display background color + // size: Font size + // color: Character color + // bColor: Background color + // y: Upper coordinate of the string + // *string: The string + void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const char * const string); + inline void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const __FlashStringHelper *title) { + Draw_CenteredString(bShow, size, color, bColor, y, (char *)title); + } + inline void Draw_CenteredString(uint16_t color, uint16_t bcolor, uint16_t y, const char * const string) { + Draw_CenteredString(true, font, color, bcolor, y, string); + } + inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, const char * const string) { + Draw_CenteredString(false, size, color, backcolor, y, string); + } + inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, const __FlashStringHelper *title) { + Draw_CenteredString(false, size, color, backcolor, y, (char *)title); + } + inline void Draw_CenteredString(uint16_t color, uint16_t y, const char * const string) { + Draw_CenteredString(false, font, color, backcolor, y, string); + } + inline void Draw_CenteredString(uint16_t color, uint16_t y, const __FlashStringHelper *title) { + Draw_CenteredString(false, font, color, backcolor, y, (char *)title); + } + inline void Draw_CenteredString(uint16_t y, const char * const string) { + Draw_CenteredString(false, font, textcolor, backcolor, y, string); + } + inline void Draw_CenteredString(uint16_t y, const __FlashStringHelper *title) { + Draw_CenteredString(false, font, textcolor, backcolor, y, (char *)title); + } + + // Draw a circle + // Color: circle color + // x: the abscissa of the center of the circle + // y: ordinate of the center of the circle + // r: circle radius + void Draw_Circle(uint16_t color, uint16_t x,uint16_t y,uint8_t r); + inline void Draw_Circle(uint16_t color, uint8_t r) { + Draw_Circle(color, cursor.x, cursor.y, r); + } + + // Draw a checkbox + // Color: frame color + // bColor: Background color + // x/y: Upper-left point + // checked : 0 : unchecked, 1 : checked + void Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool checked); + inline void Draw_Checkbox(uint16_t x, uint16_t y, bool checked=false) { + Draw_Checkbox(textcolor, backcolor, x, y, checked); + } + + // Color Interpolator + // val : Interpolator minv..maxv + // minv : Minimum value + // maxv : Maximun value + // color1 : Start color + // color2 : End color + uint16_t ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2); + + // -------------------------- Extra -------------------------------// + + // Draw a circle filled with color + // bcolor: fill color + // x: the abscissa of the center of the circle + // y: ordinate of the center of the circle + // r: circle radius + void Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r); + inline void Draw_FillCircle(uint16_t bcolor, uint8_t r) { + Draw_FillCircle(bcolor, cursor.x, cursor.y, r); + } + + // Color Interpolator through Red->Yellow->Green->Blue + // val : Interpolator minv..maxv + // minv : Minimum value + // maxv : Maximun value + uint16_t RainbowInt(int16_t val, int16_t minv, int16_t maxv); + + // Write buffer data to the SRAM + // addr: SRAM start address 0x0000-0x7FFF + // length: Bytes to write + // data: address of the buffer with data + inline void WriteToSRAM(uint16_t addr, uint16_t length, uint8_t *data) { + DWIN_WriteToMem(0x5A, addr, length, data); + } + + // Write buffer data to the Flash + // addr: Flash start address 0x0000-0x3FFF + // length: Bytes to write + // data: address of the buffer with data + inline void WriteToFlash(uint16_t addr, uint16_t length, uint8_t *data) { + DWIN_WriteToMem(0xA5, addr, length, data); + } + + // Clear Menu by filling the area with background color + // Area (0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - 1) + void ClearMenuArea(); + + // Clear MenuItems array and free MenuItems elements + void MenuItemsClear(); + + // Prepare MenuItems array + void MenuItemsPrepare(uint8_t totalitems); + + // Add elements to the MenuItems array + MenuItemClass* MenuItemsAdd(MenuItemClass* menuitem); + +}; diff --git a/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp b/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp new file mode 100644 index 000000000000..2615a0588107 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp @@ -0,0 +1,69 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "../../../core/types.h" +#include "dwin_lcd.h" +#include "dwinui.h" +#include "dwin.h" +#include "lockscreen.h" + +LockScreenClass LockScreen; + +void LockScreenClass::Init() { + Lock_Pos = 0; + unlocked = false; + Draw(); +} + +void LockScreenClass::Draw() { + Title.SetCaption(PSTR("Lock Screen")); + DWINUI::ClearMenuArea(); + DWINUI::Draw_Icon(ICON_LOGO, 71, 120); // CREALITY logo + DWINUI::Draw_CenteredString(Color_White, 180, F("Printer is Locked,")); + DWINUI::Draw_CenteredString(Color_White, 200, F("Scroll to unlock.")); + DWINUI::Draw_CenteredString(Color_White, 240, F("-> | <-")); + DWIN_Draw_Box(1, HMI_data.Barfill_Color, 0, 260, DWIN_WIDTH, 20); + DWIN_Draw_VLine(Color_Yellow, Lock_Pos * DWIN_WIDTH / 255, 260, 20); + DWIN_UpdateLCD(); +} + +void LockScreenClass::onEncoderState(ENCODER_DiffState encoder_diffState) { + if (encoder_diffState == ENCODER_DIFF_CW) { + Lock_Pos += 8; + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + Lock_Pos -= 8; + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + unlocked = (Lock_Pos == 128); + } + DWIN_Draw_Box(1, HMI_data.Barfill_Color, 0, 260, DWIN_WIDTH, 20); + DWIN_Draw_VLine(Color_Yellow, Lock_Pos * DWIN_WIDTH / 255, 260, 20); + DWIN_UpdateLCD(); +} + +bool LockScreenClass::isUnlocked() { return unlocked; } + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/lockscreen.h b/Marlin/src/lcd/e3v2/enhanced/lockscreen.h new file mode 100644 index 000000000000..32a0cc3e5a3a --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/lockscreen.h @@ -0,0 +1,35 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../core/types.h" + +class LockScreenClass { +private: + uint8_t Lock_Pos = 0; + bool unlocked = false; +public: + void Init(); + void onEncoderState(ENCODER_DiffState encoder_diffState); + void Draw(); + bool isUnlocked(); +}; +extern LockScreenClass LockScreen; diff --git a/Marlin/src/lcd/e3v2/enhanced/rotary_encoder.cpp b/Marlin/src/lcd/e3v2/enhanced/rotary_encoder.cpp new file mode 100644 index 000000000000..4f815fdee0ef --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/rotary_encoder.cpp @@ -0,0 +1,261 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ + +/***************************************************************************** + * @file lcd/e3v2/enhanced/rotary_encoder.cpp + * @author LEO / Creality3D + * @date 2019/07/06 + * @version 2.0.1 + * @brief Rotary encoder functions + *****************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "rotary_encoder.h" +#include "../../buttons.h" + +#include "../../../MarlinCore.h" +#include "../../../HAL/shared/Delay.h" + +#if HAS_BUZZER + #include "../../../libs/buzzer.h" +#endif + +#include + +#ifndef ENCODER_PULSES_PER_STEP + #define ENCODER_PULSES_PER_STEP 4 +#endif + +#if ENABLED(SOUND_MENU_ITEM) + #include "../../marlinui.h" +#endif + +ENCODER_Rate EncoderRate; + +// Buzzer +void Encoder_tick() { + #if PIN_EXISTS(BEEPER) + if (TERN1(SOUND_MENU_ITEM, ui.buzzer_enabled)) { + WRITE(BEEPER_PIN, HIGH); + delay(10); + WRITE(BEEPER_PIN, LOW); + } + #endif +} + +// Encoder initialization +void Encoder_Configuration() { + #if BUTTON_EXISTS(EN1) + SET_INPUT_PULLUP(BTN_EN1); + #endif + #if BUTTON_EXISTS(EN2) + SET_INPUT_PULLUP(BTN_EN2); + #endif + #if BUTTON_EXISTS(ENC) + SET_INPUT_PULLUP(BTN_ENC); + #endif + #if PIN_EXISTS(BEEPER) + SET_OUTPUT(BEEPER_PIN); + #endif +} + +// Analyze encoder value and return state +ENCODER_DiffState Encoder_ReceiveAnalyze() { + const millis_t now = millis(); + static uint8_t lastEncoderBits; + uint8_t newbutton = 0; + static signed char temp_diff = 0; + + ENCODER_DiffState temp_diffState = ENCODER_DIFF_NO; + if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; + if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; + if (BUTTON_PRESSED(ENC)) { + static millis_t next_click_update_ms; + if (ELAPSED(now, next_click_update_ms)) { + next_click_update_ms = millis() + 300; + Encoder_tick(); + #if PIN_EXISTS(LCD_LED) + //LED_Action(); + #endif + const bool was_waiting = wait_for_user; + wait_for_user = false; + return was_waiting ? ENCODER_DIFF_NO : ENCODER_DIFF_ENTER; + } + else return ENCODER_DIFF_NO; + } + if (newbutton != lastEncoderBits) { + switch (newbutton) { + case ENCODER_PHASE_0: + if (lastEncoderBits == ENCODER_PHASE_3) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_1) temp_diff--; + break; + case ENCODER_PHASE_1: + if (lastEncoderBits == ENCODER_PHASE_0) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_2) temp_diff--; + break; + case ENCODER_PHASE_2: + if (lastEncoderBits == ENCODER_PHASE_1) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_3) temp_diff--; + break; + case ENCODER_PHASE_3: + if (lastEncoderBits == ENCODER_PHASE_2) temp_diff++; + else if (lastEncoderBits == ENCODER_PHASE_0) temp_diff--; + break; + } + lastEncoderBits = newbutton; + } + + if (ABS(temp_diff) >= ENCODER_PULSES_PER_STEP) { + if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CW; + else temp_diffState = ENCODER_DIFF_CCW; + + #if ENABLED(ENCODER_RATE_MULTIPLIER) + + millis_t ms = millis(); + int32_t encoderMultiplier = 1; + + // if must encoder rati multiplier + if (EncoderRate.enabled) { + const float abs_diff = ABS(temp_diff), + encoderMovementSteps = abs_diff / (ENCODER_PULSES_PER_STEP); + if (EncoderRate.lastEncoderTime) { + // Note that the rate is always calculated between two passes through the + // loop and that the abs of the temp_diff value is tracked. + const float encoderStepRate = encoderMovementSteps / float(ms - EncoderRate.lastEncoderTime) * 1000; + if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; + else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; + else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5; + } + EncoderRate.lastEncoderTime = ms; + } + + #else + + constexpr int32_t encoderMultiplier = 1; + + #endif + + // EncoderRate.encoderMoveValue += (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP); + EncoderRate.encoderMoveValue = (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP); + if (EncoderRate.encoderMoveValue < 0) EncoderRate.encoderMoveValue = -EncoderRate.encoderMoveValue; + + temp_diff = 0; + } + return temp_diffState; +} + +#if PIN_EXISTS(LCD_LED) + + // Take the low 24 valid bits 24Bit: G7 G6 G5 G4 G3 G2 G1 G0 R7 R6 R5 R4 R3 R2 R1 R0 B7 B6 B5 B4 B3 B2 B1 B0 + uint16_t LED_DataArray[LED_NUM]; + + // LED light operation + void LED_Action() { + LED_Control(RGB_SCALE_WARM_WHITE,0x0F); + delay(30); + LED_Control(RGB_SCALE_WARM_WHITE,0x00); + } + + // LED initialization + void LED_Configuration() { + SET_OUTPUT(LCD_LED_PIN); + } + + // LED write data + void LED_WriteData() { + uint8_t tempCounter_LED, tempCounter_Bit; + for (tempCounter_LED = 0; tempCounter_LED < LED_NUM; tempCounter_LED++) { + for (tempCounter_Bit = 0; tempCounter_Bit < 24; tempCounter_Bit++) { + if (LED_DataArray[tempCounter_LED] & (0x800000 >> tempCounter_Bit)) { + LED_DATA_HIGH; + DELAY_NS(300); + LED_DATA_LOW; + DELAY_NS(200); + } + else { + LED_DATA_HIGH; + LED_DATA_LOW; + DELAY_NS(200); + } + } + } + } + + // LED control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + void LED_Control(const uint8_t RGB_Scale, const uint8_t luminance) { + for (uint8_t i = 0; i < LED_NUM; i++) { + LED_DataArray[i] = 0; + switch (RGB_Scale) { + case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 5/10; break; + case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 4/10; break; + case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 8/10) << 16 | luminance * 7/10; break; + } + } + LED_WriteData(); + } + + // LED gradient control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + // change_Time: gradient time (ms) + void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval) { + struct { uint8_t g, r, b; } led_data[LED_NUM]; + for (uint8_t i = 0; i < LED_NUM; i++) { + switch (RGB_Scale) { + case RGB_SCALE_R10_G7_B5: + led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 5/10 }; + break; + case RGB_SCALE_R10_G7_B4: + led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 4/10 }; + break; + case RGB_SCALE_R10_G8_B7: + led_data[i] = { luminance * 8/10, luminance * 10/10, luminance * 7/10 }; + break; + } + } + + struct { bool g, r, b; } led_flag = { false, false, false }; + for (uint8_t i = 0; i < LED_NUM; i++) { + while (1) { + const uint8_t g = uint8_t(LED_DataArray[i] >> 16), + r = uint8_t(LED_DataArray[i] >> 8), + b = uint8_t(LED_DataArray[i]); + if (g == led_data[i].g) led_flag.g = true; + else LED_DataArray[i] += (g > led_data[i].g) ? -0x010000 : 0x010000; + if (r == led_data[i].r) led_flag.r = true; + else LED_DataArray[i] += (r > led_data[i].r) ? -0x000100 : 0x000100; + if (b == led_data[i].b) led_flag.b = true; + else LED_DataArray[i] += (b > led_data[i].b) ? -0x000001 : 0x000001; + LED_WriteData(); + if (led_flag.r && led_flag.g && led_flag.b) break; + delay(change_Interval); + } + } + } + +#endif // LCD_LED + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/rotary_encoder.h b/Marlin/src/lcd/e3v2/enhanced/rotary_encoder.h new file mode 100644 index 000000000000..c500cfe5bbce --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/rotary_encoder.h @@ -0,0 +1,93 @@ +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.1 + * Date: 2021/08/29 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/***************************************************************************** + * @file lcd/e3v2/enhanced/rotary_encoder.h + * @author LEO / Creality3D + * @date 2019/07/06 + * @version 2.0.1 + * @brief Rotary encoder functions + ****************************************************************************/ + +#include "../../../inc/MarlinConfig.h" + +/*********************** Encoder Set ***********************/ + +typedef struct { + bool enabled = false; + int encoderMoveValue = 0; + millis_t lastEncoderTime = 0; +} ENCODER_Rate; + +extern ENCODER_Rate EncoderRate; + +typedef enum { + ENCODER_DIFF_NO = 0, // no state + ENCODER_DIFF_CW = 1, // clockwise rotation + ENCODER_DIFF_CCW = 2, // counterclockwise rotation + ENCODER_DIFF_ENTER = 3 // click +} ENCODER_DiffState; + +// Encoder initialization +void Encoder_Configuration(); + +// Analyze encoder value and return state +ENCODER_DiffState Encoder_ReceiveAnalyze(); + +/*********************** Encoder LED ***********************/ + +#if PIN_EXISTS(LCD_LED) + + #define LED_NUM 4 + #define LED_DATA_HIGH WRITE(LCD_LED_PIN, 1) + #define LED_DATA_LOW WRITE(LCD_LED_PIN, 0) + + #define RGB_SCALE_R10_G7_B5 1 + #define RGB_SCALE_R10_G7_B4 2 + #define RGB_SCALE_R10_G8_B7 3 + #define RGB_SCALE_NEUTRAL_WHITE RGB_SCALE_R10_G7_B5 + #define RGB_SCALE_WARM_WHITE RGB_SCALE_R10_G7_B4 + #define RGB_SCALE_COOL_WHITE RGB_SCALE_R10_G8_B7 + + extern unsigned int LED_DataArray[LED_NUM]; + + // LED light operation + void LED_Action(); + + // LED initialization + void LED_Configuration(); + + // LED write data + void LED_WriteData(); + + // LED control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + void LED_Control(const uint8_t RGB_Scale, const uint8_t luminance); + + // LED gradient control + // RGB_Scale: RGB color ratio + // luminance: brightness (0~0xFF) + // change_Time: gradient time (ms) + void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval); + +#endif // LCD_LED diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h index 18b7c347440c..9f8bd25295f9 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h +++ b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h @@ -44,9 +44,6 @@ // Handshake (1: Success, 0: Fail) bool DWIN_Handshake(void); -// Common DWIN startup -void DWIN_Startup(void); - // Set the backlight luminance // luminance: (0x00-0xFF) void DWIN_Backlight_SetLuminance(const uint8_t luminance); diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index bddddb75bff1..11c976ee41d8 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -78,6 +78,14 @@ namespace Language_en { PROGMEM Language_Str MSG_AUTO_HOME_I = _UxGT("Home ") LCD_STR_I; PROGMEM Language_Str MSG_AUTO_HOME_J = _UxGT("Home ") LCD_STR_J; PROGMEM Language_Str MSG_AUTO_HOME_K = _UxGT("Home ") LCD_STR_K; + PROGMEM Language_Str MSG_FILAMENT_SET = _UxGT("Filament Settings"); + PROGMEM Language_Str MSG_FILAMENT_MAN = _UxGT("Filament Management"); + PROGMEM Language_Str MSG_LEVBED_FL = _UxGT("Front Left"); + PROGMEM Language_Str MSG_LEVBED_FR = _UxGT("Front Right"); + PROGMEM Language_Str MSG_LEVBED_C = _UxGT("Center"); + PROGMEM Language_Str MSG_LEVBED_BL = _UxGT("Back Left"); + PROGMEM Language_Str MSG_LEVBED_BR = _UxGT("Back Right"); + PROGMEM Language_Str MSG_MANUAL_MESH = _UxGT("Manual Mesh"); PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Align"); PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Iteration: %i"); PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Accuracy Decreasing!"); @@ -289,6 +297,11 @@ namespace Language_en { PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Move 0.1in"); PROGMEM Language_Str MSG_MOVE_1IN = _UxGT("Move 1.0in"); PROGMEM Language_Str MSG_SPEED = _UxGT("Speed"); + PROGMEM Language_Str MSG_MAXSPEED = _UxGT("Max Speed (mm/s)"); + PROGMEM Language_Str MSG_MAXSPEED_X = _UxGT("Max ") LCD_STR_A _UxGT(" Speed"); + PROGMEM Language_Str MSG_MAXSPEED_Y = _UxGT("Max ") LCD_STR_B _UxGT(" Speed"); + PROGMEM Language_Str MSG_MAXSPEED_Z = _UxGT("Max ") LCD_STR_C _UxGT(" Speed"); + PROGMEM Language_Str MSG_MAXSPEED_E = _UxGT("Max ") LCD_STR_E _UxGT(" Speed"); PROGMEM Language_Str MSG_BED_Z = _UxGT("Bed Z"); PROGMEM Language_Str MSG_NOZZLE = _UxGT("Nozzle"); PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Nozzle ~"); @@ -321,7 +334,7 @@ namespace Language_en { PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Off"); PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); - PROGMEM Language_Str MSG_PID_CYCLE = _UxGT("PID Cycle"); + PROGMEM Language_Str MSG_PID_CYCLE = _UxGT("PID Cycles"); PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); @@ -504,6 +517,7 @@ namespace Language_en { PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe"); PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Stow Z-Probe"); PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s First"); + PROGMEM Language_Str MSG_ZPROBE_SETTINGS = _UxGT("Probe Settings"); PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets"); PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset"); PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset"); @@ -611,6 +625,7 @@ namespace Language_en { PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Runout Sensor"); PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout Dist mm"); + PROGMEM Language_Str MSG_RUNOUT_ENABLE = _UxGT("Enable Runout"); PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Homing Failed"); PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Probing Failed"); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 51cbf4534fe7..8c59500574ed 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -48,6 +48,8 @@ MarlinUI ui; #if ENABLED(DWIN_CREALITY_LCD) #include "e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "e3v2/enhanced/dwin.h" #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "e3v2/jyersui/dwin.h" #endif @@ -101,6 +103,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; backlight = !!value; if (backlight) brightness = constrain(value, MIN_LCD_BRIGHTNESS, MAX_LCD_BRIGHTNESS); // Set brightness on enabled LCD here + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_LCD_Brightness(brightness)); TERN_(DWIN_CREALITY_LCD_JYERSUI, DWIN_Backlight_SetLuminance(backlight ? brightness : 0)); } #endif @@ -1474,7 +1477,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #endif TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message)); - TERN_(DWIN_CREALITY_LCD, DWIN_StatusChanged(status_message)); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StatusChanged(status_message)); TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Update_Status(status_message)); } diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 268d01850854..d3a3c9d521ee 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -55,11 +55,17 @@ #include "../module/printcounter.h" #endif -#if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) +#if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, HAS_DWIN_E3V2) #include "../feature/pause.h" #include "../module/motion.h" // for active_extruder #endif +#if ENABLED(DWIN_CREALITY_LCD) + #include "e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "e3v2/enhanced/dwin.h" +#endif + #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) #if HAS_WIRED_LCD @@ -257,7 +263,7 @@ class MarlinUI { FORCE_INLINE static void refresh_brightness() { set_brightness(brightness); } #endif - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC static void refresh(); #else FORCE_INLINE static void refresh() { @@ -315,7 +321,7 @@ class MarlinUI { #if HAS_STATUS_MESSAGE - #if HAS_WIRED_LCD + #if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_ENHANCED) #if ENABLED(STATUS_MESSAGE_SCROLLING) #define MAX_MESSAGE_LENGTH _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)) #else @@ -351,6 +357,12 @@ class MarlinUI { static inline void reset_alert_level() {} #endif + #if EITHER(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED) + static void kill_screen(PGM_P const lcd_error, PGM_P const lcd_component); + #else + static inline void kill_screen(PGM_P const, PGM_P const) {} + #endif + #if HAS_DISPLAY static void init(); @@ -457,7 +469,6 @@ class MarlinUI { static bool did_first_redraw; #endif - static void kill_screen(PGM_P const lcd_error, PGM_P const lcd_component); static void draw_kill_screen(); #else // No LCD @@ -585,7 +596,7 @@ class MarlinUI { static inline bool use_click() { return false; } #endif - #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) + #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, HAS_DWIN_E3V2) static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder); #else static inline void _pause_show_message() {} diff --git a/Marlin/src/lcd/tft/ui_common.h b/Marlin/src/lcd/tft/ui_common.h index 617447a1817a..759712b64c14 100644 --- a/Marlin/src/lcd/tft/ui_common.h +++ b/Marlin/src/lcd/tft/ui_common.h @@ -23,7 +23,7 @@ #include "../../inc/MarlinConfigPre.h" -#if !HAS_LCD_MENU +#if ENABLED(NO_LCD_MENUS) #error "Seriously? High resolution TFT screen without menu?" #endif diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index cbadda2eef7c..a4469bb209e1 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -79,6 +79,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -295,7 +297,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe"))); - + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Popup_Confirm(ICON_BLTouch, PSTR("Stow Probe"), CONTINUE_STR)); wait_for_user_response(); ui.reset_status(); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index f2d2aeee92ce..c24a63ee519f 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -71,9 +71,9 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" -#endif - -#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "../lcd/e3v2/jyersui/dwin.h" #endif @@ -441,14 +441,15 @@ typedef struct SettingsDataStruct { // EXTENSIBLE_UI // #if ENABLED(EXTENSIBLE_UI) - // This is a significant hardware change; don't reserve space when not present uint8_t extui_data[ExtUI::eeprom_data_size]; #endif // - // DWIN_CREALITY_LCD_JYERSUI + // Ender-3 V2 DWIN // - #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + uint8_t dwin_data[eeprom_data_size]; + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) uint8_t dwin_settings[CrealityDWIN.eeprom_data_size]; #endif @@ -1358,9 +1359,16 @@ void MarlinSettings::postprocess() { #endif // - // Creality UI Settings + // Creality DWIN User Data // - #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + { + char dwin_data[eeprom_data_size] = { 0 }; + DWIN_StoreSettings(dwin_data); + _FIELD_TEST(dwin_data); + EEPROM_WRITE(dwin_data); + } + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) { char dwin_settings[CrealityDWIN.eeprom_data_size] = { 0 }; CrealityDWIN.Save_Settings(dwin_settings); @@ -1488,6 +1496,8 @@ void MarlinSettings::postprocess() { stored_ver[1] = '\0'; } DEBUG_ECHO_MSG("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")"); + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status(GET_TEXT(MSG_ERR_EEPROM_VERSION))); + IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_version()); eeprom_error = true; } @@ -2249,9 +2259,16 @@ void MarlinSettings::postprocess() { #endif // - // Creality UI Settings + // Creality DWIN User Data // - #if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + { + const char dwin_data[eeprom_data_size] = { 0 }; + _FIELD_TEST(dwin_data); + EEPROM_READ(dwin_data); + if (!validating) DWIN_LoadSettings(dwin_data); + } + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) { const char dwin_settings[CrealityDWIN.eeprom_data_size] = { 0 }; _FIELD_TEST(dwin_settings); @@ -2340,6 +2357,7 @@ void MarlinSettings::postprocess() { else if (working_crc != stored_crc) { eeprom_error = true; DEBUG_ERROR_MSG("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!"); + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status(GET_TEXT(MSG_ERR_EEPROM_CRC))); IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_crc()); } else if (!validating) { @@ -2656,7 +2674,7 @@ void MarlinSettings::reset() { #endif TERN_(EXTENSIBLE_UI, ExtUI::onFactoryReset()); - + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_SetDataDefaults()); TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Reset_Settings()); // diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 935de772f452..1bb86ed4c7e0 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -47,6 +47,8 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #if ENABLED(EXTENSIBLE_UI) @@ -603,10 +605,12 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAS_AUTO_FAN, next_auto_fan_check_ms = next_temp_ms + 2500UL); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_STARTED)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(isbed ? PID_BED_START : PID_EXTR_START)); if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, temp_range[heater_id].maxtemp - (HOTEND_OVERSHOOT))) { SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_TEMP_TOO_HIGH)); return; } @@ -627,6 +631,7 @@ volatile bool Temperature::raw_temps_ready = false; // PID Tuning loop wait_for_heatup = true; // Can be interrupted with M108 + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT), "Wait for heat up...")); while (wait_for_heatup) { const millis_t ms = millis(); @@ -687,6 +692,7 @@ volatile bool Temperature::raw_temps_ready = false; } } SHV((bias + d) >> 1); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PID_CYCLE), cycles, ncycles)); cycles++; minT = target; } @@ -699,6 +705,7 @@ volatile bool Temperature::raw_temps_ready = false; if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) { SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_TEMP_TOO_HIGH)); break; } @@ -734,6 +741,7 @@ volatile bool Temperature::raw_temps_ready = false; #endif if ((ms - _MIN(t1, t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) { TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_TUNING_TIMEOUT)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT)); SERIAL_ECHOLNPGM(STR_PID_TIMEOUT); break; @@ -787,6 +795,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_DONE)); goto EXIT_M303; } @@ -795,7 +804,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAL_IDLETASK, HAL_idletask()); // Run UI update - TERN(DWIN_CREALITY_LCD, DWIN_Update(), ui.update()); + TERN(HAS_DWIN_E3V2_BASIC, DWIN_Update(), ui.update()); } wait_for_heatup = false; @@ -804,6 +813,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_DONE)); EXIT_M303: TERN_(NO_FAN_SLOWING_IN_PID_TUNING, adaptive_fan_slowing = true); @@ -1014,14 +1024,14 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms } void Temperature::max_temp_error(const heater_id_t heater_id) { - #if ENABLED(DWIN_CREALITY_LCD) && (HAS_HOTEND || HAS_HEATED_BED) + #if HAS_DWIN_E3V2_BASIC && (HAS_HOTEND || HAS_HEATED_BED) DWIN_Popup_Temperature(1); #endif _temp_error(heater_id, PSTR(STR_T_MAXTEMP), GET_TEXT(MSG_ERR_MAXTEMP)); } void Temperature::min_temp_error(const heater_id_t heater_id) { - #if ENABLED(DWIN_CREALITY_LCD) && (HAS_HOTEND || HAS_HEATED_BED) + #if HAS_DWIN_E3V2_BASIC && (HAS_HOTEND || HAS_HEATED_BED) DWIN_Popup_Temperature(0); #endif _temp_error(heater_id, PSTR(STR_T_MINTEMP), GET_TEXT(MSG_ERR_MINTEMP)); @@ -1329,7 +1339,7 @@ void Temperature::manage_heater() { if (watch_hotend[e].check(degHotend(e))) // Increased enough? start_watching_hotend(e); // If temp reached, turn off elapsed check else { - TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_Popup_Temperature(0)); _temp_error((heater_id_t)e, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD)); } } @@ -1372,7 +1382,7 @@ void Temperature::manage_heater() { if (watch_bed.check(degBed())) // Increased enough? start_watching_bed(); // If temp reached, turn off elapsed check else { - TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_Popup_Temperature(0)); _temp_error(H_BED, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD)); } } @@ -2586,7 +2596,7 @@ void Temperature::init() { state = TRRunaway; case TRRunaway: - TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_Popup_Temperature(0)); _temp_error(heater_id, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY)); } } @@ -3600,7 +3610,7 @@ void Temperature::isr() { #if HAS_MULTI_HOTEND PSTR("E%c " S_FMT), '1' + e #else - PSTR("E " S_FMT) + PSTR("E1 " S_FMT) #endif , heating ? GET_TEXT(MSG_HEATING) : GET_TEXT(MSG_COOLING) ); @@ -3720,13 +3730,12 @@ void Temperature::isr() { if (wait_for_heatup) { wait_for_heatup = false; - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC HMI_flag.heat_flag = 0; duration_t elapsed = print_job_timer.duration(); // print timer dwin_heat_time = elapsed.value; - #else - ui.reset_status(); #endif + ui.reset_status(); TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onHeatingDone()); return true; } diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 9f923b4ea95b..48d38e22136d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -148,7 +148,7 @@ * All pins are labeled as printed on DWIN PCB. Connect TX-TX, A-A and so on. */ - #error "DWIN_CREALITY_LCD requires a custom cable, see diagram above this line. Comment out this line to continue." + #error "Ender-3 V2 display requires a custom cable, see diagram above this line. Comment out this line to continue." #define BEEPER_PIN EXP1_9 #define BTN_EN1 EXP1_3 diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index c0bc81a3ef3c..832cfa405fd5 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -33,6 +33,8 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #include "../module/planner.h" // for synchronize @@ -564,7 +566,7 @@ void CardReader::startOrResumeFilePrinting() { // void CardReader::endFilePrintNow(TERN_(SD_RESORT, const bool re_sort/*=false*/)) { TERN_(ADVANCED_PAUSE_FEATURE, did_pause_print = 0); - TERN_(DWIN_CREALITY_LCD, HMI_flag.print_finish = flag.sdprinting); + TERN_(HAS_DWIN_E3V2_BASIC, HMI_flag.print_finish = flag.sdprinting); flag.abort_sd_printing = false; if (isFileOpen()) file.close(); TERN_(SD_RESORT, if (re_sort) presort()); diff --git a/buildroot/tests/STM32F103RET6_creality b/buildroot/tests/STM32F103RET6_creality index 0ad66bfdb92a..277a68411df8 100755 --- a/buildroot/tests/STM32F103RET6_creality +++ b/buildroot/tests/STM32F103RET6_creality @@ -13,6 +13,11 @@ use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_enable MARLIN_DEV_MODE BUFFER_MONITORING exec_test $1 $2 "Ender 3 v2 with CrealityUI" "$3" +use_example_configs "Creality/Ender-3 V2/CrealityUI" +opt_disable DWIN_CREALITY_LCD +opt_enable DWIN_CREALITY_LCD_ENHANCED +exec_test $1 $2 "Ender 3 v2 with Enhanced UI" "$3" + use_example_configs "Creality/Ender-3 V2/CrealityUI" opt_disable DWIN_CREALITY_LCD opt_enable DWIN_CREALITY_LCD_JYERSUI diff --git a/ini/features.ini b/ini/features.ini index acadd7763a85..6ad375e5946f 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -45,6 +45,7 @@ I2C_EEPROM = src_filter=+ DWIN_CREALITY_LCD = src_filter=+ +DWIN_CREALITY_LCD_ENHANCED = src_filter=+ DWIN_CREALITY_LCD_JYERSUI = src_filter=+ DWIN_MARLINUI_.+ = src_filter=+ HAS_GRAPHICAL_TFT = src_filter=+ diff --git a/platformio.ini b/platformio.ini index 23ee15d98b45..550206980092 100644 --- a/platformio.ini +++ b/platformio.ini @@ -50,7 +50,7 @@ lib_deps = default_src_filter = + - - + - - - - - - - - - - - + - - - - - - - - - - From 7a2515bcac682ffc0e5afddaa663910e4f305cb5 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Wed, 8 Sep 2021 00:57:48 +0000 Subject: [PATCH 317/323] [cron] Bump distribution date (2021-09-08) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index d11b20166e8f..41584fb77227 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-07" +//#define STRING_DISTRIBUTION_DATE "2021-09-08" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 3139e964752c..c2c9e4ff6f9a 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-07" + #define STRING_DISTRIBUTION_DATE "2021-09-08" #endif /** From 7a4f1c410f15a5204264b2fc027ac5e04c9f0d97 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Thu, 9 Sep 2021 01:01:56 +0000 Subject: [PATCH 318/323] [cron] Bump distribution date (2021-09-09) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 41584fb77227..54926116e78a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-08" +//#define STRING_DISTRIBUTION_DATE "2021-09-09" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index c2c9e4ff6f9a..427343637a5c 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-08" + #define STRING_DISTRIBUTION_DATE "2021-09-09" #endif /** From 650e73af27eab6c185337c3fc2c44300a9262af8 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu, 9 Sep 2021 18:13:01 +1200 Subject: [PATCH 319/323] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20Enhanced=20E3V2=20?= =?UTF-8?q?Advanced=20Pause=20(#22728)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 6de8dc98608c..c45995aba598 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2953,7 +2953,7 @@ * Advanced Pause - Filament Change */ #if ENABLED(ADVANCED_PAUSE_FEATURE) - #if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) + #if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) #define M600_PURGE_MORE_RESUMABLE 1 #endif #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH From 79c72ed821564507b0ef46cbb26f9577585e2ccc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 7 Sep 2021 18:06:10 -0500 Subject: [PATCH 320/323] =?UTF-8?q?=F0=9F=8E=A8=20Standardize=20G-code=20r?= =?UTF-8?q?eporting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/pinsDebug.h | 10 +- Marlin/src/core/language.h | 47 +- Marlin/src/core/types.h | 2 + Marlin/src/feature/fwretract.cpp | 11 +- Marlin/src/feature/fwretract.h | 6 +- Marlin/src/gcode/bedlevel/M420.cpp | 14 + Marlin/src/gcode/calibrate/G34_M422.cpp | 34 +- Marlin/src/gcode/calibrate/M425.cpp | 18 + Marlin/src/gcode/calibrate/M665.cpp | 36 + Marlin/src/gcode/calibrate/M666.cpp | 68 +- Marlin/src/gcode/calibrate/M852.cpp | 34 +- Marlin/src/gcode/config/M200-M205.cpp | 142 ++- Marlin/src/gcode/config/M217.cpp | 73 +- Marlin/src/gcode/config/M218.cpp | 29 +- Marlin/src/gcode/config/M281.cpp | 37 +- Marlin/src/gcode/config/M301.cpp | 63 +- Marlin/src/gcode/config/M304.cpp | 14 +- Marlin/src/gcode/config/M305.cpp | 4 +- Marlin/src/gcode/config/M309.cpp | 13 +- Marlin/src/gcode/config/M575.cpp | 6 +- Marlin/src/gcode/config/M92.cpp | 73 +- Marlin/src/gcode/control/M17_M18_M84.cpp | 4 +- Marlin/src/gcode/control/M211.cpp | 18 +- Marlin/src/gcode/feature/advance/M900.cpp | 13 + .../src/gcode/feature/controllerfan/M710.cpp | 24 +- .../src/gcode/feature/digipot/M907-M910.cpp | 42 +- .../src/gcode/feature/fwretract/M207-M209.cpp | 25 + .../src/gcode/feature/network/M552-M554.cpp | 36 +- Marlin/src/gcode/feature/pause/M603.cpp | 18 + Marlin/src/gcode/feature/powerloss/M413.cpp | 13 +- Marlin/src/gcode/feature/runout/M412.cpp | 12 + Marlin/src/gcode/feature/trinamic/M569.cpp | 62 ++ Marlin/src/gcode/feature/trinamic/M906.cpp | 95 ++ .../src/gcode/feature/trinamic/M911-M914.cpp | 160 +++ Marlin/src/gcode/gcode.cpp | 20 +- Marlin/src/gcode/gcode.h | 81 +- Marlin/src/gcode/geometry/M206_M428.cpp | 38 +- Marlin/src/gcode/lcd/M145.cpp | 19 + Marlin/src/gcode/lcd/M250.cpp | 12 +- Marlin/src/gcode/lcd/M256.cpp | 11 +- Marlin/src/gcode/lcd/M414.cpp | 7 + Marlin/src/gcode/parser.h | 17 +- Marlin/src/gcode/probe/M851.cpp | 31 +- Marlin/src/gcode/units/M149.cpp | 7 + Marlin/src/module/endstops.cpp | 4 +- Marlin/src/module/settings.cpp | 992 +++--------------- Marlin/src/module/temperature.cpp | 31 +- Marlin/src/module/temperature.h | 2 +- 48 files changed, 1359 insertions(+), 1169 deletions(-) diff --git a/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/src/HAL/AVR/pinsDebug.h index 6923e1f902f3..50da32292b2b 100644 --- a/Marlin/src/HAL/AVR/pinsDebug.h +++ b/Marlin/src/HAL/AVR/pinsDebug.h @@ -235,7 +235,7 @@ static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); inline void com_print(const uint8_t N, const uint8_t Z) { const uint8_t *TCCRA = (uint8_t*)TCCR_A(N); - SERIAL_ECHOPAIR(" COM", AS_CHAR('0' + N)); + SERIAL_ECHOPAIR(" COM", AS_DIGIT(N)); SERIAL_CHAR(Z); SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03)); } @@ -247,7 +247,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1)))); if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1); - SERIAL_ECHOPAIR(" TIMER", AS_CHAR(T + '0')); + SERIAL_ECHOPAIR(" TIMER", AS_DIGIT(T)); SERIAL_CHAR(L); SERIAL_ECHO_SP(3); @@ -262,11 +262,11 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - SERIAL_ECHOPAIR(" WGM: ", WGM); com_print(T,L); SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) )); - SERIAL_ECHOPAIR(" TCCR", AS_CHAR(T + '0'), "A: ", *TCCRA); - SERIAL_ECHOPAIR(" TCCR", AS_CHAR(T + '0'), "B: ", *TCCRB); + SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "A: ", *TCCRA); + SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "B: ", *TCCRB); const uint8_t *TMSK = (uint8_t*)TIMSK(T); - SERIAL_ECHOPAIR(" TIMSK", AS_CHAR(T + '0'), ": ", *TMSK); + SERIAL_ECHOPAIR(" TIMSK", AS_DIGIT(T), ": ", *TMSK); const uint8_t OCIE = L - 'A' + 1; if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); } diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 8de839759322..334165667109 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -158,9 +158,7 @@ #define STR_OFF "OFF" #define STR_ENDSTOP_HIT "TRIGGERED" #define STR_ENDSTOP_OPEN "open" -#define STR_HOTEND_OFFSET "Hotend offsets:" #define STR_DUPLICATION_MODE "Duplication mode: " -#define STR_SOFT_ENDSTOPS "Soft endstops: " #define STR_SOFT_MIN " Min: " #define STR_SOFT_MAX " Max: " @@ -262,6 +260,49 @@ #define STR_REMINDER_SAVE_SETTINGS "Remember to save!" #define STR_PASSWORD_SET "Password is " +// Settings Report Strings +#define STR_Z_AUTO_ALIGN "Z Auto-Align" +#define STR_BACKLASH_COMPENSATION "Backlash compensation" +#define STR_DELTA_SETTINGS "Delta settings (L R H S XYZ ABC)" +#define STR_SCARA_SETTINGS "SCARA settings" +#define STR_SCARA_S "S" +#define STR_SCARA_P_T_Z "P T Z" +#define STR_ENDSTOP_ADJUSTMENT "Endstop adjustment" +#define STR_SKEW_FACTOR "Skew Factor" +#define STR_FILAMENT_SETTINGS "Filament settings" +#define STR_MAX_ACCELERATION "Max Acceleration (units/s2)" +#define STR_MAX_FEEDRATES "Max feedrates (units/s)" +#define STR_ACCELERATION_P_R_T "Acceleration (units/s2) (P R T)" +#define STR_TOOL_CHANGING "Tool-changing" +#define STR_HOTEND_OFFSETS "Hotend offsets" +#define STR_SERVO_ANGLES "Servo Angles" +#define STR_HOTEND_PID "Hotend PID" +#define STR_BED_PID "Bed PID" +#define STR_CHAMBER_PID "Chamber PID" +#define STR_STEPS_PER_UNIT "Steps per unit" +#define STR_LINEAR_ADVANCE "Linear Advance" +#define STR_CONTROLLER_FAN "Controller Fan" +#define STR_STEPPER_MOTOR_CURRENTS "Stepper motor currents" +#define STR_RETRACT_S_F_Z "Retract (S F Z)" +#define STR_RECOVER_S_F "Recover (S F)" +#define STR_AUTO_RETRACT_S "Auto-Retract (S)" +#define STR_FILAMENT_LOAD_UNLOAD "Filament load/unload" +#define STR_POWER_LOSS_RECOVERY "Power-loss recovery" +#define STR_FILAMENT_RUNOUT_SENSOR "Filament runout sensor" +#define STR_DRIVER_STEPPING_MODE "Driver stepping mode" +#define STR_STEPPER_DRIVER_CURRENT "Stepper driver current" +#define STR_HYBRID_THRESHOLD "Hybrid Threshold" +#define STR_STALLGUARD_THRESHOLD "StallGuard threshold" +#define STR_HOME_OFFSET "Home offset" +#define STR_SOFT_ENDSTOPS "Soft endstops" +#define STR_MATERIAL_HEATUP "Material heatup parameters" +#define STR_LCD_CONTRAST "LCD Contrast" +#define STR_LCD_BRIGHTNESS "LCD Brightness" +#define STR_UI_LANGUAGE "UI Language" +#define STR_Z_PROBE_OFFSET "Z-Probe Offset" +#define STR_TEMPERATURE_UNITS "Temperature Units" +#define STR_USER_THERMISTORS "User thermistors" + // // Endstop Names used by Endstops::report_states // @@ -290,7 +331,7 @@ #define STR_Z_PROBE "z_probe" #define STR_PROBE_EN "probe_en" -#define STR_FILAMENT_RUNOUT_SENSOR "filament" +#define STR_FILAMENT "filament" // General axis names #define STR_X "X" diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index 833167a7a196..372b4b1e666a 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -55,6 +55,8 @@ struct IF { typedef L type; }; #define LOGICAL_AXIS_ELEM(O) LOGICAL_AXIS_LIST(O.e, O.x, O.y, O.z, O.i, O.j, O.k) #define LOGICAL_AXIS_DECL(T,V) LOGICAL_AXIS_LIST(T e=V, T x=V, T y=V, T z=V, T i=V, T j=V, T k=V) +#define LOGICAL_AXES_STRING LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR) + #if HAS_EXTRUDERS #define LIST_ITEM_E(N) , N #define CODE_ITEM_E(N) ; N diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp index 41dbf430e829..71630d30acab 100644 --- a/Marlin/src/feature/fwretract.cpp +++ b/Marlin/src/feature/fwretract.cpp @@ -36,7 +36,7 @@ FWRetract fwretract; // Single instance - this calls the constructor #include "../module/planner.h" #include "../module/stepper.h" -#include "../gcode/parser.h" +#include "../gcode/gcode.h" #if ENABLED(RETRACT_SYNC_MIXING) #include "mixing.h" @@ -214,8 +214,7 @@ void FWRetract::M207() { if (parser.seenval('W')) settings.swap_retract_length = parser.value_axis_units(E_AXIS); } -void FWRetract::M207_report(const bool forReplay/*=false*/) { - if (!forReplay) { SERIAL_ECHO_MSG("; Retract: S F Z"); SERIAL_ECHO_START(); } +void FWRetract::M207_report() { SERIAL_ECHOLNPAIR_P( PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length) , PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length) @@ -240,8 +239,7 @@ void FWRetract::M208() { if (parser.seen('W')) settings.swap_retract_recover_extra = parser.value_axis_units(E_AXIS); } -void FWRetract::M208_report(const bool forReplay/*=false*/) { - if (!forReplay) { SERIAL_ECHO_MSG("; Recover: S F"); SERIAL_ECHO_START(); } +void FWRetract::M208_report() { SERIAL_ECHOLNPAIR( " M208 S", LINEAR_UNIT(settings.retract_recover_extra) , " W", LINEAR_UNIT(settings.swap_retract_recover_extra) @@ -262,8 +260,7 @@ void FWRetract::M208_report(const bool forReplay/*=false*/) { enable_autoretract(parser.value_bool()); } - void FWRetract::M209_report(const bool forReplay/*=false*/) { - if (!forReplay) { SERIAL_ECHO_MSG("; Auto-Retract: S=0 to disable, 1 to interpret E-only moves as retract/recover"); SERIAL_ECHO_START(); } + void FWRetract::M209_report() { SERIAL_ECHOLNPAIR(" M209 S", AS_DIGIT(autoretract_enabled)); } diff --git a/Marlin/src/feature/fwretract.h b/Marlin/src/feature/fwretract.h index cd93e9cf39ed..9b0ff19c8bb6 100644 --- a/Marlin/src/feature/fwretract.h +++ b/Marlin/src/feature/fwretract.h @@ -76,13 +76,13 @@ class FWRetract { static void retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool swapping = false)); + static void M207_report(); static void M207(); - static void M207_report(const bool forReplay=false); + static void M208_report(); static void M208(); - static void M208_report(const bool forReplay=false); #if ENABLED(FWRETRACT_AUTORETRACT) + static void M209_report(); static void M209(); - static void M209_report(const bool forReplay=false); #endif }; diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 703e73b5a4ce..55055a5b025a 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -242,4 +242,18 @@ void GcodeSuite::M420() { report_current_position(); } +void GcodeSuite::M420_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR( + TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling")) + )); + SERIAL_ECHOPAIR_P( + PSTR(" M420 S"), planner.leveling_active + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + , SP_Z_STR, LINEAR_UNIT(planner.z_fade_height) + #endif + , " ; Leveling " + ); + serialprintln_onoff(planner.leveling_active); +} + #endif // HAS_LEVELING diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 50f3419c8960..c5f5e582a91a 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -475,21 +475,13 @@ void GcodeSuite::G34() { */ void GcodeSuite::M422() { + if (!parser.seen_any()) return M422_report(); + if (parser.seen('R')) { z_stepper_align.reset_to_default(); return; } - if (!parser.seen_any()) { - LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) - SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), i + 1, SP_X_STR, z_stepper_align.xy[i].x, SP_Y_STR, z_stepper_align.xy[i].y); - #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) - LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) - SERIAL_ECHOLNPAIR_P(PSTR("M422 W"), i + 1, SP_X_STR, z_stepper_align.stepper_xy[i].x, SP_Y_STR, z_stepper_align.stepper_xy[i].y); - #endif - return; - } - const bool is_probe_point = parser.seen('S'); if (TERN0(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS, is_probe_point && parser.seen('W'))) { @@ -545,4 +537,26 @@ void GcodeSuite::M422() { pos_dest[position_index] = pos; } +void GcodeSuite::M422_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_Z_AUTO_ALIGN)); + LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR_P( + PSTR(" M422 S"), i + 1, + SP_X_STR, z_stepper_align.xy[i].x, + SP_Y_STR, z_stepper_align.xy[i].y + ); + } + #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) + LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR_P( + PSTR(" M422 W"), i + 1, + SP_X_STR, z_stepper_align.stepper_xy[i].x, + SP_Y_STR, z_stepper_align.stepper_xy[i].y + ); + } + #endif +} + #endif // Z_STEPPER_AUTO_ALIGN diff --git a/Marlin/src/gcode/calibrate/M425.cpp b/Marlin/src/gcode/calibrate/M425.cpp index f30de00a0fdf..9f7e00738b26 100644 --- a/Marlin/src/gcode/calibrate/M425.cpp +++ b/Marlin/src/gcode/calibrate/M425.cpp @@ -113,4 +113,22 @@ void GcodeSuite::M425() { } } +void GcodeSuite::M425_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_BACKLASH_COMPENSATION)); + SERIAL_ECHOLNPAIR_P( + PSTR(" M425 F"), backlash.get_correction() + #ifdef BACKLASH_SMOOTHING_MM + , PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm) + #endif + , LIST_N(DOUBLE(LINEAR_AXES), + SP_X_STR, LINEAR_UNIT(backlash.distance_mm.x), + SP_Y_STR, LINEAR_UNIT(backlash.distance_mm.y), + SP_Z_STR, LINEAR_UNIT(backlash.distance_mm.z), + SP_I_STR, LINEAR_UNIT(backlash.distance_mm.i), + SP_J_STR, LINEAR_UNIT(backlash.distance_mm.j), + SP_K_STR, LINEAR_UNIT(backlash.distance_mm.k) + ) + ); +} + #endif // BACKLASH_GCODE diff --git a/Marlin/src/gcode/calibrate/M665.cpp b/Marlin/src/gcode/calibrate/M665.cpp index 0d0c4146d931..d4d49d6a6c97 100644 --- a/Marlin/src/gcode/calibrate/M665.cpp +++ b/Marlin/src/gcode/calibrate/M665.cpp @@ -30,6 +30,7 @@ #if ENABLED(DELTA) #include "../../module/delta.h" + /** * M665: Set delta configurations * @@ -45,6 +46,8 @@ * C = Gamma (Tower 3) diagonal rod trim */ void GcodeSuite::M665() { + if (!parser.seen_any()) return M665_report(); + if (parser.seenval('H')) delta_height = parser.value_linear_units(); if (parser.seenval('L')) delta_diagonal_rod = parser.value_linear_units(); if (parser.seenval('R')) delta_radius = parser.value_linear_units(); @@ -58,6 +61,22 @@ recalc_delta_settings(); } + void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_DELTA_SETTINGS)); + SERIAL_ECHOLNPAIR_P( + PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod) + , PSTR(" R"), LINEAR_UNIT(delta_radius) + , PSTR(" H"), LINEAR_UNIT(delta_height) + , PSTR(" S"), segments_per_second + , SP_X_STR, LINEAR_UNIT(delta_tower_angle_trim.a) + , SP_Y_STR, LINEAR_UNIT(delta_tower_angle_trim.b) + , SP_Z_STR, LINEAR_UNIT(delta_tower_angle_trim.c) + , PSTR(" A"), LINEAR_UNIT(delta_diagonal_rod_trim.a) + , PSTR(" B"), LINEAR_UNIT(delta_diagonal_rod_trim.b) + , PSTR(" C"), LINEAR_UNIT(delta_diagonal_rod_trim.c) + ); + } + #elif IS_SCARA #include "../../module/scara.h" @@ -68,6 +87,9 @@ * Parameters: * * S[segments-per-second] - Segments-per-second + * + * Without NO_WORKSPACE_OFFSETS: + * * P[theta-psi-offset] - Theta-Psi offset, added to the shoulder (A/X) angle * T[theta-offset] - Theta offset, added to the elbow (B/Y) angle * Z[z-offset] - Z offset, added to Z @@ -76,6 +98,8 @@ * B, T, and Y are all aliases for the elbow angle */ void GcodeSuite::M665() { + if (!parser.seen_any()) return M665_report(); + if (parser.seenval('S')) segments_per_second = parser.value_float(); #if HAS_SCARA_OFFSET @@ -107,6 +131,18 @@ #endif // HAS_SCARA_OFFSET } + void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SCARA_SETTINGS " (" STR_SCARA_S TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")")); + SERIAL_ECHOLNPAIR_P( + PSTR(" M665 S"), segments_per_second + #if HAS_SCARA_OFFSET + , SP_P_STR, scara_home_offset.a + , SP_T_STR, scara_home_offset.b + , SP_Z_STR, LINEAR_UNIT(scara_home_offset.z) + #endif + ); + } + #endif #endif // IS_KINEMATIC diff --git a/Marlin/src/gcode/calibrate/M666.cpp b/Marlin/src/gcode/calibrate/M666.cpp index 872344e4e923..6e1ebfb5db59 100644 --- a/Marlin/src/gcode/calibrate/M666.cpp +++ b/Marlin/src/gcode/calibrate/M666.cpp @@ -36,38 +36,6 @@ #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../../core/debug_out.h" -void M666_report(const bool forReplay=true) { - if (!forReplay) { SERIAL_ECHOLNPGM("; Endstop adjustment:"); SERIAL_ECHO_START(); } - #if ENABLED(DELTA) - SERIAL_ECHOLNPAIR_P( - PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) - , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) - , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) - ); - #else - SERIAL_ECHOPGM(" M666"); - #if ENABLED(X_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); - #endif - #if ENABLED(Y_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - #if NUM_Z_STEPPER_DRIVERS >= 3 - SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); - if (!forReplay) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); - #if NUM_Z_STEPPER_DRIVERS >= 4 - if (!forReplay) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); - #endif - #else - SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); - #endif - #endif - #endif -} - #if ENABLED(DELTA) /** @@ -92,6 +60,15 @@ void M666_report(const bool forReplay=true) { if (!is_set) M666_report(); } + void GcodeSuite::M666_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); + SERIAL_ECHOLNPAIR_P( + PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) + , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) + , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) + ); + } + #else /** @@ -105,6 +82,8 @@ void M666_report(const bool forReplay=true) { * Set All: M666 Z */ void GcodeSuite::M666() { + if (!parser.seen_any()) return M666_report(); + #if ENABLED(X_DUAL_ENDSTOPS) if (parser.seenval('X')) endstops.x2_endstop_adj = parser.value_linear_units(); #endif @@ -123,7 +102,30 @@ void M666_report(const bool forReplay=true) { #endif } #endif - if (!parser.seen("XYZ")) M666_report(); + } + + void GcodeSuite::M666_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); + SERIAL_ECHOPGM(" M666"); + #if ENABLED(X_DUAL_ENDSTOPS) + SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); + #endif + #if ENABLED(Y_DUAL_ENDSTOPS) + SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) + #if NUM_Z_STEPPER_DRIVERS >= 3 + SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + report_echo_start(forReplay); + SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + #if NUM_Z_STEPPER_DRIVERS >= 4 + report_echo_start(forReplay); + SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); + #endif + #else + SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); + #endif + #endif } #endif // HAS_EXTRA_ENDSTOPS diff --git a/Marlin/src/gcode/calibrate/M852.cpp b/Marlin/src/gcode/calibrate/M852.cpp index 73b18ad4665e..c4361b89f315 100644 --- a/Marlin/src/gcode/calibrate/M852.cpp +++ b/Marlin/src/gcode/calibrate/M852.cpp @@ -36,10 +36,11 @@ * K[yz_factor] - New YZ skew factor */ void GcodeSuite::M852() { - uint8_t ijk = 0, badval = 0, setval = 0; + if (!parser.seen("SIJK")) return M852_report(); - if (parser.seen('I') || parser.seen('S')) { - ++ijk; + uint8_t badval = 0, setval = 0; + + if (parser.seenval('I') || parser.seenval('S')) { const float value = parser.value_linear_units(); if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX)) { if (planner.skew_factor.xy != value) { @@ -53,8 +54,7 @@ void GcodeSuite::M852() { #if ENABLED(SKEW_CORRECTION_FOR_Z) - if (parser.seen('J')) { - ++ijk; + if (parser.seenval('J')) { const float value = parser.value_linear_units(); if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX)) { if (planner.skew_factor.xz != value) { @@ -66,8 +66,7 @@ void GcodeSuite::M852() { ++badval; } - if (parser.seen('K')) { - ++ijk; + if (parser.seenval('K')) { const float value = parser.value_linear_units(); if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX)) { if (planner.skew_factor.yz != value) { @@ -90,17 +89,18 @@ void GcodeSuite::M852() { sync_plan_position(); report_current_position(); } +} - if (!ijk) { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Skew Factor"); - SERIAL_ECHOPAIR_F(" XY: ", planner.skew_factor.xy, 6); - #if ENABLED(SKEW_CORRECTION_FOR_Z) - SERIAL_ECHOPAIR_F(" XZ: ", planner.skew_factor.xz, 6); - SERIAL_ECHOPAIR_F(" YZ: ", planner.skew_factor.yz, 6); - #endif - SERIAL_EOL(); - } +void GcodeSuite::M852_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SKEW_FACTOR)); + SERIAL_ECHOPAIR_F(" M851 I", planner.skew_factor.xy, 6); + #if ENABLED(SKEW_CORRECTION_FOR_Z) + SERIAL_ECHOPAIR_F(" J", planner.skew_factor.xz, 6); + SERIAL_ECHOPAIR_F(" K", planner.skew_factor.yz, 6); + SERIAL_ECHOLNPGM(" ; XY, XZ, YZ"); + #else + SERIAL_ECHOLNPGM(" ; XY"); + #endif } #endif // SKEW_CORRECTION_GCODE diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp index a2bcb8bb86a8..048a2887e62e 100644 --- a/Marlin/src/gcode/config/M200-M205.cpp +++ b/Marlin/src/gcode/config/M200-M205.cpp @@ -32,9 +32,14 @@ * T - Optional extruder number. Current extruder if omitted. * D - Set filament diameter and enable. D0 disables volumetric. * S - Turn volumetric ON or OFF. + * + * With VOLUMETRIC_EXTRUDER_LIMIT: + * * L - Volumetric extruder limit (in mm^3/sec). L0 disables the limit. */ void GcodeSuite::M200() { + if (!parser.seen("DST" TERN_(VOLUMETRIC_EXTRUDER_LIMIT, "L"))) + return M200_report(); const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -69,6 +74,37 @@ planner.calculate_volumetric_multipliers(); } + void GcodeSuite::M200_report(const bool forReplay/*=true*/) { + if (!forReplay) { + report_heading(forReplay, PSTR(STR_FILAMENT_SETTINGS), false); + if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):"); + SERIAL_EOL(); + report_echo_start(forReplay); + } + + #if EXTRUDERS == 1 + { + SERIAL_ECHOLNPAIR( + " M200 S", parser.volumetric_enabled, " D", LINEAR_UNIT(planner.filament_size[0]) + #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) + , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0]) + #endif + ); + } + #else + SERIAL_ECHOLNPAIR(" M200 S", parser.volumetric_enabled); + LOOP_L_N(i, EXTRUDERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR( + " M200 T", i, " D", LINEAR_UNIT(planner.filament_size[i]) + #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) + , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i]) + #endif + ); + } + #endif + } + #endif // !NO_VOLUMETRICS /** @@ -77,6 +113,8 @@ * With multiple extruders use T to specify which one. */ void GcodeSuite::M201() { + if (!parser.seen("T" LOGICAL_AXES_STRING)) + return M201_report(); const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -94,12 +132,40 @@ void GcodeSuite::M201() { } } +void GcodeSuite::M201_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_MAX_ACCELERATION)); + SERIAL_ECHOLNPAIR_P( + LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]), + SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]), + SP_Z_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS]), + SP_I_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[I_AXIS]), + SP_J_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[J_AXIS]), + SP_K_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[K_AXIS]) + ) + #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS]) + #endif + ); + #if ENABLED(DISTINCT_E_FACTORS) + LOOP_L_N(i, E_STEPPERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR_P( + PSTR(" M201 T"), i + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)]) + ); + } + #endif +} + /** * M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec * * With multiple extruders use T to specify which one. */ void GcodeSuite::M203() { + if (!parser.seen("T" LOGICAL_AXES_STRING)) + return M203_report(); const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -111,6 +177,32 @@ void GcodeSuite::M203() { } } +void GcodeSuite::M203_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_MAX_FEEDRATES)); + SERIAL_ECHOLNPAIR_P( + LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]), + SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]), + SP_Z_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS]), + SP_I_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[I_AXIS]), + SP_J_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[J_AXIS]), + SP_K_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[K_AXIS]) + ) + #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS]) + #endif + ); + #if ENABLED(DISTINCT_E_FACTORS) + LOOP_L_N(i, E_STEPPERS) { + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR_P( + PSTR(" M203 T"), i + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)]) + ); + } + #endif +} + /** * M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000) * @@ -119,11 +211,8 @@ void GcodeSuite::M203() { * T = Travel (non printing) moves */ void GcodeSuite::M204() { - if (!parser.seen("PRST")) { - SERIAL_ECHOPAIR("Acceleration: P", planner.settings.acceleration); - SERIAL_ECHOPAIR(" R", planner.settings.retract_acceleration); - SERIAL_ECHOLNPAIR_P(SP_T_STR, planner.settings.travel_acceleration); - } + if (!parser.seen("PRST")) + return M204_report(); else { //planner.synchronize(); // 'S' for legacy compatibility. Should NOT BE USED for new development @@ -134,6 +223,15 @@ void GcodeSuite::M204() { } } +void GcodeSuite::M204_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_ACCELERATION_P_R_T)); + SERIAL_ECHOLNPAIR_P( + PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration) + , PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration) + , SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration) + ); +} + /** * M205: Set Advanced Settings * @@ -147,7 +245,8 @@ void GcodeSuite::M204() { * J = Junction Deviation (mm) (If not using CLASSIC_JERK) */ void GcodeSuite::M205() { - if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE"))) return; + if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE"))) + return M205_report(); //planner.synchronize(); if (parser.seenval('B')) planner.settings.min_segment_time_us = parser.value_ulong(); @@ -184,3 +283,34 @@ void GcodeSuite::M205() { #endif #endif // HAS_CLASSIC_JERK } + +void GcodeSuite::M205_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR( + "Advanced (B S T" + TERN_(HAS_JUNCTION_DEVIATION, " J") + TERN_(HAS_CLASSIC_JERK, " X Y Z") + TERN_(HAS_CLASSIC_E_JERK, " E") + ")" + )); + SERIAL_ECHOLNPAIR_P( + PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us) + , PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s) + , SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s) + #if HAS_JUNCTION_DEVIATION + , PSTR(" J"), LINEAR_UNIT(planner.junction_deviation_mm) + #endif + #if HAS_CLASSIC_JERK + , LIST_N(DOUBLE(LINEAR_AXES), + SP_X_STR, LINEAR_UNIT(planner.max_jerk.x), + SP_Y_STR, LINEAR_UNIT(planner.max_jerk.y), + SP_Z_STR, LINEAR_UNIT(planner.max_jerk.z), + SP_I_STR, LINEAR_UNIT(planner.max_jerk.i), + SP_J_STR, LINEAR_UNIT(planner.max_jerk.j), + SP_K_STR, LINEAR_UNIT(planner.max_jerk.k) + ) + #if HAS_CLASSIC_E_JERK + , SP_E_STR, LINEAR_UNIT(planner.max_jerk.e) + #endif + #endif + ); +} diff --git a/Marlin/src/gcode/config/M217.cpp b/Marlin/src/gcode/config/M217.cpp index 2035ae55abeb..72b7d16ac015 100644 --- a/Marlin/src/gcode/config/M217.cpp +++ b/Marlin/src/gcode/config/M217.cpp @@ -33,44 +33,6 @@ #include "../../MarlinCore.h" // for SP_X_STR, etc. -void M217_report(const bool eeprom=false) { - - #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) - SERIAL_ECHOPGM_P(eeprom ? PSTR(" M217") : PSTR("Toolchange:")); - SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length)); - SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume), - SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime), - SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed)); - SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed), - " U", LINEAR_UNIT(toolchange_settings.unretract_speed), - " F", toolchange_settings.fan_speed, - " G", toolchange_settings.fan_time); - - #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) - SERIAL_ECHOPAIR(" A", migration.automode); - SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last)); - #endif - - #if ENABLED(TOOLCHANGE_PARK) - SERIAL_ECHOPAIR(" W", LINEAR_UNIT(toolchange_settings.enable_park)); - SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)); - SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y)); - #endif - - #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) - SERIAL_ECHOPAIR(" V", LINEAR_UNIT(enable_first_prime)); - #endif - - #else - - UNUSED(eeprom); - - #endif - - SERIAL_ECHOPAIR_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise)); - SERIAL_EOL(); -} - /** * M217 - Set SINGLENOZZLE toolchange parameters * @@ -168,4 +130,39 @@ void GcodeSuite::M217() { M217_report(); } +void GcodeSuite::M217_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_TOOL_CHANGING)); + + SERIAL_ECHOPGM(" M217"); + + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length)); + SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume), + SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime), + SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed)); + SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed), + " U", LINEAR_UNIT(toolchange_settings.unretract_speed), + " F", toolchange_settings.fan_speed, + " G", toolchange_settings.fan_time); + + #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) + SERIAL_ECHOPAIR(" A", migration.automode); + SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last)); + #endif + + #if ENABLED(TOOLCHANGE_PARK) + SERIAL_ECHOPAIR(" W", LINEAR_UNIT(toolchange_settings.enable_park)); + SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)); + SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y)); + #endif + + #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) + SERIAL_ECHOPAIR(" V", LINEAR_UNIT(enable_first_prime)); + #endif + + #endif + + SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise)); +} + #endif // HAS_MULTI_EXTRUDER diff --git a/Marlin/src/gcode/config/M218.cpp b/Marlin/src/gcode/config/M218.cpp index 7701320e9eae..249c16622fe1 100644 --- a/Marlin/src/gcode/config/M218.cpp +++ b/Marlin/src/gcode/config/M218.cpp @@ -41,6 +41,8 @@ */ void GcodeSuite::M218() { + if (!parser.seen_any()) return M218_report(); + const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -48,24 +50,23 @@ void GcodeSuite::M218() { if (parser.seenval('Y')) hotend_offset[target_extruder].y = parser.value_linear_units(); if (parser.seenval('Z')) hotend_offset[target_extruder].z = parser.value_linear_units(); - if (!parser.seen("XYZ")) { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM(STR_HOTEND_OFFSET); - HOTEND_LOOP() { - SERIAL_CHAR(' '); - SERIAL_ECHO(hotend_offset[e].x); - SERIAL_CHAR(','); - SERIAL_ECHO(hotend_offset[e].y); - SERIAL_CHAR(','); - SERIAL_ECHO_F(hotend_offset[e].z, 3); - } - SERIAL_EOL(); - } - #if ENABLED(DELTA) if (target_extruder == active_extruder) do_blocking_move_to_xy(current_position, planner.settings.max_feedrate_mm_s[X_AXIS]); #endif } +void GcodeSuite::M218_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_HOTEND_OFFSETS)); + LOOP_S_L_N(e, 1, HOTENDS) { + report_echo_start(forReplay); + SERIAL_ECHOPAIR_P( + PSTR(" M218 T"), e, + SP_X_STR, LINEAR_UNIT(hotend_offset[e].x), + SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y) + ); + SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(hotend_offset[e].z), 3); + } +} + #endif // HAS_HOTEND_OFFSET diff --git a/Marlin/src/gcode/config/M281.cpp b/Marlin/src/gcode/config/M281.cpp index eeb0fcc470e1..36b62f516360 100644 --- a/Marlin/src/gcode/config/M281.cpp +++ b/Marlin/src/gcode/config/M281.cpp @@ -34,6 +34,7 @@ * U - Stowed Angle */ void GcodeSuite::M281() { + if (!parser.seen_any()) return M281_report(); if (!parser.seenval('P')) return; @@ -45,24 +46,32 @@ void GcodeSuite::M281() { return; } #endif - bool angle_change = false; - if (parser.seen('L')) { - servo_angles[servo_index][0] = parser.value_int(); - angle_change = true; - } - if (parser.seen('U')) { - servo_angles[servo_index][1] = parser.value_int(); - angle_change = true; - } - if (!angle_change) { - SERIAL_ECHO_MSG(" Servo ", servo_index, - " L", servo_angles[servo_index][0], - " U", servo_angles[servo_index][1]); - } + if (parser.seen('L')) servo_angles[servo_index][0] = parser.value_int(); + if (parser.seen('U')) servo_angles[servo_index][1] = parser.value_int(); } else SERIAL_ERROR_MSG("Servo ", servo_index, " out of range"); +} +void GcodeSuite::M281_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SERVO_ANGLES)); + LOOP_L_N(i, NUM_SERVOS) { + switch (i) { + default: break; + #if ENABLED(SWITCHING_EXTRUDER) + case SWITCHING_EXTRUDER_SERVO_NR: + #if EXTRUDERS > 3 + case SWITCHING_EXTRUDER_E23_SERVO_NR: + #endif + #elif ENABLED(SWITCHING_NOZZLE) + case SWITCHING_NOZZLE_SERVO_NR: + #elif ENABLED(BLTOUCH) || (HAS_Z_SERVO_PROBE && defined(Z_SERVO_ANGLES)) + case Z_PROBE_SERVO_NR: + #endif + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]); + } + } } #endif // EDITABLE_SERVO_ANGLES diff --git a/Marlin/src/gcode/config/M301.cpp b/Marlin/src/gcode/config/M301.cpp index 7b3f57608bad..904744c95817 100644 --- a/Marlin/src/gcode/config/M301.cpp +++ b/Marlin/src/gcode/config/M301.cpp @@ -46,46 +46,63 @@ * F[float] Kf term */ void GcodeSuite::M301() { - // multi-extruder PID patch: M301 updates or prints a single extruder's PID values // default behavior (omitting E parameter) is to update for extruder 0 only - const uint8_t e = parser.byteval('E'); // extruder being updated + int8_t e = parser.byteval('E', -1); // extruder being updated + + if (!parser.seen("PID" TERN_(PID_EXTRUSION_SCALING, "CL") TERN_(PID_FAN_SCALING, "F"))) + return M301_report(true, e); + + if (e == -1) e = 0; if (e < HOTENDS) { // catch bad input value - if (parser.seen('P')) PID_PARAM(Kp, e) = parser.value_float(); - if (parser.seen('I')) PID_PARAM(Ki, e) = scalePID_i(parser.value_float()); - if (parser.seen('D')) PID_PARAM(Kd, e) = scalePID_d(parser.value_float()); + + if (parser.seenval('P')) PID_PARAM(Kp, e) = parser.value_float(); + if (parser.seenval('I')) PID_PARAM(Ki, e) = scalePID_i(parser.value_float()); + if (parser.seenval('D')) PID_PARAM(Kd, e) = scalePID_d(parser.value_float()); + #if ENABLED(PID_EXTRUSION_SCALING) - if (parser.seen('C')) PID_PARAM(Kc, e) = parser.value_float(); + if (parser.seenval('C')) PID_PARAM(Kc, e) = parser.value_float(); if (parser.seenval('L')) thermalManager.lpq_len = parser.value_int(); NOMORE(thermalManager.lpq_len, LPQ_MAX_LEN); NOLESS(thermalManager.lpq_len, 0); #endif #if ENABLED(PID_FAN_SCALING) - if (parser.seen('F')) PID_PARAM(Kf, e) = parser.value_float(); + if (parser.seenval('F')) PID_PARAM(Kf, e) = parser.value_float(); #endif thermalManager.updatePID(); - - SERIAL_ECHO_START(); - #if ENABLED(PID_PARAMS_PER_HOTEND) - SERIAL_ECHOPAIR(" e:", e); // specify extruder in serial output - #endif - SERIAL_ECHOPAIR(" p:", PID_PARAM(Kp, e), - " i:", unscalePID_i(PID_PARAM(Ki, e)), - " d:", unscalePID_d(PID_PARAM(Kd, e))); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR(" c:", PID_PARAM(Kc, e)); - #endif - #if ENABLED(PID_FAN_SCALING) - SERIAL_ECHOPAIR(" f:", PID_PARAM(Kf, e)); - #endif - - SERIAL_EOL(); } else SERIAL_ERROR_MSG(STR_INVALID_EXTRUDER); } +void GcodeSuite::M301_report(const bool forReplay/*=true*/, const int8_t eindex/*=-1*/) { + report_heading(forReplay, PSTR(STR_HOTEND_PID)); + HOTEND_LOOP() { + if (e == eindex || eindex == -1) { + report_echo_start(forReplay); + SERIAL_ECHOPAIR_P( + #if ENABLED(PID_PARAMS_PER_HOTEND) + PSTR(" M301 E"), e, SP_P_STR + #else + PSTR(" M301 P") + #endif + , PID_PARAM(Kp, e) + , PSTR(" I"), unscalePID_i(PID_PARAM(Ki, e)) + , PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e)) + ); + #if ENABLED(PID_EXTRUSION_SCALING) + SERIAL_ECHOPAIR_P(SP_C_STR, PID_PARAM(Kc, e)); + if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len); + #endif + #if ENABLED(PID_FAN_SCALING) + SERIAL_ECHOPAIR(" F", PID_PARAM(Kf, e)); + #endif + SERIAL_EOL(); + } + } +} + #endif // PIDTEMP diff --git a/Marlin/src/gcode/config/M304.cpp b/Marlin/src/gcode/config/M304.cpp index b1af5a5ae21f..05ee4bad8061 100644 --- a/Marlin/src/gcode/config/M304.cpp +++ b/Marlin/src/gcode/config/M304.cpp @@ -35,15 +35,19 @@ * D - Set the D value */ void GcodeSuite::M304() { - + if (!parser.seen("PID")) return M304_report(); if (parser.seen('P')) thermalManager.temp_bed.pid.Kp = parser.value_float(); if (parser.seen('I')) thermalManager.temp_bed.pid.Ki = scalePID_i(parser.value_float()); if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float()); +} - SERIAL_ECHO_MSG(" p:", thermalManager.temp_bed.pid.Kp, - " i:", unscalePID_i(thermalManager.temp_bed.pid.Ki), - " d:", unscalePID_d(thermalManager.temp_bed.pid.Kd)); - +void GcodeSuite::M304_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_BED_PID)); + SERIAL_ECHO_MSG( + " M304 P", thermalManager.temp_bed.pid.Kp + , " I", unscalePID_i(thermalManager.temp_bed.pid.Ki) + , " D", unscalePID_d(thermalManager.temp_bed.pid.Kd) + ); } #endif // PIDTEMPBED diff --git a/Marlin/src/gcode/config/M305.cpp b/Marlin/src/gcode/config/M305.cpp index 10ef55c17341..6957eef050dd 100644 --- a/Marlin/src/gcode/config/M305.cpp +++ b/Marlin/src/gcode/config/M305.cpp @@ -70,10 +70,10 @@ void GcodeSuite::M305() { } // If not setting then report parameters else if (t_index < 0) { // ...all user thermistors LOOP_L_N(i, USER_THERMISTORS) - thermalManager.log_user_thermistor(i); + thermalManager.M305_report(i); } else // ...one user thermistor - thermalManager.log_user_thermistor(t_index); + thermalManager.M305_report(t_index); } #endif // HAS_USER_THERMISTORS diff --git a/Marlin/src/gcode/config/M309.cpp b/Marlin/src/gcode/config/M309.cpp index 2247481b2579..d5297e956393 100644 --- a/Marlin/src/gcode/config/M309.cpp +++ b/Marlin/src/gcode/config/M309.cpp @@ -35,14 +35,19 @@ * D - Set the D value */ void GcodeSuite::M309() { + if (!parser.seen("PID")) return M309_report(); if (parser.seen('P')) thermalManager.temp_chamber.pid.Kp = parser.value_float(); if (parser.seen('I')) thermalManager.temp_chamber.pid.Ki = scalePID_i(parser.value_float()); if (parser.seen('D')) thermalManager.temp_chamber.pid.Kd = scalePID_d(parser.value_float()); +} - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(" p:", thermalManager.temp_chamber.pid.Kp, - " i:", unscalePID_i(thermalManager.temp_chamber.pid.Ki), - " d:", unscalePID_d(thermalManager.temp_chamber.pid.Kd)); +void GcodeSuite::M309_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_CHAMBER_PID)); + SERIAL_ECHOLNPAIR( + " M309 P", thermalManager.temp_chamber.pid.Kp + , " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki) + , " D", unscalePID_d(thermalManager.temp_chamber.pid.Kd) + ); } #endif // PIDTEMPCHAMBER diff --git a/Marlin/src/gcode/config/M575.cpp b/Marlin/src/gcode/config/M575.cpp index 7739510cf3cf..2c12428d982a 100644 --- a/Marlin/src/gcode/config/M575.cpp +++ b/Marlin/src/gcode/config/M575.cpp @@ -53,13 +53,13 @@ void GcodeSuite::M575() { case 115200: case 250000: case 500000: case 1000000: { const int8_t port = parser.intval('P', -99); const bool set1 = (port == -99 || port == 0); - if (set1) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('0'), " baud rate set to ", baud); + if (set1) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(0), " baud rate set to ", baud); #if HAS_MULTI_SERIAL const bool set2 = (port == -99 || port == 1); - if (set2) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('1'), " baud rate set to ", baud); + if (set2) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(1), " baud rate set to ", baud); #ifdef SERIAL_PORT_3 const bool set3 = (port == -99 || port == 2); - if (set3) SERIAL_ECHO_MSG(" Serial ", AS_CHAR('2'), " baud rate set to ", baud); + if (set3) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(2), " baud rate set to ", baud); #endif #endif diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 544c66a0768a..9f4f2ac65b13 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -23,33 +23,6 @@ #include "../gcode.h" #include "../../module/planner.h" -void report_M92(const bool echo=true, const int8_t e=-1) { - if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' '); - SERIAL_ECHOPAIR_P(LIST_N(DOUBLE(LINEAR_AXES), - PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]), - SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]), - SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]), - SP_I_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[I_AXIS]), - SP_J_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[J_AXIS]), - SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS])) - ); - #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) - SERIAL_ECHOPAIR_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS])); - #endif - SERIAL_EOL(); - - #if ENABLED(DISTINCT_E_FACTORS) - LOOP_L_N(i, E_STEPPERS) { - if (e >= 0 && i != e) continue; - if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' '); - SERIAL_ECHOLNPAIR_P(PSTR(" M92 T"), i, - SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)])); - } - #endif - - UNUSED(e); -} - /** * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E. * (Follows the same syntax as G92) @@ -58,10 +31,11 @@ void report_M92(const bool echo=true, const int8_t e=-1) { * * If no argument is given print the current values. * - * With MAGIC_NUMBERS_GCODE: - * Use 'H' and/or 'L' to get ideal layer-height information. - * 'H' specifies micro-steps to use. We guess if it's not supplied. - * 'L' specifies a desired layer height. Nearest good heights are shown. + * With MAGIC_NUMBERS_GCODE: + * + * Use 'H' and/or 'L' to get ideal layer-height information. + * H - Specify micro-steps to use. Best guess if not supplied. + * L - Desired layer height in current units. Nearest good heights are shown. */ void GcodeSuite::M92() { @@ -69,10 +43,8 @@ void GcodeSuite::M92() { if (target_extruder < 0) return; // No arguments? Show M92 report. - if (!parser.seen( - LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR) - TERN_(MAGIC_NUMBERS_GCODE, "HL") - )) return report_M92(true, target_extruder); + if (!parser.seen(LOGICAL_AXES_STRING TERN_(MAGIC_NUMBERS_GCODE, "HL"))) + return M92_report(true, target_extruder); LOOP_LOGICAL_AXES(i) { if (parser.seenval(axis_codes[i])) { @@ -100,7 +72,7 @@ void GcodeSuite::M92() { #ifndef Z_MICROSTEPS #define Z_MICROSTEPS 16 #endif - const float wanted = parser.floatval('L'); + const float wanted = parser.linearval('L'); if (parser.seen('H') || wanted) { const uint16_t argH = parser.ushortval('H'), micro_steps = argH ?: Z_MICROSTEPS; @@ -117,3 +89,32 @@ void GcodeSuite::M92() { } #endif } + +void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) { + report_heading_etc(forReplay, PSTR(STR_STEPS_PER_UNIT)); + SERIAL_ECHOPAIR_P(LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]), + SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]), + SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]), + SP_I_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[I_AXIS]), + SP_J_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[J_AXIS]), + SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS])) + ); + #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) + SERIAL_ECHOPAIR_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS])); + #endif + SERIAL_EOL(); + + #if ENABLED(DISTINCT_E_FACTORS) + LOOP_L_N(i, E_STEPPERS) { + if (e >= 0 && i != e) continue; + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR_P( + PSTR(" M92 T"), i, + SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]) + ); + } + #else + UNUSED(e); + #endif +} diff --git a/Marlin/src/gcode/control/M17_M18_M84.cpp b/Marlin/src/gcode/control/M17_M18_M84.cpp index 4ebb81cf7ea7..e6e0f033ecac 100644 --- a/Marlin/src/gcode/control/M17_M18_M84.cpp +++ b/Marlin/src/gcode/control/M17_M18_M84.cpp @@ -33,7 +33,7 @@ * M17: Enable stepper motors */ void GcodeSuite::M17() { - if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) { + if (parser.seen_axis()) { LOGICAL_AXIS_CODE( if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) enable_e_steppers(), if (parser.seen_test('X')) ENABLE_AXIS_X(), @@ -59,7 +59,7 @@ void GcodeSuite::M18_M84() { stepper_inactive_time = parser.value_millis_from_seconds(); } else { - if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) { + if (parser.seen_axis()) { planner.synchronize(); LOGICAL_AXIS_CODE( if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) disable_e_steppers(), diff --git a/Marlin/src/gcode/control/M211.cpp b/Marlin/src/gcode/control/M211.cpp index 2ba777ba650e..b15cb6ef0a8c 100644 --- a/Marlin/src/gcode/control/M211.cpp +++ b/Marlin/src/gcode/control/M211.cpp @@ -33,14 +33,22 @@ * Usage: M211 S1 to enable, M211 S0 to disable, M211 alone for report */ void GcodeSuite::M211() { + if (parser.seen('S')) + soft_endstop._enabled = parser.value_bool(); + else + M211_report(); +} + +void GcodeSuite::M211_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS)); + SERIAL_ECHOPAIR(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; "); + serialprintln_onoff(soft_endstop._enabled); + + report_echo_start(forReplay); const xyz_pos_t l_soft_min = soft_endstop.min.asLogical(), l_soft_max = soft_endstop.max.asLogical(); - SERIAL_ECHO_START(); - SERIAL_ECHOPGM(STR_SOFT_ENDSTOPS); - if (parser.seen('S')) soft_endstop._enabled = parser.value_bool(); - serialprint_onoff(soft_endstop._enabled); print_pos(l_soft_min, PSTR(STR_SOFT_MIN), PSTR(" ")); print_pos(l_soft_max, PSTR(STR_SOFT_MAX)); } -#endif +#endif // HAS_SOFTWARE_ENDSTOPS diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp index 1d76ebf7d531..e1859fb7d9ea 100644 --- a/Marlin/src/gcode/feature/advance/M900.cpp +++ b/Marlin/src/gcode/feature/advance/M900.cpp @@ -144,4 +144,17 @@ void GcodeSuite::M900() { } +void GcodeSuite::M900_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_LINEAR_ADVANCE)); + #if EXTRUDERS < 2 + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR(" M900 K", planner.extruder_advance_K[0]); + #else + LOOP_L_N(i, EXTRUDERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR(" M900 T", i, " K", planner.extruder_advance_K[i]); + } + #endif +} + #endif // LIN_ADVANCE diff --git a/Marlin/src/gcode/feature/controllerfan/M710.cpp b/Marlin/src/gcode/feature/controllerfan/M710.cpp index aa382a3ea9eb..3b72ee002cfa 100644 --- a/Marlin/src/gcode/feature/controllerfan/M710.cpp +++ b/Marlin/src/gcode/feature/controllerfan/M710.cpp @@ -27,18 +27,6 @@ #include "../../gcode.h" #include "../../../feature/controllerfan.h" -void M710_report(const bool forReplay=true) { - if (!forReplay) { SERIAL_ECHOLNPGM("; Controller Fan"); SERIAL_ECHO_START(); } - SERIAL_ECHOLNPAIR(" M710" - " S", int(controllerFan.settings.active_speed), - " I", int(controllerFan.settings.idle_speed), - " A", int(controllerFan.settings.auto_mode), - " D", controllerFan.settings.duration, - " ; (", (int(controllerFan.settings.active_speed) * 100) / 255, "%" - " ", (int(controllerFan.settings.idle_speed) * 100) / 255, "%)" - ); -} - /** * M710: Set controller fan settings * @@ -78,4 +66,16 @@ void GcodeSuite::M710() { M710_report(); } +void GcodeSuite::M710_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_CONTROLLER_FAN)); + SERIAL_ECHOLNPAIR(" M710" + " S", int(controllerFan.settings.active_speed), + " I", int(controllerFan.settings.idle_speed), + " A", int(controllerFan.settings.auto_mode), + " D", controllerFan.settings.duration, + " ; (", (int(controllerFan.settings.active_speed) * 100) / 255, "%" + " ", (int(controllerFan.settings.idle_speed) * 100) / 255, "%)" + ); +} + #endif // CONTROLLER_FAN_EDITABLE diff --git a/Marlin/src/gcode/feature/digipot/M907-M910.cpp b/Marlin/src/gcode/feature/digipot/M907-M910.cpp index bd741f8a64b4..cde73ff271b8 100644 --- a/Marlin/src/gcode/feature/digipot/M907-M910.cpp +++ b/Marlin/src/gcode/feature/digipot/M907-M910.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM || HAS_MOTOR_CURRENT_I2C || HAS_MOTOR_CURRENT_DAC #include "../../gcode.h" @@ -44,12 +44,27 @@ void GcodeSuite::M907() { #if HAS_MOTOR_CURRENT_SPI + if (!parser.seen("BS" LOGICAL_AXES_STRING)) + return M907_report(); + LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) stepper.set_digipot_current(i, parser.value_int()); if (parser.seenval('B')) stepper.set_digipot_current(4, parser.value_int()); if (parser.seenval('S')) LOOP_LE_N(i, 4) stepper.set_digipot_current(i, parser.value_int()); #elif HAS_MOTOR_CURRENT_PWM + if (!parser.seen( + #if ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY) + "XY" + #endif + #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) + "Z" + #endif + #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) + "E" + #endif + )) return M907_report(); + #if ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY) if (parser.seenval('X') || parser.seenval('Y')) stepper.set_digipot_current(0, parser.value_int()); #endif @@ -82,7 +97,30 @@ void GcodeSuite::M907() { #endif } -#if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + + void GcodeSuite::M907_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS)); + #if HAS_MOTOR_CURRENT_PWM + SERIAL_ECHOLNPAIR_P( // PWM-based has 3 values: + PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y + , SP_Z_STR, stepper.motor_current_setting[1] // Z + , SP_E_STR, stepper.motor_current_setting[2] // E + ); + #elif HAS_MOTOR_CURRENT_SPI + SERIAL_ECHOPGM(" M907"); // SPI-based has 5 values: + LOOP_LOGICAL_AXES(q) { // X Y Z (I J K) E (map to X Y Z (I J K) E0 by default) + SERIAL_CHAR(' ', axis_codes[q]); + SERIAL_ECHO(stepper.motor_current_setting[q]); + } + SERIAL_CHAR(' ', 'B'); // B (maps to E1 by default) + SERIAL_ECHOLN(stepper.motor_current_setting[4]); + #endif + } + +#endif // HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + +#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_DAC /** * M908: Control digital trimpot directly (M908 P S) diff --git a/Marlin/src/gcode/feature/fwretract/M207-M209.cpp b/Marlin/src/gcode/feature/fwretract/M207-M209.cpp index 5793d73f948c..040a09a8e090 100644 --- a/Marlin/src/gcode/feature/fwretract/M207-M209.cpp +++ b/Marlin/src/gcode/feature/fwretract/M207-M209.cpp @@ -29,14 +29,34 @@ /** * M207: Set firmware retraction values + * + * S[+units] retract_length + * W[+units] swap_retract_length (multi-extruder) + * F[units/min] retract_feedrate_mm_s + * Z[units] retract_zraise */ void GcodeSuite::M207() { fwretract.M207(); } +void GcodeSuite::M207_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_RETRACT_S_F_Z)); + fwretract.M207_report(); +} + /** * M208: Set firmware un-retraction values + * + * S[+units] retract_recover_extra (in addition to M207 S*) + * W[+units] swap_retract_recover_extra (multi-extruder) + * F[units/min] retract_recover_feedrate_mm_s + * R[units/min] swap_retract_recover_feedrate_mm_s */ void GcodeSuite::M208() { fwretract.M208(); } +void GcodeSuite::M208_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_RECOVER_S_F)); + fwretract.M208_report(); +} + #if ENABLED(FWRETRACT_AUTORETRACT) /** @@ -47,6 +67,11 @@ void GcodeSuite::M208() { fwretract.M208(); } */ void GcodeSuite::M209() { fwretract.M209(); } + void GcodeSuite::M209_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_AUTO_RETRACT_S)); + fwretract.M209_report(); + } + #endif #endif // FWRETRACT diff --git a/Marlin/src/gcode/feature/network/M552-M554.cpp b/Marlin/src/gcode/feature/network/M552-M554.cpp index 22c718c04228..887e67f3bde0 100644 --- a/Marlin/src/gcode/feature/network/M552-M554.cpp +++ b/Marlin/src/gcode/feature/network/M552-M554.cpp @@ -64,17 +64,7 @@ void ip_report(const uint16_t cmd, PGM_P const post, const IPAddress &ipo) { if (i < 3) SERIAL_CHAR('.'); } SERIAL_ECHOPGM(" ; "); - SERIAL_ECHOPGM_P(post); - SERIAL_EOL(); -} -void M552_report() { - ip_report(552, PSTR("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip); -} -void M553_report() { - ip_report(553, PSTR("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet); -} -void M554_report() { - ip_report(554, PSTR("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway); + SERIAL_ECHOLNPGM_P(post); } /** @@ -107,20 +97,36 @@ void GcodeSuite::M552() { if (nopar || seenP) M552_report(); } +void GcodeSuite::M552_report() { + ip_report(552, PSTR("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip); +} + /** * M553 Pnnn - Set netmask */ void GcodeSuite::M553() { - if (parser.seenval('P')) ethernet.subnet.fromString(parser.value_string()); - M553_report(); + if (parser.seenval('P')) + ethernet.subnet.fromString(parser.value_string()); + else + M553_report(); +} + +void GcodeSuite::M553_report() { + ip_report(553, PSTR("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet); } /** * M554 Pnnn - Set Gateway */ void GcodeSuite::M554() { - if (parser.seenval('P')) ethernet.gateway.fromString(parser.value_string()); - M554_report(); + if (parser.seenval('P')) + ethernet.gateway.fromString(parser.value_string()); + else + M554_report(); +} + +void GcodeSuite::M554_report() { + ip_report(554, PSTR("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway); } #endif // HAS_ETHERNET diff --git a/Marlin/src/gcode/feature/pause/M603.cpp b/Marlin/src/gcode/feature/pause/M603.cpp index 9c3b774bd2b2..e26ab1c7b4c4 100644 --- a/Marlin/src/gcode/feature/pause/M603.cpp +++ b/Marlin/src/gcode/feature/pause/M603.cpp @@ -42,6 +42,8 @@ */ void GcodeSuite::M603() { + if (!parser.seen("TUL")) return M603_report(); + const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -62,4 +64,20 @@ void GcodeSuite::M603() { } } +void GcodeSuite::M603_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_FILAMENT_LOAD_UNLOAD)); + + #if EXTRUDERS == 1 + report_echo_start(forReplay); + SERIAL_ECHOPAIR(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;"); + say_units(); + #else + LOOP_L_N(e, EXTRUDERS) { + report_echo_start(forReplay); + SERIAL_ECHOPAIR(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;"); + say_units(); + } + #endif +} + #endif // ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/gcode/feature/powerloss/M413.cpp b/Marlin/src/gcode/feature/powerloss/M413.cpp index 18aeb507b1cf..b1be80619fc2 100644 --- a/Marlin/src/gcode/feature/powerloss/M413.cpp +++ b/Marlin/src/gcode/feature/powerloss/M413.cpp @@ -40,11 +40,8 @@ void GcodeSuite::M413() { if (parser.seen('S')) recovery.enable(parser.value_bool()); - else { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Power-loss recovery "); - serialprintln_onoff(recovery.enabled); - } + else + M413_report(); #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) if (parser.seen("RL")) recovery.load(); @@ -59,4 +56,10 @@ void GcodeSuite::M413() { #endif } +void GcodeSuite::M413_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_POWER_LOSS_RECOVERY)); + SERIAL_ECHOPAIR(" M413 S", AS_DIGIT(recovery.enabled), " ; "); + serialprintln_onoff(recovery.enabled); +} + #endif // POWER_LOSS_RECOVERY diff --git a/Marlin/src/gcode/feature/runout/M412.cpp b/Marlin/src/gcode/feature/runout/M412.cpp index 9a063571326f..56c7f03604ad 100644 --- a/Marlin/src/gcode/feature/runout/M412.cpp +++ b/Marlin/src/gcode/feature/runout/M412.cpp @@ -66,4 +66,16 @@ void GcodeSuite::M412() { } } +void GcodeSuite::M412_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_FILAMENT_RUNOUT_SENSOR)); + SERIAL_ECHOLNPAIR( + " M412 S", runout.enabled + #if HAS_FILAMENT_RUNOUT_DISTANCE + , " D", LINEAR_UNIT(runout.runout_distance()) + #endif + , " ; Sensor " + ); + serialprintln_onoff(runout.enabled); +} + #endif // HAS_FILAMENT_SENSOR diff --git a/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/src/gcode/feature/trinamic/M569.cpp index 9a7f1fbce902..5cadd2d45ea7 100644 --- a/Marlin/src/gcode/feature/trinamic/M569.cpp +++ b/Marlin/src/gcode/feature/trinamic/M569.cpp @@ -138,4 +138,66 @@ void GcodeSuite::M569() { say_stealth_status(); } +void GcodeSuite::M569_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_DRIVER_STEPPING_MODE)); + + auto say_M569 = [](const bool forReplay, const char * const etc=nullptr, const bool eol=false) { + if (!forReplay) SERIAL_ECHO_START(); + SERIAL_ECHOPGM(" M569 S1"); + if (etc) { + SERIAL_CHAR(' '); + SERIAL_ECHOPGM_P(etc); + } + if (eol) SERIAL_EOL(); + }; + + const bool chop_x = TERN0(X_HAS_STEALTHCHOP, stepperX.get_stored_stealthChop()), + chop_y = TERN0(Y_HAS_STEALTHCHOP, stepperY.get_stored_stealthChop()), + chop_z = TERN0(Z_HAS_STEALTHCHOP, stepperZ.get_stored_stealthChop()), + chop_i = TERN0(I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop()), + chop_j = TERN0(J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop()), + chop_k = TERN0(K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop()); + + if (chop_x || chop_y || chop_z || chop_i || chop_j || chop_k) { + say_M569(forReplay); + LINEAR_AXIS_CODE( + if (chop_x) SERIAL_ECHOPGM_P(SP_X_STR), + if (chop_y) SERIAL_ECHOPGM_P(SP_Y_STR), + if (chop_z) SERIAL_ECHOPGM_P(SP_Z_STR), + if (chop_i) SERIAL_ECHOPGM_P(SP_I_STR), + if (chop_j) SERIAL_ECHOPGM_P(SP_J_STR), + if (chop_k) SERIAL_ECHOPGM_P(SP_K_STR) + ); + SERIAL_EOL(); + } + + const bool chop_x2 = TERN0(X2_HAS_STEALTHCHOP, stepperX2.get_stored_stealthChop()), + chop_y2 = TERN0(Y2_HAS_STEALTHCHOP, stepperY2.get_stored_stealthChop()), + chop_z2 = TERN0(Z2_HAS_STEALTHCHOP, stepperZ2.get_stored_stealthChop()); + + if (chop_x2 || chop_y2 || chop_z2) { + say_M569(forReplay, PSTR("I1")); + if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR); + if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR); + if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR); + SERIAL_EOL(); + } + + if (TERN0(Z3_HAS_STEALTHCHOP, stepperZ3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I2 Z"), true); } + if (TERN0(Z4_HAS_STEALTHCHOP, stepperZ4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I3 Z"), true); } + + if (TERN0( I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop())) { say_M569(forReplay, SP_I_STR, true); } + if (TERN0( J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop())) { say_M569(forReplay, SP_J_STR, true); } + if (TERN0( K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop())) { say_M569(forReplay, SP_K_STR, true); } + + if (TERN0(E0_HAS_STEALTHCHOP, stepperE0.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T0 E"), true); } + if (TERN0(E1_HAS_STEALTHCHOP, stepperE1.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T1 E"), true); } + if (TERN0(E2_HAS_STEALTHCHOP, stepperE2.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T2 E"), true); } + if (TERN0(E3_HAS_STEALTHCHOP, stepperE3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T3 E"), true); } + if (TERN0(E4_HAS_STEALTHCHOP, stepperE4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T4 E"), true); } + if (TERN0(E5_HAS_STEALTHCHOP, stepperE5.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T5 E"), true); } + if (TERN0(E6_HAS_STEALTHCHOP, stepperE6.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T6 E"), true); } + if (TERN0(E7_HAS_STEALTHCHOP, stepperE7.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T7 E"), true); } +} + #endif // HAS_STEALTHCHOP diff --git a/Marlin/src/gcode/feature/trinamic/M906.cpp b/Marlin/src/gcode/feature/trinamic/M906.cpp index 9e56e513581d..243cf4656040 100644 --- a/Marlin/src/gcode/feature/trinamic/M906.cpp +++ b/Marlin/src/gcode/feature/trinamic/M906.cpp @@ -198,4 +198,99 @@ void GcodeSuite::M906() { } } +void GcodeSuite::M906_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_STEPPER_DRIVER_CURRENT)); + + auto say_M906 = [](const bool forReplay) { + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M906"); + }; + + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) + say_M906(forReplay); + #if AXIS_IS_TMC(X) + SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.getMilliamps()); + #endif + #if AXIS_IS_TMC(Y) + SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.getMilliamps()); + #endif + #if AXIS_IS_TMC(Z) + SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.getMilliamps()); + #endif + SERIAL_EOL(); + #endif + + #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) + say_M906(forReplay); + SERIAL_ECHOPGM(" I1"); + #if AXIS_IS_TMC(X2) + SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.getMilliamps()); + #endif + #if AXIS_IS_TMC(Y2) + SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.getMilliamps()); + #endif + #if AXIS_IS_TMC(Z2) + SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.getMilliamps()); + #endif + SERIAL_EOL(); + #endif + + #if AXIS_IS_TMC(Z3) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.getMilliamps()); + #endif + + #if AXIS_IS_TMC(Z4) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.getMilliamps()); + #endif + + #if AXIS_IS_TMC(I) + say_M906(forReplay); + SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.getMilliamps()); + #endif + #if AXIS_IS_TMC(J) + say_M906(forReplay); + SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.getMilliamps()); + #endif + #if AXIS_IS_TMC(K) + say_M906(forReplay); + SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.getMilliamps()); + #endif + + #if AXIS_IS_TMC(E0) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getMilliamps()); + #endif + #if AXIS_IS_TMC(E1) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getMilliamps()); + #endif + #if AXIS_IS_TMC(E2) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getMilliamps()); + #endif + #if AXIS_IS_TMC(E3) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getMilliamps()); + #endif + #if AXIS_IS_TMC(E4) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getMilliamps()); + #endif + #if AXIS_IS_TMC(E5) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T5 E", stepperE5.getMilliamps()); + #endif + #if AXIS_IS_TMC(E6) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T6 E", stepperE6.getMilliamps()); + #endif + #if AXIS_IS_TMC(E7) + say_M906(forReplay); + SERIAL_ECHOLNPAIR(" T7 E", stepperE7.getMilliamps()); + #endif + SERIAL_EOL(); +} + #endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp index fca16c063025..d711865480d1 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp @@ -227,6 +227,7 @@ * M913: Set HYBRID_THRESHOLD speed. */ #if ENABLED(HYBRID_THRESHOLD) + void GcodeSuite::M913() { #define TMC_SAY_PWMTHRS(A,Q) tmc_print_pwmthrs(stepper##Q) #define TMC_SET_PWMTHRS(A,Q) stepper##Q.set_pwm_thrs(value) @@ -308,12 +309,109 @@ TERN_(E7_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(7)); } } + + void GcodeSuite::M913_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_HYBRID_THRESHOLD)); + + auto say_M913 = [](const bool forReplay) { + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M913"); + }; + + #if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP + say_M913(forReplay); + #if X_HAS_STEALTHCHOP + SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.get_pwm_thrs()); + #endif + #if Y_HAS_STEALTHCHOP + SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.get_pwm_thrs()); + #endif + #if Z_HAS_STEALTHCHOP + SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.get_pwm_thrs()); + #endif + SERIAL_EOL(); + #endif + + #if X2_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOPGM(" I1"); + #if X2_HAS_STEALTHCHOP + SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.get_pwm_thrs()); + #endif + #if Y2_HAS_STEALTHCHOP + SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.get_pwm_thrs()); + #endif + #if Z2_HAS_STEALTHCHOP + SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.get_pwm_thrs()); + #endif + SERIAL_EOL(); + #endif + + #if Z3_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs()); + #endif + + #if Z4_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.get_pwm_thrs()); + #endif + + #if I_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.get_pwm_thrs()); + #endif + #if J_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.get_pwm_thrs()); + #endif + #if K_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.get_pwm_thrs()); + #endif + + #if E0_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs()); + #endif + #if E1_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs()); + #endif + #if E2_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs()); + #endif + #if E3_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs()); + #endif + #if E4_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs()); + #endif + #if E5_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs()); + #endif + #if E6_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T6 E", stepperE6.get_pwm_thrs()); + #endif + #if E7_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPAIR(" T7 E", stepperE7.get_pwm_thrs()); + #endif + SERIAL_EOL(); + } + #endif // HYBRID_THRESHOLD /** * M914: Set StallGuard sensitivity. */ #if USE_SENSORLESS + void GcodeSuite::M914() { bool report = true; @@ -412,6 +510,68 @@ #endif } } + + void GcodeSuite::M914_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_STALLGUARD_THRESHOLD)); + + auto say_M914 = [](const bool forReplay) { + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M914"); + }; + + #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS + say_M914(forReplay); + #if X_SENSORLESS + SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.homing_threshold()); + #endif + #if Y_SENSORLESS + SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.homing_threshold()); + #endif + #if Z_SENSORLESS + SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.homing_threshold()); + #endif + SERIAL_EOL(); + #endif + + #if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOPGM(" I1"); + #if X2_SENSORLESS + SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.homing_threshold()); + #endif + #if Y2_SENSORLESS + SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.homing_threshold()); + #endif + #if Z2_SENSORLESS + SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.homing_threshold()); + #endif + SERIAL_EOL(); + #endif + + #if Z3_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold()); + #endif + + #if Z4_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.homing_threshold()); + #endif + + #if I_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.homing_threshold()); + #endif + #if J_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.homing_threshold()); + #endif + #if K_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.homing_threshold()); + #endif + } + #endif // USE_SENSORLESS #endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 94496f2b2576..4c03fd9f85ac 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -102,6 +102,24 @@ uint8_t GcodeSuite::axis_relative = 0 LOGICAL_AXIS_GANG( xyz_pos_t GcodeSuite::coordinate_system[MAX_COORDINATE_SYSTEMS]; #endif +void GcodeSuite::report_echo_start(const bool forReplay) { if (!forReplay) SERIAL_ECHO_START(); } +void GcodeSuite::report_heading(const bool forReplay, PGM_P const pstr, const bool eol/*=true*/) { + if (forReplay) return; + if (pstr) { + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("; "); + SERIAL_ECHOPGM_P(pstr); + } + if (eol) { SERIAL_CHAR(':'); SERIAL_EOL(); } +} + +void GcodeSuite::say_units() { + SERIAL_ECHOLNPGM_P( + TERN_(INCH_MODE_SUPPORT, parser.linear_unit_factor != 1.0 ? PSTR(" (in)") :) + PSTR(" (mm)") + ); +} + /** * Get the target extruder from the T parameter or the active_extruder * Return -1 if the T parameter is out of range @@ -180,7 +198,7 @@ void GcodeSuite::get_destination_from_command() { recovery.save(); #endif - if (parser.linearval('F') > 0) + if (parser.floatval('F') > 0) feedrate_mm_s = parser.value_feedrate(); #if ENABLED(PRINTCOUNTER) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index ccbeda64747b..cd190387b0cf 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -383,6 +383,14 @@ class GcodeSuite { return ELAPSED(ms, previous_move_ms + stepper_inactive_time); } + static void report_echo_start(const bool forReplay); + static void report_heading(const bool forReplay, PGM_P const pstr, const bool eol=true); + static inline void report_heading_etc(const bool forReplay, PGM_P const pstr, const bool eol=true) { + report_heading(forReplay, pstr, eol); + report_echo_start(forReplay); + } + static void say_units(); + static int8_t get_target_extruder_from_command(); static int8_t get_target_e_stepper_from_command(); static void get_destination_from_command(); @@ -438,6 +446,8 @@ class GcodeSuite { private: + friend class MarlinSettings; + #if ENABLED(MARLIN_DEV_MODE) static void D(const int16_t dcode); #endif @@ -518,6 +528,7 @@ class GcodeSuite { #if ENABLED(Z_STEPPER_AUTO_ALIGN) static void M422(); + static void M422_report(const bool forReplay=true); #endif #if ENABLED(ASSISTED_TRAMMING) @@ -662,6 +673,7 @@ class GcodeSuite { static void M85(); static void M92(); + static void M92_report(const bool forReplay=true, const int8_t e=-1); #if ENABLED(M100_FREE_MEMORY_WATCHER) static void M100(); @@ -741,10 +753,12 @@ class GcodeSuite { #if PREHEAT_COUNT static void M145(); + static void M145_report(const bool forReplay=true); #endif #if ENABLED(TEMPERATURE_UNITS_SUPPORT) static void M149(); + static void M149_report(const bool forReplay=true); #endif #if HAS_COLOR_LEDS @@ -770,37 +784,51 @@ class GcodeSuite { #endif #endif - static void M200(); + #if DISABLED(NO_VOLUMETRICS) + static void M200(); + static void M200_report(const bool forReplay=true); + #endif static void M201(); + static void M201_report(const bool forReplay=true); #if 0 static void M202(); // Not used for Sprinter/grbl gen6 #endif static void M203(); + static void M203_report(const bool forReplay=true); static void M204(); + static void M204_report(const bool forReplay=true); static void M205(); + static void M205_report(const bool forReplay=true); #if HAS_M206_COMMAND static void M206(); + static void M206_report(const bool forReplay=true); #endif #if ENABLED(FWRETRACT) static void M207(); + static void M207_report(const bool forReplay=true); static void M208(); + static void M208_report(const bool forReplay=true); #if ENABLED(FWRETRACT_AUTORETRACT) static void M209(); + static void M209_report(const bool forReplay=true); #endif #endif static void M211(); + static void M211_report(const bool forReplay=true); #if HAS_MULTI_EXTRUDER static void M217(); + static void M217_report(const bool forReplay=true); #endif #if HAS_HOTEND_OFFSET static void M218(); + static void M218_report(const bool forReplay=true); #endif static void M220(); @@ -819,10 +847,12 @@ class GcodeSuite { #if HAS_LCD_CONTRAST static void M250(); + static void M250_report(const bool forReplay=true); #endif #if HAS_LCD_BRIGHTNESS static void M256(); + static void M256_report(const bool forReplay=true); #endif #if ENABLED(EXPERIMENTAL_I2CBUS) @@ -834,6 +864,7 @@ class GcodeSuite { static void M280(); #if ENABLED(EDITABLE_SERVO_ANGLES) static void M281(); + static void M281_report(const bool forReplay=true); #endif #endif @@ -847,6 +878,7 @@ class GcodeSuite { #if ENABLED(PIDTEMP) static void M301(); + static void M301_report(const bool forReplay=true, const int8_t eindex=-1); #endif #if ENABLED(PREVENT_COLD_EXTRUSION) @@ -859,6 +891,7 @@ class GcodeSuite { #if ENABLED(PIDTEMPBED) static void M304(); + static void M304_report(const bool forReplay=true); #endif #if HAS_USER_THERMISTORS @@ -867,6 +900,7 @@ class GcodeSuite { #if ENABLED(PIDTEMPCHAMBER) static void M309(); + static void M309_report(const bool forReplay=true); #endif #if HAS_MICROSTEPS @@ -915,19 +949,23 @@ class GcodeSuite { #if HAS_FILAMENT_SENSOR static void M412(); + static void M412_report(const bool forReplay=true); #endif #if HAS_MULTI_LANGUAGE static void M414(); + static void M414_report(const bool forReplay=true); #endif #if HAS_LEVELING static void M420(); + static void M420_report(const bool forReplay=true); static void M421(); #endif #if ENABLED(BACKLASH_GCODE) static void M425(); + static void M425_report(const bool forReplay=true); #endif #if HAS_M206_COMMAND @@ -972,8 +1010,16 @@ class GcodeSuite { #if HAS_ETHERNET static void M552(); + static void M552_report(); static void M553(); + static void M553_report(); static void M554(); + static void M554_report(); + #endif + + #if HAS_STEALTHCHOP + static void M569(); + static void M569_report(const bool forReplay=true); #endif #if ENABLED(BAUD_RATE_GCODE) @@ -983,6 +1029,7 @@ class GcodeSuite { #if ENABLED(ADVANCED_PAUSE_FEATURE) static void M600(); static void M603(); + static void M603_report(const bool forReplay=true); #endif #if HAS_DUPLICATION_MODE @@ -991,10 +1038,12 @@ class GcodeSuite { #if IS_KINEMATIC static void M665(); + static void M665_report(const bool forReplay=true); #endif - #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS + #if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) static void M666(); + static void M666_report(const bool forReplay=true); #endif #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD) @@ -1016,10 +1065,12 @@ class GcodeSuite { #if HAS_BED_PROBE static void M851(); + static void M851_report(const bool forReplay=true); #endif #if ENABLED(SKEW_CORRECTION_GCODE) static void M852(); + static void M852_report(const bool forReplay=true); #endif #if ENABLED(I2C_POSITION_ENCODERS) @@ -1042,23 +1093,24 @@ class GcodeSuite { #if ENABLED(LIN_ADVANCE) static void M900(); + static void M900_report(const bool forReplay=true); #endif #if HAS_TRINAMIC_CONFIG static void M122(); static void M906(); - #if HAS_STEALTHCHOP - static void M569(); - #endif + static void M906_report(const bool forReplay=true); #if ENABLED(MONITOR_DRIVER_STATUS) static void M911(); static void M912(); #endif #if ENABLED(HYBRID_THRESHOLD) static void M913(); + static void M913_report(const bool forReplay=true); #endif #if ENABLED(USE_SENSORLESS) static void M914(); + static void M914_report(const bool forReplay=true); #endif #endif @@ -1070,16 +1122,19 @@ class GcodeSuite { static void M918(); #endif - #if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM || HAS_MOTOR_CURRENT_I2C || HAS_MOTOR_CURRENT_DAC static void M907(); - #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) - static void M908(); - #if HAS_MOTOR_CURRENT_DAC - static void M909(); - static void M910(); - #endif + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + static void M907_report(const bool forReplay=true); #endif #endif + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_DAC + static void M908(); + #endif + #if HAS_MOTOR_CURRENT_DAC + static void M909(); + static void M910(); + #endif #if ENABLED(SDSUPPORT) static void M928(); @@ -1106,6 +1161,7 @@ class GcodeSuite { #if ENABLED(POWER_LOSS_RECOVERY) static void M413(); + static void M413_report(const bool forReplay=true); static void M1000(); #endif @@ -1127,6 +1183,7 @@ class GcodeSuite { #if ENABLED(CONTROLLER_FAN_EDITABLE) static void M710(); + static void M710_report(const bool forReplay=true); #endif static void T(const int8_t tool_index); diff --git a/Marlin/src/gcode/geometry/M206_M428.cpp b/Marlin/src/gcode/geometry/M206_M428.cpp index 51f3e7c14c04..ce142dacdfd1 100644 --- a/Marlin/src/gcode/geometry/M206_M428.cpp +++ b/Marlin/src/gcode/geometry/M206_M428.cpp @@ -30,19 +30,6 @@ #include "../../libs/buzzer.h" #include "../../MarlinCore.h" -void M206_report() { - SERIAL_ECHOLNPAIR_P( - LIST_N(DOUBLE(LINEAR_AXES), - PSTR("M206 X"), home_offset.x, - SP_Y_STR, home_offset.y, - SP_Z_STR, home_offset.z, - SP_I_STR, home_offset.i, - SP_J_STR, home_offset.j, - SP_K_STR, home_offset.k, - ) - ); -} - /** * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y * @@ -51,6 +38,8 @@ void M206_report() { * *** In the 2.0 release, it will simply be disabled by default. */ void GcodeSuite::M206() { + if (!parser.seen_any()) return M206_report(); + LOOP_LINEAR_AXES(i) if (parser.seen(AXIS_CHAR(i))) set_home_offset((AxisEnum)i, parser.value_linear_units()); @@ -60,10 +49,25 @@ void GcodeSuite::M206() { if (parser.seen('P')) set_home_offset(B_AXIS, parser.value_float()); // Psi #endif - if (!parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", "I", "J", "K"))) - M206_report(); - else - report_current_position(); + report_current_position(); +} + +void GcodeSuite::M206_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_HOME_OFFSET)); + SERIAL_ECHOLNPAIR_P( + #if IS_CARTESIAN + LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M206 X"), LINEAR_UNIT(home_offset.x), + SP_Y_STR, LINEAR_UNIT(home_offset.y), + SP_Z_STR, LINEAR_UNIT(home_offset.z), + SP_I_STR, LINEAR_UNIT(home_offset.i), + SP_J_STR, LINEAR_UNIT(home_offset.j), + SP_K_STR, LINEAR_UNIT(home_offset.k) + ) + #else + PSTR(" M206 Z"), LINEAR_UNIT(home_offset.z) + #endif + ); } /** diff --git a/Marlin/src/gcode/lcd/M145.cpp b/Marlin/src/gcode/lcd/M145.cpp index d6a57d22157e..cbd752d24572 100644 --- a/Marlin/src/gcode/lcd/M145.cpp +++ b/Marlin/src/gcode/lcd/M145.cpp @@ -60,4 +60,23 @@ void GcodeSuite::M145() { } } +void GcodeSuite::M145_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_MATERIAL_HEATUP)); + LOOP_L_N(i, PREHEAT_COUNT) { + report_echo_start(forReplay); + SERIAL_ECHOLNPAIR_P( + PSTR(" M145 S"), i + #if HAS_HOTEND + , PSTR(" H"), parser.to_temp_units(ui.material_preset[i].hotend_temp) + #endif + #if HAS_HEATED_BED + , SP_B_STR, parser.to_temp_units(ui.material_preset[i].bed_temp) + #endif + #if HAS_FAN + , PSTR(" F"), ui.material_preset[i].fan_speed + #endif + ); + } +} + #endif // PREHEAT_COUNT diff --git a/Marlin/src/gcode/lcd/M250.cpp b/Marlin/src/gcode/lcd/M250.cpp index f553044d31c0..2b7e3dc994e2 100644 --- a/Marlin/src/gcode/lcd/M250.cpp +++ b/Marlin/src/gcode/lcd/M250.cpp @@ -19,7 +19,6 @@ * along with this program. If not, see . * */ - #include "../../inc/MarlinConfig.h" #if HAS_LCD_CONTRAST @@ -31,8 +30,15 @@ * M250: Read and optionally set the LCD contrast */ void GcodeSuite::M250() { - if (parser.seen('C')) ui.set_contrast(parser.value_int()); - SERIAL_ECHOLNPAIR("LCD Contrast: ", ui.contrast); + if (parser.seenval('C')) + ui.set_contrast(parser.value_int()); + else + M250_report(); +} + +void GcodeSuite::M250_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_LCD_CONTRAST)); + SERIAL_ECHOLNPAIR(" M250 C", ui.contrast); } #endif // HAS_LCD_CONTRAST diff --git a/Marlin/src/gcode/lcd/M256.cpp b/Marlin/src/gcode/lcd/M256.cpp index e292acc4ed44..ff7c59fc9a9b 100644 --- a/Marlin/src/gcode/lcd/M256.cpp +++ b/Marlin/src/gcode/lcd/M256.cpp @@ -30,8 +30,15 @@ * M256: Set the LCD brightness */ void GcodeSuite::M256() { - if (parser.seenval('B')) ui.set_brightness(parser.value_int()); - SERIAL_ECHOLNPAIR("LCD Brightness: ", ui.brightness); + if (parser.seenval('B')) + ui.set_brightness(parser.value_int()); + else + M256_report(); +} + +void GcodeSuite::M256_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_LCD_BRIGHTNESS)); + SERIAL_ECHOLNPAIR(" M256 B", ui.brightness); } #endif // HAS_LCD_BRIGHTNESS diff --git a/Marlin/src/gcode/lcd/M414.cpp b/Marlin/src/gcode/lcd/M414.cpp index 760028a899f2..26ecea2083b4 100644 --- a/Marlin/src/gcode/lcd/M414.cpp +++ b/Marlin/src/gcode/lcd/M414.cpp @@ -38,7 +38,14 @@ void GcodeSuite::M414() { if (parser.seenval('S')) ui.set_language(parser.value_byte()); + else + M414_report(); } +void GcodeSuite::M414_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_UI_LANGUAGE)); + SERIAL_ECHOLNPAIR(" M414 S", ui.language); +} + #endif // HAS_MULTI_LANGUAGE diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index a819de6127f7..f8fb890695f3 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -225,9 +225,7 @@ class GCodeParser { #endif // !FASTER_GCODE_PARSER // Seen any axis parameter - static inline bool seen_axis() { - return seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR)); - } + static inline bool seen_axis() { return seen(LOGICAL_AXES_STRING); } #if ENABLED(GCODE_QUOTED_STRINGS) static char* unescape_string(char* &src); @@ -350,14 +348,15 @@ class GCodeParser { static inline void set_input_temp_units(const TempUnit units) { input_temp_units = units; } + static inline char temp_units_code() { + return input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C'; + } + static inline PGM_P temp_units_name() { + return input_temp_units == TEMPUNIT_K ? PSTR("Kelvin") : input_temp_units == TEMPUNIT_F ? PSTR("Fahrenheit") : PSTR("Celsius"); + } + #if HAS_LCD_MENU && DISABLED(DISABLE_M503) - static inline char temp_units_code() { - return input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C'; - } - static inline PGM_P temp_units_name() { - return input_temp_units == TEMPUNIT_K ? PSTR("Kelvin") : input_temp_units == TEMPUNIT_F ? PSTR("Fahrenheit") : PSTR("Celsius"); - } static inline float to_temp_units(celsius_t c) { switch (input_temp_units) { default: diff --git a/Marlin/src/gcode/probe/M851.cpp b/Marlin/src/gcode/probe/M851.cpp index ee6244932e6d..e7261b5a14be 100644 --- a/Marlin/src/gcode/probe/M851.cpp +++ b/Marlin/src/gcode/probe/M851.cpp @@ -32,19 +32,8 @@ * M851: Set the nozzle-to-probe offsets in current units */ void GcodeSuite::M851() { - - // Show usage with no parameters - if (!parser.seen("XYZ")) { - SERIAL_ECHOLNPAIR_P( - #if HAS_PROBE_XY_OFFSET - PSTR(STR_PROBE_OFFSET " X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR - #else - PSTR(STR_PROBE_OFFSET " X0 Y0 Z") - #endif - , probe.offset.z - ); - return; - } + // No parameters? Show current state. + if (!parser.seen("XYZ")) return M851_report(); // Start with current offsets and modify xyz_pos_t offs = probe.offset; @@ -94,4 +83,20 @@ void GcodeSuite::M851() { if (ok) probe.offset = offs; } +void GcodeSuite::M851_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_Z_PROBE_OFFSET)); + SERIAL_ECHOPAIR_P( + #if HAS_PROBE_XY_OFFSET + PSTR(" M851 X"), LINEAR_UNIT(probe.offset_xy.x), + SP_Y_STR, LINEAR_UNIT(probe.offset_xy.y), + SP_Z_STR + #else + PSTR(" M851 X0 Y0 Z") + #endif + , LINEAR_UNIT(probe.offset.z) + , " ;" + ); + say_units(); +} + #endif // HAS_BED_PROBE diff --git a/Marlin/src/gcode/units/M149.cpp b/Marlin/src/gcode/units/M149.cpp index 5d9f83206980..eeca59088f84 100644 --- a/Marlin/src/gcode/units/M149.cpp +++ b/Marlin/src/gcode/units/M149.cpp @@ -33,6 +33,13 @@ void GcodeSuite::M149() { if (parser.seenval('C')) parser.set_input_temp_units(TEMPUNIT_C); else if (parser.seenval('K')) parser.set_input_temp_units(TEMPUNIT_K); else if (parser.seenval('F')) parser.set_input_temp_units(TEMPUNIT_F); + else M149_report(); +} + +void GcodeSuite::M149_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_TEMPERATURE_UNITS)); + SERIAL_ECHOPAIR(" M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in "); + SERIAL_ECHOLNPGM_P(parser.temp_units_name()); } #endif // TEMPERATURE_UNITS_SUPPORT diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 0f4716ed870e..8ca19e436128 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -578,13 +578,13 @@ void _O2 Endstops::report_states() { default: continue; REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_RUNOUT) } - SERIAL_ECHOPGM(STR_FILAMENT_RUNOUT_SENSOR); + SERIAL_ECHOPGM(STR_FILAMENT); if (i > 1) SERIAL_CHAR(' ', '0' + i); print_es_state(extDigitalRead(pin) != state); } #undef _CASE_RUNOUT #elif HAS_FILAMENT_SENSOR - print_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE, PSTR(STR_FILAMENT_RUNOUT_SENSOR)); + print_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE, PSTR(STR_FILAMENT)); #endif TERN_(BLTOUCH, bltouch._reset_SW_mode()); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index c24a63ee519f..017b96cc2043 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -133,9 +133,6 @@ #endif #include "../feature/controllerfan.h" -#if ENABLED(CONTROLLER_FAN_EDITABLE) - void M710_report(const bool forReplay=true); -#endif #if ENABLED(CASE_LIGHT_ENABLE) #include "../feature/caselight.h" @@ -167,13 +164,6 @@ #if HAS_ETHERNET void ETH0_report(); void MAC_report(); - void M552_report(); - void M553_report(); - void M554_report(); -#endif - -#if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) - void M666_report(const bool forReplay=true); #endif #define _EN_ITEM(N) , E##N @@ -3012,63 +3002,19 @@ void MarlinSettings::reset() { postprocess(); - DEBUG_ECHO_START(); - DEBUG_ECHOLNPGM("Hardcoded Default Settings Loaded"); + DEBUG_ECHO_MSG("Hardcoded Default Settings Loaded"); TERN_(EXTENSIBLE_UI, ExtUI::onFactoryReset()); } #if DISABLED(DISABLE_M503) - static void config_heading(const bool repl, PGM_P const pstr, const bool eol=true) { - if (!repl) { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("; "); - SERIAL_ECHOPGM_P(pstr); - if (eol) SERIAL_EOL(); - } - } - - #define CONFIG_ECHO_START() do{ if (!forReplay) SERIAL_ECHO_START(); }while(0) + #define CONFIG_ECHO_START() gcode.report_echo_start(forReplay) #define CONFIG_ECHO_MSG(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0) - #define CONFIG_ECHO_HEADING(STR) config_heading(forReplay, PSTR(STR)) - - #if HAS_TRINAMIC_CONFIG - inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); } - #if HAS_STEALTHCHOP - void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) { - CONFIG_ECHO_START(); - SERIAL_ECHOPGM(" M569 S1"); - if (etc) { - SERIAL_CHAR(' '); - SERIAL_ECHOPGM_P(etc); - } - if (newLine) SERIAL_EOL(); - } - #endif - #if ENABLED(HYBRID_THRESHOLD) - inline void say_M913(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M913"); } - #endif - #if USE_SENSORLESS - inline void say_M914() { SERIAL_ECHOPGM(" M914"); } - #endif - #endif - - #if ENABLED(ADVANCED_PAUSE_FEATURE) - inline void say_M603(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M603 "); } - #endif + #define CONFIG_ECHO_MSG_P(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR_P(V); }while(0) + #define CONFIG_ECHO_HEADING(STR) gcode.report_heading(forReplay, PSTR(STR)) - inline void say_units(const bool colon) { - SERIAL_ECHOPGM_P( - #if ENABLED(INCH_MODE_SUPPORT) - parser.linear_unit_factor != 1.0 ? PSTR(" (in)") : - #endif - PSTR(" (mm)") - ); - if (colon) SERIAL_ECHOLNPGM(":"); - } - - void report_M92(const bool echo=true, const int8_t e=-1); + void M92_report(const bool echo=true, const int8_t e=-1); /** * M503 - Report current settings in RAM @@ -3076,228 +3022,73 @@ void MarlinSettings::reset() { * Unless specifically disabled, M503 is available even without EEPROM */ void MarlinSettings::report(const bool forReplay) { - /** - * Announce current units, in case inches are being displayed - */ - CONFIG_ECHO_START(); + // + // Announce current units, in case inches are being displayed + // + CONFIG_ECHO_HEADING("Linear Units"); #if ENABLED(INCH_MODE_SUPPORT) - SERIAL_ECHOPGM(" G2"); - SERIAL_CHAR(parser.linear_unit_factor == 1.0 ? '1' : '0'); - SERIAL_ECHOPGM(" ;"); - say_units(false); + SERIAL_ECHOPAIR(" G2", AS_DIGIT(parser.linear_unit_factor == 1.0), " ;"); #else - SERIAL_ECHOPGM(" G21 ; Units in mm"); - say_units(false); + SERIAL_ECHOPGM(" G21 ;"); #endif - SERIAL_EOL(); - - #if HAS_LCD_MENU - - // Temperature units - for Ultipanel temperature options - - CONFIG_ECHO_START(); - #if ENABLED(TEMPERATURE_UNITS_SUPPORT) - SERIAL_ECHOPGM(" M149 "); - SERIAL_CHAR(parser.temp_units_code()); - SERIAL_ECHOPGM(" ; Units in "); - SERIAL_ECHOPGM_P(parser.temp_units_name()); - #else - SERIAL_ECHOLNPGM(" M149 C ; Units in Celsius"); - #endif + gcode.say_units(); + // + // M149 Temperature units + // + #if ENABLED(TEMPERATURE_UNITS_SUPPORT) + gcode.M149_report(forReplay); + #else + CONFIG_ECHO_HEADING(STR_TEMPERATURE_UNITS); + CONFIG_ECHO_MSG(" M149 C ; Units in Celsius"); #endif - SERIAL_EOL(); - - #if EXTRUDERS && DISABLED(NO_VOLUMETRICS) - - /** - * Volumetric extrusion M200 - */ - if (!forReplay) { - config_heading(forReplay, PSTR("Filament settings:"), false); - if (parser.volumetric_enabled) - SERIAL_EOL(); - else - SERIAL_ECHOLNPGM(" Disabled"); - } + // + // M200 Volumetric Extrusion + // + IF_DISABLED(NO_VOLUMETRICS, gcode.M200_report(forReplay)); - #if EXTRUDERS == 1 - CONFIG_ECHO_MSG(" M200 S", parser.volumetric_enabled - , " D", LINEAR_UNIT(planner.filament_size[0]) - #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) - , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0]) - #endif - ); - #else - LOOP_L_N(i, EXTRUDERS) { - CONFIG_ECHO_MSG(" M200 T", i - , " D", LINEAR_UNIT(planner.filament_size[i]) - #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) - , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i]) - #endif - ); - } - CONFIG_ECHO_MSG(" M200 S", parser.volumetric_enabled); - #endif + // + // M92 Steps per Unit + // + gcode.M92_report(forReplay); - #endif // EXTRUDERS && !NO_VOLUMETRICS - - CONFIG_ECHO_HEADING("Steps per unit:"); - report_M92(!forReplay); - - CONFIG_ECHO_HEADING("Maximum feedrates (units/s):"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - LIST_N(DOUBLE(LINEAR_AXES), - PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]), - SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]), - SP_Z_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS]), - SP_I_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[I_AXIS]), - SP_J_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[J_AXIS]), - SP_K_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[K_AXIS]) - ) - #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS]) - #endif - ); - #if ENABLED(DISTINCT_E_FACTORS) - LOOP_L_N(i, E_STEPPERS) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M203 T"), i - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)]) - ); - } - #endif + // + // M203 Maximum feedrates (units/s) + // + gcode.M203_report(forReplay); - CONFIG_ECHO_HEADING("Maximum Acceleration (units/s2):"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - LIST_N(DOUBLE(LINEAR_AXES), - PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]), - SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]), - SP_Z_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS]), - SP_I_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[I_AXIS]), - SP_J_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[J_AXIS]), - SP_K_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[K_AXIS]) - ) - #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS]) - #endif - ); - #if ENABLED(DISTINCT_E_FACTORS) - LOOP_L_N(i, E_STEPPERS) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M201 T"), i - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)]) - ); - } - #endif + // + // M201 Maximum Acceleration (units/s2) + // + gcode.M201_report(forReplay); - CONFIG_ECHO_HEADING("Acceleration (units/s2): P R T"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration) - , PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration) - , SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration) - ); + // + // M204 Acceleration (units/s2) + // + gcode.M204_report(forReplay); - CONFIG_ECHO_HEADING( - "Advanced: B S T" - TERN_(HAS_JUNCTION_DEVIATION, " J") - #if HAS_CLASSIC_JERK - " X Y Z" - TERN_(HAS_CLASSIC_E_JERK, " E") - #endif - ); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us) - , PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s) - , SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s) - #if HAS_JUNCTION_DEVIATION - , PSTR(" J"), LINEAR_UNIT(planner.junction_deviation_mm) - #endif - #if HAS_CLASSIC_JERK - , LIST_N(DOUBLE(LINEAR_AXES), - SP_X_STR, LINEAR_UNIT(planner.max_jerk.x), - SP_Y_STR, LINEAR_UNIT(planner.max_jerk.y), - SP_Z_STR, LINEAR_UNIT(planner.max_jerk.z), - SP_I_STR, LINEAR_UNIT(planner.max_jerk.i), - SP_J_STR, LINEAR_UNIT(planner.max_jerk.j), - SP_K_STR, LINEAR_UNIT(planner.max_jerk.k) - ) - #if HAS_CLASSIC_E_JERK - , SP_E_STR, LINEAR_UNIT(planner.max_jerk.e) - #endif - #endif - ); + // + // M205 "Advanced" Settings + // + gcode.M205_report(forReplay); - #if HAS_M206_COMMAND - CONFIG_ECHO_HEADING("Home offset:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - #if IS_CARTESIAN - LIST_N(DOUBLE(LINEAR_AXES), - PSTR(" M206 X"), LINEAR_UNIT(home_offset.x), - SP_Y_STR, LINEAR_UNIT(home_offset.y), - SP_Z_STR, LINEAR_UNIT(home_offset.z), - SP_I_STR, LINEAR_UNIT(home_offset.i), - SP_J_STR, LINEAR_UNIT(home_offset.j), - SP_K_STR, LINEAR_UNIT(home_offset.k) - ) - #else - PSTR(" M206 Z"), LINEAR_UNIT(home_offset.z) - #endif - ); - #endif + // + // M206 Home Offset + // + TERN_(HAS_M206_COMMAND, gcode.M206_report(forReplay)); - #if HAS_HOTEND_OFFSET - CONFIG_ECHO_HEADING("Hotend offsets:"); - CONFIG_ECHO_START(); - LOOP_S_L_N(e, 1, HOTENDS) { - SERIAL_ECHOPAIR_P( - PSTR(" M218 T"), e, - SP_X_STR, LINEAR_UNIT(hotend_offset[e].x), - SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y) - ); - SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(hotend_offset[e].z), 3); - } - #endif + // + // M218 Hotend offsets + // + TERN_(HAS_HOTEND_OFFSET, gcode.M218_report(forReplay)); - /** - * Bed Leveling - */ + // + // Bed Leveling + // #if HAS_LEVELING - #if ENABLED(MESH_BED_LEVELING) - - CONFIG_ECHO_HEADING("Mesh Bed Leveling:"); - - #elif ENABLED(AUTO_BED_LEVELING_UBL) - - config_heading(forReplay, NUL_STR, false); - if (!forReplay) { - ubl.echo_name(); - SERIAL_CHAR(':'); - SERIAL_EOL(); - } - - #elif HAS_ABL_OR_UBL - - CONFIG_ECHO_HEADING("Auto Bed Leveling:"); - - #endif - - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M420 S"), planner.leveling_active - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - , SP_Z_STR, LINEAR_UNIT(planner.z_fade_height) - #endif - ); + gcode.M420_report(forReplay); #if ENABLED(MESH_BED_LEVELING) @@ -3318,11 +3109,8 @@ void MarlinSettings::reset() { if (!forReplay) { SERIAL_EOL(); ubl.report_state(); - config_heading(false, PSTR("Active Mesh Slot: "), false); - SERIAL_ECHOLN(ubl.storage_slot); - config_heading(false, PSTR("EEPROM can hold "), false); - SERIAL_ECHO(calc_num_meshes()); - SERIAL_ECHOLNPGM(" meshes.\n"); + SERIAL_ECHO_MSG("Active Mesh Slot ", ubl.storage_slot); + SERIAL_ECHO_MSG("EEPROM can hold ", calc_num_meshes(), " meshes.\n"); } //ubl.report_current_mesh(); // This is too verbose for large meshes. A better (more terse) @@ -3343,602 +3131,150 @@ void MarlinSettings::reset() { #endif // HAS_LEVELING - #if ENABLED(EDITABLE_SERVO_ANGLES) - - CONFIG_ECHO_HEADING("Servo Angles:"); - LOOP_L_N(i, NUM_SERVOS) { - switch (i) { - #if ENABLED(SWITCHING_EXTRUDER) - case SWITCHING_EXTRUDER_SERVO_NR: - #if EXTRUDERS > 3 - case SWITCHING_EXTRUDER_E23_SERVO_NR: - #endif - #elif ENABLED(SWITCHING_NOZZLE) - case SWITCHING_NOZZLE_SERVO_NR: - #elif ENABLED(BLTOUCH) || (HAS_Z_SERVO_PROBE && defined(Z_SERVO_ANGLES)) - case Z_PROBE_SERVO_NR: - #endif - CONFIG_ECHO_MSG(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]); - default: break; - } - } - - #endif // EDITABLE_SERVO_ANGLES - - #if HAS_SCARA_OFFSET - - CONFIG_ECHO_HEADING("SCARA settings: S P T"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M665 S"), segments_per_second - , SP_P_STR, scara_home_offset.a - , SP_T_STR, scara_home_offset.b - , SP_Z_STR, LINEAR_UNIT(scara_home_offset.z) - ); - - #elif ENABLED(DELTA) - - CONFIG_ECHO_HEADING("Delta settings: L R H S XYZ ABC"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod) - , PSTR(" R"), LINEAR_UNIT(delta_radius) - , PSTR(" H"), LINEAR_UNIT(delta_height) - , PSTR(" S"), segments_per_second - , SP_X_STR, LINEAR_UNIT(delta_tower_angle_trim.a) - , SP_Y_STR, LINEAR_UNIT(delta_tower_angle_trim.b) - , SP_Z_STR, LINEAR_UNIT(delta_tower_angle_trim.c) - , PSTR(" A"), LINEAR_UNIT(delta_diagonal_rod_trim.a) - , PSTR(" B"), LINEAR_UNIT(delta_diagonal_rod_trim.b) - , PSTR(" C"), LINEAR_UNIT(delta_diagonal_rod_trim.c) - ); + // + // Editable Servo Angles + // + TERN_(EDITABLE_SERVO_ANGLES, gcode.M281_report(forReplay)); - #endif + // + // Delta / SCARA Kinematics + // + TERN_(IS_KINEMATIC, gcode.M665_report(forReplay)); + // + // M666 Endstops Adjustment + // #if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) - M666_report(forReplay); + gcode.M666_report(forReplay); #endif - #if PREHEAT_COUNT - - CONFIG_ECHO_HEADING("Material heatup parameters:"); - LOOP_L_N(i, PREHEAT_COUNT) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M145 S"), i - #if HAS_HOTEND - , PSTR(" H"), parser.to_temp_units(ui.material_preset[i].hotend_temp) - #endif - #if HAS_HEATED_BED - , SP_B_STR, parser.to_temp_units(ui.material_preset[i].bed_temp) - #endif - #if HAS_FAN - , PSTR(" F"), ui.material_preset[i].fan_speed - #endif - ); - } + // + // Z Auto-Align + // + TERN_(Z_STEPPER_AUTO_ALIGN, gcode.M422_report(forReplay)); + // + // LCD Preheat Settings + // + #if PREHEAT_COUNT + gcode.M145_report(forReplay); #endif - #if HAS_PID_HEATING - - CONFIG_ECHO_HEADING("PID settings:"); - - #if ENABLED(PIDTEMP) - HOTEND_LOOP() { - CONFIG_ECHO_START(); - SERIAL_ECHOPAIR_P( - #if ENABLED(PID_PARAMS_PER_HOTEND) - PSTR(" M301 E"), e, - SP_P_STR - #else - PSTR(" M301 P") - #endif - , PID_PARAM(Kp, e) - , PSTR(" I"), unscalePID_i(PID_PARAM(Ki, e)) - , PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e)) - ); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR_P(SP_C_STR, PID_PARAM(Kc, e)); - if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len); - #endif - #if ENABLED(PID_FAN_SCALING) - SERIAL_ECHOPAIR(" F", PID_PARAM(Kf, e)); - #endif - SERIAL_EOL(); - } - #endif // PIDTEMP - - #if ENABLED(PIDTEMPBED) - CONFIG_ECHO_MSG( - " M304 P", thermalManager.temp_bed.pid.Kp - , " I", unscalePID_i(thermalManager.temp_bed.pid.Ki) - , " D", unscalePID_d(thermalManager.temp_bed.pid.Kd) - ); - #endif - - #if ENABLED(PIDTEMPCHAMBER) - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR( - " M309 P", thermalManager.temp_chamber.pid.Kp - , " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki) - , " D", unscalePID_d(thermalManager.temp_chamber.pid.Kd) - ); - #endif - - #endif // PIDTEMP || PIDTEMPBED || PIDTEMPCHAMBER + // + // PID + // + TERN_(PIDTEMP, gcode.M301_report(forReplay)); + TERN_(PIDTEMPBED, gcode.M304_report(forReplay)); + TERN_(PIDTEMPCHAMBER, gcode.M309_report(forReplay)); #if HAS_USER_THERMISTORS - CONFIG_ECHO_HEADING("User thermistors:"); LOOP_L_N(i, USER_THERMISTORS) - thermalManager.log_user_thermistor(i, true); + thermalManager.M305_report(i, forReplay); #endif - #if HAS_LCD_CONTRAST - CONFIG_ECHO_HEADING("LCD Contrast:"); - CONFIG_ECHO_MSG(" M250 C", ui.contrast); - #endif + // + // LCD Contrast + // + TERN_(HAS_LCD_CONTRAST, gcode.M250_report(forReplay)); - #if HAS_LCD_BRIGHTNESS - CONFIG_ECHO_HEADING("LCD Brightness:"); - CONFIG_ECHO_MSG(" M256 B", ui.brightness); - #endif + // + // LCD Brightness + // + TERN_(HAS_LCD_BRIGHTNESS, gcode.M256_report(forReplay)); - TERN_(CONTROLLER_FAN_EDITABLE, M710_report(forReplay)); + // + // Controller Fan + // + TERN_(CONTROLLER_FAN_EDITABLE, gcode.M710_report(forReplay)); - #if ENABLED(POWER_LOSS_RECOVERY) - CONFIG_ECHO_HEADING("Power-Loss Recovery:"); - CONFIG_ECHO_MSG(" M413 S", recovery.enabled); - #endif + // + // Power-Loss Recovery + // + TERN_(POWER_LOSS_RECOVERY, gcode.M413_report(forReplay)); + // + // Firmware Retraction + // #if ENABLED(FWRETRACT) - fwretract.M207_report(forReplay); - fwretract.M208_report(forReplay); - TERN_(FWRETRACT_AUTORETRACT, fwretract.M209_report(forReplay)); + gcode.M207_report(forReplay); + gcode.M208_report(forReplay); + TERN_(FWRETRACT_AUTORETRACT, gcode.M209_report(forReplay)); #endif - /** - * Probe Offset - */ - #if HAS_BED_PROBE - config_heading(forReplay, PSTR("Z-Probe Offset"), false); - if (!forReplay) say_units(true); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - #if HAS_PROBE_XY_OFFSET - PSTR(" M851 X"), LINEAR_UNIT(probe.offset_xy.x), - SP_Y_STR, LINEAR_UNIT(probe.offset_xy.y), - SP_Z_STR - #else - PSTR(" M851 X0 Y0 Z") - #endif - , LINEAR_UNIT(probe.offset.z) - ); - #endif + // + // Probe Offset + // + TERN_(HAS_BED_PROBE, gcode.M851_report(forReplay)); - /** - * Bed Skew Correction - */ - #if ENABLED(SKEW_CORRECTION_GCODE) - CONFIG_ECHO_HEADING("Skew Factor: "); - CONFIG_ECHO_START(); - #if ENABLED(SKEW_CORRECTION_FOR_Z) - SERIAL_ECHOPAIR_F(" M852 I", LINEAR_UNIT(planner.skew_factor.xy), 6); - SERIAL_ECHOPAIR_F(" J", LINEAR_UNIT(planner.skew_factor.xz), 6); - SERIAL_ECHOLNPAIR_F(" K", LINEAR_UNIT(planner.skew_factor.yz), 6); - #else - SERIAL_ECHOLNPAIR_F(" M852 S", LINEAR_UNIT(planner.skew_factor.xy), 6); - #endif - #endif + // + // Bed Skew Correction + // + TERN_(SKEW_CORRECTION_GCODE, gcode.M852_report(forReplay)); #if HAS_TRINAMIC_CONFIG + // + // TMC Stepper driver current + // + gcode.M906_report(forReplay); - /** - * TMC stepper driver current - */ - CONFIG_ECHO_HEADING("Stepper driver current:"); - - #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) - say_M906(forReplay); - #if AXIS_IS_TMC(X) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.getMilliamps()); - #endif - #if AXIS_IS_TMC(Y) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.getMilliamps()); - #endif - #if AXIS_IS_TMC(Z) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.getMilliamps()); - #endif - SERIAL_EOL(); - #endif - - #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) - say_M906(forReplay); - SERIAL_ECHOPGM(" I1"); - #if AXIS_IS_TMC(X2) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.getMilliamps()); - #endif - #if AXIS_IS_TMC(Y2) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.getMilliamps()); - #endif - #if AXIS_IS_TMC(Z2) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.getMilliamps()); - #endif - SERIAL_EOL(); - #endif - - #if AXIS_IS_TMC(Z3) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.getMilliamps()); - #endif - - #if AXIS_IS_TMC(Z4) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.getMilliamps()); - #endif - - #if AXIS_IS_TMC(I) - say_M906(forReplay); - SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.getMilliamps()); - #endif - #if AXIS_IS_TMC(J) - say_M906(forReplay); - SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.getMilliamps()); - #endif - #if AXIS_IS_TMC(K) - say_M906(forReplay); - SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.getMilliamps()); - #endif - - #if AXIS_IS_TMC(E0) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getMilliamps()); - #endif - #if AXIS_IS_TMC(E1) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getMilliamps()); - #endif - #if AXIS_IS_TMC(E2) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getMilliamps()); - #endif - #if AXIS_IS_TMC(E3) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getMilliamps()); - #endif - #if AXIS_IS_TMC(E4) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getMilliamps()); - #endif - #if AXIS_IS_TMC(E5) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T5 E", stepperE5.getMilliamps()); - #endif - #if AXIS_IS_TMC(E6) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T6 E", stepperE6.getMilliamps()); - #endif - #if AXIS_IS_TMC(E7) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T7 E", stepperE7.getMilliamps()); - #endif - SERIAL_EOL(); - - /** - * TMC Hybrid Threshold - */ - #if ENABLED(HYBRID_THRESHOLD) - CONFIG_ECHO_HEADING("Hybrid Threshold:"); - #if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP - say_M913(forReplay); - #if X_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.get_pwm_thrs()); - #endif - #if Y_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.get_pwm_thrs()); - #endif - #if Z_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.get_pwm_thrs()); - #endif - SERIAL_EOL(); - #endif - - #if X2_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOPGM(" I1"); - #if X2_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.get_pwm_thrs()); - #endif - #if Y2_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.get_pwm_thrs()); - #endif - #if Z2_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.get_pwm_thrs()); - #endif - SERIAL_EOL(); - #endif - - #if Z3_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs()); - #endif - - #if Z4_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.get_pwm_thrs()); - #endif - - #if I_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.get_pwm_thrs()); - #endif - #if J_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.get_pwm_thrs()); - #endif - #if K_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.get_pwm_thrs()); - #endif - - #if E0_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs()); - #endif - #if E1_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs()); - #endif - #if E2_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs()); - #endif - #if E3_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs()); - #endif - #if E4_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs()); - #endif - #if E5_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs()); - #endif - #if E6_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T6 E", stepperE6.get_pwm_thrs()); - #endif - #if E7_HAS_STEALTHCHOP - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T7 E", stepperE7.get_pwm_thrs()); - #endif - SERIAL_EOL(); - #endif // HYBRID_THRESHOLD - - /** - * TMC Sensorless homing thresholds - */ - #if USE_SENSORLESS - CONFIG_ECHO_HEADING("StallGuard threshold:"); - #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - #if X_SENSORLESS - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.homing_threshold()); - #endif - #if Y_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.homing_threshold()); - #endif - #if Z_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.homing_threshold()); - #endif - SERIAL_EOL(); - #endif - - #if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOPGM(" I1"); - #if X2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.homing_threshold()); - #endif - #if Y2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.homing_threshold()); - #endif - #if Z2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.homing_threshold()); - #endif - SERIAL_EOL(); - #endif - - #if Z3_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold()); - #endif - - #if Z4_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.homing_threshold()); - #endif - - #if I_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.homing_threshold()); - #endif - #if J_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.homing_threshold()); - #endif - #if K_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.homing_threshold()); - #endif - - #endif // USE_SENSORLESS - - /** - * TMC stepping mode - */ - #if HAS_STEALTHCHOP - CONFIG_ECHO_HEADING("Driver stepping mode:"); - const bool chop_x = TERN0(X_HAS_STEALTHCHOP, stepperX.get_stored_stealthChop()), - chop_y = TERN0(Y_HAS_STEALTHCHOP, stepperY.get_stored_stealthChop()), - chop_z = TERN0(Z_HAS_STEALTHCHOP, stepperZ.get_stored_stealthChop()), - chop_i = TERN0(I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop()), - chop_j = TERN0(J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop()), - chop_k = TERN0(K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop()); - - if (chop_x || chop_y || chop_z || chop_i || chop_j || chop_k) { - say_M569(forReplay); - LINEAR_AXIS_CODE( - if (chop_x) SERIAL_ECHOPGM_P(SP_X_STR), - if (chop_y) SERIAL_ECHOPGM_P(SP_Y_STR), - if (chop_z) SERIAL_ECHOPGM_P(SP_Z_STR), - if (chop_i) SERIAL_ECHOPGM_P(SP_I_STR), - if (chop_j) SERIAL_ECHOPGM_P(SP_J_STR), - if (chop_k) SERIAL_ECHOPGM_P(SP_K_STR) - ); - SERIAL_EOL(); - } + // + // TMC Hybrid Threshold + // + TERN_(HYBRID_THRESHOLD, gcode.M913_report(forReplay)); - const bool chop_x2 = TERN0(X2_HAS_STEALTHCHOP, stepperX2.get_stored_stealthChop()), - chop_y2 = TERN0(Y2_HAS_STEALTHCHOP, stepperY2.get_stored_stealthChop()), - chop_z2 = TERN0(Z2_HAS_STEALTHCHOP, stepperZ2.get_stored_stealthChop()); + // + // TMC Sensorless homing thresholds + // + TERN_(USE_SENSORLESS, gcode.M914_report(forReplay)); + #endif - if (chop_x2 || chop_y2 || chop_z2) { - say_M569(forReplay, PSTR("I1")); - if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR); - if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR); - if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR); - SERIAL_EOL(); - } + // + // TMC stepping mode + // + TERN_(HAS_STEALTHCHOP, gcode.M569_report(forReplay)); - if (TERN0(Z3_HAS_STEALTHCHOP, stepperZ3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I2 Z"), true); } - if (TERN0(Z4_HAS_STEALTHCHOP, stepperZ4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I3 Z"), true); } - - if (TERN0( I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop())) { say_M569(forReplay, SP_I_STR, true); } - if (TERN0( J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop())) { say_M569(forReplay, SP_J_STR, true); } - if (TERN0( K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop())) { say_M569(forReplay, SP_K_STR, true); } - - if (TERN0(E0_HAS_STEALTHCHOP, stepperE0.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T0 E"), true); } - if (TERN0(E1_HAS_STEALTHCHOP, stepperE1.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T1 E"), true); } - if (TERN0(E2_HAS_STEALTHCHOP, stepperE2.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T2 E"), true); } - if (TERN0(E3_HAS_STEALTHCHOP, stepperE3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T3 E"), true); } - if (TERN0(E4_HAS_STEALTHCHOP, stepperE4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T4 E"), true); } - if (TERN0(E5_HAS_STEALTHCHOP, stepperE5.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T5 E"), true); } - if (TERN0(E6_HAS_STEALTHCHOP, stepperE6.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T6 E"), true); } - if (TERN0(E7_HAS_STEALTHCHOP, stepperE7.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T7 E"), true); } - - #endif // HAS_STEALTHCHOP - - #endif // HAS_TRINAMIC_CONFIG - - /** - * Linear Advance - */ - #if ENABLED(LIN_ADVANCE) - CONFIG_ECHO_HEADING("Linear Advance:"); - #if EXTRUDERS < 2 - CONFIG_ECHO_MSG(" M900 K", planner.extruder_advance_K[0]); - #else - LOOP_L_N(i, EXTRUDERS) - CONFIG_ECHO_MSG(" M900 T", i, " K", planner.extruder_advance_K[i]); - #endif - #endif + // + // Linear Advance + // + TERN_(LIN_ADVANCE, gcode.M900_report(forReplay)); - #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM) - CONFIG_ECHO_HEADING("Stepper motor currents:"); - CONFIG_ECHO_START(); - #if HAS_MOTOR_CURRENT_PWM - SERIAL_ECHOLNPAIR_P( // PWM-based has 3 values: - PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y - , SP_Z_STR, stepper.motor_current_setting[1] // Z - , SP_E_STR, stepper.motor_current_setting[2] // E - ); - #elif HAS_MOTOR_CURRENT_SPI - SERIAL_ECHOPGM(" M907"); // SPI-based has 5 values: - LOOP_LOGICAL_AXES(q) { // X Y Z (I J K) E (map to X Y Z (I J K) E0 by default) - SERIAL_CHAR(' ', axis_codes[q]); - SERIAL_ECHO(stepper.motor_current_setting[q]); - } - SERIAL_CHAR(' ', 'B'); // B (maps to E1 by default) - SERIAL_ECHOLN(stepper.motor_current_setting[4]); - #endif - #elif HAS_MOTOR_CURRENT_I2C // i2c-based has any number of values - // Values sent over i2c are not stored. - // Indexes map directly to drivers, not axes. - #elif HAS_MOTOR_CURRENT_DAC // DAC-based has 4 values, for X Y Z (I J K) E - // Values sent over i2c are not stored. Uses indirect mapping. + // + // Motor Current (SPI or PWM) + // + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + gcode.M907_report(forReplay); #endif - /** - * Advanced Pause filament load & unload lengths - */ - #if ENABLED(ADVANCED_PAUSE_FEATURE) - CONFIG_ECHO_HEADING("Filament load/unload lengths:"); - #if EXTRUDERS == 1 - say_M603(forReplay); - SERIAL_ECHOLNPAIR("L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length)); - #else - auto echo_603 = [](const bool f, const uint8_t n) { say_M603(f); SERIAL_ECHOLNPAIR("T", n, " L", LINEAR_UNIT(fc_settings[n].load_length), " U", LINEAR_UNIT(fc_settings[n].unload_length)); }; - LOOP_L_N(i, EXTRUDERS) echo_603(forReplay, i); - #endif - #endif + // + // Advanced Pause filament load & unload lengths + // + TERN_(ADVANCED_PAUSE_FEATURE, gcode.M603_report(forReplay)); - #if HAS_MULTI_EXTRUDER - CONFIG_ECHO_HEADING("Tool-changing:"); - CONFIG_ECHO_START(); - M217_report(true); - #endif + // + // Tool-changing Parameters + // + TERN_(HAS_MULTI_EXTRUDER, gcode.M217_report(forReplay)); - #if ENABLED(BACKLASH_GCODE) - CONFIG_ECHO_HEADING("Backlash compensation:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M425 F"), backlash.get_correction() - , LIST_N(DOUBLE(LINEAR_AXES), - SP_X_STR, LINEAR_UNIT(backlash.distance_mm.x), - SP_Y_STR, LINEAR_UNIT(backlash.distance_mm.y), - SP_Z_STR, LINEAR_UNIT(backlash.distance_mm.z), - SP_I_STR, LINEAR_UNIT(backlash.distance_mm.i), - SP_J_STR, LINEAR_UNIT(backlash.distance_mm.j), - SP_K_STR, LINEAR_UNIT(backlash.distance_mm.k) - ) - #ifdef BACKLASH_SMOOTHING_MM - , PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm) - #endif - ); - #endif + // + // Backlash Compensation + // + TERN_(BACKLASH_GCODE, gcode.M425_report(forReplay)); - #if HAS_FILAMENT_SENSOR - CONFIG_ECHO_HEADING("Filament runout sensor:"); - CONFIG_ECHO_MSG( - " M412 S", runout.enabled - #if HAS_FILAMENT_RUNOUT_DISTANCE - , " D", LINEAR_UNIT(runout.runout_distance()) - #endif - ); - #endif + // + // Filament Runout Sensor + // + TERN_(HAS_FILAMENT_SENSOR, gcode.M412_report(forReplay)); #if HAS_ETHERNET - CONFIG_ECHO_HEADING("Ethernet:"); - if (!forReplay) { CONFIG_ECHO_START(); ETH0_report(); } + CONFIG_ECHO_HEADING("Ethernet"); + if (!forReplay) ETH0_report(); CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); MAC_report(); - CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M552_report(); - CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M553_report(); - CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M554_report(); + CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); gcode.M552_report(); + CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); gcode.M553_report(); + CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); gcode.M554_report(); #endif - #if HAS_MULTI_LANGUAGE - CONFIG_ECHO_HEADING("UI Language:"); - CONFIG_ECHO_MSG(" M414 S", ui.language); - #endif + TERN_(HAS_MULTI_LANGUAGE, gcode.M414_report(forReplay)); } #endif // !DISABLE_M503 diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 1bb86ed4c7e0..934f734e9cec 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -59,6 +59,10 @@ #include "../feature/host_actions.h" #endif +#if HAS_TEMP_SENSOR + #include "../gcode/gcode.h" +#endif + // MAX TC related macros #define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) #define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) @@ -1722,13 +1726,9 @@ void Temperature::manage_heater() { COPY(user_thermistor, default_user_thermistor); } - void Temperature::log_user_thermistor(const uint8_t t_index, const bool eprom/*=false*/) { - - if (eprom) - SERIAL_ECHOPGM(" M305 "); - else - SERIAL_ECHO_START(); - SERIAL_CHAR('P', '0' + t_index); + void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) { + gcode.report_heading_etc(forReplay, PSTR(STR_USER_THERMISTORS)); + SERIAL_ECHOPAIR(" M305 P", AS_DIGIT(t_index)); const user_thermistor_t &t = user_thermistor[t_index]; @@ -1794,13 +1794,13 @@ void Temperature::manage_heater() { // Derived from RepRap FiveD extruder::getTemperature() // For hot end temperature measurement. celsius_float_t Temperature::analog_to_celsius_hotend(const int16_t raw, const uint8_t e) { - if (e >= HOTENDS) { - SERIAL_ERROR_START(); - SERIAL_ECHO(e); - SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER_NUM); - kill(); - return 0; - } + if (e >= HOTENDS) { + SERIAL_ERROR_START(); + SERIAL_ECHO(e); + SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER_NUM); + kill(); + return 0; + } switch (e) { case 0: @@ -3490,9 +3490,6 @@ void Temperature::isr() { } #if HAS_TEMP_SENSOR - - #include "../gcode/gcode.h" - /** * Print a single heater state in the form: * Bed: " B:nnn.nn /nnn.nn" diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index c78dfa937217..1675507f8616 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -527,7 +527,7 @@ class Temperature { #if HAS_USER_THERMISTORS static user_thermistor_t user_thermistor[USER_THERMISTORS]; - static void log_user_thermistor(const uint8_t t_index, const bool eprom=false); + static void M305_report(const uint8_t t_index, const bool forReplay=true); static void reset_user_thermistors(); static celsius_float_t user_thermistor_to_deg_c(const uint8_t t_index, const int16_t raw); static inline bool set_pull_up_res(int8_t t_index, float value) { From 754b31918a73cb08c322102be5d3926d2ac59c18 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 9 Sep 2021 04:57:05 -0500 Subject: [PATCH 321/323] =?UTF-8?q?=F0=9F=8E=A8=20Fewer=20serial=20macros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/fastio.cpp | 10 +-- Marlin/src/HAL/AVR/pinsDebug.h | 16 ++-- Marlin/src/HAL/DUE/eeprom_flash.cpp | 34 ++++----- Marlin/src/HAL/DUE/pinsDebug.h | 2 +- Marlin/src/HAL/ESP32/wifi.cpp | 2 +- Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp | 8 +- Marlin/src/HAL/SAMD51/pinsDebug.h | 2 +- Marlin/src/HAL/STM32/eeprom_flash.cpp | 16 ++-- Marlin/src/HAL/STM32/pinsDebug.h | 2 +- Marlin/src/HAL/STM32/usb_host.cpp | 6 +- Marlin/src/HAL/shared/Delay.cpp | 6 +- Marlin/src/MarlinCore.cpp | 4 +- Marlin/src/core/bug_on.h | 12 +-- Marlin/src/core/debug_out.h | 22 ++---- Marlin/src/core/serial.cpp | 2 +- Marlin/src/core/serial.h | 36 ++++----- Marlin/src/core/utility.cpp | 12 +-- Marlin/src/feature/backlash.cpp | 4 +- Marlin/src/feature/bedlevel/abl/abl.cpp | 10 +-- Marlin/src/feature/bedlevel/ubl/ubl.cpp | 2 +- Marlin/src/feature/bedlevel/ubl/ubl.h | 8 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 60 +++++++-------- Marlin/src/feature/binary_stream.h | 14 ++-- Marlin/src/feature/bltouch.cpp | 8 +- Marlin/src/feature/dac/stepper_dac.cpp | 8 +- Marlin/src/feature/encoder_i2c.cpp | 54 +++++++------- Marlin/src/feature/encoder_i2c.h | 12 +-- Marlin/src/feature/fwretract.cpp | 34 ++++----- Marlin/src/feature/joystick.cpp | 6 +- Marlin/src/feature/max7219.cpp | 2 +- Marlin/src/feature/meatpack.cpp | 2 +- Marlin/src/feature/mixing.cpp | 4 +- Marlin/src/feature/mixing.h | 2 +- Marlin/src/feature/mmu/mmu2.cpp | 18 ++--- Marlin/src/feature/pause.cpp | 18 ++--- Marlin/src/feature/powerloss.cpp | 34 ++++----- Marlin/src/feature/probe_temp_comp.cpp | 4 +- Marlin/src/feature/repeat.cpp | 8 +- Marlin/src/feature/runout.cpp | 2 +- Marlin/src/feature/runout.h | 6 +- Marlin/src/feature/tmc_util.cpp | 4 +- Marlin/src/feature/tmc_util.h | 4 +- Marlin/src/feature/twibus.cpp | 2 +- Marlin/src/gcode/bedlevel/G26.cpp | 2 +- Marlin/src/gcode/bedlevel/G35.cpp | 14 ++-- Marlin/src/gcode/bedlevel/M420.cpp | 10 +-- Marlin/src/gcode/bedlevel/abl/G29.cpp | 18 ++--- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 6 +- Marlin/src/gcode/calibrate/G28.cpp | 4 +- Marlin/src/gcode/calibrate/G33.cpp | 6 +- Marlin/src/gcode/calibrate/G34_M422.cpp | 26 +++---- Marlin/src/gcode/calibrate/G425.cpp | 74 +++++++++---------- Marlin/src/gcode/calibrate/G76_M192_M871.cpp | 10 +-- Marlin/src/gcode/calibrate/M100.cpp | 36 ++++----- Marlin/src/gcode/calibrate/M425.cpp | 6 +- Marlin/src/gcode/calibrate/M48.cpp | 8 +- Marlin/src/gcode/calibrate/M665.cpp | 4 +- Marlin/src/gcode/calibrate/M666.cpp | 18 ++--- Marlin/src/gcode/config/M200-M205.cpp | 18 ++--- Marlin/src/gcode/config/M217.cpp | 20 ++--- Marlin/src/gcode/config/M218.cpp | 2 +- Marlin/src/gcode/config/M220.cpp | 2 +- Marlin/src/gcode/config/M221.cpp | 2 +- Marlin/src/gcode/config/M281.cpp | 2 +- Marlin/src/gcode/config/M301.cpp | 8 +- Marlin/src/gcode/config/M302.cpp | 2 +- Marlin/src/gcode/config/M309.cpp | 2 +- Marlin/src/gcode/config/M43.cpp | 12 +-- Marlin/src/gcode/config/M92.cpp | 10 +-- Marlin/src/gcode/control/M111.cpp | 8 +- Marlin/src/gcode/control/M211.cpp | 2 +- Marlin/src/gcode/control/M605.cpp | 30 ++++---- Marlin/src/gcode/control/M993_M994.cpp | 4 +- Marlin/src/gcode/control/T.cpp | 2 +- Marlin/src/gcode/eeprom/M500-M504.cpp | 6 +- Marlin/src/gcode/feature/L6470/M122.cpp | 2 +- Marlin/src/gcode/feature/L6470/M906.cpp | 12 +-- Marlin/src/gcode/feature/L6470/M916-918.cpp | 28 +++---- Marlin/src/gcode/feature/advance/M900.cpp | 10 +-- .../src/gcode/feature/controllerfan/M710.cpp | 2 +- .../src/gcode/feature/digipot/M907-M910.cpp | 2 +- .../src/gcode/feature/filwidth/M404-M407.cpp | 4 +- Marlin/src/gcode/feature/mixing/M166.cpp | 6 +- .../src/gcode/feature/password/M510-M512.cpp | 2 +- Marlin/src/gcode/feature/pause/G60.cpp | 2 +- Marlin/src/gcode/feature/pause/G61.cpp | 4 +- Marlin/src/gcode/feature/pause/M603.cpp | 4 +- .../src/gcode/feature/power_monitor/M430.cpp | 2 +- Marlin/src/gcode/feature/powerloss/M413.cpp | 2 +- Marlin/src/gcode/feature/runout/M412.cpp | 4 +- Marlin/src/gcode/feature/trinamic/M906.cpp | 38 +++++----- .../src/gcode/feature/trinamic/M911-M914.cpp | 60 +++++++-------- Marlin/src/gcode/gcode.cpp | 6 +- Marlin/src/gcode/gcode_d.cpp | 6 +- Marlin/src/gcode/geometry/G53-G59.cpp | 4 +- Marlin/src/gcode/geometry/M206_M428.cpp | 2 +- Marlin/src/gcode/host/M114.cpp | 2 +- Marlin/src/gcode/host/M115.cpp | 2 +- Marlin/src/gcode/host/M360.cpp | 2 +- Marlin/src/gcode/lcd/M145.cpp | 2 +- Marlin/src/gcode/lcd/M250.cpp | 2 +- Marlin/src/gcode/lcd/M256.cpp | 2 +- Marlin/src/gcode/lcd/M414.cpp | 2 +- Marlin/src/gcode/motion/M290.cpp | 8 +- Marlin/src/gcode/parser.cpp | 16 ++-- Marlin/src/gcode/parser.h | 4 +- Marlin/src/gcode/probe/G30.cpp | 2 +- Marlin/src/gcode/probe/M851.cpp | 12 +-- Marlin/src/gcode/probe/M951.cpp | 14 ++-- Marlin/src/gcode/queue.cpp | 14 ++-- Marlin/src/gcode/units/M149.cpp | 2 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 2 +- Marlin/src/lcd/e3v2/enhanced/dwin.cpp | 2 +- .../extui/anycubic_chiron/FileNavigator.cpp | 14 ++-- .../extui/anycubic_chiron/chiron_extui.cpp | 4 +- .../lcd/extui/anycubic_chiron/chiron_tft.cpp | 58 +++++++-------- .../anycubic_i3mega/anycubic_i3mega_lcd.cpp | 6 +- Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp | 18 ++--- .../src/lcd/extui/dgus/DGUSScreenHandler.cpp | 60 +++++++-------- .../extui/dgus/fysetc/DGUSScreenHandler.cpp | 20 ++--- .../extui/dgus/hiprecy/DGUSScreenHandler.cpp | 20 ++--- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 48 ++++++------ .../extui/dgus/origin/DGUSScreenHandler.cpp | 20 ++--- .../lcd/extui/dgus_reloaded/DGUSDisplay.cpp | 26 +++---- .../archim2-flash/flash_storage.cpp | 12 +-- .../ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 2 +- .../ftdi_eve_lib/basic/commands.cpp | 4 +- .../ftdi_eve_touch_ui/ftdi_eve_lib/compat.h | 8 +- .../ftdi_eve_lib/extended/dl_cache.cpp | 12 +-- .../ftdi_eve_lib/extended/screen_types.cpp | 2 +- .../ftdi_eve_lib/extended/screen_types.h | 2 +- Marlin/src/lcd/extui/malyan/malyan.cpp | 14 ++-- Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 2 +- Marlin/src/lcd/extui/mks_ui/pic_manager.cpp | 12 +-- .../src/lcd/extui/nextion/FileNavigator.cpp | 8 +- Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 12 +-- Marlin/src/lcd/marlinui.cpp | 12 +-- Marlin/src/lcd/menu/menu_configuration.cpp | 2 +- Marlin/src/lcd/menu/menu_tramming.cpp | 6 +- Marlin/src/lcd/tft/tft_string.cpp | 30 ++++---- Marlin/src/lcd/tft_io/touch_calibration.cpp | 10 +-- Marlin/src/libs/L64XX/L64XX_Marlin.cpp | 14 ++-- Marlin/src/libs/MAX31865.cpp | 10 +-- Marlin/src/libs/bresenham.h | 4 +- Marlin/src/module/delta.cpp | 4 +- Marlin/src/module/endstops.cpp | 4 +- Marlin/src/module/motion.cpp | 60 +++++++-------- Marlin/src/module/planner.cpp | 46 ++++++------ Marlin/src/module/printcounter.cpp | 14 ++-- Marlin/src/module/probe.cpp | 20 ++--- Marlin/src/module/scara.cpp | 24 +++--- Marlin/src/module/settings.cpp | 22 +++--- Marlin/src/module/stepper.cpp | 4 +- Marlin/src/module/temperature.cpp | 44 +++++------ Marlin/src/module/tool_change.cpp | 34 ++++----- Marlin/src/sd/cardreader.cpp | 50 ++++++------- .../sd/usb_flashdrive/Sd2Card_FlashDrive.cpp | 20 ++--- .../sd/usb_flashdrive/lib-uhs2/usbhost.cpp | 2 +- docs/Serial.md | 8 +- 159 files changed, 1002 insertions(+), 1014 deletions(-) diff --git a/Marlin/src/HAL/AVR/fastio.cpp b/Marlin/src/HAL/AVR/fastio.cpp index 70132e71ee54..8af3ef805efa 100644 --- a/Marlin/src/HAL/AVR/fastio.cpp +++ b/Marlin/src/HAL/AVR/fastio.cpp @@ -267,11 +267,11 @@ uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb SET_WGM(5, FAST_PWM_ICRn); // Fast PWM with ICR5 as TOP //SERIAL_ECHOLNPGM("Timer 5 Settings:"); - //SERIAL_ECHOLNPAIR(" Prescaler=", prescaler); - //SERIAL_ECHOLNPAIR(" TOP=", ICR5); - //SERIAL_ECHOLNPAIR(" OCR5A=", OCR5A); - //SERIAL_ECHOLNPAIR(" OCR5B=", OCR5B); - //SERIAL_ECHOLNPAIR(" OCR5C=", OCR5C); + //SERIAL_ECHOLNPGM(" Prescaler=", prescaler); + //SERIAL_ECHOLNPGM(" TOP=", ICR5); + //SERIAL_ECHOLNPGM(" OCR5A=", OCR5A); + //SERIAL_ECHOLNPGM(" OCR5B=", OCR5B); + //SERIAL_ECHOLNPGM(" OCR5C=", OCR5C); } else { // Restore the default for Timer 5 diff --git a/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/src/HAL/AVR/pinsDebug.h index 50da32292b2b..5fc48a1edc07 100644 --- a/Marlin/src/HAL/AVR/pinsDebug.h +++ b/Marlin/src/HAL/AVR/pinsDebug.h @@ -235,9 +235,9 @@ static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); inline void com_print(const uint8_t N, const uint8_t Z) { const uint8_t *TCCRA = (uint8_t*)TCCR_A(N); - SERIAL_ECHOPAIR(" COM", AS_DIGIT(N)); + SERIAL_ECHOPGM(" COM", AS_DIGIT(N)); SERIAL_CHAR(Z); - SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03)); + SERIAL_ECHOPGM(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03)); } void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - WGM bit layout @@ -247,7 +247,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1)))); if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1); - SERIAL_ECHOPAIR(" TIMER", AS_DIGIT(T)); + SERIAL_ECHOPGM(" TIMER", AS_DIGIT(T)); SERIAL_CHAR(L); SERIAL_ECHO_SP(3); @@ -259,14 +259,14 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - const uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A'); PWM_PRINT(*OCRVAL16); } - SERIAL_ECHOPAIR(" WGM: ", WGM); + SERIAL_ECHOPGM(" WGM: ", WGM); com_print(T,L); - SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) )); - SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "A: ", *TCCRA); - SERIAL_ECHOPAIR(" TCCR", AS_DIGIT(T), "B: ", *TCCRB); + SERIAL_ECHOPGM(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) )); + SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "A: ", *TCCRA); + SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "B: ", *TCCRB); const uint8_t *TMSK = (uint8_t*)TIMSK(T); - SERIAL_ECHOPAIR(" TIMSK", AS_DIGIT(T), ": ", *TMSK); + SERIAL_ECHOPGM(" TIMSK", AS_DIGIT(T), ": ", *TMSK); const uint8_t OCIE = L - 'A' + 1; if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); } diff --git a/Marlin/src/HAL/DUE/eeprom_flash.cpp b/Marlin/src/HAL/DUE/eeprom_flash.cpp index b4cb9912b24f..7ce4a84df531 100644 --- a/Marlin/src/HAL/DUE/eeprom_flash.cpp +++ b/Marlin/src/HAL/DUE/eeprom_flash.cpp @@ -200,9 +200,9 @@ static bool ee_PageWrite(uint16_t page, const void *data) { pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i])); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM PageWrite ", page); - DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash); - DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0)); + DEBUG_ECHOLNPGM("EEPROM PageWrite ", page); + DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash); + DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0)); DEBUG_FLUSH(); // Get the page relative to the start of the EFC controller, and the EFC controller to use @@ -246,7 +246,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ", page); + DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ", page); return false; } @@ -271,7 +271,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Write failure for page ", page); + DEBUG_ECHOLNPGM("EEPROM Write failure for page ", page); return false; } @@ -287,7 +287,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) { #ifdef EE_EMU_DEBUG DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Verify Write failure for page ", page); + DEBUG_ECHOLNPGM("EEPROM Verify Write failure for page ", page); ee_Dump( page, (uint32_t *)addrflash); ee_Dump(-page, data); @@ -306,7 +306,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) { } } } - DEBUG_ECHOLNPAIR("--> Differing bits: ", count); + DEBUG_ECHOLNPGM("--> Differing bits: ", count); #endif return false; @@ -326,9 +326,9 @@ static bool ee_PageErase(uint16_t page) { uint32_t addrflash = uint32_t(getFlashStorage(page)); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM PageErase ", page); - DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash); - DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0)); + DEBUG_ECHOLNPGM("EEPROM PageErase ", page); + DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash); + DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0)); DEBUG_FLUSH(); // Get the page relative to the start of the EFC controller, and the EFC controller to use @@ -371,7 +371,7 @@ static bool ee_PageErase(uint16_t page) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ",page); + DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ",page); return false; } @@ -395,7 +395,7 @@ static bool ee_PageErase(uint16_t page) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Erase failure for page ",page); + DEBUG_ECHOLNPGM("EEPROM Erase failure for page ",page); return false; } @@ -411,7 +411,7 @@ static bool ee_PageErase(uint16_t page) { for (i = 0; i < PageSize >> 2; i++) { if (*aligned_src++ != 0xFFFFFFFF) { DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page); + DEBUG_ECHOLNPGM("EEPROM Verify Erase failure for page ",page); ee_Dump(page, (uint32_t *)addrflash); return false; } @@ -922,7 +922,7 @@ static void ee_Init() { if (curGroup >= GroupCount) curGroup = 0; DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Current Group: ",curGroup); + DEBUG_ECHOLNPGM("EEPROM Current Group: ",curGroup); DEBUG_FLUSH(); // Now, validate that all the other group pages are empty @@ -932,7 +932,7 @@ static void ee_Init() { for (int page = 0; page < PagesPerGroup; page++) { if (!ee_IsPageClean(grp * PagesPerGroup + page)) { DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp); + DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on group ", grp); DEBUG_FLUSH(); ee_PageErase(grp * PagesPerGroup + page); } @@ -949,14 +949,14 @@ static void ee_Init() { } DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Active page: ", curPage); + DEBUG_ECHOLNPGM("EEPROM Active page: ", curPage); DEBUG_FLUSH(); // Make sure the pages following the first clean one are also clean for (int page = curPage + 1; page < PagesPerGroup; page++) { if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) { DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup); + DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on active group ", curGroup); DEBUG_FLUSH(); ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page)); ee_PageErase(curGroup * PagesPerGroup + page); diff --git a/Marlin/src/HAL/DUE/pinsDebug.h b/Marlin/src/HAL/DUE/pinsDebug.h index 02a5e6646f38..225ba95ce9ff 100644 --- a/Marlin/src/HAL/DUE/pinsDebug.h +++ b/Marlin/src/HAL/DUE/pinsDebug.h @@ -87,7 +87,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input void pwm_details(int32_t pin) { if (pwm_status(pin)) { uint32_t chan = g_APinDescription[pin].ulPWMChannel; - SERIAL_ECHOPAIR("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY); + SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY); } } diff --git a/Marlin/src/HAL/ESP32/wifi.cpp b/Marlin/src/HAL/ESP32/wifi.cpp index f4cf5a606a03..060f3bdb4874 100644 --- a/Marlin/src/HAL/ESP32/wifi.cpp +++ b/Marlin/src/HAL/ESP32/wifi.cpp @@ -59,7 +59,7 @@ void wifi_init() { MDNS.addService("http", "tcp", 80); - SERIAL_ECHOLNPAIR("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str()); + SERIAL_ECHOLNPGM("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str()); } #endif // WIFISUPPORT diff --git a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp index 70395251df25..122c8ef81a18 100644 --- a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp @@ -84,15 +84,15 @@ static void debug_rw(const bool write, int &pos, const uint8_t *value, const siz PGM_P const rw_str = write ? PSTR("write") : PSTR("read"); SERIAL_CHAR(' '); SERIAL_ECHOPGM_P(rw_str); - SERIAL_ECHOLNPAIR("_data(", pos, ",", value, ",", size, ", ...)"); + SERIAL_ECHOLNPGM("_data(", pos, ",", value, ",", size, ", ...)"); if (total) { SERIAL_ECHOPGM(" f_"); SERIAL_ECHOPGM_P(rw_str); - SERIAL_ECHOPAIR("()=", s, "\n size=", size, "\n bytes_"); - SERIAL_ECHOLNPAIR_P(write ? PSTR("written=") : PSTR("read="), total); + SERIAL_ECHOPGM("()=", s, "\n size=", size, "\n bytes_"); + SERIAL_ECHOLNPGM_P(write ? PSTR("written=") : PSTR("read="), total); } else - SERIAL_ECHOLNPAIR(" f_lseek()=", s); + SERIAL_ECHOLNPGM(" f_lseek()=", s); } // File function return codes for type FRESULT. This goes away soon, but diff --git a/Marlin/src/HAL/SAMD51/pinsDebug.h b/Marlin/src/HAL/SAMD51/pinsDebug.h index 5c86d0c07179..f0a46fd7c567 100644 --- a/Marlin/src/HAL/SAMD51/pinsDebug.h +++ b/Marlin/src/HAL/SAMD51/pinsDebug.h @@ -48,7 +48,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input void pwm_details(int32_t pin) { if (pwm_status(pin)) { //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; - //SERIAL_ECHOPAIR("PWM = ", duty); + //SERIAL_ECHOPGM("PWM = ", duty); } } diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index e785e5924988..252b057362c9 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -133,7 +133,7 @@ bool PersistentStore::access_start() { // load current settings uint8_t *eeprom_data = (uint8_t *)SLOT_ADDRESS(current_slot); for (int i = 0; i < MARLIN_EEPROM_SIZE; i++) ram_eeprom[i] = eeprom_data[i]; - DEBUG_ECHOLNPAIR("EEPROM loaded from slot ", current_slot, "."); + DEBUG_ECHOLNPGM("EEPROM loaded from slot ", current_slot, "."); } eeprom_data_written = false; } @@ -179,9 +179,9 @@ bool PersistentStore::access_finish() { ENABLE_ISRS(); TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT()); if (status != HAL_OK) { - DEBUG_ECHOLNPAIR("HAL_FLASHEx_Erase=", status); - DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError()); - DEBUG_ECHOLNPAIR("SectorError=", SectorError); + DEBUG_ECHOLNPGM("HAL_FLASHEx_Erase=", status); + DEBUG_ECHOLNPGM("GetError=", HAL_FLASH_GetError()); + DEBUG_ECHOLNPGM("SectorError=", SectorError); LOCK_FLASH(); return false; } @@ -204,9 +204,9 @@ bool PersistentStore::access_finish() { offset += sizeof(uint32_t); } else { - DEBUG_ECHOLNPAIR("HAL_FLASH_Program=", status); - DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError()); - DEBUG_ECHOLNPAIR("address=", address); + DEBUG_ECHOLNPGM("HAL_FLASH_Program=", status); + DEBUG_ECHOLNPGM("GetError=", HAL_FLASH_GetError()); + DEBUG_ECHOLNPGM("address=", address); success = false; break; } @@ -216,7 +216,7 @@ bool PersistentStore::access_finish() { if (success) { eeprom_data_written = false; - DEBUG_ECHOLNPAIR("EEPROM saved to slot ", current_slot, "."); + DEBUG_ECHOLNPGM("EEPROM saved to slot ", current_slot, "."); } return success; diff --git a/Marlin/src/HAL/STM32/pinsDebug.h b/Marlin/src/HAL/STM32/pinsDebug.h index ff671a6ebf3f..c77dbc4c7557 100644 --- a/Marlin/src/HAL/STM32/pinsDebug.h +++ b/Marlin/src/HAL/STM32/pinsDebug.h @@ -237,7 +237,7 @@ void pwm_details(const pin_t Ard_num) { if (over_7) pin_number -= 8; uint8_t alt_func = (alt_all >> (4 * pin_number)) & 0x0F; - SERIAL_ECHOPAIR("Alt Function: ", alt_func); + SERIAL_ECHOPGM("Alt Function: ", alt_func); if (alt_func < 10) SERIAL_CHAR(' '); SERIAL_ECHOPGM(" - "); switch (alt_func) { diff --git a/Marlin/src/HAL/STM32/usb_host.cpp b/Marlin/src/HAL/STM32/usb_host.cpp index d2d1d69a1a8d..f0879a36a448 100644 --- a/Marlin/src/HAL/STM32/usb_host.cpp +++ b/Marlin/src/HAL/STM32/usb_host.cpp @@ -88,9 +88,9 @@ void USBHost::setUsbTaskState(uint8_t state) { capacity = info.capacity.block_nbr / 2000; block_size = info.capacity.block_size; block_count = info.capacity.block_nbr; - // SERIAL_ECHOLNPAIR("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr); - // SERIAL_ECHOLNPAIR("info.capacity.block_size: %d\n", info.capacity.block_size); - // SERIAL_ECHOLNPAIR("capacity : %d MB\n", capacity); + //SERIAL_ECHOLNPGM("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr); + //SERIAL_ECHOLNPGM("info.capacity.block_size: %d\n", info.capacity.block_size); + //SERIAL_ECHOLNPGM("capacity : %d MB\n", capacity); } }; diff --git a/Marlin/src/HAL/shared/Delay.cpp b/Marlin/src/HAL/shared/Delay.cpp index 129698fd306d..05af38307b37 100644 --- a/Marlin/src/HAL/shared/Delay.cpp +++ b/Marlin/src/HAL/shared/Delay.cpp @@ -110,16 +110,16 @@ auto report_call_time = [](PGM_P const name, PGM_P const unit, const uint32_t cycles, const uint32_t total, const bool do_flush=true) { SERIAL_ECHOPGM("Calling "); SERIAL_ECHOPGM_P(name); - SERIAL_ECHOLNPAIR(" for ", cycles); + SERIAL_ECHOLNPGM(" for ", cycles); SERIAL_ECHOPGM_P(unit); - SERIAL_ECHOLNPAIR(" took: ", total); + SERIAL_ECHOLNPGM(" took: ", total); SERIAL_ECHOPGM_P(unit); if (do_flush) SERIAL_FLUSHTX(); }; uint32_t s, e; - SERIAL_ECHOLNPAIR("Computed delay calibration value: ", ASM_CYCLES_PER_ITERATION); + SERIAL_ECHOLNPGM("Computed delay calibration value: ", ASM_CYCLES_PER_ITERATION); SERIAL_FLUSH(); // Display the results of the calibration above constexpr uint32_t testValues[] = { 1, 5, 10, 20, 50, 100, 150, 200, 350, 500, 750, 1000 }; diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 49db8c61b930..5bbfcd087b76 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -798,7 +798,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { void idle(bool no_stepper_sleep/*=false*/) { #if ENABLED(MARLIN_DEV_MODE) static uint16_t idle_depth = 0; - if (++idle_depth > 5) SERIAL_ECHOLNPAIR("idle() call depth: ", idle_depth); + if (++idle_depth > 5) SERIAL_ECHOLNPGM("idle() call depth: ", idle_depth); #endif // Core Marlin activities @@ -1623,7 +1623,7 @@ void setup() { #if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN) const millis_t elapsed = millis() - bootscreen_ms; #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("elapsed=", elapsed); + SERIAL_ECHOLNPGM("elapsed=", elapsed); #endif SETUP_RUN(ui.bootscreen_completion(elapsed)); #endif diff --git a/Marlin/src/core/bug_on.h b/Marlin/src/core/bug_on.h index cc745f259b7b..7f1243ed40b6 100644 --- a/Marlin/src/core/bug_on.h +++ b/Marlin/src/core/bug_on.h @@ -20,19 +20,19 @@ */ #pragma once -// We need SERIAL_ECHOPAIR and macros.h +// We need SERIAL_ECHOPGM and macros.h #include "serial.h" #if ENABLED(POSTMORTEM_DEBUGGING) // Useful macro for stopping the CPU on an unexpected condition - // This is used like SERIAL_ECHOPAIR, that is: a key-value call of the local variables you want + // This is used like SERIAL_ECHOPGM, that is: a key-value call of the local variables you want // to dump to the serial port before stopping the CPU. - // \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building - #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": "); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0) + // \/ Don't replace by SERIAL_ECHOPGM since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building + #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": "); SERIAL_ECHOLNPGM(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0) #elif ENABLED(MARLIN_DEV_MODE) // Don't stop the CPU here, but at least dump the bug on the serial port - // \/ Don't replace by SERIAL_ECHOPAIR since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building - #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPAIR(V); SERIAL_FLUSHTX(); } while(0) + // \/ Don't replace by SERIAL_ECHOPGM since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building + #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPGM(V); SERIAL_FLUSHTX(); } while(0) #else // Release mode, let's ignore the bug #define BUG_ON(V...) NOOP diff --git a/Marlin/src/core/debug_out.h b/Marlin/src/core/debug_out.h index a7dc32622d1e..3187e03254aa 100644 --- a/Marlin/src/core/debug_out.h +++ b/Marlin/src/core/debug_out.h @@ -27,7 +27,6 @@ // #undef DEBUG_SECTION -#undef DEBUG_ECHOPGM_P #undef DEBUG_ECHO_START #undef DEBUG_ERROR_START #undef DEBUG_CHAR @@ -37,12 +36,10 @@ #undef DEBUG_ECHOLN #undef DEBUG_ECHOPGM #undef DEBUG_ECHOLNPGM -#undef DEBUG_ECHOPAIR -#undef DEBUG_ECHOPAIR_P +#undef DEBUG_ECHOPGM_P +#undef DEBUG_ECHOLNPGM_P #undef DEBUG_ECHOPAIR_F #undef DEBUG_ECHOPAIR_F_P -#undef DEBUG_ECHOLNPAIR -#undef DEBUG_ECHOLNPAIR_P #undef DEBUG_ECHOLNPAIR_F #undef DEBUG_ECHOLNPAIR_F_P #undef DEBUG_ECHO_MSG @@ -69,12 +66,12 @@ #define DEBUG_ECHOLN SERIAL_ECHOLN #define DEBUG_ECHOPGM SERIAL_ECHOPGM #define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM - #define DEBUG_ECHOPAIR SERIAL_ECHOPAIR - #define DEBUG_ECHOPAIR_P SERIAL_ECHOPAIR_P + #define DEBUG_ECHOPGM SERIAL_ECHOPGM + #define DEBUG_ECHOPGM_P SERIAL_ECHOPGM_P #define DEBUG_ECHOPAIR_F SERIAL_ECHOPAIR_F #define DEBUG_ECHOPAIR_F_P SERIAL_ECHOPAIR_F_P - #define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR - #define DEBUG_ECHOLNPAIR_P SERIAL_ECHOLNPAIR_P + #define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM + #define DEBUG_ECHOLNPGM_P SERIAL_ECHOLNPGM_P #define DEBUG_ECHOLNPAIR_F SERIAL_ECHOLNPAIR_F #define DEBUG_ECHOLNPAIR_F_P SERIAL_ECHOLNPAIR_F_P #define DEBUG_ECHO_MSG SERIAL_ECHO_MSG @@ -89,7 +86,6 @@ #else #define DEBUG_SECTION(...) NOOP - #define DEBUG_ECHOPGM_P(P) NOOP #define DEBUG_ECHO_START() NOOP #define DEBUG_ERROR_START() NOOP #define DEBUG_CHAR(...) NOOP @@ -99,12 +95,10 @@ #define DEBUG_ECHOLN(...) NOOP #define DEBUG_ECHOPGM(...) NOOP #define DEBUG_ECHOLNPGM(...) NOOP - #define DEBUG_ECHOPAIR(...) NOOP - #define DEBUG_ECHOPAIR_P(...) NOOP + #define DEBUG_ECHOPGM_P(...) NOOP + #define DEBUG_ECHOLNPGM_P(...) NOOP #define DEBUG_ECHOPAIR_F(...) NOOP #define DEBUG_ECHOPAIR_F_P(...) NOOP - #define DEBUG_ECHOLNPAIR(...) NOOP - #define DEBUG_ECHOLNPAIR_P(...) NOOP #define DEBUG_ECHOLNPAIR_F(...) NOOP #define DEBUG_ECHOLNPAIR_F_P(...) NOOP #define DEBUG_ECHO_MSG(...) NOOP diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp index 50cc50ad574a..8c9f4a8e4d16 100644 --- a/Marlin/src/core/serial.cpp +++ b/Marlin/src/core/serial.cpp @@ -96,7 +96,7 @@ void print_bin(uint16_t val) { void print_pos(LINEAR_AXIS_ARGS(const_float_t), PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) { if (prefix) serialprintPGM(prefix); - SERIAL_ECHOPAIR_P( + SERIAL_ECHOPGM_P( LIST_N(DOUBLE(LINEAR_AXES), SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z, SP_I_STR, i, SP_J_STR, j, SP_K_STR, k) ); if (suffix) serialprintPGM(suffix); else SERIAL_EOL(); diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index a3d640ee1a76..05d80a48298d 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -188,44 +188,44 @@ inline void SERIAL_FLUSHTX() { SERIAL_IMPL.flushTX(); } void serialprintPGM(PGM_P str); // -// SERIAL_ECHOPAIR... macros are used to output string-value pairs. +// SERIAL_ECHOPGM... macros are used to output string-value pairs. // // Print up to 20 pairs of values. Odd elements must be literal strings. #define __SEP_N(N,V...) _SEP_##N(V) #define _SEP_N(N,V...) __SEP_N(N,V) #define _SEP_N_REF() _SEP_N -#define _SEP_1(s) SERIAL_ECHOPGM(s); +#define _SEP_1(s) serialprintPGM(PSTR(s)); #define _SEP_2(s,v) serial_echopair_PGM(PSTR(s),v); #define _SEP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SEP_N_REF)()(TWO_ARGS(V),V); -#define SERIAL_ECHOPAIR(V...) do{ EVAL(_SEP_N(TWO_ARGS(V),V)); }while(0) +#define SERIAL_ECHOPGM(V...) do{ EVAL(_SEP_N(TWO_ARGS(V),V)); }while(0) // Print up to 20 pairs of values followed by newline. Odd elements must be literal strings. #define __SELP_N(N,V...) _SELP_##N(V) #define _SELP_N(N,V...) __SELP_N(N,V) #define _SELP_N_REF() _SELP_N -#define _SELP_1(s) SERIAL_ECHOLNPGM(s); +#define _SELP_1(s) serialprintPGM(PSTR(s "\n")); #define _SELP_2(s,v) serial_echopair_PGM(PSTR(s),v); SERIAL_EOL(); #define _SELP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SELP_N_REF)()(TWO_ARGS(V),V); -#define SERIAL_ECHOLNPAIR(V...) do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0) +#define SERIAL_ECHOLNPGM(V...) do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0) // Print up to 20 pairs of values. Odd elements must be PSTR pointers. #define __SEP_N_P(N,V...) _SEP_##N##_P(V) #define _SEP_N_P(N,V...) __SEP_N_P(N,V) #define _SEP_N_P_REF() _SEP_N_P -#define _SEP_1_P(s) serialprintPGM(s); -#define _SEP_2_P(s,v) serial_echopair_PGM(s,v); -#define _SEP_3_P(s,v,V...) _SEP_2_P(s,v); DEFER2(_SEP_N_P_REF)()(TWO_ARGS(V),V); -#define SERIAL_ECHOPAIR_P(V...) do{ EVAL(_SEP_N_P(TWO_ARGS(V),V)); }while(0) +#define _SEP_1_P(p) serialprintPGM(p); +#define _SEP_2_P(p,v) serial_echopair_PGM(p,v); +#define _SEP_3_P(p,v,V...) _SEP_2_P(p,v); DEFER2(_SEP_N_P_REF)()(TWO_ARGS(V),V); +#define SERIAL_ECHOPGM_P(V...) do{ EVAL(_SEP_N_P(TWO_ARGS(V),V)); }while(0) // Print up to 20 pairs of values followed by newline. Odd elements must be PSTR pointers. #define __SELP_N_P(N,V...) _SELP_##N##_P(V) #define _SELP_N_P(N,V...) __SELP_N_P(N,V) #define _SELP_N_P_REF() _SELP_N_P -#define _SELP_1_P(s) { serialprintPGM(s); SERIAL_EOL(); } -#define _SELP_2_P(s,v) { serial_echopair_PGM(s,v); SERIAL_EOL(); } -#define _SELP_3_P(s,v,V...) { _SEP_2_P(s,v); DEFER2(_SELP_N_P_REF)()(TWO_ARGS(V),V); } -#define SERIAL_ECHOLNPAIR_P(V...) do{ EVAL(_SELP_N_P(TWO_ARGS(V),V)); }while(0) +#define _SELP_1_P(p) { serialprintPGM(p); SERIAL_EOL(); } +#define _SELP_2_P(p,v) { serial_echopair_PGM(p,v); SERIAL_EOL(); } +#define _SELP_3_P(p,v,V...) { _SEP_2_P(p,v); DEFER2(_SELP_N_P_REF)()(TWO_ARGS(V),V); } +#define SERIAL_ECHOLNPGM_P(V...) do{ EVAL(_SELP_N_P(TWO_ARGS(V),V)); }while(0) #ifdef AllowDifferentTypeInList @@ -261,12 +261,6 @@ void serialprintPGM(PGM_P str); #endif -#define SERIAL_ECHOPGM_P(P) (serialprintPGM(P)) -#define SERIAL_ECHOLNPGM_P(P) do{ serialprintPGM(P); SERIAL_EOL(); }while(0) - -#define SERIAL_ECHOPGM(S) (serialprintPGM(PSTR(S))) -#define SERIAL_ECHOLNPGM(S) (serialprintPGM(PSTR(S "\n"))) - #define SERIAL_ECHOPAIR_F_P(P,V...) do{ serialprintPGM(P); SERIAL_ECHO_F(V); }while(0) #define SERIAL_ECHOLNPAIR_F_P(V...) do{ SERIAL_ECHOPAIR_F_P(V); SERIAL_EOL(); }while(0) @@ -277,8 +271,8 @@ void serialprintPGM(PGM_P str); #define SERIAL_ERROR_START() serial_error_start() #define SERIAL_EOL() SERIAL_CHAR('\n') -#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0) -#define SERIAL_ERROR_MSG(V...) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR(V); }while(0) +#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0) +#define SERIAL_ERROR_MSG(V...) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPGM(V); }while(0) #define SERIAL_ECHO_SP(C) serial_spaces(C) diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp index b810855d5226..8aeec89f020b 100644 --- a/Marlin/src/core/utility.cpp +++ b/Marlin/src/core/utility.cpp @@ -79,9 +79,9 @@ void safe_delay(millis_t ms) { #if HAS_BED_PROBE #if !HAS_PROBE_XY_OFFSET - SERIAL_ECHOPAIR("Probe Offset X0 Y0 Z", probe.offset.z, " ("); + SERIAL_ECHOPGM("Probe Offset X0 Y0 Z", probe.offset.z, " ("); #else - SERIAL_ECHOPAIR_P(PSTR("Probe Offset X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR, probe.offset.z); + SERIAL_ECHOPGM_P(PSTR("Probe Offset X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR, probe.offset.z); if (probe.offset_xy.x > 0) SERIAL_ECHOPGM(" (Right"); else if (probe.offset_xy.x < 0) @@ -119,7 +119,7 @@ void safe_delay(millis_t ms) { SERIAL_ECHOLNPGM(" (enabled)"); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) if (planner.z_fade_height) - SERIAL_ECHOLNPAIR("Z Fade: ", planner.z_fade_height); + SERIAL_ECHOLNPGM("Z Fade: ", planner.z_fade_height); #endif #if ABL_PLANAR SERIAL_ECHOPGM("ABL Adjustment"); @@ -140,7 +140,7 @@ void safe_delay(millis_t ms) { SERIAL_ECHO(ftostr43sign(rz, '+')); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) if (planner.z_fade_height) { - SERIAL_ECHOPAIR(" (", ftostr43sign(rz * planner.fade_scaling_factor_for_z(current_position.z), '+')); + SERIAL_ECHOPGM(" (", ftostr43sign(rz * planner.fade_scaling_factor_for_z(current_position.z), '+')); SERIAL_CHAR(')'); } #endif @@ -156,10 +156,10 @@ void safe_delay(millis_t ms) { SERIAL_ECHOPGM("Mesh Bed Leveling"); if (planner.leveling_active) { SERIAL_ECHOLNPGM(" (enabled)"); - SERIAL_ECHOPAIR("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position), '+')); + SERIAL_ECHOPGM("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position), '+')); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) if (planner.z_fade_height) { - SERIAL_ECHOPAIR(" (", ftostr43sign( + SERIAL_ECHOPGM(" (", ftostr43sign( mbl.get_z(current_position, planner.fade_scaling_factor_for_z(current_position.z)), '+' )); SERIAL_CHAR(')'); diff --git a/Marlin/src/feature/backlash.cpp b/Marlin/src/feature/backlash.cpp index 5ab95d157775..23dc97304970 100644 --- a/Marlin/src/feature/backlash.cpp +++ b/Marlin/src/feature/backlash.cpp @@ -134,12 +134,12 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const switch (axis) { case CORE_AXIS_1: //block->steps[CORE_AXIS_2] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_2]; - //SERIAL_ECHOLNPAIR("CORE_AXIS_1 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis], + //SERIAL_ECHOLNPGM("CORE_AXIS_1 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis], // " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction); break; case CORE_AXIS_2: //block->steps[CORE_AXIS_1] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_1];; - //SERIAL_ECHOLNPAIR("CORE_AXIS_2 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis], + //SERIAL_ECHOLNPGM("CORE_AXIS_2 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis], // " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction); break; case NORMAL_AXIS: break; diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp index 739065656323..ece748198195 100644 --- a/Marlin/src/feature/bedlevel/abl/abl.cpp +++ b/Marlin/src/feature/bedlevel/abl/abl.cpp @@ -336,11 +336,11 @@ float bilinear_z_offset(const xy_pos_t &raw) { /* static float last_offset = 0; if (ABS(last_offset - offset) > 0.2) { - SERIAL_ECHOLNPAIR("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x); - SERIAL_ECHOLNPAIR(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y); - SERIAL_ECHOLNPAIR(" ratio.x=", ratio.x, " ratio.y=", ratio.y); - SERIAL_ECHOLNPAIR(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4); - SERIAL_ECHOLNPAIR(" L=", L, " R=", R, " offset=", offset); + SERIAL_ECHOLNPGM("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x); + SERIAL_ECHOLNPGM(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y); + SERIAL_ECHOLNPGM(" ratio.x=", ratio.x, " ratio.y=", ratio.y); + SERIAL_ECHOLNPGM(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4); + SERIAL_ECHOLNPGM(" L=", L, " R=", R, " offset=", offset); } last_offset = offset; //*/ diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index 37c8be5bd8f5..00cb5ed7382e 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -51,7 +51,7 @@ void unified_bed_leveling::report_current_mesh() { GRID_LOOP(x, y) if (!isnan(z_values[x][y])) { SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(" M421 I", x, " J", y); + SERIAL_ECHOPGM(" M421 I", x, " J", y); SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4); serial_delay(75); // Prevent Printrun from exploding } diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h index cf00a282cfdd..ffabadd990b3 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.h +++ b/Marlin/src/feature/bedlevel/ubl/ubl.h @@ -208,7 +208,7 @@ class unified_bed_leveling { if (DEBUGGING(LEVELING)) { if (WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("yi"); else DEBUG_ECHOPGM("x1_i"); - DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")"); + DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")"); } // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. @@ -231,7 +231,7 @@ class unified_bed_leveling { if (DEBUGGING(LEVELING)) { if (WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("y1_i"); else DEBUG_ECHOPGM("xi"); - DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")"); + DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")"); } // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. @@ -275,11 +275,11 @@ class unified_bed_leveling { // because part of the Mesh is undefined and we don't have the // information we need to complete the height correction. - if (DEBUGGING(MESH_ADJUST)) DEBUG_ECHOLNPAIR("??? Yikes! NAN in "); + if (DEBUGGING(MESH_ADJUST)) DEBUG_ECHOLNPGM("??? Yikes! NAN in "); } if (DEBUGGING(MESH_ADJUST)) { - DEBUG_ECHOPAIR("get_z_correction(", rx0, ", ", ry0); + DEBUG_ECHOPGM("get_z_correction(", rx0, ", ", ry0); DEBUG_ECHOLNPAIR_F(") => ", z0, 6); } diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index ceedd316e374..747c61a8b984 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -428,7 +428,7 @@ void unified_bed_leveling::G29() { SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh."); } if (param.V_verbosity > 1) { - SERIAL_ECHOPAIR("Probing around (", param.XY_pos.x); + SERIAL_ECHOPGM("Probing around (", param.XY_pos.x); SERIAL_CHAR(','); SERIAL_DECIMAL(param.XY_pos.y); SERIAL_ECHOLNPGM(").\n"); @@ -602,7 +602,7 @@ void unified_bed_leveling::G29() { } if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) { - SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1); + SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1); return; } @@ -630,7 +630,7 @@ void unified_bed_leveling::G29() { } if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) { - SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1); + SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1); goto LEAVE; } @@ -653,7 +653,7 @@ void unified_bed_leveling::G29() { #endif #ifdef Z_PROBE_END_SCRIPT - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT); if (probe_deployed) { planner.synchronize(); gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); @@ -690,7 +690,7 @@ void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const_float_t o if (!isnan(z_values[x][y])) sum_of_diff_squared += sq(z_values[x][y] - mean); - SERIAL_ECHOLNPAIR("# of samples: ", n); + SERIAL_ECHOLNPGM("# of samples: ", n); SERIAL_ECHOLNPAIR_F("Mean Mesh Height: ", mean, 6); const float sigma = SQRT(sum_of_diff_squared / (n + 1)); @@ -735,7 +735,7 @@ void unified_bed_leveling::shift_mesh_height() { if (do_ubl_mesh_map) display_map(param.T_map_type); const uint8_t point_num = (GRID_MAX_POINTS - count) + 1; - SERIAL_ECHOLNPAIR("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); + SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS))); #if HAS_LCD_MENU @@ -1450,7 +1450,7 @@ void unified_bed_leveling::smart_fill_mesh() { #endif if (param.V_verbosity > 3) { serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } incremental_LSF(&lsf_results, points[0], measured_z); } @@ -1469,7 +1469,7 @@ void unified_bed_leveling::smart_fill_mesh() { measured_z -= get_z_correction(points[1]); if (param.V_verbosity > 3) { serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } incremental_LSF(&lsf_results, points[1], measured_z); } @@ -1489,7 +1489,7 @@ void unified_bed_leveling::smart_fill_mesh() { measured_z -= get_z_correction(points[2]); if (param.V_verbosity > 3) { serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } incremental_LSF(&lsf_results, points[2], measured_z); } @@ -1517,7 +1517,7 @@ void unified_bed_leveling::smart_fill_mesh() { rpos.y = y_min + dy * (zig_zag ? param.J_grid_size - 1 - iy : iy); if (!abort_flag) { - SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n"); + SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n"); TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling @@ -1545,7 +1545,7 @@ void unified_bed_leveling::smart_fill_mesh() { if (param.V_verbosity > 3) { serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } incremental_LSF(&lsf_results, rpos, measured_z); } @@ -1648,7 +1648,7 @@ void unified_bed_leveling::smart_fill_mesh() { DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_homing_xy, 0), 6); d_from(); DEBUG_ECHOPGM("safe home with Z="); DEBUG_ECHOLNPAIR_F("mesh value ", normed(safe_homing_xy, get_z_correction(safe_homing_xy)), 6); - DEBUG_ECHOPAIR(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT); + DEBUG_ECHOPGM(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT); DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_homing_xy), 6); #endif } // DEBUGGING(LEVELING) @@ -1722,7 +1722,7 @@ void unified_bed_leveling::smart_fill_mesh() { if (storage_slot == -1) SERIAL_ECHOPGM("No Mesh Loaded."); else - SERIAL_ECHOPAIR("Mesh ", storage_slot, " Loaded."); + SERIAL_ECHOPGM("Mesh ", storage_slot, " Loaded."); SERIAL_EOL(); serial_delay(50); @@ -1736,14 +1736,14 @@ void unified_bed_leveling::smart_fill_mesh() { SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", probe.offset.z, 7); #endif - SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50); - SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50); - SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST); - SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50); + SERIAL_ECHOLNPGM("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50); + SERIAL_ECHOLNPGM("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_X_DIST ", MESH_X_DIST); + SERIAL_ECHOLNPGM("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50); SERIAL_ECHOPGM("X-Axis Mesh Points at: "); LOOP_L_N(i, GRID_MAX_POINTS_X) { @@ -1762,27 +1762,27 @@ void unified_bed_leveling::smart_fill_mesh() { SERIAL_EOL(); #if HAS_KILL - SERIAL_ECHOLNPAIR("Kill pin on :", KILL_PIN, " state:", kill_state()); + SERIAL_ECHOLNPGM("Kill pin on :", KILL_PIN, " state:", kill_state()); #endif SERIAL_EOL(); serial_delay(50); #if ENABLED(UBL_DEVEL_DEBUGGING) - SERIAL_ECHOLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk); + SERIAL_ECHOLNPGM("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk); serial_delay(50); - SERIAL_ECHOLNPAIR("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index())); + SERIAL_ECHOLNPGM("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index())); serial_delay(50); - SERIAL_ECHOLNPAIR("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL(); - SERIAL_ECHOLNPAIR("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL(); + SERIAL_ECHOLNPGM("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL(); + SERIAL_ECHOLNPGM("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL(); serial_delay(25); - SERIAL_ECHOLNPAIR("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index()))); + SERIAL_ECHOLNPGM("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index()))); serial_delay(50); - SERIAL_ECHOLNPAIR("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n"); + SERIAL_ECHOLNPGM("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n"); serial_delay(25); #endif // UBL_DEVEL_DEBUGGING @@ -1829,7 +1829,7 @@ void unified_bed_leveling::smart_fill_mesh() { } if (!parser.has_value() || !WITHIN(parser.value_int(), 0, a - 1)) { - SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1); + SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1); return; } @@ -1838,7 +1838,7 @@ void unified_bed_leveling::smart_fill_mesh() { float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; settings.load_mesh(param.KLS_storage_slot, &tmp_z_values); - SERIAL_ECHOLNPAIR("Subtracting mesh in slot ", param.KLS_storage_slot, " from current mesh."); + SERIAL_ECHOLNPGM("Subtracting mesh in slot ", param.KLS_storage_slot, " from current mesh."); GRID_LOOP(x, y) { z_values[x][y] -= tmp_z_values[x][y]; diff --git a/Marlin/src/feature/binary_stream.h b/Marlin/src/feature/binary_stream.h index cef8a3c90211..417e39c74507 100644 --- a/Marlin/src/feature/binary_stream.h +++ b/Marlin/src/feature/binary_stream.h @@ -146,9 +146,9 @@ class SDFileTransferProtocol { transfer_timeout = millis() + TIMEOUT; switch (static_cast(packet_type)) { case FileTransfer::QUERY: - SERIAL_ECHOPAIR("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); + SERIAL_ECHOPGM("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); #if ENABLED(BINARY_STREAM_COMPRESSION) - SERIAL_ECHOLNPAIR(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS); + SERIAL_ECHOLNPGM(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS); #else SERIAL_ECHOLNPGM(":compression:none"); #endif @@ -322,7 +322,7 @@ class BinaryStream { if (packet.header.checksum == packet.header_checksum) { // The SYNC control packet is a special case in that it doesn't require the stream sync to be correct if (static_cast(packet.header.protocol()) == Protocol::CONTROL && static_cast(packet.header.type()) == ProtocolControl::SYNC) { - SERIAL_ECHOLNPAIR("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); + SERIAL_ECHOLNPGM("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); stream_state = StreamState::PACKET_RESET; break; } @@ -337,7 +337,7 @@ class BinaryStream { stream_state = StreamState::PACKET_PROCESS; } else if (packet.header.sync == sync - 1) { // ok response must have been lost - SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received and drop the payload + SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received and drop the payload stream_state = StreamState::PACKET_RESET; } else if (packet_retries) { @@ -393,7 +393,7 @@ class BinaryStream { packet_retries = 0; bytes_received += packet.header.size; - SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received + SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received dispatch(); stream_state = StreamState::PACKET_RESET; break; @@ -402,7 +402,7 @@ class BinaryStream { packet_retries++; stream_state = StreamState::PACKET_RESET; SERIAL_ECHO_MSG("Resend request ", packet_retries); - SERIAL_ECHOLNPAIR("rs", sync); + SERIAL_ECHOLNPGM("rs", sync); } else stream_state = StreamState::PACKET_ERROR; @@ -412,7 +412,7 @@ class BinaryStream { stream_state = StreamState::PACKET_RESEND; break; case StreamState::PACKET_ERROR: - SERIAL_ECHOLNPAIR("fe", packet.header.sync); + SERIAL_ECHOLNPGM("fe", packet.header.sync); reset(); // reset everything, resync required stream_state = StreamState::PACKET_RESET; break; diff --git a/Marlin/src/feature/bltouch.cpp b/Marlin/src/feature/bltouch.cpp index 7fccc52d0584..49a10f62b155 100644 --- a/Marlin/src/feature/bltouch.cpp +++ b/Marlin/src/feature/bltouch.cpp @@ -39,7 +39,7 @@ void stop(); #include "../core/debug_out.h" bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) { - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch Command :", cmd); + if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Command :", cmd); MOVE_SERVO(Z_PROBE_SERVO_NR, cmd); safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay return triggered(); @@ -64,7 +64,7 @@ void BLTouch::init(const bool set_voltage/*=false*/) { #else if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR("last_written_mode - ", last_written_mode); + DEBUG_ECHOLNPGM("last_written_mode - ", last_written_mode); DEBUG_ECHOLNPGM("config mode - " #if ENABLED(BLTOUCH_SET_5V_MODE) "BLTOUCH_SET_5V_MODE" @@ -175,7 +175,7 @@ bool BLTouch::status_proc() { _set_SW_mode(); // Incidentally, _set_SW_mode() will also RESET any active alarm const bool tr = triggered(); // If triggered in SW mode, the pin is up, it is STOWED - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch is ", tr); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch is ", tr); if (tr) _stow(); else _deploy(); // Turn off SW mode, reset any trigger, honor pin state return !tr; @@ -187,7 +187,7 @@ void BLTouch::mode_conv_proc(const bool M5V) { * BLTOUCH V3.0: This will set the mode (twice) and sadly, a STOW is needed at the end, because of the deploy * BLTOUCH V3.1: This will set the mode and store it in the eeprom. The STOW is not needed but does not hurt */ - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch Set Mode - ", M5V); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Set Mode - ", M5V); _deploy(); if (M5V) _set_5V_mode(); else _set_OD_mode(); _mode_store(); diff --git a/Marlin/src/feature/dac/stepper_dac.cpp b/Marlin/src/feature/dac/stepper_dac.cpp index 6d03808b8282..ff730e93c62c 100644 --- a/Marlin/src/feature/dac/stepper_dac.cpp +++ b/Marlin/src/feature/dac/stepper_dac.cpp @@ -85,15 +85,15 @@ void StepperDAC::print_values() { if (!dac_present) return; SERIAL_ECHO_MSG("Stepper current values in % (Amps):"); SERIAL_ECHO_START(); - SERIAL_ECHOPAIR_P(SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")")); + SERIAL_ECHOPGM_P(SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")")); #if HAS_Y_AXIS - SERIAL_ECHOPAIR_P(SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")")); + SERIAL_ECHOPGM_P(SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")")); #endif #if HAS_Z_AXIS - SERIAL_ECHOPAIR_P(SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")")); + SERIAL_ECHOPGM_P(SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")")); #endif #if HAS_EXTRUDERS - SERIAL_ECHOLNPAIR_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")")); + SERIAL_ECHOLNPGM_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")")); #endif } diff --git a/Marlin/src/feature/encoder_i2c.cpp b/Marlin/src/feature/encoder_i2c.cpp index 283092e3447f..e6b127e03cbb 100644 --- a/Marlin/src/feature/encoder_i2c.cpp +++ b/Marlin/src/feature/encoder_i2c.cpp @@ -49,7 +49,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) { initialized = true; - SERIAL_ECHOLNPAIR("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address); + SERIAL_ECHOLNPGM("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address); position = get_position(); } @@ -67,7 +67,7 @@ void I2CPositionEncoder::update() { /* if (trusted) { //commented out as part of the note below trusted = false; - SERIAL_ECHOLNPAIR("Fault detected on ", AS_CHAR(axis_codes[encoderAxis]), " axis encoder. Disengaging error correction until module is trusted again."); + SERIAL_ECHOLNPGM("Fault detected on ", AS_CHAR(axis_codes[encoderAxis]), " axis encoder. Disengaging error correction until module is trusted again."); } */ return; @@ -92,7 +92,7 @@ void I2CPositionEncoder::update() { if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) { trusted = true; - SERIAL_ECHOLNPAIR("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction."); + SERIAL_ECHOLNPGM("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction."); //the encoder likely lost its place when the error occurred, so we'll reset and use the printer's //idea of where it the axis is to re-initialize @@ -103,10 +103,10 @@ void I2CPositionEncoder::update() { zeroOffset -= (positionInTicks - get_position()); #ifdef I2CPE_DEBUG - SERIAL_ECHOLNPAIR("Current position is ", pos); - SERIAL_ECHOLNPAIR("Position in encoder ticks is ", positionInTicks); - SERIAL_ECHOLNPAIR("New zero-offset of ", zeroOffset); - SERIAL_ECHOPAIR("New position reads as ", get_position()); + SERIAL_ECHOLNPGM("Current position is ", pos); + SERIAL_ECHOLNPGM("Position in encoder ticks is ", positionInTicks); + SERIAL_ECHOLNPGM("New zero-offset of ", zeroOffset); + SERIAL_ECHOPGM("New position reads as ", get_position()); SERIAL_CHAR('('); SERIAL_DECIMAL(mm_from_count(get_position())); SERIAL_ECHOLNPGM(")"); @@ -149,12 +149,12 @@ void I2CPositionEncoder::update() { const int32_t error = get_axis_error_steps(false); #endif - //SERIAL_ECHOLNPAIR("Axis error steps: ", error); + //SERIAL_ECHOLNPGM("Axis error steps: ", error); #ifdef I2CPE_ERR_THRESH_ABORT if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) { //kill(PSTR("Significant Error")); - SERIAL_ECHOLNPAIR("Axis error over threshold, aborting!", error); + SERIAL_ECHOLNPGM("Axis error over threshold, aborting!", error); safe_delay(5000); } #endif @@ -173,7 +173,7 @@ void I2CPositionEncoder::update() { LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i]; const int32_t errorP = int32_t(sumP * RECIPROCAL(I2CPE_ERR_PRST_ARRAY_SIZE)); SERIAL_CHAR(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" : CORRECT ERR ", errorP * planner.steps_to_mm[encoderAxis], "mm"); + SERIAL_ECHOLNPGM(" : CORRECT ERR ", errorP * planner.steps_to_mm[encoderAxis], "mm"); babystep.add_steps(encoderAxis, -LROUND(errorP)); errPrstIdx = 0; } @@ -193,7 +193,7 @@ void I2CPositionEncoder::update() { const millis_t ms = millis(); if (ELAPSED(ms, nextErrorCountTime)) { SERIAL_CHAR(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" : LARGE ERR ", error, "; diffSum=", diffSum); + SERIAL_ECHOLNPGM(" : LARGE ERR ", error, "; diffSum=", diffSum); errorCount++; nextErrorCountTime = ms + I2CPE_ERR_CNT_DEBOUNCE_MS; } @@ -213,7 +213,7 @@ void I2CPositionEncoder::set_homed() { #ifdef I2CPE_DEBUG SERIAL_CHAR(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" axis encoder homed, offset of ", zeroOffset, " ticks."); + SERIAL_ECHOLNPGM(" axis encoder homed, offset of ", zeroOffset, " ticks."); #endif } } @@ -253,7 +253,7 @@ float I2CPositionEncoder::get_axis_error_mm(const bool report) { if (report) { SERIAL_CHAR(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm"); + SERIAL_ECHOLNPGM(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm"); } return error; @@ -288,7 +288,7 @@ int32_t I2CPositionEncoder::get_axis_error_steps(const bool report) { if (report) { SERIAL_CHAR(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error); + SERIAL_ECHOLNPGM(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error); } if (suppressOutput) { @@ -424,15 +424,15 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { travelledDistance = mm_from_count(ABS(stopCount - startCount)); - SERIAL_ECHOLNPAIR("Attempted travel: ", travelDistance, "mm"); - SERIAL_ECHOLNPAIR(" Actual travel: ", travelledDistance, "mm"); + SERIAL_ECHOLNPGM("Attempted travel: ", travelDistance, "mm"); + SERIAL_ECHOLNPGM(" Actual travel: ", travelledDistance, "mm"); //Calculate new axis steps per unit old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis]; new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance; - SERIAL_ECHOLNPAIR("Old steps/mm: ", old_steps_mm); - SERIAL_ECHOLNPAIR("New steps/mm: ", new_steps_mm); + SERIAL_ECHOLNPGM("Old steps/mm: ", old_steps_mm); + SERIAL_ECHOLNPGM("New steps/mm: ", new_steps_mm); //Save new value planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm; @@ -449,7 +449,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { if (iter > 1) { total /= (float)iter; - SERIAL_ECHOLNPAIR("Average steps/mm: ", total); + SERIAL_ECHOLNPGM("Average steps/mm: ", total); } ec = oldec; @@ -675,18 +675,18 @@ void I2CPositionEncodersMgr::change_module_address(const uint8_t oldaddr, const // First check 'new' address is not in use Wire.beginTransmission(I2C_ADDRESS(newaddr)); if (!Wire.endTransmission()) { - SERIAL_ECHOLNPAIR("?There is already a device with that address on the I2C bus! (", newaddr, ")"); + SERIAL_ECHOLNPGM("?There is already a device with that address on the I2C bus! (", newaddr, ")"); return; } // Now check that we can find the module on the oldaddr address Wire.beginTransmission(I2C_ADDRESS(oldaddr)); if (Wire.endTransmission()) { - SERIAL_ECHOLNPAIR("?No module detected at this address! (", oldaddr, ")"); + SERIAL_ECHOLNPGM("?No module detected at this address! (", oldaddr, ")"); return; } - SERIAL_ECHOLNPAIR("Module found at ", oldaddr, ", changing address to ", newaddr); + SERIAL_ECHOLNPGM("Module found at ", oldaddr, ", changing address to ", newaddr); // Change the modules address Wire.beginTransmission(I2C_ADDRESS(oldaddr)); @@ -722,11 +722,11 @@ void I2CPositionEncodersMgr::report_module_firmware(const uint8_t address) { // First check there is a module Wire.beginTransmission(I2C_ADDRESS(address)); if (Wire.endTransmission()) { - SERIAL_ECHOLNPAIR("?No module detected at this address! (", address, ")"); + SERIAL_ECHOLNPGM("?No module detected at this address! (", address, ")"); return; } - SERIAL_ECHOLNPAIR("Requesting version info from module at address ", address, ":"); + SERIAL_ECHOLNPGM("Requesting version info from module at address ", address, ":"); Wire.beginTransmission(I2C_ADDRESS(address)); Wire.write(I2CPE_SET_REPORT_MODE); @@ -773,13 +773,13 @@ int8_t I2CPositionEncodersMgr::parse() { else if (parser.seenval('I')) { if (!parser.has_value()) { - SERIAL_ECHOLNPAIR("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]"); + SERIAL_ECHOLNPGM("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]"); return I2CPE_PARSE_ERR; }; I2CPE_idx = parser.value_byte(); if (I2CPE_idx >= I2CPE_ENCODER_CNT) { - SERIAL_ECHOLNPAIR("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]"); + SERIAL_ECHOLNPGM("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]"); return I2CPE_PARSE_ERR; } @@ -954,7 +954,7 @@ void I2CPositionEncodersMgr::M864() { else return; } - SERIAL_ECHOLNPAIR("Changing module at address ", I2CPE_addr, " to address ", newAddress); + SERIAL_ECHOLNPGM("Changing module at address ", I2CPE_addr, " to address ", newAddress); change_module_address(I2CPE_addr, newAddress); } diff --git a/Marlin/src/feature/encoder_i2c.h b/Marlin/src/feature/encoder_i2c.h index 20871af98ccb..50fb27a135ca 100644 --- a/Marlin/src/feature/encoder_i2c.h +++ b/Marlin/src/feature/encoder_i2c.h @@ -236,7 +236,7 @@ class I2CPositionEncodersMgr { static void report_status(const int8_t idx) { CHECK_IDX(); - SERIAL_ECHOLNPAIR("Encoder ", idx, ": "); + SERIAL_ECHOLNPGM("Encoder ", idx, ": "); encoders[idx].get_raw_count(); encoders[idx].passes_test(true); } @@ -261,32 +261,32 @@ class I2CPositionEncodersMgr { static void report_error_count(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); - SERIAL_ECHOLNPAIR("Error count on ", AS_CHAR(axis_codes[axis]), " axis is ", encoders[idx].get_error_count()); + SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis is ", encoders[idx].get_error_count()); } static void reset_error_count(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_error_count(0); - SERIAL_ECHOLNPAIR("Error count on ", AS_CHAR(axis_codes[axis]), " axis has been reset."); + SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis has been reset."); } static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_ec_enabled(enabled); - SERIAL_ECHOPAIR("Error correction on ", AS_CHAR(axis_codes[axis])); + SERIAL_ECHOPGM("Error correction on ", AS_CHAR(axis_codes[axis])); SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n"); } static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_ec_threshold(newThreshold); - SERIAL_ECHOLNPAIR("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis set to ", newThreshold, "mm."); + SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis set to ", newThreshold, "mm."); } static void get_ec_threshold(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); const float threshold = encoders[idx].get_ec_threshold(); - SERIAL_ECHOLNPAIR("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis is ", threshold, "mm."); + SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis is ", threshold, "mm."); } static int8_t idx_from_axis(const AxisEnum axis) { diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp index 71630d30acab..26817b9ed23b 100644 --- a/Marlin/src/feature/fwretract.cpp +++ b/Marlin/src/feature/fwretract.cpp @@ -106,20 +106,20 @@ void FWRetract::retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool sw #endif /* // debugging - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "retracting ", AS_DIGIT(retracting), " swapping ", swapping, " active extruder ", active_extruder ); LOOP_L_N(i, EXTRUDERS) { - SERIAL_ECHOLNPAIR("retracted[", i, "] ", AS_DIGIT(retracted[i])); + SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i])); #if HAS_MULTI_EXTRUDER - SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i])); + SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i])); #endif } - SERIAL_ECHOLNPAIR("current_position.z ", current_position.z); - SERIAL_ECHOLNPAIR("current_position.e ", current_position.e); - SERIAL_ECHOLNPAIR("current_hop ", current_hop); + SERIAL_ECHOLNPGM("current_position.z ", current_position.z); + SERIAL_ECHOLNPGM("current_position.e ", current_position.e); + SERIAL_ECHOLNPGM("current_hop ", current_hop); //*/ const float base_retract = TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS)) @@ -181,18 +181,18 @@ void FWRetract::retract(const bool retracting OPTARG(HAS_MULTI_EXTRUDER, bool sw #endif /* // debugging - SERIAL_ECHOLNPAIR("retracting ", AS_DIGIT(retracting)); - SERIAL_ECHOLNPAIR("swapping ", AS_DIGIT(swapping)); - SERIAL_ECHOLNPAIR("active_extruder ", active_extruder); + SERIAL_ECHOLNPGM("retracting ", AS_DIGIT(retracting)); + SERIAL_ECHOLNPGM("swapping ", AS_DIGIT(swapping)); + SERIAL_ECHOLNPGM("active_extruder ", active_extruder); LOOP_L_N(i, EXTRUDERS) { - SERIAL_ECHOLNPAIR("retracted[", i, "] ", AS_DIGIT(retracted[i])); + SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i])); #if HAS_MULTI_EXTRUDER - SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i])); + SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i])); #endif } - SERIAL_ECHOLNPAIR("current_position.z ", current_position.z); - SERIAL_ECHOLNPAIR("current_position.e ", current_position.e); - SERIAL_ECHOLNPAIR("current_hop ", current_hop); + SERIAL_ECHOLNPGM("current_position.z ", current_position.z); + SERIAL_ECHOLNPGM("current_position.e ", current_position.e); + SERIAL_ECHOLNPGM("current_hop ", current_hop); //*/ } @@ -215,7 +215,7 @@ void FWRetract::M207() { } void FWRetract::M207_report() { - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length) , PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length) , PSTR(" F"), LINEAR_UNIT(MMS_TO_MMM(settings.retract_feedrate_mm_s)) @@ -240,7 +240,7 @@ void FWRetract::M208() { } void FWRetract::M208_report() { - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " M208 S", LINEAR_UNIT(settings.retract_recover_extra) , " W", LINEAR_UNIT(settings.swap_retract_recover_extra) , " F", LINEAR_UNIT(MMS_TO_MMM(settings.retract_recover_feedrate_mm_s)) @@ -261,7 +261,7 @@ void FWRetract::M208_report() { } void FWRetract::M209_report() { - SERIAL_ECHOLNPAIR(" M209 S", AS_DIGIT(autoretract_enabled)); + SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled)); } #endif // FWRETRACT_AUTORETRACT diff --git a/Marlin/src/feature/joystick.cpp b/Marlin/src/feature/joystick.cpp index d8e6cef3b6d3..7f91c1549b9e 100644 --- a/Marlin/src/feature/joystick.cpp +++ b/Marlin/src/feature/joystick.cpp @@ -68,13 +68,13 @@ Joystick joystick; void Joystick::report() { SERIAL_ECHOPGM("Joystick"); #if HAS_JOY_ADC_X - SERIAL_ECHOPAIR_P(SP_X_STR, JOY_X(x.raw)); + SERIAL_ECHOPGM_P(SP_X_STR, JOY_X(x.raw)); #endif #if HAS_JOY_ADC_Y - SERIAL_ECHOPAIR_P(SP_Y_STR, JOY_Y(y.raw)); + SERIAL_ECHOPGM_P(SP_Y_STR, JOY_Y(y.raw)); #endif #if HAS_JOY_ADC_Z - SERIAL_ECHOPAIR_P(SP_Z_STR, JOY_Z(z.raw)); + SERIAL_ECHOPGM_P(SP_Z_STR, JOY_Z(z.raw)); #endif #if HAS_JOY_ADC_EN SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)"); diff --git a/Marlin/src/feature/max7219.cpp b/Marlin/src/feature/max7219.cpp index 200e6b580d5b..e13c6f5b973c 100644 --- a/Marlin/src/feature/max7219.cpp +++ b/Marlin/src/feature/max7219.cpp @@ -130,7 +130,7 @@ void Max7219::error(const char * const func, const int32_t v1, const int32_t v2/ SERIAL_ECHOPGM_P(func); SERIAL_CHAR('('); SERIAL_ECHO(v1); - if (v2 > 0) SERIAL_ECHOPAIR(", ", v2); + if (v2 > 0) SERIAL_ECHOPGM(", ", v2); SERIAL_CHAR(')'); SERIAL_EOL(); #else diff --git a/Marlin/src/feature/meatpack.cpp b/Marlin/src/feature/meatpack.cpp index 6803a0de7df4..2edcd7478a5c 100644 --- a/Marlin/src/feature/meatpack.cpp +++ b/Marlin/src/feature/meatpack.cpp @@ -140,7 +140,7 @@ void MeatPack::handle_output_char(const uint8_t c) { #if ENABLED(MP_DEBUG) if (chars_decoded < 1024) { ++chars_decoded; - DEBUG_ECHOLNPAIR("RB: ", AS_CHAR(c)); + DEBUG_ECHOLNPGM("RB: ", AS_CHAR(c)); } #endif } diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index 0013797ad5f5..9ebc90127f43 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -154,11 +154,11 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*= cmax = _MAX(cmax, v); csum += v; } - //SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion, ", ", t, ") cmax=", cmax, " csum=", csum, " color"); + //SERIAL_ECHOPGM("Mixer::refresh_collector(", proportion, ", ", t, ") cmax=", cmax, " csum=", csum, " color"); const float inv_prop = proportion / csum; MIXER_STEPPER_LOOP(i) { c[i] = color[t][i] * inv_prop; - //SERIAL_ECHOPAIR(" [", t, "][", i, "] = ", color[t][i], " (", c[i], ") "); + //SERIAL_ECHOPGM(" [", t, "][", i, "] = ", color[t][i], " (", c[i], ") "); } //SERIAL_EOL(); } diff --git a/Marlin/src/feature/mixing.h b/Marlin/src/feature/mixing.h index 573b61cb68f0..f700c7b65b7d 100644 --- a/Marlin/src/feature/mixing.h +++ b/Marlin/src/feature/mixing.h @@ -152,7 +152,7 @@ class Mixer { MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot); #ifdef MIXER_NORMALIZER_DEBUG - SERIAL_ECHOPAIR("V-tool ", j, " [ "); + SERIAL_ECHOPGM("V-tool ", j, " [ "); SERIAL_ECHOLIST_N(MIXING_STEPPERS, color[j][0], color[j][1], color[j][2], color[j][3], color[j][4], color[j][5]); SERIAL_ECHOPGM(" ] to Mix [ "); SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]); diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 1acd26f331c3..31e64f49537b 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -169,7 +169,7 @@ void MMU2::mmu_loop() { if (rx_ok()) { sscanf(rx_buffer, "%huok\n", &version); - DEBUG_ECHOLNPAIR("MMU => ", version, "\nMMU <= 'S2'"); + DEBUG_ECHOLNPGM("MMU => ", version, "\nMMU <= 'S2'"); MMU2_COMMAND("S2"); // Read Build Number state = -3; @@ -180,7 +180,7 @@ void MMU2::mmu_loop() { if (rx_ok()) { sscanf(rx_buffer, "%huok\n", &buildnr); - DEBUG_ECHOLNPAIR("MMU => ", buildnr); + DEBUG_ECHOLNPGM("MMU => ", buildnr); check_version(); @@ -217,7 +217,7 @@ void MMU2::mmu_loop() { if (rx_ok()) { sscanf(rx_buffer, "%hhuok\n", &finda); - DEBUG_ECHOLNPAIR("MMU => ", finda, "\nMMU - ENABLED"); + DEBUG_ECHOLNPGM("MMU => ", finda, "\nMMU - ENABLED"); _enabled = true; state = 1; @@ -230,7 +230,7 @@ void MMU2::mmu_loop() { if (WITHIN(cmd, MMU_CMD_T0, MMU_CMD_T0 + EXTRUDERS - 1)) { // tool change int filament = cmd - MMU_CMD_T0; - DEBUG_ECHOLNPAIR("MMU <= T", filament); + DEBUG_ECHOLNPGM("MMU <= T", filament); tx_printf_P(PSTR("T%d\n"), filament); TERN_(MMU_EXTRUDER_SENSOR, mmu_idl_sens = 1); // enable idler sensor, if any state = 3; // wait for response @@ -238,7 +238,7 @@ void MMU2::mmu_loop() { else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L0 + EXTRUDERS - 1)) { // load int filament = cmd - MMU_CMD_L0; - DEBUG_ECHOLNPAIR("MMU <= L", filament); + DEBUG_ECHOLNPGM("MMU <= L", filament); tx_printf_P(PSTR("L%d\n"), filament); state = 3; // wait for response } @@ -258,7 +258,7 @@ void MMU2::mmu_loop() { else if (WITHIN(cmd, MMU_CMD_E0, MMU_CMD_E0 + EXTRUDERS - 1)) { // eject filament int filament = cmd - MMU_CMD_E0; - DEBUG_ECHOLNPAIR("MMU <= E", filament); + DEBUG_ECHOLNPGM("MMU <= E", filament); tx_printf_P(PSTR("E%d\n"), filament); state = 3; // wait for response } @@ -271,7 +271,7 @@ void MMU2::mmu_loop() { else if (WITHIN(cmd, MMU_CMD_F0, MMU_CMD_F0 + EXTRUDERS - 1)) { // filament type int filament = cmd - MMU_CMD_F0; - DEBUG_ECHOLNPAIR("MMU <= F", filament, " ", cmd_arg); + DEBUG_ECHOLNPGM("MMU <= F", filament, " ", cmd_arg); tx_printf_P(PSTR("F%d %d\n"), filament, cmd_arg); state = 3; // wait for response } @@ -647,7 +647,7 @@ static void mmu2_not_responding() { void MMU2::mmu_continue_loading() { for (uint8_t i = 0; i < MMU_LOADING_ATTEMPTS_NR; i++) { - DEBUG_ECHOLNPAIR("Additional load attempt #", i); + DEBUG_ECHOLNPGM("Additional load attempt #", i); if (FILAMENT_PRESENT()) break; command(MMU_CMD_C0); manage_response(true, true); @@ -1025,7 +1025,7 @@ void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) { const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate)); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("E step ", es, "/", fr_mm_m); + DEBUG_ECHOLNPGM("E step ", es, "/", fr_mm_m); current_position.e += es; line_to_current_position(MMM_TO_MMS(fr_mm_m)); diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index f1d6dbb985af..d9b252140330 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -132,7 +132,7 @@ fil_change_settings_t fc_settings[EXTRUDERS]; */ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=PAUSE_MODE_SAME) { DEBUG_SECTION(est, "ensure_safe_temperature", true); - DEBUG_ECHOLNPAIR("... wait:", wait, " mode:", mode); + DEBUG_ECHOLNPGM("... wait:", wait, " mode:", mode); #if ENABLED(PREVENT_COLD_EXTRUSION) if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder)) @@ -178,7 +178,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load DXC_ARGS ) { DEBUG_SECTION(lf, "load_filament", true); - DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " showlcd:", show_lcd, " pauseforuser:", pause_for_user, " pausemode:", mode DXC_SAY); + DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " showlcd:", show_lcd, " pauseforuser:", pause_for_user, " pausemode:", mode DXC_SAY); if (!ensure_safe_temperature(false, mode)) { if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_STATUS, mode); @@ -315,7 +315,7 @@ bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/, #endif ) { DEBUG_SECTION(uf, "unload_filament", true); - DEBUG_ECHOLNPAIR("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode + DEBUG_ECHOLNPGM("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) , " mixmult:", mix_multiplier #endif @@ -379,7 +379,7 @@ uint8_t did_pause_print = 0; bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool show_lcd/*=false*/, const_float_t unload_length/*=0*/ DXC_ARGS) { DEBUG_SECTION(pp, "pause_print", true); - DEBUG_ECHOLNPAIR("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY); + DEBUG_ECHOLNPGM("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY); UNUSED(show_lcd); @@ -430,7 +430,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool // Initial retract before move to filament change position if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) { - DEBUG_ECHOLNPAIR("... retract:", retract); + DEBUG_ECHOLNPGM("... retract:", retract); unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE); } @@ -472,7 +472,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool void show_continue_prompt(const bool is_reload) { DEBUG_SECTION(scp, "pause_print", true); - DEBUG_ECHOLNPAIR("... is_reload:", is_reload); + DEBUG_ECHOLNPGM("... is_reload:", is_reload); ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING); SERIAL_ECHO_START(); @@ -481,7 +481,7 @@ void show_continue_prompt(const bool is_reload) { void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) { DEBUG_SECTION(wfc, "wait_for_confirmation", true); - DEBUG_ECHOLNPAIR("... is_reload:", is_reload, " maxbeep:", max_beep_count DXC_SAY); + DEBUG_ECHOLNPGM("... is_reload:", is_reload, " maxbeep:", max_beep_count DXC_SAY); bool nozzle_timed_out = false; @@ -584,10 +584,10 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep */ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_length/*=0*/, const_float_t purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/, const celsius_t targetTemp/*=0*/ DXC_ARGS) { DEBUG_SECTION(rp, "resume_print", true); - DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " targetTemp:", targetTemp DXC_SAY); + DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " targetTemp:", targetTemp DXC_SAY); /* - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode, "\nextruder_duplication_enabled:", extruder_duplication_enabled, "\nactive_extruder:", active_extruder, diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index c86cb4f0d6cf..159121ba4592 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -577,7 +577,7 @@ void PrintJobRecovery::resume() { void PrintJobRecovery::debug(PGM_P const prefix) { DEBUG_ECHOPGM_P(prefix); - DEBUG_ECHOLNPAIR(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot); + DEBUG_ECHOLNPGM(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot); if (info.valid_head) { if (info.valid_head == info.valid_foot) { DEBUG_ECHOPGM("current_position: "); @@ -587,14 +587,14 @@ void PrintJobRecovery::resume() { } DEBUG_EOL(); - DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate); + DEBUG_ECHOLNPGM("feedrate: ", info.feedrate); - DEBUG_ECHOLNPAIR("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : ""); + DEBUG_ECHOLNPGM("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : ""); #if ENABLED(GCODE_REPEAT_MARKERS) - DEBUG_ECHOLNPAIR("repeat index: ", info.stored_repeat.index); + DEBUG_ECHOLNPGM("repeat index: ", info.stored_repeat.index); LOOP_L_N(i, info.stored_repeat.index) - DEBUG_ECHOLNPAIR("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter); + DEBUG_ECHOLNPGM("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter); #endif #if HAS_HOME_OFFSET @@ -616,12 +616,12 @@ void PrintJobRecovery::resume() { #endif #if HAS_MULTI_EXTRUDER - DEBUG_ECHOLNPAIR("active_extruder: ", info.active_extruder); + DEBUG_ECHOLNPGM("active_extruder: ", info.active_extruder); #endif #if DISABLED(NO_VOLUMETRICS) DEBUG_ECHOPGM("filament_size:"); - LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPAIR(" ", info.filament_size[i]); + LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPGM(" ", info.filament_size[i]); DEBUG_EOL(); #endif @@ -635,7 +635,7 @@ void PrintJobRecovery::resume() { #endif #if HAS_HEATED_BED - DEBUG_ECHOLNPAIR("target_temperature_bed: ", info.target_temperature_bed); + DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed); #endif #if HAS_FAN @@ -648,7 +648,7 @@ void PrintJobRecovery::resume() { #endif #if HAS_LEVELING - DEBUG_ECHOLNPAIR("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade); + DEBUG_ECHOLNPGM("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade); #endif #if ENABLED(FWRETRACT) @@ -658,17 +658,17 @@ void PrintJobRecovery::resume() { if (e < EXTRUDERS - 1) DEBUG_CHAR(','); } DEBUG_EOL(); - DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop); + DEBUG_ECHOLNPGM("retract_hop: ", info.retract_hop); #endif // Mixing extruder and gradient #if BOTH(MIXING_EXTRUDER, GRADIENT_MIX) - DEBUG_ECHOLNPAIR("gradient: ", info.gradient.enabled ? "ON" : "OFF"); + DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF"); #endif - DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename); - DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos); - DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed); + DEBUG_ECHOLNPGM("sd_filename: ", info.sd_filename); + DEBUG_ECHOLNPGM("sdpos: ", info.sdpos); + DEBUG_ECHOLNPGM("print_job_elapsed: ", info.print_job_elapsed); DEBUG_ECHOPGM("axis_relative:"); if (TEST(info.axis_relative, REL_X)) DEBUG_ECHOPGM(" REL_X"); @@ -679,9 +679,9 @@ void PrintJobRecovery::resume() { if (TEST(info.axis_relative, E_MODE_REL)) DEBUG_ECHOPGM(" E_MODE_REL"); DEBUG_EOL(); - DEBUG_ECHOLNPAIR("flag.dryrun: ", AS_DIGIT(info.flag.dryrun)); - DEBUG_ECHOLNPAIR("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion)); - DEBUG_ECHOLNPAIR("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled)); + DEBUG_ECHOLNPGM("flag.dryrun: ", AS_DIGIT(info.flag.dryrun)); + DEBUG_ECHOLNPGM("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion)); + DEBUG_ECHOLNPGM("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled)); } else DEBUG_ECHOLNPGM("INVALID DATA"); diff --git a/Marlin/src/feature/probe_temp_comp.cpp b/Marlin/src/feature/probe_temp_comp.cpp index 6f2dad58b9c8..68984fe7566f 100644 --- a/Marlin/src/feature/probe_temp_comp.cpp +++ b/Marlin/src/feature/probe_temp_comp.cpp @@ -75,7 +75,7 @@ void ProbeTempComp::print_offsets() { #endif PSTR("Probe") ); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " temp: ", temp, "C; Offset: ", i < 0 ? 0.0f : sensor_z_offsets[s][i], " um" ); @@ -117,7 +117,7 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) { // Extrapolate float k, d; if (calib_idx < measurements) { - SERIAL_ECHOLNPAIR("Got ", calib_idx, " measurements. "); + SERIAL_ECHOLNPGM("Got ", calib_idx, " measurements. "); if (linear_regression(tsi, k, d)) { SERIAL_ECHOPGM("Applying linear extrapolation"); calib_idx--; diff --git a/Marlin/src/feature/repeat.cpp b/Marlin/src/feature/repeat.cpp index 11e4dd6a93bb..b52feb4a00f1 100644 --- a/Marlin/src/feature/repeat.cpp +++ b/Marlin/src/feature/repeat.cpp @@ -43,7 +43,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) { marker[index].sdpos = sdpos; marker[index].counter = count ?: -1; index++; - DEBUG_ECHOLNPAIR("Add Marker ", index, " at ", sdpos, " (", count, ")"); + DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")"); } } @@ -53,14 +53,14 @@ void Repeat::loop() { else { const uint8_t ind = index - 1; // Active marker's index if (!marker[ind].counter) { // Did its counter run out? - DEBUG_ECHOLNPAIR("Pass Marker ", index); + DEBUG_ECHOLNPGM("Pass Marker ", index); index--; // Carry on. Previous marker on the next 'M808'. } else { card.setIndex(marker[ind].sdpos); // Loop back to the marker. if (marker[ind].counter > 0) // Ignore a negative (or zero) counter. --marker[ind].counter; // Decrement the counter. If zero this 'M808' will be skipped next time. - DEBUG_ECHOLNPAIR("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")"); + DEBUG_ECHOLNPGM("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")"); } } } @@ -69,7 +69,7 @@ void Repeat::cancel() { LOOP_L_N(i, index) marker[i].counter = 0; } void Repeat::early_parse_M808(char * const cmd) { if (is_command_M808(cmd)) { - DEBUG_ECHOLNPAIR("Parsing \"", cmd, "\""); + DEBUG_ECHOLNPGM("Parsing \"", cmd, "\""); parser.parse(cmd); if (parser.seen('L')) add_marker(card.getIndex(), parser.value_ushort()); diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp index ef1f876bdfa5..1c5637835992 100644 --- a/Marlin/src/feature/runout.cpp +++ b/Marlin/src/feature/runout.cpp @@ -132,7 +132,7 @@ void event_filament_runout(const uint8_t extruder) { char script[strlen(FILAMENT_RUNOUT_SCRIPT) + 1]; sprintf_P(script, PSTR(FILAMENT_RUNOUT_SCRIPT), tool); #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) - SERIAL_ECHOLNPAIR("Runout Command: ", script); + SERIAL_ECHOLNPGM("Runout Command: ", script); #endif queue.inject(script); #else diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 93eb59c2a518..d88e81d9d992 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -145,7 +145,7 @@ class TFilamentMonitor : public FilamentMonitorBase { if (runout_flags) { SERIAL_ECHOPGM("Runout Sensors: "); LOOP_L_N(i, 8) SERIAL_ECHO('0' + TEST(runout_flags, i)); - SERIAL_ECHOPAIR(" -> ", extruder); + SERIAL_ECHOPGM(" -> ", extruder); if (ran_out) SERIAL_ECHOPGM(" RUN OUT"); SERIAL_EOL(); } @@ -317,7 +317,7 @@ class FilamentSensorBase { static uint8_t was_out; // = 0 if (out != TEST(was_out, s)) { TBI(was_out, s); - SERIAL_ECHOLNPAIR_P(PSTR("Filament Sensor "), '0' + s, out ? PSTR(" OUT") : PSTR(" IN")); + SERIAL_ECHOLNPGM_P(PSTR("Filament Sensor "), '0' + s, out ? PSTR(" OUT") : PSTR(" IN")); } #endif } @@ -352,7 +352,7 @@ class FilamentSensorBase { if (ELAPSED(ms, t)) { t = millis() + 1000UL; LOOP_L_N(i, NUM_RUNOUT_SENSORS) - SERIAL_ECHOPAIR_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]); + SERIAL_ECHOPGM_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]); SERIAL_EOL(); } #endif diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index 99cfd996c843..97fedf13c59c 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -226,7 +226,7 @@ SERIAL_ECHO(timestamp); SERIAL_ECHOPGM(": "); st.printLabel(); - SERIAL_ECHOLNPAIR(" driver overtemperature warning! (", st.getMilliamps(), "mA)"); + SERIAL_ECHOLNPGM(" driver overtemperature warning! (", st.getMilliamps(), "mA)"); } template @@ -271,7 +271,7 @@ st.rms_current(I_rms); #if ENABLED(REPORT_CURRENT_CHANGE) st.printLabel(); - SERIAL_ECHOLNPAIR(" current decreased to ", I_rms); + SERIAL_ECHOLNPGM(" current decreased to ", I_rms); #endif } } diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 87780486ebaa..1f7d5cf1a543 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -300,7 +300,7 @@ class TMCMarlin : public TMC266 template void tmc_print_current(TMC &st) { st.printLabel(); - SERIAL_ECHOLNPAIR(" driver current: ", st.getMilliamps()); + SERIAL_ECHOLNPGM(" driver current: ", st.getMilliamps()); } #if ENABLED(MONITOR_DRIVER_STATUS) @@ -322,7 +322,7 @@ void tmc_print_current(TMC &st) { template void tmc_print_pwmthrs(TMC &st) { st.printLabel(); - SERIAL_ECHOLNPAIR(" stealthChop max speed: ", st.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" stealthChop max speed: ", st.get_pwm_thrs()); } #endif #if USE_SENSORLESS diff --git a/Marlin/src/feature/twibus.cpp b/Marlin/src/feature/twibus.cpp index 755224544c6e..5f5209cdd480 100644 --- a/Marlin/src/feature/twibus.cpp +++ b/Marlin/src/feature/twibus.cpp @@ -84,7 +84,7 @@ void TWIBus::send() { void TWIBus::echoprefix(uint8_t bytes, const char pref[], uint8_t adr) { SERIAL_ECHO_START(); SERIAL_ECHOPGM_P(pref); - SERIAL_ECHOPAIR(": from:", adr, " bytes:", bytes, " data:"); + SERIAL_ECHOPGM(": from:", adr, " bytes:", bytes, " data:"); } // static diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index 882197139ee1..ba14e6f0b484 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -539,7 +539,7 @@ void GcodeSuite::G26() { if (bedtemp) { if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) { - SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C)."); + SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C)."); return; } g26.bed_temp = bedtemp; diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp index 3a4e1bdd5a19..8d5c0573617c 100644 --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -106,19 +106,19 @@ void GcodeSuite::G35() { const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true); if (isnan(z_probed_height)) { - SERIAL_ECHOPAIR("G35 failed at point ", i + 1, " ("); + SERIAL_ECHOPGM("G35 failed at point ", i + 1, " ("); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); SERIAL_CHAR(')'); - SERIAL_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y); + SERIAL_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y); err_break = true; break; } if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPAIR("Probing point ", i + 1, " ("); + DEBUG_ECHOPGM("Probing point ", i + 1, " ("); DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); DEBUG_CHAR(')'); - DEBUG_ECHOLNPAIR_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height); + DEBUG_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height); } z_measured[i] = z_probed_height; @@ -138,9 +138,9 @@ void GcodeSuite::G35() { SERIAL_ECHOPGM("Turn "); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); - SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns"); - if (minutes) SERIAL_ECHOPAIR(" and ", ABS(minutes), " minutes"); - if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)"); + SERIAL_ECHOPGM(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns"); + if (minutes) SERIAL_ECHOPGM(" and ", ABS(minutes), " minutes"); + if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPGM(" (", -diff, "mm)"); SERIAL_EOL(); } } diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 55055a5b025a..1110ce7ccfca 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -76,9 +76,9 @@ void GcodeSuite::M420() { TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y))); } SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_Y) " mesh "); - SERIAL_ECHOPAIR(" (", x_min); + SERIAL_ECHOPGM(" (", x_min); SERIAL_CHAR(','); SERIAL_ECHO(y_min); - SERIAL_ECHOPAIR(")-(", x_max); + SERIAL_ECHOPGM(")-(", x_max); SERIAL_CHAR(','); SERIAL_ECHO(y_max); SERIAL_ECHOLNPGM(")"); } @@ -108,7 +108,7 @@ void GcodeSuite::M420() { if (!WITHIN(storage_slot, 0, a - 1)) { SERIAL_ECHOLNPGM("?Invalid storage slot."); - SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1); + SERIAL_ECHOLNPGM("?Use 0 to ", a - 1); return; } @@ -128,7 +128,7 @@ void GcodeSuite::M420() { ubl.display_map(parser.byteval('T')); SERIAL_ECHOPGM("Mesh is "); if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in"); - SERIAL_ECHOLNPAIR("valid\nStorage slot: ", ubl.storage_slot); + SERIAL_ECHOLNPGM("valid\nStorage slot: ", ubl.storage_slot); } #endif // AUTO_BED_LEVELING_UBL @@ -246,7 +246,7 @@ void GcodeSuite::M420_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR( TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling")) )); - SERIAL_ECHOPAIR_P( + SERIAL_ECHOPGM_P( PSTR(" M420 S"), planner.leveling_active #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) , SP_Z_STR, LINEAR_UNIT(planner.z_fade_height) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index f756aa89df4d..0eb13dba9639 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -379,7 +379,7 @@ G29_TYPE GcodeSuite::G29() { if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) { if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x, + DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x, " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y); } SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds."); @@ -470,7 +470,7 @@ G29_TYPE GcodeSuite::G29() { if (abl.verbose_level || seenQ) { SERIAL_ECHOPGM("Manual G29 "); if (g29_in_progress) - SERIAL_ECHOLNPAIR("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points); + SERIAL_ECHOLNPGM("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points); else SERIAL_ECHOLNPGM("idle"); } @@ -513,7 +513,7 @@ G29_TYPE GcodeSuite::G29() { z_values[abl.meshCount.x][abl.meshCount.y] = newz; TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, newz)); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset); #endif } @@ -635,7 +635,7 @@ G29_TYPE GcodeSuite::G29() { // Avoid probing outside the round or hexagonal area if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue; - if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", pt_index, "/", abl.abl_points, "."); + if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing mesh point ", pt_index, "/", abl.abl_points, "."); TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points))); abl.measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(abl.probePos, raise_after, abl.verbose_level); @@ -680,7 +680,7 @@ G29_TYPE GcodeSuite::G29() { // Probe at 3 arbitrary points LOOP_L_N(i, 3) { - if (abl.verbose_level) SERIAL_ECHOLNPAIR("Probing point ", i + 1, "/3."); + if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing point ", i + 1, "/3."); TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1))); // Retain the last probe position @@ -842,7 +842,7 @@ G29_TYPE GcodeSuite::G29() { && NEAR(current_position.y, abl.probePos.y - probe.offset_xy.y) ) { const float simple_z = current_position.z - abl.measured_z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z); converted.z = simple_z; } @@ -855,14 +855,14 @@ G29_TYPE GcodeSuite::G29() { #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) if (!abl.dryrun) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("G29 uncorrected Z:", current_position.z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("G29 uncorrected Z:", current_position.z); // Unapply the offset because it is going to be immediately applied // and cause compensation movement in Z const float fade_scaling_factor = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.fade_scaling_factor_for_z(current_position.z), 1); current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(" corrected Z:", current_position.z); } #endif // ABL_PLANAR @@ -880,7 +880,7 @@ G29_TYPE GcodeSuite::G29() { TERN_(HAS_BED_PROBE, probe.move_z_after_probing()); #ifdef Z_PROBE_END_SCRIPT - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT); planner.synchronize(); process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); #endif diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index adfe61d3d2dd..11e503f0136b 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -173,7 +173,7 @@ void GcodeSuite::G29() { if (parser.seenval('I')) { ix = parser.value_int(); if (!WITHIN(ix, 0, (GRID_MAX_POINTS_X) - 1)) { - SERIAL_ECHOLNPAIR("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")"); + SERIAL_ECHOLNPGM("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")"); return; } } @@ -183,7 +183,7 @@ void GcodeSuite::G29() { if (parser.seenval('J')) { iy = parser.value_int(); if (!WITHIN(iy, 0, (GRID_MAX_POINTS_Y) - 1)) { - SERIAL_ECHOLNPAIR("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")"); + SERIAL_ECHOLNPGM("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")"); return; } } @@ -213,7 +213,7 @@ void GcodeSuite::G29() { } // switch(state) if (state == MeshNext) { - SERIAL_ECHOLNPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS); + SERIAL_ECHOLNPGM("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS); if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS))); } diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index d85c0306d475..dc93ba3d2f25 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -270,7 +270,7 @@ void GcodeSuite::G28() { #if HAS_HOMING_CURRENT auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b) { - DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); + DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b); }; #if HAS_CURRENT_HOME(X) const int16_t tmc_save_current_X = stepperX.getMilliamps(); @@ -371,7 +371,7 @@ void GcodeSuite::G28() { if (z_homing_height && (LINEAR_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK))) { // Raise Z before homing any other axes and z is not already high enough (never lower z) - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before homing) by ", z_homing_height); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z (before homing) by ", z_homing_height); do_z_clearance(z_homing_height); TERN_(BLTOUCH, bltouch.init()); } diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index a897a101157c..597801cf52d9 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -107,14 +107,14 @@ void print_signed_float(PGM_P const prefix, const_float_t f) { * - Print the delta settings */ static void print_calibration_settings(const bool end_stops, const bool tower_angles) { - SERIAL_ECHOPAIR(".Height:", delta_height); + SERIAL_ECHOPGM(".Height:", delta_height); if (end_stops) { print_signed_float(PSTR("Ex"), delta_endstop_adj.a); print_signed_float(PSTR("Ey"), delta_endstop_adj.b); print_signed_float(PSTR("Ez"), delta_endstop_adj.c); } if (end_stops && tower_angles) { - SERIAL_ECHOPAIR(" Radius:", delta_radius); + SERIAL_ECHOPGM(" Radius:", delta_radius); SERIAL_EOL(); SERIAL_CHAR('.'); SERIAL_ECHO_SP(13); @@ -125,7 +125,7 @@ static void print_calibration_settings(const bool end_stops, const bool tower_an print_signed_float(PSTR("Tz"), delta_tower_angle_trim.c); } if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR - SERIAL_ECHOPAIR(" Radius:", delta_radius); + SERIAL_ECHOPGM(" Radius:", delta_radius); } SERIAL_EOL(); } diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index c5f5e582a91a..dd1dd5622ac1 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -201,7 +201,7 @@ void GcodeSuite::G34() { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> probing all positions."); const int iter = iteration + 1; - SERIAL_ECHOLNPAIR("\nG34 Iteration: ", iter); + SERIAL_ECHOLNPGM("\nG34 Iteration: ", iter); #if HAS_STATUS_MESSAGE char str[iter_str_len + 2 + 1]; sprintf_P(str, msg_iteration, iter); @@ -221,7 +221,7 @@ void GcodeSuite::G34() { if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe); if (DEBUGGING(LEVELING)) - DEBUG_ECHOLNPAIR_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y); + DEBUG_ECHOLNPGM_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y); // Probe a Z height for each stepper. // Probing sanity check is disabled, as it would trigger even in normal cases because @@ -238,7 +238,7 @@ void GcodeSuite::G34() { // the next iteration of probing. This allows adjustments to be made away from the bed. z_measured[iprobe] = z_probed_height + Z_CLEARANCE_BETWEEN_PROBES; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]); // Remember the minimum measurement to calculate the correction later on z_measured_min = _MIN(z_measured_min, z_measured[iprobe]); @@ -267,7 +267,7 @@ void GcodeSuite::G34() { linear_fit_data lfd; incremental_LSF_reset(&lfd); LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { - SERIAL_ECHOLNPAIR("PROBEPT_", i, ": ", z_measured[i]); + SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]); incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]); } finish_incremental_LSF(&lfd); @@ -278,7 +278,7 @@ void GcodeSuite::G34() { z_measured_min = _MIN(z_measured_min, z_measured[i]); } - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( LIST_N(DOUBLE(NUM_Z_STEPPER_DRIVERS), "Calculated Z1=", z_measured[0], " Z2=", z_measured[1], @@ -288,7 +288,7 @@ void GcodeSuite::G34() { ); #endif - SERIAL_ECHOLNPAIR("\n" + SERIAL_ECHOLNPGM("\n" "Z2-Z1=", ABS(z_measured[1] - z_measured[0]) #if TRIPLE_Z , " Z3-Z2=", ABS(z_measured[2] - z_measured[1]) @@ -372,8 +372,8 @@ void GcodeSuite::G34() { // Check for less accuracy compared to last move if (decreasing_accuracy(last_z_align_move[zstepper], z_align_abs)) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " last_z_align_move = ", last_z_align_move[zstepper]); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " z_align_abs = ", z_align_abs); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " last_z_align_move = ", last_z_align_move[zstepper]); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " z_align_abs = ", z_align_abs); adjustment_reverse = !adjustment_reverse; } @@ -385,7 +385,7 @@ void GcodeSuite::G34() { // Stop early if all measured points achieve accuracy target if (z_align_abs > z_auto_align_accuracy) success_break = false; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " corrected by ", z_align_move); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " corrected by ", z_align_move); // Lock all steppers except one stepper.set_all_z_lock(true, zstepper); @@ -395,7 +395,7 @@ void GcodeSuite::G34() { // Will match reversed Z steppers on dual steppers. Triple will need more work to map. if (adjustment_reverse) { z_align_move = -z_align_move; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", zstepper + 1, " correction reversed to ", z_align_move); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " correction reversed to ", z_align_move); } #endif @@ -421,7 +421,7 @@ void GcodeSuite::G34() { if (err_break) SERIAL_ECHOLNPGM("G34 aborted."); else { - SERIAL_ECHOLNPAIR("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations); + SERIAL_ECHOLNPGM("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations); SERIAL_ECHOLNPAIR_F("Accuracy: ", z_maxdiff); } @@ -541,7 +541,7 @@ void GcodeSuite::M422_report(const bool forReplay/*=true*/) { report_heading(forReplay, PSTR(STR_Z_AUTO_ALIGN)); LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { report_echo_start(forReplay); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M422 S"), i + 1, SP_X_STR, z_stepper_align.xy[i].x, SP_Y_STR, z_stepper_align.xy[i].y @@ -550,7 +550,7 @@ void GcodeSuite::M422_report(const bool forReplay/*=true*/) { #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { report_echo_start(forReplay); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M422 W"), i + 1, SP_X_STR, z_stepper_align.stepper_xy[i].x, SP_Y_STR, z_stepper_align.stepper_xy[i].y diff --git a/Marlin/src/gcode/calibrate/G425.cpp b/Marlin/src/gcode/calibrate/G425.cpp index c8efea858ca5..23a66dd0c593 100644 --- a/Marlin/src/gcode/calibrate/G425.cpp +++ b/Marlin/src/gcode/calibrate/G425.cpp @@ -354,44 +354,44 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { inline void report_measured_faces(const measurements_t &m) { SERIAL_ECHOLNPGM("Sides:"); #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) - SERIAL_ECHOLNPAIR(" Top: ", m.obj_side[TOP]); + SERIAL_ECHOLNPGM(" Top: ", m.obj_side[TOP]); #endif #if ENABLED(CALIBRATION_MEASURE_LEFT) - SERIAL_ECHOLNPAIR(" Left: ", m.obj_side[LEFT]); + SERIAL_ECHOLNPGM(" Left: ", m.obj_side[LEFT]); #endif #if ENABLED(CALIBRATION_MEASURE_RIGHT) - SERIAL_ECHOLNPAIR(" Right: ", m.obj_side[RIGHT]); + SERIAL_ECHOLNPGM(" Right: ", m.obj_side[RIGHT]); #endif #if HAS_Y_AXIS #if ENABLED(CALIBRATION_MEASURE_FRONT) - SERIAL_ECHOLNPAIR(" Front: ", m.obj_side[FRONT]); + SERIAL_ECHOLNPGM(" Front: ", m.obj_side[FRONT]); #endif #if ENABLED(CALIBRATION_MEASURE_BACK) - SERIAL_ECHOLNPAIR(" Back: ", m.obj_side[BACK]); + SERIAL_ECHOLNPGM(" Back: ", m.obj_side[BACK]); #endif #endif #if LINEAR_AXES >= 4 #if ENABLED(CALIBRATION_MEASURE_IMIN) - SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]); + SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]); #endif #if ENABLED(CALIBRATION_MEASURE_IMAX) - SERIAL_ECHOLNPAIR(" " STR_I_MAX ": ", m.obj_side[IMAXIMUM]); + SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.obj_side[IMAXIMUM]); #endif #endif #if LINEAR_AXES >= 5 #if ENABLED(CALIBRATION_MEASURE_JMIN) - SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]); + SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]); #endif #if ENABLED(CALIBRATION_MEASURE_JMAX) - SERIAL_ECHOLNPAIR(" " STR_J_MAX ": ", m.obj_side[JMAXIMUM]); + SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.obj_side[JMAXIMUM]); #endif #endif #if LINEAR_AXES >= 6 #if ENABLED(CALIBRATION_MEASURE_KMIN) - SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]); + SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]); #endif #if ENABLED(CALIBRATION_MEASURE_KMAX) - SERIAL_ECHOLNPAIR(" " STR_K_MAX ": ", m.obj_side[KMAXIMUM]); + SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.obj_side[KMAXIMUM]); #endif #endif SERIAL_EOL(); @@ -400,20 +400,20 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { inline void report_measured_center(const measurements_t &m) { SERIAL_ECHOLNPGM("Center:"); #if HAS_X_CENTER - SERIAL_ECHOLNPAIR_P(SP_X_STR, m.obj_center.x); + SERIAL_ECHOLNPGM_P(SP_X_STR, m.obj_center.x); #endif #if HAS_Y_CENTER - SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.obj_center.y); + SERIAL_ECHOLNPGM_P(SP_Y_STR, m.obj_center.y); #endif - SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.obj_center.z); + SERIAL_ECHOLNPGM_P(SP_Z_STR, m.obj_center.z); #if HAS_I_CENTER - SERIAL_ECHOLNPAIR_P(SP_I_STR, m.obj_center.i); + SERIAL_ECHOLNPGM_P(SP_I_STR, m.obj_center.i); #endif #if HAS_J_CENTER - SERIAL_ECHOLNPAIR_P(SP_J_STR, m.obj_center.j); + SERIAL_ECHOLNPGM_P(SP_J_STR, m.obj_center.j); #endif #if HAS_K_CENTER - SERIAL_ECHOLNPAIR_P(SP_K_STR, m.obj_center.k); + SERIAL_ECHOLNPGM_P(SP_K_STR, m.obj_center.k); #endif SERIAL_EOL(); } @@ -422,45 +422,45 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM("Backlash:"); #if AXIS_CAN_CALIBRATE(X) #if ENABLED(CALIBRATION_MEASURE_LEFT) - SERIAL_ECHOLNPAIR(" Left: ", m.backlash[LEFT]); + SERIAL_ECHOLNPGM(" Left: ", m.backlash[LEFT]); #endif #if ENABLED(CALIBRATION_MEASURE_RIGHT) - SERIAL_ECHOLNPAIR(" Right: ", m.backlash[RIGHT]); + SERIAL_ECHOLNPGM(" Right: ", m.backlash[RIGHT]); #endif #endif #if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y) #if ENABLED(CALIBRATION_MEASURE_FRONT) - SERIAL_ECHOLNPAIR(" Front: ", m.backlash[FRONT]); + SERIAL_ECHOLNPGM(" Front: ", m.backlash[FRONT]); #endif #if ENABLED(CALIBRATION_MEASURE_BACK) - SERIAL_ECHOLNPAIR(" Back: ", m.backlash[BACK]); + SERIAL_ECHOLNPGM(" Back: ", m.backlash[BACK]); #endif #endif #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) - SERIAL_ECHOLNPAIR(" Top: ", m.backlash[TOP]); + SERIAL_ECHOLNPGM(" Top: ", m.backlash[TOP]); #endif #if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I) #if ENABLED(CALIBRATION_MEASURE_IMIN) - SERIAL_ECHOLNPAIR(" " STR_I_MIN ": ", m.backlash[IMINIMUM]); + SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.backlash[IMINIMUM]); #endif #if ENABLED(CALIBRATION_MEASURE_IMAX) - SERIAL_ECHOLNPAIR(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]); + SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]); #endif #endif #if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J) #if ENABLED(CALIBRATION_MEASURE_JMIN) - SERIAL_ECHOLNPAIR(" " STR_J_MIN ": ", m.backlash[JMINIMUM]); + SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.backlash[JMINIMUM]); #endif #if ENABLED(CALIBRATION_MEASURE_JMAX) - SERIAL_ECHOLNPAIR(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]); + SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]); #endif #endif #if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K) #if ENABLED(CALIBRATION_MEASURE_KMIN) - SERIAL_ECHOLNPAIR(" " STR_K_MIN ": ", m.backlash[KMINIMUM]); + SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.backlash[KMINIMUM]); #endif #if ENABLED(CALIBRATION_MEASURE_KMAX) - SERIAL_ECHOLNPAIR(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]); + SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]); #endif #endif SERIAL_EOL(); @@ -471,22 +471,22 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHO(active_extruder); SERIAL_ECHOLNPGM(" Positional Error:"); #if HAS_X_CENTER && AXIS_CAN_CALIBRATE(X) - SERIAL_ECHOLNPAIR_P(SP_X_STR, m.pos_error.x); + SERIAL_ECHOLNPGM_P(SP_X_STR, m.pos_error.x); #endif #if HAS_Y_CENTER && AXIS_CAN_CALIBRATE(Y) - SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.pos_error.y); + SERIAL_ECHOLNPGM_P(SP_Y_STR, m.pos_error.y); #endif #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) - SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z); + SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z); #endif #if HAS_I_CENTER && AXIS_CAN_CALIBRATE(I) - SERIAL_ECHOLNPAIR_P(SP_I_STR, m.pos_error.i); + SERIAL_ECHOLNPGM_P(SP_I_STR, m.pos_error.i); #endif #if HAS_J_CENTER && AXIS_CAN_CALIBRATE(J) - SERIAL_ECHOLNPAIR_P(SP_J_STR, m.pos_error.j); + SERIAL_ECHOLNPGM_P(SP_J_STR, m.pos_error.j); #endif #if HAS_K_CENTER && AXIS_CAN_CALIBRATE(K) - SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z); + SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z); #endif SERIAL_EOL(); } @@ -494,10 +494,10 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { inline void report_measured_nozzle_dimensions(const measurements_t &m) { SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:"); #if HAS_X_CENTER - SERIAL_ECHOLNPAIR_P(SP_X_STR, m.nozzle_outer_dimension.x); + SERIAL_ECHOLNPGM_P(SP_X_STR, m.nozzle_outer_dimension.x); #endif #if HAS_Y_CENTER - SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.nozzle_outer_dimension.y); + SERIAL_ECHOLNPGM_P(SP_Y_STR, m.nozzle_outer_dimension.y); #endif SERIAL_EOL(); UNUSED(m); @@ -509,7 +509,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { // inline void report_hotend_offsets() { LOOP_S_L_N(e, 1, HOTENDS) - SERIAL_ECHOLNPAIR_P(PSTR("T"), e, PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z); + SERIAL_ECHOLNPGM_P(PSTR("T"), e, PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z); } #endif diff --git a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp index 2d1b9443bf17..170958cab407 100644 --- a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp @@ -171,7 +171,7 @@ void GcodeSuite::G76() { millis_t next_temp_report = millis() + 1000; auto report_targets = [&](const celsius_t tb, const celsius_t tp) { - SERIAL_ECHOLNPAIR("Target Bed:", tb, " Probe:", tp); + SERIAL_ECHOLNPGM("Target Bed:", tb, " Probe:", tp); }; if (do_bed_cal) { @@ -211,7 +211,7 @@ void GcodeSuite::G76() { if (isnan(measured_z) || target_bed > (BED_MAX_TARGET)) break; } - SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index()); + SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index()); if (temp_comp.finish_calibration(TSI_BED)) { say_successfully_calibrated(); SERIAL_ECHOLNPGM(" bed."); @@ -255,7 +255,7 @@ void GcodeSuite::G76() { do_blocking_move_to(noz_pos_xyz); say_waiting_for_probe_heating(); - SERIAL_ECHOLNPAIR(" Bed:", target_bed, " Probe:", target_probe); + SERIAL_ECHOLNPGM(" Bed:", target_bed, " Probe:", target_probe); const millis_t probe_timeout_ms = millis() + SEC_TO_MS(900UL); while (thermalManager.degProbe() < target_probe) { if (report_temps(next_temp_report, probe_timeout_ms)) { @@ -270,7 +270,7 @@ void GcodeSuite::G76() { if (isnan(measured_z) || target_probe > cali_info_init[TSI_PROBE].end_temp) break; } - SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index()); + SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index()); if (temp_comp.finish_calibration(TSI_PROBE)) say_successfully_calibrated(); else @@ -325,7 +325,7 @@ void GcodeSuite::M871() { TSI_PROBE ); if (idx > 0 && temp_comp.set_offset(mod, idx - 1, offset_val)) - SERIAL_ECHOLNPAIR("Set value: ", offset_val); + SERIAL_ECHOLNPGM("Set value: ", offset_val); else SERIAL_ECHOLNPGM("!Invalid index. Failed to set value (note: value at index 0 is constant)."); diff --git a/Marlin/src/gcode/calibrate/M100.cpp b/Marlin/src/gcode/calibrate/M100.cpp index ee572e033d75..0e2d42907a25 100644 --- a/Marlin/src/gcode/calibrate/M100.cpp +++ b/Marlin/src/gcode/calibrate/M100.cpp @@ -202,7 +202,7 @@ inline int check_for_free_memory_corruption(PGM_P const title) { char *start_free_memory = free_memory_start, *end_free_memory = free_memory_end; int n = end_free_memory - start_free_memory; - SERIAL_ECHOLNPAIR("\nfmc() n=", n, + SERIAL_ECHOLNPGM("\nfmc() n=", n, "\nfree_memory_start=", hex_address(free_memory_start), " end=", hex_address(end_free_memory)); @@ -227,15 +227,15 @@ inline int check_for_free_memory_corruption(PGM_P const title) { if (start_free_memory[i] == TEST_BYTE) { int32_t j = count_test_bytes(start_free_memory + i); if (j > 8) { - //SERIAL_ECHOPAIR("Found ", j); - //SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(start_free_memory + i)); + //SERIAL_ECHOPGM("Found ", j); + //SERIAL_ECHOLNPGM(" bytes free at ", hex_address(start_free_memory + i)); i += j; block_cnt++; - SERIAL_ECHOLNPAIR(" (", block_cnt, ") found=", j); + SERIAL_ECHOLNPGM(" (", block_cnt, ") found=", j); } } } - SERIAL_ECHOPAIR(" block_found=", block_cnt); + SERIAL_ECHOPGM(" block_found=", block_cnt); if (block_cnt != 1) SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area."); @@ -267,7 +267,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_ if (*addr == TEST_BYTE) { const int32_t j = count_test_bytes(addr); if (j > 8) { - SERIAL_ECHOLNPAIR("Found ", j, " bytes free at ", hex_address(addr)); + SERIAL_ECHOLNPGM("Found ", j, " bytes free at ", hex_address(addr)); if (j > max_cnt) { max_cnt = j; max_addr = addr; @@ -277,11 +277,11 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_ } } } - if (block_cnt > 1) SERIAL_ECHOLNPAIR( + if (block_cnt > 1) SERIAL_ECHOLNPGM( "\nMemory Corruption detected in free memory area." "\nLargest free block is ", max_cnt, " bytes at ", hex_address(max_addr) ); - SERIAL_ECHOLNPAIR("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F "))); + SERIAL_ECHOLNPGM("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F "))); } #if ENABLED(M100_FREE_MEMORY_CORRUPTOR) @@ -299,7 +299,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_ for (uint32_t i = 1; i <= size; i++) { char * const addr = start_free_memory + i * j; *addr = i; - SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr)); + SERIAL_ECHOPGM("\nCorrupting address: ", hex_address(addr)); } SERIAL_EOL(); } @@ -327,8 +327,8 @@ inline void init_free_memory(char *start_free_memory, int32_t size) { for (int32_t i = 0; i < size; i++) { if (start_free_memory[i] != TEST_BYTE) { - SERIAL_ECHOPAIR("? address : ", hex_address(start_free_memory + i)); - SERIAL_ECHOLNPAIR("=", hex_byte(start_free_memory[i])); + SERIAL_ECHOPGM("? address : ", hex_address(start_free_memory + i)); + SERIAL_ECHOLNPGM("=", hex_byte(start_free_memory[i])); SERIAL_EOL(); } } @@ -340,14 +340,14 @@ inline void init_free_memory(char *start_free_memory, int32_t size) { void GcodeSuite::M100() { char *sp = top_of_stack(); if (!free_memory_end) free_memory_end = sp - MEMORY_END_CORRECTION; - SERIAL_ECHOPAIR("\nbss_end : ", hex_address(end_bss)); - if (heaplimit) SERIAL_ECHOPAIR("\n__heaplimit : ", hex_address(heaplimit)); - SERIAL_ECHOPAIR("\nfree_memory_start : ", hex_address(free_memory_start)); - if (stacklimit) SERIAL_ECHOPAIR("\n__stacklimit : ", hex_address(stacklimit)); - SERIAL_ECHOPAIR("\nfree_memory_end : ", hex_address(free_memory_end)); + SERIAL_ECHOPGM("\nbss_end : ", hex_address(end_bss)); + if (heaplimit) SERIAL_ECHOPGM("\n__heaplimit : ", hex_address(heaplimit)); + SERIAL_ECHOPGM("\nfree_memory_start : ", hex_address(free_memory_start)); + if (stacklimit) SERIAL_ECHOPGM("\n__stacklimit : ", hex_address(stacklimit)); + SERIAL_ECHOPGM("\nfree_memory_end : ", hex_address(free_memory_end)); if (MEMORY_END_CORRECTION) - SERIAL_ECHOPAIR("\nMEMORY_END_CORRECTION : ", MEMORY_END_CORRECTION); - SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp)); + SERIAL_ECHOPGM("\nMEMORY_END_CORRECTION : ", MEMORY_END_CORRECTION); + SERIAL_ECHOLNPGM("\nStack Pointer : ", hex_address(sp)); // Always init on the first invocation of M100 static bool m100_not_initialized = true; diff --git a/Marlin/src/gcode/calibrate/M425.cpp b/Marlin/src/gcode/calibrate/M425.cpp index 9f7e00738b26..1d314a37d3df 100644 --- a/Marlin/src/gcode/calibrate/M425.cpp +++ b/Marlin/src/gcode/calibrate/M425.cpp @@ -86,7 +86,7 @@ void GcodeSuite::M425() { SERIAL_ECHOPGM("Backlash Correction "); if (!backlash.correction) SERIAL_ECHOPGM("in"); SERIAL_ECHOLNPGM("active:"); - SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)"); + SERIAL_ECHOLNPGM(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)"); SERIAL_ECHOPGM(" Backlash Distance (mm): "); LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a)) { SERIAL_CHAR(' ', AXIS_CHAR(a)); @@ -95,7 +95,7 @@ void GcodeSuite::M425() { } #ifdef BACKLASH_SMOOTHING_MM - SERIAL_ECHOLNPAIR(" Smoothing (mm): S", backlash.smoothing_mm); + SERIAL_ECHOLNPGM(" Smoothing (mm): S", backlash.smoothing_mm); #endif #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) @@ -115,7 +115,7 @@ void GcodeSuite::M425() { void GcodeSuite::M425_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_BACKLASH_COMPENSATION)); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M425 F"), backlash.get_correction() #ifdef BACKLASH_SMOOTHING_MM , PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm) diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 19b11f602a42..9db90c76ac32 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -162,7 +162,7 @@ void GcodeSuite::M48() { #endif ); if (verbose_level > 3) { - SERIAL_ECHOPAIR("Start radius:", radius, " angle:", angle, " dir:"); + SERIAL_ECHOPGM("Start radius:", radius, " angle:", angle, " dir:"); if (dir > 0) SERIAL_CHAR('C'); SERIAL_ECHOLNPGM("CW"); } @@ -200,7 +200,7 @@ void GcodeSuite::M48() { while (!probe.can_reach(next_pos)) { next_pos *= 0.8f; if (verbose_level > 3) - SERIAL_ECHOLNPAIR_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y); + SERIAL_ECHOLNPGM_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y); } #elif HAS_ENDSTOPS // For a rectangular bed just keep the probe in bounds @@ -209,7 +209,7 @@ void GcodeSuite::M48() { #endif if (verbose_level > 3) - SERIAL_ECHOLNPAIR_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y); + SERIAL_ECHOLNPGM_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y); do_blocking_move_to_xy(next_pos); } // n_legs loop @@ -241,7 +241,7 @@ void GcodeSuite::M48() { if (verbose_level > 1) { SERIAL_ECHO(n + 1); - SERIAL_ECHOPAIR(" of ", n_samples); + SERIAL_ECHOPGM(" of ", n_samples); SERIAL_ECHOPAIR_F(": z: ", pz, 3); SERIAL_CHAR(' '); dev_report(verbose_level > 2, mean, sigma, min, max); diff --git a/Marlin/src/gcode/calibrate/M665.cpp b/Marlin/src/gcode/calibrate/M665.cpp index d4d49d6a6c97..09b5ec8d4ee8 100644 --- a/Marlin/src/gcode/calibrate/M665.cpp +++ b/Marlin/src/gcode/calibrate/M665.cpp @@ -63,7 +63,7 @@ void GcodeSuite::M665_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_DELTA_SETTINGS)); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod) , PSTR(" R"), LINEAR_UNIT(delta_radius) , PSTR(" H"), LINEAR_UNIT(delta_height) @@ -133,7 +133,7 @@ void GcodeSuite::M665_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_SCARA_SETTINGS " (" STR_SCARA_S TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")")); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M665 S"), segments_per_second #if HAS_SCARA_OFFSET , SP_P_STR, scara_home_offset.a diff --git a/Marlin/src/gcode/calibrate/M666.cpp b/Marlin/src/gcode/calibrate/M666.cpp index 6e1ebfb5db59..c4149c23520a 100644 --- a/Marlin/src/gcode/calibrate/M666.cpp +++ b/Marlin/src/gcode/calibrate/M666.cpp @@ -52,17 +52,17 @@ is_err = true; else { delta_endstop_adj[i] = v; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v); } } } - if (is_err) SERIAL_ECHOLNPAIR("?M666 offsets must be <= 0"); + if (is_err) SERIAL_ECHOLNPGM("?M666 offsets must be <= 0"); if (!is_set) M666_report(); } void GcodeSuite::M666_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) @@ -108,22 +108,22 @@ report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); SERIAL_ECHOPGM(" M666"); #if ENABLED(X_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); + SERIAL_ECHOLNPGM_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); #endif #if ENABLED(Y_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); + SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); #endif #if ENABLED(Z_MULTI_ENDSTOPS) #if NUM_Z_STEPPER_DRIVERS >= 3 - SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); report_echo_start(forReplay); - SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + SERIAL_ECHOPGM(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); #if NUM_Z_STEPPER_DRIVERS >= 4 report_echo_start(forReplay); - SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); + SERIAL_ECHOPGM(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); #endif #else - SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); + SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); #endif #endif } diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp index 048a2887e62e..2880bd994307 100644 --- a/Marlin/src/gcode/config/M200-M205.cpp +++ b/Marlin/src/gcode/config/M200-M205.cpp @@ -84,7 +84,7 @@ #if EXTRUDERS == 1 { - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " M200 S", parser.volumetric_enabled, " D", LINEAR_UNIT(planner.filament_size[0]) #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0]) @@ -92,10 +92,10 @@ ); } #else - SERIAL_ECHOLNPAIR(" M200 S", parser.volumetric_enabled); + SERIAL_ECHOLNPGM(" M200 S", parser.volumetric_enabled); LOOP_L_N(i, EXTRUDERS) { report_echo_start(forReplay); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " M200 T", i, " D", LINEAR_UNIT(planner.filament_size[i]) #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i]) @@ -134,7 +134,7 @@ void GcodeSuite::M201() { void GcodeSuite::M201_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_MAX_ACCELERATION)); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( LIST_N(DOUBLE(LINEAR_AXES), PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]), SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]), @@ -150,7 +150,7 @@ void GcodeSuite::M201_report(const bool forReplay/*=true*/) { #if ENABLED(DISTINCT_E_FACTORS) LOOP_L_N(i, E_STEPPERS) { report_echo_start(forReplay); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M201 T"), i , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)]) ); @@ -179,7 +179,7 @@ void GcodeSuite::M203() { void GcodeSuite::M203_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_MAX_FEEDRATES)); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( LIST_N(DOUBLE(LINEAR_AXES), PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]), SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]), @@ -195,7 +195,7 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) { #if ENABLED(DISTINCT_E_FACTORS) LOOP_L_N(i, E_STEPPERS) { SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M203 T"), i , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)]) ); @@ -225,7 +225,7 @@ void GcodeSuite::M204() { void GcodeSuite::M204_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_ACCELERATION_P_R_T)); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration) , PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration) , SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration) @@ -292,7 +292,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) { TERN_(HAS_CLASSIC_E_JERK, " E") ")" )); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us) , PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s) , SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s) diff --git a/Marlin/src/gcode/config/M217.cpp b/Marlin/src/gcode/config/M217.cpp index 72b7d16ac015..11d8c43ef02f 100644 --- a/Marlin/src/gcode/config/M217.cpp +++ b/Marlin/src/gcode/config/M217.cpp @@ -136,33 +136,33 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) { SERIAL_ECHOPGM(" M217"); #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) - SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length)); - SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume), + SERIAL_ECHOPGM(" S", LINEAR_UNIT(toolchange_settings.swap_length)); + SERIAL_ECHOPGM_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume), SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime), SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed)); - SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed), + SERIAL_ECHOPGM(" R", LINEAR_UNIT(toolchange_settings.retract_speed), " U", LINEAR_UNIT(toolchange_settings.unretract_speed), " F", toolchange_settings.fan_speed, " G", toolchange_settings.fan_time); #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) - SERIAL_ECHOPAIR(" A", migration.automode); - SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last)); + SERIAL_ECHOPGM(" A", migration.automode); + SERIAL_ECHOPGM(" L", LINEAR_UNIT(migration.last)); #endif #if ENABLED(TOOLCHANGE_PARK) - SERIAL_ECHOPAIR(" W", LINEAR_UNIT(toolchange_settings.enable_park)); - SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)); - SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y)); + SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park)); + SERIAL_ECHOPGM_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)); + SERIAL_ECHOPGM_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y)); #endif #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) - SERIAL_ECHOPAIR(" V", LINEAR_UNIT(enable_first_prime)); + SERIAL_ECHOPGM(" V", LINEAR_UNIT(enable_first_prime)); #endif #endif - SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise)); + SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise)); } #endif // HAS_MULTI_EXTRUDER diff --git a/Marlin/src/gcode/config/M218.cpp b/Marlin/src/gcode/config/M218.cpp index 249c16622fe1..c95cd6c1b93c 100644 --- a/Marlin/src/gcode/config/M218.cpp +++ b/Marlin/src/gcode/config/M218.cpp @@ -60,7 +60,7 @@ void GcodeSuite::M218_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_HOTEND_OFFSETS)); LOOP_S_L_N(e, 1, HOTENDS) { report_echo_start(forReplay); - SERIAL_ECHOPAIR_P( + SERIAL_ECHOPGM_P( PSTR(" M218 T"), e, SP_X_STR, LINEAR_UNIT(hotend_offset[e].x), SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y) diff --git a/Marlin/src/gcode/config/M220.cpp b/Marlin/src/gcode/config/M220.cpp index 75339f10b9fc..c9070df803b8 100644 --- a/Marlin/src/gcode/config/M220.cpp +++ b/Marlin/src/gcode/config/M220.cpp @@ -44,7 +44,7 @@ void GcodeSuite::M220() { if (parser.seenval('S')) feedrate_percentage = parser.value_int(); if (!parser.seen_any()) { - SERIAL_ECHOPAIR("FR:", feedrate_percentage); + SERIAL_ECHOPGM("FR:", feedrate_percentage); SERIAL_CHAR('%'); SERIAL_EOL(); } diff --git a/Marlin/src/gcode/config/M221.cpp b/Marlin/src/gcode/config/M221.cpp index e380bfb1c7d0..f653aded7c16 100644 --- a/Marlin/src/gcode/config/M221.cpp +++ b/Marlin/src/gcode/config/M221.cpp @@ -38,7 +38,7 @@ void GcodeSuite::M221() { else { SERIAL_ECHO_START(); SERIAL_CHAR('E', '0' + target_extruder); - SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]); + SERIAL_ECHOPGM(" Flow: ", planner.flow_percentage[target_extruder]); SERIAL_CHAR('%'); SERIAL_EOL(); } diff --git a/Marlin/src/gcode/config/M281.cpp b/Marlin/src/gcode/config/M281.cpp index 36b62f516360..b6644eb4ab96 100644 --- a/Marlin/src/gcode/config/M281.cpp +++ b/Marlin/src/gcode/config/M281.cpp @@ -69,7 +69,7 @@ void GcodeSuite::M281_report(const bool forReplay/*=true*/) { case Z_PROBE_SERVO_NR: #endif report_echo_start(forReplay); - SERIAL_ECHOLNPAIR(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]); + SERIAL_ECHOLNPGM(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]); } } } diff --git a/Marlin/src/gcode/config/M301.cpp b/Marlin/src/gcode/config/M301.cpp index 904744c95817..19b438309ce3 100644 --- a/Marlin/src/gcode/config/M301.cpp +++ b/Marlin/src/gcode/config/M301.cpp @@ -83,7 +83,7 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/, const int8_t eindex/ HOTEND_LOOP() { if (e == eindex || eindex == -1) { report_echo_start(forReplay); - SERIAL_ECHOPAIR_P( + SERIAL_ECHOPGM_P( #if ENABLED(PID_PARAMS_PER_HOTEND) PSTR(" M301 E"), e, SP_P_STR #else @@ -94,11 +94,11 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/, const int8_t eindex/ , PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e)) ); #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR_P(SP_C_STR, PID_PARAM(Kc, e)); - if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len); + SERIAL_ECHOPGM_P(SP_C_STR, PID_PARAM(Kc, e)); + if (e == 0) SERIAL_ECHOPGM(" L", thermalManager.lpq_len); #endif #if ENABLED(PID_FAN_SCALING) - SERIAL_ECHOPAIR(" F", PID_PARAM(Kf, e)); + SERIAL_ECHOPGM(" F", PID_PARAM(Kf, e)); #endif SERIAL_EOL(); } diff --git a/Marlin/src/gcode/config/M302.cpp b/Marlin/src/gcode/config/M302.cpp index e3ce5a10ef0e..57c049e19404 100644 --- a/Marlin/src/gcode/config/M302.cpp +++ b/Marlin/src/gcode/config/M302.cpp @@ -56,7 +56,7 @@ void GcodeSuite::M302() { SERIAL_ECHO_START(); SERIAL_ECHOPGM("Cold extrudes are "); SERIAL_ECHOPGM_P(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis")); - SERIAL_ECHOLNPAIR("abled (min temp ", thermalManager.extrude_min_temp, "C)"); + SERIAL_ECHOLNPGM("abled (min temp ", thermalManager.extrude_min_temp, "C)"); } } diff --git a/Marlin/src/gcode/config/M309.cpp b/Marlin/src/gcode/config/M309.cpp index d5297e956393..01c4e6234788 100644 --- a/Marlin/src/gcode/config/M309.cpp +++ b/Marlin/src/gcode/config/M309.cpp @@ -43,7 +43,7 @@ void GcodeSuite::M309() { void GcodeSuite::M309_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_CHAMBER_PID)); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " M309 P", thermalManager.temp_chamber.pid.Kp , " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki) , " D", unscalePID_d(thermalManager.temp_chamber.pid.Kd) diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 84757e740370..b2455c4b6045 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -130,7 +130,7 @@ inline void servo_probe_test() { const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR); - SERIAL_ECHOLNPAIR("Servo probe test\n" + SERIAL_ECHOLNPGM("Servo probe test\n" ". using index: ", probe_index, ", deploy angle: ", servo_angles[probe_index][0], ", stow angle: ", servo_angles[probe_index][1] @@ -143,7 +143,7 @@ inline void servo_probe_test() { #define PROBE_TEST_PIN Z_MIN_PIN constexpr bool probe_inverting = Z_MIN_ENDSTOP_INVERTING; - SERIAL_ECHOLNPAIR(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN); + SERIAL_ECHOLNPGM(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN); SERIAL_ECHOPGM(". Z_MIN_ENDSTOP_INVERTING: "); #else @@ -151,7 +151,7 @@ inline void servo_probe_test() { #define PROBE_TEST_PIN Z_MIN_PROBE_PIN constexpr bool probe_inverting = Z_MIN_PROBE_ENDSTOP_INVERTING; - SERIAL_ECHOLNPAIR(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN); + SERIAL_ECHOLNPGM(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN); SERIAL_ECHOPGM( ". Z_MIN_PROBE_ENDSTOP_INVERTING: "); #endif @@ -211,11 +211,11 @@ inline void servo_probe_test() { if (deploy_state != stow_state) { SERIAL_ECHOLNPGM("= Mechanical Switch detected"); if (deploy_state) { - SERIAL_ECHOLNPAIR(" DEPLOYED state: HIGH (logic 1)", + SERIAL_ECHOLNPGM(" DEPLOYED state: HIGH (logic 1)", " STOWED (triggered) state: LOW (logic 0)"); } else { - SERIAL_ECHOLNPAIR(" DEPLOYED state: LOW (logic 0)", + SERIAL_ECHOLNPGM(" DEPLOYED state: LOW (logic 0)", " STOWED (triggered) state: HIGH (logic 1)"); } #if ENABLED(BLTOUCH) @@ -244,7 +244,7 @@ inline void servo_probe_test() { if (probe_counter == 15) SERIAL_ECHOLNPGM(": 30ms or more"); else - SERIAL_ECHOLNPAIR(" (+/- 4ms): ", probe_counter * 2); + SERIAL_ECHOLNPGM(" (+/- 4ms): ", probe_counter * 2); if (probe_counter >= 4) { if (probe_counter == 15) { diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 9f4f2ac65b13..ecc5e63a3c36 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -78,10 +78,10 @@ void GcodeSuite::M92() { micro_steps = argH ?: Z_MICROSTEPS; const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS]; SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm); + SERIAL_ECHOPGM("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm); if (wanted) { const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm; - SERIAL_ECHOPAIR(", best:[", best); + SERIAL_ECHOPGM(", best:[", best); if (best != wanted) { SERIAL_CHAR(','); SERIAL_DECIMAL(best + z_full_step_mm); } SERIAL_CHAR(']'); } @@ -92,7 +92,7 @@ void GcodeSuite::M92() { void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) { report_heading_etc(forReplay, PSTR(STR_STEPS_PER_UNIT)); - SERIAL_ECHOPAIR_P(LIST_N(DOUBLE(LINEAR_AXES), + SERIAL_ECHOPGM_P(LIST_N(DOUBLE(LINEAR_AXES), PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]), SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]), SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]), @@ -101,7 +101,7 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/ SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS])) ); #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) - SERIAL_ECHOPAIR_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS])); + SERIAL_ECHOPGM_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS])); #endif SERIAL_EOL(); @@ -109,7 +109,7 @@ void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/ LOOP_L_N(i, E_STEPPERS) { if (e >= 0 && i != e) continue; report_echo_start(forReplay); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M92 T"), i, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]) ); diff --git a/Marlin/src/gcode/control/M111.cpp b/Marlin/src/gcode/control/M111.cpp index e762e3387fca..69d20b4c5d22 100644 --- a/Marlin/src/gcode/control/M111.cpp +++ b/Marlin/src/gcode/control/M111.cpp @@ -57,19 +57,19 @@ void GcodeSuite::M111() { SERIAL_ECHOPGM(STR_DEBUG_OFF); #if !defined(__AVR__) || !defined(USBCON) #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS) - SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns()); + SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns()); #endif #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS) - SERIAL_ECHOPAIR("\nFraming Errors: ", MYSERIAL1.framing_errors()); + SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors()); #endif #if ENABLED(SERIAL_STATS_DROPPED_RX) - SERIAL_ECHOPAIR("\nDropped bytes: ", MYSERIAL1.dropped()); + SERIAL_ECHOPGM("\nDropped bytes: ", MYSERIAL1.dropped()); #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - SERIAL_ECHOPAIR("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued()); + SERIAL_ECHOPGM("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued()); #endif #endif // !__AVR__ || !USBCON } diff --git a/Marlin/src/gcode/control/M211.cpp b/Marlin/src/gcode/control/M211.cpp index b15cb6ef0a8c..a837d795339b 100644 --- a/Marlin/src/gcode/control/M211.cpp +++ b/Marlin/src/gcode/control/M211.cpp @@ -41,7 +41,7 @@ void GcodeSuite::M211() { void GcodeSuite::M211_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS)); - SERIAL_ECHOPAIR(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; "); + SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; "); serialprintln_onoff(soft_endstop._enabled); report_echo_start(forReplay); diff --git a/Marlin/src/gcode/control/M605.cpp b/Marlin/src/gcode/control/M605.cpp index 23d43dd0a60b..08efaab59d75 100644 --- a/Marlin/src/gcode/control/M605.cpp +++ b/Marlin/src/gcode/control/M605.cpp @@ -127,26 +127,26 @@ case DXC_DUPLICATION_MODE: DEBUG_ECHOPGM("DUPLICATION"); break; case DXC_MIRRORED_MODE: DEBUG_ECHOPGM("MIRRORED"); break; } - DEBUG_ECHOPAIR("\nActive Ext: ", active_extruder); + DEBUG_ECHOPGM("\nActive Ext: ", active_extruder); if (!active_extruder_parked) DEBUG_ECHOPGM(" NOT "); DEBUG_ECHOPGM(" parked."); - DEBUG_ECHOPAIR("\nactive_extruder_x_pos: ", current_position.x); - DEBUG_ECHOPAIR("\ninactive_extruder_x: ", inactive_extruder_x); - DEBUG_ECHOPAIR("\nextruder_duplication_enabled: ", extruder_duplication_enabled); - DEBUG_ECHOPAIR("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset); - DEBUG_ECHOPAIR("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset); - DEBUG_ECHOPAIR("\ndelayed_move_time: ", delayed_move_time); - DEBUG_ECHOPAIR("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", X1_MIN_POS, "\nX1_MAX_POS=", X1_MAX_POS); - DEBUG_ECHOPAIR("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", X2_MIN_POS, "\nX2_MAX_POS=", X2_MAX_POS); - DEBUG_ECHOPAIR("\nX2_HOME_DIR=", X2_HOME_DIR, "\nX2_HOME_POS=", X2_HOME_POS); - DEBUG_ECHOPAIR("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE)); - DEBUG_ECHOPAIR("\toolchange_settings.z_raise=", toolchange_settings.z_raise); - DEBUG_ECHOPAIR("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET); + DEBUG_ECHOPGM("\nactive_extruder_x_pos: ", current_position.x); + DEBUG_ECHOPGM("\ninactive_extruder_x: ", inactive_extruder_x); + DEBUG_ECHOPGM("\nextruder_duplication_enabled: ", extruder_duplication_enabled); + DEBUG_ECHOPGM("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset); + DEBUG_ECHOPGM("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset); + DEBUG_ECHOPGM("\ndelayed_move_time: ", delayed_move_time); + DEBUG_ECHOPGM("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", X1_MIN_POS, "\nX1_MAX_POS=", X1_MAX_POS); + DEBUG_ECHOPGM("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", X2_MIN_POS, "\nX2_MAX_POS=", X2_MAX_POS); + DEBUG_ECHOPGM("\nX2_HOME_DIR=", X2_HOME_DIR, "\nX2_HOME_POS=", X2_HOME_POS); + DEBUG_ECHOPGM("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE)); + DEBUG_ECHOPGM("\toolchange_settings.z_raise=", toolchange_settings.z_raise); + DEBUG_ECHOPGM("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET); DEBUG_EOL(); HOTEND_LOOP() { - DEBUG_ECHOPAIR_P(SP_T_STR, e); - LOOP_LINEAR_AXES(a) DEBUG_ECHOPAIR(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]); + DEBUG_ECHOPGM_P(SP_T_STR, e); + LOOP_LINEAR_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]); DEBUG_EOL(); } DEBUG_EOL(); diff --git a/Marlin/src/gcode/control/M993_M994.cpp b/Marlin/src/gcode/control/M993_M994.cpp index ff9ff85bf5bd..252792e5224e 100644 --- a/Marlin/src/gcode/control/M993_M994.cpp +++ b/Marlin/src/gcode/control/M993_M994.cpp @@ -37,7 +37,7 @@ void GcodeSuite::M993() { char fname[] = "spiflash.bin"; card.openFileWrite(fname); if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open ", fname, " to write."); + SERIAL_ECHOLNPGM("Failed to open ", fname, " to write."); return; } @@ -65,7 +65,7 @@ void GcodeSuite::M994() { char fname[] = "spiflash.bin"; card.openFileRead(fname); if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open ", fname, " to read."); + SERIAL_ECHOLNPGM("Failed to open ", fname, " to read."); return; } diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp index 6a084d83ad27..5e8f6b5436d4 100644 --- a/Marlin/src/gcode/control/T.cpp +++ b/Marlin/src/gcode/control/T.cpp @@ -49,7 +49,7 @@ void GcodeSuite::T(const int8_t tool_index) { DEBUG_SECTION(log_T, "T", DEBUGGING(LEVELING)); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("...(", tool_index, ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("...(", tool_index, ")"); // Count this command as movement / activity reset_stepper_timeout(); diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index cd7833c701bf..a06e98ad1ea7 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -75,14 +75,14 @@ void GcodeSuite::M502() { if (dowrite) { val = parser.byteval('V'); persistentStore.write_data(addr, &val); - SERIAL_ECHOLNPAIR("Wrote address ", addr, " with ", val); + SERIAL_ECHOLNPGM("Wrote address ", addr, " with ", val); } else { if (parser.seenval('T')) { const int endaddr = parser.value_ushort(); while (addr <= endaddr) { persistentStore.read_data(addr, &val); - SERIAL_ECHOLNPAIR("0x", hex_word(addr), ":", hex_byte(val)); + SERIAL_ECHOLNPGM("0x", hex_word(addr), ":", hex_byte(val)); addr++; safe_delay(10); } @@ -90,7 +90,7 @@ void GcodeSuite::M502() { } else { persistentStore.read_data(addr, &val); - SERIAL_ECHOLNPAIR("Read address ", addr, " and got ", val); + SERIAL_ECHOLNPGM("Read address ", addr, " and got ", val); } } return; diff --git a/Marlin/src/gcode/feature/L6470/M122.cpp b/Marlin/src/gcode/feature/L6470/M122.cpp index cfac42764278..1e5b37e4b76f 100644 --- a/Marlin/src/gcode/feature/L6470/M122.cpp +++ b/Marlin/src/gcode/feature/L6470/M122.cpp @@ -68,7 +68,7 @@ inline void L6470_say_status(const L64XX_axis_t axis) { if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN"); SERIAL_ECHOPGM("VALID "); SERIAL_ECHOPGM_P(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ? PSTR("COMPLETED ") : PSTR("Not PERFORMED")); - SERIAL_ECHOPAIR("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK "); + SERIAL_ECHOPGM("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK "); } SERIAL_ECHOPGM(" OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0); if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) { diff --git a/Marlin/src/gcode/feature/L6470/M906.cpp b/Marlin/src/gcode/feature/L6470/M906.cpp index b1beed068a7b..2ab13f5b5d58 100644 --- a/Marlin/src/gcode/feature/L6470/M906.cpp +++ b/Marlin/src/gcode/feature/L6470/M906.cpp @@ -63,7 +63,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { #if ENABLED(L6470_CHITCHAT) char tmp[10]; sprintf_P(tmp, PSTR("%4x "), status); - DEBUG_ECHOPAIR(" status: ", tmp); + DEBUG_ECHOPGM(" status: ", tmp); print_bin(status); #else UNUSED(status); @@ -104,13 +104,13 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { } SERIAL_EOL(); - SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps, + SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps, " ADC_OUT: ", L6470_ADC_out); SERIAL_ECHOPGM(" Vs_compensation: "); SERIAL_ECHOPGM_P((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED")); - SERIAL_ECHOLNPAIR(" Compensation coefficient: ~", comp_coef * 0.01f); + SERIAL_ECHOLNPGM(" Compensation coefficient: ~", comp_coef * 0.01f); - SERIAL_ECHOPAIR("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD), + SERIAL_ECHOPGM("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD), " KVAL_RUN : ", motor.GetParam(L6470_KVAL_RUN), " KVAL_ACC: ", motor.GetParam(L6470_KVAL_ACC), " KVAL_DEC: ", motor.GetParam(L6470_KVAL_DEC), @@ -168,7 +168,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { SERIAL_ECHOLNPGM(" mA) Motor Status: NA"); const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07); //NOMORE(MicroSteps, 16); - SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps, + SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps, " ADC_OUT: ", L6470_ADC_out); SERIAL_ECHOLNPGM(" Vs_compensation: NA\n"); @@ -185,7 +185,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { case 1: DEBUG_ECHOLNPGM("75V/uS") ; break; case 2: DEBUG_ECHOLNPGM("110V/uS") ; break; case 3: DEBUG_ECHOLNPGM("260V/uS") ; break; - default: DEBUG_ECHOLNPAIR("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break; + default: DEBUG_ECHOLNPGM("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break; } #endif SERIAL_EOL(); diff --git a/Marlin/src/gcode/feature/L6470/M916-918.cpp b/Marlin/src/gcode/feature/L6470/M916-918.cpp index 3dd21ef98527..ad0a91111dc2 100644 --- a/Marlin/src/gcode/feature/L6470/M916-918.cpp +++ b/Marlin/src/gcode/feature/L6470/M916-918.cpp @@ -96,7 +96,7 @@ void GcodeSuite::M916() { if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold)) return; // quit if invalid user input - DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate); + DEBUG_ECHOLNPGM("feedrate = ", final_feedrate); planner.synchronize(); // wait for all current movement commands to complete @@ -127,9 +127,9 @@ void GcodeSuite::M916() { do { if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) - DEBUG_ECHOLNPAIR("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run + DEBUG_ECHOLNPGM("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run else - DEBUG_ECHOLNPAIR("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run + DEBUG_ECHOLNPGM("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run for (j = 0; j < driver_count; j++) L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, M91x_counter); //set KVAL_HOLD or TVAL (same register address) @@ -236,7 +236,7 @@ void GcodeSuite::M917() { if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold)) return; // quit if invalid user input - DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate); + DEBUG_ECHOLNPGM("feedrate = ", final_feedrate); planner.synchronize(); // wait for all current movement commands to complete @@ -252,18 +252,18 @@ void GcodeSuite::M917() { // 2 - OCD finalized - decreasing STALL - exit when STALL warning happens // 3 - OCD finalized - increasing STALL - exit when STALL warning stop // 4 - all testing completed - DEBUG_ECHOPAIR(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display - DEBUG_ECHOPAIR(" (OCD_TH: : ", OCD_TH_val); + DEBUG_ECHOPGM(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display + DEBUG_ECHOPGM(" (OCD_TH: : ", OCD_TH_val); if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) { - DEBUG_ECHOPAIR(") Stall threshold: ", (STALL_TH_val + 1) * 31.25); - DEBUG_ECHOPAIR(" (STALL_TH: ", STALL_TH_val); + DEBUG_ECHOPGM(") Stall threshold: ", (STALL_TH_val + 1) * 31.25); + DEBUG_ECHOPGM(" (STALL_TH: ", STALL_TH_val); } DEBUG_ECHOLNPGM(")"); do { - if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPAIR("STALL threshold : ", (STALL_TH_val + 1) * 31.25); - DEBUG_ECHOLNPAIR(" OCD threshold : ", (OCD_TH_val + 1) * 375); + if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPGM("STALL threshold : ", (STALL_TH_val + 1) * 31.25); + DEBUG_ECHOLNPGM(" OCD threshold : ", (OCD_TH_val + 1) * 375); sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate)); gcode.process_subcommands_now_P(gcode_string); @@ -303,7 +303,7 @@ void GcodeSuite::M917() { if (!(k % 4)) { kval_hold *= 0.95; DEBUG_EOL(); - DEBUG_ECHOLNPAIR("Lowering KVAL_HOLD by about 5% to ", kval_hold); + DEBUG_ECHOLNPGM("Lowering KVAL_HOLD by about 5% to ", kval_hold); for (j = 0; j < driver_count; j++) L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold); } @@ -590,8 +590,8 @@ void GcodeSuite::M918() { } m_steps = L64xxManager.get_param(axis_index[0], L6470_STEP_MODE) & 0x07; // get microsteps - DEBUG_ECHOLNPAIR("Microsteps = ", _BV(m_steps)); - DEBUG_ECHOLNPAIR("target (maximum) feedrate = ", final_feedrate); + DEBUG_ECHOLNPGM("Microsteps = ", _BV(m_steps)); + DEBUG_ECHOLNPGM("target (maximum) feedrate = ", final_feedrate); const float feedrate_inc = final_feedrate / 10, // Start at 1/10 of max & go up by 1/10 per step fr_limit = final_feedrate * 0.99f; // Rounding-safe comparison value @@ -612,7 +612,7 @@ void GcodeSuite::M918() { do { current_feedrate += feedrate_inc; - DEBUG_ECHOLNPAIR("...feedrate = ", current_feedrate); + DEBUG_ECHOLNPGM("...feedrate = ", current_feedrate); sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(current_feedrate)); gcode.process_subcommands_now_P(gcode_string); diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp index e1859fb7d9ea..4ed601bbe873 100644 --- a/Marlin/src/gcode/feature/advance/M900.cpp +++ b/Marlin/src/gcode/feature/advance/M900.cpp @@ -115,11 +115,11 @@ void GcodeSuite::M900() { #if ENABLED(EXTRA_LIN_ADVANCE_K) #if EXTRUDERS < 2 - SERIAL_ECHOLNPAIR("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")"); + SERIAL_ECHOLNPGM("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")"); #else LOOP_L_N(i, EXTRUDERS) { const bool slot = TEST(lin_adv_slot, i); - SERIAL_ECHOLNPAIR("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i], + SERIAL_ECHOLNPGM("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i], "(S", !slot, " K", other_extruder_advance_K[i], ")"); SERIAL_EOL(); } @@ -129,7 +129,7 @@ void GcodeSuite::M900() { SERIAL_ECHO_START(); #if EXTRUDERS < 2 - SERIAL_ECHOLNPAIR("Advance K=", planner.extruder_advance_K[0]); + SERIAL_ECHOLNPGM("Advance K=", planner.extruder_advance_K[0]); #else SERIAL_ECHOPGM("Advance K"); LOOP_L_N(i, EXTRUDERS) { @@ -148,11 +148,11 @@ void GcodeSuite::M900_report(const bool forReplay/*=true*/) { report_heading(forReplay, PSTR(STR_LINEAR_ADVANCE)); #if EXTRUDERS < 2 report_echo_start(forReplay); - SERIAL_ECHOLNPAIR(" M900 K", planner.extruder_advance_K[0]); + SERIAL_ECHOLNPGM(" M900 K", planner.extruder_advance_K[0]); #else LOOP_L_N(i, EXTRUDERS) { report_echo_start(forReplay); - SERIAL_ECHOLNPAIR(" M900 T", i, " K", planner.extruder_advance_K[i]); + SERIAL_ECHOLNPGM(" M900 T", i, " K", planner.extruder_advance_K[i]); } #endif } diff --git a/Marlin/src/gcode/feature/controllerfan/M710.cpp b/Marlin/src/gcode/feature/controllerfan/M710.cpp index 3b72ee002cfa..eede16b5bd42 100644 --- a/Marlin/src/gcode/feature/controllerfan/M710.cpp +++ b/Marlin/src/gcode/feature/controllerfan/M710.cpp @@ -68,7 +68,7 @@ void GcodeSuite::M710() { void GcodeSuite::M710_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_CONTROLLER_FAN)); - SERIAL_ECHOLNPAIR(" M710" + SERIAL_ECHOLNPGM(" M710" " S", int(controllerFan.settings.active_speed), " I", int(controllerFan.settings.idle_speed), " A", int(controllerFan.settings.auto_mode), diff --git a/Marlin/src/gcode/feature/digipot/M907-M910.cpp b/Marlin/src/gcode/feature/digipot/M907-M910.cpp index cde73ff271b8..a0b5c48e82a5 100644 --- a/Marlin/src/gcode/feature/digipot/M907-M910.cpp +++ b/Marlin/src/gcode/feature/digipot/M907-M910.cpp @@ -102,7 +102,7 @@ void GcodeSuite::M907() { void GcodeSuite::M907_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS)); #if HAS_MOTOR_CURRENT_PWM - SERIAL_ECHOLNPAIR_P( // PWM-based has 3 values: + SERIAL_ECHOLNPGM_P( // PWM-based has 3 values: PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y , SP_Z_STR, stepper.motor_current_setting[1] // Z , SP_E_STR, stepper.motor_current_setting[2] // E diff --git a/Marlin/src/gcode/feature/filwidth/M404-M407.cpp b/Marlin/src/gcode/feature/filwidth/M404-M407.cpp index a70f7a61fec7..ff174ecf1358 100644 --- a/Marlin/src/gcode/feature/filwidth/M404-M407.cpp +++ b/Marlin/src/gcode/feature/filwidth/M404-M407.cpp @@ -38,7 +38,7 @@ void GcodeSuite::M404() { planner.volumetric_area_nominal = CIRCLE_AREA(filwidth.nominal_mm * 0.5); } else - SERIAL_ECHOLNPAIR("Filament dia (nominal mm):", filwidth.nominal_mm); + SERIAL_ECHOLNPGM("Filament dia (nominal mm):", filwidth.nominal_mm); } /** @@ -65,7 +65,7 @@ void GcodeSuite::M406() { * M407: Get measured filament diameter on serial output */ void GcodeSuite::M407() { - SERIAL_ECHOLNPAIR("Filament dia (measured mm):", filwidth.measured_mm); + SERIAL_ECHOLNPGM("Filament dia (measured mm):", filwidth.measured_mm); } #endif // FILAMENT_WIDTH_SENSOR diff --git a/Marlin/src/gcode/feature/mixing/M166.cpp b/Marlin/src/gcode/feature/mixing/M166.cpp index 5f788344eb98..f42583d05244 100644 --- a/Marlin/src/gcode/feature/mixing/M166.cpp +++ b/Marlin/src/gcode/feature/mixing/M166.cpp @@ -30,12 +30,12 @@ #include "../../../feature/mixing.h" inline void echo_mix() { - SERIAL_ECHOPAIR(" (", mixer.mix[0], "%|", mixer.mix[1], "%)"); + SERIAL_ECHOPGM(" (", mixer.mix[0], "%|", mixer.mix[1], "%)"); } inline void echo_zt(const int t, const_float_t z) { mixer.update_mix_from_vtool(t); - SERIAL_ECHOPAIR_P(SP_Z_STR, z, SP_T_STR, t); + SERIAL_ECHOPGM_P(SP_Z_STR, z, SP_T_STR, t); echo_mix(); } @@ -74,7 +74,7 @@ void GcodeSuite::M166() { #if ENABLED(GRADIENT_VTOOL) if (mixer.gradient.vtool_index >= 0) { - SERIAL_ECHOPAIR(" (T", mixer.gradient.vtool_index); + SERIAL_ECHOPGM(" (T", mixer.gradient.vtool_index); SERIAL_CHAR(')'); } #endif diff --git a/Marlin/src/gcode/feature/password/M510-M512.cpp b/Marlin/src/gcode/feature/password/M510-M512.cpp index eeb9b1df2231..a5f017f5f3f9 100644 --- a/Marlin/src/gcode/feature/password/M510-M512.cpp +++ b/Marlin/src/gcode/feature/password/M510-M512.cpp @@ -66,7 +66,7 @@ void GcodeSuite::M510() { if (password.value_entry < CAT(1e, PASSWORD_LENGTH)) { password.is_set = true; password.value = password.value_entry; - SERIAL_ECHOLNPAIR(STR_PASSWORD_SET, password.value); // TODO: Update password.string + SERIAL_ECHOLNPGM(STR_PASSWORD_SET, password.value); // TODO: Update password.string } else SERIAL_ECHOLNPGM(STR_PASSWORD_TOO_LONG); diff --git a/Marlin/src/gcode/feature/pause/G60.cpp b/Marlin/src/gcode/feature/pause/G60.cpp index 79451235b1d9..4c7190091cfc 100644 --- a/Marlin/src/gcode/feature/pause/G60.cpp +++ b/Marlin/src/gcode/feature/pause/G60.cpp @@ -47,7 +47,7 @@ void GcodeSuite::G60() { SBI(saved_slots[slot >> 3], slot & 0x07); #if ENABLED(SAVED_POSITIONS_DEBUG) - DEBUG_ECHOPAIR(STR_SAVED_POS " S", slot); + DEBUG_ECHOPGM(STR_SAVED_POS " S", slot); const xyze_pos_t &pos = stored_position[slot]; DEBUG_ECHOLNPAIR_F_P( LIST_N(DOUBLE(LOGICAL_AXES), SP_E_STR, pos.e, diff --git a/Marlin/src/gcode/feature/pause/G61.cpp b/Marlin/src/gcode/feature/pause/G61.cpp index a10c8217ef44..f3e5a2ab387a 100644 --- a/Marlin/src/gcode/feature/pause/G61.cpp +++ b/Marlin/src/gcode/feature/pause/G61.cpp @@ -69,7 +69,7 @@ void GcodeSuite::G61(void) { } else { if (parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) { - DEBUG_ECHOPAIR(STR_RESTORING_POS " S", slot); + DEBUG_ECHOPGM(STR_RESTORING_POS " S", slot); LOOP_LINEAR_AXES(i) { destination[i] = parser.seen(AXIS_CHAR(i)) ? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i) @@ -83,7 +83,7 @@ void GcodeSuite::G61(void) { } #if HAS_EXTRUDERS if (parser.seen_test('E')) { - DEBUG_ECHOLNPAIR(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e); + DEBUG_ECHOLNPGM(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e); SYNC_E(stored_position[slot].e); } #endif diff --git a/Marlin/src/gcode/feature/pause/M603.cpp b/Marlin/src/gcode/feature/pause/M603.cpp index e26ab1c7b4c4..ebb110d2e703 100644 --- a/Marlin/src/gcode/feature/pause/M603.cpp +++ b/Marlin/src/gcode/feature/pause/M603.cpp @@ -69,12 +69,12 @@ void GcodeSuite::M603_report(const bool forReplay/*=true*/) { #if EXTRUDERS == 1 report_echo_start(forReplay); - SERIAL_ECHOPAIR(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;"); + SERIAL_ECHOPGM(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;"); say_units(); #else LOOP_L_N(e, EXTRUDERS) { report_echo_start(forReplay); - SERIAL_ECHOPAIR(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;"); + SERIAL_ECHOPGM(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;"); say_units(); } #endif diff --git a/Marlin/src/gcode/feature/power_monitor/M430.cpp b/Marlin/src/gcode/feature/power_monitor/M430.cpp index 34430fbc388e..642a75d0612a 100644 --- a/Marlin/src/gcode/feature/power_monitor/M430.cpp +++ b/Marlin/src/gcode/feature/power_monitor/M430.cpp @@ -50,7 +50,7 @@ void GcodeSuite::M430() { #endif #endif if (do_report) { - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( #if ENABLED(POWER_MONITOR_CURRENT) "Current: ", power_monitor.getAmps(), "A" #if ENABLED(POWER_MONITOR_VOLTAGE) diff --git a/Marlin/src/gcode/feature/powerloss/M413.cpp b/Marlin/src/gcode/feature/powerloss/M413.cpp index b1be80619fc2..7c714dad25e8 100644 --- a/Marlin/src/gcode/feature/powerloss/M413.cpp +++ b/Marlin/src/gcode/feature/powerloss/M413.cpp @@ -58,7 +58,7 @@ void GcodeSuite::M413() { void GcodeSuite::M413_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_POWER_LOSS_RECOVERY)); - SERIAL_ECHOPAIR(" M413 S", AS_DIGIT(recovery.enabled), " ; "); + SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled), " ; "); serialprintln_onoff(recovery.enabled); } diff --git a/Marlin/src/gcode/feature/runout/M412.cpp b/Marlin/src/gcode/feature/runout/M412.cpp index 56c7f03604ad..bed08294ba99 100644 --- a/Marlin/src/gcode/feature/runout/M412.cpp +++ b/Marlin/src/gcode/feature/runout/M412.cpp @@ -56,7 +56,7 @@ void GcodeSuite::M412() { SERIAL_ECHOPGM("Filament runout "); serialprint_onoff(runout.enabled); #if HAS_FILAMENT_RUNOUT_DISTANCE - SERIAL_ECHOPAIR(" ; Distance ", runout.runout_distance(), "mm"); + SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(), "mm"); #endif #if ENABLED(HOST_ACTION_COMMANDS) SERIAL_ECHOPGM(" ; Host handling "); @@ -68,7 +68,7 @@ void GcodeSuite::M412() { void GcodeSuite::M412_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_FILAMENT_RUNOUT_SENSOR)); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " M412 S", runout.enabled #if HAS_FILAMENT_RUNOUT_DISTANCE , " D", LINEAR_UNIT(runout.runout_distance()) diff --git a/Marlin/src/gcode/feature/trinamic/M906.cpp b/Marlin/src/gcode/feature/trinamic/M906.cpp index 243cf4656040..8877603c3a22 100644 --- a/Marlin/src/gcode/feature/trinamic/M906.cpp +++ b/Marlin/src/gcode/feature/trinamic/M906.cpp @@ -209,13 +209,13 @@ void GcodeSuite::M906_report(const bool forReplay/*=true*/) { #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) say_M906(forReplay); #if AXIS_IS_TMC(X) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.getMilliamps()); + SERIAL_ECHOPGM_P(SP_X_STR, stepperX.getMilliamps()); #endif #if AXIS_IS_TMC(Y) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.getMilliamps()); + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.getMilliamps()); #endif #if AXIS_IS_TMC(Z) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.getMilliamps()); + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.getMilliamps()); #endif SERIAL_EOL(); #endif @@ -224,71 +224,71 @@ void GcodeSuite::M906_report(const bool forReplay/*=true*/) { say_M906(forReplay); SERIAL_ECHOPGM(" I1"); #if AXIS_IS_TMC(X2) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.getMilliamps()); + SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.getMilliamps()); #endif #if AXIS_IS_TMC(Y2) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.getMilliamps()); + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.getMilliamps()); #endif #if AXIS_IS_TMC(Z2) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.getMilliamps()); + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.getMilliamps()); #endif SERIAL_EOL(); #endif #if AXIS_IS_TMC(Z3) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.getMilliamps()); + SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.getMilliamps()); #endif #if AXIS_IS_TMC(Z4) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.getMilliamps()); + SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.getMilliamps()); #endif #if AXIS_IS_TMC(I) say_M906(forReplay); - SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.getMilliamps()); + SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.getMilliamps()); #endif #if AXIS_IS_TMC(J) say_M906(forReplay); - SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.getMilliamps()); + SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.getMilliamps()); #endif #if AXIS_IS_TMC(K) say_M906(forReplay); - SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.getMilliamps()); + SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.getMilliamps()); #endif #if AXIS_IS_TMC(E0) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getMilliamps()); + SERIAL_ECHOLNPGM(" T0 E", stepperE0.getMilliamps()); #endif #if AXIS_IS_TMC(E1) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getMilliamps()); + SERIAL_ECHOLNPGM(" T1 E", stepperE1.getMilliamps()); #endif #if AXIS_IS_TMC(E2) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getMilliamps()); + SERIAL_ECHOLNPGM(" T2 E", stepperE2.getMilliamps()); #endif #if AXIS_IS_TMC(E3) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getMilliamps()); + SERIAL_ECHOLNPGM(" T3 E", stepperE3.getMilliamps()); #endif #if AXIS_IS_TMC(E4) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getMilliamps()); + SERIAL_ECHOLNPGM(" T4 E", stepperE4.getMilliamps()); #endif #if AXIS_IS_TMC(E5) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T5 E", stepperE5.getMilliamps()); + SERIAL_ECHOLNPGM(" T5 E", stepperE5.getMilliamps()); #endif #if AXIS_IS_TMC(E6) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T6 E", stepperE6.getMilliamps()); + SERIAL_ECHOLNPGM(" T6 E", stepperE6.getMilliamps()); #endif #if AXIS_IS_TMC(E7) say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T7 E", stepperE7.getMilliamps()); + SERIAL_ECHOLNPGM(" T7 E", stepperE7.getMilliamps()); #endif SERIAL_EOL(); } diff --git a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp index d711865480d1..58702c603f41 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp @@ -321,13 +321,13 @@ #if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP say_M913(forReplay); #if X_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.get_pwm_thrs()); + SERIAL_ECHOPGM_P(SP_X_STR, stepperX.get_pwm_thrs()); #endif #if Y_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.get_pwm_thrs()); + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.get_pwm_thrs()); #endif #if Z_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.get_pwm_thrs()); + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.get_pwm_thrs()); #endif SERIAL_EOL(); #endif @@ -336,71 +336,71 @@ say_M913(forReplay); SERIAL_ECHOPGM(" I1"); #if X2_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.get_pwm_thrs()); + SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.get_pwm_thrs()); #endif #if Y2_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.get_pwm_thrs()); + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.get_pwm_thrs()); #endif #if Z2_HAS_STEALTHCHOP - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.get_pwm_thrs()); + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.get_pwm_thrs()); #endif SERIAL_EOL(); #endif #if Z3_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.get_pwm_thrs()); #endif #if Z4_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.get_pwm_thrs()); #endif #if I_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.get_pwm_thrs()); + SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.get_pwm_thrs()); #endif #if J_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.get_pwm_thrs()); + SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.get_pwm_thrs()); #endif #if K_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.get_pwm_thrs()); + SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.get_pwm_thrs()); #endif #if E0_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T0 E", stepperE0.get_pwm_thrs()); #endif #if E1_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T1 E", stepperE1.get_pwm_thrs()); #endif #if E2_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T2 E", stepperE2.get_pwm_thrs()); #endif #if E3_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T3 E", stepperE3.get_pwm_thrs()); #endif #if E4_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T4 E", stepperE4.get_pwm_thrs()); #endif #if E5_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T5 E", stepperE5.get_pwm_thrs()); #endif #if E6_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T6 E", stepperE6.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T6 E", stepperE6.get_pwm_thrs()); #endif #if E7_HAS_STEALTHCHOP say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T7 E", stepperE7.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" T7 E", stepperE7.get_pwm_thrs()); #endif SERIAL_EOL(); } @@ -522,13 +522,13 @@ #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS say_M914(forReplay); #if X_SENSORLESS - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.homing_threshold()); + SERIAL_ECHOPGM_P(SP_X_STR, stepperX.homing_threshold()); #endif #if Y_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.homing_threshold()); + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.homing_threshold()); #endif #if Z_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.homing_threshold()); + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.homing_threshold()); #endif SERIAL_EOL(); #endif @@ -537,38 +537,38 @@ say_M914(forReplay); SERIAL_ECHOPGM(" I1"); #if X2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.homing_threshold()); + SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.homing_threshold()); #endif #if Y2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.homing_threshold()); + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.homing_threshold()); #endif #if Z2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.homing_threshold()); + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.homing_threshold()); #endif SERIAL_EOL(); #endif #if Z3_SENSORLESS say_M914(forReplay); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold()); + SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.homing_threshold()); #endif #if Z4_SENSORLESS say_M914(forReplay); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.homing_threshold()); + SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.homing_threshold()); #endif #if I_SENSORLESS say_M914(forReplay); - SERIAL_ECHOLNPAIR_P(SP_I_STR, stepperI.homing_threshold()); + SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.homing_threshold()); #endif #if J_SENSORLESS say_M914(forReplay); - SERIAL_ECHOLNPAIR_P(SP_J_STR, stepperJ.homing_threshold()); + SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.homing_threshold()); #endif #if K_SENSORLESS say_M914(forReplay); - SERIAL_ECHOLNPAIR_P(SP_K_STR, stepperK.homing_threshold()); + SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.homing_threshold()); #endif } diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 4c03fd9f85ac..477d43ed6392 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -130,7 +130,7 @@ int8_t GcodeSuite::get_target_extruder_from_command() { if (e < EXTRUDERS) return e; SERIAL_ECHO_START(); SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); - SERIAL_ECHOLNPAIR(" " STR_INVALID_EXTRUDER " ", e); + SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e); return -1; } return active_extruder; @@ -149,7 +149,7 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() { if (e == -1) SERIAL_ECHOLNPGM(" " STR_E_STEPPER_NOT_SPECIFIED); else - SERIAL_ECHOLNPAIR(" " STR_INVALID_E_STEPPER " ", e); + SERIAL_ECHOLNPGM(" " STR_INVALID_E_STEPPER " ", e); return -1; } @@ -1082,7 +1082,7 @@ void GcodeSuite::process_next_command() { SERIAL_ECHO_START(); SERIAL_ECHOLN(command.buffer); #if ENABLED(M100_FREE_MEMORY_DUMPER) - SERIAL_ECHOPAIR("slot:", queue.ring_buffer.index_r); + SERIAL_ECHOPGM("slot:", queue.ring_buffer.index_r); M100_dump_routine(PSTR(" Command Queue:"), (const char*)&queue.ring_buffer, sizeof(queue.ring_buffer)); #endif } diff --git a/Marlin/src/gcode/gcode_d.cpp b/Marlin/src/gcode/gcode_d.cpp index b317a1781548..3baff468360d 100644 --- a/Marlin/src/gcode/gcode_d.cpp +++ b/Marlin/src/gcode/gcode_d.cpp @@ -179,7 +179,7 @@ void GcodeSuite::D(const int16_t dcode) { break; case 7: // D7 dump the current serial port type (hence configuration) - SERIAL_ECHOLNPAIR("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE); + SERIAL_ECHOLNPGM("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE); SERIAL_ECHOLN(gtn(&SERIAL_IMPL)); break; @@ -202,7 +202,7 @@ void GcodeSuite::D(const int16_t dcode) { case 101: { // D101 Test SD Write card.openFileWrite("test.gco"); if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open test.gco to write."); + SERIAL_ECHOLNPGM("Failed to open test.gco to write."); return; } __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; @@ -224,7 +224,7 @@ void GcodeSuite::D(const int16_t dcode) { char testfile[] = "test.gco"; card.openFileRead(testfile); if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open test.gco to read."); + SERIAL_ECHOLNPGM("Failed to open test.gco to read."); return; } __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; diff --git a/Marlin/src/gcode/geometry/G53-G59.cpp b/Marlin/src/gcode/geometry/G53-G59.cpp index a5a9f70a8b61..db2404a28dc2 100644 --- a/Marlin/src/gcode/geometry/G53-G59.cpp +++ b/Marlin/src/gcode/geometry/G53-G59.cpp @@ -69,7 +69,7 @@ void GcodeSuite::G53() { process_parsed_command(); // ...process the chained command select_coordinate_system(old_system); #ifdef DEBUG_M53 - SERIAL_ECHOLNPAIR("Go back to workspace ", old_system); + SERIAL_ECHOLNPGM("Go back to workspace ", old_system); report_current_position(); #endif } @@ -87,7 +87,7 @@ void GcodeSuite::G53() { void G54_59(uint8_t subcode=0) { const int8_t _space = parser.codenum - 54 + subcode; if (gcode.select_coordinate_system(_space)) { - SERIAL_ECHOLNPAIR("Select workspace ", _space); + SERIAL_ECHOLNPGM("Select workspace ", _space); report_current_position(); } } diff --git a/Marlin/src/gcode/geometry/M206_M428.cpp b/Marlin/src/gcode/geometry/M206_M428.cpp index ce142dacdfd1..416b3f7634ea 100644 --- a/Marlin/src/gcode/geometry/M206_M428.cpp +++ b/Marlin/src/gcode/geometry/M206_M428.cpp @@ -54,7 +54,7 @@ void GcodeSuite::M206() { void GcodeSuite::M206_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_HOME_OFFSET)); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( #if IS_CARTESIAN LIST_N(DOUBLE(LINEAR_AXES), PSTR(" M206 X"), LINEAR_UNIT(home_offset.x), diff --git a/Marlin/src/gcode/host/M114.cpp b/Marlin/src/gcode/host/M114.cpp index 7d69033319b7..cdb9efb71b26 100644 --- a/Marlin/src/gcode/host/M114.cpp +++ b/Marlin/src/gcode/host/M114.cpp @@ -218,7 +218,7 @@ void GcodeSuite::M114() { } #if HAS_EXTRUDERS if (parser.seen_test('E')) { - SERIAL_ECHOLNPAIR("Count E:", stepper.position(E_AXIS)); + SERIAL_ECHOLNPGM("Count E:", stepper.position(E_AXIS)); return; } #endif diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index e4f412406f04..1c106977bf00 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -175,7 +175,7 @@ void GcodeSuite::M115() { apply_motion_limits(cmax); const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(), wmin = cmin.asLogical(), wmax = cmax.asLogical(); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "area:{" "full:{" "min:{x:", lmin.x, ",y:", lmin.y, ",z:", lmin.z, "}," diff --git a/Marlin/src/gcode/host/M360.cpp b/Marlin/src/gcode/host/M360.cpp index 7a0b8e3ab0f7..cec8df754223 100644 --- a/Marlin/src/gcode/host/M360.cpp +++ b/Marlin/src/gcode/host/M360.cpp @@ -36,7 +36,7 @@ static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8 SERIAL_ECHOPGM("Config:"); if (pref) SERIAL_ECHOPGM_P(pref); if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); } - SERIAL_ECHOPAIR_P(name, AS_CHAR(':')); + SERIAL_ECHOPGM_P(name, AS_CHAR(':')); } static void config_line(PGM_P const name, const float val, PGM_P const pref=nullptr, const int8_t ind=-1) { config_prefix(name, pref, ind); diff --git a/Marlin/src/gcode/lcd/M145.cpp b/Marlin/src/gcode/lcd/M145.cpp index cbd752d24572..77fd425763d0 100644 --- a/Marlin/src/gcode/lcd/M145.cpp +++ b/Marlin/src/gcode/lcd/M145.cpp @@ -64,7 +64,7 @@ void GcodeSuite::M145_report(const bool forReplay/*=true*/) { report_heading(forReplay, PSTR(STR_MATERIAL_HEATUP)); LOOP_L_N(i, PREHEAT_COUNT) { report_echo_start(forReplay); - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR(" M145 S"), i #if HAS_HOTEND , PSTR(" H"), parser.to_temp_units(ui.material_preset[i].hotend_temp) diff --git a/Marlin/src/gcode/lcd/M250.cpp b/Marlin/src/gcode/lcd/M250.cpp index 2b7e3dc994e2..618e3d5d6c7e 100644 --- a/Marlin/src/gcode/lcd/M250.cpp +++ b/Marlin/src/gcode/lcd/M250.cpp @@ -38,7 +38,7 @@ void GcodeSuite::M250() { void GcodeSuite::M250_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_LCD_CONTRAST)); - SERIAL_ECHOLNPAIR(" M250 C", ui.contrast); + SERIAL_ECHOLNPGM(" M250 C", ui.contrast); } #endif // HAS_LCD_CONTRAST diff --git a/Marlin/src/gcode/lcd/M256.cpp b/Marlin/src/gcode/lcd/M256.cpp index ff7c59fc9a9b..ee187cc2e10e 100644 --- a/Marlin/src/gcode/lcd/M256.cpp +++ b/Marlin/src/gcode/lcd/M256.cpp @@ -38,7 +38,7 @@ void GcodeSuite::M256() { void GcodeSuite::M256_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_LCD_BRIGHTNESS)); - SERIAL_ECHOLNPAIR(" M256 B", ui.brightness); + SERIAL_ECHOLNPGM(" M256 B", ui.brightness); } #endif // HAS_LCD_BRIGHTNESS diff --git a/Marlin/src/gcode/lcd/M414.cpp b/Marlin/src/gcode/lcd/M414.cpp index 26ecea2083b4..0eac980e0f92 100644 --- a/Marlin/src/gcode/lcd/M414.cpp +++ b/Marlin/src/gcode/lcd/M414.cpp @@ -45,7 +45,7 @@ void GcodeSuite::M414() { void GcodeSuite::M414_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_UI_LANGUAGE)); - SERIAL_ECHOLNPAIR(" M414 S", ui.language); + SERIAL_ECHOLNPGM(" M414 S", ui.language); } #endif // HAS_MULTI_LANGUAGE diff --git a/Marlin/src/gcode/motion/M290.cpp b/Marlin/src/gcode/motion/M290.cpp index 2b57a6b99a9b..747ddd64de19 100644 --- a/Marlin/src/gcode/motion/M290.cpp +++ b/Marlin/src/gcode/motion/M290.cpp @@ -91,12 +91,12 @@ void GcodeSuite::M290() { SERIAL_ECHO_START(); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET " " STR_Z, probe.offset.z); + SERIAL_ECHOLNPGM(STR_PROBE_OFFSET " " STR_Z, probe.offset.z); #endif #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) { - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( PSTR("Hotend "), active_extruder #if ENABLED(BABYSTEP_XY) , PSTR("Offset X"), hotend_offset[active_extruder].x @@ -111,12 +111,12 @@ void GcodeSuite::M290() { #endif #if ENABLED(MESH_BED_LEVELING) - SERIAL_ECHOLNPAIR("MBL Adjust Z", mbl.z_offset); + SERIAL_ECHOLNPGM("MBL Adjust Z", mbl.z_offset); #endif #if ENABLED(BABYSTEP_DISPLAY_TOTAL) { - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( #if ENABLED(BABYSTEP_XY) PSTR("Babystep X"), babystep.axis_total[X_AXIS] , SP_Y_STR, babystep.axis_total[Y_AXIS] diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index e4e297344940..4d4fdae0d621 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -333,7 +333,7 @@ void GCodeParser::parse(char *p) { #if ENABLED(DEBUG_GCODE_PARSER) if (debug) { - SERIAL_ECHOPAIR("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1); + SERIAL_ECHOPGM("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1); if (has_val) SERIAL_ECHOPGM(" (has_val)"); } #endif @@ -341,7 +341,7 @@ void GCodeParser::parse(char *p) { if (!has_val && !string_arg) { // No value? First time, keep as string_arg string_arg = p - 1; #if ENABLED(DEBUG_GCODE_PARSER) - if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG + if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG #endif } @@ -352,7 +352,7 @@ void GCodeParser::parse(char *p) { else if (!string_arg) { // Not A-Z? First time, keep as the string_arg string_arg = p - 1; #if ENABLED(DEBUG_GCODE_PARSER) - if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG + if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG #endif } @@ -390,7 +390,7 @@ void GCodeParser::unknown_command_warning() { #if ENABLED(DEBUG_GCODE_PARSER) void GCodeParser::debug() { - SERIAL_ECHOPAIR("Command: ", command_ptr, " (", command_letter); + SERIAL_ECHOPGM("Command: ", command_ptr, " (", command_letter); SERIAL_ECHO(codenum); SERIAL_ECHOLNPGM(")"); #if ENABLED(FASTER_GCODE_PARSER) @@ -398,18 +398,18 @@ void GCodeParser::unknown_command_warning() { for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) SERIAL_CHAR(c, ' '); SERIAL_CHAR('}'); #else - SERIAL_ECHOPAIR(" args: { ", command_args, " }"); + SERIAL_ECHOPGM(" args: { ", command_args, " }"); #endif if (string_arg) { - SERIAL_ECHOPAIR(" string: \"", string_arg); + SERIAL_ECHOPGM(" string: \"", string_arg); SERIAL_CHAR('"'); } SERIAL_ECHOLNPGM("\n"); for (char c = 'A'; c <= 'Z'; ++c) { if (seen(c)) { - SERIAL_ECHOPAIR("Code '", c); SERIAL_ECHOPGM("':"); + SERIAL_ECHOPGM("Code '", c); SERIAL_ECHOPGM("':"); if (has_value()) { - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "\n float: ", value_float(), "\n long: ", value_long(), "\n ulong: ", value_ulong(), diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index f8fb890695f3..ad550765ec90 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -133,9 +133,9 @@ class GCodeParser { param[ind] = ptr ? ptr - command_ptr : 0; // parameter offset or 0 #if ENABLED(DEBUG_GCODE_PARSER) if (codenum == 800) { - SERIAL_ECHOPAIR("Set bit ", ind, " of codebits (", hex_address((void*)(codebits >> 16))); + SERIAL_ECHOPGM("Set bit ", ind, " of codebits (", hex_address((void*)(codebits >> 16))); print_hex_word((uint16_t)(codebits & 0xFFFF)); - SERIAL_ECHOLNPAIR(") | param = ", param[ind]); + SERIAL_ECHOLNPGM(") | param = ", param[ind]); } #endif } diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 4347f55aa8f8..f4152c76e9e5 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -53,7 +53,7 @@ void GcodeSuite::G30() { const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE; const float measured_z = probe.probe_at_point(pos, raise_after, 1); if (!isnan(measured_z)) - SERIAL_ECHOLNPAIR("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z); + SERIAL_ECHOLNPGM("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z); restore_feedrate_and_scaling(); diff --git a/Marlin/src/gcode/probe/M851.cpp b/Marlin/src/gcode/probe/M851.cpp index e7261b5a14be..551811794674 100644 --- a/Marlin/src/gcode/probe/M851.cpp +++ b/Marlin/src/gcode/probe/M851.cpp @@ -47,11 +47,11 @@ void GcodeSuite::M851() { if (WITHIN(x, -(X_BED_SIZE), X_BED_SIZE)) offs.x = x; else { - SERIAL_ECHOLNPAIR("?X out of range (-", X_BED_SIZE, " to ", X_BED_SIZE, ")"); + SERIAL_ECHOLNPGM("?X out of range (-", X_BED_SIZE, " to ", X_BED_SIZE, ")"); ok = false; } #else - if (x) SERIAL_ECHOLNPAIR("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true + if (x) SERIAL_ECHOLNPGM("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true #endif } @@ -61,11 +61,11 @@ void GcodeSuite::M851() { if (WITHIN(y, -(Y_BED_SIZE), Y_BED_SIZE)) offs.y = y; else { - SERIAL_ECHOLNPAIR("?Y out of range (-", Y_BED_SIZE, " to ", Y_BED_SIZE, ")"); + SERIAL_ECHOLNPGM("?Y out of range (-", Y_BED_SIZE, " to ", Y_BED_SIZE, ")"); ok = false; } #else - if (y) SERIAL_ECHOLNPAIR("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true + if (y) SERIAL_ECHOLNPGM("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true #endif } @@ -74,7 +74,7 @@ void GcodeSuite::M851() { if (WITHIN(z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) offs.z = z; else { - SERIAL_ECHOLNPAIR("?Z out of range (", Z_PROBE_OFFSET_RANGE_MIN, " to ", Z_PROBE_OFFSET_RANGE_MAX, ")"); + SERIAL_ECHOLNPGM("?Z out of range (", Z_PROBE_OFFSET_RANGE_MIN, " to ", Z_PROBE_OFFSET_RANGE_MAX, ")"); ok = false; } } @@ -85,7 +85,7 @@ void GcodeSuite::M851() { void GcodeSuite::M851_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_Z_PROBE_OFFSET)); - SERIAL_ECHOPAIR_P( + SERIAL_ECHOPGM_P( #if HAS_PROBE_XY_OFFSET PSTR(" M851 X"), LINEAR_UNIT(probe.offset_xy.x), SP_Y_STR, LINEAR_UNIT(probe.offset_xy.y), diff --git a/Marlin/src/gcode/probe/M951.cpp b/Marlin/src/gcode/probe/M951.cpp index f461fc2b079d..c6a9cfbe206c 100644 --- a/Marlin/src/gcode/probe/M951.cpp +++ b/Marlin/src/gcode/probe/M951.cpp @@ -32,13 +32,13 @@ mpe_settings_t mpe_settings; inline void mpe_settings_report() { SERIAL_ECHO_MSG("Magnetic Parking Extruder"); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("L: Left parking :", mpe_settings.parking_xpos[0]); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("R: Right parking :", mpe_settings.parking_xpos[1]); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("I: Grab Offset :", mpe_settings.grab_distance); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate))); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate))); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("D: Distance trav.:", mpe_settings.travel_distance); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("C: Compenstion :", mpe_settings.compensation_factor); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("L: Left parking :", mpe_settings.parking_xpos[0]); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("R: Right parking :", mpe_settings.parking_xpos[1]); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("I: Grab Offset :", mpe_settings.grab_distance); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate))); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate))); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("D: Distance trav.:", mpe_settings.travel_distance); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("C: Compenstion :", mpe_settings.compensation_factor); } void mpe_settings_init() { diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 37acc8d58cff..07d7c536a696 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -127,7 +127,7 @@ bool GCodeQueue::RingBuffer::enqueue(const char *cmd, bool skip_ok/*=true*/ * Return true if the command was consumed */ bool GCodeQueue::enqueue_one(const char *cmd) { - //SERIAL_ECHOLNPAIR("enqueue_one(\"", cmd, "\")"); + //SERIAL_ECHOLNPGM("enqueue_one(\"", cmd, "\")"); if (*cmd == 0 || ISEOL(*cmd)) return true; @@ -260,7 +260,7 @@ void GCodeQueue::RingBuffer::ok_to_send() { while (NUMERIC_SIGNED(*p)) SERIAL_CHAR(*p++); } - SERIAL_ECHOPAIR_P(SP_P_STR, planner.moves_free(), + SERIAL_ECHOPGM_P(SP_P_STR, planner.moves_free(), SP_B_STR, BUFSIZE - length); #endif SERIAL_EOL(); @@ -276,7 +276,7 @@ void GCodeQueue::flush_and_request_resend(const serial_index_t serial_ind) { PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command #endif SERIAL_FLUSH(); - SERIAL_ECHOLNPAIR(STR_RESEND, serial_state[serial_ind.index].last_N + 1); + SERIAL_ECHOLNPGM(STR_RESEND, serial_state[serial_ind.index].last_N + 1); SERIAL_ECHOLNPGM(STR_OK); } @@ -306,7 +306,7 @@ inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(ind void GCodeQueue::gcode_line_error(PGM_P const err, const serial_index_t serial_ind) { PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command SERIAL_ERROR_START(); - SERIAL_ECHOLNPAIR_P(err, serial_state[serial_ind.index].last_N); + SERIAL_ECHOLNPGM_P(err, serial_state[serial_ind.index].last_N); while (read_serial(serial_ind) != -1) { /* nada */ } // Clear out the RX buffer. Why don't use flush here ? flush_and_request_resend(serial_ind); serial_state[serial_ind.index].count = 0; @@ -659,10 +659,10 @@ void GCodeQueue::advance() { #if !defined(__AVR__) || !defined(USBCON) #if ENABLED(SERIAL_STATS_DROPPED_RX) - SERIAL_ECHOLNPAIR("Dropped bytes: ", MYSERIAL1.dropped()); + SERIAL_ECHOLNPGM("Dropped bytes: ", MYSERIAL1.dropped()); #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - SERIAL_ECHOLNPAIR("Max RX Queue Size: ", MYSERIAL1.rxMaxEnqueued()); + SERIAL_ECHOLNPGM("Max RX Queue Size: ", MYSERIAL1.rxMaxEnqueued()); #endif #endif @@ -693,7 +693,7 @@ void GCodeQueue::advance() { #if ENABLED(BUFFER_MONITORING) void GCodeQueue::report_buffer_statistics() { - SERIAL_ECHOLNPAIR("D576" + SERIAL_ECHOLNPGM("D576" " P:", planner.moves_free(), " ", -queue.planner_buffer_underruns, " (", queue.max_planner_buffer_empty_duration, ")" " B:", BUFSIZE - ring_buffer.length, " ", -queue.command_buffer_underruns, " (", queue.max_command_buffer_empty_duration, ")" ); diff --git a/Marlin/src/gcode/units/M149.cpp b/Marlin/src/gcode/units/M149.cpp index eeca59088f84..20b3781eada5 100644 --- a/Marlin/src/gcode/units/M149.cpp +++ b/Marlin/src/gcode/units/M149.cpp @@ -38,7 +38,7 @@ void GcodeSuite::M149() { void GcodeSuite::M149_report(const bool forReplay/*=true*/) { report_heading_etc(forReplay, PSTR(STR_TEMPERATURE_UNITS)); - SERIAL_ECHOPAIR(" M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in "); + SERIAL_ECHOPGM(" M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in "); SERIAL_ECHOLNPGM_P(parser.temp_units_name()); } diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index d14d6f10dda9..76d77e4cab28 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -1923,7 +1923,7 @@ void HMI_SDCardUpdate() { if (HMI_flag.home_flag) return; if (DWIN_lcd_sd_status != card.isMounted()) { DWIN_lcd_sd_status = card.isMounted(); - //SERIAL_ECHOLNPAIR("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); + //SERIAL_ECHOLNPGM("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); if (DWIN_lcd_sd_status) { if (checkkey == SelectFile) Redraw_SD_List(); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp index e446733d9b24..edcf19918286 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp @@ -969,7 +969,7 @@ void HMI_SDCardUpdate() { if (HMI_flag.home_flag) return; if (DWIN_lcd_sd_status != card.isMounted()) { DWIN_lcd_sd_status = card.isMounted(); - //SERIAL_ECHOLNPAIR("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); + //SERIAL_ECHOLNPGM("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); if (DWIN_lcd_sd_status) { if (checkkey == SelectFile) Redraw_SD_List(); diff --git a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp index 58adf9761fa8..1339c39f3f28 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp @@ -86,7 +86,7 @@ void FileNavigator::refresh() { filelist.refresh(); } void FileNavigator::changeDIR(const char *folder) { if (currentfolderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth - DEBUG_ECHOLNPAIR("FD:" , folderdepth, " FP:",currentindex, " currentfolder:", currentfoldername, " enter:", folder); + DEBUG_ECHOLNPGM("FD:" , folderdepth, " FP:",currentindex, " currentfolder:", currentfoldername, " enter:", folder); currentfolderindex[currentfolderdepth] = currentindex; strcat(currentfoldername, folder); strcat(currentfoldername, "/"); @@ -96,7 +96,7 @@ void FileNavigator::changeDIR(const char *folder) { } void FileNavigator::upDIR() { - DEBUG_ECHOLNPAIR("upDIR() from D:", currentfolderdepth, " N:", currentfoldername); + DEBUG_ECHOLNPGM("upDIR() from D:", currentfolderdepth, " N:", currentfoldername); if (!filelist.isAtRootDir()) { filelist.upDir(); currentfolderdepth--; @@ -117,7 +117,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { if (skip == 0) return; while (skip > 0) { if (filelist.seek(currentindex)) { - DEBUG_ECHOLNPAIR("CI:", currentindex, " FD:", currentfolderdepth, " N:", skip, " ", filelist.longFilename()); + DEBUG_ECHOLNPGM("CI:", currentindex, " FD:", currentfolderdepth, " N:", skip, " ", filelist.longFilename()); if (!filelist.isDir()) { skip--; currentindex++; @@ -151,7 +151,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { } lastpanelindex = index; - DEBUG_ECHOLNPAIR("index=", index, " currentindex=", currentindex); + DEBUG_ECHOLNPGM("index=", index, " currentindex=", currentindex); if (currentindex == 0 && currentfolderdepth > 0) { // Add a link to go up a folder // The new panel ignores entries that don't end in .GCO or .gcode so add and pad them. @@ -169,7 +169,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { for (uint16_t seek = currentindex; seek < currentindex + filesneeded; seek++) { if (filelist.seek(seek)) { sendFile(paneltype); - DEBUG_ECHOLNPAIR("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'"); + DEBUG_ECHOLNPGM("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'"); } } } @@ -212,7 +212,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { #else // Flat file list void FileNavigator::getFiles(uint16_t index, panel_type_t paneltype, uint8_t filesneeded) { - DEBUG_ECHOLNPAIR("getFiles() I:", index," L:", lastpanelindex); + DEBUG_ECHOLNPGM("getFiles() I:", index," L:", lastpanelindex); // if we're searching backwards, jump back to start and search forward if (index < lastpanelindex) { reset(); @@ -248,7 +248,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { TFTSer.println(filelist.shortFilename()); if (currentfolderdepth > 0) TFTSer.print(currentfoldername); TFTSer.println(filelist.longFilename()); - DEBUG_ECHOLNPAIR("/", currentfoldername, "", filelist.shortFilename(), " ", filelist.longFilename()); + DEBUG_ECHOLNPGM("/", currentfoldername, "", filelist.shortFilename(), " ", filelist.longFilename()); } #endif // Flat file list diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp index 0f6f8abe3845..5cd09228009c 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp @@ -107,12 +107,12 @@ namespace ExtUI { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated - //SERIAL_ECHOLNPAIR("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval); + //SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval); } void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { // Called to indicate a special condition - //SERIAL_ECHOLNPAIR("onMeshUpdate() x:", xpos, " y:", ypos, " state:", state); + //SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " state:", state); } #endif diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp index 0ecb138bd5f5..42364f28908f 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -104,7 +104,7 @@ void ChironTFT::Startup() { PlayTune(BEEPER_PIN, TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1); #if ACDEBUGLEVEL - SERIAL_ECHOLNPAIR("AC Debug Level ", ACDEBUGLEVEL); + SERIAL_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL); #endif SendtoTFTLN(AC_msg_ready); } @@ -128,13 +128,13 @@ void ChironTFT::IdleLoop() { void ChironTFT::PrinterKilled(PGM_P error,PGM_P component) { SendtoTFTLN(AC_msg_kill_lcd); #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("PrinterKilled()\nerror: ", error , "\ncomponent: ", component); + SERIAL_ECHOLNPGM("PrinterKilled()\nerror: ", error , "\ncomponent: ", component); #endif } void ChironTFT::MediaEvent(media_event_t event) { #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("ProcessMediaStatus() ", event); + SERIAL_ECHOLNPGM("ProcessMediaStatus() ", event); #endif switch (event) { case AC_media_inserted: @@ -154,8 +154,8 @@ void ChironTFT::MediaEvent(media_event_t event) { void ChironTFT::TimerEvent(timer_event_t event) { #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("TimerEvent() ", event); - SERIAL_ECHOLNPAIR("Printer State: ", printer_state); + SERIAL_ECHOLNPGM("TimerEvent() ", event); + SERIAL_ECHOLNPGM("Printer State: ", printer_state); #endif switch (event) { @@ -184,7 +184,7 @@ void ChironTFT::TimerEvent(timer_event_t event) { void ChironTFT::FilamentRunout() { #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("FilamentRunout() printer_state ", printer_state); + SERIAL_ECHOLNPGM("FilamentRunout() printer_state ", printer_state); #endif // 1 Signal filament out last_error = AC_error_filament_runout; @@ -195,7 +195,7 @@ void ChironTFT::FilamentRunout() { void ChironTFT::ConfirmationRequest(const char * const msg) { // M108 continue #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("ConfirmationRequest() ", msg, " printer_state:", printer_state); + SERIAL_ECHOLNPGM("ConfirmationRequest() ", msg, " printer_state:", printer_state); #endif switch (printer_state) { case AC_printer_pausing: { @@ -232,8 +232,8 @@ void ChironTFT::ConfirmationRequest(const char * const msg) { void ChironTFT::StatusChange(const char * const msg) { #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("StatusChange() ", msg); - SERIAL_ECHOLNPAIR("printer_state:", printer_state); + SERIAL_ECHOLNPGM("StatusChange() ", msg); + SERIAL_ECHOLNPGM("printer_state:", printer_state); #endif bool msg_matched = false; // The only way to get printer status is to parse messages @@ -348,7 +348,7 @@ bool ChironTFT::ReadTFTCommand() { if (command_ready || command_len == MAX_CMND_LEN) { panel_command[command_len] = '\0'; #if ACDEBUG(AC_ALL) - SERIAL_ECHOLNPAIR("len(",command_len,") < ", panel_command); + SERIAL_ECHOLNPGM("len(",command_len,") < ", panel_command); #endif command_ready = true; } @@ -360,13 +360,13 @@ int8_t ChironTFT::FindToken(char c) { do { if (panel_command[pos] == c) { #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Tpos:", pos, " ", c); + SERIAL_ECHOLNPGM("Tpos:", pos, " ", c); #endif return pos; } } while(++pos < command_len); #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Not found: ", c); + SERIAL_ECHOLNPGM("Not found: ", c); #endif return -1; } @@ -381,7 +381,7 @@ void ChironTFT::CheckHeaters() { if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) { SendtoTFTLN(AC_msg_nozzle_temp_abnormal); last_error = AC_error_abnormal_temp_t0; - SERIAL_ECHOLNPAIR("Extruder temp abnormal! : ", temp); + SERIAL_ECHOLNPGM("Extruder temp abnormal! : ", temp); break; } delay_ms(500); @@ -396,7 +396,7 @@ void ChironTFT::CheckHeaters() { if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) { SendtoTFTLN(AC_msg_nozzle_temp_abnormal); last_error = AC_error_abnormal_temp_bed; - SERIAL_ECHOLNPAIR("Bed temp abnormal! : ", temp); + SERIAL_ECHOLNPGM("Bed temp abnormal! : ", temp); break; } delay_ms(500); @@ -423,7 +423,7 @@ void ChironTFT::CheckHeaters() { void ChironTFT::SendFileList(int8_t startindex) { // Respond to panel request for 4 files starting at index #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("## SendFileList ## ", startindex); + SERIAL_ECHOLNPGM("## SendFileList ## ", startindex); #endif SendtoTFTLN(PSTR("FN ")); filenavigator.getFiles(startindex, panel_type, 4); @@ -440,7 +440,7 @@ void ChironTFT::SelectFile() { selectedfile[command_len - 5] = '\0'; } #if ACDEBUG(AC_FILE) - SERIAL_ECHOLNPAIR(" Selected File: ",selectedfile); + SERIAL_ECHOLNPGM(" Selected File: ",selectedfile); #endif switch (selectedfile[0]) { case '/': // Valid file selected @@ -561,7 +561,7 @@ void ChironTFT::PanelInfo(uint8_t req) { TFTSer.print(ui8tostr2(time % 60)); SendtoTFT(PSTR(" M")); #if ACDEBUG(AC_ALL) - SERIAL_ECHOLNPAIR("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60)); + SERIAL_ECHOLNPGM("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60)); #endif } break; @@ -702,7 +702,7 @@ void ChironTFT::PanelAction(uint8_t req) { char MoveCmnd[30]; sprintf_P(MoveCmnd, PSTR("G91\nG0%s\nG90"), panel_command + 3); #if ACDEBUG(AC_ACTION) - SERIAL_ECHOLNPAIR("Move: ", MoveCmnd); + SERIAL_ECHOLNPGM("Move: ", MoveCmnd); #endif setSoftEndstopState(true); // enable endstops injectCommands(MoveCmnd); @@ -781,7 +781,7 @@ void ChironTFT::PanelProcess(uint8_t req) { if (isPositionKnown()) { #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z); + SERIAL_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z); #endif // Go up before moving setAxisPosition_mm(3.0,Z); @@ -790,7 +790,7 @@ void ChironTFT::PanelProcess(uint8_t req) { setAxisPosition_mm(20 + (93 * pos.y), Y); setAxisPosition_mm(0.0, Z); #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Current Z: ", getAxisPosition_mm(Z)); + SERIAL_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z)); #endif } } @@ -858,17 +858,17 @@ void ChironTFT::PanelProcess(uint8_t req) { // From the leveling panel use the all points UI to adjust the print pos. if (isPrinting()) { #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift); + SERIAL_ECHOLNPGM("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift); #endif if (isAxisPositionKnown(Z)) { #if ACDEBUG(AC_INFO) const float currZpos = getAxisPosition_mm(Z); - SERIAL_ECHOLNPAIR("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); + SERIAL_ECHOLNPGM("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); #endif // Use babystepping to adjust the head position int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z); #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Steps to move Z: ", steps); + SERIAL_ECHOLNPGM("Steps to move Z: ", steps); #endif babystepAxis_steps(steps, Z); live_Zoffset += Zshift; @@ -882,12 +882,12 @@ void ChironTFT::PanelProcess(uint8_t req) { const float currval = getMeshPoint(pos); setMeshPoint(pos, constrain(currval + Zshift, AC_LOWEST_MESHPOINT_VAL, 2)); #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) ); + SERIAL_ECHOLNPGM("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) ); #endif } const float currZOffset = getZOffset_mm(); #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift); + SERIAL_ECHOLNPGM("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift); #endif setZOffset_mm(currZOffset + Zshift); @@ -898,7 +898,7 @@ void ChironTFT::PanelProcess(uint8_t req) { // Move Z axis const float currZpos = getAxisPosition_mm(Z); #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); + SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); #endif setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z); } @@ -930,8 +930,8 @@ void ChironTFT::PanelProcess(uint8_t req) { float currmesh = getMeshPoint(pos); float newval = atof(&panel_command[11])/100; #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Change mesh point x:", pos.x, " y:", pos.y); - SERIAL_ECHOLNPAIR("from ", currmesh, " to ", newval); + SERIAL_ECHOLNPGM("Change mesh point x:", pos.x, " y:", pos.y); + SERIAL_ECHOLNPGM("from ", currmesh, " to ", newval); #endif // Update Meshpoint setMeshPoint(pos,newval); @@ -942,7 +942,7 @@ void ChironTFT::PanelProcess(uint8_t req) { setSoftEndstopState(false); float currZpos = getAxisPosition_mm(Z); #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05)); + SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05)); #endif setAxisPosition_mm(currZpos + constrain(newval - currmesh, -0.05, 0.05), Z); } diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index 3277ad4fb498..b739e83dc1d3 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -143,7 +143,7 @@ void AnycubicTFTClass::OnKillTFT() { void AnycubicTFTClass::OnSDCardStateChange(bool isInserted) { #if ENABLED(ANYCUBIC_LCD_DEBUG) - SERIAL_ECHOLNPAIR("TFT Serial Debug: OnSDCardStateChange event triggered...", isInserted); + SERIAL_ECHOLNPGM("TFT Serial Debug: OnSDCardStateChange event triggered...", isInserted); #endif DoSDCardStateCheck(); } @@ -164,7 +164,7 @@ void AnycubicTFTClass::OnFilamentRunout() { void AnycubicTFTClass::OnUserConfirmRequired(const char * const msg) { #if ENABLED(ANYCUBIC_LCD_DEBUG) - SERIAL_ECHOLNPAIR("TFT Serial Debug: OnUserConfirmRequired triggered... ", msg); + SERIAL_ECHOLNPGM("TFT Serial Debug: OnUserConfirmRequired triggered... ", msg); #endif #if ENABLED(SDSUPPORT) @@ -557,7 +557,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { #if ENABLED(ANYCUBIC_LCD_DEBUG) if ((a_command > 7) && (a_command != 20)) // No debugging of status polls, please! - SERIAL_ECHOLNPAIR("TFT Serial Command: ", TFTcmdbuffer[TFTbufindw]); + SERIAL_ECHOLNPGM("TFT Serial Command: ", TFTcmdbuffer[TFTbufindw]); #endif switch (a_command) { diff --git a/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp index 535bc965912f..262dcea36483 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp @@ -154,19 +154,19 @@ void DGUSDisplay::ProcessRx() { case DGUS_IDLE: // Waiting for the first header byte receivedbyte = LCD_SERIAL.read(); - //DEBUG_ECHOPAIR("< ",x); + //DEBUG_ECHOPGM("< ",x); if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN; break; case DGUS_HEADER1_SEEN: // Waiting for the second header byte receivedbyte = LCD_SERIAL.read(); - //DEBUG_ECHOPAIR(" ",x); + //DEBUG_ECHOPGM(" ",x); rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE; break; case DGUS_HEADER2_SEEN: // Waiting for the length byte rx_datagram_len = LCD_SERIAL.read(); - DEBUG_ECHOPAIR(" (", rx_datagram_len, ") "); + DEBUG_ECHOPGM(" (", rx_datagram_len, ") "); // Telegram min len is 3 (command and one word of payload) rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE; @@ -178,14 +178,14 @@ void DGUSDisplay::ProcessRx() { Initialized = true; // We've talked to it, so we defined it as initialized. uint8_t command = LCD_SERIAL.read(); - DEBUG_ECHOPAIR("# ", command); + DEBUG_ECHOPGM("# ", command); uint8_t readlen = rx_datagram_len - 1; // command is part of len. unsigned char tmp[rx_datagram_len - 1]; unsigned char *ptmp = tmp; while (readlen--) { receivedbyte = LCD_SERIAL.read(); - DEBUG_ECHOPAIR(" ", receivedbyte); + DEBUG_ECHOPGM(" ", receivedbyte); *ptmp++ = receivedbyte; } DEBUG_ECHOPGM(" # "); @@ -206,7 +206,7 @@ void DGUSDisplay::ProcessRx() { if (command == DGUS_CMD_READVAR) { const uint16_t vp = tmp[0] << 8 | tmp[1]; //const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words) - //DEBUG_ECHOPAIR(" vp=", vp, " dlen=", dlen); + //DEBUG_ECHOPGM(" vp=", vp, " dlen=", dlen); DGUS_VP_Variable ramcopy; if (populate_VPVar(vp, &ramcopy)) { if (ramcopy.set_by_display_handler) @@ -215,7 +215,7 @@ void DGUSDisplay::ProcessRx() { DEBUG_ECHOLNPGM(" VPVar found, no handler."); } else - DEBUG_ECHOLNPAIR(" VPVar not found:", vp); + DEBUG_ECHOLNPGM(" VPVar not found:", vp); rx_datagram_state = DGUS_IDLE; break; @@ -260,9 +260,9 @@ bool DGUSDisplay::no_reentrance = false; #define sw_barrier() asm volatile("": : :"memory"); bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) { - // DEBUG_ECHOPAIR("populate_VPVar ", VP); + // DEBUG_ECHOPGM("populate_VPVar ", VP); const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP); - // DEBUG_ECHOLNPAIR(" pvp ", (uint16_t )pvp); + // DEBUG_ECHOLNPGM(" pvp ", (uint16_t )pvp); if (!pvp) return false; memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable)); return true; diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index 9e44cf13318f..16576f7039ae 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -110,8 +110,8 @@ void DGUSScreenHandler::setstatusmessagePGM(PGM_P const msg) { // Send an 8 bit or 16 bit value to the display. void DGUSScreenHandler::DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - //DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP); - //DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr); + //DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); if (var.size > 1) dgusdisplay.WriteVariable(var.VP, *(int16_t*)var.memadr); else @@ -122,8 +122,8 @@ void DGUSScreenHandler::DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var) { // Send an uint8_t between 0 and 255 to the display, but scale to a percentage (0..100) void DGUSScreenHandler::DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - //DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP); - //DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr); + //DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); uint16_t tmp = *(uint8_t *) var.memadr + 1; // +1 -> avoid rounding issues for the display. tmp = map(tmp, 0, 255, 0, 100); dgusdisplay.WriteVariable(var.VP, tmp); @@ -132,9 +132,9 @@ void DGUSScreenHandler::DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var) { // Send the current print progress to the display. void DGUSScreenHandler::DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var) { - //DEBUG_ECHOPAIR(" DGUSLCD_SendPrintProgressToDisplay ", var.VP); + //DEBUG_ECHOPGM(" DGUSLCD_SendPrintProgressToDisplay ", var.VP); uint16_t tmp = ExtUI::getProgress_percent(); - //DEBUG_ECHOLNPAIR(" data ", tmp); + //DEBUG_ECHOLNPGM(" data ", tmp); dgusdisplay.WriteVariable(var.VP, tmp); } @@ -151,9 +151,9 @@ void DGUSScreenHandler::DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var) { void DGUSScreenHandler::DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr) { if (var.memadr) { uint16_t value = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("FAN value get:", value); + DEBUG_ECHOLNPGM("FAN value get:", value); *(uint8_t*)var.memadr = map(constrain(value, 0, 100), 0, 100, 0, 255); - DEBUG_ECHOLNPAIR("FAN value change:", *(uint8_t*)var.memadr); + DEBUG_ECHOLNPGM("FAN value change:", *(uint8_t*)var.memadr); } } @@ -234,8 +234,8 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) { void DGUSScreenHandler::DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - DEBUG_ECHOPAIR(" DGUSLCD_SendFanStatusToDisplay ", var.VP); - DEBUG_ECHOLNPAIR(" data ", *(uint8_t *)var.memadr); + DEBUG_ECHOPGM(" DGUSLCD_SendFanStatusToDisplay ", var.VP); + DEBUG_ECHOLNPGM(" data ", *(uint8_t *)var.memadr); uint16_t data_to_send = 0; if (*(uint8_t *) var.memadr) data_to_send = 1; dgusdisplay.WriteVariable(var.VP, data_to_send); @@ -247,8 +247,8 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) { // Send heater status value to the display. void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - DEBUG_ECHOPAIR(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP); - DEBUG_ECHOLNPAIR(" data ", *(int16_t *)var.memadr); + DEBUG_ECHOPGM(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP); + DEBUG_ECHOLNPGM(" data ", *(int16_t *)var.memadr); uint16_t data_to_send = 0; if (*(int16_t *) var.memadr) data_to_send = 1; dgusdisplay.WriteVariable(var.VP, data_to_send); @@ -261,11 +261,11 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) // In FYSETC UI design there are 10 statuses to loop static uint16_t period = 0; static uint16_t index = 0; - //DEBUG_ECHOPAIR(" DGUSLCD_SendWaitingStatusToDisplay ", var.VP); - //DEBUG_ECHOLNPAIR(" data ", swap16(index)); + //DEBUG_ECHOPGM(" DGUSLCD_SendWaitingStatusToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", swap16(index)); if (period++ > DGUS_UI_WAITING_STATUS_PERIOD) { dgusdisplay.WriteVariable(var.VP, index); - //DEBUG_ECHOLNPAIR(" data ", swap16(index)); + //DEBUG_ECHOLNPGM(" data ", swap16(index)); if (++index >= DGUS_UI_WAITING_STATUS) index = 0; period = 0; } @@ -307,7 +307,7 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) const int16_t scroll = (int16_t)swap16(*(uint16_t*)val_ptr); if (scroll) { top_file += scroll; - DEBUG_ECHOPAIR("new topfile calculated:", top_file); + DEBUG_ECHOPGM("new topfile calculated:", top_file); if (top_file < 0) { top_file = 0; DEBUG_ECHOLNPGM("Top of filelist reached"); @@ -317,7 +317,7 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) NOLESS(max_top, 0); NOMORE(top_file, max_top); } - DEBUG_ECHOPAIR("new topfile adjusted:", top_file); + DEBUG_ECHOPGM("new topfile adjusted:", top_file); } else if (!filelist.isAtRootDir()) { IF_DISABLED(DGUS_LCD_UI_MKS, filelist.upDir()); @@ -371,7 +371,7 @@ const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp) { ++ret; } while (1); - DEBUG_ECHOLNPAIR("FindVPVar NOT FOUND ", vp); + DEBUG_ECHOLNPGM("FindVPVar NOT FOUND ", vp); return nullptr; } @@ -476,7 +476,7 @@ void DGUSScreenHandler::HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_p const int16_t lock = swap16(*(uint16_t*)val_ptr); strcpy_P(buf, lock ? PSTR("M18") : PSTR("M17")); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); } @@ -499,7 +499,7 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ DEBUG_ECHOLNPGM("HandleStepPerMMChanged"); uint16_t value_raw = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); float value = (float)value_raw / 10; ExtUI::axis_t axis; switch (var.VP) { @@ -519,7 +519,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged"); uint16_t value_raw = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); float value = (float)value_raw / 10; ExtUI::extruder_t extruder; switch (var.VP) { @@ -696,7 +696,7 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr #endif void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) { - DEBUG_ECHOLNPAIR("SetNewScreen: ", newscreen); + DEBUG_ECHOLNPGM("SetNewScreen: ", newscreen); if (!popup) { memmove(&past_screens[1], &past_screens[0], sizeof(past_screens) - 1); past_screens[0] = current_screen; @@ -707,18 +707,18 @@ void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) { } void DGUSScreenHandler::PopToOldScreen() { - DEBUG_ECHOLNPAIR("PopToOldScreen s=", past_screens[0]); + DEBUG_ECHOLNPGM("PopToOldScreen s=", past_screens[0]); GotoScreen(past_screens[0], true); memmove(&past_screens[0], &past_screens[1], sizeof(past_screens) - 1); past_screens[sizeof(past_screens) - 1] = DGUSLCD_SCREEN_MAIN; } void DGUSScreenHandler::UpdateScreenVPData() { - DEBUG_ECHOPAIR(" UpdateScreenVPData Screen: ", current_screen); + DEBUG_ECHOPGM(" UpdateScreenVPData Screen: ", current_screen); const uint16_t *VPList = DGUSLCD_FindScreenVPMapList(current_screen); if (!VPList) { - DEBUG_ECHOLNPAIR(" NO SCREEN FOR: ", current_screen); + DEBUG_ECHOLNPGM(" NO SCREEN FOR: ", current_screen); ScreenComplete = true; return; // nothing to do, likely a bug or boring screen. } @@ -729,7 +729,7 @@ void DGUSScreenHandler::UpdateScreenVPData() { bool sent_one = false; do { uint16_t VP = pgm_read_word(VPList); - DEBUG_ECHOPAIR(" VP: ", VP); + DEBUG_ECHOPGM(" VP: ", VP); if (!VP) { update_ptr = 0; DEBUG_ECHOLNPGM(" UpdateScreenVPData done"); @@ -745,14 +745,14 @@ void DGUSScreenHandler::UpdateScreenVPData() { // Send the VP to the display, but try to avoid overrunning the Tx Buffer. // But send at least one VP, to avoid getting stalled. if (rcpy.send_to_display_handler && (!sent_one || expected_tx <= dgusdisplay.GetFreeTxBuffer())) { - //DEBUG_ECHOPAIR(" calling handler for ", rcpy.VP); + //DEBUG_ECHOPGM(" calling handler for ", rcpy.VP); sent_one = true; rcpy.send_to_display_handler(rcpy); } else { // auto x=dgusdisplay.GetFreeTxBuffer(); - //DEBUG_ECHOLNPAIR(" tx almost full: ", x); - //DEBUG_ECHOPAIR(" update_ptr ", update_ptr); + //DEBUG_ECHOLNPGM(" tx almost full: ", x); + //DEBUG_ECHOPGM(" update_ptr ", update_ptr); ScreenComplete = false; return; // please call again! } @@ -767,7 +767,7 @@ void DGUSScreenHandler::GotoScreen(DGUSLCD_Screens screen, bool ispopup) { } void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) { - DEBUG_ECHOLNPAIR("GotoScreen ", screen); + DEBUG_ECHOLNPGM("GotoScreen ", screen); const unsigned char gotoscreen[] = { 0x5A, 0x01, (unsigned char) (screen >> 8U), (unsigned char) (screen & 0xFFU) }; WriteVariable(0x84, gotoscreen, sizeof(gotoscreen)); } diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp index ae6a31fb0571..60a0f6c5bb6c 100644 --- a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -134,7 +134,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { // meaning "return to previous screen" DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; - DEBUG_ECHOLNPAIR("\n DEBUG target", target); + DEBUG_ECHOLNPGM("\n DEBUG target", target); if (target == DGUSLCD_SCREEN_POPUP) { // Special handling for popup is to return to previous menu @@ -146,7 +146,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { UpdateNewScreen(target); #ifdef DEBUG_DGUSLCD - if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPAIR("WARNING: No screen Mapping found for ", target); + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); #endif } @@ -190,10 +190,10 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPAIR(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); char buf[6] = "G28 X"; buf[4] = axiscode; - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); //DEBUG_ECHOLNPGM(" ✓"); ForceCompleteUpdate(); @@ -201,7 +201,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPAIR(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { //DEBUG_ECHOPGM(" G91"); @@ -215,13 +215,13 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (movevalue < 0) { value = -value; sign[0] = '-'; } int16_t fraction = ABS(movevalue) % 100; snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); //DEBUG_ECHOLNPGM(" ✓ "); if (backup_speed != speed) { snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); queue.enqueue_one_now(buf); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); } // while (!enqueue_and_echo_command(buf)) idle(); //DEBUG_ECHOLNPGM(" ✓ "); @@ -237,16 +237,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPAIR(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); return; } #if HAS_PID_HEATING void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("V1:", rawvalue); + DEBUG_ECHOLNPGM("V1:", rawvalue); float value = (float)rawvalue / 10; - DEBUG_ECHOLNPAIR("V2:", value); + DEBUG_ECHOLNPGM("V2:", value); float newvalue = 0; switch (var.VP) { diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp index c67ec73f6192..83f7a39c2855 100644 --- a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -134,7 +134,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { // meaning "return to previous screen" DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; - DEBUG_ECHOLNPAIR("\n DEBUG target", target); + DEBUG_ECHOLNPGM("\n DEBUG target", target); if (target == DGUSLCD_SCREEN_POPUP) { // Special handling for popup is to return to previous menu @@ -146,7 +146,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { UpdateNewScreen(target); #ifdef DEBUG_DGUSLCD - if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPAIR("WARNING: No screen Mapping found for ", target); + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); #endif } @@ -190,10 +190,10 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPAIR(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); char buf[6] = "G28 X"; buf[4] = axiscode; - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); //DEBUG_ECHOLNPGM(" ✓"); ForceCompleteUpdate(); @@ -201,7 +201,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPAIR(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { //DEBUG_ECHOPGM(" G91"); @@ -215,13 +215,13 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (movevalue < 0) { value = -value; sign[0] = '-'; } int16_t fraction = ABS(movevalue) % 100; snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); //DEBUG_ECHOLNPGM(" ✓ "); if (backup_speed != speed) { snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); queue.enqueue_one_now(buf); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); } // while (!enqueue_and_echo_command(buf)) idle(); //DEBUG_ECHOLNPGM(" ✓ "); @@ -237,16 +237,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPAIR(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); return; } #if HAS_PID_HEATING void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("V1:", rawvalue); + DEBUG_ECHOLNPGM("V1:", rawvalue); float value = (float)rawvalue / 10; - DEBUG_ECHOLNPAIR("V2:", value); + DEBUG_ECHOLNPGM("V2:", value); float newvalue = 0; switch (var.VP) { diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index c80191c8e54f..60c3790882a9 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -83,8 +83,8 @@ void DGUSScreenHandler::sendinfoscreen_mks(const void *line1, const void *line2, void DGUSScreenHandler::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - //DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP); - //DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr); + //DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); uint16_t tmp = *(uint8_t *) var.memadr; // +1 -> avoid rounding issues for the display. // tmp = map(tmp, 0, 255, 0, 100); dgusdisplay.WriteVariable(var.VP, tmp); @@ -109,14 +109,14 @@ void DGUSScreenHandler::DGUSLCD_SendPrintTimeToDisplay_MKS(DGUS_VP_Variable &var void DGUSScreenHandler::DGUSLCD_SetUint8(DGUS_VP_Variable &var, void *val_ptr) { if (var.memadr) { const uint16_t value = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("FAN value get:", value); + DEBUG_ECHOLNPGM("FAN value get:", value); *(uint8_t*)var.memadr = map(constrain(value, 0, 255), 0, 255, 0, 255); - DEBUG_ECHOLNPAIR("FAN value change:", *(uint8_t*)var.memadr); + DEBUG_ECHOLNPGM("FAN value change:", *(uint8_t*)var.memadr); } } void DGUSScreenHandler::DGUSLCD_SendGbkToDisplay(DGUS_VP_Variable &var) { - DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr); + DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); uint16_t *tmp = (uint16_t*) var.memadr; dgusdisplay.WriteVariable(var.VP, tmp, var.size, true); } @@ -282,7 +282,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { // meaning "return to previous screen" DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; - DEBUG_ECHOLNPAIR("\n DEBUG target", target); + DEBUG_ECHOLNPGM("\n DEBUG target", target); // when the dgus had reboot, it will enter the DGUSLCD_SCREEN_MAIN page, // so user can change any page to use this function, an it will check @@ -311,13 +311,13 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { UpdateNewScreen(target); #ifdef DEBUG_DGUSLCD - if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPAIR("WARNING: No screen Mapping found for ", target); + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); #endif } void DGUSScreenHandler::ScreenBackChange(DGUS_VP_Variable &var, void *val_ptr) { const uint16_t target = swap16(*(uint16_t *)val_ptr); - DEBUG_ECHOLNPAIR(" back = 0x%x", target); + DEBUG_ECHOLNPGM(" back = 0x%x", target); switch (target) { } } @@ -756,7 +756,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { else if (manualMoveStep == 0x02) manualMoveStep = 100; else if (manualMoveStep == 0x03) manualMoveStep = 1000; - DEBUG_ECHOLNPAIR("QUEUE LEN:", queue.length); + DEBUG_ECHOLNPGM("QUEUE LEN:", queue.length); if (!print_job_timer.isPaused() && !queue.ring_buffer.empty()) return; @@ -818,7 +818,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { break; } - DEBUG_ECHOPAIR("movevalue = ", movevalue); + DEBUG_ECHOPGM("movevalue = ", movevalue); if (movevalue != 0 && movevalue != 5) { // get move distance switch (movevalue) { case 0x0001: movevalue = manualMoveStep; break; @@ -829,20 +829,20 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPAIR(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); // char buf[6] = "G28 X"; // buf[4] = axiscode; char buf[6]; sprintf(buf, "G28 %c", axiscode); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); //DEBUG_ECHOLNPGM(" ✓"); ForceCompleteUpdate(); return; } else if (movevalue == 5) { - DEBUG_ECHOPAIR("send M84"); + DEBUG_ECHOPGM("send M84"); char buf[6]; snprintf_P(buf,6,PSTR("M84 %c"), axiscode); queue.enqueue_one_now(buf); @@ -851,7 +851,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPAIR(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { @@ -871,7 +871,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { //if (backup_speed != speed) { // snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); // queue.enqueue_one_now(buf); - // //DEBUG_ECHOPAIR(" ", buf); + // //DEBUG_ECHOPGM(" ", buf); //} //while (!enqueue_and_echo_command(buf)) idle(); @@ -889,7 +889,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPAIR(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); return; } @@ -923,7 +923,7 @@ void DGUSScreenHandler::HandleStepPerMMChanged_MKS(DGUS_VP_Variable &var, void * const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); const float value = (float)value_raw; - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPAIR_F("value:", value); ExtUI::axis_t axis; @@ -945,7 +945,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged_MKS(DGUS_VP_Variable &var const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); const float value = (float)value_raw; - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPAIR_F("value:", value); ExtUI::extruder_t extruder; @@ -970,7 +970,7 @@ void DGUSScreenHandler::HandleMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *va const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); const float value = (float)value_raw; - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPAIR_F("value:", value); ExtUI::axis_t axis; @@ -992,7 +992,7 @@ void DGUSScreenHandler::HandleExtruderMaxSpeedChange_MKS(DGUS_VP_Variable &var, const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); const float value = (float)value_raw; - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPAIR_F("value:", value); ExtUI::extruder_t extruder; @@ -1017,7 +1017,7 @@ void DGUSScreenHandler::HandleMaxAccChange_MKS(DGUS_VP_Variable &var, void *val_ const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); const float value = (float)value_raw; - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); DEBUG_ECHOLNPAIR_F("value:", value); ExtUI::axis_t axis; @@ -1037,7 +1037,7 @@ void DGUSScreenHandler::HandleExtruderAccChange_MKS(DGUS_VP_Variable &var, void DEBUG_ECHOLNPGM("HandleExtruderAccChange_MKS"); uint16_t value_raw = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("value_raw:", value_raw); + DEBUG_ECHOLNPGM("value_raw:", value_raw); float value = (float)value_raw; ExtUI::extruder_t extruder; switch (var.VP) { @@ -1091,9 +1091,9 @@ void DGUSScreenHandler::HandleAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr #if HAS_PID_HEATING void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { const uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("V1:", rawvalue); + DEBUG_ECHOLNPGM("V1:", rawvalue); const float value = 1.0f * rawvalue; - DEBUG_ECHOLNPAIR("V2:", value); + DEBUG_ECHOLNPGM("V2:", value); float newvalue = 0; switch (var.VP) { diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp index b0759c63afaf..db467d7b3459 100644 --- a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -134,7 +134,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { // meaning "return to previous screen" DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; - DEBUG_ECHOLNPAIR("\n DEBUG target", target); + DEBUG_ECHOLNPGM("\n DEBUG target", target); if (target == DGUSLCD_SCREEN_POPUP) { // Special handling for popup is to return to previous menu @@ -146,7 +146,7 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { UpdateNewScreen(target); #ifdef DEBUG_DGUSLCD - if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPAIR("WARNING: No screen Mapping found for ", target); + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); #endif } @@ -190,10 +190,10 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (!movevalue) { // homing - DEBUG_ECHOPAIR(" homing ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); char buf[6] = "G28 X"; buf[4] = axiscode; - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); //DEBUG_ECHOLNPGM(" ✓"); ForceCompleteUpdate(); @@ -201,7 +201,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { } else { // movement - DEBUG_ECHOPAIR(" move ", AS_CHAR(axiscode)); + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); bool old_relative_mode = relative_mode; if (!relative_mode) { //DEBUG_ECHOPGM(" G91"); @@ -215,13 +215,13 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { if (movevalue < 0) { value = -value; sign[0] = '-'; } int16_t fraction = ABS(movevalue) % 100; snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); //DEBUG_ECHOLNPGM(" ✓ "); if (backup_speed != speed) { snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); queue.enqueue_one_now(buf); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); } // while (!enqueue_and_echo_command(buf)) idle(); //DEBUG_ECHOLNPGM(" ✓ "); @@ -237,16 +237,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { return; cannotmove: - DEBUG_ECHOLNPAIR(" cannot move ", AS_CHAR(axiscode)); + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); return; } #if HAS_PID_HEATING void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("V1:", rawvalue); + DEBUG_ECHOLNPGM("V1:", rawvalue); float value = (float)rawvalue / 10; - DEBUG_ECHOLNPAIR("V2:", value); + DEBUG_ECHOLNPGM("V2:", value); float newvalue = 0; switch (var.VP) { diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp index e82f63bce108..4fce364f812e 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp @@ -159,7 +159,7 @@ void DGUSDisplay::WriteStringPGM(uint16_t addr, const void* data_ptr, uint8_t si } void DGUSDisplay::SwitchScreen(DGUS_Screen screen) { - DEBUG_ECHOLNPAIR("SwitchScreen ", (uint8_t)screen); + DEBUG_ECHOLNPGM("SwitchScreen ", (uint8_t)screen); const uint8_t command[] = { 0x5A, 0x01, 0x00, (uint8_t)screen }; Write(0x84, command, sizeof(command)); } @@ -167,13 +167,13 @@ void DGUSDisplay::SwitchScreen(DGUS_Screen screen) { void DGUSDisplay::PlaySound(uint8_t start, uint8_t len, uint8_t volume) { if (volume == 0) volume = DGUSDisplay::volume; if (volume == 0) return; - DEBUG_ECHOLNPAIR("PlaySound ", start, ":", len, "\nVolume ", volume); + DEBUG_ECHOLNPGM("PlaySound ", start, ":", len, "\nVolume ", volume); const uint8_t command[] = { start, len, volume, 0x00 }; Write(0xA0, command, sizeof(command)); } void DGUSDisplay::EnableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control) { - DEBUG_ECHOLNPAIR("EnableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); + DEBUG_ECHOLNPGM("EnableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); const uint8_t command[] = { 0x5A, 0xA5, 0x00, (uint8_t)screen, (uint8_t)control, type, 0x00, 0x01 }; Write(0xB0, command, sizeof(command)); @@ -183,7 +183,7 @@ void DGUSDisplay::EnableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_ } void DGUSDisplay::DisableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control) { - DEBUG_ECHOLNPAIR("DisableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); + DEBUG_ECHOLNPGM("DisableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); const uint8_t command[] = { 0x5A, 0xA5, 0x00, (uint8_t)screen, (uint8_t)control, type, 0x00, 0x00 }; Write(0xB0, command, sizeof(command)); @@ -203,14 +203,14 @@ uint8_t DGUSDisplay::GetVolume() { void DGUSDisplay::SetBrightness(uint8_t new_brightness) { brightness = constrain(new_brightness, 0, 100); new_brightness = map_precise(brightness, 0, 100, 5, 100); - DEBUG_ECHOLNPAIR("SetBrightness ", new_brightness); + DEBUG_ECHOLNPGM("SetBrightness ", new_brightness); const uint8_t command[] = { new_brightness, new_brightness }; Write(0x82, command, sizeof(command)); } void DGUSDisplay::SetVolume(uint8_t new_volume) { volume = map_precise(constrain(new_volume, 0, 100), 0, 100, 0, 255); - DEBUG_ECHOLNPAIR("SetVolume ", volume); + DEBUG_ECHOLNPGM("SetVolume ", volume); const uint8_t command[] = { volume, 0x00 }; Write(0xA1, command, sizeof(command)); } @@ -234,19 +234,19 @@ void DGUSDisplay::ProcessRx() { case DGUS_IDLE: // Waiting for the first header byte receivedbyte = LCD_SERIAL.read(); - DEBUG_ECHOPAIR("< ", receivedbyte); + DEBUG_ECHOPGM("< ", receivedbyte); if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN; break; case DGUS_HEADER1_SEEN: // Waiting for the second header byte receivedbyte = LCD_SERIAL.read(); - DEBUG_ECHOPAIR(" ", receivedbyte); + DEBUG_ECHOPGM(" ", receivedbyte); rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE; break; case DGUS_HEADER2_SEEN: // Waiting for the length byte rx_datagram_len = LCD_SERIAL.read(); - DEBUG_ECHOPAIR(" (", rx_datagram_len, ") "); + DEBUG_ECHOPGM(" (", rx_datagram_len, ") "); // Telegram min len is 3 (command and one word of payload) rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE; @@ -258,7 +258,7 @@ void DGUSDisplay::ProcessRx() { initialized = true; // We've talked to it, so we defined it as initialized. uint8_t command = LCD_SERIAL.read(); - DEBUG_ECHOPAIR("# ", command); + DEBUG_ECHOPGM("# ", command); uint8_t readlen = rx_datagram_len - 1; // command is part of len. unsigned char tmp[rx_datagram_len - 1]; @@ -266,7 +266,7 @@ void DGUSDisplay::ProcessRx() { while (readlen--) { receivedbyte = LCD_SERIAL.read(); - DEBUG_ECHOPAIR(" ", receivedbyte); + DEBUG_ECHOPGM(" ", receivedbyte); *ptmp++ = receivedbyte; } DEBUG_ECHOPGM(" # "); @@ -287,7 +287,7 @@ void DGUSDisplay::ProcessRx() { if (command == DGUS_READVAR) { const uint16_t addr = tmp[0] << 8 | tmp[1]; const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words) - DEBUG_ECHOPAIR("addr=", addr, " dlen=", dlen, "> "); + DEBUG_ECHOPGM("addr=", addr, " dlen=", dlen, "> "); if (addr == DGUS_VERSION && dlen == 2) { DEBUG_ECHOLNPGM("VERSIONS"); @@ -400,7 +400,7 @@ bool DGUS_PopulateVP(const DGUS_Addr addr, DGUS_VP * const buffer) { return true; } } while (++ret); - DEBUG_ECHOLNPAIR("VP not found: ", (uint16_t)addr); + DEBUG_ECHOLNPGM("VP not found: ", (uint16_t)addr); return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp index a28318335c59..ebe99a37d224 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp @@ -178,9 +178,9 @@ bool UIFlashStorage::is_present = false; if (!is_known) { SERIAL_ECHO_MSG("Unable to locate supported SPI Flash Memory."); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Manufacturer ID, got: ", manufacturer_id); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Device Type , got: ", device_type); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Capacity , got: ", capacity); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Manufacturer ID, got: ", manufacturer_id); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Device Type , got: ", device_type); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Capacity , got: ", capacity); } return is_known; @@ -247,7 +247,7 @@ bool UIFlashStorage::is_present = false; case 0xFFFFFFFFul: return read_offset; case delimiter: read_offset = offset; break; default: - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Invalid delimiter in Flash: ", delim); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Invalid delimiter in Flash: ", delim); return -1; } } @@ -325,7 +325,7 @@ bool UIFlashStorage::is_present = false; } SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Writing UI settings to SPI Flash (offset ", write_addr); + SERIAL_ECHOPGM("Writing UI settings to SPI Flash (offset ", write_addr); SERIAL_ECHOPGM(")..."); const uint32_t delim = delimiter; @@ -509,7 +509,7 @@ bool UIFlashStorage::is_present = false; bytes_remaining = get_media_file_size(slot); if (bytes_remaining != 0xFFFFFFFFUL) { - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Boot media file size:", bytes_remaining); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Boot media file size:", bytes_remaining); addr = get_media_file_start(slot); return true; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp index a696ca3413ab..c8e5721006b3 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp @@ -131,7 +131,7 @@ namespace ExtUI { #if HAS_PID_HEATING void onPidTuning(const result_t rst) { // Called for temperature PID tuning result - //SERIAL_ECHOLNPAIR("OnPidTuning:", rst); + //SERIAL_ECHOLNPGM("OnPidTuning:", rst); switch (rst) { case PID_STARTED: StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp index a10fdc3ede35..40cddce7fdbf 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp @@ -1025,8 +1025,8 @@ template bool CLCD::CommandFifo::write(T data, uint16_t len) { if (Command_Space < (len + padding)) { #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Waiting for ", len + padding); - SERIAL_ECHOLNPAIR(" bytes in command queue, now free: ", Command_Space); + SERIAL_ECHOPGM("Waiting for ", len + padding); + SERIAL_ECHOLNPGM(" bytes in command queue, now free: ", Command_Space); #endif do { Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h index b4438a92b976..2b7eca0cce79 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h @@ -199,7 +199,7 @@ #define _NUM_ARGS(_,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT #define NUM_ARGS(V...) _NUM_ARGS(0,V,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0) - // SERIAL_ECHOPAIR / SERIAL_ECHOPAIR_P is used to output a key value pair. The key must be a string and the value can be anything + // SERIAL_ECHOPGM / SERIAL_ECHOPGM_P is used to output a key value pair. The key must be a string and the value can be anything // Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR(). #define __SEP_N(N,V...) _SEP_##N(V) #define _SEP_N(N,V...) __SEP_N(N,V) @@ -218,9 +218,9 @@ #define SERIAL_ECHO_START() #define SERIAL_ECHOLNPGM(str) Serial.println(F(str)) #define SERIAL_ECHOPGM(str) Serial.print(F(str)) - #define SERIAL_ECHO_MSG(V...) SERIAL_ECHOLNPAIR(V) - #define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V) - #define SERIAL_ECHOPAIR(str, val) do{ Serial.print(F(str)); Serial.print(val); }while(0) + #define SERIAL_ECHO_MSG(V...) SERIAL_ECHOLNPGM(V) + #define SERIAL_ECHOLNPGM(V...) _SELP_N(NUM_ARGS(V),V) + #define SERIAL_ECHOPGM(str, val) do{ Serial.print(F(str)); Serial.print(val); }while(0) #define safe_delay delay diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp index a13c36265ed8..1ee73c140e3a 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp @@ -132,8 +132,8 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) { // Not enough memory to cache the display list. #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR ("Not enough space in GRAM to cache display list, free space: ", dl_slot_size); - SERIAL_ECHOLNPAIR(" Required: ", dl_size); + SERIAL_ECHOPGM ("Not enough space in GRAM to cache display list, free space: ", dl_slot_size); + SERIAL_ECHOLNPGM(" Required: ", dl_size); #endif dl_slot_used = 0; save_slot(); @@ -142,8 +142,8 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) { else { #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR ("Saving DL to RAMG cache, bytes: ", dl_slot_used); - SERIAL_ECHOLNPAIR(" Free space: ", dl_slot_size); + SERIAL_ECHOPGM ("Saving DL to RAMG cache, bytes: ", dl_slot_used); + SERIAL_ECHOLNPGM(" Free space: ", dl_slot_size); #endif dl_slot_used = dl_size; save_slot(); @@ -172,8 +172,8 @@ void DLCache::append() { cmd.execute(); wait_until_idle(); SERIAL_ECHO_START(); - SERIAL_ECHOPAIR ("Appending to DL from RAMG cache, bytes: ", dl_slot_used); - SERIAL_ECHOLNPAIR(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL)); + SERIAL_ECHOPGM ("Appending to DL from RAMG cache, bytes: ", dl_slot_used); + SERIAL_ECHOLNPGM(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL)); #endif } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp index 4e318cef17ed..44836cec4878 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp @@ -33,7 +33,7 @@ uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) { } #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Screen not found: ", (uintptr_t) onRedraw_ptr); + SERIAL_ECHOPGM("Screen not found: ", (uintptr_t) onRedraw_ptr); #endif return 0xFF; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h index 486c4fe562a3..a13ab8e9aa7a 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h @@ -237,7 +237,7 @@ class CachedScreen { cmd.cmd(CMD_SWAP); cmd.execute(); #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHOLNPAIR("Time to draw screen (ms): ", millis() - start_time); + SERIAL_ECHOLNPGM("Time to draw screen (ms): ", millis() - start_time); #endif } }; diff --git a/Marlin/src/lcd/extui/malyan/malyan.cpp b/Marlin/src/lcd/extui/malyan/malyan.cpp index 12cdcdf004aa..8c9bfc32e5ad 100644 --- a/Marlin/src/lcd/extui/malyan/malyan.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan.cpp @@ -122,7 +122,7 @@ void set_lcd_error_P(PGM_P const error, PGM_P const component/*=nullptr*/) { void process_lcd_c_command(const char *command) { const int target_val = command[1] ? atoi(command + 1) : -1; if (target_val < 0) { - DEBUG_ECHOLNPAIR("UNKNOWN C COMMAND ", command); + DEBUG_ECHOLNPGM("UNKNOWN C COMMAND ", command); return; } switch (command[0]) { @@ -143,7 +143,7 @@ void process_lcd_c_command(const char *command) { case 'P': ExtUI::setTargetTemp_celsius(target_val, ExtUI::heater_t::BED); break; #endif - default: DEBUG_ECHOLNPAIR("UNKNOWN C COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN C COMMAND ", command); } } @@ -185,7 +185,7 @@ void process_lcd_eb_command(const char *command) { write_to_lcd(message_buffer); } break; - default: DEBUG_ECHOLNPAIR("UNKNOWN E/B COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN E/B COMMAND ", command); } } @@ -212,7 +212,7 @@ void process_lcd_j_command(const char *command) { case 'Y': j_move_axis(command, ExtUI::axis_t::Y); break; case 'Z': j_move_axis(command, ExtUI::axis_t::Z); break; case 'X': j_move_axis(command, ExtUI::axis_t::X); break; - default: DEBUG_ECHOLNPAIR("UNKNOWN J COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN J COMMAND ", command); } } @@ -336,7 +336,7 @@ void process_lcd_s_command(const char *command) { #endif } break; - default: DEBUG_ECHOLNPAIR("UNKNOWN S COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN S COMMAND ", command); } } @@ -360,11 +360,11 @@ void process_lcd_command(const char *command) { case 'C': process_lcd_c_command(current); break; case 'B': case 'E': process_lcd_eb_command(current); break; - default: DEBUG_ECHOLNPAIR("UNKNOWN COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN COMMAND ", command); } } else - DEBUG_ECHOLNPAIR("UNKNOWN COMMAND FORMAT ", command); + DEBUG_ECHOLNPGM("UNKNOWN COMMAND FORMAT ", command); } // diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp index 8a237999886d..cae534de3b8e 100644 --- a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -106,7 +106,7 @@ namespace ExtUI { void onPidTuning(const result_t rst) { // Called for temperature PID tuning result - //SERIAL_ECHOLNPAIR("OnPidTuning:", rst); + //SERIAL_ECHOLNPGM("OnPidTuning:", rst); switch (rst) { case PID_STARTED: set_lcd_error_P(GET_TEXT(MSG_PID_AUTOTUNE)); diff --git a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp index 0a5f5cd550a7..624626a32299 100644 --- a/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp @@ -233,7 +233,7 @@ uint32_t lv_get_pic_addr(uint8_t *Pname) { currentFlashPage = 0; #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Getting picture SPI Flash Address: ", (const char*)Pname); + SERIAL_ECHOLNPGM("Getting picture SPI Flash Address: ", (const char*)Pname); #endif W25QXX.init(SPI_QUARTER_SPEED); @@ -408,7 +408,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { createFilename(dosFilename, entry); if (!file.open(&dir, dosFilename, O_READ)) { #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Error opening Asset: ", fn); + SERIAL_ECHOLNPGM("Error opening Asset: ", fn); #endif return; } @@ -463,7 +463,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { } while (pbr >= BMP_WRITE_BUF_LEN); #endif #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Space used: ", fn, " - ", (SPIFlash.getCurrentPage() + 1) * SPI_FLASH_PageSize / 1024, "KB"); + SERIAL_ECHOLNPGM("Space used: ", fn, " - ", (SPIFlash.getCurrentPage() + 1) * SPI_FLASH_PageSize / 1024, "KB"); totalCompressed += (SPIFlash.getCurrentPage() + 1) * SPI_FLASH_PageSize; #endif SPIFlash.endWrite(); @@ -481,7 +481,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { file.close(); #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Asset added: ", fn); + SERIAL_ECHOLNPGM("Asset added: ", fn); #endif } @@ -537,8 +537,8 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { #if ENABLED(MARLIN_DEV_MODE) uint8_t pic_counter = 0; W25QXX.SPI_FLASH_BufferRead(&pic_counter, PIC_COUNTER_ADDR, 1); - SERIAL_ECHOLNPAIR("Total assets loaded: ", pic_counter); - SERIAL_ECHOLNPAIR("Total Uncompressed: ", totalSizes, ", Compressed: ", totalCompressed); + SERIAL_ECHOLNPGM("Total assets loaded: ", pic_counter); + SERIAL_ECHOLNPGM("Total Uncompressed: ", totalSizes, ", Compressed: ", totalCompressed); #endif } diff --git a/Marlin/src/lcd/extui/nextion/FileNavigator.cpp b/Marlin/src/lcd/extui/nextion/FileNavigator.cpp index 650bbd6645d6..07f1256deda4 100644 --- a/Marlin/src/lcd/extui/nextion/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/nextion/FileNavigator.cpp @@ -79,7 +79,7 @@ void FileNavigator::getFiles(uint16_t index) { lastindex = index; #if NEXDEBUG(AC_FILE) - DEBUG_ECHOLNPAIR("index=", index, " currentindex=", currentindex); + DEBUG_ECHOLNPGM("index=", index, " currentindex=", currentindex); #endif if (currentindex == 0 && folderdepth > 0) { // Add a link to go up a folder @@ -127,7 +127,7 @@ void FileNavigator::getFiles(uint16_t index) { fcnt++; fseek = seek; #if NEXDEBUG(AC_FILE) - DEBUG_ECHOLNPAIR("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'\n"); + DEBUG_ECHOLNPGM("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'\n"); #endif } } @@ -137,7 +137,7 @@ void FileNavigator::getFiles(uint16_t index) { void FileNavigator::changeDIR(char *folder) { #if NEXDEBUG(AC_FILE) - DEBUG_ECHOLNPAIR("currentfolder: ", currentfoldername, " New: ", folder); + DEBUG_ECHOLNPGM("currentfolder: ", currentfoldername, " New: ", folder); #endif if (folderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth strcat(currentfoldername, folder); @@ -165,7 +165,7 @@ void FileNavigator::upDIR() { pos[1] = '\0'; } #if NEXDEBUG(AC_FILE) - DEBUG_ECHOLNPAIR("depth: ", folderdepth, " currentfoldername: ", currentfoldername); + DEBUG_ECHOLNPGM("depth: ", folderdepth, " currentfoldername: ", currentfoldername); #endif } diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index 903544268167..50423db4fd11 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -72,7 +72,7 @@ void NextionTFT::Startup() { SEND_VALasTXT("tmppage.bedy", Y_BED_SIZE); SEND_VALasTXT("tmppage.bedz", Z_MAX_POS); - DEBUG_ECHOLNPAIR("Nextion Debug Level ", NEXDEBUGLEVEL); + DEBUG_ECHOLNPGM("Nextion Debug Level ", NEXDEBUGLEVEL); } void NextionTFT::IdleLoop() { @@ -98,13 +98,13 @@ void NextionTFT::PrintFinished() { void NextionTFT::ConfirmationRequest(const char * const msg) { SEND_VALasTXT("tmppage.M117", msg); #if NEXDEBUG(N_MARLIN) - DEBUG_ECHOLNPAIR("ConfirmationRequest() ", msg, " printer_state:", printer_state); + DEBUG_ECHOLNPGM("ConfirmationRequest() ", msg, " printer_state:", printer_state); #endif } void NextionTFT::StatusChange(const char * const msg) { #if NEXDEBUG(N_MARLIN) - DEBUG_ECHOLNPAIR("StatusChange() ", msg, "\nprinter_state:", printer_state); + DEBUG_ECHOLNPGM("StatusChange() ", msg, "\nprinter_state:", printer_state); #endif SEND_VALasTXT("tmppage.M117", msg); } @@ -133,12 +133,12 @@ bool NextionTFT::ReadTFTCommand() { if (nextion_command[0] == 'G' || nextion_command[0] == 'M' || nextion_command[0] == 'T') injectCommands(nextion_command); #if NEXDEBUG(N_ALL) - DEBUG_ECHOLNPAIR("< ", nextion_command); + DEBUG_ECHOLNPGM("< ", nextion_command); #endif #if NEXDEBUG(N_SOME) uint8_t req = atoi(&nextion_command[1]); if (req > 7 && req != 20) - DEBUG_ECHOLNPAIR( "> ", AS_CHAR(nextion_command[0]), + DEBUG_ECHOLNPGM( "> ", AS_CHAR(nextion_command[0]), "\n> ", AS_CHAR(nextion_command[1]), "\n> ", AS_CHAR(nextion_command[2]), "\n> ", AS_CHAR(nextion_command[3]), @@ -151,7 +151,7 @@ bool NextionTFT::ReadTFTCommand() { void NextionTFT::SendFileList(int8_t startindex) { // respond to panel request for 7 files starting at index #if NEXDEBUG(N_INFO) - DEBUG_ECHOLNPAIR("## SendFileList ## ", startindex); + DEBUG_ECHOLNPGM("## SendFileList ## ", startindex); #endif filenavigator.getFiles(startindex); } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 8c59500574ed..67ad99ba2b13 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -778,7 +778,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder ); - //SERIAL_ECHOLNPAIR("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s); + //SERIAL_ECHOLNPGM("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s); axis = NO_AXIS_ENUM; @@ -795,7 +795,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; TERN_(MULTI_E_MANUAL, if (move_axis == E_AXIS) e_index = eindex); start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves axis = move_axis; - //SERIAL_ECHOLNPAIR("Post Move with Axis ", AS_CHAR(axis_codes[axis]), " soon."); + //SERIAL_ECHOLNPGM("Post Move with Axis ", AS_CHAR(axis_codes[axis]), " soon."); } #if ENABLED(AUTO_BED_LEVELING_UBL) @@ -981,10 +981,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; //#define ENCODER_RATE_MULTIPLIER_DEBUG #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Enc Step Rate: ", encoderStepRate); - SERIAL_ECHOPAIR(" Multiplier: ", encoderMultiplier); - SERIAL_ECHOPAIR(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); - SERIAL_ECHOPAIR(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); + SERIAL_ECHOPGM("Enc Step Rate: ", encoderStepRate); + SERIAL_ECHOPGM(" Multiplier: ", encoderMultiplier); + SERIAL_ECHOPGM(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); + SERIAL_ECHOPGM(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); SERIAL_EOL(); #endif } diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 7ea355b795b8..2c33e890bfc5 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -217,7 +217,7 @@ void menu_advanced_settings(); #if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU) void bltouch_report() { - SERIAL_ECHOLNPAIR("EEPROM Last BLTouch Mode - ", bltouch.last_written_mode); + SERIAL_ECHOLNPGM("EEPROM Last BLTouch Mode - ", bltouch.last_written_mode); SERIAL_ECHOLNPGM("Configuration BLTouch Mode - " TERN(BLTOUCH_SET_5V_MODE, "5V", "OD")); char mess[21]; strcpy_P(mess, PSTR("BLTouch Mode - ")); diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index c3090bcc5b5d..9bc799129ecf 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -56,12 +56,12 @@ static bool probe_single_point() { if (reference_index < 0) reference_index = tram_index; move_to_tramming_wait_pos(); - DEBUG_ECHOLNPAIR("probe_single_point(", tram_index, ") = ", z_probed_height, "mm"); + DEBUG_ECHOLNPGM("probe_single_point(", tram_index, ") = ", z_probed_height, "mm"); return (z_isvalid[tram_index] = !isnan(z_probed_height)); } static void _menu_single_probe() { - DEBUG_ECHOLNPAIR("Screen: single probe screen Arg:", tram_index); + DEBUG_ECHOLNPGM("Screen: single probe screen Arg:", tram_index); START_MENU(); STATIC_ITEM(MSG_BED_TRAMMING, SS_LEFT); STATIC_ITEM(MSG_LAST_VALUE_SP, SS_LEFT, z_isvalid[tram_index] ? ftostr42_52(z_measured[reference_index] - z_measured[tram_index]) : "---"); @@ -87,7 +87,7 @@ static void tramming_wizard_menu() { // Init the wizard and enter the submenu void goto_tramming_wizard() { - DEBUG_ECHOLNPAIR("Screen: goto_tramming_wizard", 1); + DEBUG_ECHOLNPGM("Screen: goto_tramming_wizard", 1); ui.defer_status_screen(); // Initialize measured point flags diff --git a/Marlin/src/lcd/tft/tft_string.cpp b/Marlin/src/lcd/tft/tft_string.cpp index c2a571e826ff..6f2d8690b298 100644 --- a/Marlin/src/lcd/tft/tft_string.cpp +++ b/Marlin/src/lcd/tft/tft_string.cpp @@ -45,21 +45,21 @@ void TFT_String::set_font(const uint8_t *font) { for (glyph = 0; glyph < 256; glyph++) glyphs[glyph] = nullptr; - DEBUG_ECHOLNPAIR("Format: ", font_header->Format); - DEBUG_ECHOLNPAIR("BBXWidth: ", font_header->BBXWidth); - DEBUG_ECHOLNPAIR("BBXHeight: ", font_header->BBXHeight); - DEBUG_ECHOLNPAIR("BBXOffsetX: ", font_header->BBXOffsetX); - DEBUG_ECHOLNPAIR("BBXOffsetY: ", font_header->BBXOffsetY); - DEBUG_ECHOLNPAIR("CapitalAHeight: ", font_header->CapitalAHeight); - DEBUG_ECHOLNPAIR("Encoding65Pos: ", font_header->Encoding65Pos); - DEBUG_ECHOLNPAIR("Encoding97Pos: ", font_header->Encoding97Pos); - DEBUG_ECHOLNPAIR("FontStartEncoding: ", font_header->FontStartEncoding); - DEBUG_ECHOLNPAIR("FontEndEncoding: ", font_header->FontEndEncoding); - DEBUG_ECHOLNPAIR("LowerGDescent: ", font_header->LowerGDescent); - DEBUG_ECHOLNPAIR("FontAscent: ", font_header->FontAscent); - DEBUG_ECHOLNPAIR("FontDescent: ", font_header->FontDescent); - DEBUG_ECHOLNPAIR("FontXAscent: ", font_header->FontXAscent); - DEBUG_ECHOLNPAIR("FontXDescent: ", font_header->FontXDescent); + DEBUG_ECHOLNPGM("Format: ", font_header->Format); + DEBUG_ECHOLNPGM("BBXWidth: ", font_header->BBXWidth); + DEBUG_ECHOLNPGM("BBXHeight: ", font_header->BBXHeight); + DEBUG_ECHOLNPGM("BBXOffsetX: ", font_header->BBXOffsetX); + DEBUG_ECHOLNPGM("BBXOffsetY: ", font_header->BBXOffsetY); + DEBUG_ECHOLNPGM("CapitalAHeight: ", font_header->CapitalAHeight); + DEBUG_ECHOLNPGM("Encoding65Pos: ", font_header->Encoding65Pos); + DEBUG_ECHOLNPGM("Encoding97Pos: ", font_header->Encoding97Pos); + DEBUG_ECHOLNPGM("FontStartEncoding: ", font_header->FontStartEncoding); + DEBUG_ECHOLNPGM("FontEndEncoding: ", font_header->FontEndEncoding); + DEBUG_ECHOLNPGM("LowerGDescent: ", font_header->LowerGDescent); + DEBUG_ECHOLNPGM("FontAscent: ", font_header->FontAscent); + DEBUG_ECHOLNPGM("FontDescent: ", font_header->FontDescent); + DEBUG_ECHOLNPGM("FontXAscent: ", font_header->FontXAscent); + DEBUG_ECHOLNPGM("FontXDescent: ", font_header->FontXDescent); add_glyphs(font); } diff --git a/Marlin/src/lcd/tft_io/touch_calibration.cpp b/Marlin/src/lcd/tft_io/touch_calibration.cpp index 2a54d2af4005..1c3b8b35fc86 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.cpp +++ b/Marlin/src/lcd/tft_io/touch_calibration.cpp @@ -77,10 +77,10 @@ void TouchCalibration::validate_calibration() { if (calibration_state == CALIBRATION_SUCCESS) { SERIAL_ECHOLNPGM("Touch screen calibration completed"); - SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_X ", calibration.x); - SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_Y ", calibration.y); - SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x); - SERIAL_ECHOLNPAIR("TOUCH_OFFSET_Y ", calibration.offset_y); + SERIAL_ECHOLNPGM("TOUCH_CALIBRATION_X ", calibration.x); + SERIAL_ECHOLNPGM("TOUCH_CALIBRATION_Y ", calibration.y); + SERIAL_ECHOLNPGM("TOUCH_OFFSET_X ", calibration.offset_x); + SERIAL_ECHOLNPGM("TOUCH_OFFSET_Y ", calibration.offset_y); SERIAL_ECHO_TERNARY(calibration.orientation == TOUCH_LANDSCAPE, "TOUCH_ORIENTATION ", "TOUCH_LANDSCAPE", "TOUCH_PORTRAIT", "\n"); TERN_(TOUCH_CALIBRATION_AUTO_SAVE, settings.save()); } @@ -95,7 +95,7 @@ bool TouchCalibration::handleTouch(uint16_t x, uint16_t y) { if (calibration_state < CALIBRATION_SUCCESS) { calibration_points[calibration_state].raw_x = x; calibration_points[calibration_state].raw_y = y; - DEBUG_ECHOLNPAIR("TouchCalibration - State: ", calibration_state, ", x: ", calibration_points[calibration_state].x, ", raw_x: ", x, ", y: ", calibration_points[calibration_state].y, ", raw_y: ", y); + DEBUG_ECHOLNPGM("TouchCalibration - State: ", calibration_state, ", x: ", calibration_points[calibration_state].x, ", raw_x: ", x, ", y: ", calibration_points[calibration_state].y, ", raw_y: ", y); } switch (calibration_state) { diff --git a/Marlin/src/libs/L64XX/L64XX_Marlin.cpp b/Marlin/src/libs/L64XX/L64XX_Marlin.cpp index 876405a40c5f..6f80652ce5b4 100644 --- a/Marlin/src/libs/L64XX/L64XX_Marlin.cpp +++ b/Marlin/src/libs/L64XX/L64XX_Marlin.cpp @@ -388,10 +388,10 @@ void L64XX_Marlin::set_param(const L64XX_axis_t axis, const uint8_t param, const inline void echo_min_max(const char a, const_float_t min, const_float_t max) { DEBUG_CHAR(' '); DEBUG_CHAR(a); - DEBUG_ECHOLNPAIR(" min = ", min, " max = ", max); + DEBUG_ECHOLNPGM(" min = ", min, " max = ", max); } inline void echo_oct_used(const_float_t oct, const uint8_t stall) { - DEBUG_ECHOPAIR("over_current_threshold used : ", oct); + DEBUG_ECHOPGM("over_current_threshold used : ", oct); DEBUG_ECHOPGM_P(stall ? PSTR(" (Stall") : PSTR(" (OCD")); DEBUG_ECHOLNPGM(" threshold)"); } @@ -568,7 +568,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in } DEBUG_ECHOPGM("Monitoring:"); - for (j = 0; j < driver_count; j++) DEBUG_ECHOPAIR(" ", axis_mon[j]); + for (j = 0; j < driver_count; j++) DEBUG_ECHOPGM(" ", axis_mon[j]); DEBUG_EOL(); // now have a list of driver(s) to monitor @@ -589,19 +589,19 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in } // only print the tval from one of the drivers kval_hold = get_param(axis_index[0], L6474_TVAL); - DEBUG_ECHOLNPAIR("TVAL current (mA) = ", (kval_hold + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); + DEBUG_ECHOLNPGM("TVAL current (mA) = ", (kval_hold + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); } else { kval_hold = parser.byteval('K'); if (kval_hold) { - DEBUG_ECHOLNPAIR("kval_hold = ", kval_hold); + DEBUG_ECHOLNPGM("kval_hold = ", kval_hold); for (j = 0; j < driver_count; j++) set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold); } else { // only print the KVAL_HOLD from one of the drivers kval_hold = get_param(axis_index[0], L6470_KVAL_HOLD); - DEBUG_ECHOLNPAIR("KVAL_HOLD = ", kval_hold); + DEBUG_ECHOLNPGM("KVAL_HOLD = ", kval_hold); } } @@ -629,7 +629,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in OCD_TH_actual = (OCD_TH_val_local + 1) * 375; } - DEBUG_ECHOLNPAIR("over_current_threshold specified: ", over_current_threshold); + DEBUG_ECHOLNPGM("over_current_threshold specified: ", over_current_threshold); if (!(sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT)) echo_oct_used((STALL_TH_val_local + 1) * 31.25, true); echo_oct_used((OCD_TH_val_local + 1) * 375, false); diff --git a/Marlin/src/libs/MAX31865.cpp b/Marlin/src/libs/MAX31865.cpp index 1264c6fbe88e..df0702b9fb58 100644 --- a/Marlin/src/libs/MAX31865.cpp +++ b/Marlin/src/libs/MAX31865.cpp @@ -177,14 +177,14 @@ void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { #ifdef MAX31865_DEBUG_SPI #ifndef LARGE_PINMAP - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "Regular begin call with _cs: ", _cs, " _miso: ", _miso, " _sclk: ", _sclk, " _mosi: ", _mosi ); #else - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "LARGE_PINMAP begin call with _cs: ", _cs, " _miso: ", _miso, " _sclk: ", _sclk, @@ -192,7 +192,7 @@ void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { ); #endif // LARGE_PINMAP - SERIAL_ECHOLNPAIR("config: ", readRegister8(MAX31856_CONFIG_REG)); + SERIAL_ECHOLNPGM("config: ", readRegister8(MAX31856_CONFIG_REG)); SERIAL_EOL(); #endif // MAX31865_DEBUG_SPI } @@ -290,7 +290,7 @@ uint16_t MAX31865::readRaw() { uint16_t rtd = readRegister16(MAX31856_RTDMSB_REG); #ifdef MAX31865_DEBUG - SERIAL_ECHOLNPAIR("RTD MSB:", (rtd >> 8), " RTD LSB:", (rtd & 0x00FF)); + SERIAL_ECHOLNPGM("RTD MSB:", (rtd >> 8), " RTD LSB:", (rtd & 0x00FF)); #endif // Disable the bias to lower power dissipation between reads. @@ -437,7 +437,7 @@ void MAX31865::readRegisterN(uint8_t addr, uint8_t buffer[], uint8_t n) { while (n--) { buffer[0] = spixfer(0xFF); #ifdef MAX31865_DEBUG_SPI - SERIAL_ECHOLNPAIR("buffer read ", n, " data: ", buffer[0]); + SERIAL_ECHOLNPGM("buffer read ", n, " data: ", buffer[0]); #endif buffer++; } diff --git a/Marlin/src/libs/bresenham.h b/Marlin/src/libs/bresenham.h index 6e4162fd1364..865c43c29e0b 100644 --- a/Marlin/src/libs/bresenham.h +++ b/Marlin/src/libs/bresenham.h @@ -120,11 +120,11 @@ class Bresenham { static void report(const uint8_t index) { if (index < Cfg::SIZE) { - SERIAL_ECHOPAIR("bresenham ", index, " : (", dividend[index], "/", divisor, ") "); + SERIAL_ECHOPGM("bresenham ", index, " : (", dividend[index], "/", divisor, ") "); if (counter[index] >= 0) SERIAL_CHAR(' '); if (labs(counter[index]) < 100) { SERIAL_CHAR(' '); if (labs(counter[index]) < 10) SERIAL_CHAR(' '); } SERIAL_ECHO(counter[index]); - SERIAL_ECHOLNPAIR(" ... ", value[index]); + SERIAL_ECHOLNPGM(" ... ", value[index]); } } diff --git a/Marlin/src/module/delta.cpp b/Marlin/src/module/delta.cpp index 992c3a09b469..899848d7f299 100644 --- a/Marlin/src/module/delta.cpp +++ b/Marlin/src/module/delta.cpp @@ -121,8 +121,8 @@ void recalc_delta_settings() { */ #define DELTA_DEBUG(VAR) do { \ - SERIAL_ECHOLNPAIR_P(PSTR("Cartesian X"), VAR.x, SP_Y_STR, VAR.y, SP_Z_STR, VAR.z); \ - SERIAL_ECHOLNPAIR_P(PSTR("Delta A"), delta.a, SP_B_STR, delta.b, SP_C_STR, delta.c); \ + SERIAL_ECHOLNPGM_P(PSTR("Cartesian X"), VAR.x, SP_Y_STR, VAR.y, SP_Z_STR, VAR.z); \ + SERIAL_ECHOLNPGM_P(PSTR("Delta A"), delta.a, SP_B_STR, delta.b, SP_C_STR, delta.c); \ }while(0) void inverse_kinematics(const xyz_pos_t &raw) { diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index 8ca19e436128..b5315f2f0140 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -429,7 +429,7 @@ void Endstops::event_handler() { #endif #define _ENDSTOP_HIT_ECHO(A,C) do{ \ - SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); _SET_STOP_CHAR(A,C); }while(0) + SERIAL_ECHOPGM(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); _SET_STOP_CHAR(A,C); }while(0) #define _ENDSTOP_HIT_TEST(A,C) \ if (TERN0(HAS_##A##_MIN, TEST(hit_state, A##_MIN)) || TERN0(HAS_##A##_MAX, TEST(hit_state, A##_MAX))) \ @@ -1271,7 +1271,7 @@ void Endstops::update() { #endif uint16_t endstop_change = live_state_local ^ old_live_state_local; - #define ES_REPORT_CHANGE(S) if (TEST(endstop_change, S)) SERIAL_ECHOPAIR(" " STRINGIFY(S) ":", TEST(live_state_local, S)) + #define ES_REPORT_CHANGE(S) if (TEST(endstop_change, S)) SERIAL_ECHOPGM(" " STRINGIFY(S) ":", TEST(live_state_local, S)) if (endstop_change) { #if HAS_X_MIN diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index eb6dc6597ce4..cdd425c47256 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -195,7 +195,7 @@ inline void report_more_positions() { // Report the logical position for a given machine position inline void report_logical_position(const xyze_pos_t &rpos) { const xyze_pos_t lpos = rpos.asLogical(); - SERIAL_ECHOPAIR_P( + SERIAL_ECHOPGM_P( LIST_N(DOUBLE(LINEAR_AXES), X_LBL, lpos.x, SP_Y_LBL, lpos.y, @@ -257,7 +257,7 @@ void report_current_position_projected() { /** * Output the current grbl compatible state to serial while moving */ - void report_current_grblstate_moving() { SERIAL_ECHOLNPAIR("S_XYZ:", int(M_State_grbl)); } + void report_current_grblstate_moving() { SERIAL_ECHOLNPGM("S_XYZ:", int(M_State_grbl)); } /** * Output the current position (processed) to serial while moving @@ -266,7 +266,7 @@ void report_current_position_projected() { get_cartesian_from_steppers(); const xyz_pos_t lpos = cartes.asLogical(); - SERIAL_ECHOPAIR( + SERIAL_ECHOPGM( "X:", lpos.x #if HAS_Y_AXIS , " Y:", lpos.y @@ -774,7 +774,7 @@ void restore_feedrate_and_scaling() { #endif if (DEBUGGING(LEVELING)) - SERIAL_ECHOLNPAIR("Axis ", AS_CHAR(AXIS_CHAR(axis)), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]); + SERIAL_ECHOLNPGM("Axis ", AS_CHAR(AXIS_CHAR(axis)), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]); } /** @@ -969,10 +969,10 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { #endif /* - SERIAL_ECHOPAIR("mm=", cartesian_mm); - SERIAL_ECHOPAIR(" seconds=", seconds); - SERIAL_ECHOPAIR(" segments=", segments); - SERIAL_ECHOPAIR(" segment_mm=", cartesian_segment_mm); + SERIAL_ECHOPGM("mm=", cartesian_mm); + SERIAL_ECHOPGM(" seconds=", seconds); + SERIAL_ECHOPGM(" segments=", segments); + SERIAL_ECHOPGM(" segment_mm=", cartesian_segment_mm); SERIAL_EOL(); //*/ @@ -1035,9 +1035,9 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { const float inv_duration = scaled_fr_mm_s / cartesian_segment_mm; #endif - // SERIAL_ECHOPAIR("mm=", cartesian_mm); - // SERIAL_ECHOLNPAIR(" segments=", segments); - // SERIAL_ECHOLNPAIR(" segment_mm=", cartesian_segment_mm); + //SERIAL_ECHOPGM("mm=", cartesian_mm); + //SERIAL_ECHOLNPGM(" segments=", segments); + //SERIAL_ECHOLNPGM(" segment_mm=", cartesian_segment_mm); // Get the raw current position as starting point xyze_pos_t raw = current_position; @@ -1204,7 +1204,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { new_pos.x += duplicate_extruder_x_offset; // Move duplicate extruder into the correct position - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x); if (!planner.buffer_line(new_pos, planner.settings.max_feedrate_mm_s[X_AXIS], 1)) break; planner.synchronize(); @@ -1515,11 +1515,11 @@ void prepare_line_to_destination() { const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis); if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPAIR("...(", AS_CHAR(AXIS_CHAR(axis)), ", ", distance, ", "); + DEBUG_ECHOPGM("...(", AS_CHAR(AXIS_CHAR(axis)), ", ", distance, ", "); if (fr_mm_s) DEBUG_ECHO(fr_mm_s); else - DEBUG_ECHOPAIR("[", home_fr_mm_s, "]"); + DEBUG_ECHOPGM("[", home_fr_mm_s, "]"); DEBUG_ECHOLNPGM(")"); } @@ -1595,12 +1595,12 @@ void prepare_line_to_destination() { * "trusted" position). */ void set_axis_never_homed(const AxisEnum axis) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); set_axis_untrusted(axis); set_axis_unhomed(axis); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); TERN_(I2C_POSITION_ENCODERS, I2CPEM.unhomed(axis)); } @@ -1683,7 +1683,7 @@ void prepare_line_to_destination() { // Check if home distance within endstop assumed repeatability noise of .05mm and warn. if (ABS(phaseDelta) * planner.steps_to_mm[axis] / phasePerUStep < 0.05f) - SERIAL_ECHOLNPAIR("Selected home phase ", home_phase[axis], + SERIAL_ECHOLNPGM("Selected home phase ", home_phase[axis], " too close to endstop trigger phase ", phaseCurrent, ". Pick a different phase for ", AS_CHAR(AXIS_CHAR(axis))); @@ -1695,7 +1695,7 @@ void prepare_line_to_destination() { // Optional debug messages if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR( + DEBUG_ECHOLNPGM( "Endstop ", AS_CHAR(AXIS_CHAR(axis)), " hit at Phase:", phaseCurrent, " Delta:", phaseDelta, " Distance:", mmDelta ); @@ -1741,7 +1741,7 @@ void prepare_line_to_destination() { ) return; #endif - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); const int axis_home_dir = TERN0(DUAL_X_CARRIAGE, axis == X_AXIS) ? TOOL_X_HOME_DIR(active_extruder) : home_dir(axis); @@ -1780,7 +1780,7 @@ void prepare_line_to_destination() { const xyz_float_t backoff = SENSORLESS_BACKOFF_MM; if ((TERN0(X_SENSORLESS, axis == X_AXIS) || TERN0(Y_SENSORLESS, axis == Y_AXIS) || TERN0(Z_SENSORLESS, axis == Z_AXIS) || TERN0(I_SENSORLESS, axis == I_AXIS) || TERN0(J_SENSORLESS, axis == J_AXIS) || TERN0(K_SENSORLESS, axis == K_AXIS)) && backoff[axis]) { const float backoff_length = -ABS(backoff[axis]) * axis_home_dir; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Sensorless backoff: ", backoff_length, "mm"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Sensorless backoff: ", backoff_length, "mm"); do_homing_move(axis, backoff_length, homing_feedrate(axis)); } #endif @@ -1796,7 +1796,7 @@ void prepare_line_to_destination() { // Fast move towards endstop until triggered // const float move_length = 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Home Fast: ", move_length, "mm"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home Fast: ", move_length, "mm"); do_homing_move(axis, move_length, 0.0, !use_probe_bump); #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE) @@ -1806,7 +1806,7 @@ void prepare_line_to_destination() { // If a second homing move is configured... if (bump) { // Move away from the endstop by the axis HOMING_BUMP_MM - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Move Away: ", -bump, "mm"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Move Away: ", -bump, "mm"); do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false); #if ENABLED(DETECT_BROKEN_ENDSTOP) @@ -1839,7 +1839,7 @@ void prepare_line_to_destination() { // Slow move towards endstop until triggered const float rebump = bump * 2; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Re-bump: ", rebump, "mm"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Re-bump: ", rebump, "mm"); do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true); #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) @@ -2003,7 +2003,7 @@ void prepare_line_to_destination() { // Retrace by the amount specified in delta_endstop_adj if more than min steps. if (adjDistance * (Z_HOME_DIR) < 0 && ABS(adjDistance) > minDistance) { // away from endstop, more than min distance - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("adjDistance:", adjDistance); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("adjDistance:", adjDistance); do_homing_move(axis, adjDistance, get_homing_bump_feedrate(axis)); } @@ -2050,7 +2050,7 @@ void prepare_line_to_destination() { if (axis == Z_AXIS) fwretract.current_hop = 0.0; #endif - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); } // homeaxis() @@ -2075,7 +2075,7 @@ void prepare_line_to_destination() { * Callers must sync the planner position after calling this! */ void set_axis_is_at_home(const AxisEnum axis) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); set_axis_trusted(axis); set_axis_homed(axis); @@ -2104,7 +2104,7 @@ void set_axis_is_at_home(const AxisEnum axis) { current_position.z -= probe.offset.z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe.offset.z = ", probe.offset.z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe.offset.z = ", probe.offset.z); #else @@ -2125,17 +2125,17 @@ void set_axis_is_at_home(const AxisEnum axis) { if (DEBUGGING(LEVELING)) { #if HAS_HOME_OFFSET - DEBUG_ECHOLNPAIR("> home_offset[", AS_CHAR(AXIS_CHAR(axis)), "] = ", home_offset[axis]); + DEBUG_ECHOLNPGM("> home_offset[", AS_CHAR(AXIS_CHAR(axis)), "] = ", home_offset[axis]); #endif DEBUG_POS("", current_position); - DEBUG_ECHOLNPAIR("<<< set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); + DEBUG_ECHOLNPGM("<<< set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); } } #if HAS_WORKSPACE_OFFSET void update_workspace_offset(const AxisEnum axis) { workspace_offset[axis] = home_offset[axis] + position_shift[axis]; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Axis ", AS_CHAR(AXIS_CHAR(axis)), " home_offset = ", home_offset[axis], " position_shift = ", position_shift[axis]); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Axis ", AS_CHAR(AXIS_CHAR(axis)), " home_offset = ", home_offset[axis], " position_shift = ", position_shift[axis]); } #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 04d32f9c1805..3e030c84d2b9 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1858,7 +1858,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, ); /* <-- add a slash to enable - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " _populate_block FR:", fr_mm_s, " A:", target.a, " (", da, " steps)" " B:", target.b, " (", db, " steps)" @@ -2331,10 +2331,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move, if (max_vfr > 0 && cs > max_vfr) { NOMORE(speed_factor, max_vfr / cs); // respect volumetric extruder limit (if any) /* <-- add a slash to enable - SERIAL_ECHOPAIR("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f))); - SERIAL_ECHOPAIR(" mm^3/s (", cs); - SERIAL_ECHOPAIR(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f))); - SERIAL_ECHOPAIR(" mm^3/s (", max_vfr); + SERIAL_ECHOPGM("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f))); + SERIAL_ECHOPGM(" mm^3/s (", cs); + SERIAL_ECHOPGM(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f))); + SERIAL_ECHOPGM(" mm^3/s (", max_vfr); SERIAL_ECHOLNPGM(" mm/s)"); //*/ } @@ -2921,44 +2921,44 @@ bool Planner::buffer_segment(const abce_pos_t &abce #endif /* <-- add a slash to enable - SERIAL_ECHOPAIR(" buffer_segment FR:", fr_mm_s); + SERIAL_ECHOPGM(" buffer_segment FR:", fr_mm_s); #if IS_KINEMATIC - SERIAL_ECHOPAIR(" A:", abce.a, " (", position.a, "->", target.a, ") B:", abce.b); + SERIAL_ECHOPGM(" A:", abce.a, " (", position.a, "->", target.a, ") B:", abce.b); #else - SERIAL_ECHOPAIR_P(SP_X_LBL, abce.a); - SERIAL_ECHOPAIR(" (", position.x, "->", target.x); + SERIAL_ECHOPGM_P(SP_X_LBL, abce.a); + SERIAL_ECHOPGM(" (", position.x, "->", target.x); SERIAL_CHAR(')'); - SERIAL_ECHOPAIR_P(SP_Y_LBL, abce.b); + SERIAL_ECHOPGM_P(SP_Y_LBL, abce.b); #endif - SERIAL_ECHOPAIR(" (", position.y, "->", target.y); + SERIAL_ECHOPGM(" (", position.y, "->", target.y); #if LINEAR_AXES >= ABC #if ENABLED(DELTA) - SERIAL_ECHOPAIR(") C:", abce.c); + SERIAL_ECHOPGM(") C:", abce.c); #else SERIAL_CHAR(')'); - SERIAL_ECHOPAIR_P(SP_Z_LBL, abce.c); + SERIAL_ECHOPGM_P(SP_Z_LBL, abce.c); #endif - SERIAL_ECHOPAIR(" (", position.z, "->", target.z); + SERIAL_ECHOPGM(" (", position.z, "->", target.z); SERIAL_CHAR(')'); #endif #if LINEAR_AXES >= 4 - SERIAL_ECHOPAIR_P(SP_I_LBL, abce.i); - SERIAL_ECHOPAIR(" (", position.i, "->", target.i); + SERIAL_ECHOPGM_P(SP_I_LBL, abce.i); + SERIAL_ECHOPGM(" (", position.i, "->", target.i); SERIAL_CHAR(')'); #endif #if LINEAR_AXES >= 5 - SERIAL_ECHOPAIR_P(SP_J_LBL, abce.j); - SERIAL_ECHOPAIR(" (", position.j, "->", target.j); + SERIAL_ECHOPGM_P(SP_J_LBL, abce.j); + SERIAL_ECHOPGM(" (", position.j, "->", target.j); SERIAL_CHAR(')'); #endif #if LINEAR_AXES >= 6 - SERIAL_ECHOPAIR_P(SP_K_LBL, abce.k); - SERIAL_ECHOPAIR(" (", position.k, "->", target.k); + SERIAL_ECHOPGM_P(SP_K_LBL, abce.k); + SERIAL_ECHOPGM(" (", position.k, "->", target.k); SERIAL_CHAR(')'); #endif #if HAS_EXTRUDERS - SERIAL_ECHOPAIR_P(SP_E_LBL, abce.e); - SERIAL_ECHOLNPAIR(" (", position.e, "->", target.e, ")"); + SERIAL_ECHOPGM_P(SP_E_LBL, abce.e); + SERIAL_ECHOLNPGM(" (", position.e, "->", target.e, ")"); #else SERIAL_EOL(); #endif @@ -3186,7 +3186,7 @@ inline void limit_and_warn(float &val, const uint8_t axis, PGM_P const setting_n SERIAL_CHAR(AXIS_CHAR(lim_axis)); SERIAL_ECHOPGM(" Max "); SERIAL_ECHOPGM_P(setting_name); - SERIAL_ECHOLNPAIR(" limited to ", val); + SERIAL_ECHOLNPGM(" limited to ", val); } } diff --git a/Marlin/src/module/printcounter.cpp b/Marlin/src/module/printcounter.cpp index 4c5f1fc782e0..27dee76715d4 100644 --- a/Marlin/src/module/printcounter.cpp +++ b/Marlin/src/module/printcounter.cpp @@ -179,7 +179,7 @@ void PrintCounter::saveStats() { inline void _service_when(char buffer[], const char * const msg, const uint32_t when) { SERIAL_ECHOPGM(STR_STATS); SERIAL_ECHOPGM_P(msg); - SERIAL_ECHOLNPAIR(" in ", duration_t(when).toString(buffer)); + SERIAL_ECHOLNPGM(" in ", duration_t(when).toString(buffer)); } #endif @@ -187,7 +187,7 @@ void PrintCounter::showStats() { char buffer[22]; SERIAL_ECHOPGM(STR_STATS); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "Prints: ", data.totalPrints, ", Finished: ", data.finishedPrints, ", Failed: ", data.totalPrints - data.finishedPrints @@ -197,21 +197,21 @@ void PrintCounter::showStats() { SERIAL_ECHOPGM(STR_STATS); duration_t elapsed = data.printTime; elapsed.toString(buffer); - SERIAL_ECHOPAIR("Total time: ", buffer); + SERIAL_ECHOPGM("Total time: ", buffer); #if ENABLED(DEBUG_PRINTCOUNTER) - SERIAL_ECHOPAIR(" (", data.printTime); + SERIAL_ECHOPGM(" (", data.printTime); SERIAL_CHAR(')'); #endif elapsed = data.longestPrint; elapsed.toString(buffer); - SERIAL_ECHOPAIR(", Longest job: ", buffer); + SERIAL_ECHOPGM(", Longest job: ", buffer); #if ENABLED(DEBUG_PRINTCOUNTER) - SERIAL_ECHOPAIR(" (", data.longestPrint); + SERIAL_ECHOPGM(" (", data.longestPrint); SERIAL_CHAR(')'); #endif - SERIAL_ECHOPAIR("\n" STR_STATS "Filament used: ", data.filamentUsed / 1000); + SERIAL_ECHOPGM("\n" STR_STATS "Filament used: ", data.filamentUsed / 1000); SERIAL_CHAR('m'); SERIAL_EOL(); diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index a4469bb209e1..16ff166493ed 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -111,7 +111,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() * If true, move to MAX_X and release the solenoid */ static void dock_sled(const bool stow) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("dock_sled(", stow, ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("dock_sled(", stow, ")"); // Dock sled a bit closer to ensure proper capturing do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0)); @@ -274,7 +274,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() * Raise Z to a minimum height to make room for a probe to move */ void Probe::do_z_raise(const float z_raise) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probe::do_z_raise(", z_raise, ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe::do_z_raise(", z_raise, ")"); float z_dest = z_raise; if (offset.z < 0) z_dest -= offset.z; do_z_clearance(z_dest); @@ -367,7 +367,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #if ENABLED(WAIT_FOR_NOZZLE_HEAT) const celsius_t hotendPreheat = hotend_temp > thermalManager.degTargetHotend(0) ? hotend_temp : 0; if (hotendPreheat) { - DEBUG_ECHOPAIR("hotend (", hotendPreheat, ")"); + DEBUG_ECHOPGM("hotend (", hotendPreheat, ")"); thermalManager.setTargetHotend(hotendPreheat, 0); } #elif ENABLED(WAIT_FOR_BED_HEAT) @@ -378,7 +378,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { const celsius_t bedPreheat = bed_temp > thermalManager.degTargetBed() ? bed_temp : 0; if (bedPreheat) { if (hotendPreheat) DEBUG_ECHOPGM(" and "); - DEBUG_ECHOPAIR("bed (", bedPreheat, ")"); + DEBUG_ECHOPGM("bed (", bedPreheat, ")"); thermalManager.setTargetBed(bedPreheat); } #endif @@ -400,7 +400,7 @@ bool Probe::set_deployed(const bool deploy) { if (DEBUGGING(LEVELING)) { DEBUG_POS("Probe::set_deployed", current_position); - DEBUG_ECHOLNPAIR("deploy: ", deploy); + DEBUG_ECHOLNPGM("deploy: ", deploy); } if (endstops.z_probe_enabled == deploy) return false; @@ -629,7 +629,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { const float first_probe_z = current_position.z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("1st Probe Z:", first_probe_z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", first_probe_z); // Raise to give the probe clearance do_blocking_move_to_z(current_position.z + Z_CLEARANCE_MULTI_PROBE, z_probe_fast_mm_s); @@ -723,7 +723,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { const float z2 = current_position.z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2); // Return a weighted average of the fast and slow probes const float measured_z = (z2 * 3.0 + first_probe_z * 2.0) * 0.2; @@ -751,7 +751,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai DEBUG_SECTION(log_probe, "Probe::probe_at_point", DEBUGGING(LEVELING)); if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR( + DEBUG_ECHOLNPGM( "...(", LOGICAL_X_POSITION(rx), ", ", LOGICAL_Y_POSITION(ry), ", ", raise_after == PROBE_PT_RAISE ? "raise" : raise_after == PROBE_PT_LAST_STOW ? "stow (last)" : raise_after == PROBE_PT_STOW ? "stow" : "none", ", ", verbose_level, @@ -788,7 +788,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai if (stow()) measured_z = NAN; // Error on stow? if (verbose_level > 2) - SERIAL_ECHOLNPAIR("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); + SERIAL_ECHOLNPGM("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); } if (isnan(measured_z)) { @@ -864,7 +864,7 @@ float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRai #endif #if ((ENABLED(DELTA) && (HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(Y))) || HAS_CURRENT_HOME(Z)) auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) { - if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); } + if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b); } }; #endif if (onoff) { diff --git a/Marlin/src/module/scara.cpp b/Marlin/src/module/scara.cpp index 07f714a997b9..2527292e160c 100644 --- a/Marlin/src/module/scara.cpp +++ b/Marlin/src/module/scara.cpp @@ -58,7 +58,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE cartes.y = a_sin + b_sin + scara_offset.y; // phi /* - DEBUG_ECHOLNPAIR( + DEBUG_ECHOLNPGM( "SCARA FK Angle a=", a, " b=", b, " a_sin=", a_sin, @@ -66,7 +66,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE " b_sin=", b_sin, " b_cos=", b_cos ); - DEBUG_ECHOLNPAIR(" cartes (X,Y) = "(cartes.x, ", ", cartes.y, ")"); + DEBUG_ECHOLNPGM(" cartes (X,Y) = "(cartes.x, ", ", cartes.y, ")"); //*/ } @@ -80,13 +80,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE else { // MORGAN_SCARA uses a Cartesian XY home position xyz_pos_t homeposition = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS }; - //DEBUG_ECHOLNPAIR_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y); + //DEBUG_ECHOLNPGM_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y); delta = homeposition; forward_kinematics(delta.a, delta.b); current_position[axis] = cartes[axis]; - //DEBUG_ECHOLNPAIR_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); + //DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); update_software_endstops(axis); } } @@ -132,7 +132,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE /* DEBUG_POS("SCARA IK", raw); DEBUG_POS("SCARA IK", delta); - DEBUG_ECHOLNPAIR(" SCARA (x,y) ", sx, ",", sy, " C2=", C2, " S2=", S2, " Theta=", THETA, " Psi=", PSI); + DEBUG_ECHOLNPGM(" SCARA (x,y) ", sx, ",", sy, " C2=", C2, " S2=", S2, " Theta=", THETA, " Psi=", PSI); //*/ } @@ -150,13 +150,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE #define SCARA_OFFSET_THETA2 131 // degrees #endif ab_float_t homeposition = { SCARA_OFFSET_THETA1, SCARA_OFFSET_THETA2 }; - //DEBUG_ECHOLNPAIR("homeposition A:", homeposition.a, " B:", homeposition.b); + //DEBUG_ECHOLNPGM("homeposition A:", homeposition.a, " B:", homeposition.b); inverse_kinematics(homeposition); forward_kinematics(delta.a, delta.b); current_position[axis] = cartes[axis]; - //DEBUG_ECHOLNPAIR_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); + //DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); update_software_endstops(axis); } } @@ -172,7 +172,7 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE /* DEBUG_POS("SCARA IK", raw); DEBUG_POS("SCARA IK", delta); - SERIAL_ECHOLNPAIR(" SCARA (x,y) ", x, ",", y," Theta1=", THETA1, " Theta2=", THETA2); + SERIAL_ECHOLNPGM(" SCARA (x,y) ", x, ",", y," Theta1=", THETA1, " Theta2=", THETA2); //*/ } @@ -185,13 +185,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE current_position.z = Z_HOME_POS; else { xyz_pos_t homeposition = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS }; - //DEBUG_ECHOLNPAIR_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y, SP_Z_LBL, homeposition.z); + //DEBUG_ECHOLNPGM_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y, SP_Z_LBL, homeposition.z); inverse_kinematics(homeposition); forward_kinematics(delta.a, delta.b, delta.c); current_position[axis] = cartes[axis]; - //DEBUG_ECHOLNPAIR_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); + //DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); update_software_endstops(axis); } } @@ -289,13 +289,13 @@ float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SE delta.set(DEGREES(THETA), DEGREES(PHI), DEGREES(PSI)); - //SERIAL_ECHOLNPAIR(" SCARA (x,y,z) ", spos.x , ",", spos.y, ",", spos.z, " Rho=", RHO, " Rho2=", RHO2, " Theta=", THETA, " Phi=", PHI, " Psi=", PSI, " Gamma=", GAMMA); + //SERIAL_ECHOLNPGM(" SCARA (x,y,z) ", spos.x , ",", spos.y, ",", spos.z, " Rho=", RHO, " Rho2=", RHO2, " Theta=", THETA, " Phi=", PHI, " Psi=", PSI, " Gamma=", GAMMA); } #endif void scara_report_positions() { - SERIAL_ECHOLNPAIR("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS) + SERIAL_ECHOLNPGM("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS) #if ENABLED(AXEL_TPARA) , " Phi:", planner.get_axis_position_degrees(B_AXIS) , " Psi:", planner.get_axis_position_degrees(C_AXIS) diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 017b96cc2043..8e4c758854d0 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -2353,7 +2353,7 @@ void MarlinSettings::postprocess() { else if (!validating) { DEBUG_ECHO_START(); DEBUG_ECHO(version); - DEBUG_ECHOLNPAIR(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET), " bytes; crc ", (uint32_t)working_crc, ")"); + DEBUG_ECHOLNPGM(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET), " bytes; crc ", (uint32_t)working_crc, ")"); } if (!validating && !eeprom_error) postprocess(); @@ -2380,7 +2380,7 @@ void MarlinSettings::postprocess() { if (ubl.storage_slot >= 0) { load_mesh(ubl.storage_slot); - DEBUG_ECHOLNPAIR("Mesh ", ubl.storage_slot, " loaded from storage."); + DEBUG_ECHOLNPGM("Mesh ", ubl.storage_slot, " loaded from storage."); } else { ubl.reset(); @@ -2436,7 +2436,7 @@ void MarlinSettings::postprocess() { #if ENABLED(AUTO_BED_LEVELING_UBL) inline void ubl_invalid_slot(const int s) { - DEBUG_ECHOLNPAIR("?Invalid slot.\n", s, " mesh slots available."); + DEBUG_ECHOLNPGM("?Invalid slot.\n", s, " mesh slots available."); UNUSED(s); } @@ -2467,7 +2467,7 @@ void MarlinSettings::postprocess() { const int16_t a = calc_num_meshes(); if (!WITHIN(slot, 0, a - 1)) { ubl_invalid_slot(a); - DEBUG_ECHOLNPAIR("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot); + DEBUG_ECHOLNPGM("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot); DEBUG_EOL(); return; } @@ -2489,7 +2489,7 @@ void MarlinSettings::postprocess() { persistentStore.access_finish(); if (status) SERIAL_ECHOLNPGM("?Unable to save mesh data."); - else DEBUG_ECHOLNPAIR("Mesh saved in slot ", slot); + else DEBUG_ECHOLNPGM("Mesh saved in slot ", slot); #else @@ -2533,7 +2533,7 @@ void MarlinSettings::postprocess() { #endif if (status) SERIAL_ECHOLNPGM("?Unable to load mesh data."); - else DEBUG_ECHOLNPAIR("Mesh loaded from slot ", slot); + else DEBUG_ECHOLNPGM("Mesh loaded from slot ", slot); EEPROM_FINISH(); @@ -3010,8 +3010,8 @@ void MarlinSettings::reset() { #if DISABLED(DISABLE_M503) #define CONFIG_ECHO_START() gcode.report_echo_start(forReplay) - #define CONFIG_ECHO_MSG(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0) - #define CONFIG_ECHO_MSG_P(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPAIR_P(V); }while(0) + #define CONFIG_ECHO_MSG(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0) + #define CONFIG_ECHO_MSG_P(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(V); }while(0) #define CONFIG_ECHO_HEADING(STR) gcode.report_heading(forReplay, PSTR(STR)) void M92_report(const bool echo=true, const int8_t e=-1); @@ -3027,7 +3027,7 @@ void MarlinSettings::reset() { // CONFIG_ECHO_HEADING("Linear Units"); #if ENABLED(INCH_MODE_SUPPORT) - SERIAL_ECHOPAIR(" G2", AS_DIGIT(parser.linear_unit_factor == 1.0), " ;"); + SERIAL_ECHOPGM(" G2", AS_DIGIT(parser.linear_unit_factor == 1.0), " ;"); #else SERIAL_ECHOPGM(" G21 ;"); #endif @@ -3096,7 +3096,7 @@ void MarlinSettings::reset() { LOOP_L_N(py, GRID_MAX_POINTS_Y) { LOOP_L_N(px, GRID_MAX_POINTS_X) { CONFIG_ECHO_START(); - SERIAL_ECHOPAIR(" G29 S3 I", px, " J", py); + SERIAL_ECHOPGM(" G29 S3 I", px, " J", py); SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(mbl.z_values[px][py]), 5); } } @@ -3121,7 +3121,7 @@ void MarlinSettings::reset() { LOOP_L_N(py, GRID_MAX_POINTS_Y) { LOOP_L_N(px, GRID_MAX_POINTS_X) { CONFIG_ECHO_START(); - SERIAL_ECHOPAIR(" G29 W I", px, " J", py); + SERIAL_ECHOPGM(" G29 W I", px, " J", py); SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(z_values[px][py]), 5); } } diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index f9245336f368..aea5f88c06a8 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2845,7 +2845,7 @@ int32_t Stepper::triggered_position(const AxisEnum axis) { #endif void Stepper::report_a_position(const xyz_long_t &pos) { - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( LIST_N(DOUBLE(LINEAR_AXES), TERN(SAYS_A, PSTR(STR_COUNT_A), PSTR(STR_COUNT_X)), pos.x, TERN(SAYS_B, PSTR("B:"), SP_Y_LBL), pos.y, @@ -3167,7 +3167,7 @@ void Stepper::report_positions() { #if HAS_MOTOR_CURRENT_SPI - //SERIAL_ECHOLNPAIR("Digipotss current ", current); + //SERIAL_ECHOLNPGM("Digipotss current ", current); const uint8_t digipot_ch[] = DIGIPOT_CHANNELS; set_digipot_value_spi(digipot_ch[driver], current); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 934f734e9cec..6be98e90d4e8 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -394,7 +394,7 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, void Temperature::report_fan_speed(const uint8_t fan) { if (fan >= FAN_COUNT) return; PORT_REDIRECT(SerialMask::All); - SERIAL_ECHOLNPAIR("M106 P", fan, " S", fan_speed[fan]); + SERIAL_ECHOLNPGM("M106 P", fan, " S", fan_speed[fan]); } #endif @@ -676,7 +676,7 @@ volatile bool Temperature::raw_temps_ready = false; LIMIT(bias, 20, max_pow - 20); d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias; - SERIAL_ECHOPAIR(STR_BIAS, bias, STR_D_COLON, d, STR_T_MIN, minT, STR_T_MAX, maxT); + SERIAL_ECHOPGM(STR_BIAS, bias, STR_D_COLON, d, STR_T_MIN, minT, STR_T_MAX, maxT); if (cycles > 2) { const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f), Tu = float(t_low + t_high) * 0.001f, @@ -687,12 +687,12 @@ volatile bool Temperature::raw_temps_ready = false; tune_pid.Ki = tune_pid.Kp * 2.0f / Tu; tune_pid.Kd = tune_pid.Kp * Tu * df; - SERIAL_ECHOLNPAIR(STR_KU, Ku, STR_TU, Tu); + SERIAL_ECHOLNPGM(STR_KU, Ku, STR_TU, Tu); if (ischamber || isbed) SERIAL_ECHOLNPGM(" No overshoot"); else SERIAL_ECHOLNPGM(STR_CLASSIC_PID); - SERIAL_ECHOLNPAIR(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd); + SERIAL_ECHOLNPGM(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd); } } SHV((bias + d) >> 1); @@ -756,13 +756,13 @@ volatile bool Temperature::raw_temps_ready = false; #if EITHER(PIDTEMPBED, PIDTEMPCHAMBER) PGM_P const estring = GHV(PSTR("chamber"), PSTR("bed"), NUL_STR); - say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp); - say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki); - say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd); + say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Kp ", tune_pid.Kp); + say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Ki ", tune_pid.Ki); + say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Kd ", tune_pid.Kd); #else - say_default_(); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp); - say_default_(); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki); - say_default_(); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd); + say_default_(); SERIAL_ECHOLNPGM("Kp ", tune_pid.Kp); + say_default_(); SERIAL_ECHOLNPGM("Ki ", tune_pid.Ki); + say_default_(); SERIAL_ECHOLNPGM("Kd ", tune_pid.Kd); #endif auto _set_hotend_pid = [](const uint8_t e, const PID_t &in_pid) { @@ -996,7 +996,7 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms OPTCODE(HAS_TEMP_BED, case H_BED: SERIAL_ECHOPGM(STR_HEATER_BED); break) default: if (real_heater_id >= 0) - SERIAL_ECHOLNPAIR("E", real_heater_id); + SERIAL_ECHOLNPGM("E", real_heater_id); } SERIAL_EOL(); } @@ -1728,7 +1728,7 @@ void Temperature::manage_heater() { void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) { gcode.report_heading_etc(forReplay, PSTR(STR_USER_THERMISTORS)); - SERIAL_ECHOPAIR(" M305 P", AS_DIGIT(t_index)); + SERIAL_ECHOPGM(" M305 P", AS_DIGIT(t_index)); const user_thermistor_t &t = user_thermistor[t_index]; @@ -2535,7 +2535,7 @@ void Temperature::init() { case H_CHAMBER: SERIAL_ECHOPGM("chamber"); break; default: SERIAL_ECHO(heater_id); } - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " ; sizeof(running_temp):", sizeof(running_temp), " ; State:", state, " ; Timer:", timer, " ; Temperature:", current, " ; Target Temp:", target #if HEATER_IDLE_HANDLER @@ -2813,7 +2813,7 @@ void Temperature::disable_all_heaters() { SERIAL_ERROR_START(); SERIAL_ECHOPGM("Temp measurement error! "); #if HAS_MAX31855 - SERIAL_ECHOPAIR("MAX31855 Fault: (", max_tc_temp & 0x7, ") >> "); + SERIAL_ECHOPGM("MAX31855 Fault: (", max_tc_temp & 0x7, ") >> "); if (max_tc_temp & 0x1) SERIAL_ECHOLNPGM("Open Circuit"); else if (max_tc_temp & 0x2) @@ -2825,7 +2825,7 @@ void Temperature::disable_all_heaters() { max865ref.clearFault(); if (fault_31865) { SERIAL_EOL(); - SERIAL_ECHOLNPAIR("\nMAX31865 Fault: (", fault_31865, ") >>"); + SERIAL_ECHOLNPGM("\nMAX31865 Fault: (", fault_31865, ") >>"); if (fault_31865 & MAX31865_FAULT_HIGHTHRESH) SERIAL_ECHOLNPGM("RTD High Threshold"); if (fault_31865 & MAX31865_FAULT_LOWTHRESH) @@ -3543,7 +3543,7 @@ void Temperature::isr() { SERIAL_PRINT(t, SFP); #if ENABLED(SHOW_TEMP_ADC_VALUES) // Temperature MAX SPI boards do not have an OVERSAMPLENR defined - SERIAL_ECHOPAIR(" (", TERN(HAS_MAXTC_LIBRARIES, k == 'T', false) ? r : r * RECIPROCAL(OVERSAMPLENR)); + SERIAL_ECHOPGM(" (", TERN(HAS_MAXTC_LIBRARIES, k == 'T', false) ? r : r * RECIPROCAL(OVERSAMPLENR)); SERIAL_CHAR(')'); #endif delay(2); @@ -3576,19 +3576,19 @@ void Temperature::isr() { #if HAS_MULTI_HOTEND HOTEND_LOOP() print_heater_state((heater_id_t)e, degHotend(e), degTargetHotend(e) OPTARG(SHOW_TEMP_ADC_VALUES, rawHotendTemp(e))); #endif - SERIAL_ECHOPAIR(" @:", getHeaterPower((heater_id_t)target_extruder)); + SERIAL_ECHOPGM(" @:", getHeaterPower((heater_id_t)target_extruder)); #if HAS_HEATED_BED - SERIAL_ECHOPAIR(" B@:", getHeaterPower(H_BED)); + SERIAL_ECHOPGM(" B@:", getHeaterPower(H_BED)); #endif #if HAS_HEATED_CHAMBER - SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_CHAMBER)); + SERIAL_ECHOPGM(" C@:", getHeaterPower(H_CHAMBER)); #endif #if HAS_COOLER - SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_COOLER)); + SERIAL_ECHOPGM(" C@:", getHeaterPower(H_COOLER)); #endif #if HAS_MULTI_HOTEND HOTEND_LOOP() { - SERIAL_ECHOPAIR(" @", e); + SERIAL_ECHOPGM(" @", e); SERIAL_CHAR(':'); SERIAL_ECHO(getHeaterPower((heater_id_t)e)); } @@ -3896,7 +3896,7 @@ void Temperature::isr() { const bool wants_to_cool = isProbeAboveTemp(target_temp), will_wait = !(wants_to_cool && no_wait_for_cooling); if (will_wait) - SERIAL_ECHOLNPAIR("Waiting for probe to ", (wants_to_cool ? PSTR("cool down") : PSTR("heat up")), " to ", target_temp, " degrees."); + SERIAL_ECHOLNPGM("Waiting for probe to ", (wants_to_cool ? PSTR("cool down") : PSTR("heat up")), " to ", target_temp, " degrees."); #if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE) KEEPALIVE_STATE(NOT_BUSY); diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 8fffb2e6406d..cb551647d7d3 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -189,7 +189,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation; - DEBUG_ECHOPAIR("(1) Move extruder ", new_tool); + DEBUG_ECHOPGM("(1) Move extruder ", new_tool); DEBUG_POS(" to new extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool); @@ -199,7 +199,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = grabpos + offsetcompensation; - DEBUG_ECHOPAIR("(2) Couple extruder ", new_tool); + DEBUG_ECHOPGM("(2) Couple extruder ", new_tool); DEBUG_POS(" to new extruder GrabPos", current_position); planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool); @@ -212,7 +212,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation; - DEBUG_ECHOPAIR("(3) Move extruder ", new_tool); + DEBUG_ECHOPGM("(3) Move extruder ", new_tool); DEBUG_POS(" back to new extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool); @@ -222,7 +222,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = mpe_settings.parking_xpos[active_extruder] + (active_extruder == 0 ? MPE_TRAVEL_DISTANCE : -MPE_TRAVEL_DISTANCE) + offsetcompensation; - DEBUG_ECHOPAIR("(4) Move extruder ", new_tool); + DEBUG_ECHOPGM("(4) Move extruder ", new_tool); DEBUG_POS(" close to old extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool); @@ -232,7 +232,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = mpe_settings.parking_xpos[active_extruder] + offsetcompensation; - DEBUG_ECHOPAIR("(5) Park extruder ", new_tool); + DEBUG_ECHOPGM("(5) Park extruder ", new_tool); DEBUG_POS(" at old extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool); @@ -242,7 +242,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = oldx; - DEBUG_ECHOPAIR("(6) Move extruder ", new_tool); + DEBUG_ECHOPGM("(6) Move extruder ", new_tool); DEBUG_POS(" to starting position", current_position); planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool); @@ -277,9 +277,9 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. if (homed_towards_final_tool) { pe_solenoid_magnet_off(1 - final_tool); - DEBUG_ECHOLNPAIR("Disengage magnet", 1 - final_tool); + DEBUG_ECHOLNPGM("Disengage magnet", 1 - final_tool); pe_solenoid_magnet_on(final_tool); - DEBUG_ECHOLNPAIR("Engage magnet", final_tool); + DEBUG_ECHOLNPGM("Engage magnet", final_tool); parking_extruder_set_parked(false); return false; } @@ -318,7 +318,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. if (!extruder_parked) { current_position.x = parkingposx[active_extruder] + x_offset; - DEBUG_ECHOLNPAIR("(1) Park extruder ", active_extruder); + DEBUG_ECHOLNPGM("(1) Park extruder ", active_extruder); DEBUG_POS("Moving ParkPos", current_position); fast_line_to_current(X_AXIS); @@ -521,7 +521,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = placexpos; - DEBUG_ECHOLNPAIR("(1) Place old tool ", active_extruder); + DEBUG_ECHOLNPGM("(1) Place old tool ", active_extruder); DEBUG_POS("Move X SwitchPos", current_position); fast_line_to_current(X_AXIS); @@ -627,7 +627,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR; - SERIAL_ECHOLNPAIR("(1) Place old tool ", active_extruder); + SERIAL_ECHOLNPGM("(1) Place old tool ", active_extruder); DEBUG_POS("Move Y SwitchPos + Security", current_position); fast_line_to_current(Y_AXIS); @@ -759,7 +759,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. // 2. Move to position near active extruder parking DEBUG_SYNCHRONIZE(); - DEBUG_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder); + DEBUG_ECHOLNPGM("(2) Move near active extruder parking", active_extruder); DEBUG_POS("Moving ParkPos", current_position); current_position.set(hoffs.x + placexpos, @@ -769,7 +769,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. // 3. Move gently to park position of active extruder DEBUG_SYNCHRONIZE(); - SERIAL_ECHOLNPAIR("(3) Move gently to park position of active extruder", active_extruder); + SERIAL_ECHOLNPGM("(3) Move gently to park position of active extruder", active_extruder); DEBUG_POS("Moving ParkPos", current_position); current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR; @@ -858,7 +858,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. && IsRunning() && !no_move // ...and movement is permitted && (delayed_move_time || current_position.x != xhome) // ...and delayed_move_time is set OR not "already parked"... ) { - DEBUG_ECHOLNPAIR("MoveX to ", xhome); + DEBUG_ECHOLNPGM("MoveX to ", xhome); current_position.x = xhome; line_to_current_position(planner.settings.max_feedrate_mm_s[X_AXIS]); // Park the current head planner.synchronize(); @@ -878,7 +878,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. current_position.x = inactive_extruder_x; // Save the inactive extruder's position (from the old current_position) inactive_extruder_x = destination.x; - DEBUG_ECHOLNPAIR("DXC Full Control curr.x=", current_position.x, " dest.x=", destination.x); + DEBUG_ECHOLNPGM("DXC Full Control curr.x=", current_position.x, " dest.x=", destination.x); break; case DXC_AUTO_PARK_MODE: idex_set_parked(); @@ -890,7 +890,7 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. // Ensure X axis DIR pertains to the correct carriage stepper.set_directions(); - DEBUG_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); + DEBUG_ECHOLNPGM("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); DEBUG_POS("New extruder (parked)", current_position); } @@ -1170,7 +1170,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { (void)check_tool_sensor_stats(active_extruder, true); // The newly-selected extruder XYZ is actually at... - DEBUG_ECHOLNPAIR("Offset Tool XYZ by { ", diff.x, ", ", diff.y, ", ", diff.z, " }"); + DEBUG_ECHOLNPGM("Offset Tool XYZ by { ", diff.x, ", ", diff.y, ", ", diff.z, " }"); current_position += diff; // Tell the planner the new "current position" diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 832cfa405fd5..9f8aac634b4a 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -379,7 +379,7 @@ void CardReader::ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames/*=fa // Go to the next segment while (path[++i]) { } - //SERIAL_ECHOLNPAIR("Looking for segment: ", segment); + //SERIAL_ECHOLNPGM("Looking for segment: ", segment); // Find the item, setting the long filename diveDir.rewind(); @@ -399,7 +399,7 @@ void CardReader::ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames/*=fa if (!dir.open(&diveDir, segment, O_READ)) { SERIAL_EOL(); SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(STR_SD_CANT_OPEN_SUBDIR, segment); + SERIAL_ECHOPGM(STR_SD_CANT_OPEN_SUBDIR, segment); break; } @@ -475,7 +475,7 @@ void CardReader::manage_media() { uint8_t stat = uint8_t(IS_SD_INSERTED()); if (stat == prev_stat) return; - DEBUG_ECHOLNPAIR("SD: Status changed from ", prev_stat, " to ", stat); + DEBUG_ECHOLNPGM("SD: Status changed from ", prev_stat, " to ", stat); flag.workDirIsRoot = true; // Return to root on mount/release @@ -606,7 +606,7 @@ void CardReader::getAbsFilenameInCWD(char *dst) { } void openFailed(const char * const fname) { - SERIAL_ECHOLNPAIR(STR_SD_OPEN_FILE_FAIL, fname, "."); + SERIAL_ECHOLNPGM(STR_SD_OPEN_FILE_FAIL, fname, "."); } void announceOpen(const uint8_t doing, const char * const path) { @@ -615,7 +615,7 @@ void announceOpen(const uint8_t doing, const char * const path) { SERIAL_ECHO_START(); SERIAL_ECHOPGM("Now "); SERIAL_ECHOPGM_P(doing == 1 ? PSTR("doing") : PSTR("fresh")); - SERIAL_ECHOLNPAIR(" file: ", path); + SERIAL_ECHOLNPGM(" file: ", path); } } @@ -678,7 +678,7 @@ void CardReader::openFileRead(const char * const path, const uint8_t subcall_typ { // Don't remove this block, as the PORT_REDIRECT is a RAII PORT_REDIRECT(SerialMask::All); - SERIAL_ECHOLNPAIR(STR_SD_FILE_OPENED, fname, STR_SD_SIZE, filesize); + SERIAL_ECHOLNPGM(STR_SD_FILE_OPENED, fname, STR_SD_SIZE, filesize); SERIAL_ECHOLNPGM(STR_SD_FILE_SELECTED); } @@ -690,7 +690,7 @@ void CardReader::openFileRead(const char * const path, const uint8_t subcall_typ } inline void echo_write_to_file(const char * const fname) { - SERIAL_ECHOLNPAIR(STR_SD_WRITE_TO_FILE, fname); + SERIAL_ECHOLNPGM(STR_SD_WRITE_TO_FILE, fname); } // @@ -730,7 +730,7 @@ void CardReader::openFileWrite(const char * const path) { bool CardReader::fileExists(const char * const path) { if (!isMounted()) return false; - DEBUG_ECHOLNPAIR("fileExists: ", path); + DEBUG_ECHOLNPGM("fileExists: ", path); // Dive to the file's directory and get the base name SdFile *diveDir = nullptr; @@ -762,21 +762,21 @@ void CardReader::removeFile(const char * const name) { if (!fname) return; #if ENABLED(SDCARD_READONLY) - SERIAL_ECHOLNPAIR("Deletion failed (read-only), File: ", fname, "."); + SERIAL_ECHOLNPGM("Deletion failed (read-only), File: ", fname, "."); #else if (file.remove(itsDirPtr, fname)) { - SERIAL_ECHOLNPAIR("File deleted:", fname); + SERIAL_ECHOLNPGM("File deleted:", fname); sdpos = 0; TERN_(SDCARD_SORT_ALPHA, presort()); } else - SERIAL_ECHOLNPAIR("Deletion failed, File: ", fname, "."); + SERIAL_ECHOLNPGM("Deletion failed, File: ", fname, "."); #endif } void CardReader::report_status() { if (isPrinting()) { - SERIAL_ECHOPAIR(STR_SD_PRINTING_BYTE, sdpos); + SERIAL_ECHOPGM(STR_SD_PRINTING_BYTE, sdpos); SERIAL_CHAR('/'); SERIAL_ECHOLN(filesize); } @@ -924,12 +924,12 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, con // Parsing the path string const char *atom_ptr = path; - DEBUG_ECHOLNPAIR(" path = '", path, "'"); + DEBUG_ECHOLNPGM(" path = '", path, "'"); if (path[0] == '/') { // Starting at the root directory? inDirPtr = &root; atom_ptr++; - DEBUG_ECHOLNPAIR(" CWD to root: ", hex_address((void*)inDirPtr)); + DEBUG_ECHOLNPGM(" CWD to root: ", hex_address((void*)inDirPtr)); if (update_cwd) workDirDepth = 0; // The cwd can be updated for the benefit of sub-programs } else @@ -937,7 +937,7 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, con startDirPtr = inDirPtr; - DEBUG_ECHOLNPAIR(" startDirPtr = ", hex_address((void*)startDirPtr)); + DEBUG_ECHOLNPGM(" startDirPtr = ", hex_address((void*)startDirPtr)); while (atom_ptr) { // Find next subdirectory delimiter @@ -954,7 +954,7 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, con if (echo) SERIAL_ECHOLN(dosSubdirname); - DEBUG_ECHOLNPAIR(" sub = ", hex_address((void*)sub)); + DEBUG_ECHOLNPGM(" sub = ", hex_address((void*)sub)); // Open inDirPtr (closing first) sub->close(); @@ -966,24 +966,24 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, con // Close inDirPtr if not at starting-point if (inDirPtr != startDirPtr) { - DEBUG_ECHOLNPAIR(" closing inDirPtr: ", hex_address((void*)inDirPtr)); + DEBUG_ECHOLNPGM(" closing inDirPtr: ", hex_address((void*)inDirPtr)); inDirPtr->close(); } // inDirPtr now subDir inDirPtr = sub; - DEBUG_ECHOLNPAIR(" inDirPtr = sub: ", hex_address((void*)inDirPtr)); + DEBUG_ECHOLNPGM(" inDirPtr = sub: ", hex_address((void*)inDirPtr)); // Update workDirParents and workDirDepth if (update_cwd) { - DEBUG_ECHOLNPAIR(" update_cwd"); + DEBUG_ECHOLNPGM(" update_cwd"); if (workDirDepth < MAX_DIR_DEPTH) workDirParents[workDirDepth++] = *inDirPtr; } // Point sub at the other scratch object sub = (inDirPtr != &newDir1) ? &newDir1 : &newDir2; - DEBUG_ECHOLNPAIR(" swapping sub = ", hex_address((void*)sub)); + DEBUG_ECHOLNPGM(" swapping sub = ", hex_address((void*)sub)); // Next path atom address atom_ptr = name_end + 1; @@ -991,12 +991,12 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, con if (update_cwd) { workDir = *inDirPtr; - DEBUG_ECHOLNPAIR(" final workDir = ", hex_address((void*)inDirPtr)); + DEBUG_ECHOLNPGM(" final workDir = ", hex_address((void*)inDirPtr)); flag.workDirIsRoot = (workDirDepth == 0); TERN_(SDCARD_SORT_ALPHA, presort()); } - DEBUG_ECHOLNPAIR(" returning string ", atom_ptr ?: "nullptr"); + DEBUG_ECHOLNPGM(" returning string ", atom_ptr ?: "nullptr"); return atom_ptr; } @@ -1138,9 +1138,9 @@ void CardReader::cdroot() { selectFileByIndex(i); SET_SORTNAME(i); SET_SORTSHORT(i); - // char out[30]; - // sprintf_P(out, PSTR("---- %i %s %s"), i, flag.filenameIsDir ? "D" : " ", sortnames[i]); - // SERIAL_ECHOLN(out); + //char out[30]; + //sprintf_P(out, PSTR("---- %i %s %s"), i, flag.filenameIsDir ? "D" : " ", sortnames[i]); + //SERIAL_ECHOLN(out); #if HAS_FOLDER_SORTING const uint16_t bit = i & 0x07, ind = i >> 3; if (bit == 0) isDir[ind] = 0x00; diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp index 19754184154e..5991a9fb83e4 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp @@ -34,9 +34,9 @@ #define USB_STARTUP_DELAY 0 // uncomment to get 'printf' console debugging. NOT FOR UNO! -//#define HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} -//#define BS_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} -//#define MAX_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} +//#define HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPGM("UHS:",s);} +//#define BS_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPGM("UHS:",s);} +//#define MAX_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPGM("UHS:",s);} #if ENABLED(USB_FLASH_DRIVE_SUPPORT) @@ -170,7 +170,7 @@ void DiskIODriver_USBFlash::idle() { UHS_USB_DEBUG(CONFIGURING_DONE); UHS_USB_DEBUG(RUNNING); default: - SERIAL_ECHOLNPAIR("UHS_USB_HOST_STATE: ", task_state); + SERIAL_ECHOLNPGM("UHS_USB_HOST_STATE: ", task_state); break; } } @@ -273,14 +273,14 @@ bool DiskIODriver_USBFlash::init(const uint8_t, const pin_t) { #if USB_DEBUG >= 1 const uint32_t sectorSize = bulk.GetSectorSize(0); if (sectorSize != 512) { - SERIAL_ECHOLNPAIR("Expecting sector size of 512. Got: ", sectorSize); + SERIAL_ECHOLNPGM("Expecting sector size of 512. Got: ", sectorSize); return false; } #endif #if USB_DEBUG >= 3 lun0_capacity = bulk.GetCapacity(0); - SERIAL_ECHOLNPAIR("LUN Capacity (in blocks): ", lun0_capacity); + SERIAL_ECHOLNPGM("LUN Capacity (in blocks): ", lun0_capacity); #endif return true; } @@ -299,11 +299,11 @@ bool DiskIODriver_USBFlash::readBlock(uint32_t block, uint8_t *dst) { if (!isInserted()) return false; #if USB_DEBUG >= 3 if (block >= lun0_capacity) { - SERIAL_ECHOLNPAIR("Attempt to read past end of LUN: ", block); + SERIAL_ECHOLNPGM("Attempt to read past end of LUN: ", block); return false; } #if USB_DEBUG >= 4 - SERIAL_ECHOLNPAIR("Read block ", block); + SERIAL_ECHOLNPGM("Read block ", block); #endif #endif return bulk.Read(0, block, 512, 1, dst) == 0; @@ -313,11 +313,11 @@ bool DiskIODriver_USBFlash::writeBlock(uint32_t block, const uint8_t *src) { if (!isInserted()) return false; #if USB_DEBUG >= 3 if (block >= lun0_capacity) { - SERIAL_ECHOLNPAIR("Attempt to write past end of LUN: ", block); + SERIAL_ECHOLNPGM("Attempt to write past end of LUN: ", block); return false; } #if USB_DEBUG >= 4 - SERIAL_ECHOLNPAIR("Write block ", block); + SERIAL_ECHOLNPGM("Write block ", block); #endif #endif return bulk.Write(0, block, 512, 1, src) == 0; diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp index 4ee206bc3297..a1a3b7d50ead 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp @@ -121,7 +121,7 @@ bool MAX3421e::start() { const uint8_t revision = regRd(rREVISION); if (revision == 0x00 || revision == 0xFF) { - SERIAL_ECHOLNPAIR("Revision register appears incorrect on MAX3421e initialization. Got ", revision); + SERIAL_ECHOLNPGM("Revision register appears incorrect on MAX3421e initialization. Got ", revision); return false; } diff --git a/docs/Serial.md b/docs/Serial.md index f51b90272399..ff8f84ef9908 100644 --- a/docs/Serial.md +++ b/docs/Serial.md @@ -58,10 +58,10 @@ The following macros are defined (in `serial.h`) to output data to the serial po | `SERIAL_ECHO` | Any basic type is supported (`char`, `uint8_t`, `int16_t`, `int32_t`, `float`, `long`, `const char*`, ...). | For a numeric type it prints the number in decimal. A string is output as a string. | `uint8_t a = 123; SERIAL_ECHO(a); SERIAL_CHAR(' '); SERIAL_ECHO(' '); ` | `123 32` | | `SERIAL_ECHOLN` | Same as `SERIAL_ECHO` | Do `SERIAL_ECHO`, adding a newline | `int a = 456; SERIAL_ECHOLN(a);` | `456\n` | | `SERIAL_ECHO_F` | `float` or `double` | Print a decimal value with a given precision (default 2) | `float a = 3.1415; SERIAL_ECHO_F(a); SERIAL_CHAR(' '); SERIAL_ECHO_F(a, 4);` | `3.14 3.1415`| -| `SERIAL_ECHOPAIR` | String / Value pairs | Print a series of string literals and values alternately | `SERIAL_ECHOPAIR("Bob", 34);` | `Bob34` | -| `SERIAL_ECHOLNPAIR` | Same as `SERIAL_ECHOPAIR` | Do `SERIAL_ECHOPAIR`, adding a newline | `SERIAL_ECHOPAIR("Alice", 56);` | `alice56` | -| `SERIAL_ECHOPAIR_P` | Like `SERIAL_ECHOPAIR` but takes PGM strings | Print a series of PGM strings and values alternately | `SERIAL_ECHOPAIR_P(GET_TEXT(MSG_HELLO), 123);` | `Hello123` | -| `SERIAL_ECHOLNPAIR_P` | Same as `SERIAL_ECHOPAIR_P` | Do `SERIAL_ECHOPAIR_P`, adding a newline | `SERIAL_ECHOLNPAIR_P(PSTR("Alice"), 78);` | `alice78\n` | +| `SERIAL_ECHOPGM` | String / Value pairs | Print a series of string literals and values alternately | `SERIAL_ECHOPGM("Bob", 34);` | `Bob34` | +| `SERIAL_ECHOLNPGM` | Same as `SERIAL_ECHOPGM` | Do `SERIAL_ECHOPGM`, adding a newline | `SERIAL_ECHOPGM("Alice", 56);` | `alice56` | +| `SERIAL_ECHOPGM_P` | Like `SERIAL_ECHOPGM` but takes PGM strings | Print a series of PGM strings and values alternately | `SERIAL_ECHOPGM_P(GET_TEXT(MSG_HELLO), 123);` | `Hello123` | +| `SERIAL_ECHOLNPGM_P` | Same as `SERIAL_ECHOPGM_P` | Do `SERIAL_ECHOPGM_P`, adding a newline | `SERIAL_ECHOLNPGM_P(PSTR("Alice"), 78);` | `alice78\n` | | `SERIAL_ECHOLIST` | String literal, values | Print a string literal and a list of values | `SERIAL_ECHOLIST("Key ", 1, 2, 3);` | `Key 1, 2, 3` | | `SERIAL_ECHO_START` | None | Prefix an echo line | `SERIAL_ECHO_START();` | `echo:` | | `SERIAL_ECHO_MSG` | Same as `SERIAL_ECHOLN_PAIR` | Print a full echo line | `SERIAL_ECHO_MSG("Count is ", count);` | `echo:Count is 3` | From 392a4a6f85bea8470ee291eedcf85d16ce071e52 Mon Sep 17 00:00:00 2001 From: Miguel Risco-Castillo Date: Thu, 9 Sep 2021 16:40:10 -0500 Subject: [PATCH 322/323] =?UTF-8?q?=F0=9F=90=9B=20Fix,=20improve=20E3V2=20?= =?UTF-8?q?Enhanced=20UI=20(#22733)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/lcd/e3v2/enhanced/dwin.cpp | 158 ++++++++++++---------- Marlin/src/lcd/e3v2/enhanced/dwin.h | 7 +- Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp | 12 +- Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h | 9 +- Marlin/src/lcd/e3v2/enhanced/dwinui.cpp | 6 +- Marlin/src/lcd/e3v2/enhanced/dwinui.h | 35 ++--- 7 files changed, 126 insertions(+), 103 deletions(-) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index c45995aba598..61a9ea2c9a8e 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -421,7 +421,7 @@ #endif #endif -#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) +#if EITHER(DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI) #define HAS_LCD_BRIGHTNESS 1 #endif diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp index edcf19918286..9e43e4198e28 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp @@ -163,10 +163,10 @@ static bool sdprint = false; #if ENABLED(PAUSE_HEAT) #if HAS_HOTEND - uint16_t resume_hotend_temp = 0; + celsius_t resume_hotend_temp = 0; #endif #if HAS_HEATED_BED - uint16_t resume_bed_temp = 0; + celsius_t resume_bed_temp = 0; #endif #if HAS_FAN uint16_t resume_fan = 0; @@ -708,7 +708,7 @@ void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y, else if (blink && draw_empty) DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F(" ")); else - DWINUI::Draw_Signed_Float(HMI_data.Coordinate_Color, HMI_data.Background_Color, 3, 1, x, y, p * 10); + DWINUI::Draw_Signed_Float(HMI_data.Coordinate_Color, HMI_data.Background_Color, 3, 1, x, y, p); } } @@ -805,7 +805,7 @@ void update_variable() { static float _offset = 0; if (BABY_Z_VAR != _offset) { _offset = BABY_Z_VAR; - DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, _offset * 100); + DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, _offset); } _draw_xyz_position(false); @@ -1030,14 +1030,7 @@ void Draw_Status_Area(const bool with_update) { DWINUI::Draw_Icon(ICON_Zoffset, 187, 416); #endif - if (BABY_Z_VAR < 0) { - DWINUI::Draw_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 207, 417, -BABY_Z_VAR * 100); - DWINUI::Draw_String(HMI_data.Indicator_Color, 205, 419, F("-")); - } - else { - DWINUI::Draw_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 207, 417, BABY_Z_VAR * 100); - DWINUI::Draw_String(HMI_data.Indicator_Color, 205, 419, F(" ")); - } + DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, BABY_Z_VAR); DWIN_Draw_Rectangle(1, HMI_data.SplitLine_Color, 0, 449, DWIN_WIDTH, 451); @@ -1690,7 +1683,7 @@ void DWIN_CompletedLeveling() { HMI_ReturnScreen(); } void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { char msg[33] = ""; char str_1[6] = ""; - sprintf_P(msg, PSTR(S_FMT " %i/%i Z=%s"), GET_TEXT(MSG_PROBING_MESH), xpos, ypos, + sprintf_P(msg, PSTR(S_FMT " %i/%i Z=%s"), GET_TEXT(MSG_PROBING_POINT), xpos, ypos, dtostrf(zval, 1, 2, str_1)); ui.set_status(msg); } @@ -1791,6 +1784,7 @@ void DWIN_Print_Started(const bool sd) { sdprint = card.isPrinting() || sd; _percent_done = 0; _remain_time = 0; + HMI_flag.print_finish = false; Goto_PrintProcess(); } @@ -1846,18 +1840,20 @@ void DWIN_SetDataDefaults() { TERN_(HAS_HOTEND, HMI_data.HotendPidT = PREHEAT_1_TEMP_HOTEND); TERN_(HAS_HEATED_BED, HMI_data.BedPidT = PREHEAT_1_TEMP_BED); TERN_(HAS_HOTEND, HMI_data.PidCycles = 5); + TERN_(PREVENT_COLD_EXTRUSION, HMI_data.ExtMinT = EXTRUDE_MINTEMP); } void DWIN_StoreSettings(char *buff) { - memcpy(buff, &HMI_data, min(sizeof(HMI_data), eeprom_data_size)); + memcpy(buff, &HMI_data, _MIN(sizeof(HMI_data), eeprom_data_size)); } void DWIN_LoadSettings(const char *buff) { - memcpy(&HMI_data, buff, min(sizeof(HMI_data), eeprom_data_size)); + memcpy(&HMI_data, buff, _MIN(sizeof(HMI_data), eeprom_data_size)); dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); if (HMI_data.Text_Color == HMI_data.Background_Color) DWIN_SetColorDefaults(); DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); TERN_(PREVENT_COLD_EXTRUSION, ApplyExtMinT()); + feedrate_percentage = 100; } void MarlinUI::kill_screen(PGM_P lcd_error, PGM_P lcd_component) { @@ -1970,11 +1966,11 @@ void DWIN_LockScreen(const bool flag) { // lo: low limit // hi: high limit // dp: decimal places, 0 for integers -// val: value +// val: value / scaled value // LiveUpdate: live update function when the encoder changes // Apply: update function when the encoder is pressed void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { - last_checkkey = checkkey; + last_checkkey = Menu; checkkey = process; HMI_value.MinValue = lo; HMI_value.MaxValue = hi; @@ -1985,18 +1981,29 @@ void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, EncoderRate.enabled = true; } -// Generic onclick event for set values (dp = 0: integer, dp > 0: float) +// Generic onclick event for integer values // process: process id HMI destiny // lo: scaled low limit // hi: scaled high limit -// dp: decimal places, 0 for integers -// val: scaled value +// val: value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetOnClick(process, lo, hi, 0, val, Apply, LiveUpdate); + Draw_Menu_IntValue(HMI_data.Selected_Color, CurrentMenu->line(), 4, HMI_value.Value); +} + +// Generic onclick event for float values +// process: process id HMI destiny +// lo: scaled low limit +// hi: scaled high limit +// val: value // LiveUpdate: live update function when the encoder changes // Apply: update function when the encoder is pressed -void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { - SetOnClick(process, lo, hi, dp, val, Apply, LiveUpdate); - dp ? DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value) - : Draw_Menu_IntValue(HMI_data.Selected_Color, CurrentMenu->line(), 4, HMI_value.Value); +void SetValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + const int32_t value = round(val * POW(10, dp)); + SetOnClick(process, lo * POW(10, dp), hi * POW(10, dp), dp, value, Apply, LiveUpdate); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), val); } // Generic onclick event for integer values @@ -2005,8 +2012,8 @@ void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_ // val: value // LiveUpdate: live update function when the encoder changes // Apply: update function when the encoder is pressed -void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { - SetValueOnClick(SetInt, lo, hi, 0, val, Apply, LiveUpdate); +inline void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetValueOnClick(SetInt, lo, hi, val, Apply, LiveUpdate); } // Generic onclick event for set pointer to 16 bit uinteger values @@ -2017,7 +2024,7 @@ void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void ( void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { HMI_value.P_Int = (int16_t*)static_cast(CurrentMenu->SelectedItem())->value; const int32_t value = *HMI_value.P_Int; - SetValueOnClick(SetPInt, lo, hi, 0, value, Apply, LiveUpdate); + SetValueOnClick(SetPInt, lo, hi, value, Apply, LiveUpdate); } // Generic onclick event for float values @@ -2026,8 +2033,8 @@ void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)() = nullpt // hi: high limit // dp: decimal places // val: value -void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { - SetValueOnClick(SetFloat, lo * POW(10, dp), hi * POW(10, dp), dp, val * POW(10, dp), Apply, LiveUpdate); +inline void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetValueOnClick(SetFloat, lo, hi, dp, val, Apply, LiveUpdate); } // Generic onclick event for set pointer to float values @@ -2037,8 +2044,7 @@ void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val // Apply: update function when the encoder is pressed void SetPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { HMI_value.P_Float = (float*)static_cast(CurrentMenu->SelectedItem())->value; - const int32_t value = *HMI_value.P_Float * POW(10, dp); - SetValueOnClick(SetPFloat, lo * POW(10, dp), hi * POW(10, dp), dp, value, Apply, LiveUpdate); + SetValueOnClick(SetPFloat, lo, hi, dp, *HMI_value.P_Float, Apply, LiveUpdate); } #if ENABLED(EEPROM_SETTINGS) @@ -2148,7 +2154,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS #if HAS_HOTEND void SetMoveE() { - #ifdef PREVENT_COLD_EXTRUSION + #if ENABLED(PREVENT_COLD_EXTRUSION) if (thermalManager.tooColdToExtrude(0)) { Popup_Window_ETempTooLow(); return; @@ -2162,8 +2168,14 @@ void SetMoveZto0() { char cmd[48] = ""; char str_1[5] = "", str_2[5] = ""; sprintf_P(cmd, PSTR("G28OXY\nG28Z\nG0X%sY%sF5000\nG0Z0F300"), - dtostrf(X_CENTER, 1, 1, str_1), - dtostrf(Y_CENTER, 1, 1, str_2)); + #if ENABLED(MESH_BED_LEVELING) + dtostrf(0, 1, 1, str_1), + dtostrf(0, 1, 1, str_2) + #else + dtostrf(X_CENTER, 1, 1, str_1), + dtostrf(Y_CENTER, 1, 1, str_2) + #endif + ); gcode.process_subcommands_now_P(cmd); planner.synchronize(); ui.set_status_P(PSTR("Now adjust Z Offset")); @@ -2175,7 +2187,8 @@ void SetPID(celsius_t t, heater_id_t h) { char str_1[5] = "", str_2[5] = ""; sprintf_P(cmd, PSTR("G28OXY\nG0Z5F300\nG0X%sY%sF5000\nM84"), dtostrf(X_CENTER, 1, 1, str_1), - dtostrf(Y_CENTER, 1, 1, str_2)); + dtostrf(Y_CENTER, 1, 1, str_2) + ); gcode.process_subcommands_now_P(cmd); planner.synchronize(); thermalManager.PID_autotune(t, h, HMI_data.PidCycles, true); @@ -2217,6 +2230,7 @@ void Goto_LockScreen() { #if HAS_BED_PROBE void SetProbeOffsetX() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } void SetProbeOffsetY() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } + void SetProbeOffsetZ() { SetPFloatOnClick(-10, 10, 2); } void ProbeTest() { ui.set_status_P(GET_TEXT(MSG_M48_TEST)); queue.inject_P(PSTR("G28O\nM48 P10")); @@ -2250,24 +2264,24 @@ void RestoreDefaultsColors() { void SelColor() { HMI_value.P_Int = (int16_t*)static_cast(CurrentMenu->SelectedItem())->value; - HMI_value.Color[2] = GetRColor(*HMI_value.P_Int); // Red + HMI_value.Color[0] = GetRColor(*HMI_value.P_Int); // Red HMI_value.Color[1] = GetGColor(*HMI_value.P_Int); // Green - HMI_value.Color[0] = GetBColor(*HMI_value.P_Int); // Blue + HMI_value.Color[2] = GetBColor(*HMI_value.P_Int); // Blue Draw_GetColor_Menu(); } void LiveRGBColor() { HMI_value.Color[CurrentMenu->line() - 2] = HMI_value.Value; - uint16_t color = RGB(HMI_value.Color[2], HMI_value.Color[1], HMI_value.Color[0]); + uint16_t color = RGB(HMI_value.Color[0], HMI_value.Color[1], HMI_value.Color[2]); DWIN_Draw_Rectangle(1, color, 20, 315, DWIN_WIDTH - 20, 335); } void SetRGBColor() { - const uint8_t line = CurrentMenu->line() - 2; - SetIntOnClick(0, (line == 1) ? 63 : 31, HMI_value.Color[CurrentMenu->SelectedItem()->icon], nullptr, LiveRGBColor); + const uint8_t color = CurrentMenu->SelectedItem()->icon; + SetIntOnClick(0, (color == 1) ? 63 : 31, HMI_value.Color[color], nullptr, LiveRGBColor); } void DWIN_ApplyColor() { - *HMI_value.P_Int = RGB(HMI_value.Color[2], HMI_value.Color[1], HMI_value.Color[0]); + *HMI_value.P_Int = RGB(HMI_value.Color[0], HMI_value.Color[1], HMI_value.Color[2]); DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); Draw_Status_Area(false); Draw_SelectColors_Menu(); @@ -2278,7 +2292,7 @@ void SetSpeed() { SetPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); } #if HAS_HOTEND void ApplyHotendTemp() { thermalManager.setTargetHotend(HMI_value.Value, 0); } - void SetHotendTemp() { SetIntOnClick(HEATER_0_MINTEMP, HEATER_0_MAXTEMP, thermalManager.degTargetHotend(0), ApplyHotendTemp); } + void SetHotendTemp() { SetIntOnClick(MIN_ETEMP, MAX_ETEMP, thermalManager.degTargetHotend(0), ApplyHotendTemp); } #endif #if HAS_HEATED_BED @@ -2384,11 +2398,19 @@ void LevBedC () { LevBed(4); } gcode.process_subcommands_now_P(PSTR("G28 XYO\nG28 Z\nM211 S0\nG29S1")); planner.synchronize(); #ifdef MANUAL_PROBE_START_Z - MMeshMoveZItem->Draw(CurrentMenu->line(MMeshMoveZItem->pos)); + const uint8_t line = CurrentMenu->line(MMeshMoveZItem->pos); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, 2, VALX - 2 * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(line), MANUAL_PROBE_START_Z); #endif } - void SetMMeshMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(-1, 1, 2, planner.synchronize, LiveMove);} + void LiveMeshMoveZ() { + *HMI_value.P_Float = HMI_value.Value / POW(10, 2); + if (!planner.is_full()) { + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS)); + } + } + void SetMMeshMoveZ() { SetPFloatOnClick(-1, 1, 2, planner.synchronize, LiveMeshMoveZ);} void ManualMeshContinue(){ gcode.process_subcommands_now_P(PSTR("G29S2")); @@ -2496,7 +2518,7 @@ void onDrawPInt32Menu(MenuItemClass* menuitem, int8_t line) { void onDrawFloatMenu(MenuItemClass* menuitem, int8_t line, uint8_t dp, const float value) { onDrawMenuItem(menuitem, line); - DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(line), value * POW(10, dp)); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(line), value); } void onDrawPFloatMenu(MenuItemClass* menuitem, int8_t line) { @@ -2507,8 +2529,7 @@ void onDrawPFloatMenu(MenuItemClass* menuitem, int8_t line) { void onDrawPFloat2Menu(MenuItemClass* menuitem, int8_t line) { const float value = *(float*)static_cast(menuitem)->value; - const int8_t dp = 2; - onDrawFloatMenu(menuitem, line, dp, value); + onDrawFloatMenu(menuitem, line, 2, value); } void onDrawChkbMenu(MenuItemClass* menuitem, int8_t line, bool checked) { @@ -2643,9 +2664,9 @@ void onDrawGetColorItem(MenuItemClass* menuitem, int8_t line) { const uint8_t i = menuitem->icon; uint16_t color; switch (i) { - case 0: color = RGB(0, 0, 31); break; - case 1: color = RGB(0, 63, 0); break; - case 2: color = RGB(31, 0, 0); break; + case 0: color = RGB(31, 0, 0); break; // Red + case 1: color = RGB(0, 63, 0); break; // Green + case 2: color = RGB(0, 0, 31); break; // Blue default: color = 0; break; } DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ICOX + 1, MBASE(line) - 1 + 1, ICOX + 18, MBASE(line) - 1 + 18); @@ -3002,12 +3023,12 @@ int8_t HMI_GetFloat(uint8_t dp, int32_t lo, int32_t hi) { if (encoder_diffState != ENCODER_DIFF_NO) { if (Apply_Encoder(encoder_diffState, HMI_value.Value)) { EncoderRate.enabled = false; - DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value / POW(10, dp)); checkkey = last_checkkey; return 2; } LIMIT(HMI_value.Value, lo, hi); - DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::Get_font_width(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value / POW(10, dp)); return 1; } return 0; @@ -3182,10 +3203,11 @@ void Draw_Move_Menu() { if (CurrentMenu != ProbeSetMenu) { CurrentMenu = ProbeSetMenu; SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ZPROBE_SETTINGS)); // TODO: Chinese, English "Probe Settings" JPG - DWINUI::MenuItemsPrepare(4); + DWINUI::MenuItemsPrepare(5); ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); ADDMENUITEM_P(ICON_ProbeOffsetX, GET_TEXT(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x); ADDMENUITEM_P(ICON_ProbeOffsetY, GET_TEXT(MSG_ZPROBE_YOFFSET), onDrawPFloatMenu, SetProbeOffsetY, &probe.offset.y); + ADDMENUITEM_P(ICON_ProbeOffsetZ, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetProbeOffsetZ, &probe.offset.z); ADDMENUITEM(ICON_ProbeTest, GET_TEXT(MSG_M48_TEST), onDrawMenuItem, ProbeTest); } CurrentMenu->Draw(); @@ -3203,7 +3225,7 @@ void Draw_Move_Menu() { ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); TERN_(HAS_FILAMENT_SENSOR, ADDMENUITEM(ICON_Runout, GET_TEXT(MSG_RUNOUT_ENABLE), onDrawRunoutEnable, SetRunoutEnable)); TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, ADDMENUITEM_P(ICON_Runout, F("Runout Distance"), onDrawPFloatMenu, SetRunoutDistance, &runout.runout_distance())); - TERN_(PREVENT_COLD_EXTRUSION, ADDMENUITEM_P(ICON_ExtrudeMinT, F("Extrude Min Temp."), onDrawPIntMenu, SetExtMinT, &thermalManager.extrude_min_temp)); + TERN_(PREVENT_COLD_EXTRUSION, ADDMENUITEM_P(ICON_ExtrudeMinT, F("Extrude Min Temp."), onDrawPIntMenu, SetExtMinT, &HMI_data.ExtMinT)); TERN_(ADVANCED_PAUSE_FEATURE, ADDMENUITEM_P(ICON_FilLoad, GET_TEXT(MSG_FILAMENT_LOAD), onDrawPFloatMenu, SetFilLoad, &fc_settings[0].load_length)); TERN_(ADVANCED_PAUSE_FEATURE, ADDMENUITEM_P(ICON_FilUnload, GET_TEXT(MSG_FILAMENT_UNLOAD), onDrawPFloatMenu, SetFilUnload, &fc_settings[0].unload_length)); } @@ -3250,9 +3272,9 @@ void Draw_GetColor_Menu() { DWINUI::MenuItemsPrepare(5); ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawBack, DWIN_ApplyColor); ADDMENUITEM(ICON_Cancel, GET_TEXT(MSG_BUTTON_CANCEL), onDrawMenuItem, Draw_SelectColors_Menu); - ADDMENUITEM(0, "Blue", onDrawGetColorItem, SetRGBColor); + ADDMENUITEM(0, "Red", onDrawGetColorItem, SetRGBColor); ADDMENUITEM(1, "Green", onDrawGetColorItem, SetRGBColor); - ADDMENUITEM(2, "Red", onDrawGetColorItem, SetRGBColor); + ADDMENUITEM(2, "Blue", onDrawGetColorItem, SetRGBColor); } CurrentMenu->Draw(); DWIN_Draw_Rectangle(1, *HMI_value.P_Int, 20, 315, DWIN_WIDTH - 20, 335); @@ -3270,16 +3292,12 @@ void Draw_Tune_Menu() { TERN_(HAS_HOTEND, HotendTargetItem = ADDMENUITEM_P(ICON_HotendTemp, GET_TEXT(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target)); TERN_(HAS_HEATED_BED, BedTargetItem = ADDMENUITEM_P(ICON_BedTemp, GET_TEXT(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target)); TERN_(HAS_FAN, FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0])); - #if HAS_ZOFFSET_ITEM - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) - ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawZOffset, SetZOffset, &BABY_Z_VAR); - #else - ADDMENUITEM(ICON_SetHome, GET_TEXT(MSG_SET_HOME_OFFSETS), onDrawHomeOffset, SetHome); - #endif + #if HAS_ZOFFSET_ITEM && EITHER(HAS_BED_PROBE, BABYSTEPPING) + ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawZOffset, SetZOffset, &BABY_Z_VAR); #endif ADDMENUITEM_P(ICON_Flow, GET_TEXT(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]); TERN_(ADVANCED_PAUSE_FEATURE, ADDMENUITEM(ICON_FilMan, GET_TEXT(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament)); - ADDMENUITEM(ICON_Lock, PSTR("Lock Screen"), onDrawMenuItem, Goto_LockScreen); + ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, Goto_LockScreen); TERN_(HAS_LCD_BRIGHTNESS, ADDMENUITEM_P(ICON_Brightness, F("LCD Brightness"), onDrawPInt8Menu, SetBrightness, &ui.brightness)); } CurrentMenu->Draw(); @@ -3300,7 +3318,6 @@ void Draw_Motion_Menu() { ADDMENUITEM_P(ICON_Flow, GET_TEXT(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]); } CurrentMenu->Draw(); - DWIN_StatusChanged(nullptr); } #if ENABLED(ADVANCED_PAUSE_FEATURE) @@ -3476,9 +3493,9 @@ void Draw_Steps_Menu() { DWINUI::MenuItemsPrepare(8); ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); ADDMENUITEM(ICON_PIDNozzle, F("Hotend PID"), onDrawMenuItem, HotendPID); - ADDMENUITEM_P(ICON_PIDValue, F(STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_hotend[0].pid.Kp); - ADDMENUITEM_P(ICON_PIDValue, F(STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_hotend[0].pid.Ki); - ADDMENUITEM_P(ICON_PIDValue, F(STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_hotend[0].pid.Kd); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_hotend[0].pid.Kp); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_hotend[0].pid.Ki); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_hotend[0].pid.Kd); ADDMENUITEM_P(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawPIntMenu, SetHotendPidT, &HMI_data.HotendPidT); ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles); TERN_(EEPROM_SETTINGS, ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom)); @@ -3497,9 +3514,9 @@ void Draw_Steps_Menu() { DWINUI::MenuItemsPrepare(8); ADDMENUITEM(ICON_Back, GET_TEXT(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); ADDMENUITEM(ICON_PIDNozzle, F("Bed PID"), onDrawMenuItem,BedPID); - ADDMENUITEM_P(ICON_PIDValue, F(STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_bed.pid.Kp); - ADDMENUITEM_P(ICON_PIDValue, F(STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_bed.pid.Ki); - ADDMENUITEM_P(ICON_PIDValue, F(STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_bed.pid.Kd); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_bed.pid.Kp); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_bed.pid.Ki); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_bed.pid.Kd); ADDMENUITEM_P(ICON_Temperature, GET_TEXT(MSG_TEMPERATURE), onDrawPIntMenu, SetBedPidT, &HMI_data.BedPidT); ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles); TERN_(EEPROM_SETTINGS, ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom)); @@ -3522,6 +3539,7 @@ void Draw_Steps_Menu() { ADDMENUITEM_P(ICON_Zoffset, GET_TEXT(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR); } CurrentMenu->Draw(); + if (!axis_is_trusted(Z_AXIS)) ui.set_status_P(PSTR("WARNING: Z position is unknow, move Z to home")); } #endif diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.h b/Marlin/src/lcd/e3v2/enhanced/dwin.h index 365ac9ed4b8a..ee83f9ad7cd1 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin.h +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.h @@ -20,11 +20,6 @@ */ #pragma once -/** - * DWIN by Creality3D - * Enhanced implementation by Miguel A. Risco-Castillo - */ - #include "../../../inc/MarlinConfigPre.h" #include "dwinui.h" #include "rotary_encoder.h" @@ -130,7 +125,7 @@ typedef struct { #ifdef PREHEAT_1_TEMP_BED int16_t BedPidT = PREHEAT_1_TEMP_BED; #endif - TERN_(PREVENT_COLD_EXTRUSION, uint16_t ExtMinT = EXTRUDE_MINTEMP); + TERN_(PREVENT_COLD_EXTRUSION, int16_t ExtMinT = EXTRUDE_MINTEMP); } HMI_data_t; typedef struct { diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp index 99ee74732e67..b9246523ce39 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp @@ -22,8 +22,8 @@ /******************************************************************************** * @file lcd/e3v2/enhanced/dwin_lcd.cpp * @author LEO / Creality3D - Enhanced by Miguel A. Risco-Castillo - * @date 2021/08/29 - * @version 2.1.1 + * @date 2021/09/08 + * @version 2.2.1 * @brief DWIN screen control functions ********************************************************************************/ @@ -260,7 +260,7 @@ void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color // x/y: Upper-left coordinate // value: Integer value void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, - uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) { size_t i = 0; DWIN_Byte(i, 0x14); // Bit 7: bshow @@ -319,6 +319,12 @@ void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_ DWIN_Long(i, value); DWIN_Send(i); } +// value: positive float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + const long val = round(value * POW(10, fNum)); + DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, val); +} /*---------------------------------------- Picture related functions ----------------------------------------*/ diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h index 71e66301b4b5..c66416a7ed51 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h @@ -22,8 +22,8 @@ /******************************************************************************** * @file lcd/e3v2/enhanced/dwin_lcd.h * @author LEO / Creality3D - Enhanced by Miguel A. Risco-Castillo - * @date 2021/08/29 - * @version 2.1.1 + * @date 2021/08/09 + * @version 2.2.1 * @brief DWIN screen control functions ********************************************************************************/ @@ -157,7 +157,7 @@ inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t // x/y: Upper-left coordinate // value: Integer value void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, - uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value); + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value); // Draw a positive floating point number // bShow: true=display background color; false=don't display background color @@ -172,6 +172,9 @@ void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t // value: Scaled positive float value void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); +// value: positive float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value); /*---------------------------------------- Picture related functions ----------------------------------------*/ diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp index db082421839e..85353bed28ac 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp @@ -1,8 +1,8 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.6.1 - * Date: 2021/08/29 + * Version: 3.6.3 + * Date: 2021/08/09 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -185,7 +185,7 @@ void DWINUI::Draw_String(uint16_t color, const char * const string, uint16_t rli // fNum: Number of decimal digits // x/y: Upper-left point // value: Float value -void DWINUI::Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { +void DWINUI::Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { if (value < 0) { DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, -value); DWIN_Draw_String(bShow, size, color, bColor, x - 6, y, F("-")); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.h b/Marlin/src/lcd/e3v2/enhanced/dwinui.h index 0aec187049c6..1ec51bec2248 100644 --- a/Marlin/src/lcd/e3v2/enhanced/dwinui.h +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.h @@ -1,8 +1,8 @@ /** * DWIN UI Enhanced implementation * Author: Miguel A. Risco-Castillo - * Version: 3.6.1 - * Date: 2021/08/29 + * Version: 3.6.3 + * Date: 2021/08/09 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as @@ -152,6 +152,7 @@ #define ICON_PIDValue ICON_Contact #define ICON_ProbeOffsetX ICON_StepX #define ICON_ProbeOffsetY ICON_StepY +#define ICON_ProbeOffsetZ ICON_StepZ #define ICON_ProbeSet ICON_SetEndTemp #define ICON_ProbeTest ICON_SetEndTemp #define ICON_Pwrlossr ICON_Motion @@ -392,14 +393,14 @@ namespace DWINUI { // iNum: Number of digits // x/y: Upper-left coordinate // value: Integer value - inline void Draw_Int(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + inline void Draw_Int(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) { DWIN_Draw_IntValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, x, y, value); } - inline void Draw_Int(uint8_t iNum, uint16_t value) { + inline void Draw_Int(uint8_t iNum, long value) { DWIN_Draw_IntValue(false, true, 0, font, textcolor, backcolor, iNum, cursor.x, cursor.y, value); MoveBy(iNum * Get_font_width(font), 0); } - inline void Draw_Int(uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + inline void Draw_Int(uint8_t iNum, uint16_t x, uint16_t y, long value) { DWIN_Draw_IntValue(false, true, 0, font, textcolor, backcolor, iNum, x, y, value); } inline void Draw_Int(uint16_t color, uint8_t iNum, uint16_t x, uint16_t y, long value) { @@ -423,23 +424,23 @@ namespace DWINUI { // fNum: Number of decimal digits // x/y: Upper-left point // value: Float value - inline void Draw_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, value); } - inline void Draw_Float(uint8_t iNum, uint8_t fNum, long value) { + inline void Draw_Float(uint8_t iNum, uint8_t fNum, float value) { DWIN_Draw_FloatValue(false, true, 0, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value); MoveBy((iNum + fNum + 1) * Get_font_width(font), 0); } - inline void Draw_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { DWIN_Draw_FloatValue(false, true, 0, font, textcolor, backcolor, iNum, fNum, x, y, value); } - inline void Draw_Float(uint16_t color, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Float(uint16_t color, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { DWIN_Draw_FloatValue(false, true, 0, font, color, backcolor, iNum, fNum, x, y, value); } - inline void Draw_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { DWIN_Draw_FloatValue(true, true, 0, font, color, bColor, iNum, fNum, x, y, value); } - inline void Draw_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { DWIN_Draw_FloatValue(true, true, 0, size, color, bColor, iNum, fNum, x, y, value); } @@ -453,21 +454,21 @@ namespace DWINUI { // fNum: Number of decimal digits // x/y: Upper-left point // value: Float value - void Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); - inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, long value) { + void Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value); + inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, float value) { Draw_Signed_Float(false, true, 0, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value); MoveBy((iNum + fNum + 1) * Get_font_width(font), 0); } - inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { Draw_Signed_Float(false, true, 0, font, textcolor, backcolor, iNum, fNum, x, y, value); } - inline void Draw_Signed_Float(uint8_t size, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Signed_Float(uint8_t size, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { Draw_Signed_Float(false, true, 0, size, textcolor, backcolor, iNum, fNum, x, y, value); } - inline void Draw_Signed_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Signed_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { Draw_Signed_Float(true, true, 0, font, color, bColor, iNum, fNum, x, y, value); } - inline void Draw_Signed_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + inline void Draw_Signed_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { Draw_Signed_Float(true, true, 0, size, color, bColor, iNum, fNum, x, y, value); } From bcfaf3990a0e7eaac89ae8e075bb089c7dac1b38 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Fri, 10 Sep 2021 01:02:43 +0000 Subject: [PATCH 323/323] [cron] Bump distribution date (2021-09-10) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 54926116e78a..5994181f0a9c 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2021-09-09" +//#define STRING_DISTRIBUTION_DATE "2021-09-10" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 427343637a5c..12c8b6b3ad1f 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-09-09" + #define STRING_DISTRIBUTION_DATE "2021-09-10" #endif /**