G2 v1.3.94

This commit is contained in:
Manuel 2021-01-30 06:07:21 +01:00
parent b77a204566
commit 77fa3cecf9
Signed by: Manuel
GPG key ID: 4085037435E1F07A
23 changed files with 63 additions and 138 deletions

View file

@ -1,5 +1,5 @@
#define CONFIGURATION_H_VERSION 020006 //Last changed working on 1.3.91 #define CONFIGURATION_H_VERSION 020006 //Last changed working on 1.3.94
//=========================================================================== //===========================================================================
//============================= Artillery Options =========================== //============================= Artillery Options ===========================
@ -14,6 +14,7 @@
#ifdef BLTOUCH #ifdef BLTOUCH
#define NOZZLE_TO_PROBE_OFFSET { 31, -31, 0 } #define NOZZLE_TO_PROBE_OFFSET { 31, -31, 0 }
#define WAGGSTER_MOD_WIRING //BLTOUCH to Z+ Z_MAX_PIN (D19) Waggster Mod style wiring, comment out to use Z_MIN_PIN (D18) #define WAGGSTER_MOD_WIRING //BLTOUCH to Z+ Z_MAX_PIN (D19) Waggster Mod style wiring, comment out to use Z_MIN_PIN (D18)
//#define DISABLE_LED // Print Engineering added 8/2-2020 some users report compatibilty issues with BL Touch and LED enabled
#endif #endif
/* 3DPRINTBEGINNER Z MIN SENSOR AS ABL BED MESH PROBE MOD */ /* 3DPRINTBEGINNER Z MIN SENSOR AS ABL BED MESH PROBE MOD */
@ -59,7 +60,6 @@
//#define GraphicalLCD // Will work next to MKS TFT //#define GraphicalLCD // Will work next to MKS TFT
//#define TMC_2209 // Defaults to TMC2100 //#define TMC_2209 // Defaults to TMC2100
//#define TMC_2208 // Defaults to TMC2100, Print Engineering added 7/26-2020 //#define TMC_2208 // Defaults to TMC2100, Print Engineering added 7/26-2020
//#define DISABLE_LED // Print Engineering added 8/2-2020 some users report compatibilty issues with BL Touch and LED enabled
//#define SKR13 //#define SKR13
//#define SKR14 //Print Engineering added 7/26-2020 //#define SKR14 //Print Engineering added 7/26-2020
//=========================================================================== //===========================================================================

View file

@ -2531,7 +2531,7 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag. * M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG) * M122 - Report driver parameters (Requires TMC_DEBUG)
*/ */
#if ENABLED(TMC_2209) || ENABLED(TMC_2208) #if (ENABLED(TMC_2209) || ENABLED(TMC_2208)) && (ENABLED(SKR13) || ENABLED(SKR14))
#define MONITOR_DRIVER_STATUS #define MONITOR_DRIVER_STATUS
#endif #endif
#if ENABLED(MONITOR_DRIVER_STATUS) #if ENABLED(MONITOR_DRIVER_STATUS)

View file

@ -26,12 +26,12 @@
#undef SD_CHECK_AND_RETRY #undef SD_CHECK_AND_RETRY
#endif #endif
#if HAS_SPI_TFT #if HAS_GRAPHICAL_TFT
#error "Sorry! SPI TFT displays are not available for HAL/STM32F1 (yet)." #error "Sorry! TFT displays are not available for HAL/STM32F1."
#endif #endif
// This platform has 'touch/xpt2046', not 'tft/xpt2046' // This platform has 'touch/xpt2046', not 'tft/xpt2046'
#if ENABLED(TOUCH_SCREEN) && !HAS_FSMC_TFT #if ENABLED(TOUCH_SCREEN)
#undef TOUCH_SCREEN #undef TOUCH_SCREEN
#undef TOUCH_SCREEN_CALIBRATION #undef TOUCH_SCREEN_CALIBRATION
#define HAS_TOUCH_XPT2046 1 #define HAS_TOUCH_XPT2046 1

View file

@ -21,7 +21,7 @@
*/ */
/** /**
* feature/powerloss.cpp - Resume an SD print after power-loss * power_loss_recovery.cpp - Resume an SD print after power-loss
*/ */
#include "../inc/MarlinConfigPre.h" #include "../inc/MarlinConfigPre.h"

View file

@ -22,7 +22,7 @@
#pragma once #pragma once
/** /**
* feature/powerloss.h - Resume an SD print after power-loss * power_loss_recovery.h - Resume an SD print after power-loss
*/ */
#include "../sd/cardreader.h" #include "../sd/cardreader.h"

View file

@ -28,9 +28,7 @@
* M997: Perform in-application firmware update * M997: Perform in-application firmware update
*/ */
void GcodeSuite::M997() { void GcodeSuite::M997() {
flashFirmware(parser.intval('S')); flashFirmware(parser.intval('S'));
} }
#endif #endif

View file

@ -997,17 +997,15 @@ void MarlinUI::draw_status_screen() {
#endif // ADVANCED_PAUSE_FEATURE #endif // ADVANCED_PAUSE_FEATURE
// Draw a static item with no left-right margin required. Centered by default. // Draw a static item with no left-right margin required. Centered by default.
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
int8_t n = LCD_WIDTH; int8_t n = LCD_WIDTH;
lcd_moveto(0, row); lcd_moveto(0, row);
const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0, if ((style & SS_CENTER) && !valstr) {
vlen = vstr ? utf8_strlen(vstr) : 0; int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2;
if (style & SS_CENTER) {
int8_t pad = (LCD_WIDTH - plen - vlen) / 2;
while (--pad >= 0) { lcd_put_wchar(' '); n--; } while (--pad >= 0) { lcd_put_wchar(' '); n--; }
} }
if (plen) n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n); n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n);
if (vlen) n -= lcd_put_u8str_max(vstr, n); if (valstr) n -= lcd_put_u8str_max(valstr, n);
for (; n > 0; --n) lcd_put_wchar(' '); for (; n > 0; --n) lcd_put_wchar(' ');
} }

View file

@ -347,21 +347,20 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
} }
// Draw a static line of text in the same idiom as a menu item // 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*/) { void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
if (mark_as_selected(row, style & SS_INVERT)) { if (mark_as_selected(row, style & SS_INVERT)) {
pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0, if ((style & SS_CENTER) && !valstr)
vlen = vstr ? utf8_strlen(vstr) : 0; for (int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2; pad > 0; --pad) {
if (style & SS_CENTER) { lcd_put_wchar(' ');
int8_t pad = (LCD_WIDTH - plen - vlen) / 2; n -= MENU_FONT_WIDTH;
while (--pad >= 0) n -= lcd_put_wchar(' ');
} }
if (plen) n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH); n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH);
if (vlen) n -= lcd_put_u8str_max(vstr, n); if (valstr) n -= lcd_put_u8str_max(valstr, n);
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' '); while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
} }
} }

View file

@ -99,7 +99,6 @@
#endif #endif
#define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr)
#define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u) #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u)
int lcd_glyph_height(); int lcd_glyph_height();

View file

@ -83,7 +83,7 @@ class MenuItemBase {
class MenuItem_static : public MenuItemBase { class MenuItem_static : public MenuItemBase {
public: public:
static void draw(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_DEFAULT, const char * const vstr=nullptr); static void draw(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_DEFAULT, const char * const valstr=nullptr);
}; };
// CONFIRM_ITEM(LABEL,Y,N,FY,FN,V...), // CONFIRM_ITEM(LABEL,Y,N,FY,FN,V...),
@ -418,17 +418,16 @@ class MenuItem_bool : public MenuEditItemBase {
}while(0) }while(0)
#define _MENU_ITEM_P(TYPE, V...) do { \ #define _MENU_ITEM_P(TYPE, V...) do { \
if (_menuLineNr == _thisItemNr) { \
_skipStatic = false; \ _skipStatic = false; \
if (_menuLineNr == _thisItemNr) \
_MENU_INNER_P(TYPE, ##V); \ _MENU_INNER_P(TYPE, ##V); \
} \
NEXT_ITEM(); \ NEXT_ITEM(); \
}while(0) }while(0)
// Indexed items set a global index value and optional data // Indexed items set a global index value and optional data
#define _MENU_ITEM_N_S_P(TYPE, N, S, V...) do{ \ #define _MENU_ITEM_N_S_P(TYPE, N, S, V...) do{ \
if (_menuLineNr == _thisItemNr) { \
_skipStatic = false; \ _skipStatic = false; \
if (_menuLineNr == _thisItemNr) { \
MenuItemBase::init(N, S); \ MenuItemBase::init(N, S); \
_MENU_INNER_P(TYPE, ##V); \ _MENU_INNER_P(TYPE, ##V); \
} \ } \
@ -437,8 +436,8 @@ class MenuItem_bool : public MenuEditItemBase {
// Indexed items set a global index value // Indexed items set a global index value
#define _MENU_ITEM_N_P(TYPE, N, V...) do{ \ #define _MENU_ITEM_N_P(TYPE, N, V...) do{ \
if (_menuLineNr == _thisItemNr) { \
_skipStatic = false; \ _skipStatic = false; \
if (_menuLineNr == _thisItemNr) { \
MenuItemBase::itemIndex = N; \ MenuItemBase::itemIndex = N; \
_MENU_INNER_P(TYPE, ##V); \ _MENU_INNER_P(TYPE, ##V); \
} \ } \
@ -447,8 +446,8 @@ class MenuItem_bool : public MenuEditItemBase {
// Items with a unique string // Items with a unique string
#define _MENU_ITEM_S_P(TYPE, S, V...) do{ \ #define _MENU_ITEM_S_P(TYPE, S, V...) do{ \
if (_menuLineNr == _thisItemNr) { \
_skipStatic = false; \ _skipStatic = false; \
if (_menuLineNr == _thisItemNr) { \
MenuItemBase::itemString = S; \ MenuItemBase::itemString = S; \
_MENU_INNER_P(TYPE, ##V); \ _MENU_INNER_P(TYPE, ##V); \
} \ } \
@ -551,17 +550,16 @@ class MenuItem_bool : public MenuEditItemBase {
// Indexed items set a global index value and optional data // Indexed items set a global index value and optional data
#define _CONFIRM_ITEM_P(PLABEL, V...) do { \ #define _CONFIRM_ITEM_P(PLABEL, V...) do { \
if (_menuLineNr == _thisItemNr) { \
_skipStatic = false; \ _skipStatic = false; \
if (_menuLineNr == _thisItemNr) \
_CONFIRM_ITEM_INNER_P(PLABEL, ##V); \ _CONFIRM_ITEM_INNER_P(PLABEL, ##V); \
} \
NEXT_ITEM(); \ NEXT_ITEM(); \
}while(0) }while(0)
// Indexed items set a global index value // Indexed items set a global index value
#define _CONFIRM_ITEM_N_S_P(N, S, V...) do{ \ #define _CONFIRM_ITEM_N_S_P(N, S, V...) do{ \
if (_menuLineNr == _thisItemNr) { \
_skipStatic = false; \ _skipStatic = false; \
if (_menuLineNr == _thisItemNr) { \
MenuItemBase::init(N, S); \ MenuItemBase::init(N, S); \
_CONFIRM_ITEM_INNER_P(TYPE, ##V); \ _CONFIRM_ITEM_INNER_P(TYPE, ##V); \
} \ } \

View file

@ -25,6 +25,6 @@
#define MENU_ITEM_ADDON_START(X) do{ \ #define MENU_ITEM_ADDON_START(X) do{ \
if (ui.should_draw() && _menuLineNr == _thisItemNr - 1) { \ if (ui.should_draw() && _menuLineNr == _thisItemNr - 1) { \
SETCURSOR_X(X) SETCURSOR(X, _lcdLineNr)
#define MENU_ITEM_ADDON_END() } }while(0) #define MENU_ITEM_ADDON_END() } }while(0)

View file

@ -66,7 +66,7 @@ void menu_advanced_settings();
bar_percent += (int8_t)ui.encoderPosition; bar_percent += (int8_t)ui.encoderPosition;
LIMIT(bar_percent, 0, 100); LIMIT(bar_percent, 0, 100);
ui.encoderPosition = 0; ui.encoderPosition = 0;
MenuItem_static::draw(0, GET_TEXT(MSG_PROGRESS_BAR_TEST), SS_DEFAULT|SS_INVERT); MenuItem_static::draw(0, GET_TEXT(MSG_PROGRESS_BAR_TEST), SS_CENTER|SS_INVERT);
lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_wchar('%'); lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_wchar('%');
lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent); lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent);
} }
@ -307,7 +307,7 @@ void menu_advanced_settings();
#define MAXTEMP_ALL _MAX(REPEAT(HOTENDS, _MAXTEMP_ITEM) 0) #define MAXTEMP_ALL _MAX(REPEAT(HOTENDS, _MAXTEMP_ITEM) 0)
const uint8_t m = MenuItemBase::itemIndex; const uint8_t m = MenuItemBase::itemIndex;
START_MENU(); START_MENU();
STATIC_ITEM_P(ui.get_preheat_label(m), SS_DEFAULT|SS_INVERT); STATIC_ITEM_P(ui.get_preheat_label(m), SS_CENTER|SS_INVERT);
BACK_ITEM(MSG_CONFIGURATION); BACK_ITEM(MSG_CONFIGURATION);
#if HAS_FAN #if HAS_FAN
editable.uint8 = uint8_t(ui.material_preset[m].fan_speed); editable.uint8 = uint8_t(ui.material_preset[m].fan_speed);

View file

@ -87,7 +87,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
_change_filament_mode = mode; _change_filament_mode = mode;
_change_filament_extruder = extruder; _change_filament_extruder = extruder;
START_MENU(); START_MENU();
if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_DEFAULT|SS_INVERT); if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_CENTER|SS_INVERT);
BACK_ITEM(MSG_BACK); BACK_ITEM(MSG_BACK);
#if PREHEAT_COUNT #if PREHEAT_COUNT
LOOP_L_N(m, PREHEAT_COUNT) LOOP_L_N(m, PREHEAT_COUNT)
@ -266,7 +266,7 @@ void _lcd_pause_message(PGM_P const msg) {
skip1 = !has2 && (LCD_HEIGHT) >= 5; skip1 = !has2 && (LCD_HEIGHT) >= 5;
START_SCREEN(); START_SCREEN();
STATIC_ITEM_P(pause_header(), SS_DEFAULT|SS_INVERT); // 1: Header STATIC_ITEM_P(pause_header(), SS_CENTER|SS_INVERT); // 1: Header
if (skip1) SKIP_ITEM(); // Move a single-line message down if (skip1) SKIP_ITEM(); // Move a single-line message down
STATIC_ITEM_P(msg1); // 2: Message Line 1 STATIC_ITEM_P(msg1); // 2: Message Line 1
if (has2) STATIC_ITEM_P(msg2); // 3: Message Line 2 if (has2) STATIC_ITEM_P(msg2); // 3: Message Line 2

View file

@ -205,7 +205,7 @@ void menu_info_board() {
if (ui.use_click()) return ui.go_back(); if (ui.use_click()) return ui.go_back();
START_SCREEN(); START_SCREEN();
STATIC_ITEM_P(PSTR(BOARD_INFO_NAME), SS_DEFAULT|SS_INVERT); // MyPrinterController STATIC_ITEM_P(PSTR(BOARD_INFO_NAME), SS_CENTER|SS_INVERT); // MyPrinterController
#ifdef BOARD_WEBSITE_URL #ifdef BOARD_WEBSITE_URL
STATIC_ITEM_P(PSTR(BOARD_WEBSITE_URL), SS_LEFT); // www.my3dprinter.com STATIC_ITEM_P(PSTR(BOARD_WEBSITE_URL), SS_LEFT); // www.my3dprinter.com
#endif #endif
@ -237,7 +237,7 @@ void menu_info_board() {
void menu_info_printer() { void menu_info_printer() {
if (ui.use_click()) return ui.go_back(); if (ui.use_click()) return ui.go_back();
START_SCREEN(); START_SCREEN();
STATIC_ITEM(MSG_MARLIN, SS_DEFAULT|SS_INVERT); // Marlin STATIC_ITEM(MSG_MARLIN, SS_CENTER|SS_INVERT); // Marlin
STATIC_ITEM_P(PSTR(SHORT_BUILD_VERSION)); // x.x.x-Branch 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(STRING_DISTRIBUTION_DATE)); // YYYY-MM-DD HH:MM
STATIC_ITEM_P(PSTR(MACHINE_NAME)); // My3DPrinter STATIC_ITEM_P(PSTR(MACHINE_NAME)); // My3DPrinter

View file

@ -37,7 +37,7 @@
void menu_led_presets() { void menu_led_presets() {
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_LED_PRESETS, SS_DEFAULT|SS_INVERT); STATIC_ITEM(MSG_LED_PRESETS, SS_CENTER|SS_INVERT);
#endif #endif
BACK_ITEM(MSG_LED_CONTROL); BACK_ITEM(MSG_LED_CONTROL);
ACTION_ITEM(MSG_SET_LEDS_WHITE, leds.set_white); ACTION_ITEM(MSG_SET_LEDS_WHITE, leds.set_white);

View file

@ -131,7 +131,7 @@ inline void action_mmu2_choose(const uint8_t tool) {
void menu_mmu2_choose_filament() { void menu_mmu2_choose_filament() {
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, SS_DEFAULT|SS_INVERT); STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, SS_CENTER|SS_INVERT);
#endif #endif
LOOP_L_N(i, 5) ACTION_ITEM_N(i, MSG_MMU2_FILAMENT_N, []{ action_mmu2_choose(MenuItemBase::itemIndex); }); LOOP_L_N(i, 5) ACTION_ITEM_N(i, MSG_MMU2_FILAMENT_N, []{ action_mmu2_choose(MenuItemBase::itemIndex); });
END_MENU(); END_MENU();
@ -145,7 +145,7 @@ void menu_mmu2_pause() {
currentTool = mmu2.get_current_tool(); currentTool = mmu2.get_current_tool();
START_MENU(); START_MENU();
#if LCD_HEIGHT > 2 #if LCD_HEIGHT > 2
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, SS_DEFAULT|SS_INVERT); STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, SS_CENTER|SS_INVERT);
#endif #endif
ACTION_ITEM(MSG_MMU2_RESUME, []{ mmuMenuWait = false; }); ACTION_ITEM(MSG_MMU2_RESUME, []{ mmuMenuWait = false; });
ACTION_ITEM(MSG_MMU2_UNLOAD_FILAMENT, []{ mmu2.unload(); }); ACTION_ITEM(MSG_MMU2_UNLOAD_FILAMENT, []{ mmu2.unload(); });

View file

@ -178,12 +178,12 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
START_MENU(); START_MENU();
if (LCD_HEIGHT >= 4) { if (LCD_HEIGHT >= 4) {
switch (axis) { switch (axis) {
case X_AXIS: STATIC_ITEM(MSG_MOVE_X, SS_DEFAULT|SS_INVERT); break; case X_AXIS: STATIC_ITEM(MSG_MOVE_X, SS_CENTER|SS_INVERT); break;
case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, SS_DEFAULT|SS_INVERT); break; case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, SS_CENTER|SS_INVERT); break;
case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, SS_DEFAULT|SS_INVERT); break; case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, SS_CENTER|SS_INVERT); break;
default: default:
TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e); TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e);
STATIC_ITEM(MSG_MOVE_E, SS_DEFAULT|SS_INVERT); STATIC_ITEM(MSG_MOVE_E, SS_CENTER|SS_INVERT);
break; break;
} }
} }

View file

@ -22,6 +22,7 @@
#if ENABLED(TOUCH_SCREEN) #if ENABLED(TOUCH_SCREEN)
#include "touch.h" #include "touch.h"
#include "pinconfig.h"
#include "../ultralcd.h" #include "../ultralcd.h"
#include "../menu/menu.h" #include "../menu/menu.h"

View file

@ -341,11 +341,11 @@ void MarlinUI::draw_status_screen() {
} }
// Draw a static item with no left-right margin required. Centered by default. // Draw a static item with no left-right margin required. Centered by default.
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
menu_item(row); menu_item(row);
tft_string.set(pstr, itemIndex, itemString); tft_string.set(pstr, itemIndex, itemString);
if (vstr) if (valstr)
tft_string.add(vstr); tft_string.add(valstr);
tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string); tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string);
} }

View file

@ -345,11 +345,11 @@ void MarlinUI::draw_status_screen() {
} }
// Draw a static item with no left-right margin required. Centered by default. // Draw a static item with no left-right margin required. Centered by default.
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
menu_item(row); menu_item(row);
tft_string.set(pstr, itemIndex, itemString); tft_string.set(pstr, itemIndex, itemString);
if (vstr) if (valstr)
tft_string.add(vstr); tft_string.add(valstr);
tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string); tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string);
} }

View file

@ -215,29 +215,6 @@
#define XPT2046_Y_MAX 1900 #define XPT2046_Y_MAX 1900
#define XPT2046_AVG 4 #define XPT2046_AVG 4
#define XPT2046_INV 0 #define XPT2046_INV 0
#elif ENABLED(TFT_480x320)
#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 XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9
#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_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#endif #endif
// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available // SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available

View file

@ -156,29 +156,6 @@
#define XPT2046_Y_OFFSET -20 #define XPT2046_Y_OFFSET -20
#endif #endif
#endif #endif
#elif ENABLED(TFT_480x320)
#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 XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9
#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_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#endif #endif
// SPI Flash // SPI Flash

View file

@ -215,28 +215,6 @@
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif #endif
#elif ENABLED(TFT_480x320)
#define TFT_RESET_PIN PC6
#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 XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9
#define TOUCH_CS_PIN PA7 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#define TFT_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#endif #endif
#define SPI_FLASH #define SPI_FLASH