Skip to content

Commit

Permalink
added test file
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliao committed Oct 5, 2023
1 parent f0523a1 commit 498a693
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions mil_common/utils/mil_tools/scripts/preflightUI.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python3
import blessed

inp = ""
term = blessed.Terminal()
pos = 0

while inp != "q":
maxPos = 3
height, width = term.height, term.width

# reprint line selected -> term.on_green"message"

print(term.home + term.clear + term.blink + term.on_green("pressed ") + repr(inp))

print("testing screen\n")
print("checklist")
print("hiiardware checklist")

print(term.move_y(term.height // 2))
print(term.black_on_darkkhaki(term.center("press any key")))

with term.cbreak():
inp = term.inkey()
if inp == "k" or inp == "KEY_UP":
if pos == 0:
pos = maxPos
else:
pos -= 1

if inp == "j" or inp == "KEY_DOWN":
if pos == maxPos:
pos = 0
else:
pos += 1

0 comments on commit 498a693

Please sign in to comment.