Hyundai CAN FD: disallow Manual Speed Limit Assist for EVs (#29888)

* bump opendbc

* block MSLA

* EV only

* Update selfdrive/car/hyundai/carstate.py

* Update selfdrive/car/hyundai/carstate.py

* Update selfdrive/car/hyundai/carstate.py

* Update selfdrive/car/hyundai/carstate.py
pull/29876/head
Shane Smiskol 2 years ago committed by GitHub
parent 3d60e8a2a0
commit 279377ec0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      selfdrive/car/hyundai/carstate.py

@ -228,6 +228,13 @@ class CarState(CarStateBase):
ret.cruiseState.speed = cp_cruise_info.vl["SCC_CONTROL"]["VSetDis"] * speed_factor
self.cruise_info = copy.copy(cp_cruise_info.vl["SCC_CONTROL"])
# Manual Speed Limit Assist is a feature that replaces non-adaptive cruise control on EV CAN FD platforms.
# It limits the vehicle speed, overridable by pressing the accelerator past a certain point.
# The car will brake, but does not respect positive acceleration commands in this mode
# TODO: find this message on ICE & HYBRID cars + cruise control signals (if exists)
if self.CP.carFingerprint in EV_CAR:
ret.cruiseState.nonAdaptive = cp.vl["MANUAL_SPEED_LIMIT_ASSIST"]["MSLA_ENABLED"] == 1
self.prev_cruise_buttons = self.cruise_buttons[-1]
self.cruise_buttons.extend(cp.vl_all[self.cruise_btns_msg_canfd]["CRUISE_BUTTONS"])
self.main_buttons.extend(cp.vl_all[self.cruise_btns_msg_canfd]["ADAPTIVE_CRUISE_MAIN_BTN"])
@ -322,6 +329,11 @@ class CarState(CarStateBase):
("DOORS_SEATBELTS", 4),
]
if CP.carFingerprint in EV_CAR:
messages += [
("MANUAL_SPEED_LIMIT_ASSIST", 10),
]
if not (CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS):
messages += [
("CRUISE_BUTTONS", 50)

Loading…
Cancel
Save