-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (20 loc) · 769 Bytes
/
main.py
File metadata and controls
26 lines (20 loc) · 769 Bytes
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
import os
import sys
import PyQt5
from PyQt5 import QtCore
from PyQt5 import QtWidgets
from mainwidget import MyWidget
from loguru import logger
logger.add("./logs/log_{time}.log", rotation="00:00", retention="10 days")
os.system("sudo chmod 777 /dev/ttyTHS1")
dir_name = os.path.dirname(PyQt5.__file__)
plugin_path = os.path.join(dir_name, 'plugins', 'platforms')
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = plugin_path
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "jetsonface"))
if __name__ == "__main__":
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
app = QtWidgets.QApplication(sys.argv)
widget = MyWidget()
# widget.resize(300, 200)
widget.showFullScreen()
sys.exit(app.exec_())