|
|
@ -9,6 +9,7 @@ import urllib.parse |
|
|
|
from datetime import datetime, UTC |
|
|
|
from datetime import datetime, UTC |
|
|
|
|
|
|
|
|
|
|
|
from cereal import messaging |
|
|
|
from cereal import messaging |
|
|
|
|
|
|
|
from openpilot.common.time import system_time_valid |
|
|
|
from openpilot.common.params import Params |
|
|
|
from openpilot.common.params import Params |
|
|
|
from openpilot.common.swaglog import cloudlog |
|
|
|
from openpilot.common.swaglog import cloudlog |
|
|
|
from openpilot.system.hardware import TICI |
|
|
|
from openpilot.system.hardware import TICI |
|
|
@ -196,8 +197,8 @@ def initialize_pigeon(pigeon: TTYPigeon) -> bool: |
|
|
|
cloudlog.error(f"failed to restore almanac backup, status: {restore_status}") |
|
|
|
cloudlog.error(f"failed to restore almanac backup, status: {restore_status}") |
|
|
|
|
|
|
|
|
|
|
|
# sending time to ublox |
|
|
|
# sending time to ublox |
|
|
|
t_now = datetime.now(UTC).replace(tzinfo=None) |
|
|
|
if system_time_valid(): |
|
|
|
if t_now >= datetime(2021, 6, 1): |
|
|
|
t_now = datetime.now(UTC).replace(tzinfo=None) |
|
|
|
cloudlog.warning("Sending current time to ublox") |
|
|
|
cloudlog.warning("Sending current time to ublox") |
|
|
|
|
|
|
|
|
|
|
|
# UBX-MGA-INI-TIME_UTC |
|
|
|
# UBX-MGA-INI-TIME_UTC |
|
|
|