This commit is contained in:
Your Name
2024-05-11 15:27:31 -05:00
parent bc2a4e2266
commit 4373a0198f
11 changed files with 303 additions and 218 deletions

View File

@@ -18,6 +18,18 @@ from openpilot.selfdrive.car.interfaces import CarInterfaceBase
REPLAY = "REPLAY" in os.environ
# Notes:
# This is a generic class for interfacing between controlsd and specific implementations for a car.
# Variables:
# CI - carInterfaceBase
# CP - carParams
# CS - car state, should be consistent between every type of car
# Methods:
# state_update - calls CI.update, gets a new CS. Read only, this is regenerated every time called.
# state_publish - reads CS, CP, and carOutput.actuatorsOutput and sends via self.pm messaging
# controls_update - reads CI.apply, gets canbus commands, publishes via self.pm, something else executes canbus commands
class CarD:
CI: CarInterfaceBase