-
Notifications
You must be signed in to change notification settings - Fork 2
/
GenerateC2ACode.py
53 lines (39 loc) · 1.17 KB
/
GenerateC2ACode.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# coding: UTF-8
"""
python 3.7以上を要求
"""
import json
import sys
import my_mod.load_db
import my_mod.cmd_def
import my_mod.tlm_def
import my_mod.tlm_buffer
# import pprint
# import os.path
# import msvcrt # Enter不要な入力用
# import subprocess
# 環境変数
DEBUG = 0
# 0 : Release
# 1 : all
SETTING_FILE_PATH = "settings.json"
def main():
with open(SETTING_FILE_PATH, mode="r") as fh:
settings = json.load(fh)
# print(settings["path_to_src"]);
cmd_db = my_mod.load_db.LoadCmdDb(settings)
tlm_db = my_mod.load_db.LoadTlmDb(settings)
# pprint.pprint(cmd_db)
# pprint.pprint(tlm_db)
# print(tlm_db)
my_mod.cmd_def.GenerateCmdDef(settings, cmd_db["sgc"])
my_mod.cmd_def.GenerateBctDef(settings, cmd_db["bct"])
my_mod.tlm_def.GenerateTlmDef(settings, tlm_db["tlm"])
if settings["is_main_obc"]:
my_mod.cmd_def.GenerateOtherObcCmdDef(settings, cmd_db["other_obc"])
my_mod.tlm_def.GenerateOtherObcTlmDef(settings, tlm_db["other_obc"])
my_mod.tlm_buffer.GenerateTlmBuffer(settings, tlm_db["other_obc"])
print("Completed!")
sys.exit(0)
if __name__ == "__main__":
main()