mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
replay
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user