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

Tesla devel #465

Closed
wants to merge 1,051 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1051 commits
Select commit Hold shift + click to select a range
8f19a1d
PCC Follow: Don't interrupt accel/decel if the target speed is safe
Dec 6, 2018
e222d48
completely UNtested
Gernby Dec 6, 2018
d8c2d40
PCC: Reduce P in speed PID to limit overshoot
geohot Dec 6, 2018
bbbc186
Be unsafe
SippieCup Nov 19, 2018
25eb0c3
Merge remote-tracking branch 'Gernby/Feed-Forward_Steer_Offset' into …
SippieCup Dec 6, 2018
6108071
Merge remote-tracking branch 'origin/tesla_devel' into tesla_devel
SippieCup Dec 6, 2018
d32b7d4
IC tweaks
BogGyver Dec 6, 2018
d2b2d4b
Merge remote-tracking branch 'Gernby/Feed-Forward_Steer_Offset' into …
SippieCup Dec 6, 2018
56fb7bb
Merge branch 'bog_pedal' into tesla_pedal
Dec 6, 2018
7c70b05
stop steering a 0mph
BogGyver Dec 6, 2018
ea632d2
Merge branch 'bog_pedal' into tesla_pedal
Dec 6, 2018
287edbf
PID readability
Dec 6, 2018
074563a
changed steerKf from 0.00006 to 0.003 for new gernby ff model
BogGyver Dec 6, 2018
98027ec
Merge remote-tracking branch 'BogGyver/tesla_pedal' into tesla_devel
SippieCup Dec 6, 2018
48df871
changed speedKf back to 0.00006
BogGyver Dec 7, 2018
3499d71
Revert back to 0.00006
SippieCup Dec 7, 2018
0b2f7b2
Merge branch 'bog_pedal' into tesla_pedal
Dec 7, 2018
a2305ab
PCC: Less P, more I in PID
geohot Dec 7, 2018
cab492f
Removed logos
SippieCup Dec 7, 2018
06c88c9
Gernby/Feed-Forward-Accel-Rate refactored for tesla
SippieCup Dec 7, 2018
b3127be
Revert "Gernby/Feed-Forward-Accel-Rate refactored for tesla"
SippieCup Dec 7, 2018
e478620
Update sterrrateCost
SippieCup Dec 7, 2018
57c379a
steerRateCost = 2.0
BogGyver Dec 7, 2018
00214f4
Merge branch 'comma_devel' into tesla_devel
Dec 7, 2018
de425b9
Merge remote-tracking branch 'JeanKalud/tesla_devel' into tesla_devel
SippieCup Dec 7, 2018
a7c377b
Merge branch 'comma_devel' into tesla_pedal
Dec 7, 2018
45d4c22
PCC PID twiddling
Dec 7, 2018
2477b63
PCC value fiddling
geohot Dec 8, 2018
bf6db6d
merged accel and rate consideration for tesla steering
Gernby Dec 8, 2018
499909a
Merge branch 'tesla/tesla_pedal' into tesla_devel
SippieCup Dec 8, 2018
a05e480
Merge pull request #20 from Gernby/tesla/tesla_pedal
SippieCup Dec 8, 2018
cb27dc5
Merge branch 'tesla_devel' into revB_giraffe
appleguru Dec 8, 2018
073418f
Added dual mode feed-forward for angle-type steering
Gernby Dec 8, 2018
2e8942a
Merge branch 'bog_pedal' into tesla_pedal
Dec 8, 2018
d89d7db
Merge remote-tracking branch 'Gernby/tesla_pedal' into tesla_devel
SippieCup Dec 8, 2018
21076a0
Merge remote-tracking branch 'Gernby/tesla_pedal' into tesla_pedal
SippieCup Dec 8, 2018
adfbf7b
PCC twiddling
geohot Dec 8, 2018
796d17d
Merge branch 'bog_pedal' into tesla_pedal
Dec 8, 2018
f3b8b01
PCC twiddling
Dec 9, 2018
54e3b3d
Revert "Remove longitudinal 'off' UI buttons"
Dec 9, 2018
5d9ae5e
PCC Follow: tighten follow speed
geohot Dec 10, 2018
ab6e164
Merge branch 'comma_devel' into tesla_pedal
Dec 10, 2018
69c76a1
changes to make ALCA work with the Gernby latcontrol.py
BogGyver Dec 10, 2018
868a199
remove latcontrol smoothing to enable ALCA
BogGyver Dec 10, 2018
addfff1
PCC Follow: twiddling
Dec 10, 2018
35024c5
PCC PID based off a more realistic Tesla torque curve
Dec 10, 2018
6639107
latcobtrol from Gernby removal
BogGyver Dec 10, 2018
e043395
PCC: rescale PID based on new torque curve
Dec 10, 2018
5700a32
PCC twiddling
geohot Dec 11, 2018
45cf0c4
PCC: twiddling
geohot Dec 11, 2018
db55576
Merge branch 'bog_pedal' into tesla_pedal
Dec 11, 2018
82f1242
latest working dev code
BogGyver Dec 12, 2018
044bd29
untested merge
Gernby Dec 12, 2018
be6bc31
battling shitty git
Gernby Dec 12, 2018
7cb32e9
git is sucking giant monkey balls
Gernby Dec 12, 2018
89418e4
Trying to figure out what git did...
Gernby Dec 12, 2018
046bd20
Merge branch 'bog_pedal' into tesla_pedal
Dec 12, 2018
37c7196
still trying to un-git myself
Gernby Dec 12, 2018
982c7e0
Finally got it fixed, works awesome!
Gernby Dec 12, 2018
828f315
Updated PCC
SippieCup Dec 13, 2018
ff98838
PCC: correct PID speed units
DavidWAbrahams Dec 13, 2018
2d56a9e
PCC: Const PID values
DavidWAbrahams Dec 13, 2018
53bdee4
Hopefully not corrupted by git
Gernby Dec 13, 2018
05eae19
hopefully fixed white space corruption
Gernby Dec 13, 2018
f2b706c
working again, hopefully resolved git issue
Gernby Dec 13, 2018
e8387db
Merge remote-tracking branch 'commaai/devel' into tesla_devel
SippieCup Dec 13, 2018
f919770
Merge remote-tracking branch 'commaai/devel'
SippieCup Dec 13, 2018
62e9cac
Add long control flag for tesla
SippieCup Dec 13, 2018
a209618
Set long control bit
Dec 13, 2018
0756607
Merge branch 'tesla_pedal' of https://github.com/AllWashedOut/openpil…
Dec 13, 2018
8a39a09
Merge branch 'tesla_pedal-0.5.7' into tesla_pedal
Dec 13, 2018
ad78e25
Integrated Gernby smoothing of mpc with ALCA; Panda changes for radar
BogGyver Dec 14, 2018
6d811e9
bug fix in ALCA for Gernby
BogGyver Dec 14, 2018
592a0aa
Merge branch 'tesla_pedal' into tesla_devel
SippieCup Dec 14, 2018
5b9708c
removed hard-coded actuator delay
Gernby Dec 16, 2018
db7e043
Remove speed limit UI element (available on IC)
SippieCup Dec 16, 2018
0579016
Fixed steer_actuator_delay for pathplanner
Gernby Dec 16, 2018
6343c89
Set default UI to have camera background
Dec 17, 2018
d6196a0
Merge branch 'bog_pedal' into tesla_pedal
Dec 17, 2018
e3a1344
BBUI draw cleanup
Dec 17, 2018
b2ddcf6
Revert "Be unsafe"
SippieCup Nov 19, 2018
a809e3c
Revert "Remove speed limit UI element (available on IC)"
SippieCup Dec 16, 2018
6697427
Merge remote-tracking branch 'BogGyver/tesla_pedal-0.5.7' into tesla_…
SippieCup Dec 19, 2018
19fd583
latest safety changes for radar
BogGyver Dec 19, 2018
bb3ebcb
first round of fixes for speedlimit; not tested
BogGyver Dec 19, 2018
b0f8a78
final fixes for speed
BogGyver Dec 19, 2018
55c35ab
final(?) fix for kph speed limit
BogGyver Dec 19, 2018
d158d1a
merge boggyver changes
SippieCup Dec 20, 2018
322d986
RADAR WORKS and some tweaks for speed limit in kph
BogGyver Dec 20, 2018
b4e41f6
force screen off mode unti Comma fixes tri_state
BogGyver Dec 22, 2018
343d946
Wiggle vision + resonant FF and error cancellation
Gernby Dec 23, 2018
4e79955
Merge remote-tracking branch 'Gernby/Resonant-Wigasm' into tesla_devel
SippieCup Dec 23, 2018
d9bbf56
fix indentation
SippieCup Dec 23, 2018
6197e72
Update interface.py
SippieCup Dec 23, 2018
ed25611
Update interface.py
SippieCup Dec 23, 2018
0b24b41
increased projection factor and decreased accel_limit
Gernby Dec 24, 2018
2b6ed29
Revert "Update interface.py"
SippieCup Dec 23, 2018
fd5bb34
Revert "Update interface.py"
SippieCup Dec 23, 2018
d39fc94
Merge remote-tracking branch 'Gernby/Resonant-Wigasm' into tesla_devel
SippieCup Dec 25, 2018
a1a57e7
Add radar dbc for tesla radars
SippieCup Dec 27, 2018
0134623
Merge remote-tracking branch 'origin/tesla_devel' into tesla_devel
SippieCup Dec 27, 2018
70eaf4e
Try enabling gas interceptor.
SippieCup Dec 29, 2018
fabc7ce
revert gasInterceptor, issues w/ PCC Module
SippieCup Dec 30, 2018
e40c627
improved interpolation logic between MPC updates
Gernby Dec 27, 2018
926d4ec
Remove multiplier from lateral error detection
SippieCup Dec 30, 2018
44b4b8b
Update pathplanner.py
SippieCup Dec 30, 2018
da52fe9
Changes to model
SippieCup Dec 30, 2018
df7634c
Update interface.py
SippieCup Dec 30, 2018
1083bf5
Update interface.py
SippieCup Dec 30, 2018
37ea7ee
Update interface.py
SippieCup Dec 30, 2018
bab3843
Update interface.py
SippieCup Dec 31, 2018
b78c1e4
Update model
SippieCup Dec 31, 2018
5deec12
Merge branch 'sid' into tesla_pedal
Dec 31, 2018
5213cc6
PCC: twiddling
geohot Dec 31, 2018
0831934
model updated
SippieCup Jan 1, 2019
c056c76
Revert Touch.c changes from 0.5.6
arne182 Jan 1, 2019
fb91811
Merge branch 'sid' into tesla_pedal
Jan 1, 2019
a916d73
Roll back some BBUI changes to simplify merges
Jan 2, 2019
d8178f2
Disable logo and PCC-OFF mode
Jan 2, 2019
f74008d
Disable ACC-OFF mode
Jan 2, 2019
8f59f7e
Merge pull request #5 from arne182/patch-4
SippieCup Jan 2, 2019
aaf1c54
Merge pull request #6 from AllWashedOut/tesla_pedal
SippieCup Jan 2, 2019
311ef26
Change to black screen rather than camera
SippieCup Jan 2, 2019
b64d4ec
Make PCC a little more aggressive
SippieCup Jan 2, 2019
1266117
Revert "Merge pull request #5 from arne182/patch-4"
SippieCup Jan 2, 2019
4a06021
More aggressive acceleration
SippieCup Jan 2, 2019
d563fb1
Merge kph fix
SippieCup Jan 3, 2019
39fe945
Model changes
SippieCup Jan 4, 2019
9489997
ubfinished DAS moveto Panda
BogGyver Jan 4, 2019
627f6cf
Update CLICKS for longer bootup time of EONS and avoid unwanted fast …
SippieCup Jan 5, 2019
5462017
model update
SippieCup Jan 5, 2019
960f213
Update VERSION
SippieCup Jan 5, 2019
3f777e1
Revert "Update CLICKS for longer bootup time of EONS and avoid unwant…
SippieCup Jan 5, 2019
1cb039b
Create visions-wiggly
BogGyver Jan 7, 2019
9bd3d36
Add files via upload
BogGyver Jan 7, 2019
d15d67d
Delete visions-wiggly
BogGyver Jan 7, 2019
69bf277
added wiggly
BogGyver Jan 7, 2019
a6c1653
virtual tri-state w/ ui button; human steering no longer optional; wi…
BogGyver Jan 7, 2019
6c44d68
Reduced Steer Ratio
SippieCup Jan 7, 2019
4985f14
NOW switch between standard and wiggly with ui button (restarts comma…
BogGyver Jan 7, 2019
f30e5ef
using reboot instead of tmuz script
BogGyver Jan 7, 2019
f6f3c5f
Update interface.py
SippieCup Jan 7, 2019
54b1be9
tweaks for the touch screen and timing of the reboot script
BogGyver Jan 7, 2019
56b56f8
fixes in visiond script
BogGyver Jan 7, 2019
a32b559
update steering model
SippieCup Jan 8, 2019
943b152
Fix the touch issues with UI since the latest Comma code update
BogGyver Jan 9, 2019
0711189
final fix for touch on UI
BogGyver Jan 9, 2019
224d24b
Merge remote-tracking branch 'BogGyver/tesla_pedal-0.5.7' into tesla_…
SippieCup Jan 9, 2019
3057361
fix bbui and visiond merge
SippieCup Jan 9, 2019
ea56d6f
Update model for better turn-in on non-wiggle
SippieCup Jan 9, 2019
06b2e9b
remove speed limit from pos 1 and 3 of the tri state since it is alre…
BogGyver Jan 9, 2019
59a4874
PCC Follow twiddling
Jan 10, 2019
adcca6a
revert cur_state and add longitudinal offset for camera
Gernby Jan 10, 2019
6cf73c3
Merge remote-tracking branch 'BogGyver/tesla_pedal-0.5.7' into tesla_…
SippieCup Jan 10, 2019
db16de2
Merge pull request #9 from Gernby/patch-1
SippieCup Jan 10, 2019
a6b2c26
Merge remote-tracking branch 'origin/tesla_devel' into tesla_devel
SippieCup Jan 10, 2019
5247751
Merge remote-tracking branch 'jeankalud/tesla_devel' into tesla_devel
SippieCup Jan 10, 2019
e7930fb
bring camera forward
SippieCup Jan 10, 2019
c3fef2a
Update latcontrol.py
SippieCup Jan 10, 2019
7128dd5
Update interface.py
SippieCup Jan 10, 2019
5075b3d
PCC Hysteresis cleanup
Jan 10, 2019
d845bff
Tighter limits on pedal jerk
Jan 10, 2019
ce24cca
Fix timeout that creates CAN error message.
BogGyver Jan 11, 2019
dd3b088
Update ui.c
SippieCup Jan 11, 2019
a509051
PCC Hysteresis cleanup
Jan 10, 2019
1859050
Tighter limits on pedal jerk
Jan 10, 2019
0c07a6d
Merge branch 'tesla_devel' of https://github.com/AllWashedOut/openpil…
Jan 11, 2019
777eb41
PCC: Further reduce pedal accel jumpiness
geohot Jan 13, 2019
b742bd5
PCC: faster braking
geohot Jan 13, 2019
e449974
PCC: more PID "I" to help on hills
Jan 14, 2019
c7c08c0
first pass at DAS emulation in Panda. might have errors
BogGyver Jan 15, 2019
1146a37
few DAS changes
BogGyver Jan 15, 2019
8cf0ef8
Merge branch 'tesla_devel' into revB_giraffe
appleguru Jan 15, 2019
ae4d2dd
fix speed limit
BogGyver Jan 15, 2019
70b353d
fix das can message
BogGyver Jan 15, 2019
f923513
change max angle for accel
SippieCup Jan 14, 2019
c5592ef
Disable the GMLAN interrupt timer when alt is disabled
appleguru Jan 15, 2019
7b41ace
Merge branch 'sid' into david_devel
Jan 16, 2019
0810532
Actually init UJA1023 (and comment out CAN Push failed so we can actu…
appleguru Jan 16, 2019
f955752
Per appleguru suggestion, remove logging to serial
jeankalud Jan 17, 2019
eb3ffbf
Fix GTW_carConfig bug, should have been removed
jeankalud Jan 17, 2019
a87f871
PCC: more PID "I" to help on hills
Jan 14, 2019
befdf5d
change max angle for accel
SippieCup Jan 14, 2019
9d6d87b
Merge branch 'tesla_devel' of https://github.com/AllWashedOut/openpil…
Jan 17, 2019
9d3e144
moved all can messages for Tesla into Panda. EON only sends one can m…
BogGyver Jan 17, 2019
ba381a6
work for forcing pedal over CC for IC integration NOT FINISHED
BogGyver Jan 17, 2019
9ad0bac
Merge pull request #39 from jeankalud/revB_giraffe
appleguru Jan 18, 2019
0aaa9d6
revB Giraffe GPIO Changes
appleguru Jan 18, 2019
f98dc5a
Add missing rx hook timestamp
appleguru Jan 18, 2019
cf70f01
PCC: Prevent stray 'disabled' notications when enabling
Jan 18, 2019
3e0c1b2
Merge branch 'tesla_devel' of https://github.com/jeankalud/openpilot …
Jan 18, 2019
8995c50
some changes in the DAS emulation on Panda; untested;
BogGyver Jan 18, 2019
a89e9c0
will display HOLD when car CC is on without OP
BogGyver Jan 18, 2019
d0a8167
Merge branch 'tesla_pedal-0.5.7' into tesla_pedal-0.5.7
BogGyver Jan 18, 2019
c989104
Merge pull request #23 from appleguru/tesla_pedal-0.5.7
BogGyver Jan 18, 2019
06b94da
incrementing ID of the stalk spammer
BogGyver Jan 18, 2019
4f66a66
fixing the idx for spamming of stalk
BogGyver Jan 18, 2019
4a280ab
ALCA state is 5 bit not 3.... duh
BogGyver Jan 18, 2019
577545c
working pedal over cc
BogGyver Jan 18, 2019
e338e7e
adding warning for pedal override as well as making sure that code wo…
BogGyver Jan 18, 2019
4f4936e
added pedal presses warning when in ACC or PDL
BogGyver Jan 18, 2019
d5a33a2
tried fake DI_state; code commented out
BogGyver Jan 18, 2019
755afca
fix in DI_state idx calculation
BogGyver Jan 18, 2019
a90149c
fix "accelerator pressed" warning when pesal not engaged
BogGyver Jan 19, 2019
d7dd684
Some work on the DAS implementation; also added variables in carstate…
BogGyver Jan 21, 2019
bd7650a
fix brake lights issue (always on?)
BogGyver Jan 21, 2019
3319111
Updated lat control
SippieCup Jan 22, 2019
7d21d5f
Re-enable GMLAN timer after timeout
appleguru Jan 22, 2019
41731ba
DAS status fixes
BogGyver Jan 22, 2019
10b1109
Merge branch 'tesla_pedal-0.5.7' of https://github.com/boggyver/openp…
BogGyver Jan 22, 2019
316d094
PCC: Don't fight manual acceleration or downhills unless necessary
Jan 23, 2019
32a8e6e
Merge branch 'tesla_devel' of https://github.com/AllWashedOut/openpil…
Jan 23, 2019
eaa69eb
Re-enable GMLAN timer after timeout
appleguru Jan 22, 2019
deb12c0
Re-enable GMLAN timer after timeout
appleguru Jan 22, 2019
22d543d
seatbelt signal; warnings; increased treshhold for CAN errors
BogGyver Jan 23, 2019
5ffc90f
Merge remote-tracking branch 'bog/tesla_pedal-0.5.7' into tesla_devel
Jan 23, 2019
6185331
PCC: re-merge code to allow manual accel to stick
Jan 23, 2019
5acdb63
Merge branch 'tesla_devel' into david_devel
Jan 23, 2019
bfe3471
added speed dependent factor to desired_angle to improve angles at lo…
BogGyver Jan 24, 2019
5ef0a6e
fine tuned variable angle factor
BogGyver Jan 24, 2019
5a83481
Merge pull request #24 from BogGyver/tesla_devel_bb
BogGyver Jan 24, 2019
00c6436
adding /data/bb_openpilot.cf configuration file
BogGyver Jan 24, 2019
d5fe4d7
PCC: Don't fight manual acceleration or downhills unless necessary
Jan 23, 2019
7f327e5
alert improvements
BogGyver Jan 24, 2019
46d10c8
Merge branch 'bog_devel' into david_devel
Jan 26, 2019
bfd97c4
Resolve merge conflicts bringing tesla_devel in sync with tesla_devel_bb
Jan 26, 2019
238c5b5
Update README.md
BogGyver Jan 28, 2019
1f2a687
Making my branch TESLA only. Need more room in Panda for code.
BogGyver Jan 28, 2019
701458e
tweaks
BogGyver Jan 30, 2019
abf380f
Merge branch 'devel' of https://github.com/commaai/openpilot into com…
BogGyver Jan 30, 2019
3d64681
Merge branch 'commaai-devel' into tesla_devel_bb
BogGyver Jan 30, 2019
ce7e915
Update README.md
BogGyver Jan 30, 2019
b70eca9
Update README.md
BogGyver Jan 30, 2019
fc1db08
Update README.md
BogGyver Jan 30, 2019
7e810d0
Changed visiond makefile to play nice with wiggly
BogGyver Jan 30, 2019
86dc515
Merge branch 'tesla_devel_bb' of https://github.com/boggyver/openpilo…
BogGyver Jan 30, 2019
50b10c5
Update PCC_module.py
BogGyver Jan 30, 2019
9d908f9
Merge pull request #27 from BogGyver/Patch-for-pedal-from-David
BogGyver Jan 30, 2019
c6b8ff8
Update PCC_module.py
BogGyver Jan 30, 2019
1746ebd
no adjustement factor for steer angle with 0.5.8
BogGyver Jan 30, 2019
fd12371
ALCA asjustment for 0.5.8
BogGyver Jan 30, 2019
8d8f723
tweaks for ALCA and CAN error
BogGyver Feb 6, 2019
fcada69
Update PCC_module.py
BogGyver Feb 6, 2019
c3bb46c
Merge pull request #28 from BogGyver/David's-long-speed-control-in-tu…
BogGyver Feb 6, 2019
bbec426
fix panda build.mk; fix PCC slowing down in turns; add roll logic for…
BogGyver Feb 6, 2019
9e00d4b
fixes for map dirven slowing down in turns and roll compensation
BogGyver Feb 6, 2019
351129a
adding driver monitoring switch to confi
BogGyver Feb 7, 2019
b3c2368
Merge branch 'tesla' into tesla_devel_bb
BogGyver Feb 7, 2019
24c2b11
Merge pull request #29 from BogGyver/tesla_devel_bb
BogGyver Feb 7, 2019
19d1b01
Merge branch 'bog_stable' into tesla_devel
Feb 11, 2019
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ selfdrive/test/tests/plant/out
/src/

one

.vscode/*.json
launch_chffrplus.sh

4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ script:
- docker run --rm
-v "$(pwd)"/selfdrive/test/tests/plant/out:/tmp/openpilot/selfdrive/test/tests/plant/out
tmppilot /bin/sh -c 'cd /tmp/openpilot/selfdrive/test/tests/plant && OPTEST=1 ./test_longitudinal.py'

branches:
only:
- /.*/
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files.associations": {
"algorithm": "cpp",
"chrono": "cpp",
"limits": "cpp"
}
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

WARNING: TESLA ONLY OPENPILOT 0.5.8-T2
======
This repo contains code that was modified specifically for Tesla and will not work on other cars!

[![](https://i.imgur.com/UetIFyH.jpg)](#)

Welcome to openpilot
Expand Down
8 changes: 4 additions & 4 deletions cereal/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
PWD := $(shell pwd)

SRCS := log.capnp car.capnp
SRCS := log.capnp car.capnp ui.capnp

GENS := gen/cpp/car.capnp.c++ gen/cpp/log.capnp.c++
JS := gen/js/car.capnp.js gen/js/log.capnp.js
GENS := gen/cpp/car.capnp.c++ gen/cpp/log.capnp.c++ gen/cpp/ui.capnp.c++
JS := gen/js/car.capnp.js gen/js/log.capnp.js gen/js/ui.capnp.js

UNAME_M ?= $(shell uname -m)
# only generate C++ for docker tests
ifneq ($(OPTEST),1)
GENS += gen/c/car.capnp.c gen/c/log.capnp.c gen/c/include/c++.capnp.h gen/c/include/java.capnp.h
GENS += gen/c/car.capnp.c gen/c/log.capnp.c gen/c/ui.capnp.c gen/c/include/c++.capnp.h gen/c/include/java.capnp.h

ifeq ($(UNAME_M),x86_64)
ifneq (, $(shell which capnpc-java))
Expand Down
1 change: 1 addition & 0 deletions cereal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp"))
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp"))
ui = capnp.load(os.path.join(CEREAL_PATH, "ui.capnp"))
64 changes: 64 additions & 0 deletions cereal/ui.capnp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using Cxx = import "./include/c++.capnp";
$Cxx.namespace("cereal");

using Java = import "./include/java.capnp";
$Java.package("ai.comma.openpilot.cereal");
$Java.outerClassname("Ui");

using Car = import "car.capnp";

@0xce6ca45dddcd5317;

struct UIButtonInfo {
# button ID 0..5
btnId @0 :Int8;
# internal button name
btnName @1 :Text;
# display label for button (3 chars)
btnLabel @2 :Text;
# buttons status: 0 = DISABLED, 1 = AVAILABLE, 2 = ENABLED, 3 = WARNING, 9 = NOT AVAILABLE
btnStatus @3 :Int16;
# small font label shows below the main label, max 7 chars
btnLabel2 @4 :Text;
}

struct UIButtonStatus {
# button ID 0..5
btnId @0 :Int8;
# buttons status: 0 = DISABLED, 1 = AVAILABLE, 2 = ENABLED, 3 = WARNING, 9 = NOT AVAILABLE
btnStatus @1 :Int16;
}

struct UICustomAlert {
caStatus @0 :Int8;
caText @1 :Text;
}

struct UISetCar {
icCarFolder @0 :Text;
icCarName @1 :Text;
}

struct UIPlaySound {
sndSound @0 :Int8;
}

struct UIUpdate {
uiDoUpdate @0 :Int8;
uiStatus @1 :Int8;
uiCanDisplayMessage @2 :Int8;
}

#struct UIEvent {
# # in nanoseconds?
# logMonoTime @0 :UInt64;
#
# union {
# uiButtonInfo @1 :UIButtonInfo;
# uiCustomAlert @2 :UICustomAlert;
# uiSetCar @3 :UISetCar;
# uiButtonStatus @4 :UIButtonStatus;
# uiUpdate @5 :UIUpdate;
# uiPlaySound @6 :UIPlaySound;
# }
#}
2 changes: 1 addition & 1 deletion common/fingerprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ def eliminate_incompatible_cars(msg, candidate_cars):

def all_known_cars():
"""Returns a list of all known car strings."""
return _FINGERPRINTS.keys()
return _FINGERPRINTS.keys()
2 changes: 1 addition & 1 deletion common/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,4 @@ def put(self, key, dat):

# Test multiprocess:
# seq 0 100000 | xargs -P20 -I{} python common/params.py DongleId {} && sleep 0.05
# while python common/params.py DongleId; do sleep 0.05; done
# while python common/params.py DongleId; do sleep 0.05; done
4 changes: 2 additions & 2 deletions opendbc/honda_accord_s2t_2018_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ BU_: EBCM EON CAM RADAR PCM EPS VSA SCM BDY XXX EPB

BO_ 228 STEERING_CONTROL: 5 EON
SG_ STEER_TORQUE_REQUEST : 23|1@0+ (1,0) [0|1] "" EPS
SG_ SET_ME_X00 : 22|7@0+ (1,0) [0|127] "" EPS
SG_ SET_ME_X00_2 : 31|8@0+ (1,0) [0|0] "" EPS
SG_ GERNBY1 : 22|7@0+ (1,0) [0|127] "" EPS
SG_ GERNBY_2 : 31|8@0+ (1,0) [0|0] "" EPS
SG_ STEER_TORQUE : 7|16@0- (1,0) [-4096|4096] "" EPS
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" EPS
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" EPS
Expand Down
76 changes: 64 additions & 12 deletions opendbc/tesla_can.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ BO_ 3 STW_ANGL_STAT: 8 STW
SG_ MC_STW_ANGL_STAT : 55|4@0+ (1,0) [0|15] "" NEO
SG_ CRC_STW_ANGL_STAT : 63|8@0+ (1,0) [0|255] "" NEO

BO_ 14 STW_ANGLHP_STAT: 8 STW
BO_ 14 STW_ANGLHP_STAT: 8 STW

SG_ StW_AnglHP : 5|14@0+ (0.1,-819.2) [-819.2|819] "deg" NEO
SG_ StW_AnglHP_Spd : 21|14@0+ (0.5,-4096) [-4096|4095.5] "deg/s" NEO
SG_ StW_AnglHP_Sens_Stat : 33|2@0+ (1,0) [0|0] "" NEO
Expand Down Expand Up @@ -147,19 +148,25 @@ BO_ 309 ESP_135h: 5 ESP
SG_ ESP_espOffLamp : 31|1@0+ (1,0) [-1|2] "" NEO
SG_ ESP_stabilityControlSts : 14|3@0+ (1,0) [6|7] "" NEO
SG_ ESP_tcLampFlash : 5|1@0+ (1,0) [-1|2] "" NEO
SG_ ESP_tcOffLamp : 15|1@0+ (1,0) [0|1] "" NEOBO_ 341 ESP_B: 8 ESP
SG_ ESP_BChecksum : 39|8@0+ (1,0) [0|255] "" NEO,EPAS
SG_ ESP_BCounter : 62|4@0+ (1,0) [1|15] "" NEO,EPAS
SG_ ESP_vehicleSpeed : 47|16@0+ (0.00999999978,0) [0|0] "kph" NEO,EPAS
SG_ ESP_vehicleSpeedQF : 57|2@0+ (1,0) [1|2] "" NEO,EPAS
SG_ ESP_wheelPulseCountFrL : 7|8@0+ (1,0) [0|254] "" NEO,EPAS
SG_ ESP_wheelPulseCountFrR : 15|8@0+ (1,0) [0|254] "" NEO,EPAS
SG_ ESP_wheelPulseCountReL : 23|8@0+ (1,0) [0|254] "" NEO,EPAS
SG_ ESP_tcOffLamp : 15|1@0+ (1,0) [0|1] "" NEO

BO_ 341 ESP_B: 8 ESP
SG_ ESP_BChecksum : 39|8@0+ (1,0) [0|255] "" NEO,EPAS
SG_ ESP_BCounter : 62|4@0+ (1,0) [1|15] "" NEO,EPAS
SG_ ESP_vehicleSpeed : 47|16@0+ (0.00999999978,0) [0|0] "kph" NEO,EPAS
SG_ ESP_vehicleSpeedQF : 57|2@0+ (1,0) [1|2] "" NEO,EPAS
SG_ ESP_wheelPulseCountFrL : 7|8@0+ (1,0) [0|254] "" NEO,EPAS
SG_ ESP_wheelPulseCountFrR : 15|8@0+ (1,0) [0|254] "" NEO,EPAS
SG_ ESP_wheelPulseCountReL : 23|8@0+ (1,0) [0|254] "" NEO,EPAS
SG_ ESP_wheelPulseCountReR : 31|8@0+ (1,0) [0|254] "" NEO,EPAS

BO_ 532 EPB_epasControl: 3 EPB
SG_ EPB_epasControlChecksum : 23|8@0+ (1,0) [0|255] "" NEO,EPAS
SG_ EPB_epasControlCounter : 11|4@0+ (1,0) [0|15] "" NEO,EPAS
BO_ 513 SDM1: 5 GTW
SG_ SDM_bcklPassStatus : 3|2@0+ (1,0) [0|3] "" NEO
SG_ SDM_bcklDrivStatus : 5|2@0+ (1,0) [0|3] "" NEO

BO_ 532 EPB_epasControl: 3 EPB
SG_ EPB_epasControlChecksum : 23|8@0+ (1,0) [0|255] "" NEO,EPAS
SG_ EPB_epasControlCounter : 11|4@0+ (1,0) [0|15] "" NEO,EPAS
SG_ EPB_epasEACAllow : 2|3@0+ (1,0) [4|7] "" NEO,EPAS

BO_ 792 GTW_carState: 8 GTW
Expand Down Expand Up @@ -307,6 +314,50 @@ BO_ 840 GTW_status: 8 GTW
SG_ GTW_statusChecksum : 63|8@0+ (1,0) [0|255] "" NEO
SG_ GTW_statusCounter : 51|4@0+ (1,0) [0|15] "" NEO

BO_ 1361 GAS_COMMAND: 6 EON
SG_ GAS_COMMAND : 7|16@0+ (0.0507968128,-22.85856576) [0|1] "" INTERCEPTOR
SG_ GAS_COMMAND2 : 23|16@0+ (0.1015936256,-22.85856576) [0|1] "" INTERCEPTOR
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
SG_ IDX : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
SG_ CHECKSUM : 47|8@0+ (1,0) [0|3] "" INTERCEPTOR

BO_ 1362 GAS_SENSOR: 6 INTERCEPTOR
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.0507968128,-22.85856576) [0|1] "" EON
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.1015936256,-22.85856576) [0|1] "" EON
SG_ STATE : 35|4@0+ (1,0) [0|15] "" EON
SG_ IDX : 39|4@0+ (1,0) [0|15] "" EON
SG_ CHECKSUM : 47|8@0+ (1,0) [0|3] "" EON

BO_ 920 GTW_carConfig: 8 GTW
SG_ GTW_performanceConfig : 2|3@0+ (1,0) [0|0] "" NEO
SG_ GTW_fourWheelDrive : 4|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_unknown1 : 5|1@0+ (1,0) [0|0] "" NEO
SG_ GTW_dasHw : 7|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_parkAssistInstalled : 9|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_forwardRadarHw : 11|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_airSuspensionInstalled : 14|3@0+ (1,0) [0|0] "" NEO
SG_ GTW_unknown2 : 15|1@0+ (1,0) [0|0] "" NEO
SG_ GTW_country : 23|16@0+ (1,0) [0|0] "" NEO
SG_ GTW_parkSensorGeometryType : 33|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_rhd : 34|1@0+ (1,0) [0|0] "" NEO
SG_ GTW_bodyControlsType : 35|1@0+ (1,0) [0|0] "" NEO
SG_ GTW_radarPosition : 39|4@0+ (1,0) [0|0] "" NEO
SG_ GTW_rearCornerRadarHw : 41|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_frontCornerRadarHw : 43|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_epasType : 45|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_chassisType : 47|2@0+ (1,0) [0|2] "" NEO
SG_ GTW_wheelType : 52|5@0+ (1,0) [0|0] "" NEO
SG_ GTW_rearSeatControllerMask : 55|3@0+ (1,0) [0|7] "" NEO
SG_ GTW_euVehicle : 56|1@0+ (1,0) [0|0] "" NEO
SG_ GTW_foldingMirrorsInstalled : 57|1@0+ (1,0) [0|0] "" NEO
SG_ GTW_brakeHwType : 59|2@0+ (1,0) [0|2] "" NEO
SG_ GTW_autopilot : 61|2@0+ (1,0) [0|0] "" NEO
SG_ GTW_unknown3 : 63|2@0+ (1,0) [0|0] "" NEO





VAL_ 3 StW_Angl 16383 "SNA" ;
VAL_ 3 StW_AnglSens_Id 2 "MUST" 0 "PSBL" 1 "SELF" ;
VAL_ 3 StW_AnglSens_Stat 2 "ERR" 3 "ERR_INI" 1 "INI" 0 "OK" ;
Expand Down Expand Up @@ -417,5 +468,6 @@ VAL_ 904 MCU_clusterReadyForDrive 0 "NO_SNA" 1 "YES" ;
VAL_ 1160 DAS_steeringAngleRequest 16384 "ZERO_ANGLE" ;
VAL_ 1160 DAS_steeringControlType 1 "ANGLE_CONTROL" 3 "DISABLED" 0 "NONE" 2 "RESERVED" ;
VAL_ 1160 DAS_steeringHapticRequest 1 "ACTIVE" 0 "IDLE" ;
VAL_ 1362 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;

CM_ "CHFFR_METRIC 1160 DAS_steeringAngleRequest STEER_ANGLE 0.1098666 180; CHFFR_METRIC 264 DI_motorRPM ENGINE_RPM 1 0";
6 changes: 3 additions & 3 deletions panda/board/build.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CFLAGS += -I inc -I ../ -nostdlib -fno-builtin -std=gnu11 -Os
CFLAGS += -I inc -I ../ -nostdlib -fno-builtin -std=gnu11 -O2

CFLAGS += -Tstm32_flash.ld

Expand Down Expand Up @@ -51,11 +51,11 @@ obj/$(PROJ_NAME).bin: obj/$(STARTUP_FILE).o obj/main.$(PROJ_NAME).o
$(CC) -Wl,--section-start,.isr_vector=0x8004000 $(CFLAGS) -o obj/$(PROJ_NAME).elf $^
$(OBJCOPY) -v -O binary obj/$(PROJ_NAME).elf obj/code.bin
SETLEN=1 ../crypto/sign.py obj/code.bin $@ $(CERT)
@BINSIZE=$$(du -b "obj/$(PROJ_NAME).bin" | cut -f 1) ; if [ $$BINSIZE -ge 32768 ]; then echo "ERROR obj/$(PROJ_NAME).bin is too big!"; exit 1; fi;
#@BINSIZE=$$(du -b "obj/$(PROJ_NAME).bin" | cut -f 1) ; if [ $$BINSIZE -ge 32768 ]; then echo "ERROR obj/$(PROJ_NAME).bin is too big!"; exit 1; fi;


obj/bootstub.$(PROJ_NAME).bin: obj/$(STARTUP_FILE).o obj/bootstub.$(PROJ_NAME).o obj/sha.$(PROJ_NAME).o obj/rsa.$(PROJ_NAME).o
$(CC) $(CFLAGS) -o obj/bootstub.$(PROJ_NAME).elf $^
$(CC) $(CFLAGS) -o obj/bootstub.$(PROJ_NAME).elf $^ # -lgcc
$(OBJCOPY) -v -O binary obj/bootstub.$(PROJ_NAME).elf $@

clean:
Expand Down
2 changes: 1 addition & 1 deletion panda/board/drivers/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int can_push(can_ring *q, CAN_FIFOMailBox_TypeDef *elem) {
ret = 1;
}
exit_critical_section();
if (ret == 0) puts("can_push failed!\n");
//if (ret == 0) puts("can_push failed!\n");
return ret;
}

Expand Down
5 changes: 5 additions & 0 deletions panda/board/drivers/gmlan_alt.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ void reset_gmlan_switch_timeout(void) {
can_timeout_counter = GMLAN_TICKS_PER_SECOND;
gmlan_switch_below_timeout = 1;
gmlan_alt_mode = GPIO_SWITCH;
TIM4->CR1 = TIM_CR1_CEN; // Enable timer again in case we were timed out
}

void set_bitbanged_gmlan(int val) {
Expand Down Expand Up @@ -253,6 +254,10 @@ void TIM4_IRQHandler(void) {
}
TIM4->SR = 0;
} //gmlan switch mode
else {
//disable timer; not a valid mode
TIM4->CR1 &= ~TIM_CR1_CEN;
}
}

void bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) {
Expand Down
Loading