mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-01 01:43:41 +08:00
timed: set valid flag (#32061)
* timed: set valid flag
* oops
old-commit-hash: 43832335b8
This commit is contained in:
+3
-1
@@ -8,6 +8,7 @@ from typing import NoReturn
|
||||
from timezonefinder import TimezoneFinder
|
||||
|
||||
import cereal.messaging as messaging
|
||||
from openpilot.common.time import system_time_valid
|
||||
from openpilot.common.params import Params
|
||||
from openpilot.common.swaglog import cloudlog
|
||||
from openpilot.system.hardware import AGNOS
|
||||
@@ -69,7 +70,8 @@ def main() -> NoReturn:
|
||||
while True:
|
||||
sm.update(1000)
|
||||
|
||||
msg = messaging.new_message('clocks', valid=True)
|
||||
msg = messaging.new_message('clocks')
|
||||
msg.valid = system_time_valid()
|
||||
msg.clocks.wallTimeNanos = time.time_ns()
|
||||
pm.send('clocks', msg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user