Skip to content
Merged
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
3 changes: 2 additions & 1 deletion opendbc_repo/opendbc/car/bmw/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
from opendbc.car.interfaces import CarControllerBase
from opendbc.can.packer import CANPacker
from opendbc.car.common.conversions import Conversions as CV
from common import numpy_fast as np

VisualAlert = car_capnp.CarControl.HUDControl.VisualAlert

def calc_steering_torque_hold(angle, vEgo):
hold_BP = [-40.0, -6.0, -4.0, -3.0, -2.0, -1.0, -0.5, 0.5, 1.0, 2.0, 3.0, 4.0, 6.0, 40.0]
hold_V = [-12.0, -5.7, -5.0, -4.5, -4.0, -3.3, -2.5, 2.5, 3.3, 4.0, 4.5, 5.0, 5.7, 12.0]
return interp(angle, hold_BP, hold_V)
return np.interp(angle, hold_BP, hold_V)

# DO NOT CHANGE: Cruise control step size
CC_STEP = 1 # cruise single click jump - always 1 - interpreted as km or miles depending on DSC or DME set units
Expand Down
Loading