diff --git a/frogpilot/common/frogpilot_variables.py b/frogpilot/common/frogpilot_variables.py index 971d20e0c..ab95caf82 100644 --- a/frogpilot/common/frogpilot_variables.py +++ b/frogpilot/common/frogpilot_variables.py @@ -12,7 +12,7 @@ from openpilot.common.basedir import BASEDIR from openpilot.common.conversions import Conversions as CV from openpilot.common.params import Params from openpilot.selfdrive.car import gen_empty_fingerprint -from openpilot.selfdrive.car.car_helpers import interfaces + from openpilot.selfdrive.car.gm.values import GMFlags from openpilot.selfdrive.car.interfaces import CarInterfaceBase from openpilot.selfdrive.car.mock.interface import CarInterface @@ -518,6 +518,7 @@ class FrogPilotVariables: with car.CarParams.from_bytes(msg_bytes) as cp_reader: CP = cp_reader.as_builder() else: + from openpilot.selfdrive.car.car_helpers import interfaces CarInterface, _, _ = interfaces[MOCK.MOCK] CP = CarInterface.get_params(MOCK.MOCK, gen_empty_fingerprint(), [], False, toggle, False) CarInterface.configure_torque_tune(MOCK.MOCK, CP.lateralTuning) @@ -531,6 +532,7 @@ class FrogPilotVariables: with custom.FrogPilotCarParams.from_bytes(fpmsg_bytes) as fpcp_reader: FPCP = fpcp_reader.as_builder() else: + from openpilot.selfdrive.car.car_helpers import interfaces CarInterface, _, _ = interfaces[MOCK.MOCK] FPCP = CarInterface.get_frogpilot_params(MOCK.MOCK, gen_empty_fingerprint(), [], CP, toggle) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 17e8df979..8b62f0f06 100644 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -929,14 +929,14 @@ class Controls: self.frogpilot_AM.add_many(self.sm.frame, frogpilot_alerts) current_frogpilot_alert = self.frogpilot_AM.process_alerts(self.sm.frame, clear_event_types) - if current_frogpilot_alert: - frogpilotControlsState.alertText1 = current_frogpilot_alert.alert_text_1 - frogpilotControlsState.alertText2 = current_frogpilot_alert.alert_text_2 - frogpilotControlsState.alertSize = current_frogpilot_alert.alert_size - frogpilotControlsState.alertStatus = current_frogpilot_alert.alert_status - frogpilotControlsState.alertBlinkingRate = current_frogpilot_alert.alert_rate - frogpilotControlsState.alertType = current_frogpilot_alert.alert_type - frogpilotControlsState.alertSound = current_frogpilot_alert.audible_alert + # if current_frogpilot_alert: + # frogpilotControlsState.alertText1 = current_frogpilot_alert.alert_text_1 + # frogpilotControlsState.alertText2 = current_frogpilot_alert.alert_text_2 + # frogpilotControlsState.alertSize = current_frogpilot_alert.alert_size + # frogpilotControlsState.alertStatus = current_frogpilot_alert.alert_status + # frogpilotControlsState.alertBlinkingRate = current_frogpilot_alert.alert_rate + # frogpilotControlsState.alertType = current_frogpilot_alert.alert_type + # frogpilotControlsState.alertSound = current_frogpilot_alert.audible_alert self.pm.send('frogpilotControlsState', frogpilot_dat) diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index aaa29b131..7439859e5 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -16,6 +16,7 @@ import capnp import cereal.messaging as messaging from cereal import car from cereal.services import SERVICE_LIST +from frogpilot.common.frogpilot_variables import FrogPilotVariables from msgq.visionipc import VisionIpcServer, get_endpoint_name as vipc_get_endpoint_name from openpilot.common.params import Params from openpilot.common.prefix import OpenpilotPrefix @@ -355,14 +356,17 @@ def get_car_params_callback(rc, pm, msgs, fingerprint): assert os.environ.get("SKIP_FW_QUERY", False) or has_cached_cp, \ "CarParamsCache is required for fingerprinting. Make sure to keep carParams msgs in the logs." + FrogPilotVariables().update(holiday_theme="stock", started=False) + for m in canmsgs[:300]: can.send(m.as_builder().to_bytes()) - _, CP = get_car(can, sendcan, Params().get_bool("ExperimentalLongitudinalEnabled"), get_frogpilot_toggles()) + _, CP, FPCP = get_car(can, sendcan, Params().get_bool("ExperimentalLongitudinalEnabled"), Params(), frogpilot_toggles=get_frogpilot_toggles()) if not params.get_bool("DisengageOnAccelerator"): CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS params.put("CarParams", CP.to_bytes()) + params.put("FrogPilotCarParams", FPCP.to_bytes()) return CP