Commit 215f6d81 authored by whooie's avatar whooie
Browse files

update docstrings, add 'alldefaults' to interactive mode, add 'digital' and...

update docstrings, add 'alldefaults' to interactive mode, add 'digital' and 'analog' back to CLI mode
parent d6d933bb
......@@ -61,6 +61,9 @@ Commands:
zero <args>
Set all outputs of the given type(s) to be zero. See `help zero` for
more information.
alldefaults
Set all outputs defined in `lib.system` to their default values.
"""[1:-1]
def print_help(arg: str):
......@@ -164,6 +167,18 @@ Args:
print(err)
set_zero(zero_type)
def do_alldefaults(self, arg):
"""
Set all channels defined in `lib.system` to their default values.
Usage:
alldefaults
Args:
None
"""
MAIN.set_defaults()
def do_quit(self, arg):
"""
Disconnect and quit.
......@@ -218,6 +233,16 @@ def main(script_args):
else:
print("Invalid domain name")
sys.exit(1)
elif args[0] == "digital":
cmd_args = " ".join(args[1:])
MAIN.connect()
set_digital_state(parser.parse_digital_state(cmd_args))
MAIN.disconnect()
elif args[0] == "analog":
cmd_args = " ".join(args[1:])
MAIN.connect()
set_analog_state(parser.parse_analog_state(cmd_args))
MAIN.disconnect()
elif args[0] == "zero":
MAIN.connect()
set_zero(parser.parse_zero(cmd_args))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment