Clean up TFT / Touch code (#18296)

This commit is contained in:
Victor
2020-06-15 22:51:12 -03:00
committed by GitHub
parent 884e2146a1
commit 6d571a547c
4 changed files with 37 additions and 9 deletions

View File

@ -73,10 +73,6 @@
extern void LCD_IO_WriteMultiple(uint16_t color, uint32_t count);
#endif
#ifndef FSMC_UPSCALE
#define FSMC_UPSCALE 2
#endif
#define WIDTH LCD_PIXEL_WIDTH
#define HEIGHT LCD_PIXEL_HEIGHT
#define PAGE_HEIGHT 8

View File

@ -254,4 +254,8 @@
#define INFO_FONT_HEIGHT (INFO_FONT_ASCENT + INFO_FONT_DESCENT)
#define INFO_FONT_WIDTH 6
#ifndef FSMC_UPSCALE
#define FSMC_UPSCALE 2
#endif
extern U8G_CLASS u8g;

View File

@ -1455,7 +1455,7 @@ void MarlinUI::update() {
encoderDiff = ENCODER_PULSES_PER_STEP * ydir;
else if (screen_items > 0) {
// Last 3 cols act as a scroll :-)
if (col > (LCD_WIDTH) - 3)
if (col > (LCD_WIDTH) - 5)
// 2 * LCD_HEIGHT to scroll to bottom of next page. (LCD_HEIGHT would only go 1 item down.)
encoderDiff = ENCODER_PULSES_PER_STEP * (encoderLine - encoderTopLine + 2 * (LCD_HEIGHT)) * ydir;
else