From 2a4c83647af2c832de06ecf9a10b552d22e377b0 Mon Sep 17 00:00:00 2001 From: lumapu Date: Wed, 27 Mar 2024 22:49:18 +0100 Subject: [PATCH] 0.8.101 * updated converter scripts to include all enabled features again (redundant scan of build flags) #1534 --- scripts/convertHtml.py | 20 +++++++++++++++----- scripts/htmlPreprocessorDefines.py | 2 +- src/CHANGES.md | 3 +++ src/defines.h | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/scripts/convertHtml.py b/scripts/convertHtml.py index ec16b5f3..026c28da 100644 --- a/scripts/convertHtml.py +++ b/scripts/convertHtml.py @@ -9,19 +9,29 @@ from pathlib import Path import subprocess import configparser Import("env") +build_flags = [] import htmlPreprocessorDefines as prepro +def getFlagsOfEnv(env): + config = configparser.ConfigParser() + config.read('platformio.ini') + global build_flags + flags = config[env]['build_flags'].split('\n') + + for i in range(len(flags)): + if flags[i][:2] == "-D" or flags[i][:2] == "${": + flags[i] = flags[i][2:] + if flags[i][-13:-1] == ".build_flags": + getFlagsOfEnv(flags[i].split(".build_flags")[0]) + elif len(flags[i]) > 0: + build_flags = build_flags + [flags[i]] def get_build_flags(): + getFlagsOfEnv("env:" + env['PIOENV']) config = configparser.ConfigParser() config.read('platformio.ini') - global build_flags - build_flags = config["env:" + env['PIOENV']]['build_flags'].split('\n') - - for i in range(len(build_flags)): - build_flags[i] = build_flags[i][2:] # translate board board = config["env:" + env['PIOENV']]['board'] diff --git a/scripts/htmlPreprocessorDefines.py b/scripts/htmlPreprocessorDefines.py index f5d7cc31..f8230a90 100644 --- a/scripts/htmlPreprocessorDefines.py +++ b/scripts/htmlPreprocessorDefines.py @@ -35,6 +35,6 @@ def check(inp, lst, pattern): return out def conv(inp, lst): - #print(lst) + print(lst) out = check(inp, lst, r'\/\*(?:IF_|ELS|ENDIF_)([A-Z0-9\-_]+)?\*\/') return check(out, lst, r'\<\!\-\-(?:IF_|ELS|ENDIF_)([A-Z0-9\-_]+)?\-\-\>') diff --git a/src/CHANGES.md b/src/CHANGES.md index 15b9a380..f8b8ba84 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,8 @@ # Development Changes +## 0.8.101 - 2024-03-28 +* updated converter scripts to include all enabled features again (redundant scan of build flags) #1534 + ## 0.8.100 - 2024-03-27 * fix captions in `/history #1532 * fix get NTP time #1529 #1530 diff --git a/src/defines.h b/src/defines.h index 86c8a888..3edc6f09 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 8 -#define VERSION_PATCH 100 +#define VERSION_PATCH 101 //------------------------------------- typedef struct { uint8_t ch;