mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 02:52:04 +08:00
35a99d7fc6
* use CP * no car control, consistent _update function signatures * eh it's fine to name it whatever * clean up * oops * !! * now we can delete this! * nobody does anymore old-commit-hash: 7248b00086f9b8d5d95c80a2eb7fe89c387f44ea
27 lines
843 B
Python
27 lines
843 B
Python
import math
|
|
from cereal import car
|
|
from openpilot.selfdrive.car import get_safety_config
|
|
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
|
|
from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM
|
|
|
|
|
|
class CarInterface(CarInterfaceBase):
|
|
@staticmethod
|
|
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
|
|
ret.notCar = True
|
|
ret.carName = "body"
|
|
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.body)]
|
|
|
|
ret.minSteerSpeed = -math.inf
|
|
ret.maxLateralAccel = math.inf # TODO: set to a reasonable value
|
|
ret.steerLimitTimer = 1.0
|
|
ret.steerActuatorDelay = 0.
|
|
|
|
ret.wheelSpeedFactor = SPEED_FROM_RPM
|
|
|
|
ret.radarUnavailable = True
|
|
ret.openpilotLongitudinalControl = True
|
|
ret.steerControlType = car.CarParams.SteerControlType.angle
|
|
|
|
return ret
|