Browse Source

few more CLI tweaks

master
Alex Mikhalev 6 years ago
parent
commit
9d6d68efc1
  1. 3
      tools/ugv_cmd.py

3
tools/ugv_cmd.py

@ -65,7 +65,7 @@ class UGV_CLI:
print("{}: {}".format(names, cmd.description)) print("{}: {}".format(names, cmd.description))
print() print()
@cli_cmd(names=["exit", "q"], description="Quit the program") @cli_cmd(names=["exit", "q", "C-d", "C-c"], description="Quit the program")
def exit(self): def exit(self):
self.is_running = False self.is_running = False
@ -149,6 +149,7 @@ class UGV_CLI:
time.sleep(0.2) time.sleep(0.2)
last_line = None last_line = None
try: try:
print("Run 'help' to find out what commands are available")
while self.is_running: while self.is_running:
line = input("UGV> ") line = input("UGV> ")
if len(line) is 0 and last_line is not None: if len(line) is 0 and last_line is not None:

Loading…
Cancel
Save