From 27e67e53c4883709e8082be36e3f375015776576 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 2 Oct 2024 21:44:21 -0700 Subject: [PATCH] and migrate python --- selfdrive/car/car_specific.py | 4 ++-- selfdrive/car/card.py | 4 ++-- selfdrive/car/tests/test_models.py | 2 +- selfdrive/selfdrived/events.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/selfdrive/car/car_specific.py b/selfdrive/car/car_specific.py index 23719a8c4f..94afec50e2 100644 --- a/selfdrive/car/car_specific.py +++ b/selfdrive/car/car_specific.py @@ -1,5 +1,5 @@ from collections import deque -from cereal import car +from cereal import car, log import cereal.messaging as messaging from opendbc.car import DT_CTRL, structs from opendbc.car.interfaces import MAX_CTRL_SPEED @@ -11,7 +11,7 @@ from openpilot.selfdrive.selfdrived.events import Events ButtonType = structs.CarState.ButtonEvent.Type GearShifter = structs.CarState.GearShifter -EventName = car.OnroadEvent.EventName +EventName = log.OnroadEvent.EventName NetworkLocation = structs.CarParams.NetworkLocation diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index 380d5df431..0afd0e7323 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -5,7 +5,7 @@ import threading import cereal.messaging as messaging -from cereal import car +from cereal import car, log from panda import ALTERNATIVE_EXPERIENCE @@ -25,7 +25,7 @@ from openpilot.selfdrive.car.helpers import convert_carControl, convert_to_capnp REPLAY = "REPLAY" in os.environ -EventName = car.OnroadEvent.EventName +EventName = log.OnroadEvent.EventName # forward carlog.addHandler(ForwardingHandler(cloudlog)) diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 10620c146f..ef54631e54 100644 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -31,7 +31,7 @@ from openpilot.tools.lib.route import SegmentName from panda.tests.libpanda import libpanda_py -EventName = car.OnroadEvent.EventName +EventName = log.OnroadEvent.EventName PandaType = log.PandaState.PandaType SafetyModel = car.CarParams.SafetyModel diff --git a/selfdrive/selfdrived/events.py b/selfdrive/selfdrived/events.py index 070ca60ca2..7be514e350 100755 --- a/selfdrive/selfdrived/events.py +++ b/selfdrive/selfdrived/events.py @@ -16,7 +16,7 @@ AlertSize = log.SelfdriveState.AlertSize AlertStatus = log.SelfdriveState.AlertStatus VisualAlert = car.CarControl.HUDControl.VisualAlert AudibleAlert = car.CarControl.HUDControl.AudibleAlert -EventName = car.OnroadEvent.EventName +EventName = log.OnroadEvent.EventName # Alert priorities @@ -98,7 +98,7 @@ class Events: def to_msg(self): ret = [] for event_name in self.events: - event = car.OnroadEvent.new_message() + event = log.OnroadEvent.new_message() event.name = event_name for event_type in EVENTS.get(event_name, {}): setattr(event, event_type, True)