forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ev6 squash * test route * cleanup * remove those * resume spam * setme * more reliable button pressing * new steer signals * for now * update docs
- Loading branch information
1 parent
26d8cdf
commit 53a134f
Showing
9 changed files
with
255 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
def create_lkas(packer, enabled, frame, lat_active, apply_steer): | ||
values = { | ||
"LKA_MODE": 2, | ||
"LKA_ICON": 2 if enabled else 1, | ||
"TORQUE_REQUEST": apply_steer, | ||
"LKA_ASSIST": 0, | ||
"STEER_REQ": 1 if lat_active else 0, | ||
"STEER_MODE": 0, | ||
"SET_ME_1": 0, | ||
"NEW_SIGNAL_1": 0, | ||
"NEW_SIGNAL_2": 0, | ||
} | ||
return packer.make_can_msg("LKAS", 4, values, frame % 255) | ||
|
||
|
||
def create_buttons(packer, cnt, cancel, resume): | ||
values = { | ||
"_COUNTER": cnt % 0xf, | ||
"SET_ME_1": 1, | ||
"DISTANCE_BTN": 1 if resume else 0, | ||
"PAUSE_RESUME_BTN": 1 if cancel else 0, | ||
} | ||
return packer.make_can_msg("CRUISE_BUTTONS", 5, values) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.