-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdatalog_MC_GUI.py
More file actions
65 lines (52 loc) · 2.22 KB
/
Copy pathstdatalog_MC_GUI.py
File metadata and controls
65 lines (52 loc) · 2.22 KB
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
62
63
# *****************************************************************************
# * @file stdatalog_MC_GUI.py
# * @author SRA
# ******************************************************************************
# * @attention
# *
# * Copyright (c) 2022 STMicroelectronics.
# * All rights reserved.
# *
# * This software is licensed under terms that can be found in the LICENSE file
# * in the root directory of this software component.
# * If no LICENSE file comes with this software, it is provided AS-IS.
# *
# *
# ******************************************************************************
#
import sys
import os
# Add the STDatalog SDK root directory to the sys.path to access the SDK packages
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../..')))
from datetime import datetime
# import cProfile
# from pstats import Stats
from PySide6.QtWidgets import QApplication
from PySide6 import QtCore
from stdatalog_gui.HSD_MC_GUI.HSD_MC_MainWindow import HSD_MC_MainWindow
import stdatalog_core.HSD_utils.logger as logger
log = logger.setup_applevel_logger(is_debug = False, file_name= "{}_app_debug.log".format(datetime.today().strftime('%Y%m%d_%H_%M_%S')))
def main():
QApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts)
app = QApplication(sys.argv)
mainWindow = HSD_MC_MainWindow(app)
mainWindow.setAppTitle("High Speed Datalog \n Motor Control SW")
mainWindow.setAppCredits("High Speed Datalog Motor Control SW")
mainWindow.setWindowTitle("High Speed Datalog Motor Control SW")
mainWindow.setAppVersion("v1.0.0")
mainWindow.setLogMsg("Device is logging --> Board Configuration has been disabled.\nNow you can label your acquisition using the [Tags Information] Component")
mainWindow.showMaximized()
app.setAttribute(QtCore.Qt.AA_Use96Dpi)
app.exec()
if __name__ == "__main__":
# do_profiling = True
# if do_profiling:
# with cProfile.Profile() as pr:
# main()
# with open('profiling_stats.txt', 'w') as stream:
# stats = Stats(pr, stream=stream)
# stats.strip_dirs()
# stats.sort_stats('time')
# stats.dump_stats('.prof_stats')
# stats.print_stats()
main()