diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index 6ce0930c45668c..bf66c9d43a0928 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -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 @@ -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 @@ -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: @@ -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 diff --git a/selfdrive/controls/lib/model_parser.py b/selfdrive/controls/lib/model_parser.py index 0b4bb241dbf342..9b28c66bb9da48 100644 --- a/selfdrive/controls/lib/model_parser.py +++ b/selfdrive/controls/lib/model_parser.py @@ -44,7 +44,7 @@ def update(self, v_ego, md): self.lane_width_certainty += 0.05 * (lr_prob - self.lane_width_certainty) current_lane_width = abs(l_poly[3] - r_poly[3]) self.lane_width_estimate += 0.005 * (current_lane_width - self.lane_width_estimate) - speed_lane_width = interp(v_ego, [0., 31.], [3., 3.8]) + speed_lane_width = interp(v_ego, [0., 31.], [2.8, 3.5]) self.lane_width = self.lane_width_certainty * self.lane_width_estimate + \ (1 - self.lane_width_certainty) * speed_lane_width