mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-26 08:22:05 +08:00
small nissan cleanup (#25663)
This commit is contained in:
@@ -18,24 +18,22 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerLimitTimer = 1.0
|
||||
|
||||
ret.steerActuatorDelay = 0.1
|
||||
ret.steerRatio = 17
|
||||
|
||||
if candidate in (CAR.ROGUE, CAR.XTRAIL):
|
||||
ret.mass = 1610 + STD_CARGO_KG
|
||||
ret.wheelbase = 2.705
|
||||
ret.centerToFront = ret.wheelbase * 0.44
|
||||
ret.steerRatio = 17
|
||||
elif candidate in (CAR.LEAF, CAR.LEAF_IC):
|
||||
ret.mass = 1610 + STD_CARGO_KG
|
||||
ret.wheelbase = 2.705
|
||||
ret.centerToFront = ret.wheelbase * 0.44
|
||||
ret.steerRatio = 17
|
||||
elif candidate == CAR.ALTIMA:
|
||||
# Altima has EPS on C-CAN unlike the others that have it on V-CAN
|
||||
ret.safetyConfigs[0].safetyParam = 1 # EPS is on alternate bus
|
||||
ret.mass = 1492 + STD_CARGO_KG
|
||||
ret.wheelbase = 2.824
|
||||
ret.centerToFront = ret.wheelbase * 0.44
|
||||
ret.steerRatio = 17
|
||||
|
||||
ret.steerControlType = car.CarParams.SteerControlType.angle
|
||||
ret.radarOffCan = True
|
||||
|
||||
@@ -24,10 +24,7 @@ def create_steering_control(packer, apply_steer, frame, steer_on, lkas_max_torqu
|
||||
|
||||
def create_acc_cancel_cmd(packer, car_fingerprint, cruise_throttle_msg):
|
||||
values = copy.copy(cruise_throttle_msg)
|
||||
can_bus = 2
|
||||
|
||||
if car_fingerprint == CAR.ALTIMA:
|
||||
can_bus = 1
|
||||
can_bus = 1 if car_fingerprint == CAR.ALTIMA else 2
|
||||
|
||||
values["CANCEL_BUTTON"] = 1
|
||||
values["NO_BUTTON_PRESSED"] = 0
|
||||
|
||||
Reference in New Issue
Block a user