Qt text window (#2489)

* qt text window

* auto size

* real text

* this is cleaner

* fix android build

* exit on pc

* tici fixes
old-commit-hash: 68ba1649b91984c106491cf1894c3f44f21a34df
This commit is contained in:
Adeeb Shihadeh
2020-11-06 12:05:24 -08:00
committed by GitHub
parent 97ad004fe1
commit 57de41eae5
10 changed files with 123 additions and 21 deletions
+8 -9
View File
@@ -6,17 +6,16 @@ from common.basedir import BASEDIR
class TextWindow:
def __init__(self, s, noop=False):
def __init__(self, text):
# text window is only implemented for android currently
self.text_proc = None
if not noop:
try:
self.text_proc = subprocess.Popen(["./text", s],
stdin=subprocess.PIPE,
cwd=os.path.join(BASEDIR, "selfdrive", "ui", "text"),
close_fds=True)
except OSError:
self.text_proc = None
try:
self.text_proc = subprocess.Popen(["./text", text],
stdin=subprocess.PIPE,
cwd=os.path.join(BASEDIR, "selfdrive", "ui"),
close_fds=True)
except OSError:
self.text_proc = None
def get_status(self):
if self.text_proc is not None: