Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions check.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,9 @@ def rh(text):
if errors.startswith('No errors in'):
message_types = parse_spec_file(spec_file)
with open(output_file, 'w') as f:
clean_output_file = re.sub('[^A-Za-z0-9_]+', '_', output_file).upper()
f.write('#ifndef ____' + clean_output_file + '\n')
f.write('#define ____' + clean_output_file + '\n\n')
for message_id, message_type in message_types.items():
message_name = rh(message_type.name)
f.write('#define ' + message_name + '__id ' + str(message_type.can_id) + '\n')
Expand All @@ -615,6 +618,7 @@ def rh(text):


f.write('\n')
f.write('#endif // ____' + clean_output_file + '\n')
finally:
spec_file.close()

Expand Down