hard honda max accel in car interface (#21585)
* hard set in car interface, not related to planning * move to valuespull/21601/head
parent
5d07819084
commit
b8a4adfb2f
|
@ -5,10 +5,9 @@ from panda import Panda
|
|||
from common.numpy_fast import clip, interp
|
||||
from common.params import Params
|
||||
from selfdrive.config import Conversions as CV
|
||||
from selfdrive.car.honda.values import CruiseButtons, CAR, HONDA_BOSCH, HONDA_BOSCH_ALT_BRAKE_SIGNAL
|
||||
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, CAR, HONDA_BOSCH, HONDA_BOSCH_ALT_BRAKE_SIGNAL
|
||||
from selfdrive.car.honda.hondacan import disable_radar
|
||||
from selfdrive.car import STD_CARGO_KG, CivicParams, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
|
||||
from selfdrive.controls.lib.longitudinal_planner import A_CRUISE_MAX_VALS
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
|
||||
|
||||
|
@ -120,7 +119,7 @@ class CarInterface(CarInterfaceBase):
|
|||
# accelOverride is more or less the max throttle allowed to pcm: usually set to a constant
|
||||
# unless aTargetMax is very high and then we scale with it; this help in quicker restart
|
||||
|
||||
return float(max(max_accel, a_target / A_CRUISE_MAX_VALS[0])) * min(speedLimiter, accelLimiter)
|
||||
return float(max(max_accel, a_target / CarControllerParams.ACCEL_MAX)) * min(speedLimiter, accelLimiter)
|
||||
|
||||
@staticmethod
|
||||
def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # pylint: disable=dangerous-default-value
|
||||
|
|
|
@ -7,6 +7,8 @@ Ecu = car.CarParams.Ecu
|
|||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
class CarControllerParams():
|
||||
ACCEL_MAX = 1.6
|
||||
|
||||
def __init__(self, CP):
|
||||
self.BRAKE_MAX = 1024//4
|
||||
self.STEER_MAX = CP.lateralParams.torqueBP[-1]
|
||||
|
|
Loading…
Reference in New Issue