Skip to content

Commit 81f4feb

Browse files
thinkyheadEvilGremlin
authored andcommitted
🔨 Fix CONFIG_EXPORT 1, (embed = 101)
Followup to MarlinFirmware#27628 See MarlinFirmware#27612
1 parent 7a31a11 commit 81f4feb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

buildroot/share/PlatformIO/scripts/signature.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ def tryint(key):
195195

196196
# Get the CONFIG_EXPORT value and do an extended dump if > 100
197197
# For example, CONFIG_EXPORT 102 will make a 'config.ini' with a [config:] group for each schema @section
198-
config_dump = tryint('CONFIG_EXPORT')
198+
config_dump = 101 if is_embed else tryint('CONFIG_EXPORT')
199199
extended_dump = config_dump > 100
200-
if extended_dump: config_dump -= 100
200+
config_dump %= 100
201201

202202
# Get the schema class for exports that require it
203203
if config_dump in (3, 4) or (extended_dump and config_dump in (2, 5)):
@@ -451,7 +451,7 @@ def optsort(x, optorder):
451451
# Produce a JSON file for CONFIGURATION_EMBEDDING or CONFIG_EXPORT == 1 or 101
452452
# Skip if an identical JSON file was already present.
453453
#
454-
if not same_hash and (config_dump == 1 or is_embed):
454+
if not same_hash and config_dump == 1:
455455
with marlin_json.open('w') as outfile:
456456

457457
json_data = {}
@@ -468,12 +468,11 @@ def optsort(x, optorder):
468468
json_data[header][s][name] = c['value']
469469
else:
470470
for header in real_config:
471-
json_data[header] = {}
472471
conf = real_config[header]
473472
#print(f"real_config[{header}]", conf)
474473
for name in conf:
475474
if name in ignore: continue
476-
json_data[header][name] = conf[name]['value']
475+
json_data[name] = conf[name]['value']
477476

478477
json_data['__INITIAL_HASH'] = hashes
479478

0 commit comments

Comments
 (0)