Skip to content

Commit f6ffbe5

Browse files
authored
TFT Presets, Generic options, Sanity checks (#19723)
1 parent 04c2757 commit f6ffbe5

File tree

116 files changed

+579
-585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+579
-585
lines changed

Marlin/Configuration.h

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*
3636
* Advanced settings can be found in Configuration_adv.h
3737
*/
38-
#define CONFIGURATION_H_VERSION 020007
38+
#define CONFIGURATION_H_VERSION 020008
3939

4040
//===========================================================================
4141
//============================= Getting Started =============================
@@ -2205,22 +2205,83 @@
22052205
//=============================================================================
22062206

22072207
/**
2208-
* TFT Type - Select your Display type
2209-
*
2210-
* Available options are:
2211-
* MKS_TS35_V2_0,
2212-
* MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35,
2213-
* MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R
2214-
* TFT_TRONXY_X5SA, ANYCUBIC_TFT35, LONGER_LK_TFT28
2215-
* TFT_GENERIC
2216-
*
2217-
* For TFT_GENERIC, you need to configure these 3 options:
2218-
* Driver: TFT_DRIVER
2219-
* Current Drivers are: AUTO, ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
2220-
* Resolution: TFT_WIDTH and TFT_HEIGHT
2221-
* Interface: TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
2208+
* Specific TFT Model Presets. Enable one of the following options
2209+
* or enable TFT_GENERIC and set sub-options.
22222210
*/
2211+
2212+
//
2213+
// 480x320, 3.5", SPI Display From MKS
2214+
// Normally used in MKS Robin Nano V2
2215+
//
2216+
//#define MKS_TS35_V2_0
2217+
2218+
//
2219+
// 320x240, 2.4", FSMC Display From MKS
2220+
// Normally used in MKS Robin Nano V1.2
2221+
//
2222+
//#define MKS_ROBIN_TFT24
2223+
2224+
//
2225+
// 320x240, 2.8", FSMC Display From MKS
2226+
// Normally used in MKS Robin Nano V1.2
2227+
//
2228+
//#define MKS_ROBIN_TFT28
2229+
2230+
//
2231+
// 320x240, 3.2", FSMC Display From MKS
2232+
// Normally used in MKS Robin Nano V1.2
2233+
//
2234+
//#define MKS_ROBIN_TFT32
2235+
2236+
//
2237+
// 480x320, 3.5", FSMC Display From MKS
2238+
// Normally used in MKS Robin Nano V1.2
2239+
//
2240+
//#define MKS_ROBIN_TFT35
2241+
2242+
//
2243+
// 480x272, 4.3", FSMC Display From MKS
2244+
//
2245+
//#define MKS_ROBIN_TFT43
2246+
2247+
//
2248+
// 320x240, 3.2", FSMC Display From MKS
2249+
// Normally used in MKS Robin
2250+
//
2251+
//#define MKS_ROBIN_TFT_V1_1R
2252+
2253+
//
2254+
// 480x320, 3.5", FSMC Stock Display from TronxXY
2255+
//
2256+
//#define TFT_TRONXY_X5SA
2257+
2258+
//
2259+
// 480x320, 3.5", FSMC Stock Display from AnyCubic
2260+
//
2261+
//#define ANYCUBIC_TFT35
2262+
2263+
//
2264+
// 320x240, 2.8", FSMC Stock Display from Longer/Alfawise
2265+
//
2266+
//#define LONGER_LK_TFT28
2267+
2268+
//
2269+
// Generic TFT with detailed options
2270+
//
22232271
//#define TFT_GENERIC
2272+
#if ENABLED(TFT_GENERIC)
2273+
// :[ 'AUTO', 'ST7735', 'ST7789', 'ST7796', 'R61505', 'ILI9328', 'ILI9341', 'ILI9488' ]
2274+
#define TFT_DRIVER AUTO
2275+
2276+
// Interface. Enable one of the following options:
2277+
//#define TFT_INTERFACE_FSMC
2278+
//#define TFT_INTERFACE_SPI
2279+
2280+
// TFT Resolution. Enable one of the following options:
2281+
//#define TFT_RES_320x240
2282+
//#define TFT_RES_480x272
2283+
//#define TFT_RES_480x320
2284+
#endif
22242285

22252286
/**
22262287
* TFT UI - User Interface Selection. Enable one of the following options:

Marlin/Configuration_adv.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* Basic settings can be found in Configuration.h
3232
*/
33-
#define CONFIGURATION_ADV_H_VERSION 020007
33+
#define CONFIGURATION_ADV_H_VERSION 020008
3434

3535
//===========================================================================
3636
//============================= Thermal Settings ============================
@@ -1048,10 +1048,10 @@
10481048

10491049
// @section lcd
10501050

1051-
#if EITHER(ULTIPANEL, EXTENSIBLE_UI)
1051+
#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI)
10521052
#define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel
10531053
#define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm)
1054-
#if ENABLED(ULTIPANEL)
1054+
#if IS_ULTIPANEL
10551055
#define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
10561056
#define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen
10571057
#endif

Marlin/src/HAL/LPC1768/inc/SanityCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
7272
//#endif
7373

7474
#if MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
75-
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
75+
#if IS_RRD_FG_SC && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
7676
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 requires TMC_USE_SW_SPI."
7777
#endif
7878
#endif

Marlin/src/HAL/STM32F1/HAL.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const uint8_t adc_pins[] = {
130130
#if ENABLED(FILAMENT_WIDTH_SENSOR)
131131
FILWIDTH_PIN,
132132
#endif
133-
#if ENABLED(ADC_KEYPAD)
133+
#if HAS_ADC_BUTTONS
134134
ADC_KEYPAD_PIN,
135135
#endif
136136
#if HAS_JOY_ADC_X
@@ -187,7 +187,7 @@ enum TempPinIndex : char {
187187
#if ENABLED(FILAMENT_WIDTH_SENSOR)
188188
FILWIDTH,
189189
#endif
190-
#if ENABLED(ADC_KEYPAD)
190+
#if HAS_ADC_BUTTONS
191191
ADC_KEY,
192192
#endif
193193
#if HAS_JOY_ADC_X
@@ -389,7 +389,7 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
389389
#if ENABLED(FILAMENT_WIDTH_SENSOR)
390390
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
391391
#endif
392-
#if ENABLED(ADC_KEYPAD)
392+
#if HAS_ADC_BUTTONS
393393
case ADC_KEYPAD_PIN: pin_index = ADC_KEY; break;
394394
#endif
395395
#if ENABLED(POWER_MONITOR_CURRENT)

Marlin/src/core/macros.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
#define _DO_12(W,C,A,V...) (_##W##_1(A) C _DO_11(W,C,V))
171171
#define __DO_N(W,C,N,V...) _DO_##N(W,C,V)
172172
#define _DO_N(W,C,N,V...) __DO_N(W,C,N,V)
173-
#define DO(W,C,V...) _DO_N(W,C,NUM_ARGS(V),V)
173+
#define DO(W,C,V...) (_DO_N(W,C,NUM_ARGS(V),V))
174174

175175
// Macros to support option testing
176176
#define _CAT(a,V...) a##V
@@ -186,6 +186,7 @@
186186
#define _DIS_1(O) NOT(_ENA_1(O))
187187
#define ENABLED(V...) DO(ENA,&&,V)
188188
#define DISABLED(V...) DO(DIS,&&,V)
189+
#define COUNT_ENABLED(V...) DO(ENA,+,V)
189190

190191
#define TERN(O,A,B) _TERN(_ENA_1(O),B,A) // OPTION converted to '0' or '1'
191192
#define TERN0(O,A) _TERN(_ENA_1(O),0,A) // OPTION converted to A or '0'
@@ -200,6 +201,7 @@
200201
#define ALL(V...) ENABLED(V)
201202
#define BOTH(V1,V2) ALL(V1,V2)
202203
#define EITHER(V1,V2) ANY(V1,V2)
204+
#define MANY(V...) (COUNT_ENABLED(V) > 1)
203205

204206
// Macros to support pins/buttons exist testing
205207
#define PIN_EXISTS(PN) (defined(PN##_PIN) && PN##_PIN >= 0)

Marlin/src/feature/bedlevel/ubl/ubl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class unified_bed_leveling {
5959
static int g29_grid_size;
6060
#endif
6161

62-
#if ENABLED(NEWPANEL)
62+
#if IS_NEWPANEL
6363
static void move_z_with_encoder(const float &multiplier);
6464
static float measure_point_with_encoder();
6565
static float measure_business_card_thickness(float in_height);

0 commit comments

Comments
 (0)