Browse Source

Permit touch calibration override

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
committed by Scott Lahteine
parent
commit
fde169d3ef
  1. 8
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
  2. 32
      Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h
  3. 34
      Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h
  4. 58
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h
  5. 12
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h
  6. 85
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h
  7. 50
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h

8
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h

@ -303,11 +303,19 @@
// Emulated DOGM have xpt calibration values independent of display resolution
#if ENABLED(SPI_GRAPHICAL_TFT)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -11245
#endif
#ifdef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 8629
#endif
#ifdef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 685
#endif
#ifdef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -285
#endif
#endif
#elif IS_TFTGLCD_PANEL

32
Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h

@ -105,8 +105,10 @@
#define FIL_RUNOUT_PIN PA15
// SPI Flash
#define SPI_FLASH_SIZE 0x200000 // 2MB
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x200000 // 2MB
#endif
// SPI 2
#define W25QXX_CS_PIN PB12
@ -146,38 +148,36 @@
#endif
#if HAS_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
#define XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9
#elif ENABLED(TFT_480x320)
// Color UI
#define TFT_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#elif ENABLED(FSMC_GRAPHICAL_TFT)
// Emulated DOGM
#define GRAPHICAL_TFT_UPSCALE 3
#endif
#if EITHER(HAS_TFT_LVGL_UI, TFT_480x320)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -17181
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 11434
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 501
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -9
#endif
#elif ENABLED(FSMC_GRAPHICAL_TFT)
// Emulated DOGM
#define GRAPHICAL_TFT_UPSCALE 3
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -12316
#endif

34
Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h

@ -120,8 +120,10 @@
#endif
// SPI Flash
#define SPI_FLASH_SIZE 0x200000 // 2MB
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x200000 // 2MB
#endif
// SPI 2
#define W25QXX_CS_PIN PB12
@ -158,36 +160,37 @@
#endif
// LVGL Configs
#if HAS_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
#define XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9
// Color UI Configs
#elif ENABLED(TFT_480x320)
// Color UI
#define TFT_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#elif ENABLED(FSMC_GRAPHICAL_TFT)
// Emulated DOGM
#define GRAPHICAL_TFT_UPSCALE 3
#endif
#if EITHER(HAS_TFT_LVGL_UI, TFT_480x320)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -17181
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 11434
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 501
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -9
// Emulated DOGM
#endif
#elif ENABLED(FSMC_GRAPHICAL_TFT)
#define GRAPHICAL_TFT_UPSCALE 3
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -12316
#endif
@ -200,7 +203,6 @@
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -20
#endif
#endif
// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available

58
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h

@ -269,32 +269,8 @@
#endif
#if ENABLED(TFT_LVGL_UI_SPI)
// LVGL
#define XPT2046_X_CALIBRATION -17253
#define XPT2046_Y_CALIBRATION 11579
#define XPT2046_X_OFFSET 514
#define XPT2046_Y_OFFSET -24
#elif ENABLED(SPI_GRAPHICAL_TFT)
#if ENABLED(SPI_GRAPHICAL_TFT)
// Emulated DOGM SPI
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -11386
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 8684
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 339
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -18
#endif
#ifndef GRAPHICAL_TFT_UPSCALE
#define GRAPHICAL_TFT_UPSCALE 3
#endif
@ -310,14 +286,36 @@
#define LCD_PINS_RS PC6
#elif ENABLED(TFT_480x320_SPI)
#define TFT_DRIVER ST7796
#define TFT_BUFFER_SIZE 14400
#endif
#if EITHER(HAS_TFT_LVGL_UI, TFT_480x320_SPI)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -17253
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 11579
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 514
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -24
#define TFT_DRIVER ST7796
#define TFT_BUFFER_SIZE 14400
#endif
#elif ENABLED(SPI_GRAPHICAL_TFT)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -11386
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 8684
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 339
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -18
#endif
#endif
#if HAS_WIRED_LCD && !HAS_SPI_TFT
@ -364,8 +362,8 @@
#endif // HAS_WIRED_LCD && !HAS_SPI_TFT
#define HAS_SPI_FLASH 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#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

12
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h

@ -139,10 +139,20 @@
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if ENABLED(TOUCH_SCREEN)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION 12033
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION -9047
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET -30
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET 254
#endif
#endif
#if ENABLED(FSMC_GRAPHICAL_TFT)
@ -191,8 +201,8 @@
#endif
#define HAS_SPI_FLASH 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#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

85
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h

@ -195,25 +195,8 @@
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
#endif
// LVGL Configs
#if ENABLED(TFT_LVGL_UI_FSMC)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION 17880
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION -12234
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET -45
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET 349
#endif
// Emulated DOGM Configs
#elif ENABLED(FSMC_GRAPHICAL_TFT)
#if ENABLED(FSMC_GRAPHICAL_TFT)
// Emulated DOGM
#define DOGLCD_MOSI -1 // prevent redefine Conditionals_post.h
#define DOGLCD_SCK -1
@ -233,19 +216,6 @@
#define TFT_PIXEL_OFFSET_Y 32
#endif
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION 12149
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION -8746
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET -35
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET 256
#endif
#elif ENABLED(TFT_320x240) // TFT32/28
#define TFT_RESET_PIN PC6
#define TFT_BACKLIGHT_PIN PD13
@ -256,19 +226,6 @@
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -12246
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 9453
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 360
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -22
#endif
#define TOUCH_CS_PIN PA7 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
@ -285,6 +242,12 @@
#define ILI9341_COLOR_RGB
#elif ENABLED(TFT_480x320)
#define TFT_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#define ILI9488_ORIENTATION ILI9488_MADCTL_MX | ILI9488_MADCTL_MV
#endif
#if EITHER(TFT_LVGL_UI_FSMC, TFT_480x320)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION 17880
#endif
@ -297,15 +260,37 @@
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET 349
#endif
#define TFT_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#define ILI9488_ORIENTATION ILI9488_MADCTL_MX | ILI9488_MADCTL_MV
#elif ENABLED(FSMC_GRAPHICAL_TFT)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION 12149
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION -8746
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET -35
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET 256
#endif
#elif ENABLED(TFT_320x240) // TFT32/28
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -12246
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 9453
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 360
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -22
#endif
#endif
#define HAS_SPI_FLASH 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#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

50
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h

@ -281,32 +281,8 @@
#endif
#if ENABLED(TFT_LVGL_UI_SPI)
// LVGL
#define XPT2046_X_CALIBRATION -17253
#define XPT2046_Y_CALIBRATION 11579
#define XPT2046_X_OFFSET 514
#define XPT2046_Y_OFFSET -24
#elif ENABLED(SPI_GRAPHICAL_TFT)
#if ENABLED(SPI_GRAPHICAL_TFT)
// Emulated DOGM SPI
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -11386
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 8684
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 339
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -18
#endif
#ifndef GRAPHICAL_TFT_UPSCALE
#define GRAPHICAL_TFT_UPSCALE 3
#endif
@ -322,6 +298,11 @@
#define LCD_PINS_RS PC6
#elif ENABLED(TFT_480x320_SPI)
#define TFT_DRIVER ST7796
#define TFT_BUFFER_SIZE 14400
#endif
#if EITHER(TFT_LVGL_UI_SPI, TFT_480x320_SPI)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -17253
#endif
@ -334,10 +315,19 @@
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -24
#endif
#define TFT_DRIVER ST7796
#define TFT_BUFFER_SIZE 14400
#elif ENABLED(SPI_GRAPHICAL_TFT)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -11386
#endif
#ifndef XPT2046_Y_CALIBRATION
#define XPT2046_Y_CALIBRATION 8684
#endif
#ifndef XPT2046_X_OFFSET
#define XPT2046_X_OFFSET 339
#endif
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -18
#endif
#endif
#if HAS_WIRED_LCD && !HAS_SPI_TFT
@ -393,8 +383,8 @@
#endif // HAS_WIRED_LCD && !HAS_SPI_TFT
#define HAS_SPI_FLASH 1
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#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

Loading…
Cancel
Save