Skip to content

Commit b728a22

Browse files
committed
Simplify selection logic
1 parent 1e36e05 commit b728a22

File tree

1 file changed

+1
-14
lines changed
  • ports/espressif/boards/makerfabs_tft7

1 file changed

+1
-14
lines changed

ports/espressif/boards/makerfabs_tft7/board.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,13 @@ static void display_init(void) {
5252
width = 800;
5353
height = 480;
5454
frequency = 6500000;
55-
} else if (result == GETENV_OK) {
55+
} else if (result == GETENV_OK && width == 1024) {
5656
width = 1024;
5757
height = 600;
5858
frequency = 10000000;
5959
}
6060

6161
if (height == 0) {
62-
result = common_hal_os_getenv_int("CIRCUITPY_DISPLAY_HEIGHT", &height);
63-
if (result == GETENV_OK && height == 480) {
64-
width = 800;
65-
height = 480;
66-
frequency = 6500000;
67-
} else if (result == GETENV_OK) {
68-
width = 1024;
69-
height = 600;
70-
frequency = 10000000;
71-
}
72-
}
73-
74-
if (width == 0) {
7562
width = 800;
7663
height = 480;
7764
frequency = 6500000;

0 commit comments

Comments
 (0)