Skip to content

Commit

Permalink
Update STEER_DELTA_DOWN - Temp Remove CLU11 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
TK211X authored and emmertex committed Aug 6, 2019
1 parent 8eefcae commit 840040c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions selfdrive/car/hyundai/carcontroller.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from selfdrive.car import limit_steer_rate
from selfdrive.car.hyundai.hyundaican import create_lkas11, create_lkas12, \
create_1191, create_1156, \
create_clu11, learn_checksum, create_mdps12
learn_checksum, create_mdps12 #, create_clu11
from selfdrive.car.hyundai.values import Buttons
from selfdrive.can.packer import CANPacker
import zmq
Expand All @@ -18,7 +18,7 @@
class SteerLimitParams:
STEER_MAX = 255 # >255 results in frozen torque, >409 results in no torque
STEER_DELTA_UP = 3
STEER_DELTA_DOWN = 7
STEER_DELTA_DOWN = 5
STEER_DRIVER_ALLOWANCE = 50
STEER_DRIVER_MULTIPLIER = 2
STEER_DRIVER_FACTOR = 1
Expand Down Expand Up @@ -157,7 +157,7 @@ def update(self, enabled, CS, actuators, pcm_cancel_cmd, hud_alert):
### Generate CAN Messages ###

self.lkas11_cnt = self.cnt % 0x10
self.clu11_cnt = self.cnt % 0x10
# self.clu11_cnt = self.cnt % 0x10
self.mdps12_cnt = self.cnt % 0x100

if self.camera_disconnected:
Expand All @@ -175,11 +175,11 @@ def update(self, enabled, CS, actuators, pcm_cancel_cmd, hud_alert):
can_sends.append(create_mdps12(self.packer, self.car_fingerprint, self.mdps12_cnt, CS.mdps12, CS.lkas11, \
self.checksum))

if pcm_cancel_cmd:
can_sends.append(create_clu11(self.packer, CS.clu11, Buttons.CANCEL, 0))
elif CS.stopped and (self.cnt - self.last_resume_cnt) > 5:
self.last_resume_cnt = self.cnt
can_sends.append(create_clu11(self.packer, CS.clu11, Buttons.RES_ACCEL, 0))
# if pcm_cancel_cmd:
# can_sends.append(create_clu11(self.packer, CS.clu11, Buttons.CANCEL, 0))
# elif CS.stopped and (self.cnt - self.last_resume_cnt) > 5:
# self.last_resume_cnt = self.cnt
# can_sends.append(create_clu11(self.packer, CS.clu11, Buttons.RES_ACCEL, 0))

self.cnt += 1

Expand Down

0 comments on commit 840040c

Please sign in to comment.