mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 14:33:07 +01:00
add explanation to gen_set.py
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# A tool to generate that part of config.json that deals with pages and fields.
|
# A tool to generate that part of config.json that deals with pages and fields.
|
||||||
|
#
|
||||||
|
#Usage: 1. modify this script (e.g.add a page, change number of fields, etc.)
|
||||||
|
# 2. Delete all lines from config.json from the curly backet before "name": "page1type" to o the end of the file (as of today, delete from line 917 to the end of the File)
|
||||||
|
# 3. run ./gen_set.py >> config.json
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@@ -120,5 +124,5 @@ for page_no in range(1, no_of_pages + 1):
|
|||||||
|
|
||||||
json_output = json.dumps(output, indent=4)
|
json_output = json.dumps(output, indent=4)
|
||||||
# print omitting first and last line containing [ ] of JSON array
|
# print omitting first and last line containing [ ] of JSON array
|
||||||
print(json_output[1:-1])
|
print(json_output[1:])
|
||||||
# print(",")
|
# print(",")
|
||||||
Reference in New Issue
Block a user