From 415c155949c41686dda2d4340fc407555ddb532e Mon Sep 17 00:00:00 2001 From: norbert-walter Date: Sat, 28 Feb 2026 16:18:14 +0100 Subject: [PATCH] Fix for display output to mechanical center adjusted --- lib/obp60task/OBP60Extensions.h | 14 +++++++------- lib/obp60task/OBP60Hardware.h | 2 +- lib/obp60task/platformio.ini | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/obp60task/OBP60Extensions.h b/lib/obp60task/OBP60Extensions.h index 9eab0f9..4599aa3 100644 --- a/lib/obp60task/OBP60Extensions.h +++ b/lib/obp60task/OBP60Extensions.h @@ -104,15 +104,15 @@ public: cfg.pin_cs = OBP_SPI_CS; cfg.pin_rst = OBP_SPI_RST; cfg.pin_busy = -1; - cfg.panel_width = 480; - cfg.panel_height = 320; - cfg.offset_x = 40; - cfg.offset_y = 10; - cfg.offset_rotation = 3; + cfg.panel_width = 320; // Native width resolution + cfg.panel_height = 480; // Native hight resolution + cfg.offset_x = 10; // Display output 400x300 pix to housing center adjusted + cfg.offset_y = -20; // Display output 400x300 pix to housing center adjusted + cfg.offset_rotation = 3; // Rotate display content conter clock wise 90 deg cfg.dummy_read_pixel = 8; cfg.dummy_read_bits = 1; - cfg.memory_width = 480; - cfg.memory_height = 320; + cfg.memory_width = 320; + cfg.memory_height = 480; // cfg.pwm_control not available in this LovyanGFX version cfg.invert = false; cfg.rgb_order = false; diff --git a/lib/obp60task/OBP60Hardware.h b/lib/obp60task/OBP60Hardware.h index 6d038d3..5aec5ac 100644 --- a/lib/obp60task/OBP60Hardware.h +++ b/lib/obp60task/OBP60Hardware.h @@ -34,7 +34,7 @@ #define PCF8574_I2C_ADDR1 0x20 // First digital out module // FRAM (e.g. MB85RC256V) #define FRAM_I2C_ADDR 0x50 - // SPI (E-Ink display, Extern Bus) + // SPI (E-paper display, TFT display Extern Bus) #define OBP_SPI_CS 39 #define OBP_SPI_DC 40 #define OBP_SPI_RST 41 diff --git a/lib/obp60task/platformio.ini b/lib/obp60task/platformio.ini index 1abd66b..71fbcbc 100644 --- a/lib/obp60task/platformio.ini +++ b/lib/obp60task/platformio.ini @@ -55,10 +55,10 @@ build_flags= # -D HARDWARE_V20 #OBP60 hardware revision V2.0 -D HARDWARE_V21 #OBP60 hardware revision V2.1 # -D DISPLAY_GDEW042T2 #old E-Ink display from GoodDisplay (Waveshare), R10 0.47 ohm - very good - -D DISPLAY_GDEY042T81 #new E-Ink display from GoodDisplay (Waveshare), R10 2.2 ohm - good (contast lost by shunshine) +# -D DISPLAY_GDEY042T81 #new E-Ink display from GoodDisplay (Waveshare), R10 2.2 ohm - good (contast lost by shunshine) # -D DISPLAY_GYE042A87 #alternativ E-Ink display from Genyo Optical, R10 2.2 ohm - medium # -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm - bad (burn in effects) -# -D DISPLAY_ST7796 #ST7796 TFT LCD display (480x320 color display) + -D DISPLAY_ST7796 #ST7796 TFT LCD display (480x320 color display) # -D DISPLAY_ZJY400300-042CAAMFGN #alternativ E-Ink display from ZZE Technology, R10 2.2 ohm - very good # -D ENABLE_PATCHES #enable patching of gateway code ${env.build_flags}