This commit is contained in:
gg 2025-04-17 11:30:59 +02:00
parent 6aac7d2c4d
commit 3300f55fec

View File

@ -226,7 +226,7 @@ class Test(Widget):
def refresh_time(self, init=False): def refresh_time(self, init=False):
if init and not hasattr(self, 'time_timer'): if init and not hasattr(self, 'time_timer'):
self.time_timer = QTimer() self.time_timer = QTimer()
self.time_timer.setSingleShot(True) self.time_timer.setSingleShot(False)
self.time_timer.timeout.connect(self.refresh_time) self.time_timer.timeout.connect(self.refresh_time)
t = datetime.now() t = datetime.now()
@ -236,7 +236,7 @@ class Test(Widget):
# Always restart the timer, ensuring intervals are set correctly # Always restart the timer, ensuring intervals are set correctly
if hasattr(self, 'time_timer'): # Safeguard for uninitialized timer if hasattr(self, 'time_timer'): # Safeguard for uninitialized timer
self.time_timer.start((60 - t.second) * 1000) self.time_timer.start(30000)
def select_step_img(self, step, suffix=None): def select_step_img(self, step, suffix=None):
img_path = "./src/ui/imgs" img_path = "./src/ui/imgs"
@ -289,6 +289,12 @@ class Test(Widget):
self.autotest_timer.start(self.autotest_period) self.autotest_timer.start(self.autotest_period)
reason = "boot" reason = "boot"
if not hasattr(self, "refresh_timer"):
self.refresh_timer = QTimer()
self.refresh_timer.setSingleShot(False)
self.refresh_timer.timeout.connect(self.refresh_time)
self.refresh_timer.start(30000)
if self.config["autotest_leak"]["enabled"] == "true": if self.config["autotest_leak"]["enabled"] == "true":
self.autotest_request = reason self.autotest_request = reason
else: else: