Skip to content

Commit

Permalink
filter move_axis screens
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 17, 2023
1 parent c2e5d5f commit b6a4298
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
22 changes: 11 additions & 11 deletions buildroot/share/PlatformIO/scripts/common-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def load_features():
val = None
if val:
opt = mat[1].upper()
blab("%s.custom_marlin.%s = '%s'" % ( env['PIOENV'], opt, val ))
blab("%s.custom_marlin.%s = '%s'" % ( env['PIOENV'], opt, val ), 2)
add_to_feat_cnf(opt, val)

def get_all_known_libs():
Expand Down Expand Up @@ -202,14 +202,14 @@ def addentry(fullpath, info=None):
relp = os.path.relpath(fullpath, marlinbasedir)
if srcfilepattern.match(relp):
if info:
blab("Added src file %s (%s)" % (relp, str(info)))
blab("Added src file %s (%s)" % (relp, str(info)), 3)
else:
blab("Added src file %s " % relp)
blab("Added src file %s " % relp, 3)
cur_srcs.add(relp)
# Special rule: If a direct folder is specified add all files within.
fullplain = os.path.join(marlinbasedir, plain)
if os.path.isdir(fullplain):
blab("Directory content addition for %s " % plain)
blab("Directory content addition for %s " % plain, 3)
gpattern = os.path.join(fullplain, "**")
for fname in glob.glob(gpattern, recursive=True):
addentry(fname, "dca")
Expand All @@ -227,12 +227,12 @@ def srepl(matchi):
# Special rule: If a direct folder is specified then remove all files within.
def onremove(relp, info=None):
if info:
blab("Removed src file %s (%s)" % (relp, str(info)))
blab("Removed src file %s (%s)" % (relp, str(info)), 3)
else:
blab("Removed src file %s " % relp)
blab("Removed src file %s " % relp, 3)
fullplain = os.path.join(marlinbasedir, plain)
if os.path.isdir(fullplain):
blab("Directory content removal for %s " % plain)
blab("Directory content removal for %s " % plain, 2)
def filt(x):
common = os.path.commonpath([plain, x])
if not common == os.path.normpath(plain): return True
Expand All @@ -248,10 +248,10 @@ def filt(x):
cur_srcs = set(filter(filt, cur_srcs))
# Transform the resulting set into a string.
for x in cur_srcs:
if len(build_src_filter) > 0: build_src_filter += ' '
if build_src_filter != "": build_src_filter += ' '
build_src_filter += "+<" + x + ">"

#blab("Final build_src_filter: " + build_src_filter)
#blab("Final build_src_filter: " + build_src_filter, 3)
else:
build_src_filter = build_filters

Expand Down Expand Up @@ -281,7 +281,7 @@ def load_marlin_features():
#
def MarlinHas(env, feature):
load_marlin_features()
r = re.compile('^' + feature + '$')
r = re.compile('^' + feature + '$', re.IGNORECASE)
found = list(filter(r.match, env['MARLIN_FEATURES']))

# Defines could still be 'false' or '0', so check
Expand All @@ -294,7 +294,7 @@ def MarlinHas(env, feature):
elif val in env['MARLIN_FEATURES']:
some_on = env.MarlinHas(val)

#blab("%s is %s" % (feature, str(some_on)))
#blab("%s is %s" % (feature, str(some_on)), 2)

return some_on

Expand Down
5 changes: 4 additions & 1 deletion ini/features.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ DWIN_CREALITY_LCD = build_src_filter=+<src/lcd/e3v2/crealit
DWIN_LCD_PROUI = build_src_filter=+<src/lcd/e3v2/proui>
DWIN_CREALITY_LCD_JYERSUI = build_src_filter=+<src/lcd/e3v2/jyersui>
IS_DWIN_MARLINUI = build_src_filter=+<src/lcd/e3v2/marlinui>
HAS_GRAPHICAL_TFT = build_src_filter=+<src/lcd/tft> -<src/lcd/tft/fontdata/*>
HAS_GRAPHICAL_TFT = build_src_filter=+<src/lcd/tft> -<src/lcd/tft/fontdata/*> -<src/lcd/tft/ui_move_axis_screen_*.cpp>
HAS_UI_320X.+ = build_src_filter=+<src/lcd/tft/ui_move_axis_screen_320.cpp>
HAS_UI_480X.+ = build_src_filter=+<src/lcd/tft/ui_move_axis_screen_480.cpp>
HAS_UI_1024X.+ = build_src_filter=+<src/lcd/tft/ui_move_axis_screen_1024.cpp>
TFT_FONT_HELVETICA = build_src_filter=+<src/lcd/tft/fontdata/Helvetica/*>
TFT_FONT_NOTOSANS = build_src_filter=+<src/lcd/tft/fontdata/NotoSans/*>
TFT_FONT_UNIFONT = build_src_filter=+<src/lcd/tft/fontdata/Unifont/*>
Expand Down

0 comments on commit b6a4298

Please sign in to comment.