Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically use Toyota distance button if TSS2 #525

Open
wants to merge 2 commits into
base: SA-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Want to request a feature or create a bug report? [Open an issue here!](https://
* [**~~Dynamic camera offsetting~~ (removed temporarily)**](#Dynamic-camera-offset-based-on-oncoming-traffic) - moves you over if adjacent lane has oncoming traffic
* [**~~Dynamic gas~~** (no longer needed)](#dynamic-gas) - smoother gas control
* [**~~Adding derivative to PI for better control~~**](#pi---pid-controller-for-long-and-lat) - lat: smoother control in turns; long: fix for comma pedal overshoot
* ***something about changing distance profiles using stock distance button***

### General Features
* [**~~Smoother long control using delay~~ (stock added this!)**](#compensate-for-longitudinal-delay-for-earlier-braking) - using an accel delay, just like for lateral
Expand Down
3 changes: 3 additions & 0 deletions selfdrive/car/toyota/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def __init__(self, CP):
if self.enable_distance_btn:
# Previously was publishing from UI
self.pm = messaging.PubMaster(['dynamicFollowButton'])
# set param to true for next restart
if self.CP.carFingerprint in TSS2_CAR:
op_params.put('toyota_distance_btn', True)

def update(self, cp, cp_cam):
ret = car.CarState.new_message()
Expand Down