mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-04 15:56:05 +08:00
MADS: Tesla support (#682)
* MADS: Tesla and Rivian support
* request lateral if acc is engaged
* try this out
* fix
* make sure we keep the toggle off for tesla
* namedtuple
* disallow steering past 90 degrees for rivian
* whoops
* Revert "Revert "MADS: Steering Mode on Brake Pedal Press (#687)" (#789)"
This reverts commit 8dec4ea5
* both rivian and tesla
* enforce disengage on brake steering mode for Rivian and Tesla
* wrong one
* MADS: Steering Mode on Brake Pedal Press
* bump
* bump
* descriptions
* bump
* bump
* no tesla or rivian yet
* codecov v5
* Revert "codecov v5"
This reverts commit a347e3fb27c0fbf2510b69fe8148b254fa93b8de.
* cleanup
* refactor description
* sync name
* fix
* make sure we don't allow if brake was already being pressed
* no longer needed
* proper ui!
* allow LKAS tx at all times with MADS
* extra
* this ain't right
* try this
* test only
* bring them back
* some dynamic checks
* dynamic description for mads toggle
* one place for limited platforms
* update tests
* angle when long, lkas when mads
* bump
This commit is contained in:
+1
-1
Submodule opendbc_repo updated: 748a84787a...5db6b93bc5
@@ -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"};
|
||||
const std::vector<std::string> mads_limited_settings_brands = {"rivian", "tesla"};
|
||||
|
||||
enum class MadsSteeringMode {
|
||||
REMAIN_ACTIVE = 0,
|
||||
|
||||
@@ -18,7 +18,7 @@ class MadsSteeringModeOnBrake:
|
||||
|
||||
|
||||
def get_mads_limited_brands(CP: structs.CarParams) -> bool:
|
||||
return CP.brand in ("rivian", )
|
||||
return CP.brand in ("rivian", "tesla")
|
||||
|
||||
|
||||
def read_steering_mode_param(CP: structs.CarParams, params: Params):
|
||||
@@ -56,15 +56,9 @@ def set_car_specific_params(CP: structs.CarParams, CP_SP: structs.CarParamsSP, p
|
||||
# MADS Partial Support
|
||||
# MADS is currently partially supported for these platforms due to lack of consistent states to engage controls
|
||||
# Only MadsSteeringModeOnBrake.DISENGAGE is supported for these platforms
|
||||
# TODO-SP: To enable MADS full support for Rivian, identify consistent signals for MADS toggling
|
||||
# TODO-SP: To enable MADS full support for Rivian/Tesla, identify consistent signals for MADS toggling
|
||||
mads_partial_support = get_mads_limited_brands(CP)
|
||||
if mads_partial_support:
|
||||
params.put("MadsSteeringMode", "2")
|
||||
params.put_bool("MadsUnifiedEngagementMode", True)
|
||||
params.remove("MadsMainCruiseAllowed")
|
||||
|
||||
# MADS Disabled - No Support
|
||||
# MADS is currently not supported for these platforms due to lack of consistent states to engage controls
|
||||
# TODO-SP: To enable MADS full support for Tesla, identify consistent signals for MADS toggling
|
||||
if CP.brand in ("tesla", ):
|
||||
params.remove("Mads")
|
||||
|
||||
Reference in New Issue
Block a user