-
Notifications
You must be signed in to change notification settings - Fork 0
/
2024_main.py
61 lines (44 loc) · 1.03 KB
/
2024_main.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
54
55
56
57
58
59
60
61
import argparse
import time
from Kraken import KrakenInterface
# rough framerate, should be slightly higher due to render time
FRAMERATE = 90
msg = "Very Cool Ground Station Software"
parser = argparse.ArgumentParser(description=msg)
parser.add_argument(
"port_1",
type=str,
help="Connected XBee or Arduino COM port",
)
parser.add_argument(
"--port_2",
type=str,
default=None,
help="Another connected XBee or Arduino COM port",
)
parser.add_argument(
"-f",
"--fullscreen",
action="store_true",
help="Launch interface in full screen mode (borderless)",
)
args = parser.parse_args()
def main(args):
ui = KrakenInterface(
"Kraken Control Panel",
1280,
720,
args.port_1,
args.port_2,
framerate=FRAMERATE,
fullscreen=args.fullscreen,
)
try:
while not ui.should_close:
ui.update_gui()
except KeyboardInterrupt:
pass
finally:
ui.shutdown_gui()
if __name__ == "__main__":
main(args)