Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions selfdrive/car/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from openpilot.common.bluepilot import is_bluepilot
if is_bluepilot():
from openpilot.bluepilot.selfdrive.car.bp_card_publisher import publish_controller_state_bp, publish_car_state_bp
# End BluePilot

REPLAY = "REPLAY" in os.environ

Expand Down Expand Up @@ -77,6 +78,7 @@ def __init__(self, CI=None, RI=None) -> None:
self.sm = messaging.SubMaster(['pandaStates', 'carControl', 'onroadEvents'] + ['carControlSP', 'longitudinalPlanSP'])
# BluePilot: added controllerStateBP, carStateBP to PubMaster
self.pm = messaging.PubMaster(['sendcan', 'carState', 'carParams', 'carOutput', 'liveTracks'] + ['carParamsSP', 'carStateSP', 'controllerStateBP', 'carStateBP'])
# End BluePilot

self.can_rcv_cum_timeout_counter = 0

Expand Down Expand Up @@ -274,6 +276,7 @@ def state_publish(self, CS: car.CarState, CS_SP: custom.CarStateSP, RD: structs.
# BluePilot: publish hybrid drive gauge data (carStateBP)
if is_bluepilot():
publish_car_state_bp(self.CI, self.pm, CS.canValid)
# End BluePilot

def controls_update(self, CS: car.CarState, CC: car.CarControl, CC_SP: custom.CarControlSP):
"""control update loop, driven by carControl"""
Expand All @@ -296,6 +299,7 @@ def controls_update(self, CS: car.CarState, CC: car.CarControl, CC_SP: custom.Ca
# BluePilot: publish lateral uncertainty for angleState vehicles (controllerStateBP)
if is_bluepilot():
publish_controller_state_bp(self.CI, self.pm)
# End BluePilot


def step(self):
Expand Down
4 changes: 3 additions & 1 deletion selfdrive/car/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ def convert_to_capnp(struct: structs.CarParamsSP | structs.CarStateSP | structs.
struct_capnp = custom.CarParamsSP.new_message(**struct_dict)
elif isinstance(struct, structs.CarStateSP):
struct_capnp = custom.CarStateSP.new_message(**struct_dict)
elif isinstance(struct, structs.ControllerStateBP): # BluePilot: controllerStateBP (lateral uncertainty)
# BluePilot: convert controllerStateBP custom message
elif isinstance(struct, structs.ControllerStateBP):
struct_capnp = custom.ControllerStateBP.new_message(**struct_dict)
# End BluePilot
else:
raise ValueError(f"Unsupported struct type: {type(struct)}")

Expand Down
Empty file removed selfdrive/ui/bp/mici/__init__.py
Empty file.
Empty file.
155 changes: 0 additions & 155 deletions selfdrive/ui/bp/mici/layouts/bluepilot_bp.py

This file was deleted.

Loading