mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-06 16:55:58 +08:00
fix hyundai editing can parser values
This commit is contained in:
@@ -75,9 +75,8 @@ class CarController():
|
||||
if pcm_cancel_cmd:
|
||||
can_sends.append(create_clu11(self.packer, frame, CS.clu11, Buttons.CANCEL))
|
||||
elif CS.out.cruiseState.standstill:
|
||||
# SCC won't resume anyway when the lead distace is less than 3.7m
|
||||
# send resume at a max freq of 5Hz
|
||||
if CS.lead_distance > 3.7 and (frame - self.last_resume_frame)*DT_CTRL > 0.2:
|
||||
if (frame - self.last_resume_frame)*DT_CTRL > 0.2:
|
||||
can_sends.append(create_clu11(self.packer, frame, CS.clu11, Buttons.RES_ACCEL))
|
||||
self.last_resume_frame = frame
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import copy
|
||||
from cereal import car
|
||||
from selfdrive.car.hyundai.values import DBC, STEER_THRESHOLD, FEATURES, EV_HYBRID
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
@@ -124,8 +125,8 @@ class CarState(CarStateBase):
|
||||
ret.rightBlindspot = cp.vl["LCA11"]["CF_Lca_IndRight"] != 0
|
||||
|
||||
# save the entire LKAS11 and CLU11
|
||||
self.lkas11 = cp_cam.vl["LKAS11"]
|
||||
self.clu11 = cp.vl["CLU11"]
|
||||
self.lkas11 = copy.copy(cp_cam.vl["LKAS11"])
|
||||
self.clu11 = copy.copy(cp.vl["CLU11"])
|
||||
self.park_brake = cp.vl["CGW1"]['CF_Gway_ParkBrakeSw']
|
||||
self.steer_state = cp.vl["MDPS12"]['CF_Mdps_ToiActive'] # 0 NOT ACTIVE, 1 ACTIVE
|
||||
self.lead_distance = cp.vl["SCC11"]['ACC_ObjDist']
|
||||
|
||||
Reference in New Issue
Block a user