AGNOS power monitoring watchdog (#35860)

* AGNOS power monitoring watchdog

* manager should do this
pull/35864/head
Adeeb Shihadeh 4 weeks ago committed by GitHub
parent c4b63cd439
commit fc58c866c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      system/manager/manager.py

@ -3,6 +3,7 @@ import datetime
import os
import signal
import sys
import time
import traceback
from cereal import log
@ -160,6 +161,14 @@ def manager_thread() -> None:
msg.managerState.processes = [p.get_process_state_msg() for p in managed_processes.values()]
pm.send('managerState', msg)
# kick AGNOS power monitoring watchdog
try:
if sm.all_checks(['deviceState']):
with open("/var/tmp/power_watchdog", "w") as f:
f.write(str(time.monotonic()))
except Exception:
pass
# Exit main loop when uninstall/shutdown/reboot is needed
shutdown = False
for param in ("DoUninstall", "DoShutdown", "DoReboot"):

Loading…
Cancel
Save