Skip to content

Commit 033706a

Browse files
committed
lib_build: fix ST7789 so we don't have to add helpers/ui in INC_DIRS
1 parent d0fb8d2 commit 033706a

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

build_as_lib.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
'+<helpers/sensors>',
1010
'+<helpers/radiolib/*.cpp>',
1111
'+<helpers/ui/MomentaryButton.cpp>',
12+
'+<helpers/ui/buzzer.cpp>',
1213
]
1314

14-
use_display = False
15-
1615
# add build and include dirs according to CPPDEFINES
1716
for item in menv.get("CPPDEFINES", []):
1817

@@ -43,7 +42,6 @@
4342
# DISPLAY HANDLING
4443
elif isinstance(item, tuple) and item[0] == "DISPLAY_CLASS":
4544
display_class = item[1]
46-
use_display = True
4745
src_filter.append(f"+<helpers/ui/{display_class}.cpp>")
4846
if (display_class == "ST7789Display") :
4947
src_filter.append(f"+<helpers/ui/OLEDDisplay.cpp>")
@@ -55,10 +53,6 @@
5553
menv.Append(BUILD_FLAGS=[f"-I variants/{variant_name}"])
5654
src_filter.append(f"+<../variants/{variant_name}>")
5755

58-
if use_display :
59-
menv.Append(CPPPATH=[realpath("src/helpers/ui")])
60-
menv.Append(BUILD_FLAGS=["-I src/helpers/ui"])
61-
6256
menv.Replace(SRC_FILTER=src_filter)
6357

6458
#print (menv.Dump())

src/helpers/ui/ST7789Display.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <Wire.h>
55
#include <SPI.h>
66
#include <Adafruit_GFX.h>
7-
#include <ST7789Spi.h>
7+
#include "ST7789Spi.h"
88

99
class ST7789Display : public DisplayDriver {
1010
ST7789Spi display;

0 commit comments

Comments
 (0)