just rivian

This commit is contained in:
Jason Wen
2025-05-19 10:52:47 -04:00
parent 9bfacdd95d
commit 5667a9d994
4 changed files with 12 additions and 7 deletions
@@ -12,7 +12,7 @@
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/settings.h"
#include "selfdrive/ui/sunnypilot/qt/widgets/controls.h"
const std::vector<std::string> mads_limited_settings_brands = {"rivian", "tesla"};
const std::vector<std::string> mads_limited_settings_brands = {"rivian"};
enum class MadsSteeringMode {
REMAIN_ACTIVE = 0,
+9 -4
View File
@@ -18,7 +18,7 @@ class MadsSteeringModeOnBrake:
def read_steering_mode_param(CP: structs.CarParams, params: Params):
if CP.brand in ("rivian", "tesla"):
if CP.brand in ("rivian", ):
return MadsSteeringModeOnBrake.DISENGAGE
try:
@@ -49,9 +49,14 @@ def set_car_specific_params(CP: structs.CarParams, CP_SP: structs.CarParamsSP, p
CP_SP.flags |= HyundaiFlagsSP.LONGITUDINAL_MAIN_CRUISE_TOGGLEABLE.value
CP_SP.safetyParam |= HyundaiSafetyFlagsSP.LONG_MAIN_CRUISE_TOGGLEABLE
# MADS is currently not supported in Rivian/Tesla due to lack of consistent states to engage controls
# TODO-SP: To enable MADS for Rivian/Tesla, identify consistent signals for MADS toggling
if CP.brand in ("rivian", "tesla"):
# MADS is currently not supported in Rivian due to lack of consistent states to engage controls
# TODO-SP: To enable MADS for Rivian, identify consistent signals for MADS toggling
if CP.brand in ("rivian", ):
params.put("MadsSteeringMode", "2")
params.put_bool("MadsUnifiedEngagementMode", True)
params.remove("MadsMainCruiseAllowed")
# MADS is currently not supported in Tesla due to lack of consistent states to engage controls
# TODO-SP: To enable MADS for Tesla, identify consistent signals for MADS toggling
if CP.brand == "tesla":
params.remove("Mads")
+1 -1
View File
@@ -45,7 +45,7 @@ class ModularAssistiveDrivingSystem:
if self.CP.flags & (HyundaiFlags.HAS_LDA_BUTTON | HyundaiFlags.CANFD):
self.allow_always = True
if self.selfdrive.CP.brand in ("rivian", "tesla"):
if self.selfdrive.CP.brand in ("rivian", ):
self.no_main_cruise = True
# read params on init