mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-31 03:55:46 +00:00
lib_build: fix ST7789 so we don't have to add helpers/ui in INC_DIRS
This commit is contained in:
@@ -9,10 +9,9 @@ src_filter = [
|
||||
'+<helpers/sensors>',
|
||||
'+<helpers/radiolib/*.cpp>',
|
||||
'+<helpers/ui/MomentaryButton.cpp>',
|
||||
'+<helpers/ui/buzzer.cpp>',
|
||||
]
|
||||
|
||||
use_display = False
|
||||
|
||||
# add build and include dirs according to CPPDEFINES
|
||||
for item in menv.get("CPPDEFINES", []):
|
||||
|
||||
@@ -43,7 +42,6 @@ for item in menv.get("CPPDEFINES", []):
|
||||
# DISPLAY HANDLING
|
||||
elif isinstance(item, tuple) and item[0] == "DISPLAY_CLASS":
|
||||
display_class = item[1]
|
||||
use_display = True
|
||||
src_filter.append(f"+<helpers/ui/{display_class}.cpp>")
|
||||
if (display_class == "ST7789Display") :
|
||||
src_filter.append(f"+<helpers/ui/OLEDDisplay.cpp>")
|
||||
@@ -55,10 +53,6 @@ for item in menv.get("CPPDEFINES", []):
|
||||
menv.Append(BUILD_FLAGS=[f"-I variants/{variant_name}"])
|
||||
src_filter.append(f"+<../variants/{variant_name}>")
|
||||
|
||||
if use_display :
|
||||
menv.Append(CPPPATH=[realpath("src/helpers/ui")])
|
||||
menv.Append(BUILD_FLAGS=["-I src/helpers/ui"])
|
||||
|
||||
menv.Replace(SRC_FILTER=src_filter)
|
||||
|
||||
#print (menv.Dump())
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <ST7789Spi.h>
|
||||
#include "ST7789Spi.h"
|
||||
|
||||
class ST7789Display : public DisplayDriver {
|
||||
ST7789Spi display;
|
||||
|
||||
Reference in New Issue
Block a user