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

Simple AEB #33535

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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 cereal/car.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ struct CarControl {
pid @1;
stopping @2;
starting @3;
emergencyBraking @4;
}
}

Expand Down
2 changes: 1 addition & 1 deletion panda
4 changes: 4 additions & 0 deletions selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def state_control(self):
self.steer_limited, self.desired_curvature,
self.calibrated_pose) # TODO what if not available

if CS.leftBlinker:
actuators.accel = -5.0
actuators.longControlState = car.CarControl.Actuators.LongControlState.emergencyBraking

# Ensure no NaNs/Infs
for p in ACTUATOR_FIELDS:
attr = getattr(actuators, p)
Expand Down
Loading