hard honda max accel in car interface (#21585)

* hard set in car interface, not related to planning

* move to values
pull/21601/head
HaraldSchafer 4 years ago committed by GitHub
parent 5d07819084
commit b8a4adfb2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      selfdrive/car/honda/interface.py
  2. 2
      selfdrive/car/honda/values.py

@ -5,10 +5,9 @@ from panda import Panda
from common.numpy_fast import clip, interp from common.numpy_fast import clip, interp
from common.params import Params from common.params import Params
from selfdrive.config import Conversions as CV 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.honda.hondacan import disable_radar
from selfdrive.car import STD_CARGO_KG, CivicParams, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint 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 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 # 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 # 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 @staticmethod
def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # pylint: disable=dangerous-default-value 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 VisualAlert = car.CarControl.HUDControl.VisualAlert
class CarControllerParams(): class CarControllerParams():
ACCEL_MAX = 1.6
def __init__(self, CP): def __init__(self, CP):
self.BRAKE_MAX = 1024//4 self.BRAKE_MAX = 1024//4
self.STEER_MAX = CP.lateralParams.torqueBP[-1] self.STEER_MAX = CP.lateralParams.torqueBP[-1]

Loading…
Cancel
Save