File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ display. It also plays a sound when you touch the screen using the buzzer on the
7
7
system, and it changes the frequency of the sound based on the position of the
8
8
touch.
9
9
10
+ <img width =" 1260 " height =" 949 " alt =" image " src =" https://github.com/user-attachments/assets/06403f4d-ffe4-4ed8-8eca-f6d1d85a878c " />
11
+
12
+ Older images from when the color / size was incorrectly set:
10
13
<img width =" 1260 " height =" 949 " alt =" image " src =" https://github.com/user-attachments/assets/17e8def4-0d64-4e9e-8cee-dc2753a657a6 " />
11
14
<img width =" 1260 " height =" 949 " alt =" image " src =" https://github.com/user-attachments/assets/512ca611-1ab0-4941-b4a3-4ef22d65e567 " />
12
15
@@ -37,6 +40,9 @@ See the Getting Started Guide for full steps to configure and use ESP-IDF to bui
37
40
38
41
<img width =" 777 " height =" 604 " alt =" CleanShot 2025-07-13 at 22 01 56 " src =" https://github.com/user-attachments/assets/02ea3513-7af9-43bb-96e4-10706f31f831 " />
39
42
43
+ <img width =" 1260 " height =" 949 " alt =" image " src =" https://github.com/user-attachments/assets/06403f4d-ffe4-4ed8-8eca-f6d1d85a878c " />
44
+
45
+ Older images from when the color / size was incorrectly set:
40
46
<img width =" 1260 " height =" 949 " alt =" image " src =" https://github.com/user-attachments/assets/17e8def4-0d64-4e9e-8cee-dc2753a657a6 " />
41
47
<img width =" 1260 " height =" 949 " alt =" image " src =" https://github.com/user-attachments/assets/512ca611-1ab0-4941-b4a3-4ef22d65e567 " />
42
48
Original file line number Diff line number Diff line change @@ -314,7 +314,8 @@ class WsS3Touch : public BaseComponent {
314
314
315
315
// LCD
316
316
static constexpr size_t lcd_width_ = 240 ;
317
- static constexpr size_t lcd_height_ = 320 ;
317
+ static constexpr size_t lcd_height_ =
318
+ 280 ; // NOTE: the display is actually 320x240, but only 280px are visible
318
319
static constexpr size_t lcd_bytes_per_pixel = 2 ;
319
320
static constexpr int lcd_clock_speed = 60 * 1000 * 1000 ;
320
321
static constexpr auto lcd_spi_num = SPI2_HOST;
@@ -331,7 +332,9 @@ class WsS3Touch : public BaseComponent {
331
332
static constexpr bool mirror_x = false ;
332
333
static constexpr bool mirror_y = false ;
333
334
static constexpr bool swap_xy = false ;
334
- static constexpr bool swap_color_order = true ;
335
+ static constexpr bool swap_color_order = false ;
336
+ static constexpr size_t offset_x = 0 ;
337
+ static constexpr size_t offset_y = (320 - lcd_height_) / 2 ; // center the display vertically
335
338
336
339
// sound
337
340
static constexpr size_t buzzer_default_frequency_hz = 5000 ;
Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ bool WsS3Touch::initialize_lcd() {
86
86
.reset_value = reset_value,
87
87
.invert_colors = invert_colors,
88
88
.swap_color_order = swap_color_order,
89
+ .offset_x = offset_x,
90
+ .offset_y = offset_y,
89
91
.swap_xy = swap_xy,
90
92
.mirror_x = mirror_x,
91
93
.mirror_y = mirror_y});
You can’t perform that action at this time.
0 commit comments