Skip to content

Commit 419a145

Browse files
committed
🔨 Update schema export
1 parent 398cae7 commit 419a145

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Marlin/Configuration_adv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* 3 = schema.json - The entire configuration schema. (13 = pattern groups)
4949
* 4 = schema.yml - The entire configuration schema.
5050
*/
51-
//#define CONFIG_EXPORT // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml']
51+
//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml']
5252

5353
//===========================================================================
5454
//============================= Thermal Settings ============================

buildroot/share/PlatformIO/scripts/schema.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Parse:
9595
# Regex for #define NAME [VALUE] [COMMENT] with sanitized line
9696
defgrep = re.compile(r'^(//)?\s*(#define)\s+([A-Za-z0-9_]+)\s*(.*?)\s*(//.+)?$')
9797
# Defines to ignore
98-
ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXPORT')
98+
ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXAMPLES_DIR', 'CONFIG_EXPORT')
9999
# Start with unknown state
100100
state = Parse.NORMAL
101101
# Serial ID
@@ -294,8 +294,6 @@ def atomize(s):
294294
'sid': sid
295295
}
296296

297-
if val != '': define_info['value'] = val
298-
299297
# Type is based on the value
300298
if val == '':
301299
value_type = 'switch'
@@ -318,6 +316,7 @@ def atomize(s):
318316
else 'array' if val[0] == '{' \
319317
else ''
320318

319+
if val != '': define_info['value'] = val
321320
if value_type != '': define_info['type'] = value_type
322321

323322
# Join up accumulated conditions with &&

0 commit comments

Comments
 (0)