From 628f1808ca866555f0ff515b7312343dea1d751d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 3 Sep 2020 19:54:49 -0500 Subject: [PATCH] TextWindow Enhancements (#2114) * cause error * revert for now * decrease font by 10 pts * remove unnecessary () for class ;) * move exit button closer to right corner * 70% transparency for black background * cause error * well that's not right * try showing more lines * actually show last three lines * forgot to join * debug what we can leave out * show last four files * revert * show 3 lines and one extra for last erroring line * increase by 5 points * move text left a bit * fix * fix * two more lines * add double indentation for formatting * remove indentation of file lines * fix * fix * try this * try this * make lines shorter * clean up error code in manager * try one more * reduce lines altered in PR * four is good * this actually isn't required anymore * can move more left * and increase size * slightly less * slightly less * try a different error * try last three with negative * revert to 75 * fix * clean up * remove path hiding * revert offsets * revert old-commit-hash: fb6f6268d3c0b84e9214172b10a75e4e0f7a7bbf --- common/text_window.py | 2 +- selfdrive/manager.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/text_window.py b/common/text_window.py index b815d8022a..1aa3b885ea 100755 --- a/common/text_window.py +++ b/common/text_window.py @@ -5,7 +5,7 @@ import subprocess from common.basedir import BASEDIR -class TextWindow(): +class TextWindow: def __init__(self, s, noop=False): # text window is only implemented for android currently self.text_proc = None diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 3c5fcc3667..bcc51ff89f 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -620,8 +620,7 @@ if __name__ == "__main__": cloudlog.exception("Manager failed to start") # Show last 3 lines of traceback - error = traceback.format_exc(3) - + error = traceback.format_exc(-3) error = "Manager failed to start\n \n" + error with TextWindow(error) as t: t.wait_for_exit()