Skip to content

Commit

Permalink
Merge branch 'master' into CTR
Browse files Browse the repository at this point in the history
  • Loading branch information
vanillagorillaa authored Jan 23, 2025
2 parents d273293 + 7ceed32 commit d0f2495
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions opendbc/car/ford/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def update(self, CC, CS, now_nanos):
accel = max(accel, self.accel - (3.5 * CarControllerParams.ACC_CONTROL_STEP * DT_CTRL))

accel = float(np.clip(accel, CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX))
gas = float(np.clip(gas, CarControllerParams.ACCEL_MIN, CarControllerParams.ACCEL_MAX))

# Both gas and accel are in m/s^2, accel is used solely for braking
if not CC.longActive or gas < CarControllerParams.MIN_GAS:
Expand Down
6 changes: 4 additions & 2 deletions opendbc/car/tesla/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, experime

# Not merged yet
#ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.tesla)]
#ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TESLA_LONG_CONTROL

ret.steerLimitTimer = 1.0
ret.steerActuatorDelay = 0.25

ret.steerControlType = structs.CarParams.SteerControlType.angle
ret.radarUnavailable = True

ret.openpilotLongitudinalControl = True
ret.experimentalLongitudinalAvailable = True
if experimental_long:
ret.openpilotLongitudinalControl = True
# ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TESLA_LONG_CONTROL

return ret

0 comments on commit d0f2495

Please sign in to comment.