This commit is contained in:
Your Name
2024-05-03 23:56:56 -05:00
parent 355a790b8a
commit fac026084a

View File

@@ -61,6 +61,7 @@ class CarState(CarStateBase):
def calculate_speed_limit(self, cp, cp_cam):
if self.CP.carFingerprint in CANFD_CAR:
speed_limit_bus = cp if self.CP.flags & HyundaiFlags.CANFD_HDA2 else cp_cam
print(speed_limit_bus, sys.stderr)
return speed_limit_bus.vl["CLUSTER_SPEED_LIMIT"]["SPEED_LIMIT_1"]
else:
if "SpeedLim_Nav_Clu" not in cp.vl["Navi_HU"]:
@@ -297,6 +298,8 @@ class CarState(CarStateBase):
# prev_cruise_buttons = 0 (none), 1, 2 - up down
# new lane change works perfect
# need to auto disable lat on turn lower than 20 + turn signal as default
# ret: cruiseState.speed > 0 = and cruiseState.enabled = false = idle cruise.
# press cruise to cancel it if not op engaged
self.lkas_enabled = lkas_enabled