mirror of https://github.com/lumapu/ahoy.git
Browse Source
* reduce GxEPD2 lib to compile faster * upgraded GxEPD2 lib to `1.5.3` * updated espressif32 platform to `6.5.0` * updated U8g2 to `2.35.9` * started to convert deprecated functions of new ArduinoJson `7.0.0`pull/1330/head
lumapu
1 year ago
7 changed files with 82 additions and 34 deletions
@ -0,0 +1,41 @@ |
|||
import os |
|||
import subprocess |
|||
import glob |
|||
Import("env") |
|||
|
|||
def rmDirWithFiles(path): |
|||
if os.path.isdir(path): |
|||
for f in glob.glob(path + "/*"): |
|||
os.remove(f) |
|||
os.rmdir(path) |
|||
|
|||
def clean(libName): |
|||
# save current wd |
|||
start = os.getcwd() |
|||
|
|||
if os.path.exists('.pio/libdeps/' + env['PIOENV'] + '/' + libName) == False: |
|||
print("path '" + '.pio/libdeps/' + env['PIOENV'] + '/' + libName + "' does not exist") |
|||
return |
|||
|
|||
os.chdir('.pio/libdeps/' + env['PIOENV'] + '/' + libName) |
|||
os.chdir('src/') |
|||
types = ('epd/*.h', 'epd/*.cpp') # the tuple of file types |
|||
files = [] |
|||
for t in types: |
|||
files.extend(glob.glob(t)) |
|||
|
|||
for f in files: |
|||
if f.count('GxEPD2_150_BN') == 0: |
|||
os.remove(f) |
|||
|
|||
rmDirWithFiles("epd3c") |
|||
rmDirWithFiles("epd4c") |
|||
rmDirWithFiles("epd7c") |
|||
rmDirWithFiles("gdeq") |
|||
rmDirWithFiles("gdey") |
|||
rmDirWithFiles("it8951") |
|||
|
|||
os.chdir(start) |
|||
|
|||
|
|||
clean("GxEPD2") |
Loading…
Reference in new issue