From 419a145fa30dc01315d5b6b69f76253b21bd7a9b Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 7 Aug 2022 20:42:12 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Update=20schema=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 2 +- buildroot/share/PlatformIO/scripts/schema.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e5d23526db..6ec969474d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -48,7 +48,7 @@ * 3 = schema.json - The entire configuration schema. (13 = pattern groups) * 4 = schema.yml - The entire configuration schema. */ -//#define CONFIG_EXPORT // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml'] +//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml'] //=========================================================================== //============================= Thermal Settings ============================ diff --git a/buildroot/share/PlatformIO/scripts/schema.py b/buildroot/share/PlatformIO/scripts/schema.py index 767748757e..2c20f49dee 100755 --- a/buildroot/share/PlatformIO/scripts/schema.py +++ b/buildroot/share/PlatformIO/scripts/schema.py @@ -95,7 +95,7 @@ def extract(): # Regex for #define NAME [VALUE] [COMMENT] with sanitized line defgrep = re.compile(r'^(//)?\s*(#define)\s+([A-Za-z0-9_]+)\s*(.*?)\s*(//.+)?$') # Defines to ignore - ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXPORT') + ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXAMPLES_DIR', 'CONFIG_EXPORT') # Start with unknown state state = Parse.NORMAL # Serial ID @@ -294,8 +294,6 @@ def extract(): 'sid': sid } - if val != '': define_info['value'] = val - # Type is based on the value if val == '': value_type = 'switch' @@ -318,6 +316,7 @@ def extract(): else 'array' if val[0] == '{' \ else '' + if val != '': define_info['value'] = val if value_type != '': define_info['type'] = value_type # Join up accumulated conditions with &&