new argument parsing

This commit is contained in:
Robin Müller 2022-08-19 12:38:18 +02:00
parent 7e2ea08277
commit 95b27b889d
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
3 changed files with 8 additions and 3 deletions

2
deps/spacepackets vendored

@ -1 +1 @@
Subproject commit ac1d14ebf64fb6479e7c6cf26907bbf9e56d239e Subproject commit da2859688bc36ac258f0d75edbc2768761f34f31

2
deps/tmtccmd vendored

@ -1 +1 @@
Subproject commit e3343ef96a75974239608ae9246804ff9273e3d9 Subproject commit 87a430eb5cfea01d8265c3b327269799954c64ee

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse
import logging import logging
import sys import sys
import time import time
@ -50,7 +51,8 @@ from tmtccmd.tc import (
from tmtccmd.config import default_json_path, SetupWrapper from tmtccmd.config import default_json_path, SetupWrapper
from tmtccmd.config.args import ( from tmtccmd.config.args import (
SetupParams, SetupParams,
ArgParserWrapper, ArgParserWrapper, create_default_args_parser, add_default_com_if_arguments,
add_default_mode_arguments, add_generic_arguments, add_ethernet_arguments,
) )
from config import __version__ from config import __version__
from config.definitions import PUS_APID from config.definitions import PUS_APID
@ -152,6 +154,9 @@ def setup_params() -> SetupWrapper:
hook_obj = EiveHookObject(default_json_path()) hook_obj = EiveHookObject(default_json_path())
params = SetupParams() params = SetupParams()
parser_wrapper = ArgParserWrapper(hook_obj) parser_wrapper = ArgParserWrapper(hook_obj)
parser_wrapper.create_default_parent_parser()
parser_wrapper.create_default_parser()
parser_wrapper.add_def_proc_and_cfdp_as_subparsers()
parser_wrapper.parse() parser_wrapper.parse()
tmtccmd.init_printout(parser_wrapper.use_gui) tmtccmd.init_printout(parser_wrapper.use_gui)
parser_wrapper.set_params(params) parser_wrapper.set_params(params)