File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 66src_filter = [
77 '+<*.cpp>' ,
88 '+<helpers/*.cpp>' ,
9- '+<helpers/sensors>'
9+ '+<helpers/sensors>' ,
1010 '+<helpers/radiolib/*.cpp>' ,
1111 '+<helpers/ui/MomentaryButton.cpp>' ,
1212]
1313
14+ use_display = False
15+
1416# add build and include dirs according to CPPDEFINES
1517for item in menv .get ("CPPDEFINES" , []):
1618
3840 menv .Append (BUILD_FLAGS = ["-I src/helpers/rp2040" ])
3941 src_filter .append ("+<helpers/rp2040/*>" )
4042
43+ # DISPLAY HANDLING
44+ elif isinstance (item , tuple ) and item [0 ] == "DISPLAY_CLASS" :
45+ display_class = item [1 ]
46+ use_display = True
47+ src_filter .append (f"+<helpers/ui/{ display_class } .cpp>" )
48+ if (display_class == "ST7789Display" ) :
49+ src_filter .append (f"+<helpers/ui/OLEDDisplay.cpp>" )
50+ src_filter .append (f"+<helpers/ui/OLEDDisplayFonts.cpp>" )
51+
4152 # VARIANTS HANDLING
4253 elif isinstance (item , tuple ) and item [0 ] == "MC_VARIANT" :
4354 variant_name = item [1 ]
4455 menv .Append (BUILD_FLAGS = [f"-I variants/{ variant_name } " ])
4556 src_filter .append (f"+<../variants/{ variant_name } >" )
4657
58+ if use_display :
59+ menv .Append (CPPPATH = [realpath ("src/helpers/ui" )])
60+ menv .Append (BUILD_FLAGS = ["-I src/helpers/ui" ])
61+
4762menv .Replace (SRC_FILTER = src_filter )
4863
4964#print (menv.Dump())
You can’t perform that action at this time.
0 commit comments