👍️[Update] Model : Watchdog timerの終了処理をmain loopの終了処理に変更

This commit is contained in:
misyaguziya
2024-09-27 01:02:20 +09:00
parent 71225bf045
commit a0407afa54
6 changed files with 35 additions and 26 deletions

View File

@@ -783,12 +783,20 @@ class Model:
self.overlay.shutdownOverlay()
def startWatchdog(self):
self.watchdog.start()
self.th_watchdog = threadFnc(self.watchdog.start)
self.th_watchdog.daemon = True
self.th_watchdog.start()
def feedWatchdog(self):
self.watchdog.feed()
def setWatchdogCallback(self, callback):
self.watchdog.setCallback(callback)
def stopWatchdog(self):
self.watchdog.stop()
if isinstance(self.th_watchdog, threadFnc):
self.th_watchdog.stop()
self.th_watchdog.join()
self.th_watchdog = None
model = Model()