Compare commits

..

1 Commits

Author SHA1 Message Date
Isaac Barham cdbad72d26 Tesla: Virtual Torsion Bar cooperative steering on ANGLE_CONTROL
- Bump opendbc_repo to Virtual Torsion Bar (VTB) cooperative steering on
  ANGLE_CONTROL (removes OEM LANE_KEEP_ASSIST speed cutoffs and low-speed
  oscillations, adds 5 Nm instantaneous torque disengage and 40 deg/s
  high-rate entry guard).
- Update Tesla Cooperative Steering settings UI and sunnylink schema to
  remove obsolete minimum-speed and oscillation warnings.
2026-12-02 17:14:12 -05:00
4 changed files with 9 additions and 19 deletions
@@ -10,15 +10,11 @@ from openpilot.selfdrive.ui.ui_state import ui_state
from openpilot.system.ui.lib.multilang import tr
from openpilot.system.ui.sunnypilot.widgets.list_view import multiple_button_item_sp, toggle_item_sp
COOP_STEERING_MIN_KMH = 23
OEM_STEERING_MIN_KMH = 48
KM_TO_MILE = 0.621371
class TeslaSettings(BrandSettings):
def __init__(self):
super().__init__()
self.coop_steering_toggle = toggle_item_sp(tr("Cooperative Steering (Beta)"), "", param="TeslaCoopSteering")
self.coop_steering_toggle = toggle_item_sp(tr("Cooperative Steering"), "", param="TeslaCoopSteering")
self.mads_screen_button = multiple_button_item_sp(
title=lambda: tr("MADS Screen Activation"),
description="",
@@ -29,19 +25,10 @@ class TeslaSettings(BrandSettings):
self.items = [self.coop_steering_toggle, self.mads_screen_button]
def update_settings(self):
is_metric = ui_state.is_metric
unit = "km/h" if is_metric else "mph"
display_value_coop = COOP_STEERING_MIN_KMH if is_metric else round(COOP_STEERING_MIN_KMH * KM_TO_MILE)
display_value_oem = OEM_STEERING_MIN_KMH if is_metric else round(OEM_STEERING_MIN_KMH * KM_TO_MILE)
coop_steering_disabled_msg = tr("Enable \"Always Offroad\" in Device panel, or turn vehicle off to toggle.")
coop_steering_warning = tr(f"Warning: May experience steering oscillations below {display_value_oem} {unit} during turns, " +
"recommend disabling this feature if you experience these.")
coop_steering_desc = (
f"<b>{coop_steering_warning}</b><br><br>" +
f"{tr('Allows the driver to provide limited steering input while openpilot is engaged.')}<br>" +
f"{tr(f'Only works above {display_value_coop} {unit}.')}"
f"{tr('Converts light steering input into steering-wheel rotation.')}<br>" +
f"{tr('The faster you go, the stiffer the steering gets.')}"
)
if not ui_state.is_offroad():
@@ -2265,7 +2265,8 @@
{
"key": "TeslaCoopSteering",
"widget": "toggle",
"title": "Cooperative Steering (Beta)",
"title": "Cooperative Steering",
"description": "Converts light steering input into steering-wheel rotation. The faster you go, the stiffer the steering gets.",
"enablement": [
{
"type": "offroad_only"
@@ -53,7 +53,9 @@ sections:
items:
- key: TeslaCoopSteering
widget: toggle
title: Cooperative Steering (Beta)
title: Cooperative Steering
description: Converts light steering input into steering-wheel rotation. The faster
you go, the stiffer the steering gets.
enablement:
- $ref: '#/macros/offroad'
- key: TeslaMadsScreenButton