Fixes/Enhancements for pio/preferences, new info page, add reboot button, remove old files (#451)

* Preferences

* Info page

* Info page

* Remove old files + Info page
This commit is contained in:
iranl
2024-08-12 17:53:00 +02:00
committed by GitHub
parent 21adca01e7
commit 346c5c65d1
59 changed files with 1459 additions and 1403 deletions

View File

@@ -1,8 +1,7 @@
""" PlatformIO POST script execution to copy artifacts """
Import("env")
import os
import shutil
import re, shutil, os
from pathlib import Path
def get_board_name(env):
@@ -77,4 +76,14 @@ env.AddPostAction("$BUILD_DIR/bootloader.bin", copy_files)
if env.GetProjectOption("custom_build") == 'debug':
env.AddPostAction("$BUILD_DIR/firmware.elf", copy_files)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", merge_bin)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", merge_bin)
regex = r"\#define NUKI_HUB_DATE \"(.*)\""
content_new = ""
with open ('src/Config.h', 'r' ) as readfile:
file_content = readfile.read()
content_new = re.sub(regex, "#define NUKI_HUB_DATE \"unknownbuilddate\"", file_content, flags = re.M)
with open('src/Config.h', 'w') as writefile:
writefile.write(content_new)