Browse Source

🔨 Update schema export

FB4S_WIFI
Scott Lahteine 2 years ago
parent
commit
419a145fa3
  1. 2
      Marlin/Configuration_adv.h
  2. 5
      buildroot/share/PlatformIO/scripts/schema.py

2
Marlin/Configuration_adv.h

@ -48,7 +48,7 @@
* 3 = schema.json - The entire configuration schema. (13 = pattern groups) * 3 = schema.json - The entire configuration schema. (13 = pattern groups)
* 4 = schema.yml - The entire configuration schema. * 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 ============================ //============================= Thermal Settings ============================

5
buildroot/share/PlatformIO/scripts/schema.py

@ -95,7 +95,7 @@ def extract():
# Regex for #define NAME [VALUE] [COMMENT] with sanitized line # Regex for #define NAME [VALUE] [COMMENT] with sanitized line
defgrep = re.compile(r'^(//)?\s*(#define)\s+([A-Za-z0-9_]+)\s*(.*?)\s*(//.+)?$') defgrep = re.compile(r'^(//)?\s*(#define)\s+([A-Za-z0-9_]+)\s*(.*?)\s*(//.+)?$')
# Defines to ignore # 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 # Start with unknown state
state = Parse.NORMAL state = Parse.NORMAL
# Serial ID # Serial ID
@ -294,8 +294,6 @@ def extract():
'sid': sid 'sid': sid
} }
if val != '': define_info['value'] = val
# Type is based on the value # Type is based on the value
if val == '': if val == '':
value_type = 'switch' value_type = 'switch'
@ -318,6 +316,7 @@ def extract():
else 'array' if val[0] == '{' \ else 'array' if val[0] == '{' \
else '' else ''
if val != '': define_info['value'] = val
if value_type != '': define_info['type'] = value_type if value_type != '': define_info['type'] = value_type
# Join up accumulated conditions with && # Join up accumulated conditions with &&

Loading…
Cancel
Save