* new NRF24 lib (1.4.2 -> 1.4.5)

* add build info on index.html (like OpenDTU)
* add Discord Link to index.html
This commit is contained in:
lumapu 2022-08-08 22:06:33 +02:00
parent 3caa3392ab
commit 155f9e3f41
8 changed files with 44 additions and 8 deletions

View file

@ -0,0 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2022 Thomas Basler and others
#
import pkg_resources
Import("env")
required_pkgs = {'dulwich'}
installed_pkgs = {pkg.key for pkg in pkg_resources.working_set}
missing_pkgs = required_pkgs - installed_pkgs
if missing_pkgs:
env.Execute('"$PYTHONEXE" -m pip install dulwich --global-option="--pure"')
from dulwich import porcelain
def get_firmware_specifier_build_flag():
build_version = porcelain.describe('../../') # refers to the repository root dir
build_flag = "-D AUTO_GIT_HASH=\\\"" + build_version + "\\\""
print ("Firmware Revision: " + build_version)
return (build_flag)
env.Append(
BUILD_FLAGS=[get_firmware_specifier_build_flag()]
)

View file

@ -0,0 +1,25 @@
import os
from datetime import date
def readVersion(path, infile):
f = open(path + infile, "r")
lines = f.readlines()
f.close()
today = date.today()
search = ["_MAJOR", "_MINOR", "_PATCH"]
version = today.strftime("%y%m%d") + "_ahoy_"
for line in lines:
if(line.find("VERSION_") != -1):
for s in search:
p = line.find(s)
if(p != -1):
version += line[p+13:].rstrip() + "."
version = version[:-1] + "_esp8266.bin"
src = path + ".pio/build/d1_mini/firmware.bin"
dst = path + ".pio/build/d1_mini/out/" + version
os.mkdir(path + ".pio/build/d1_mini/out/")
os.rename(src, dst)
readVersion("../", "defines.h")