Compare commits

..

1349 Commits

Author SHA1 Message Date
DevTekVE
bfc9ae2d2f Re enable sentry and swaglog handler for device metadata & crash information 2025-09-02 16:07:41 +02:00
DevTekVE
acc519daf2 Revert "bump more panda"
This reverts commit a9f2f54bcc.
2024-12-08 17:02:09 +01:00
DevTekVE
a9f2f54bcc bump more panda 2024-12-08 16:54:34 +01:00
Kumar
fa9234afa0 ui: Fix Night Brightness (#33984) 2024-11-16 12:00:39 -07:00
rav4kumar
6b789c3380 update change log 2024-09-29 17:35:57 -07:00
Kumar
fd4d4eec0d Toyota: drive mode selector (#437)
drive mode selector
2024-09-29 17:27:25 -07:00
Kumar
c1107924ae CTV 2.0: GlideTech (#436)
smooth, effortless movement
2024-09-29 17:14:17 -07:00
Kumar
aa34714b42 ui: refactor rocket ui (#435)
rockettttt
2024-09-28 19:14:48 -07:00
Kumar
674670dfa7 dec v 2.0 (#434)
* dec update

* date
2024-09-28 19:08:02 -07:00
Kumar
9feffca58a new api: human like long control v1.1 (#414)
* lowspeed

* slight increase
2024-08-19 21:03:20 -07:00
rav4kumar
a4faa41331 return: human api 2024-08-15 05:26:06 -07:00
Jason Wen
4fcd982225 Merge remote-tracking branch 'sunnypilot/sunnypilot/master' into master-dev-c3
# Conflicts:
#	selfdrive/car/chrysler/interface.py
#	selfdrive/car/ford/interface.py
#	selfdrive/car/gm/interface.py
#	selfdrive/car/honda/interface.py
#	selfdrive/car/hyundai/interface.py
#	selfdrive/car/interfaces.py
#	selfdrive/car/mazda/interface.py
#	selfdrive/car/nissan/interface.py
#	selfdrive/car/subaru/interface.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/volkswagen/interface.py
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/lib/drive_helpers.py
#	system/manager/manager.py
2024-08-13 19:15:33 -04:00
Jason Wen
b2cdfc09ae Longitudinal: Refactor Experimental Mode toggle with distance button hold (#409)
* init

* deprecated

* in controlsd directly

* update

* unused

* combine

* only once

* fix

* better

* cleanup

* more

* Update CHANGELOGS.md
2024-08-13 16:16:40 -04:00
Jason Wen
5b674d2231 car: Interface cleanup (#396)
* deprecated

* cruise main state

* v cruise non pcm state

* acc mads combo

* cancel cruise state

* sp common state

* sp event

* custom stock long

* started mads

* v cruise non pcm state old

* acc mads old

* started mads old
2024-08-13 15:57:27 -04:00
Jason Wen
ddf69de7e0 Hyundai Longitudinal: Enable radar tracks based on availability (#406)
* Hyundai Longitudinal: Enable radar tracks based on availability

* don't loop

* just 2

* missed

* missed

* fix

* do this

* every time

* quicker

* less

* nope

* more

* cleanup
2024-08-13 15:50:35 -04:00
Jason Wen
c351b3aef3 fix gm 2024-08-13 14:53:15 -04:00
Jason Wen
18afbd388f Merge remote-tracking branch 'sunnypilot/sunnypilot/ctv1' into master-dev-c3 2024-08-13 01:22:02 -04:00
Jason Wen
2fc1fff88b Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-13 01:19:22 -04:00
Jason Wen
d7f502f4ea diff 2024-08-13 01:19:10 -04:00
Jason Wen
b9d3816fbe back 2024-08-13 01:17:50 -04:00
Jason Wen
2344718941 Merge branch 'exp-hold-fix' into master-dev-c3 2024-08-13 01:07:22 -04:00
Jason Wen
0ced91c982 better 2024-08-13 01:05:16 -04:00
Jason Wen
9a78cb4f16 Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-13 00:56:28 -04:00
Jason Wen
eb1e67f2bb more 2024-08-13 00:56:19 -04:00
Jason Wen
a9409a94cf nope 2024-08-12 23:19:53 -04:00
Jason Wen
df1dea34f9 extra 2024-08-12 18:49:49 -04:00
Jason Wen
b1cd16f1e0 Merge branch 'exp-hold-fix' into master-dev-c3 2024-08-12 18:48:40 -04:00
Jason Wen
853fed447d fix 2024-08-12 18:38:09 -04:00
Jason Wen
4ef2afa413 only once 2024-08-12 18:05:30 -04:00
Jason Wen
1866fff33f combine 2024-08-12 17:53:51 -04:00
Jason Wen
18974df258 unused 2024-08-12 17:52:00 -04:00
Jason Wen
47d3d1f8a3 update 2024-08-12 17:51:21 -04:00
Jason Wen
0bf65192a2 in controlsd directly 2024-08-12 17:49:53 -04:00
Jason Wen
224c0457d8 deprecated 2024-08-12 17:36:27 -04:00
Jason Wen
56faf20801 init 2024-08-12 17:33:29 -04:00
Kumar
67c9b03216 ctv1 2024-08-12 13:29:36 -07:00
Jason Wen
cba4c552f3 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-12 14:48:09 -04:00
Jason Wen
f3834c56ca a lead instead 2024-08-12 14:47:56 -04:00
Jason Wen
3c56d25e28 Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-12 10:41:44 -04:00
Jason Wen
28234524bc less 2024-08-12 10:41:37 -04:00
Jason Wen
b87d95f98f Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-11 23:58:45 -04:00
Jason Wen
168217ba4d Merge remote-tracking branch 'sunnypilot/sunnypilot/master' into master-dev-c3
# Conflicts:
#	common/params.cc
#	selfdrive/car/hyundai/interface.py
#	selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_settings.cc
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
2024-08-11 23:58:39 -04:00
Jason Wen
ed2b216348 quicker 2024-08-11 23:54:44 -04:00
Jason Wen
aca4181ae3 Merge remote-tracking branch 'sunnypilot/sunnypilot/master' into hkg-mando-radar-edge 2024-08-11 23:33:06 -04:00
Jason Wen
69f88da9c5 Hyundai Longitudinal: Enable Cruise Main when started (#391)
* Hyundai Longitudinal: Enable Cruise Main when started

* don't do this for the ancients (@devtekve 😉)

* okay, toggle per @devtekve xD

* update texts

* non pcm only

* translations
2024-08-11 23:32:43 -04:00
Jason Wen
117ad3b3ef Hyundai Longitudinal: Match stock timestep for ESCC and Camera-based SCC (#407)
Hyundai ESCC: Match stock timestep
2024-08-11 23:29:42 -04:00
Jason Wen
6f3e44f76e MADS: Hyundai: Skip cruise main button check with pcmCruise (#405)
* MADS: Hyundai: Skip cruise main button check with `pcmCruise`

* 2 modes!
2024-08-11 23:21:31 -04:00
Jason Wen
8fec62a23a Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-11 22:06:20 -04:00
Jason Wen
976ebfd185 every time 2024-08-11 22:06:12 -04:00
Jason Wen
f8e1455ced do this 2024-08-11 21:57:28 -04:00
Jason Wen
3a1eba95bf Merge branch 'car-interface-cleanup' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/interface.py
2024-08-11 17:54:55 -04:00
Jason Wen
9183330354 Merge branch 'escc-hz' into master-dev-c3 2024-08-11 00:49:36 -04:00
Jason Wen
192e07736d Hyundai ESCC: Match stock timestep 2024-08-11 00:49:22 -04:00
Jason Wen
ddd955b5d7 Revert "try skipping"
This reverts commit 8c20f15a49.
2024-08-10 23:47:31 -04:00
Jason Wen
2c5e86daef Revert "how about this"
This reverts commit 51fa3c3428.
2024-08-10 23:45:38 -04:00
Jason Wen
42fed80964 Revert "no"
This reverts commit 6e48f282ac.
2024-08-10 23:45:38 -04:00
Jason Wen
5bcd599085 Revert "how about this?"
This reverts commit 6df203030f.
2024-08-10 23:45:37 -04:00
Jason Wen
6df203030f how about this? 2024-08-10 23:44:12 -04:00
Jason Wen
6e48f282ac no 2024-08-10 23:40:45 -04:00
Jason Wen
51fa3c3428 how about this 2024-08-10 23:39:46 -04:00
Jason Wen
8c20f15a49 try skipping 2024-08-10 23:16:08 -04:00
Jason Wen
3dff89fa3b Revert "try this out"
This reverts commit dd939da69b.
2024-08-10 23:13:16 -04:00
Jason Wen
a77fcc7908 Revert "and this"
This reverts commit d4b2418bdf.
2024-08-10 23:13:15 -04:00
Jason Wen
d4b2418bdf and this 2024-08-10 22:37:34 -04:00
Jason Wen
dd939da69b try this out 2024-08-10 22:27:23 -04:00
Jason Wen
c6ca12c239 Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-10 21:02:32 -04:00
Jason Wen
d78952be99 fix 2024-08-10 21:02:25 -04:00
Jason Wen
f3bada6231 Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-10 20:55:49 -04:00
Jason Wen
ecb7912921 missed 2024-08-10 20:55:40 -04:00
Jason Wen
e89fc4fc5f No need 2024-08-10 16:51:38 -04:00
Jason Wen
37fc9c2641 Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-10 14:54:20 -04:00
Jason Wen
bd79e994b4 missed 2024-08-10 14:54:13 -04:00
Jason Wen
8f4ce58bf3 Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-10 14:45:59 -04:00
Jason Wen
1698402927 just 2 2024-08-10 14:45:47 -04:00
Jason Wen
1b294b5a4c Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-10 13:46:23 -04:00
Jason Wen
c4042e61c4 don't loop 2024-08-10 13:46:07 -04:00
Jason Wen
b77ce67559 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-10 12:11:44 -04:00
Jason Wen
806487a0ca only op long cars 2024-08-10 12:11:30 -04:00
Jason Wen
5515c6604a Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-10 11:57:57 -04:00
Jason Wen
150609dc83 only trigger once? 2024-08-10 11:57:35 -04:00
Jason Wen
e2fd3e109b more 2024-08-10 11:17:38 -04:00
Jason Wen
26e0c38d09 Merge branch 'mads-hkg-main-race' into master-dev-c3 2024-08-10 11:00:18 -04:00
Jason Wen
4e3d726cbf 2 modes! 2024-08-10 11:00:05 -04:00
Jason Wen
789fc28496 Merge branch 'hkg-mando-radar-edge' into master-dev-c3 2024-08-10 10:48:02 -04:00
Jason Wen
490787f6b9 Hyundai Longitudinal: Enable radar tracks based on availability 2024-08-10 10:47:30 -04:00
Jason Wen
721b7f6f6d Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-09 20:54:14 -04:00
Jason Wen
b32e2c384d lower stop accel for non ice 2024-08-09 20:54:03 -04:00
Jason Wen
17d326ba69 Revert "this finna wild"
This reverts commit 20ca222d56.
2024-08-09 20:53:13 -04:00
Jason Wen
7d2396f2e6 Merge branch 'hkg-can-jerk' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/carcontroller.py
2024-08-09 18:03:34 -04:00
Jason Wen
20ca222d56 this finna wild 2024-08-09 18:01:53 -04:00
Jason Wen
0c88b142e6 completely remove 2024-08-09 11:09:18 -04:00
Jason Wen
88ae25d3bc Merge branch 'mads-hkg-main-race' into master-dev-c3 2024-08-08 21:24:14 -04:00
Jason Wen
fd7f562c87 MADS: Hyundai: Skip cruise main button check with pcmCruise 2024-08-08 21:23:58 -04:00
Jason Wen
0d303a657b Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-08 21:00:50 -04:00
Jason Wen
69be3fdb1b only ice 2024-08-08 20:59:27 -04:00
Jason Wen
155b4b3314 get the car moving pls 2024-08-08 20:52:59 -04:00
Jason Wen
48247ce8da less 2024-08-08 16:07:25 -04:00
Jason Wen
72101c51ee Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-07 13:23:53 -04:00
Jason Wen
560b6e79bc more checks 2024-08-07 13:23:40 -04:00
Jason Wen
c3eec36f4f speed logic 2024-08-07 13:15:00 -04:00
Jason Wen
2bc9bce697 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-07 11:21:31 -04:00
Jason Wen
bd5228e394 check ttc 2024-08-07 11:21:11 -04:00
Jason Wen
b1ac575563 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-07 07:48:03 -04:00
Jason Wen
368a5e3eb4 oops 2024-08-07 07:47:52 -04:00
Jason Wen
adb5c8ee26 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-07 07:16:54 -04:00
Jason Wen
b95ba34a9c fix 2024-08-07 07:16:47 -04:00
Jason Wen
ee3885428b Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-07 00:16:28 -04:00
Jason Wen
ffd42b02b8 sportier 2024-08-07 00:16:18 -04:00
Jason Wen
9dcb0d5ec3 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-06 23:42:39 -04:00
Jason Wen
bacb49d8ee fix 2024-08-06 23:42:31 -04:00
Jason Wen
fa4ae1367f back to stock 2024-08-06 22:54:13 -04:00
Jason Wen
1eafceb321 fix 2024-08-06 20:46:06 -04:00
Jason Wen
e4c6ea8561 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-06 20:22:20 -04:00
Jason Wen
3c168d0975 send it 2024-08-06 20:22:10 -04:00
Jason Wen
f621aaf11f Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-06 18:54:59 -04:00
Jason Wen
c6fa48d166 no starting state for non-ICE 2024-08-06 18:54:46 -04:00
Jason Wen
2a383c65b8 a tad less aggressive 2024-08-06 17:26:37 -04:00
Jason Wen
78f297246d Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-06 01:05:17 -04:00
Jason Wen
8da8986135 need to stop this too 2024-08-06 01:05:07 -04:00
Jason Wen
221f2648a9 lower matches a bit more 2024-08-06 01:03:24 -04:00
Jason Wen
6f28cd27dd Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-06 00:51:15 -04:00
Jason Wen
039fd97e6e more aggro 2024-08-06 00:51:05 -04:00
Jason Wen
9f55881f9f Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-06 00:49:56 -04:00
Jason Wen
db593e718f diff logic 2024-08-06 00:48:40 -04:00
Jason Wen
67f5afb7a2 default vEgoStarting 2024-08-06 00:48:32 -04:00
Jason Wen
5df890546f lower stop accel 2024-08-06 00:44:59 -04:00
Jason Wen
c0fce827ea Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-05 22:52:27 -04:00
Jason Wen
a5b4e1bb4b wrong place to condition 2024-08-05 22:52:18 -04:00
Jason Wen
dae3648cef Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-05 19:54:45 -04:00
Jason Wen
d31cde7066 hkg only 2024-08-05 19:54:34 -04:00
Jason Wen
674a19a5cf Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-05 19:38:03 -04:00
Jason Wen
1ef7574a3f try releasing stop req faster 2024-08-05 19:37:40 -04:00
Jason Wen
d979148643 different start accel and less stopping accel 2024-08-05 19:04:09 -04:00
Jason Wen
a4dc264970 left this out wow 2024-08-05 18:26:42 -04:00
Jason Wen
b3543efcb3 started mads 2024-08-05 17:58:52 -04:00
Jason Wen
c607d8aa04 custom stock long 2024-08-05 17:44:53 -04:00
Jason Wen
7408ea04d4 sp event 2024-08-05 17:38:27 -04:00
Jason Wen
5cf9cd7888 sp common state 2024-08-05 17:34:32 -04:00
Jason Wen
6dc9f288bd cancel cruise state 2024-08-05 17:26:46 -04:00
Jason Wen
c2c80a0c1a acc mads combo 2024-08-05 17:24:06 -04:00
Jason Wen
5ac2ec83aa v cruise non pcm state 2024-08-05 17:20:22 -04:00
Jason Wen
d321805ca4 cruise main state 2024-08-05 17:16:03 -04:00
Jason Wen
75497796b9 deprecated 2024-08-05 17:15:53 -04:00
Jason Wen
5986c6611e oops forgot to push 2024-08-05 13:43:40 -04:00
Jason Wen
dc9a8ddca7 Oops 2024-08-04 17:11:22 -04:00
Jason Wen
c70db1030c Toyota: comma Pedal: Fix upstream merge conflicts (#393) 2024-08-04 12:09:00 -04:00
Jason Wen
5484d8e185 Merge branch 'toyota-pedal-upstream-fix' into master-dev-c3 2024-08-04 12:07:37 -04:00
Jason Wen
a59f0e3c48 Toyota: comma Pedal: Fix upstream merge conflicts 2024-08-04 12:07:15 -04:00
Jason Wen
cf867c8e24 Merge branch 'hkg-can-jerk' into master-dev-c3
# Conflicts:
#	selfdrive/controls/lib/longcontrol.py
#	selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_settings.cc
2024-08-04 11:03:19 -04:00
Jason Wen
251716a67d less aggressive start, lower stop accel, send 0 accel at standstill 2024-08-04 11:02:06 -04:00
Jason Wen
5aef30a9cd Only HKG 2024-08-04 10:21:50 -04:00
Jason Wen
5002f3fc73 only for hkg 2024-08-04 09:11:02 -04:00
Jason Wen
b61f75a8fb remove from sync 2024-08-04 09:10:43 -04:00
Jason Wen
b94543ea25 Merge branch 'master' into hkg-can-jerk
# Conflicts:
#	.gitlab-ci.yml
#	SConstruct
#	selfdrive/car/chrysler/interface.py
#	selfdrive/car/ford/interface.py
#	selfdrive/car/gm/interface.py
#	selfdrive/car/honda/interface.py
#	selfdrive/car/hyundai/carcontroller.py
#	selfdrive/car/hyundai/hyundaicanfd.py
#	selfdrive/car/hyundai/interface.py
#	selfdrive/car/interfaces.py
#	selfdrive/car/mazda/interface.py
#	selfdrive/car/subaru/interface.py
#	selfdrive/car/volkswagen/interface.py
#	selfdrive/ui/SConscript
#	selfdrive/ui/qt/onroad/annotated_camera.cc
#	selfdrive/ui/sunnypilot/SConscript
#	selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_settings.cc
#	system/manager/process_config.py
2024-08-04 09:08:04 -04:00
Jason Wen
147742568b Merge branch 'hkg-cruise-main-default' into master-dev-c3
# Conflicts:
#	common/params.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_settings.cc
2024-08-04 08:33:19 -04:00
Jason Wen
8955d1b043 okay, toggle per @devtekve xD 2024-08-04 08:32:31 -04:00
Jason Wen
267f809464 Merge branch 'hkg-cruise-main-default' into master-dev-c3 2024-08-04 07:51:39 -04:00
Jason Wen
1cfe485954 don't do this for the ancients (@devtekve 😉) 2024-08-04 07:50:46 -04:00
Jason Wen
f635a0812c Merge remote-tracking branch 'sunnypilot/sunnypilot/master' into master-dev-c3 2024-08-04 07:29:07 -04:00
Jason Wen
19afa83ce1 Bump submodules 2024-08-04 07:25:09 -04:00
Jason Wen
2f54a5250e Merge branch 'hkg-cruise-main-default' into master-dev-c3 2024-08-03 21:49:40 -04:00
Jason Wen
1757e77aaa Hyundai Longitudinal: Enable Cruise Main when started 2024-08-03 21:49:05 -04:00
Jason Wen
6790440b24 Merge branch 'master' into master-dev-c3
# Conflicts:
#	.gitmodules
#	README.md
#	panda
#	selfdrive/car/hyundai/carcontroller.py
#	selfdrive/controls/radard.py
2024-08-03 21:41:02 -04:00
Jason Wen
c06a82f41b Submodules: Point back to sunnypilot 2024-08-03 21:37:45 -04:00
Jason Wen
0b7d3805ff ui: Network: Disable refresh button while scanning (#383) 2024-08-03 21:29:22 -04:00
DevTekVE
963d356173 ci: Improvements on the mirror and prebuilt flow (#386)
* Remove redundant git lfs pull command

The `git lfs pull` command in the GitHub workflow is redundant and has been removed. Additionally, the `sync-lfs.sh` script has been updated to push all LFS objects to the origin repository.

* using force push instead of trying to merge

* Bumping ssh agent to 0.9.0

* Syntax

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2024-08-03 21:29:00 -04:00
Jason Wen
03f76199f3 ParamManager: Convert missed params in cars (#390) 2024-08-03 21:26:23 -04:00
Jason Wen
9ed9d001b0 Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (#385) 2024-08-03 17:25:35 -08:00
Jason Wen
f3933df2f5 Athenad: Add TODO-SP 2024-08-03 21:24:49 -04:00
Jason Wen
d35cdb510d Sync: commaai/msgq:master into sunnypilot/msgq:master
Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master`

Sync: `commaai/panda:master` into `sunnypilot/panda:master`
2024-08-03 21:22:09 -04:00
Jason Wen
aa831ca69c Merge remote-tracking branch 'commaai/openpilot/master' into master-dev-c3 2024-08-03 20:21:32 -04:00
Dean Lee
8f9b165de8 camerad: encapsulate cl_command_queue in ImgProc (#33178)
move cl queue to imgproc
2024-08-03 14:57:26 -07:00
Jason Wen
66bba6c032 Fix from sync 2024-08-03 17:01:21 -04:00
Jason Wen
d1908ca1d9 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-03 16:00:04 -04:00
Jason Wen
48371eb089 use CAN-FD tune for every car 2024-08-03 15:58:49 -04:00
Jason Wen
758449a12b Merge branch 'sync-20240803' into master-dev-c3
# Conflicts:
#	cereal/messaging/__init__.py
#	panda
2024-08-03 15:42:50 -04:00
Adeeb Shihadeh
9474523add Revert "uploader.py: simplify clear_locks by using rglob (#32974)"
This reverts commit cafca4f891.
2024-08-03 12:12:42 -07:00
DevTekVE
4ec8cb3700 Refactor update process execution.
Changed update process execution from a Python to a native process. Updated signal-based process control to match new process configurations.
2024-08-03 18:42:26 +02:00
Jason Wen
7b294d9763 Merge remote-tracking branch 'commaai/openpilot/master' into sync-20240802
# Conflicts:
#	.gitmodules
#	README.md
#	cereal/services.py
#	msgq_repo
#	opendbc~HEAD
#	opendbc~commaai_openpilot_master
#	panda
#	selfdrive/car/__init__.py
#	selfdrive/car/chrysler/carcontroller.py
#	selfdrive/car/honda/carcontroller.py
#	selfdrive/car/hyundai/carcontroller.py
#	selfdrive/car/hyundai/hyundaican.py
#	selfdrive/car/interfaces.py
#	selfdrive/car/toyota/carcontroller.py
#	selfdrive/car/volkswagen/carcontroller.py
#	selfdrive/controls/lib/drive_helpers.py
#	selfdrive/controls/radard.py
#	selfdrive/locationd/paramsd.py
#	selfdrive/locationd/torqued.py
#	selfdrive/ui/translations/main_es.ts
#	system/athena/athenad.py
Merge branch 'upstream/opendbc/master' into sync-20240802

# Conflicts:
#	opendbc/dbc/generator/honda/_dual_nidec_common.dbc
#	opendbc/dbc/generator/honda/honda_accord_touring_2016_can.dbc
#	opendbc/dbc/generator/honda/honda_accord_touring_V6_2016_can.dbc
#	opendbc/dbc/generator/honda/honda_accord_touring_hybrid_2017_can.dbc
#	opendbc/dbc/generator/toyota/_sp_debug_toyota.dbc
2024-08-03 10:26:13 -04:00
DevTekVE
57daa151cb Docs: Move HOW-TOS to master (#387)
* HOW-TOS.md: Instructions to enable radar tracks

* HOW-TOS.md: Instructions to enable radar tracks and openpilot Longitudinal Control

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* README: Enable Radar Tracks (#17)

* HOW-TOS: Update HKG enable radar tracks instructions (#24)

* Update radar tracks instructions

* Update HKG enable radar tracks instructions

* Update HOW-TOS.md

* Update HOW-TOS.md

* HOW-TOS: Update enable openpilot Longitudinal Control instructions (#29)

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Update HOW-TOS.md

* Added How-To for Enabling Mapbox Navigation (#78)

* Readme 2.0 (#84)

* Readme 2.0

• Add collapsible sections in an effort to make the readme page more digestible for first time readers.
• Proposed rewording for the following sections:
        • Join our Discord
        • Safety Modifications
• Prettify layout

* Update README.md

* Update README.md

* Update README.md

* Update README.md

spelling corrections

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

Moved Prohibited Safety Modifications into it's own section

* Update README.md

Reduced clickable text for hyperlink branches.
Added comma.ai link to safety policy.

* Update README.md

* Update README.md

* Update README.md

* Prettify

• Make main headings expandable
• Rework installation section (undecided yet)

* Update README.md

Make table of contents uniform

* Update README.md

* Update README.md

Tidy up installation section

* Update Driving Enhancements

something is preventing self linking after [**Gap Adjust Cruise (GAC)**](#gap-adjust-cruise)

* Quality of life Enhancements

Added more to the list

* Add e2e path colour

* Fix How-To link

* Add comma two recommended branch

* Discrete discord badge

* Update installation instructions

* Make sections mobile friendly

`h2` -> h3

* Update `Features:`

reword and make use of footnotes

* Less is more, updated branch with search query

* 0.8.12 will work on comma three as well

* Tweak OSM feature and add footnote

* update menu reference

* DLP footnote

* Delete CHANGELOGS.md

Not needed seen as README directs to live / updated changelog per branch

* Delete FEATURES.md

Double up / already exists in README

* Update HOW-TOS.md

Make styling consistent, no information changed

* Difference format for installation block

* Spelling

* Update README.md

Add VW/Audi/Skoda and reword what SP is for

* Update README.md

bounds -> parameters

* Update README.md

Update installation URL with shortened URL + reword. Include footnote

* Update README.md

Reword `GAC`

* Update README.md

* Update README.md

Spacing

* Update README.md

less is more

* Update README.md

Remove DLP footnote, add NZ to Offline OSM

* Update README.md

Prettify change logs - link to a change log for `0.8.12-prod` branch instead of search

* Update README.md

Refactor QOL section. Focus more on "function of" vs "how-to".

* Update README.md

Refactor Visual Enhancements

* Driving Enhancements rework

* Additional -> Miscellaneous

* Spelling + grammar check

* Replace sirens with triangles

* Always show donation, updated Special Thanks

* 📡

* Update README.md

Co-authored-by: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>

* Update README.md

Co-authored-by: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>

* Fix how-to's

* Update README.md

* Discord badge to show total members

* Update README.md

* Small cleanup and additions

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>

* Don't miss this

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>

* someday

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>

* No longer needed

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>

* Take it out

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>

* Less sunny

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>

---------

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>

* Update HOW-TOS.md

* Simplify README installation instructions

Consolidated the installation command for the `release-c3` branch and removed redundant instructions for unsupported comma two. Also updated the How-To, removing the old branch that caused a huge size on the repo.

* Remove comma two installation instructions

This update cleans up the README by removing outdated installation instructions for the comma two device. It makes the documentation more concise and focused on current requirements and devices.

---------

Signed-off-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: sunnyhaibin <haibin.wen3@gmail.com>
Co-authored-by: Brandon Bennett <56660362+bbennett80@users.noreply.github.com>
Co-authored-by: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Co-authored-by: tango2590 <78666662+tango2590@users.noreply.github.com>
Co-authored-by: Moodkiller <appleipodsrock@gmail.com>
2024-08-03 10:14:43 -04:00
Jason Wen
1fb3ab1d1a no more body 2024-08-02 18:45:59 -04:00
Dean Lee
cafca4f891 uploader.py: simplify clear_locks by using rglob (#32974)
simplify clear_locks
2024-08-02 13:40:57 -07:00
Dean Lee
2cd9975e4f modeld: remove redundant pred_mu assignment (#33152)
remove redundant pred_mu assignment
2024-08-02 13:40:33 -07:00
Dean Lee
c40d129f70 camerad: update frame msg related variable types to uint64_t for consistency (#33113)
Update frame_msg related variable types to uint64_t for  type safety
2024-08-02 12:57:29 -07:00
Adeeb Shihadeh
19dec54f65 Update stale.yaml 2024-08-02 12:55:04 -07:00
Dean Lee
8ab587d30b camerad: move do_exit to camera_qcom2.cc (#33086)
move do_exit to camera_qcom2.cc
2024-08-02 12:18:10 -07:00
Dean Lee
ea5ee29ebd params: wrap fsync and close in HANDLE_EINTR for robustness (#33154)
Wrap fsync and close in HANDLE_EINTR for Robustness
2024-08-02 12:16:24 -07:00
Dean Lee
2189164d45 camerad: encapsulating event management within the ImgProc Class (#33119)
Encapsulating Event Management Within the ImgProc Class
2024-08-02 12:16:04 -07:00
Dean Lee
8f3fc699d4 loggerd: Initialize atomic variables to zero (#33130)
Initialize atomic variables in LoggerdState to zero
2024-08-02 12:01:56 -07:00
Jason Wen
bdb733ddc9 car: Fix typo with ParamManager variable (#382) 2024-08-02 12:36:49 -04:00
DevTekVE
b63ef7b0bf Create codeql.yml 2024-08-02 18:35:44 +02:00
Jason Wen
09d1604b84 MADS: Honda: Fix PCM ACC disengage fault (#363)
* MADS: Honda: Fix PCM ACC disengage fault

* try this out

* honda only
2024-08-02 11:41:20 -04:00
Jason Wen
61f7690265 ci: Update build number on dev builds with Discord notification (#381) 2024-08-02 11:38:25 -04:00
Jason Wen
38b2d9670c Merge branch 'sunnylink-connection-flow-improvement' into master-dev-c3 2024-08-02 11:34:16 -04:00
Jason Wen
8323ab0647 Merge remote-tracking branch 'sunnypilot/sunnypilot/master' into sunnylink-connection-flow-improvement 2024-08-02 11:34:05 -04:00
Jason Wen
cbd8d9cc44 Merge branch 'ci-notifications-fix' into master-dev-c3 2024-08-02 11:27:49 -04:00
Jason Wen
5f1d0a535f ci: Update build number on dev builds with Discord notification 2024-08-02 11:27:29 -04:00
Jason Wen
59051d1b84 Merge branch 'master' into master-dev-c3
# Conflicts:
#	.gitlab-ci.yml
2024-08-02 10:50:38 -04:00
John Belmonte
4cb7263dd6 Docs: Fix indentation of feature list (#379)
Fix indenting of feature list
2024-08-02 16:35:37 +02:00
DevTekVE
ef2331b5df ci: Prebuilt public branches and update build number (#380)
* fixing build number + forcing run to test

* Cleaning up and changing the process for the auto builds

* updating the logic for the extra verson identifier

* Return to default master-dev-c3

* if this is MR on gitlab, we also publish prebuilt on private gitlab for internal testing

* Silly formatting issue
2024-08-02 10:26:14 -04:00
DevTekVE
59ca1374a0 Improving authentication mechanism for the websocket and help with local dev 2024-08-02 16:07:46 +02:00
Jason Wen
8d7a10c06c Merge branch 'all-params-fix' into master-dev-c3 2024-08-02 09:57:52 -04:00
Jason Wen
043de47ed1 car: Fix typo with ParamManager variable 2024-08-02 09:56:44 -04:00
DevTekVE
1972ef8c49 updating gitmodule to proper panda 2024-08-02 14:55:14 +02:00
DevTekVE
ea7a280daa Revert "Add .git-crypt and .venv to the blacklist"
This reverts commit f51a6f54

Revert "Add git-crypt unlock attempt in provision script"

This reverts commit f4dac4b4

Revert "ci: git-crypt: Decrypt prior to building"

This reverts commit faf52492b6.

Revert "git-crypt: add collaborators"

This reverts commit bc1aad6f6a.
2024-08-02 14:04:36 +02:00
DevTekVE
ee285b9f0b Merge remote-tracking branch 'origin/master' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/carcontroller.py
#	selfdrive/car/hyundai/hyundaicanfd.py
2024-08-02 13:40:32 +02:00
Adeeb Shihadeh
13511e383c remove pre-commit (explorations) (#33172)
* remove pre-commit (explorations)

* lint.sh

* remove rest

* add to release files

* no source

* 1min is all you need
2024-08-01 22:16:13 -07:00
Jason Wen
9be3925ee1 MADS: Hyundai: Independent control with LFA button (#362)
* MADS: HKG CAN-FD: Disallow cruise buttons to engage when pcmCruiseSpeed is off

* handle states properly

* this is better

* make sure main button is pressed

* oops flipped main

* same behavior

* handle cruise main button universally

* both

* not needed

* oops

* wtf how did i miss
2024-08-01 23:34:35 -04:00
Jason Wen
8d760272c7 car: Move all live param checks to ParamManger (#378)
car: Move all live param checks to ParamManger
2024-08-01 23:23:00 -04:00
Mathew Locoteta
22e0b4d597 Honda Longitudinal: Remove tuning from 4-CYL 9th Gen Accord (#359)
Remove ACC tuning from 9th Gen Accord

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2024-08-01 22:42:13 -04:00
Maxime Desroches
4b11c9e914 ci: create ui report only on PR (#33168)
only on pr
2024-08-01 16:44:10 -07:00
Hoang Bui
5b4b7a08fc CI: fix recent test_rotation skip (#33167) 2024-08-01 16:28:26 -07:00
Jason Wen
c8556f340e Merge branch 'car-all-params' into master-dev-c3 2024-08-01 19:11:26 -04:00
Jason Wen
519497c62a Merge branch 'master' into master-dev-c3 2024-08-01 19:10:02 -04:00
Jason Wen
6e381f02ba car: Move all live param checks to ParamManger 2024-08-01 18:47:14 -04:00
Adeeb Shihadeh
bfa8e0b2ec disable test_rotation until it's fixed 2024-08-01 15:36:44 -07:00
Jason Wen
08afbd7cb5 car: Check params before car state is updated (#364)
* car: Check params before car state is updated

* read params in a thread instead

* initialize list

* Do this instead

* type hint

* ParamManager

* make them internal
2024-08-01 18:12:27 -04:00
Maxime Desroches
d0671bda6d op.sh: check for valid invocation (#33166)
no source
2024-08-01 13:44:57 -07:00
DevTekVE
9d050f8afa Merge remote-tracking branch 'refs/remotes/origin/master' into master-dev-c3
# Conflicts:
#	.gitlab-ci.yml
2024-08-01 21:52:47 +02:00
DevTekVE
f311c8b1d7 No auto publish for dev-c3 or release-c3 2024-08-01 20:09:17 +02:00
Jason Wen
9d5c3e65b5 Merge branch 'mads-hkg-available-fix' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/carcontroller.py
#	selfdrive/car/hyundai/hyundaicanfd.py
2024-08-01 13:29:47 -04:00
Jason Wen
9aa452a3c6 wtf how did i miss 2024-08-01 13:29:07 -04:00
Jason Wen
3f04a9872a Merge branch 'car-params-check' into master-dev-c3 2024-08-01 13:28:04 -04:00
Jason Wen
891cba85da make them internal 2024-08-01 13:27:31 -04:00
DevTekVE
fb7076a042 Change remote 2024-08-01 18:28:15 +02:00
DevTekVE
cd0ee08763 Allow auto publishing of public prebuilts 2024-08-01 18:10:59 +02:00
DevTekVE
f7ab369d47 First attempt at mirroring to gitlab 2024-08-01 17:22:43 +02:00
Jason Wen
e394b525cd Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-08-01 10:28:37 -04:00
Jason Wen
fefe083842 oops 2024-08-01 10:28:31 -04:00
Jason Wen
f467b416dd Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-08-01 10:27:04 -04:00
Jason Wen
da9d4917b0 Merge branch 'master' into mads-hkg-available-fix 2024-08-01 10:26:50 -04:00
Jason Wen
54d5281064 MADS: Map cruise main and lateral buttons to button events (#373)
* MADS: Map cruise main and lateral buttons to button events
* MADS: Map cruise main and lateral buttons to button events

* different style

* nah

(cherry picked from commit 4d7afe3a7b)

* reimplement
2024-08-01 10:26:27 -04:00
Jason Wen
2de756f1dc Merge branch 'car-params-check' into master-dev-c3 2024-08-01 07:47:13 -04:00
Jason Wen
29bf1cc294 ParamManager 2024-08-01 07:46:57 -04:00
Jason Wen
9a8c469fdb Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-01 06:41:30 -04:00
Jason Wen
9ad059f05e wrong logic 2024-08-01 06:41:26 -04:00
Jason Wen
0a61323c99 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-01 06:28:53 -04:00
Jason Wen
f79ed8f06b enable for CAN-FD 2024-08-01 06:28:50 -04:00
Jason Wen
e67e1a382f Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-01 06:28:27 -04:00
Jason Wen
257f3c1f48 enable for CAN-FD 2024-08-01 06:28:20 -04:00
Jason Wen
c2405c76ac Merge branch 'hkg-can-jerk' into master-dev-c3
# Conflicts:
#	selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_settings.cc
2024-08-01 06:16:15 -04:00
Jason Wen
0c78b6b9b8 maybe this is why it has been iffy 2024-08-01 06:15:26 -04:00
Jason Wen
fcca72af9f add new toggle, remove old toggle 2024-08-01 06:13:34 -04:00
Shane Smiskol
7ee9d2d1b9 opendbc is a package (#33159)
* bump

* rename to opendbc_repo

add symlink

* bump

* fix cabana

fix cabana

* bump

* fix whitelist paths

bump

* bump to master

* remove trailing slash
2024-07-31 23:17:40 -07:00
Maxime Desroches
7bf912f407 op.sh: fix python version check (#33163)
fix check
2024-07-31 21:40:48 -07:00
Maxime Desroches
3e66827a85 setup.sh: work in non interactive mode (#33162)
* work without terminal

* failure message

* no if
2024-07-31 20:32:41 -07:00
Maxime Desroches
16ea2ff270 op.sh: call directly instead of sourcing (#33160)
no source
2024-07-31 19:37:06 -07:00
ZwX1616
3ccc63deec camerad: use os binning (#33161)
* all

* right sz

* what is this

* Revert "what is this"

This reverts commit 3ff771926f109452a055dfb61cee06b34e498164.

* ok

* big

* update intrs

* fl

* more specifuc

* fish

* revert

* revert

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-07-31 19:10:44 -07:00
Jason Wen
b0a4b7f8ac type hint 2024-07-31 20:49:22 -04:00
Jason Wen
92500628ad Merge branch 'car-params-check' into master-dev-c3 2024-07-31 20:38:35 -04:00
Jason Wen
544531ab91 Do this instead 2024-07-31 20:38:28 -04:00
Jason Wen
1dfb6811db Merge branch 'car-params-check' into master-dev-c3 2024-07-31 20:30:37 -04:00
Jason Wen
e136db1262 initialize list 2024-07-31 20:30:26 -04:00
Jason Wen
e45e02c261 Merge branch 'master' into master-dev-c3 2024-07-31 19:47:46 -04:00
Jason Wen
fa3a0ba747 CI: Update prebuilt repository URL (#374) 2024-07-31 19:47:34 -04:00
Jason Wen
21795afca8 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-07-31 19:33:43 -04:00
Jason Wen
381b514230 new tuning! 2024-07-31 19:33:28 -04:00
Shane Smiskol
7de618a5cf ensure alerts_generated.h is built (#33157)
don't build alerts_generated.h in test, and ensure scons builds it more reliably + clean up support
2024-07-31 16:12:37 -07:00
Jason Wen
6e77432c5e Merge branch 'new-button-events-2' into master-dev-c3 2024-07-31 18:47:44 -04:00
Jason Wen
17ec157659 reimplement 2024-07-31 18:47:12 -04:00
Jason Wen
edddc496d6 MADS: Map cruise main and lateral buttons to button events
* MADS: Map cruise main and lateral buttons to button events

* different style

* nah

(cherry picked from commit 4d7afe3a7b)
2024-07-31 18:47:11 -04:00
Jason Wen
b3926faebb Revert "MADS: Map cruise main and lateral buttons to button events" (#372)
Revert "MADS: Map cruise main and lateral buttons to button events (#361)"

This reverts commit 4d7afe3a7b.
2024-07-31 18:41:17 -04:00
Shane Smiskol
7c112341c3 Reapply "update to new opendbc API (#32009)" (#33151)
This reverts commit ac130001cc.
2024-07-31 15:37:39 -07:00
Shane Smiskol
ebff7cab1a get_fw_versions: test the full stack (#33156)
* add the test

fix

* bump

* not sure why mypy didn't catch this
2024-07-31 14:53:13 -07:00
Jason Wen
3c60734760 Merge branch 'pcm-long-disengage' into master-dev-c3 2024-07-31 17:04:11 -04:00
Jason Wen
053b07e4c0 honda only 2024-07-31 17:04:00 -04:00
Maxime Desroches
1dd8bdc791 Remove hexdump package (#33155)
* remove hexdump

* uv lock

* cleanup
2024-07-31 13:34:14 -07:00
Maxime Desroches
bf003f2972 setup.sh: retry + timing (#33145)
* improve

* update readme

* stdin

* better

* allow non interactive

* specify dir
2024-07-31 10:42:08 -07:00
DevTekVE
9810b10c49 [SL] Enable sunnylink by default (#366)
Enable Sunnylink by default

Sunnylink was previously conditionally enabled based on build metadata. This change ensures that Sunnylink is enabled by default, facilitating immediate access for all builds.
2024-07-31 10:31:51 -04:00
Shane Smiskol
ac130001cc Revert "update to new opendbc API (#32009)"
This reverts commit 0dddc97dca.
2024-07-31 02:38:44 -07:00
Dean Lee
0dddc97dca update to new opendbc API (#32009)
* use new opendbc api

* export pandad_python

* merge master

* merge master

* bump opendbc

* bump opendbc

* improve func

* keep interface unchanged

* fix test_car_interfaces

* bump opendbc

* bump opendbc

* fix test_models

* the interface now has to convert from can capnp to list, so we should include this time

* goes from ~210 to ~240 mean ms real time

* remoe busTime

* lowercase sendcan

* consistent msgtype

* bump

* bump

* not used in lat_mpc

* space

* bump to master

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-07-31 00:24:46 -07:00
Shane Smiskol
1b6ac2d876 CarController: call to super's init (#33148)
* this should be common

* super!

* bump

* and frame is common

* bump
2024-07-30 23:55:23 -07:00
Shane Smiskol
80f9278a73 Revert "bump"
This reverts commit 7824074aae.
2024-07-30 23:29:46 -07:00
Shane Smiskol
7824074aae bump 2024-07-30 23:28:49 -07:00
Shane Smiskol
42f2601416 deprecate busTime (#33146)
* deprecate busTime

* bump

* do car can + more

* forgot some

* bump opendbc

* fix that too

* bump
2024-07-30 21:26:58 -07:00
Jason Wen
e615f34490 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-07-31 00:03:17 -04:00
Jason Wen
d472f129e6 stock stop distance again 2024-07-31 00:03:04 -04:00
Jason Wen
74481be4ff same rate up/down 2024-07-31 00:02:04 -04:00
Jason Wen
1dd9ed1042 more aggressive jerk 2024-07-31 00:00:09 -04:00
Jason Wen
9c02257bcf Merge branch 'pcm-long-disengage' into master-dev-c3 2024-07-30 23:57:13 -04:00
Jason Wen
03722f9090 try this out 2024-07-30 23:57:04 -04:00
Jason Wen
7da934c2c0 Merge branch 'car-params-check' into master-dev-c3 2024-07-30 23:06:18 -04:00
Jason Wen
afb0c3fe42 read params in a thread instead 2024-07-30 22:59:47 -04:00
Shane Smiskol
b6d124d268 tester present msgs: use helper (#33147)
use helper
2024-07-30 18:09:22 -07:00
Shane Smiskol
661ef03a24 Ford: add long controls todo 2024-07-30 15:18:26 -07:00
Jason Wen
b2ba2aaab1 car: Check params before car state is updated 2024-07-30 17:49:49 -04:00
Jason Wen
7a85b34024 Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-07-30 17:46:30 -04:00
Jason Wen
b4fd73141e not needed 2024-07-30 17:46:24 -04:00
Adeeb Shihadeh
76fd5b00f1 CI: increase shm size to 2G 2024-07-30 14:29:48 -07:00
Shane Smiskol
0739d79a51 cars: remove some external imports (#33133)
* ford and gm

* clean that up

* also this

* honda

* temp fix

* move into selfdrive.car

* clean up

* more
2024-07-30 14:27:27 -07:00
Shane Smiskol
0fe143e4a7 test_onroad: lower lower log size bound 2024-07-30 14:07:47 -07:00
Maxime Desroches
086dcfe715 docs: fix README.md (#33142)
* md

* Update README.md

* rename

* exclude

* Update README.md
2024-07-30 13:57:42 -07:00
Maxime Desroches
9536dd07c6 unpin numpy (#33132)
* unlock numpy

* remove old cache

* sheel

* lock

* remove temp

* depends

* export

* put this back

* use __version__

* move this

---------

Co-authored-by: quebec <quebec@quebec.attlocal.net>
2024-07-30 13:11:05 -07:00
Adeeb Shihadeh
0b29db5c3e add roadmap to readme 2024-07-30 13:03:34 -07:00
Jason Wen
0c7268567f Merge branch 'mads-hkg-available-fix' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/interface.py
2024-07-30 14:17:47 -04:00
Jason Wen
bce46b63da both 2024-07-30 14:17:30 -04:00
Andrei Radulescu
4e73b76a12 fix multiprocessing issue with can_replay.py on macOS (#33139)
fix multiprocessing issue with can_replay.py on mac
2024-07-30 10:34:46 -07:00
Jason Wen
4c664020f2 handle cruise main button universally 2024-07-30 11:44:40 -04:00
Jason Wen
85e0e8b526 Merge branch 'master' into mads-hkg-available-fix
# Conflicts:
#	selfdrive/car/hyundai/interface.py
2024-07-30 11:22:13 -04:00
Shane Smiskol
dfd387520e process replay: use zst (#33138)
* test

* update refs to zst

* update
2024-07-30 01:46:03 -07:00
Kacper Rączy
86d8d1d996 torqued: use livePose (#33136)
* Use livePose

* Replace it in process replay

* Add liveCalibration to messages

* Update ref commit
2024-07-29 20:20:31 -07:00
Shane Smiskol
11cb2d3a0b qlog_size.py: use zstd (#33137)
qlog_size: use zstd
2024-07-29 20:13:43 -07:00
Kacper Rączy
84cff4fc03 paramsd: use livePose (#33099)
* Use livePose instead  of llk

* Update process replay sockets

* Fix import

* Fix calib

* Fix field name

* Dont store device_from_calib

* Update ref commit
2024-07-29 19:51:21 -07:00
Jason Wen
a4a7e76ddf Merge branch 'pcm-long-disengage' into master-dev-c3 2024-07-29 21:18:41 -04:00
Jason Wen
6185b82ed3 MADS: Honda: Fix PCM ACC disengage fault 2024-07-29 21:18:09 -04:00
Kacper Rączy
6e185f4eea process_replay: regenerate locationd logs (#33134)
* Filter out non-relevant services in most_messages_valid check

* Set as comprehension

* Update segments

* Update ref commit

* New check for hyundai2
2024-07-29 17:12:05 -07:00
Adeeb Shihadeh
43dcddc68b qlog: remove mag and less CAN 2024-07-29 14:44:03 -07:00
Dean Lee
ade13722cd replay: add support for decompressing ZST log files (#32910)
* Add Support for Decompressing ZST Log Files

* 2 space and check magic number

* match BZ2

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-07-29 13:48:06 -07:00
Andrei Radulescu
7d6ff19dea update mac_setup.sh brew install (#33131) 2024-07-29 13:46:13 -07:00
Dean Lee
2728c95b0d uploader.py: ensure proper resource management with io.BytesIO (#33108)
* ensure proper resource management with io.BytesIO

* improve
2024-07-29 13:43:31 -07:00
Jason Wen
7935c2bea9 dev-c3 still uses priv 2024-07-29 15:47:56 -04:00
Jason Wen
d80dceee92 Merge branch 'mads-hkg-available-fix' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/interface.py
2024-07-29 15:46:37 -04:00
Jason Wen
bdb7fa4bf8 same behavior 2024-07-29 15:44:05 -04:00
Jason Wen
294476fc33 oops flipped main 2024-07-29 15:38:30 -04:00
Jason Wen
faff375b94 make sure main button is pressed 2024-07-29 15:38:30 -04:00
Jason Wen
4a53caff37 this is better 2024-07-29 15:38:30 -04:00
Jason Wen
e6970ea15b handle states properly 2024-07-29 15:38:29 -04:00
Jaosn Wen
c923a249df MADS: HKG CAN-FD: Disallow cruise buttons to engage when pcmCruiseSpeed is off 2024-07-29 15:38:29 -04:00
Shane Smiskol
606890cba5 [bot] Fingerprints: add missing FW versions from new users (#33123)
Export fingerprints
2024-07-29 12:32:51 -07:00
Jason Wen
33fbf2718c Merge branch 'master' into master-dev-c3 2024-07-29 15:25:53 -04:00
Jason Wen
8c37e54ed9 Merge branch 'new-button-events' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/interface.py
2024-07-29 15:20:53 -04:00
Jason Wen
a7abe8c522 Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-07-29 15:19:22 -04:00
Jason Wen
8cc99f0cd0 Merge branch 'master' into mads-hkg-available-fix
# Conflicts:
#	SConstruct
#	selfdrive/ui/SConscript
#	selfdrive/ui/sunnypilot/SConscript
2024-07-29 15:19:03 -04:00
Jason Wen
b8d3f9a16f use upstream msgq 2024-07-29 15:16:50 -04:00
Jason Wen
5382db2b19 missed from merge 2024-07-29 15:15:46 -04:00
Jason Wen
2734aa7eb7 Merge branch 'master' into master-dev-c3
# Conflicts:
#	.gitlab-ci.yml
#	CHANGELOGS.md
#	SConstruct
#	panda
#	selfdrive/car/ford/carstate.py
#	selfdrive/car/ford/interface.py
#	selfdrive/car/ford/values.py
#	selfdrive/car/gm/interface.py
#	selfdrive/car/hyundai/interface.py
#	selfdrive/ui/qt/api.h
#	selfdrive/ui/qt/home.cc
#	selfdrive/ui/qt/home.h
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/qt/offroad_home.cc
#	selfdrive/ui/qt/offroad_home.h
#	selfdrive/ui/qt/onroad/buttons.cc
#	selfdrive/ui/qt/onroad/buttons.h
#	selfdrive/ui/qt/onroad/onroad_home.h
#	selfdrive/ui/qt/request_repeater.cc
#	selfdrive/ui/qt/request_repeater.h
#	selfdrive/ui/qt/sidebar.h
#	selfdrive/ui/qt/widgets/toggle.h
#	selfdrive/ui/qt/window.h
#	selfdrive/ui/sunnypilot/qt/api.cc
#	selfdrive/ui/sunnypilot/qt/api.h
#	selfdrive/ui/sunnypilot/qt/common/json_fetcher.h
#	selfdrive/ui/sunnypilot/qt/home.cc
#	selfdrive/ui/sunnypilot/qt/home.h
#	selfdrive/ui/sunnypilot/qt/maps/map.cc
#	selfdrive/ui/sunnypilot/qt/maps/map.h
#	selfdrive/ui/sunnypilot/qt/maps/map_helpers.h
#	selfdrive/ui/sunnypilot/qt/network/networking.cc
#	selfdrive/ui/sunnypilot/qt/network/networking.h
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/models/role_model.h
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/models/sponsor_role_model.h
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/models/user_model.h
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/services/base_device_service.cc
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/services/base_device_service.h
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/services/role_service.cc
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/services/role_service.h
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/services/user_service.cc
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/services/user_service.h
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/sunnylink_client.cc
#	selfdrive/ui/sunnypilot/qt/network/sunnylink/sunnylink_client.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/device_panel.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/display_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/display_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/monitoring_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/monitoring_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/onboarding.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/onboarding.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/osm/models_fetcher.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/osm_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/osm_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/software_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/software_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnylink_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnylink_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/custom_offsets_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/custom_offsets_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/lane_change_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/lane_change_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/mads_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/mads_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/speed_limit_control_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/speed_limit_policy_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/speed_limit_warning_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/trips_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/trips_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/vehicle_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_settings.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_settings.h
#	selfdrive/ui/sunnypilot/qt/offroad_home.cc
#	selfdrive/ui/sunnypilot/qt/offroad_home.h
#	selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.cc
#	selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.h
#	selfdrive/ui/sunnypilot/qt/onroad/buttons.cc
#	selfdrive/ui/sunnypilot/qt/onroad/buttons.h
#	selfdrive/ui/sunnypilot/qt/onroad/developer_ui/developer_ui.cc
#	selfdrive/ui/sunnypilot/qt/onroad/developer_ui/developer_ui.h
#	selfdrive/ui/sunnypilot/qt/onroad/developer_ui/ui_elements.h
#	selfdrive/ui/sunnypilot/qt/onroad/onroad_home.cc
#	selfdrive/ui/sunnypilot/qt/onroad/onroad_home.h
#	selfdrive/ui/sunnypilot/qt/onroad/onroad_settings.cc
#	selfdrive/ui/sunnypilot/qt/onroad/onroad_settings_panel.cc
#	selfdrive/ui/sunnypilot/qt/onroad/onroad_settings_panel.h
#	selfdrive/ui/sunnypilot/qt/request_repeater.cc
#	selfdrive/ui/sunnypilot/qt/request_repeater.h
#	selfdrive/ui/sunnypilot/qt/sidebar.cc
#	selfdrive/ui/sunnypilot/qt/sidebar.h
#	selfdrive/ui/sunnypilot/qt/text.cc
#	selfdrive/ui/sunnypilot/qt/ui_scene.h
#	selfdrive/ui/sunnypilot/qt/util.cc
#	selfdrive/ui/sunnypilot/qt/util.h
#	selfdrive/ui/sunnypilot/qt/widgets/controls.cc
#	selfdrive/ui/sunnypilot/qt/widgets/controls.h
#	selfdrive/ui/sunnypilot/qt/widgets/drive_stats.cc
#	selfdrive/ui/sunnypilot/qt/widgets/drive_stats.h
#	selfdrive/ui/sunnypilot/qt/widgets/scrollview.cc
#	selfdrive/ui/sunnypilot/qt/widgets/scrollview.h
#	selfdrive/ui/sunnypilot/qt/widgets/toggle.cc
#	selfdrive/ui/sunnypilot/qt/widgets/toggle.h
#	selfdrive/ui/sunnypilot/qt/window.cc
#	selfdrive/ui/sunnypilot/qt/window.h
#	selfdrive/ui/sunnypilot/sunnypilot_main.h
#	selfdrive/ui/sunnypilot/ui.cc
#	selfdrive/ui/sunnypilot/ui.h
#	selfdrive/ui/translations/main_ar.ts
#	selfdrive/ui/translations/main_de.ts
#	selfdrive/ui/translations/main_es.ts
#	selfdrive/ui/translations/main_fr.ts
#	selfdrive/ui/translations/main_ja.ts
#	selfdrive/ui/translations/main_ko.ts
#	selfdrive/ui/translations/main_pt-BR.ts
#	selfdrive/ui/translations/main_th.ts
#	selfdrive/ui/translations/main_tr.ts
#	selfdrive/ui/translations/main_zh-CHS.ts
#	selfdrive/ui/translations/main_zh-CHT.ts
#	selfdrive/ui/ui.h
2024-07-29 15:12:27 -04:00
Maxime Desroches
01c0756974 Remove control usage (#33103)
* manual matrix exp

* remove control
2024-07-29 11:52:33 -07:00
Jason Wen
707a45cb0a nah 2024-07-29 14:52:09 -04:00
Jason Wen
bda51a3a86 different style 2024-07-29 14:50:10 -04:00
Jason Wen
6c185fb6ac MADS: Map cruise main and lateral buttons to button events 2024-07-29 14:36:02 -04:00
commaci-public
1ae3adbe13 [bot] Update Python packages and pre-commit hooks (#33122)
Update Python packages and pre-commit hooks

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-07-29 10:24:05 -07:00
Jason Wen
f92bc4b760 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-07-29 07:18:30 -04:00
Jason Wen
4a2b96ae4e Revert "dynamic stopping distance"
This reverts commit cb76fb797f.
2024-07-29 07:18:21 -04:00
Jason Wen
41d0ee236d should be reverted 2024-07-29 07:10:40 -04:00
Jason Wen
1188307175 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-07-29 07:10:02 -04:00
Jason Wen
b55ae7f5f9 Revert "try this to make car stop a bit further"
This reverts commit 0487294495.
2024-07-28 22:44:10 -04:00
Jason Wen
cb76fb797f dynamic stopping distance 2024-07-28 22:44:01 -04:00
Jason Wen
f9be24b154 Revert "try this to make car stop a bit further"
This reverts commit 0487294495.
2024-07-28 22:32:44 -04:00
Adeeb Shihadeh
5ebc65f254 docs: add concepts section 2024-07-28 16:38:41 -07:00
Adeeb Shihadeh
691b948ad0 docs: readthedocs theme (#33116)
* docs: read the docs theme

* nav depth
2024-07-28 16:07:39 -07:00
Adeeb Shihadeh
4fbac089f8 docs: fix nested structure (#33114)
* docs: fix nested structure

* test ci

* that too

* update that

* not common mark anymore
2024-07-28 15:38:38 -07:00
Maxime Desroches
583e89d3a4 remove cv2 usage (#33101)
remove cv2
2024-07-28 15:08:27 -07:00
Adeeb Shihadeh
c51f37f63e docs: start roadmap 2024-07-28 15:05:36 -07:00
Jason Wen
6f4ba97e3d Merge branch 'hkg-can-jerk' into master-dev-c3 2024-07-28 14:20:05 -04:00
Jason Wen
0487294495 try this to make car stop a bit further 2024-07-28 14:19:52 -04:00
Shane Smiskol
1b3b5ab758 use zstandard library (#33110)
* use zstandard

* run 10

* bye bye

* this was a little overzealous

* clean up
2024-07-28 02:03:47 -07:00
Jason Wen
8f3b091381 Merge branch 'ui-sp-split' into master-dev-c3 2024-07-27 23:59:06 -04:00
Jason Wen
abe5fc9146 map: working!!! 2024-07-27 23:58:44 -04:00
Jason Wen
a47a992871 map: less 2024-07-27 23:27:46 -04:00
Jason Wen
b9785e33e7 use sp's 2024-07-27 23:26:16 -04:00
DevTekVE
93b8435eaa Merge branch 'refs/heads/ui-sp-split' into master-dev-c3 2024-07-27 23:11:53 +02:00
DevTekVE
0894686bb5 Refactor brightness update logic in DeviceSP
Remove redundant brightness calculation from DeviceSP by leveraging Device's implementation. Introduce a conditional return to handle Sunnypilot-specific logic cleanly.
2024-07-27 23:09:30 +02:00
DevTekVE
f242f6b55d No more rave 2024-07-27 23:07:19 +02:00
DevTekVE
3c8acc8c77 Add override to updateBrightness in DeviceSP
Implemented an override for the updateBrightness function in DeviceSP. This ensures proper handling of UIState type by dynamically casting it to UIStateSP.
2024-07-27 22:47:52 +02:00
Jason Wen
68330cea27 Merge branch 'ui-sp-split' into master-dev-c3 2024-07-27 15:13:32 -04:00
Jason Wen
9d0ba054f3 make sure map rendering is compiled 2024-07-27 15:08:39 -04:00
Jason Wen
c10121b570 unused 2024-07-27 14:40:50 -04:00
Jason Wen
b4c98bc72f add kona ev 2022 to can-fd 2024-07-27 14:37:02 -04:00
Jason Wen
5fcd546b77 Merge branch 'hkg-can-jerk' into master-dev-c3 2024-07-27 02:06:21 -04:00
Jason Wen
287e2fc845 Merge branch 'master-priv' into hkg-can-jerk 2024-07-27 02:05:08 -04:00
Jason Wen
59370bed7d Merge branch 'hkg-can-jerk' into master-dev-c3
# Conflicts:
#	selfdrive/car/hyundai/carcontroller.py
#	selfdrive/car/hyundai/hyundaican.py
2024-07-27 02:04:20 -04:00
Jason Wen
5ba3e90676 comment 2024-07-27 02:03:15 -04:00
Jason Wen
76b8bce5d8 Merge branch 'ui-sp-split' into master-dev-c3 2024-07-27 01:50:07 -04:00
Jason Wen
bc40052344 make sure to use our UI 2024-07-27 01:49:57 -04:00
Jason Wen
348cd735f2 handle stopAccel = 0 2024-07-27 00:25:37 -04:00
Shane Smiskol
4caecf2143 test_onroad: use zstd compression (#33100)
* use zstd in test_onroad

* debug

* now leans towards 0.4 instead of 0.5

* 5x runs

* better

* more

* Update selfdrive/test/test_onroad.py

* revert Jenkinsfile

* and this
2024-07-26 21:14:06 -07:00
Jason Wen
796e6ae924 SCC "Fast" mode 2024-07-26 23:59:56 -04:00
Shane Smiskol
7dec7c39be uploader: compress with zstd (#32736)
* zstd uploader

* fix that

* fix name of function

* comment

* log failed

* fix comma_api_source for routes with both bz2 and zst rlogs

* TODO

* 10-14 achieves almost no benefit on qlogs in a few cases, but takes 2x the time

* these aren't written out

* regen: specify any list of sources

ooh this is pretty nice

* regen and process replay

* damn, actually we don't need all this (cool tho)

Revert "regen: specify any list of sources"

This reverts commit ceb0b4abed9ad463a9fe98d9b98a05875a52806f.

* just let it auto resolve

* fix athenad/uploader tests

* zst here too

* TODOs

* yes

* Revert "TODOs"

This reverts commit 8c7da1dbd0340c72290b5eb5563b642080ddc131.

* Revert "zst here too"

This reverts commit 23b0023ddfd22c8090be7a7caa09e7026a12aa5c.

* Revert "just let it auto resolve"

This reverts commit f296d62424227ad05facc62abc18a6f81b474e84.

* Revert "regen and process replay"

This reverts commit 0768330e96974a42616d229d159780619d049cd0.

* revert readme

* not in save_log either

* lfg

* Revert "lfg"

This reverts commit 3718559c6c4de7d1f0c80dc9f1a1d335fe679a89.
2024-07-26 19:33:35 -07:00
ugtthis
6f1ea5a1fd Docs: Added venv step (#33097) 2024-07-26 19:29:08 -07:00
Adeeb Shihadeh
c8d5a3fe25 docs: style for external links 2024-07-26 16:25:07 -07:00
Maxime Desroches
d7159cd3c7 op.sh: misc improvements (#33096)
* check for install

* venv

* build
2024-07-26 16:10:00 -07:00
Adeeb Shihadeh
db2a8e9506 docs: turning the speed blue (#33079)
* blue speed

* compile

* just blue

* cleanup
2024-07-26 15:58:00 -07:00
Maxime Desroches
eab9cd751c op.sh: check submodules (#33095)
submodules
2024-07-26 15:28:13 -07:00
Adeeb Shihadeh
6b5f88a533 cleanup macOS dependencies (#33094) 2024-07-26 15:17:14 -07:00
Adeeb Shihadeh
00d9748d9a op.sh: parallel submodule update 2024-07-26 15:08:36 -07:00
Adeeb Shihadeh
a1d2e84212 update tinygrad url to tinygrad/tinygrad (#33093) 2024-07-26 15:04:57 -07:00
Adeeb Shihadeh
d24b80fca4 remove body submodule (#33091)
* remove body submodule

* little more

* fix op
2024-07-26 14:40:14 -07:00
Maxime Desroches
a1dce6ef47 op.sh: run pytest (#33090)
test
2024-07-26 11:34:36 -07:00
DevTekVE
936fc6403b Merge branch 'refs/heads/ui-sp-split' into master-dev-c3 2024-07-26 20:32:06 +02:00
DevTekVE
7f90846971 Refactor conditional process management for external scripts
Refactor the way external scripts 'gitlab_runner.sh' and 'sunnylink_uploader.py' are included in the process list based on their existence. This improves code readability and ensures that the inclusion checks are performed at a single point.
2024-07-26 19:19:37 +02:00
DevTekVE
cef4fbbdea Merge branch 'refs/heads/ui-sp-split' into master-dev-c3 2024-07-26 17:37:06 +02:00
DevTekVE
d20010ee31 Refactor option flag for UI customization
Changed the build option flag from '--sunnypilot' to '--stock-ui' to improve clarity. Updated related conditions and defaults in 'selfdrive/ui/SConscript' and 'SConstruct' files for consistency. Removed unused internal developer check logic from 'SConstruct'.
2024-07-26 17:35:45 +02:00
Jason Wen
981d150a3b different rate of change for ICE, HEV, PHEV, EV 2024-07-26 10:13:06 -04:00
Jason Wen
72a0142bf9 do this at the car level 2024-07-26 09:52:30 -04:00
DevTekVE
40f177f646 Merge branch 'refs/heads/ui-sp-split' into master-dev-c3 2024-07-26 11:25:36 +02:00
DevTekVE
f532ced4c8 Merge branch 'refs/heads/master-priv' into master-dev-c3 2024-07-26 11:25:23 +02:00
DevTekVE
0e499aa2c1 Merge branch 'refs/heads/master-priv' into ui-sp-split 2024-07-26 11:25:04 +02:00
DevTekVE
7b8a03b5f2 Add new parameters for enabling GitLab runner and Sunnylink uploader 2024-07-26 09:24:27 +00:00
DevTekVE
8465daa80f Merge conflict resolving -> EnforceTorqueLateral changed to use ToggleControlSP as expected 2024-07-26 11:05:05 +02:00
Jason Wen
eb7f4274f8 Merge conflict resolving -> custom stock long planner 2024-07-26 11:04:41 +02:00
DevTekVE
01d4d05729 Merge branch 'refs/heads/ui-sp-split' into master-dev-c3
# Conflicts:
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/sunnypilot/qt/onroad/onroad_settings.cc
2024-07-26 10:42:53 +02:00
DevTekVE
66d98503df Merge branch 'refs/heads/master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
#	selfdrive/car/ford/carstate.py
#	selfdrive/car/ford/interface.py
#	selfdrive/car/ford/values.py
#	selfdrive/car/gm/interface.py
#	selfdrive/car/hyundai/interface.py
2024-07-26 10:28:30 +02:00
Jason Wen
e8ca47ebfa Enhance chevron display with additional lead car metrics
Added a third chevron type to display Time-to-Collision (TTC) metrics for the lead car. Modified logic to handle the new metrics type, allowing for comprehensive data on distance, speed, and TTC. Adjusted text box dimensions as needed for the additional information.
2024-07-26 10:17:05 +02:00
DevTekVE
11059efa39 Merge branch 'refs/heads/master-priv' into ui-sp-split
# Conflicts:
#	selfdrive/ui/qt/onroad/annotated_camera.cc
#	selfdrive/ui/sunnypilot/qt/offroad/settings/visuals_settings.cc
2024-07-26 10:15:03 +02:00
Shane Smiskol
e68bb26e14 tools: keep re pattern file small (#33084)
remove bz2 from re file
2024-07-25 22:05:10 -07:00
Adeeb Shihadeh
f39c5c22e8 remove opencv-python-headless (#33082) 2024-07-25 19:30:40 -07:00
Adeeb Shihadeh
d128dbe27f setup.sh: fast git clone (#33081)
* setup.sh: filter clone

* no submodules
2024-07-25 18:59:29 -07:00
Adeeb Shihadeh
8827067eae op.sh: misc fixups (#33080)
* rm run

* little more

* lint

* one more lint

* cleanup
2024-07-25 18:21:42 -07:00
Maxime Desroches
02e30ac140 Update setup.sh 2024-07-25 16:59:42 -07:00
Maxime Desroches
3c192cbf88 op.sh: improvements (#33078)
improvements
2024-07-25 16:57:43 -07:00
Adeeb Shihadeh
e5b803f28e cleanup python dependencies (#33077)
* cleanup python dependencies

* fix ruff
2024-07-25 16:07:59 -07:00
Maxime Desroches
fb1ad1d26a fix pytools (#33076)
fix
2024-07-25 15:13:47 -07:00
Dean Lee
ccd369ee96 camerad: merge thread functions into one (#33025)
merge multiple thread functions into one
2024-07-25 15:05:14 -07:00
Maxime Desroches
1989fbd4c4 Update setup.sh 2024-07-25 14:38:47 -07:00
Maxime Desroches
173a633a75 curl pc installer (#33072)
* setup

* curl

* usable right now

* op sim

* cleanup

* show cmd
2024-07-25 14:28:41 -07:00
Adeeb Shihadeh
c8622c9553 mac's getting there 2024-07-25 14:27:29 -07:00
Adeeb Shihadeh
ed86910536 new README (#33073)
* commonmark

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* relock

* copy paste

* Update README.md

* looks better like this

* cleanup
2024-07-25 14:20:00 -07:00
eivegau
cd8a603ad0 Kia: add missing Optima EUR FW versions (#33027)
* Update fingerprints.py

* Apply suggestions from code review

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-07-25 13:47:43 -07:00
Jason Wen
a33d4e51c7 use jerk limit to change accel to car 2024-07-25 16:44:54 -04:00
Dean Lee
313a2826c2 mcid.py: optimize FFT and A-weighting calculations (#33057)
* Precomputing weighting

* add comments back

* use cache

* spacing

spacing

* clean up

* lower by diff

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-07-25 13:36:44 -07:00
Jason Wen
c943126d26 send 0 to car when stopping 2024-07-25 16:32:52 -04:00
Jason Wen
d4096d6234 not really needed 2024-07-25 16:26:30 -04:00
Jason Wen
7eee21f293 add back delay 2024-07-25 16:12:09 -04:00
Dean Lee
2da4aef268 scons: remove redundant -DSWAGLOG Flag (#33070)
remove redundant_-DSWAGLOG Flag
2024-07-25 13:10:36 -07:00
Dean Lee
75f49f84f3 camerad: add CameraConfig struct for initializing CameraState in constructor (#33065)
* Add CameraConfig struct for initializing CameraState in constructor

* init member variables
2024-07-25 13:09:03 -07:00
Jason Wen
2038d9b469 send 0 at stop req 2024-07-25 15:18:34 -04:00
Jason Wen
a2eb4545da a lot less delay 2024-07-25 13:54:38 -04:00
Jason Wen
c7f2f15950 MADS: Use modern button events parsing 2024-07-25 17:23:33 +00:00
Dean Lee
edd8759f39 scons: move -Ithird_party/qrcode to qt modules (#33071)
move -Ithird_party/qrcode to qt modeules
2024-07-25 10:16:59 -07:00
Jason Wen
97f0178d5e ui: Lead car chevron: Time to Lead Car 2024-07-25 17:16:57 +00:00
Maxime Desroches
6cdf2a1499 Update op.sh 2024-07-24 23:11:23 -07:00
Maxime Desroches
4ac938a578 op.sh: improvements (#33067)
* cabana

* pre-check

* cd

* change this

* fix

* fix install
2024-07-24 22:20:16 -07:00
Jason Wen
bf31b2ab33 further stop distance 2024-07-24 21:22:58 -04:00
Jason Wen
1b084d7eb9 revert long mpc 2024-07-24 21:22:40 -04:00
Maxime Desroches
71ad5a8dee op.sh: general improvements (#33062)
* color

* format

* dry

* unset

* venv

* search for openpilot

* linter

* replay
2024-07-24 14:49:35 -07:00
Shane Smiskol
add958bb08 athenad: log failed upload items 2024-07-24 14:48:33 -07:00
Shane Smiskol
e38a1428aa LogReader: support multiple log extensions in route (#33066)
* support rlog.zst

* TODO
2024-07-24 14:47:33 -07:00
Jason Wen
e0414b4528 0.1 interval to stopping 2024-07-24 16:57:42 -04:00
Jason Wen
2cc53b6e69 Revert "disable starting state"
This reverts commit 3f25d6f530.
2024-07-24 16:54:27 -04:00
DevTekVE
274f994fbe Merge remote-tracking branch 'refs/remotes/origin/master-priv' into ui-sp-split 2024-07-24 21:17:32 +02:00
DevTekVE
f55febc855 remove sp_priv from the names
Renamed files by removing sp_priv_ prefix
2024-07-24 21:15:39 +02:00
Adeeb Shihadeh
31036771ee rerun: link to upstream issues 2024-07-24 12:11:20 -07:00
Maxime Desroches
2221ffcf0e ci: use github env for ui preview job name (#33060)
fix this
2024-07-24 11:03:24 -07:00
Hoang Bui
3446941107 CI: remove redundant save cache step (#33052)
remove
2024-07-24 10:36:28 -07:00
Maxime Desroches
d49c5193c3 ci: fix ui preview (#33002)
* use pull_request_target

* env for name
2024-07-24 10:31:27 -07:00
Dean Lee
0fa6745a67 camerad: refactor camera_open() into separate functions for clarity (#33056)
split function
2024-07-24 10:07:10 -07:00
DevTekVE
b8a2efcb52 delting comment 2024-07-24 17:07:07 +00:00
DevTekVE
1ec52f1707 makin a nice commit from github 2024-07-24 18:58:36 +02:00
DevTekVE
ff5e9840bc cleaning up 2024-07-24 18:52:40 +02:00
DevTekVE
598e9b48db New branch from github 2024-07-24 16:46:21 +00:00
Dean Lee
bd8dd65ce0 ui: fix wayland requestActivate warning on device (#33054)
fix wayland requestActivate warning in fullscreen mode
2024-07-24 09:42:31 -07:00
DevTekVE
aa99f3df53 Merge branch 'refs/heads/master-priv' into master-dev-c3
# Conflicts:
#	release/release_files.py
2024-07-24 10:14:34 +02:00
DevTekVE
3683e9eb0a git-crypt blacklist .git-crypt folder on the release_files.py 2024-07-24 10:14:13 +02:00
Maxime Desroches
18c310addf Update op.sh 2024-07-23 23:04:42 -07:00
Maxime Desroches
3382002cd0 Update op.sh 2024-07-23 22:34:21 -07:00
Maxime Desroches
f60dfd4dbb op tool helper (#33053)
* op

* change this

* juggler

* options

* fix

* submodules

* typo

* venv

* clean + install
2024-07-23 21:47:07 -07:00
Jason Wen
c288a7792c super fast take off!!! 2024-07-23 23:30:01 -04:00
Jason Wen
3f25d6f530 disable starting state 2024-07-23 23:28:49 -04:00
Jason Wen
a3e60f92cf only send 0 when fully stopped 2024-07-23 21:53:35 -04:00
Jason Wen
597dadd45b revert 2024-07-23 21:50:50 -04:00
Jason Wen
85f726298c simplify 2024-07-23 21:49:16 -04:00
Jason Wen
80c1aa0f0c only do rate of change in pid mode 2024-07-23 19:04:39 -04:00
Jason Wen
fd48800940 try disengaging for 250 ms 2024-07-23 18:31:33 -04:00
Jason Wen
63b86a80a6 handle stopaccel in long control 2024-07-23 18:18:35 -04:00
Jason Wen
b95933d652 disable fast stop attempt for now 2024-07-23 17:56:22 -04:00
Jason Wen
067bd2b8fd less if/else 2024-07-23 17:55:49 -04:00
Jason Wen
6ab66834f0 adapt to 0 stopAccel 2024-07-23 17:54:47 -04:00
Maxime Desroches
1e9738131d don't lock when installing python packages (#33051)
frozen
2024-07-23 14:52:08 -07:00
Jason Wen
63a6178360 faster stops 2024-07-23 17:14:09 -04:00
Jason Wen
2507ec7abf same vEgoStopping, higher startAccel 2024-07-23 17:12:18 -04:00
Jason Wen
63754678d1 0.1 rate of change all around 2024-07-23 17:01:42 -04:00
Harald Schäfer
3bc1b173d2 Longcontrol: engage into stopped state when needed (#33042)
test stay stopped
2024-07-23 13:55:30 -07:00
Dean Lee
fbbd4ee692 Fix /usr/bin/ld: skipping incompatible /usr/lib/libgcc_s.so.1 warnings (#33047)
fix incompatible lib warning
2024-07-23 11:53:40 -07:00
Adeeb Shihadeh
9b8c1693c9 skip push 2024-07-23 11:41:27 -07:00
Adeeb Shihadeh
29d0bfe1ab skip lfs 2024-07-23 11:32:51 -07:00
Adeeb Shihadeh
ef5d6a0466 jenkins trigger fixups 2024-07-23 11:27:56 -07:00
Adeeb Shihadeh
e7ec1b8ff1 json encoding 2024-07-23 11:14:00 -07:00
Adeeb Shihadeh
d828ac4344 CI: setup triggering jenkins for forks (#33049) 2024-07-23 11:11:31 -07:00
Joseph Wagner
93eb7ee0cc README.md: 275+ cars (#33048)
275+ cars
2024-07-23 10:35:19 -07:00
Dean Lee
fb33366144 Fix FutureWarning "Cython directive 'language_level' not set" (#33046)
fix FutureWarning
2024-07-23 09:27:10 -07:00
Jason Wen
68149b71c4 gracefully when stopping 2024-07-23 11:41:35 -04:00
Jason Wen
b20ce27908 matches stock with 0 m/s^2 at stopping 2024-07-23 11:40:40 -04:00
Jason Wen
c02b3fca53 fast resume: disengage acc enabled for 1 frame, then re-engage 2024-07-23 11:32:42 -04:00
Jason Wen
8ec69008ce lower starAccel 2024-07-23 11:11:12 -04:00
Jason Wen
7560d8db9e do stopping accel in carcontroller 2024-07-23 11:11:00 -04:00
DevTekVE
353b22168f Refactor networking files and include network UI for SunnyPilot
This commit refactors the networking files and includes a SunnyPilot network UI. Changes in existing files result in the removal of some features not required for SunnyPilot while retaining others. For instance, the 'ToggleControl' functionality for Sunnypilot was removed as Sunnypilot does not require this feature. Other changes include adjustments to the network's user interface layout and the removal of unnecessary widgets.

This refactor was necessitated by the need to provide slightly different functionalities between Comma's default UI and the Sunnypilot UI while avoiding code duplication whenever possible.

The newly created files sp_priv_networking.{c,h} include the relevant elements of the network UI specifically modified for SunnyPilot. These modifications are expected to enhance the overall user experience and usability of the network interface in the SunnyPilot UI.

Please note that the 'ngrok' and 'hotspotOnBoot' functionalities have been excluded from Sunnypilot as they are not required in its use case.

The SConscript file has also been updated accordingly to include the required configurations for the new network UI files.
2024-07-23 11:40:10 +02:00
DevTekVE
223cfd2c34 Refactor map helper includes for SunnyPilot
This update refactors the inclusion of map helper files in various source files for compatibility with SunnyPilot. This involves changes like replacing "#include selfdrive/ui/qt/maps/map_helpers.h" with "#include selfdrive/ui/sunnypilot/qt/maps/sp_priv_map_helpers.h". Added logging information in "sp_priv_onroad_home.cc" to debug the creation of map widgets. This refactoring is necessary to support map related functionalities in the SunnyPilot environment.
2024-07-23 11:40:10 +02:00
DevTekVE
09068fc34e cleaning up 2024-07-23 11:40:10 +02:00
DevTekVE
5bcd0a2d3d Refactor onboarding process and terms page in Sunnypilot
The code modifications refactor the onboarding window and terms page in Sunnypilot. It includes moving OnboardingWindow to the protective area, and changing OnboardingWindowSP into a subclass of OnboardingWindow, which enhances code encapsulation and reusability. The expressions for the terms agreement pages are also refined for better readability.

initial onboarding
2024-07-23 11:40:10 +02:00
DevTekVE
47420fda5d Improve HttpRequest class for QT and refactor associated classes
The presented change refactors the HttpRequest class in the QT API for the OpenPilot project. Unused OpenSSL libraries were removed, and the HttpRequest class was modified to improve readability. The HttpRequest::sendRequest method was refactored, and the logic to prepare the network request was extracted to a new method called HttpRequest::prepareRequest. In addition, the user agent retrieval logic was encapsulated within the HttpRequest class.

The RequestRepeater class was similarly refactored. Timer connection and cache processing logic were moved into separate methods for better code organization.

Several other classes that depend on HttpRequest and RequestRepeater were modified to reflect these changes. Handled security-related changes for SunnyPilot. Added a new file `sp_priv_api.cc` for Sunnylink-specific API operations. Removed unnecessary includes and updated SConscript accordingly.
2024-07-23 11:40:09 +02:00
DevTekVE
cc43701808 Refactor code related to Sunnypilot's special utilities
This commit updates various scripts involved in Sunnypilot's special utilities. Modifications primarily include simplification of several functions in 'util.cc', addition of required exports in 'SConscript', and restructuring `getUserAgent`, `getDongleId`, and `getCarNames` methods under `sp_priv_util.h` and `sp_priv_util.cc`. The changes help segregate Sunnypilot specific utility functions, resulting in cleaner and more maintainable code.
2024-07-23 11:40:09 +02:00
DevTekVE
99b0276913 Add conditional compilation for 'sunnypilot' in SConscript
This commit introduces a conditional compilation for 'sunnypilot' within the SConscript file. It also adds a new 'sp_priv_text.cc' file for 'sunnypilot' and performs a significant cleanup on the existing 'text.cc' file, removing unneeded commands. This change helps to customize the build process based on the specific feature flags such as 'sunnypilot'.
2024-07-23 11:40:09 +02:00
Jason Wen
7f06773c26 higher jerk limits 2024-07-22 23:22:33 -04:00
Jason Wen
f641939240 trigger stop earlier 2024-07-22 23:19:58 -04:00
Jason Wen
58004f4fc6 fix pulsing 2024-07-22 21:50:31 -04:00
Jason Wen
0d499b0857 doesn't work well 2024-07-22 21:49:03 -04:00
Jason Wen
8affb2fcad make sure accel_last changes with raw if in pid 2024-07-22 16:56:48 -04:00
Jason Wen
e64d209f54 set speed stuck 2024-07-22 16:54:21 -04:00
Jason Wen
be300df85c should only go up to 3 lol 2024-07-22 16:53:37 -04:00
Jason Wen
e5b19ddc17 only different rate of change if not in pid 2024-07-22 16:46:27 -04:00
Shane Smiskol
bd00a9d800 [bot] Fingerprints: add missing FW versions from new users (#33039)
Export fingerprints
2024-07-22 13:36:53 -07:00
Jason Wen
8191c951c7 oops it's doing it twice 2024-07-22 16:33:25 -04:00
Jason Wen
5e3cf24afe update rate of change properly 2024-07-22 16:25:51 -04:00
Jason Wen
ab72cf0457 handle this in long control 2024-07-22 16:14:45 -04:00
Jason Wen
a654e5bd05 espActive: IMMEDIATE_DISABLE -> SOFT_DISABLE (#33003)
* espActive: `IMMEDIATE_DISABLE` -> `SOFT_DISABLE`

* only stock long

* just soft disable for now

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-07-22 13:09:00 -07:00
Shane Smiskol
8d77cea3a5 [bot] Fingerprints: add missing FW versions from new users (#33038)
Export fingerprints
2024-07-22 13:05:57 -07:00
Hoang Bui
5e0aff92ae tools/Rerun: Add video logging features (#32810)
* working

* multiprocessing

* fix that

* print services

* all services + fix

* less verbose

* start readme

* segment range

* cleanup

* update readme + fix bug in 'all'

* cleanup + update readme

* update readme

* cleanup

* cleanup

* rm frame_iter

* cleanup

* staticmethod

* proc kill

* split files

* fix range with hevc vids

* update reamde + add prompt

* readme

* readme

* readme
2024-07-22 12:05:03 -07:00
commaci-public
1da71f5c3c [bot] Bump submodules (#33036)
bump submodules

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-07-22 11:51:39 -07:00
Maxime Desroches
dcdac84f0c ci: bring back aarch64 (#33017)
* casadi wheel

* ci

* test 312

* test with new aarch64 build

* use release wheels

* assert

* bool

* try this

* maybe

* work

* use final wheel
2024-07-22 11:45:39 -07:00
commaci-public
27faa8f82b [bot] Update Python packages and pre-commit hooks (#33037)
Update Python packages and pre-commit hooks

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-07-22 10:10:39 -07:00
Jason Wen
0c95fe1408 send 2.0 startAccel to both aReqRaw/aReqValue for 0.1 second (2 frames), then pid 2024-07-22 11:46:01 -04:00
Jason Wen
d25d832885 Should run these at 50 Hz 2024-07-22 11:29:42 -04:00
Jason Wen
807873e6a8 fix 2024-07-22 10:12:03 -04:00
DevTekVE
8e5e4a611f Update mousePressEvent behavior in HomeWindowSP
This update stops calling the parent mousePressEvent function in HomeWindowSP due to conflicts with sidebar code. Previous implementation led to undesired sidebar behaviour following a tap beyond the 300px of the left. Added debug logging to provide more context on the behavior of sidebar and screen wake timeout.
2024-07-22 10:22:39 +02:00
Adeeb Shihadeh
cefe00c964 Revert "camerad: add CameraConfig struct for initializing CameraState in constructor (#33034)"
This reverts commit dc886e195f.
2024-07-21 20:36:45 -07:00
Dean Lee
dc886e195f camerad: add CameraConfig struct for initializing CameraState in constructor (#33034)
* Add CameraConfig struct for initializing CameraState in constructor

* Update system/camerad/cameras/camera_qcom2.h

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-07-21 19:19:34 -07:00
Jason Wen
56cf002307 change in 0.1 like stock 2024-07-21 21:43:53 -04:00
Jason Wen
c5af23a010 clear values if not engaged 2024-07-21 17:44:55 -04:00
Jason Wen
b32b216a6b try this out (pls don't die) 2024-07-21 17:41:16 -04:00
Jason Wen
5f2c104ae5 try this out (pls don't die) 2024-07-21 17:40:06 -04:00
Jason Wen
c52b83ce8d Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-07-21 17:16:56 -04:00
Jason Wen
1037bb15a0 oops flipped main 2024-07-21 17:16:48 -04:00
Jason Wen
d923f2fa59 only in stopping state at 0.5 (same as stock), and track accel_last 2024-07-21 16:54:19 -04:00
Jason Wen
9b427c02e1 Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-07-21 16:35:30 -04:00
Jason Wen
73afab7e8d make sure main button is pressed 2024-07-21 16:35:21 -04:00
Jason Wen
1a809cadf5 more fixes 2024-07-21 15:58:19 -04:00
DevTekVE
d164bf2f02 Fixed bug where the toggles were on the parent's instance as opposed to the derived class instance and fixed the index as well 2024-07-21 16:10:54 +02:00
DevTekVE
08abc5c9eb map stuff 2024-07-21 15:35:09 +02:00
DevTekVE
1edda9eadb Merge branch 'refs/heads/master-priv' into ui-sp-split
# Conflicts:
#	selfdrive/ui/sunnypilot/SConscript
2024-07-21 15:19:40 +02:00
DevTekVE
8865950499 Update definitions for compatibility in SunnyPilot UI
The commit introduces several definitions under the SUNNYPILOT flag in different files for compatibility. These changes are meant to make sure controls previously relying on other labels now properly use specifically defined SunnyPilot labels. The update reduces confusion and enhances code clarity.
2024-07-21 15:16:31 +02:00
DevTekVE
b7b813c531 Update UI components with new SP controls
Replaced several different ButtonControl, ToggleControl, and LabelControl instances with their corresponding SP versions across various sections of the UI. This improves the consistency of the user interface and lays the groundwork for further enhancements.
2024-07-21 15:04:53 +02:00
Jason Wen
4aa7d25c9a add them back 2024-07-21 08:56:45 -04:00
Jason Wen
72f34a3335 should be removed 2024-07-21 08:51:06 -04:00
DevTekVE
69a2408c44 Update self-driving UI for SunnyPilot behavior
Modified the self-driving UI components to better accommodate SunnyPilot's custom behavior. Changes include the reduction of EXTRA_UI_STATES, addition of early returns in updates if in SunnyPilot mode, and revisions in UIStateSP update methods. The refactoring also includes rearrangement of car status updates and removal of duplicate parameters acquisition.
2024-07-21 13:44:48 +02:00
DevTekVE
fa668e786c Implemented a window update for SunnyPilot mode
The code was tailored to work with SunnyPilot mode. It includes various changes, such as adding logic to the main window to include SunnyPilot's window when it's active and making changes to the MainWindow constructor for compatibility with SunnyPilot. Additional changes were made to various UI elements to ensure compatibility with the different mode. This update provides a more seamless user experience when switching between the two modes, SunnyPilot and standard.
2024-07-21 12:42:51 +02:00
Jason Wen
025ac23c89 Merge branch 'master-priv' into hkg-can-jerk 2024-07-21 01:18:28 -04:00
Jason Wen
1faaf719d7 Merge branch 'mads-button-event-modern' into master-dev-c3
# Conflicts:
#	selfdrive/car/__init__.py
#	selfdrive/car/chrysler/interface.py
#	selfdrive/car/ford/interface.py
#	selfdrive/car/gm/interface.py
#	selfdrive/car/honda/interface.py
#	selfdrive/car/hyundai/interface.py
#	selfdrive/car/mazda/interface.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/volkswagen/interface.py
2024-07-21 01:16:24 -04:00
Jason Wen
1f69ad630d update logic 2024-07-21 01:13:31 -04:00
Jason Wen
36498041a9 add to cereal at the end 2024-07-21 00:50:00 -04:00
Jason Wen
f5b1b4c73e Revert "encapsulate in method"
This reverts commit 5facba22
2024-07-20 22:40:45 -04:00
Jason Wen
0521f54536 Revert "encapsulate cancel event in method"
This reverts commit 93226506fa.
2024-07-20 22:40:21 -04:00
Jason Wen
38697b1f4c Revert "encapsulate in a class"
This reverts commit b95079bf7a.
2024-07-20 22:40:20 -04:00
Jason Wen
cd09b47936 Revert "pre-commit: Apply mypy and ruff check fixes"
This reverts commit 17b8c6ab4e.
2024-07-20 22:40:20 -04:00
Jason Wen
f62c14c761 Revert "one too much"
This reverts commit b62682f108.
2024-07-20 22:40:19 -04:00
Jason Wen
5e0f59e51d Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-07-20 21:15:57 -04:00
Jason Wen
d51d95426a this is better 2024-07-20 21:15:37 -04:00
Jason Wen
f6066f4076 Merge branch 'master-priv' into mads-hkg-available-fix 2024-07-20 21:10:38 -04:00
Jason Wen
499654cb3b Merge branch 'mads-button-event-modern' into master-dev-c3 2024-07-20 20:54:03 -04:00
Jason Wen
b62682f108 one too much 2024-07-20 20:53:50 -04:00
Jason Wen
0ff60c8adf Merge branch 'hooks-fix' into master-dev-c3 2024-07-20 19:48:40 -04:00
Jason Wen
17b8c6ab4e pre-commit: Apply mypy and ruff check fixes 2024-07-20 19:48:19 -04:00
Jason Wen
7938ed408f Merge branch 'mads-button-event-modern' into master-dev-c3
# Conflicts:
#	selfdrive/car/gm/interface.py
#	selfdrive/car/hyundai/interface.py
2024-07-20 18:56:37 -04:00
jamperezmondragon
1aa467cb00 Spanish Translation Update (#32995)
* Update main_es.ts

* Update main_es.ts

* Update Spanish Translation [(#32995)](https://github.com/commaai/openpilot/pull/32995)
2024-07-20 15:54:51 -07:00
Jason Wen
d18fa774f8 Merge branch 'master-priv' into master-dev-c3 2024-07-20 18:50:06 -04:00
Jason Wen
b95079bf7a encapsulate in a class 2024-07-20 18:48:07 -04:00
Jason Wen
93226506fa encapsulate cancel event in method 2024-07-20 18:32:50 -04:00
Jason Wen
5facba229a encapsulate in method 2024-07-20 18:23:38 -04:00
Jason Wen
fb06ddf85b do this universally 2024-07-20 17:24:11 -04:00
Jason Wen
e923d773f8 Revert "HKG Longitudinal: Jerk limits"
This reverts commit 4821f1bbc8.
2024-07-20 15:14:51 -04:00
Jason Wen
84274e2fc0 Revert "add lower"
This reverts commit dac5e529b6.
2024-07-20 15:14:51 -04:00
Jason Wen
3232d4d01e Revert "more, and comfort band"
This reverts commit 91dadaafd1.
2024-07-20 15:14:50 -04:00
Jason Wen
b4ccc27b2c Merge branch 'master-priv' into mads-button-event-modern 2024-07-20 14:56:06 -04:00
Jason Wen
8b6e403996 Driving Model Selector v5: Bug fixes 2024-07-20 13:06:34 +00:00
Jason Wen
9ea42911e2 Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-07-20 07:40:02 -04:00
Jason Wen
3366bda92a handle states properly 2024-07-20 07:39:46 -04:00
DevTekVE
4cab5097eb Merge branch 'refs/heads/master-priv' into master-dev-c3 2024-07-20 12:01:08 +02:00
DevTekVE
0f2e56a203 [sunnypilot] Forcing SConstruct to assume always sunnypilot developer true until we actually encrypt things 2024-07-20 12:00:52 +02:00
DevTekVE
8735a0a776 Refactor MainWindow and add support for SunnyPilot
The MainWindow constructor now accepts optional parameters to allow for more flexibility in window management. This enabled us to add support for a variant of the UI called SunnyPilot. Separate header and source files `sp_priv_window.h` and `sp_priv_window.cc` have been created for this variant, which has its own logic but inherits from the same MainWindow class.
2024-07-20 11:57:56 +02:00
Shane Smiskol
0907b30d7b ui: fix flipped experimental path acceleration (#33026)
* fix

* clean up

* better comment

* Update selfdrive/ui/qt/onroad/annotated_camera.cc
2024-07-19 15:39:44 -07:00
Jason Wen
ee229c2b70 maps: Use UIStateSP and disconnect 2024-07-19 15:52:19 -04:00
Maxime Desroches
07fcc4825f make pyproject.toml pep508 compliant (#33021)
pep508
2024-07-19 10:19:38 -07:00
Dean Lee
917ea5699f cereal: deprecate FrameData.frameType (#33019)
deprecate FrameData.frameType
2024-07-19 10:14:04 -07:00
DevTekVE
62e8791b1e Update UIState references in Sunnypilot code
Updated to use new UIStateSP class in Sunnypilot's map and onroad functionality. The previous UIState class has been replaced, to fall in line with other changes in the Sunnypilot system, adapting the function arguments and variable assignments accordingly.
2024-07-19 18:51:42 +02:00
DevTekVE
fcd0dc2874 Refactor and enhance UI state and device classes for both base and sunny pilot
Various improvements have been made to UI state and device classes in both base and sunny pilot. This includes better organization of code, addition of new functionalities and removal of unused code and libraries.

Each UI state update now also updates the sockets and the state itself. Conditions for brightness updates in deviceSP's methods are also simplified. This results in a more streamlined update process.

Changes have been made to update the device brightness according to the specified parameters. If the screen is expected to be off, the brightness is set to 0. Otherwise, the brightness is set to a level according to the onroadScreenOffBrightness parameter.

The rest of the changes involve cleaning up redundant code, updating includes, and removing unnecessary typecasts and conversions. The parameters updating are now handled more succinctly.

Overall, the updated code provides a cleaner, more efficient implementation of the UI and devices.
2024-07-19 18:28:05 +02:00
Kacper Rączy
c96dbd5a0b Fix msgq context overrides (#33014)
* Fix msgq context overrides

* Remove unneccesary changes

* add reset_context helper

* Remove redundant import
2024-07-18 20:19:39 -07:00
Adeeb Shihadeh
fd5549bba1 nightly build takes longer than this 2024-07-18 19:26:22 -07:00
Adeeb Shihadeh
560e37cd83 tici: set STM_BOOT0 in reset (#33015)
* tici: reset panda boot0

* ooops
2024-07-18 18:48:54 -07:00
Jaosn Wen
522d42500e maps: split 2024-07-18 11:17:07 -04:00
DevTekVE
ca969e16ce Merge branch 'auto-provisioning-gpg' into master-dev-c3 2024-07-18 16:16:06 +02:00
DevTekVE
f51a6f5462 Add .git-crypt and .venv to the blacklist
This commit updates the release_files.py script to include .git-crypt and .venv in the list of blacklisted files. This ensures that these directories are excluded from the release process, maintaining cleaner and more secure releases.
2024-07-18 16:15:55 +02:00
DevTekVE
a40a8c494b Merge branch 'auto-provisioning-gpg' into master-dev-c3 2024-07-18 16:08:54 +02:00
DevTekVE
f4dac4b462 Add git-crypt unlock attempt in provision script
This update tries to unlock the repository with git-crypt at the start of the provision script. If the unlock is successful, it exits early, confirming access.

Check for /TICI file and install git-crypt if found

Previously, the script would exit if git-crypt was not found. Now, the script checks for the presence of the /TICI file and attempts to install git-crypt automatically if the file is detected. This change helps automate setup on systems where /TICI is present.

Remove GPG key file after import in CI script

Ensure GPG key files are removed after importing to improve security. This change mitigates the risk of accidental exposure of key files in subsequent steps.

Refactor key export path handling

Simplify and improve clarity in the key export process by defining a separate variable for the key installation path. This ensures consistency and reduces potential errors in directory management. Additionally, it automates committing and pushing the new public key to the repository.

Add provision script for git-crypt setup

This script checks for gpg and git-crypt installations and sets up a GPG key for git-crypt. It supports user input for name, email, and passphrase, with options for non-interactive execution and displays help information when requested.

Updated .gitlab-ci.yml to support automation of git-crypt provisioning and improved CI configuration.

This update adds a new stage to the pipeline for automatic provisioning of git-crypt when a change is detected in the git-crypt path. It introduces shared configurations to manage SSH key configurations, Git configurations, and git-crypt unlocking across multiple jobs. Unnecessary repetition of scripts has been minimized through reusability of these shared configurations. This ultimately enhances modularity and readability of the pipeline script.
2024-07-18 16:01:10 +02:00
DevTekVE
cbb30cd8c5 Back to using reference on pipeline 2024-07-18 09:08:52 +02:00
Shane Smiskol
f31ad97e92 qlog_size: decimate rlog option (#33011)
* decimate option

* clean up

* check exists
2024-07-17 21:57:36 -07:00
Shane Smiskol
3c48a6154b increase longitudinalPlan decimation (#33009)
change longitudinalPlan decimation
2024-07-17 20:42:12 -07:00
Jaosn Wen
eb0ced8040 ui: header imports 2024-07-17 23:07:32 -04:00
Jaosn Wen
f6ee3d69f4 ui.h rename (WIP) 2024-07-17 22:53:42 -04:00
Jaosn Wen
fd64c79d35 ui.cc|h: init 2024-07-17 22:48:54 -04:00
Kacper Rączy
7f9cdf8e43 increase cameraOdometry decimation (#33010)
reduce cameraOdometry decimation
2024-07-17 19:31:29 -07:00
Jaosn Wen
b12e82adc7 controls: Keep stock as stock as possible 2024-07-17 20:39:00 -04:00
Jaosn Wen
e07dd2fd9c ReplaceWidget: more safety 2024-07-17 20:23:36 -04:00
Jaosn Wen
124a230296 AbstractControlSP: Inherit from stock AbstractControl 2024-07-17 20:23:24 -04:00
Harald Schäfer
996bced674 livePose log (#32868)
* add livepose

* Formatting

* Add to sevices

* Update locationd to publish livePose

* Remove fields and increase decimation

* Fix field indices

* Remove the line

* Add livePose to pubmaster

* Fix llk decimation

* Update ref commit

* XYZ measurements instead of lists

* Update locationd

* Update ref commit

* Lower the qlog size in test_onroad

* Update lower and upper boundary

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2024-07-17 16:17:23 -07:00
Jaosn Wen
093980b767 SP Controls: Icons not needed for ButtonParamControlSP 2024-07-17 18:52:00 -04:00
Jaosn Wen
47842ff63e Merge branch 'mads-hkg-available-fix' into master-dev-c3 2024-07-17 11:22:18 -04:00
Jaosn Wen
90e829b8a2 MADS: HKG CAN-FD: Disallow cruise buttons to engage when pcmCruiseSpeed is off 2024-07-17 11:22:05 -04:00
Jaosn Wen
fa71f0667c cleanup 2024-07-17 00:59:32 -04:00
Jaosn Wen
cdd614a2fe Merge branch 'hkg-can-jerk' into master-dev-c3 2024-07-17 00:56:43 -04:00
Jaosn Wen
ad01e930c6 widgets: rename 2024-07-17 00:56:17 -04:00
Jaosn Wen
d111bff3cf onroad settings: rename 2024-07-17 00:54:21 -04:00
Jaosn Wen
4be255ab61 onroad settings: rename 2024-07-17 00:51:48 -04:00
Jaosn Wen
6e962afe1a settings: more renaming 2024-07-17 00:46:55 -04:00
Jaosn Wen
1fd5140d29 settings: Rename 2024-07-17 00:22:11 -04:00
Jaosn Wen
a4b57f4178 sunnypilot_main 2024-07-16 23:32:25 -04:00
Jaosn Wen
e99130d808 Merge branch 'master-priv' into master-dev-c3 2024-07-16 23:28:05 -04:00
Jaosn Wen
a05db5dcc7 Merge branch 'master-priv' into master-dev-c3 2024-07-16 23:27:48 -04:00
Jason Wen
faf52492b6 ci: git-crypt: Decrypt prior to building 2024-07-17 03:26:13 +00:00
Jaosn Wen
c0b732081b sunnypilot: Rename all sub panels 2024-07-16 23:22:04 -04:00
Greg Hogan
4b794773b0 use rounded constant instead of hard-coded value for incrementing set speed (#32992)
* use rounded constant instead of hard-coded value for incrementing set speed

* better comment
2024-07-16 18:24:01 -07:00
Jaosn Wen
91dadaafd1 more, and comfort band 2024-07-16 21:11:18 -04:00
Jaosn Wen
dac5e529b6 add lower 2024-07-16 20:55:25 -04:00
Jaosn Wen
4821f1bbc8 HKG Longitudinal: Jerk limits 2024-07-16 20:54:08 -04:00
DevTekVE
a4926ef332 Rename and remove custom abstracts for map support
Refactor class names by renaming AbstractControl to AbstractControlSP_TITLED and LayoutWidget to LayoutWidgetSP. Removed conditional compilation definitions for map support to streamline the code and avoid multiple definition errors.
2024-07-16 23:14:57 +02:00
Jaosn Wen
12151efa78 MadsSettings: rename 2024-07-16 16:01:13 -04:00
Jaosn Wen
9377e9a56c LaneChangeSettings: rename 2024-07-16 15:53:34 -04:00
Jaosn Wen
c001c1e93c CustomOffsetsSettings: rename 2024-07-16 15:39:01 -04:00
Jaosn Wen
1b291893bb qt/network/sunnylink: rename 2024-07-16 15:05:01 -04:00
Jaosn Wen
0ca98a8379 Scons: Split sunnypilot/Sconscript 2024-07-16 00:20:45 -04:00
Jaosn Wen
a9bcc782e0 Scons: Set SUNNYPILOT to CPPDEFINES 2024-07-16 00:07:29 -04:00
Jaosn Wen
dbaa14dec1 revert translations 2024-07-15 23:40:54 -04:00
Jaosn Wen
f04c019843 sync 2024-07-15 23:07:27 -04:00
Jaosn Wen
f672244343 Merge branch 'master-priv' into ui-sp-split
# Conflicts:
#	selfdrive/ui/sunnypilot/SConscript
2024-07-15 22:59:33 -04:00
Jason Wen
62cc0fa0d2 Scons: Build sunnypilot elements with added GPG keys 2024-07-16 02:59:02 +00:00
Shane Smiskol
aa8484093e [bot] Fingerprints: add missing FW versions from new users (#32996)
Export fingerprints
2024-07-15 14:40:24 -07:00
commaci-public
00af33c6ed [bot] Bump submodules (#32989)
bump submodules

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-07-15 12:05:33 -07:00
Dean Lee
c0739cd9ee selfdrive/car/ecu_addrs: prefix internal functions with underscore (#32980)
underscore prefix
2024-07-15 12:05:20 -07:00
Shane Smiskol
d684d8f0f6 Reapply "selfdrive/car: ban imports from external modules" (#32993) (#32994)
* Reapply "selfdrive/car: ban imports from external modules" (#32993)

This reverts commit 35a4a773f1.

* controls will just use controls

* also these

* ignore
2024-07-15 11:59:25 -07:00
Shane Smiskol
35a4a773f1 Revert "selfdrive/car: ban imports from external modules" (#32993)
Revert "selfdrive/car: ban imports from external modules (#32973)"

This reverts commit 83d4623590.
2024-07-15 11:14:04 -07:00
Dean Lee
83d4623590 selfdrive/car: ban imports from external modules (#32973)
* lint import

* Update selfdrive/car/__init__.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-07-15 11:12:24 -07:00
commaci-public
dd2787b7a1 [bot] Update Python packages and pre-commit hooks (#32990)
* Update Python packages and pre-commit hooks

* fix ruff

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-07-15 17:29:57 +00:00
signed-long
c759fe9002 CI: fix ui report directory (#32991)
fix report artifact name
2024-07-15 08:01:51 -07:00
Jaosn Wen
3507e627ac Revert "ui.cc|h: split completely (refactor later) (WIP)"
This reverts commit c4abe230a7.
2024-07-14 23:03:20 -04:00
Jaosn Wen
7a2778f3f1 Reapply "Only when building map"
This reverts commit ec0c2edd66.
2024-07-14 23:01:45 -04:00
Jaosn Wen
1386d1215b Reapply "SP Controls: Fix duplicate classes"
This reverts commit 142db222ce.
2024-07-14 23:01:44 -04:00
Jaosn Wen
134f585482 Revert "Remove stock classes from compiling"
This reverts commit 4e1ef0dca7.
2024-07-14 23:01:44 -04:00
Jaosn Wen
4e1ef0dca7 Remove stock classes from compiling 2024-07-14 22:38:27 -04:00
Jaosn Wen
142db222ce Revert "SP Controls: Fix duplicate classes"
This reverts commit 02b3ea4917.
2024-07-14 22:35:37 -04:00
Jaosn Wen
ec0c2edd66 Revert "Only when building map"
This reverts commit 5c1c833223.
2024-07-14 22:35:37 -04:00
Jaosn Wen
c4abe230a7 ui.cc|h: split completely (refactor later) (WIP) 2024-07-14 22:35:19 -04:00
Jaosn Wen
7ddc18d08f DeveloperUi: Add comments 2024-07-14 22:01:37 -04:00
Jaosn Wen
7a58f3026d Dev UI: rename 2024-07-14 21:52:43 -04:00
Jaosn Wen
08449ddb77 DeveloperUi: Split 2024-07-14 21:44:05 -04:00
Jaosn Wen
d367b346a0 bump panda lock fix 2024-07-14 19:09:17 -04:00
Jason Wen
5c1c833223 Only when building map 2024-07-14 19:07:11 -04:00
Jason Wen
02b3ea4917 SP Controls: Fix duplicate classes 2024-07-14 18:56:55 -04:00
Adeeb Shihadeh
cbee4421da bump panda 2024-07-14 15:56:44 -07:00
Jason Wen
f2c500249c Sidebar: missing import 2024-07-14 16:48:26 -04:00
DevTekVE
e02c4a60f9 Rename instances of 'openpilot' to 'sunnypilot' in settings
Updated references in the settings UI to replace 'openpilot' with 'sunnypilot' for consistency with branding. This includes various descriptions and warnings related to longitudinal control and driver monitoring.
2024-07-14 22:40:06 +02:00
DevTekVE
dc6c20ba97 Add separate Sidebar implementation for SunnyPilot
The file structure of SidebarSP has been revamped. A separate SidebarSP class has been created instead of overriding pieces of Sidebar. The implementation of SidebarSP has been encapsulated in the new SidebarSP class files (sp_priv_sidebar.cc and sp_priv_sidebar.h). The code integrity of Sidebar and its usages in offroad_home.h and sp_priv_home.h have been maintained. This should increase the overall modularity of the code.
2024-07-14 22:37:25 +02:00
DevTekVE
66be7afbdb Apply 3 suggestion(s) to 2 file(s) 2024-07-14 19:24:40 +00:00
DevTekVE
ba1c47b320 Cleaning up 2024-07-14 21:18:53 +02:00
DevTekVE
4643d88af6 Refactor settings to improve layout and functionality
This commit introduces several layout and functionality changes in the settings. It extracts various functionalities into separate methods, including those related to on-road settings, and removes redundant panel definitions. The changes aim to make the settings more modular, manageable, and user-friendly. Furthermore, a new file for device panel settings is added to provide a more structured way of managing device-related settings. Please note that some functionalities, such as the fleet manager pin, file system watcher, and off-road button, have been moved and included in the device panel settings. These changes do not affect the functioning of the application but provide a more maintainable code structure.
2024-07-14 21:13:28 +02:00
DevTekVE
d792be8999 Refactor ListWidgetSP functions from macros to inline methods
Consolidate multiple macro-defined functions into inline methods within ListWidgetSP to improve readability and maintainability. This change ensures that the widget functionalities are more straightforward and easier to debug. Adjust related headers and implementation files accordingly.
2024-07-14 19:48:17 +02:00
DevTekVE
f56a30d6ce Refactor ListWidgetSP functions from macros to inline methods
Consolidate multiple macro-defined functions into inline methods within ListWidgetSP to improve readability and maintainability. This change ensures that the widget functionalities are more straightforward and easier to debug. Adjust related headers and implementation files accordingly.
2024-07-14 16:40:18 +02:00
pantew869
7ed3f62f0c Bump submodules that used numpy-stubs in pre-commit config (#32983)
update submodules that used numpy-stubs in pre-commit config
2024-07-14 07:35:24 -07:00
DevTekVE
7030dc02ce Add handling for SUNNYPILOT in Qt settings
Introduced the RETURN_IF_SUNNYPILOT macro to handle conditional returns in the settings code. This ensures that certain blocks of code are bypassed when SUNNYPILOT is defined, improving modularity and reducing preprocessor directives.
2024-07-14 16:04:48 +02:00
DevTekVE
80ecce9d81 Remove "Driving Model" label and adjust item management
Eliminated the "Driving Model" label from SoftwarePanel and refactored item management to improve code clarity and functionality. Updated macro naming and added new list widget functions for better handling of UI elements.
2024-07-14 15:43:21 +02:00
DevTekVE
ddee284733 Removing maps from stock's toggles
I believe this maps thing is a leftover we want to keep only on sp priv
2024-07-14 15:25:32 +02:00
DevTekVE
efcd86529b Refactor: Move replaceWidget to sunnypilot_main.h
Moved the replaceWidget function to sunnypilot_main.h to allow for better code organization and reusability. Commented out the previous static declaration in sp_priv_offroad_home.h and updated replaceWidget calls to ReplaceWidget in sp_priv_offroad_home.cc.
2024-07-14 15:24:39 +02:00
DevTekVE
beef2f0be9 Refactor SunnyPilot preprocessor directives in UI code
This commit simplifies the conditional preprocessor directives related to SunnyPilot in various parts of the UI code. The previous use of #ifdef SUNNYPILOT has been consolidated to make the code cleaner and easier to read. Also, some unused code blocks have been removed. This refactoring simplifies the management of different configuration setups.
2024-07-14 11:43:10 +02:00
Jason Wen
e3939247a7 Nav stock icons 2024-07-14 04:19:38 -04:00
Jason Wen
b8d26259c4 Toggle - ToggleSP, TESLA TOGGLE DESIGN!!! 2024-07-14 04:08:28 -04:00
Jason Wen
6fb4925b57 ScrollView - ScrollViewSP 2024-07-14 00:24:46 -04:00
Jason Wen
ed862f012b ListWidget - ListWidgetSP 2024-07-14 00:08:34 -04:00
Jason Wen
7a1ff6cd01 SubPanelButton, PanelBackButton 2024-07-13 23:48:49 -04:00
Jason Wen
0ed13466f9 AbstractControl: Thicker texts 2024-07-13 23:45:11 -04:00
Jason Wen
2e7942ef16 AbstractControlSP, ButtonParamControlSP, OptionalControlSP 2024-07-13 23:35:38 -04:00
Jason Wen
d0ec155a9d ElidedLabel, AbstractControl, ButtonControl 2024-07-13 23:14:49 -04:00
Jason Wen
a3635f567a horizontal_line 2024-07-13 22:13:19 -04:00
Jason Wen
ff6ff674c6 ParamControl - ParamControlSP 2024-07-13 21:08:43 -04:00
Jason Wen
71a5e80204 TogglesPanel - TogglesPanelSP 2024-07-13 20:33:20 -04:00
Jason Wen
058f7aa29d SettingsWindow - SettingsWindowSP 2024-07-13 19:46:35 -04:00
Jason Wen
35faa3ba95 fix define 2024-07-13 17:03:50 -04:00
DevTekVE
3c5070ce4a Moving some of elements out first and then I will restructure them to not duplicate code 2024-07-13 20:48:03 +00:00
Adeeb Shihadeh
e7388c3743 remove pygame (#32981) 2024-07-13 13:41:38 -07:00
savojovic
75b07c042f Replace ui.py with a Rerun visualizer (#32850)
* Replace ui.py with rerun

* Visualizing radarpoints

* Visualizing all points

* Code clean-up

* Merging matrices into one

* Removing pygame depndency

* Replacing ui.py with rp_visualization.py

* Minor fix, changing color names

* Update README.md
2024-07-13 13:36:21 -07:00
Jason Wen
3731794cdf Merge branch 'model-v5-fix' into master-dev-c3 2024-07-13 11:57:44 -04:00
Jason Wen
5c90b31f72 Driving Model Selector v5: Bug fixes 2024-07-13 11:57:06 -04:00
Jason Wen
73994d4bb1 Revert "Driving Model Selector v5: Bug fixes and revert to param checks"
This reverts commit 03fd6050f7.
2024-07-13 11:52:44 -04:00
Jason Wen
1b419974b0 Revert "fix types"
This reverts commit 3cdbde6dbe.
2024-07-13 11:52:44 -04:00
Dean Lee
3c3fdb8428 CarParams: set no traversal limit (#32929)
* Increase traversal_limit_in_words to Fix Traversal Limit Errors

* just use log_from_bytes

* come on pycharm

* no free lunch

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
(cherry picked from commit 12d729a0a0)
2024-07-13 11:51:44 -04:00
Jason Wen
3cdbde6dbe fix types 2024-07-13 11:45:36 -04:00
Jason Wen
03fd6050f7 Driving Model Selector v5: Bug fixes and revert to param checks 2024-07-13 11:38:48 -04:00
DevTekVE
2b3b8d1df3 Merge branch 'master-priv' into ui-sp-split 2024-07-13 09:41:17 +02:00
DevTekVE
c170976547 Revert "nuke dev's temporarily"
This reverts commit 19c1c99a28.
2024-07-13 09:36:05 +02:00
DevTekVE
35d8d7b3f7 Processor definition check for __APPLE__ has a typo on replay (#32930)
(cherry picked from commit 3c74ad145e)
2024-07-13 09:26:32 +02:00
Jason Wen
19c1c99a28 nuke dev's temporarily 2024-07-13 02:56:00 -04:00
DevTekVE
f99799701f Remove the sunnypilot on clion scripts because code will default properly 2024-07-13 08:54:49 +02:00
DevTekVE
c7932f8b73 Refactor GPG key check and update SCons build tools.
Converted GPG key check logic into a more modular function `is_sunnypilot_developer` for better readability and maintainability. Updated `External Tools.xml` to include `--sunnypilot` flag in SCons build commands.
2024-07-13 08:33:20 +02:00
Jason Wen
ec6f86efbf new way to detect added gpg keys 2024-07-13 02:21:30 -04:00
DevTekVE
54ffb8b1fe Enable conditional compilation for SUNNYPILOT
Add conditional definition for SUNNYPILOT in SConscript. This allows code to be compiled differently based on the presence of the SUNNYPILOT environment variable.
2024-07-13 07:34:40 +02:00
Jason Wen
2ac8bb6c1d test 2024-07-13 00:13:13 -04:00
Jason Wen
43a38ed039 set constant with added gpg key id 2024-07-12 23:35:05 -04:00
Jason Wen
e7ea608c45 Split all SP files out 2024-07-12 22:19:42 -04:00
James
953e5667b1 Re-use "is_metric" declaration (#32948) 2024-07-12 17:07:57 -07:00
Andrei Radulescu
50f55684a2 Rewrite git history update (#32955)
Rewrite git history final touches
2024-07-12 16:44:52 -07:00
eFini
0f34e6e3b6 PC: added missing hexdump package for selfdrive/debug/dump.py (#32959)
added missing hexdump package
2024-07-12 16:44:22 -07:00
Dean Lee
32a5cfd84c cabana: update README (#32965)
improve README
2024-07-12 16:42:45 -07:00
Dean Lee
f1416f337c replay: update README (#32966)
update README
2024-07-12 16:42:10 -07:00
Andrei Radulescu
122a7f2f0f start for curl openpilot.comma.ai | bash (#32967)
* initial setup.sh for curl|bash

* --single-branch for faster pull and some final instructions

* fix git lfs pull
2024-07-12 16:32:04 -07:00
Dean Lee
2156870df9 pandad: remove return statement in constructor (#32975)
remove return
2024-07-12 16:20:49 -07:00
Jason Wen
bc1aad6f6a git-crypt: add collaborators 2024-07-12 21:36:28 +00:00
Dean Lee
e3e54fb28b cabana: fix wrong file path handling for recent files menu (#32969)
fix lambda
2024-07-12 10:38:07 -07:00
Jason Wen
c69d886c20 Merge branch 'mads-button-event-modern' into master-dev-c3
# Conflicts:
#	selfdrive/car/ford/carstate.py
#	selfdrive/car/ford/interface.py
#	selfdrive/car/ford/values.py
#	selfdrive/car/gm/interface.py
2024-07-11 23:54:03 -04:00
Jason Wen
6b431bde57 Merge branch 'slc-long-only' into master-dev-c3 2024-07-11 23:52:43 -04:00
Jason Wen
11567ed7dc Empty button events at start of loop 2024-07-11 23:30:17 -04:00
Jason Wen
a44677bde3 Toyota: Use modern button events 2024-07-11 23:24:08 -04:00
Jason Wen
56119eb66e Subaru: Use modern button events 2024-07-11 23:23:43 -04:00
Jason Wen
25fdd735c2 Hyundai: Use modern button events 2024-07-11 23:23:21 -04:00
Jason Wen
4e9ab2abaf Honda: Use modern button events 2024-07-11 23:22:50 -04:00
Jason Wen
207b4473c7 GM: Use modern button events 2024-07-11 23:22:25 -04:00
Jason Wen
a3e2661ca5 Nissan: Use modern button events 2024-07-11 23:20:19 -04:00
Jason Wen
29bc69be5b Mazda: Use modern button events 2024-07-11 23:15:34 -04:00
Jason Wen
dbc086744b Ford: Use modern button events 2024-07-11 23:06:18 -04:00
Jason Wen
e4175e636a Volkswagen: Use modern button events 2024-07-11 22:55:15 -04:00
Jason Wen
120699df97 Chrysler: Use modern button events 2024-07-11 22:54:09 -04:00
Jason Wen
b1d1cb33dc Merge branch 'SP-138-cslc-gm' into master-dev-c3 2024-07-11 22:37:17 -04:00
Jason Wen
692e6783e4 typo 2024-07-11 22:37:04 -04:00
Jason Wen
b896f1b6ff Merge branch 'SP-138-cslc-gm' into master-dev-c3 2024-07-11 21:47:26 -04:00
Jason Wen
4a67489e33 this might have been blocking engagement 2024-07-11 21:47:14 -04:00
Shane Smiskol
71dd1e2ff6 long planner: formatting 2024-07-11 14:06:51 -07:00
Shane Smiskol
11db7b683b hardwared: don't ignore quick ignition cycles (#32938)
* check on either edge

* clean up

* clean up

* good thing I tested this first :P
2024-07-11 02:49:42 -07:00
Jason Wen
23e0b94b6f Merge branch 'SP-138-cslc-gm' into master-dev-c3
# Conflicts:
#	panda
2024-07-10 22:20:21 -04:00
Jason Wen
f947397d84 try this 2024-07-10 22:19:53 -04:00
Jason Wen
bc23432dd5 need unpressed 2024-07-10 21:24:45 -04:00
Jason Wen
a0f96588ea need unpressed 2024-07-10 21:24:08 -04:00
Jason Wen
5d1263718f Merge branch 'SP-138-cslc-gm' into master-dev-c3
# Conflicts:
#	panda
2024-07-10 21:18:23 -04:00
Jason Wen
f9159301b3 add logging 2024-07-10 21:11:02 -04:00
Jason Wen
518ef952cc Merge branch 'master-priv' into SP-138-cslc-gm
# Conflicts:
#	panda
2024-07-10 20:59:30 -04:00
Jason Wen
4e6fd4ee81 try lowering it for to 20 due to exceeded message traversal limit 2024-07-10 20:37:58 -04:00
Shane Smiskol
b247c3caaa torqued: check steer override to current time (#32963)
* lat active/steer override: check up to now

* lint

* Update ref_commit
2024-07-10 17:25:39 -07:00
Jason Young
e36ff90996 Improved PlotJuggler layout for lateral accel torque controller (#32949)
* improved PlotJuggler layout for lat accel controller

* help estimate steerActuatorDelay

* update Actuator Performance, add Vehicle Dynamics

* disable Y limits on actuator performance because sunny

* apply delay estimation feedback from harald

* gc extra custom series that PJ copied in

* label wordsmithing
2024-07-10 15:10:42 -07:00
Dean Lee
c17c34187b cabana: simplify stream management and remove problematic autosave feature (#32945)
simplify code and remove problematic code
2024-07-10 15:10:24 -07:00
Jason Wen
e0ee086a9c Merge remote-tracking branch 'sunnyhaibin/openpilot-special/master-priv' into master-dev-c3 2024-07-10 13:02:17 -04:00
Jason Wen
c80c78e8d7 Merge branch 'sync-remove-ubuntu-focal' into master-dev-c3 2024-07-10 11:27:58 -04:00
Jason Wen
eb8b04cce8 Merge branch 'SP-168-chevron-time-to-lead' into master-dev-c3 2024-07-10 11:27:35 -04:00
Jason Wen
f20973d4cf cleaner 2024-07-10 11:27:07 -04:00
Shane Smiskol
fbc53a24a3 torqued: clean up (#32958)
* formatting

* function signatures didn't match

* function signatures didn't match

* filtered and raw mean something totally different when it comes to params

filtered and raw mean something totally different when it comes to params

* cmt

* probably better for organization

* add todo

* STASH

* revert some stuff

* clean up

* oof
2024-07-09 22:26:58 -07:00
Shane Smiskol
5efdaf2026 torqued: option to keep track of all points (#32957)
* how about this

* here

* rename

* revert

* revert this too

* can do this

* ugh inside TorqueBuckets it implicitly limits steer torque to 50%!!!!!!!!

* fix

* move up
2024-07-09 22:21:50 -07:00
Shane Smiskol
0c58e35b6c format torqued.py 2024-07-09 21:16:36 -07:00
Jason Wen
6c481e5a07 more 2024-07-09 23:55:22 -04:00
Jason Wen
ebce2d15cb sync 2024-07-09 23:49:48 -04:00
Jason Wen
279c5ab29e Merge branch 'master-priv' into SP-168-chevron-time-to-lead
# Conflicts:
#	selfdrive/ui/qt/onroad/annotated_camera.cc
2024-07-09 23:05:47 -04:00
Jason Wen
a64b17b680 fix division by 0 and negative values 2024-07-09 22:16:30 -04:00
Maxime Desroches
133f25eecb switch cereal to pytest (#32950)
pytest
2024-07-09 22:01:16 +00:00
Shane Smiskol
35df0a4fda torqued: rename lat_active (#32942)
* Update torqued.py

* lint

* not necessary
2024-07-08 22:53:59 -07:00
Andrei Radulescu
481e5b28bd Rewrite git history (#31562)
* bfg

* filter repo is the new shit

* down to 27M

* move big files to lfs; remove external and phonelibs

* wip - rebase devel; don't delete external and phonelibs anymore

* wip - rebase devel hacks

* wip - rebase devel updates

* wip - rebase updates; lfs updates

* cleaned unused scripts

* wip - lfs fixes

* bfg with rebase with correct dates

* bfg script with cherry-pick method

* latest git-filter-repo analysis

* latest git-filter-repo 'before' analysis

* new lfs import

* latest git-filter-repo analysis

* lfs update; renamed rebase repos

* renamed scripts

* different tmp folders for rewrite scripts; lfs update

* gitattributes after lfs import

* tag-commit-map file with old tags pointing to old commits

* new tags

* final touches

* squash setup commits; cherry-pick validation; reverted to commaai remote

* removed rebase version

* 0.9.7 tag in tag-commit-map

* removed unused openpilot-release-archive

* fixed archive of old history because of 2 GB limit

* archive of old history push master first

* fix tags being deleted

* cleaning and more logs

* rewrite other branches with master history

* Former-commit-id

* updates to previous commits

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-07-09 05:08:38 +00:00
signed-long
6745c66352 Update ci weekly report summary (#32911)
* update ci weekly report summary

* don't add skipped jobs to report

* uncomment job condition

* use jinja template

* add run number to failure links

* add run number to failure links

* Log for run #<num>

* use list

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2024-07-09 03:07:34 +00:00
Adeeb Shihadeh
8c6c6e435f site -> docs 2024-07-08 17:05:42 -07:00
Adeeb Shihadeh
f6189568ea mvp of new docs.comma.ai (#32926)
* ssh docs

* strict

* need an index

* push to prod
2024-07-08 16:55:16 -07:00
Hoang Bui
15d3397ec6 CI: Compile openpilot on macOS (#32909)
* working

* cache

* bring back
2024-07-08 23:42:26 +00:00
JaReal07
4014109666 Update fingerprints.py Corolla 2024 (South America) (#32864)
Add Corolla Sedan 2024 (South America), new 'engine' and 'eps' fwversion
2024-07-08 14:58:22 -07:00
dany7915
67038d5b59 Fingerprint: Kia K5 HEV 2020 (#32875)
fingerprint added
2024-07-08 14:54:11 -07:00
Dean Lee
36815cc6d5 cabana: bug fixes and improvements (#32934)
bug fixes and improvements
2024-07-08 14:50:31 -07:00
Shane Smiskol
31ff8eda9c Chrysler Pacifica Hybrid: combine 2017 and 2018 (#32937)
* Chrysler Pacifica: combine 2017 and 2018 hybrids

torque params are not accurate for either (might be ~1.5 for both checking a few dongles)

* remove duplicate fingerprints

* combine docs lines

fix
2024-07-08 14:45:01 -07:00
Shane Smiskol
fa2f7a4dd4 [bot] Fingerprints: add missing FW versions from new users (#32936)
Export fingerprints
2024-07-08 14:16:44 -07:00
Dean Lee
12d729a0a0 CarParams: set no traversal limit (#32929)
* Increase traversal_limit_in_words to Fix Traversal Limit Errors

* just use log_from_bytes

* come on pycharm

* no free lunch

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-07-08 13:50:31 -07:00
Maxime Desroches
76686e1976 docs: only push on master (#32935)
only on master
2024-07-08 19:14:32 +00:00
commaci-public
012eb07466 [bot] Update Python packages and pre-commit hooks (#32931)
Update Python packages and pre-commit hooks

Co-authored-by: Vehicle Researcher <user@comma.ai>
2024-07-08 19:10:53 +00:00
Shane Smiskol
4a696984f1 [bot] Fingerprints: add missing FW versions from CAN fingerprinting cars (#32932)
Export fingerprints
2024-07-08 10:58:08 -07:00
DevTekVE
3c74ad145e Processor definition check for __APPLE__ has a typo on replay (#32930) 2024-07-08 17:10:26 +00:00
Jason Wen
7d6463e24f Merge branch 'master-priv' into SP-168-chevron-time-to-lead 2024-07-08 10:20:03 -04:00
Jason Wen
4c650da8e4 Merge branch 'SP-168-chevron-time-to-lead' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-07-08 10:18:23 -04:00
Jason Wen
d9bc6fe102 Merge branch 'nnlc-lateral-jerk' into master-dev-c3 2024-07-08 09:22:08 -04:00
Jason Wen
fc1a294d5e revert !729 for now till it's fixed and compiled 2024-07-07 23:33:05 -04:00
Jason Wen
8e256ee6c5 Add toggles and update CHANGELOGS.md 2024-07-07 23:11:18 -04:00
Jason Wen
bdb3c0a09c Update CHANGELOGS.md 2024-07-07 22:23:46 -04:00
Jason Wen
a6a105dc20 Merge branch 'master-priv' into nnlc-lateral-jerk 2024-07-07 22:22:12 -04:00
Jason Wen
127ba8f859 ui: Lead car chevron: Time to Lead Car 2024-07-07 22:17:39 -04:00
Adeeb Shihadeh
241fb902af publish new docs (#32922)
* push new docs

* drop the new, just docs

* cleanup
2024-07-07 19:13:48 -07:00
Jason Wen
bbef8d5764 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	panda
2024-07-07 20:39:24 -04:00
Alexandre Nobuharu Sato
4445fa31f5 fix "telsa" typo on labeler.yaml (#32924) 2024-07-07 10:35:02 -07:00
DevTekVE
b04db4ed33 Merge branch 'disable-log-upload' into master-dev-c3 2024-07-06 20:40:49 +02:00
DevTekVE
d6600c32aa disable log upload handler 2024-07-06 20:04:09 +02:00
DevTekVE
4732848117 Merge branch 'launch-setup-from-failure' into master-dev-c3 2024-07-05 12:11:27 +02:00
DevTekVE
303d244966 Refactor setup command sequence by removing redundant kill operation.
The `kill_op` command to stop the `comma` service was removed as it is redundant. This change simplifies the `cmd` string construction and ensures the setup process starts with deleting `continue.sh` and restarting the `comma` service.

don't know what diff it makes MinimumExpanding vs Expanding so I am leaving it as I found it and some formatting on the code

Improved user interface of application

The user interface in selfdrive/ui/qt/text.cc was significantly enhanced. This was accomplished by streamlining the QVBoxLayout for displaying text and the QGridLayout for displaying buttons. The QPushButton were updated to handle actions for updating and reinstalling. Additional formatting was also added to improve the visibility of the buttons. Furthermore, unnecessary QWidget import was removed and replaced with QLabel. The QLabel was set to clear before setting newText, creating a smoother update of application status messages. Lastly, QApplication::exec() was used in place of a.exec() to cater for the button states on different platforms and handle the application's exit.
2024-07-05 12:11:08 +02:00
Jason Wen
a4ef912bed Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	selfdrive/ui/qt/text.cc
2024-07-03 00:41:46 -04:00
Jason Wen
dca98f0cfe Merge branch 'honda-pedal-long-disengage' into master-dev-c3 2024-07-02 17:23:44 -04:00
Jason Wen
8525cf6333 Revert "MADS: Honda Nidec: Fix enforce cruise cancel with stock PCM"
This reverts commit c313af5c
2024-07-02 17:23:15 -04:00
Jason Wen
d43028df41 Merge branch 'ui-torque-fric-half' into master-dev-c3 2024-07-02 12:05:53 -04:00
Jason Wen
a86ce23f4c higher 2024-07-02 12:05:43 -04:00
Jason Wen
090c97b2fc nope 2024-07-02 12:05:13 -04:00
Jason Wen
67d7df43ad Merge branch 'toyota-lowspeed-override' into master-dev-c3 2024-07-02 12:04:53 -04:00
Jason Wen
fdf99e014b Merge branch 'ui-torque-fric-half' into master-dev-c3 2024-07-02 12:02:27 -04:00
Jason Wen
9af616605b ui: Torque Lateral Control: Update every 0.005 2024-07-02 12:01:58 -04:00
Jason Wen
5d097fa5de rename to PCM Speed Override 2024-07-02 10:57:40 -04:00
Jason Wen
59d960addf housekeeping 2024-07-02 10:46:32 -04:00
Jason Wen
67dcb68f00 Merge branch 'master-priv' into toyota-lowspeed-override
# Conflicts:
#	common/params.cc
2024-07-02 01:15:27 -04:00
Jason Wen
191fe69d0c extra 2024-07-02 01:09:39 -04:00
Jason Wen
80d03921a7 Merge branch 'ui-onroad-settings-panel-adjust' into master-dev-c3 2024-07-02 01:08:31 -04:00
Jason Wen
a5d1e13b48 Update CHANGELOGS.md 2024-07-02 00:53:27 -04:00
Jason Wen
c5e6342630 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	cereal/custom.capnp
#	common/params.cc
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/lib/longitudinal_planner.py
#	selfdrive/controls/lib/sunnypilot/accel_controller.py
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/qt/offroad/settings.h
#	selfdrive/ui/ui.h
2024-07-02 00:51:54 -04:00
Brian Brown
f23982d748 more english 2024-07-02 00:17:05 +00:00
Jason Wen
2a3a533d2b Merge branch 'dynamic_personality' into master-dev-c3
# Conflicts:
#	cereal/custom.capnp
#	selfdrive/controls/controlsd.py
2024-07-01 16:24:36 -04:00
Jason Wen
a268ba67c2 Merge branch 'tss2-long-tuning' into master-dev-c3 2024-07-01 16:23:56 -04:00
Jason Wen
fbc556bc81 Merge branch 'accel-profile' into master-dev-c3 2024-07-01 16:23:52 -04:00
Jason Wen
a7bcfcab87 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
#	panda
2024-07-01 16:23:47 -04:00
Jason Wen
9ee63438ef update tuning 2024-07-01 16:23:06 -04:00
Jason Wen
f0d2fd4649 Merge branch 'master-priv' into dynamic_personality 2024-07-01 16:22:24 -04:00
Jason Wen
c97fa56bd3 Toyota Longitudinal: New TSS2 Tuning 2024-07-01 16:22:12 -04:00
Jason Wen
69ae0445b7 update tuning 2024-07-01 16:20:37 -04:00
Jason Wen
750f9c8233 Merge branch 'master-priv' into accel-profile 2024-07-01 16:18:04 -04:00
Jason Wen
b81cdccb6c Merge branch 'master-priv' into dynamic_personality
# Conflicts:
#	selfdrive/controls/lib/longitudinal_planner.py
2024-07-01 15:47:34 -04:00
Jason Wen
36c89ce666 Fix 2024-07-01 15:47:18 -04:00
Jason Wen
faddc5a93b Merge branch 'master-priv' into dynamic_personality 2024-07-01 15:35:31 -04:00
Jason Wen
4de6fac0d4 in plannerd 2024-07-01 15:35:27 -04:00
Jason Wen
0ae9eb274c in plannerd 2024-07-01 15:34:35 -04:00
Jason Wen
e4ae935aab Merge branch 'master-priv' into accel-profile 2024-07-01 15:33:09 -04:00
Jason Wen
6743cdf5f2 Merge branch 'master-priv' into accel-profile 2024-07-01 15:09:28 -04:00
Jason Wen
4bf4f627bd use cereal 2024-07-01 15:05:50 -04:00
Jason Wen
dd2334290e Merge branch 'master-priv' into dynamic_personality 2024-07-01 14:55:08 -04:00
Brian Brown
d7545ddeb7 fix space 2024-07-01 18:00:23 +00:00
Brian Brown
c9ac0993b7 Update CHANGELOGS.md 2024-07-01 17:59:11 +00:00
Jason Wen
6afa49be91 use custom cereal 2024-07-01 12:31:48 -04:00
Jason Wen
7a1533eae0 ui change 2024-07-01 12:06:15 -04:00
Jason Wen
13475140ec inline 2024-07-01 12:01:06 -04:00
Jason Wen
7d751da1b8 enforce type hint 2024-07-01 11:58:11 -04:00
Jason Wen
6e6de6742e some refactors 2024-07-01 11:51:01 -04:00
Jason Wen
6098dd300a formatting 2024-07-01 11:21:09 -04:00
Jason Wen
1051580e63 Merge branch 'master-priv' into accel-profile 2024-07-01 11:14:51 -04:00
Jason Wen
4ffd7dc4d5 Merge branch 'kona-ev-non-scc-2019-port' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-07-01 09:38:52 -04:00
Jason Wen
e731e330a9 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	panda
2024-07-01 09:38:41 -04:00
Jason Wen
c27efd01d6 Hyundai: Car Port for Kona Electric Non-SCC 2019 2024-07-01 09:37:29 -04:00
Jason Wen
5f415b726b Merge branch 'master-priv' into toyota-lowspeed-override 2024-06-30 22:28:28 -04:00
rav4kumar
f809fcf0aa dynamic personality 2024-06-29 12:11:07 -07:00
rav4kumar
972951de3e accel controller 2024-06-29 11:52:15 -07:00
rav4kumar
342effe5dd toyota low speed override 2024-06-29 11:02:21 -07:00
Brian Brown
91b39629fe add dongle id for taco testing 2024-06-29 15:20:16 +00:00
Jason Wen
33de3dfae3 OP long on keep alive 2024-06-29 10:44:33 -04:00
DevTekVE
8094a9cd01 Merge branch 'sunnylink-hotfix-boot' into master-dev-c3 2024-06-29 01:10:22 +02:00
DevTekVE
0668513d13 Remove unused SunnylinkApi and improve error handling
Removed the SunnylinkApi call from the registration process as it was no longer in use. Improved error logging by adding directory checks and more descriptive exception handling in the sunnylink API.
2024-06-29 01:04:27 +02:00
Jason Wen
00f9b1a19f Merge branch 'master-priv-ford' into master-dev-c3 2024-06-27 00:37:09 -04:00
Jason Wen
0341490541 Merge branch 'master-priv' into master-priv-ford 2024-06-27 00:35:51 -04:00
Jason Wen
bb9d946b28 Merge branch 'SP-159-map-settings-dm-overlap' into master-dev-c3 2024-06-27 00:19:58 -04:00
Jason Wen
ecdf0bdecc confirmed to work 2024-06-27 00:19:41 -04:00
Jason Wen
a3e20c8d6d Merge branch 'master-priv-ford' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
#	panda
2024-06-25 13:44:19 -04:00
Jason Wen
9883e7742f Merge branch 'SP-159-map-settings-dm-overlap' into master-dev-c3 2024-06-25 13:43:41 -04:00
Jason Wen
cb23843162 no more deadzone 2024-06-25 13:42:38 -04:00
Jason Wen
896fc5c6a4 Merge branch 'master-priv' into master-priv-ford
# Conflicts:
#	CHANGELOGS.md
#	panda
2024-06-25 13:42:09 -04:00
Jason Wen
b91a134b63 Merge branch 'master-priv' into SP-159-map-settings-dm-overlap
# Conflicts:
#	selfdrive/ui/qt/onroad/annotated_camera.cc
2024-06-24 19:05:48 -04:00
Jason Wen
cdc2ffceff Merge branch 'master-priv' into SP-159-map-settings-dm-overlap 2024-06-24 18:24:19 -04:00
Jason Wen
ff65d37cc7 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	opendbc
2024-06-24 18:20:40 -04:00
Jason Wen
00fd7515b5 Merge branch 'SP-163-mads-disengage-on-accel' into master-dev-c3 2024-06-24 17:57:51 -04:00
Jason Wen
a1b6b467a6 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	selfdrive/car/sunnypilot_carname.json
2024-06-24 17:57:41 -04:00
Jason Wen
3e0edf6faa MADS: Fix Disengage on Accelerator Pedal not disengaging properly 2024-06-24 17:56:55 -04:00
DevTekVE
80bc76791c Merge branch 'master-priv' into master-dev-c3 2024-06-22 21:07:56 +02:00
DevTekVE
fb3835ed39 Merge branch 'background-sunnylink-register' into master-dev-c3 2024-06-22 20:02:45 +02:00
DevTekVE
fcc61ac46e Reset Sunnylink ping time during registration
In the Sunnylink API, a line was added to reset the last ping time to zero whenever we are trying to register. The purpose of this change is to ensure that registration attempts start with a clean slate, potentially improving the reliability of the registration process.
2024-06-22 20:00:46 +02:00
DevTekVE
5c351a994f Disable Sunnylink if registration is unsuccessful
This code update sets Sunnylink to be disabled in the event that the registration does not go through successfully. This is to ensure that resources aren't wasted trying to access unregistered Sunnylink hardware.
2024-06-22 14:47:32 +02:00
DevTekVE
696497c6e4 Update sunnylink error logging and status display
Updated the error logging in sunnylink.py to include the module name for clarity. In addition, adjusted the status display in sidebar.cc to shorten the "REGISTERING" status text for a cleaner user interface.
2024-06-22 14:45:04 +02:00
DevTekVE
93286505e1 Improve Sunnylink registration and exception handling
This change enhances the Sunnylink registration process by including better error checks and exception handling for cases when the public key is in use or known to be not unique. The commit also adjusts the setting of the ping time right after a successful registration. Additionally, cleanup occurred in the UI to streamline some code relating to the display of Sunnylink status. The handling of the last Sunnylink ping time has been removed from the system manager.
2024-06-22 14:31:51 +02:00
DevTekVE
3f5dc2f418 Merge remote-tracking branch 'origin/SP-157-sync-priv-20240614' into master-dev-c3
# Conflicts:
#	selfdrive/car/ford/interface.py
#	selfdrive/car/hyundai/interface.py
2024-06-22 13:36:11 +02:00
DevTekVE
27dd7d6332 Merge branch 'background-sunnylink-register' into master-dev-c3 2024-06-21 10:22:45 +02:00
DevTekVE
1a09978811 Fixing a little the conditions 2024-06-21 10:19:45 +02:00
DevTekVE
b9bec4853c Add toggle for log upload functionality
A new functionality has been added to the sunnylinkd script which allows for the toggling of log uploads. This includes the establishment of "DISALLOW_LOG_UPLOAD" as a threading event and a new method, "toggleLogUpload", that sets or clears this event based on whether uploads are enabled or not.
2024-06-21 09:27:45 +02:00
DevTekVE
4c6fec9ddf Refactor Sunnylink status checks and improve logic in multiple modules
This update streamlines how the system checks the status of Sunnylink. New methods were added to `sunnylink.py` to encapsify status checking logic, such as whether the device is connected to a network, if Sunnylink is enabled, if the device is registered and if registration is needed. This resulted in simplified code in `sunnylinkd.py` and `process_config.py` as these status checks are now standardized. Furthermore, removed repetitive code in `sunnylinkd.py` by replacing it with these new methods and modified the while loop conditions according to the new status methods.
2024-06-21 09:14:00 +02:00
DevTekVE
ef133f2182 Merge branch 'background-sunnylink-register' into master-dev-c3
# Conflicts:
#	selfdrive/ui/qt/offroad/sunnypilot/sunnylink_settings.cc
#	system/manager/manager.py
#	system/manager/sunnylink.py
2024-06-20 08:18:55 +02:00
DevTekVE
1bd2a2f007 add back the dirinvg model even if dupped. it's not responisibility of this mr
add back the dirinvg model even if dupped. it's not responisibility of this mr

Refactor Sunnylink's operation and default state handling

This update refines the operation and handling of the Sunnylink feature, focusing on its management within the launch script and the logic for its default state.

Starting with the default state, the 'SunnylinkEnabled' parameter is no longer hard-coded to 0. Instead, it now depends on the presence of a release_channel or release_sp_channel. Furthermore, Sunnylink is set to be active in all non-release builds by default.

Regarding the launch script, obsolete invocations of Sunnylink are avoided. This procedure actively checks for Sunnylink registration status before initiating the related processes, effectively conserving system resources. Also, this modifies the launching order of the mapd installer and manager.

As for the functionality of Sunnylink, crucial improvements are brought into effect:
- The status display post Sunnylink registration is made more accurate and informative, with the inclusion of a progress color.
- The handling of Sunnylink capability is overhauled, ensuring that if Sunnylink feature is disabled, a clear warning is logged and the daemon process shuts down correctly.
- System exit conditions now accommodate the Sunnylink registration status to ensure clean termination.
- The start of Sunnylink Uploader is now strictly dependent on the validation of Sunnylink registration.
- This optimization is also incorporated into the 'manage_athenad' method which now gracefully handles any potential null values for Sunnylink Dongle ID.

This comprehensive update aims to enhance the transparency, functionality, and efficient operation of the Sunnylink feature.
2024-06-20 08:16:59 +02:00
Jason Wen
85a2a7241e Merge branch 'SP-162-kia-ceed-phev-non-scc-2022' into master-dev-c3 2024-06-19 19:31:34 -04:00
Jason Wen
7f3a965aa2 Wrong key 2024-06-19 19:31:25 -04:00
Jason Wen
b7ddd9e2e4 Merge branch 'SP-162-kia-ceed-phev-non-scc-2022' into master-dev-c3 2024-06-19 19:06:04 -04:00
Jason Wen
b1f4d05051 Try this 2024-06-19 19:05:50 -04:00
Jason Wen
ba14ae6b1d Merge branch 'SP-162-kia-ceed-phev-non-scc-2022' into master-dev-c3
# Conflicts:
#	panda
2024-06-19 18:18:57 -04:00
DevTekVE
7f80ce645e Merge branch 'background-sunnylink-register' into master-dev-c3 2024-06-19 22:03:51 +02:00
DevTekVE
c4037ece24 Update sunnylink registration processes
Removed spinner from sunnylink.py and stopped reboot prompt in sunnylink_settings.cc. The spinner was unnecessary and the reboot, instead of being prompted, will be handled differently. Additionally, timestamp of the last successful ping is now recorded upon registration in the Sunnylink service.
2024-06-19 22:03:29 +02:00
DevTekVE
7e7d98f0c0 addming main 2024-06-19 22:03:29 +02:00
DevTekVE
b80f6442bd Remove unnecessary sunnylink.py launch command
The sunnylink.py file was unnecessarily initiated in the launch_chffrplus.sh script. This initiation was removed to streamline the script and potentially increase overall runtime efficiency.
2024-06-19 22:03:29 +02:00
DevTekVE
cd8d07dddd Add Sunnylink registration check and process
The commit introduces a new function, sunnylink_need_register, to check if the Sunnylink feature is registered. It also updates the process list to always include the manage_sunnylinkd process and introduces a new process for Sunnylink registration if it's enabled but not registered.
2024-06-19 22:03:29 +02:00
DevTekVE
61843ee71c Refactor Sunnylink registration condition
The condition for Sunnylink registration has been simplified and refactored within the main loop. Previously, the "is_registered" variable was being set outside the registration loop. Now, the checking process of the dongle ID in regard to the registration status is directly integrated into the while condition. This makes the code more concise and the process flow clearer.
2024-06-19 22:03:29 +02:00
DevTekVE
7dc412fcf1 Refactor encoding method and reduce sleep time
The decoding method in the manage_athenad file has been refactored for parameter retrieval. Instead of decoding after receiving the parameter, decoding is now integrated in the parameter retrieval process. Also, the waiting time in the sunnylinkd.py has been reduced from 60 seconds to 10 to enhance performance and reduce lag.
2024-06-19 22:03:29 +02:00
DevTekVE
5836995097 Refactor sunnylinkd.py for dynamic Sunnylink check
Removed the static check for Sunnylink's enabled status, allowing the feature to be checked dynamically within while loops. This change ensures that if the Sunnylink feature status changes, it can immediately affect the decision-making within the process. This is particularly useful for smooth enabling or disabling of the Sunnylink feature.
2024-06-19 22:03:29 +02:00
DevTekVE
524b97f8d4 Refactor sunnylinkd.main exit conditions
The checks for the sunnylink_enabled flag have been restructured to eliminate unnecessary loop iterations. The check has been moved out of the loop to do the evaluation only once, when exiting the loop. This significantly increases the efficiency of the code.
2024-06-19 22:03:29 +02:00
DevTekVE
62b0c9f8be Add delay before retrying sunnylinkd main
The update introduces a 60-second delay before retrying the execution of sunnylinkd main when SunnylinkEnabled is false. This aims to prevent the immediate termination of the process when SunnylinkEnabled is turned off, allowing for a smoother transition.
2024-06-19 22:03:28 +02:00
DevTekVE
c7464fc615 Add Sunnylink registration check in main function
The code has been adjusted to perform a check for Sunnylink registration in the main function of the sunnylinkd script. Previously, the script was checking for the SunnylinkEnabled state and if the dongle is registered at the beginning of the script. Now, these checks are executed within the main function, allowing the script to exit with a warning log if Sunnylink is not enabled.
2024-06-19 22:03:28 +02:00
DevTekVE
1f63d63398 Change loop control from 'continue' to 'break'
The loop control in sunnylinkd.py was changed from 'continue' to 'break' when Sunnylink is disabled. This prevents unnecessary iterations and makes the code more efficient when the Sunnylink functionality is not in use.
2024-06-19 22:03:28 +02:00
DevTekVE
b18987a5f7 Remove setting exit_event in sunnylinkd.py
The code has been updated to remove the conditional that sets exit_event in the sunnylinkd.py file. This change simplifies control flow by immediately returning to the top of the loop when Sunnylink is not enabled, instead of managing an additional event.
2024-06-19 22:03:28 +02:00
DevTekVE
00fb20e28c Refactor sunnylink process configuration logic
The code for managing sunnylink processes has been refactored and improved. A function, use_sunnylink, has been added to check if sunnylink is both enabled and registered appropriately.  Additionally, the launching of process logic for 'sunnylink_uploader' and 'manage_sunnylinkd' has been adjusted to use this new function. The main function of 'sunnylinkd.py' now also checks if the sunnylink is enabled before running.
2024-06-19 22:03:28 +02:00
DevTekVE
7fcdcf64d8 Fix format error in SunnylinkDongleId variable
The format of the SunnylinkDongleId variable was incorrect in system manager code. It used a dictionary format instead of a tuple. This commit replaces it back with a tuple appropriately to avoid inconsistencies.
2024-06-19 22:03:28 +02:00
DevTekVE
65edbe4f47 Update Sunnylink dongle ID handling
The Sunnylink dongle ID is now being formatted directly in the manager.py file, reducing redundancy. Also, the check for sunnylink_dongle_id in sunnylink.py was removed to simplify the SunnlinkEnabled conditional.
2024-06-19 22:03:28 +02:00
DevTekVE
5d440cf62a Refactor Sunnylink integration and add dongle registration check
The Sunnylink integration has been refactored to improve handling of scenarios where Sunnylink is enabled but the dongle is not registered. Added checks for the registration status of the Sunnylink dongle and updated related defaults and UI indicators correspondingly. Additionally, moved the execution of the sunnylink.py script to the background during launch to prevent blocking other tasks.
2024-06-19 22:03:28 +02:00
Jason Wen
27fbb3a67b Merge branch 'SP-157-sync-20240614' into SP-157-sync-priv-20240614 2024-06-19 15:25:25 -04:00
Jason Wen
2952d54a2b Bump submodule for SP-162 2024-06-19 15:00:56 -04:00
Jason Wen
7821c5371b HKG: Car Port for Kia Ceed PHEV Non-SCC 2022 2024-06-19 14:58:24 -04:00
Jason Wen
7357522e39 Merge branch 'SP-161-ui-no-noo-path' into master-dev-c3 2024-06-18 21:59:46 -04:00
Jason Wen
d00479b517 ui: Fix navigation path not updating color 2024-06-17 20:15:48 -04:00
Jason Wen
a89d9b743e Merge branch 'master-priv' into master-dev-c3 2024-06-16 19:36:36 -04:00
Jason Wen
74088da1d0 Merge branch 'SP-138-cslc-gm' into master-dev-c3 2024-06-16 14:51:42 -04:00
Jason Wen
779637fb0d Fix 2024-06-16 14:51:32 -04:00
Jason Wen
3e901769ec Merge branch 'master-priv' into SP-138-cslc-gm 2024-06-16 14:50:55 -04:00
Jason Wen
87fe82493b Merge branch 'SP-138-cslc-gm' into master-dev-c3 2024-06-16 02:19:56 -04:00
Jason Wen
50b0a7a69a Only camera ACC for now 2024-06-16 02:19:45 -04:00
Jason Wen
ad9ac9d9fd Merge branch 'SP-159-map-settings-dm-overlap' into master-dev-c3 2024-06-16 01:41:41 -04:00
Jason Wen
572abfb519 ui: Fix onroad bottom row buttons positions with RHD detection
The `updateButtonsLayout` function now takes a boolean argument `is_rhd` which adjusts the alignment of the on-screen buttons according to the handedness of the driving. This change was necessary to cater to right-hand drive regions, making the application more user-friendly and adaptable to global user base. No behavior change for left-hand drive.
2024-06-16 01:41:15 -04:00
Jason Wen
653e061ec5 Merge branch 'SP-138-cslc-gm' into master-dev-c3
# Conflicts:
#	panda
2024-06-16 01:19:01 -04:00
Jason Wen
e1ac25bdd8 Custom Stock Longitudinal Control: GM Support
This commit adds the custom cruise control logic in the GM interface and provides custom minimum cruise speed for GM. It also provides comprehensive updates in GM car controller to manage different scenarios in cruise control. Additionally, the update includes button control for cruise speed modification, maintaining a steady speed and considering curve speed hysteresis. Further, safety checks were implemented in the panda safety module for the GM to check cruise control actions.
2024-06-16 01:17:53 -04:00
Jason Wen
76ee63bb51 Merge branch 'master-priv' into master-dev-c3 2024-06-14 11:44:36 -04:00
Jason Wen
81a361e5ad Merge branch 'sentry-update-flags' into master-dev-c3 2024-06-14 11:42:02 -04:00
Jason Wen
2110e9cfc9 Sentry: Update fingerprinting events 2024-06-14 11:41:42 -04:00
Jason Wen
c9cd510d33 Merge branch 'master-priv' into master-dev-c3 2024-06-14 09:20:56 -04:00
Jason Wen
e90f15199f Merge branch 'master-priv' into master-dev-c3 2024-06-14 08:02:45 -04:00
Jason Wen
bbf7c88bc4 Merge branch 'master-priv' into master-dev-c3 2024-06-13 17:33:06 -04:00
Jason Wen
4e1cbef881 Merge branch 'master-priv-fix-sunnylink-failed-register' into master-dev-c3 2024-06-13 13:27:11 -04:00
Jason Wen
684a494950 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	selfdrive/ui/qt/offroad/onboarding.cc
2024-06-13 13:27:08 -04:00
Jason Wen
43a4218e7f Explicit access token arg 2024-06-13 13:26:29 -04:00
Jason Wen
2551e51526 Merge branch 'master-priv' into master-priv-fix-sunnylink-failed-register 2024-06-13 13:07:55 -04:00
Jason Wen
3e5cb3e290 Merge branch 'SP-154-sl-sponsor-qr' into master-dev-c3 2024-06-13 12:50:05 -04:00
Jason Wen
bc749ff83c ui: Disallow QR code generation if sunnylink dongle ID does not exist 2024-06-13 12:46:54 -04:00
Jason Wen
51b40230ec Merge branch 'SP-151-sp-tos' into master-dev-c3 2024-06-13 12:08:21 -04:00
Jason Wen
589a4de522 split comma's and sunnypilot's 2024-06-13 12:08:12 -04:00
DevTekVE
0357966798 Merge branch 'refs/heads/master-priv-fix-sunnylink-failed-register' into master-dev-c3 2024-06-13 17:28:50 +02:00
DevTekVE
f48c7b22ae Set default value for SunnylinkDongleId
Removed the condition check for sunnylink_dongle_id and instead, directly assigned a default value in case it doesn't exist. This simplifies the code by removing an unnecessary if statement.
2024-06-13 17:28:36 +02:00
Jason Wen
7d952ecc1e Merge branch 'SP-151-sp-tos' into master-dev-c3 2024-06-13 10:44:29 -04:00
Jason Wen
29791a7105 fix index 2024-06-13 10:44:21 -04:00
Jason Wen
cc48ee7dd4 Merge branch 'SP-151-sp-tos' into master-dev-c3 2024-06-13 10:40:31 -04:00
Jason Wen
252f06c5ad make sure comma's ToS is retained 2024-06-13 10:40:15 -04:00
DevTekVE
43557a29db Merge branch 'refs/heads/master-priv-more-resilient-sunnylink-connection-and-thread-handling' into master-dev-c3 2024-06-13 09:58:51 +02:00
DevTekVE
fbaf8722d1 Refactor athenad and sunnylinkd python code
Several changes have been made to improve the code structure of the athenad and sunnylinkd scripts. The while loop in athenad now uses end_event.wait(5) for cleaner execution control. In sunnylinkd.py, there have been additions to manage exceptions and refinements in the handling of network checks. The final major change is the inclusion of a new constant for sunnylink reconnection timeout that plays major role in various parts of the script.
2024-06-13 09:56:54 +02:00
Jason Wen
3cb8be0b94 Merge branch 'SP-151-sp-tos' into master-dev-c3 2024-06-13 02:05:25 -04:00
Jason Wen
55542d56f2 ui: sunnypilot Terms of Service 2024-06-13 02:02:58 -04:00
Jason Wen
85dde420d8 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-06-13 01:04:38 -04:00
Jason Wen
c9332cde8c Merge branch 'SP-150-sync-priv-20240612' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
#	panda
#	release/build_release.sh
#	release/release_files.py
2024-06-12 22:28:16 -04:00
Jason Wen
b7df7298a1 Update CHANGELOGS.md 2024-06-12 22:25:31 -04:00
Jason Wen
69abbd94ec Merge branch 'SP-147-sync-priv-2024' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
#	panda
#	release/files_common
2024-06-12 16:08:20 -04:00
Jason Wen
436bc369c1 Update CHANGELOGS.md 2024-06-12 14:28:56 -04:00
Jason Wen
229dccd428 GitLab Pipelines: Add script for syncing LFS between comma and sunnypilot
This commit adds a new script, 'sync-lfs.sh'. This script assists by syncing the git large file storage (LFS) system. It backs up the current LFS configuration, uses the comma-separated configuration for operations like fetch and pull, and then restores the original configuration before pushing to the origin's main branch.
2024-06-12 14:28:31 -04:00
Jason Wen
211ff21af0 Merge branch 'master' into SP-147-sync-priv-2024
# Conflicts:
#	common/api/__init__.py
#	panda
#	release/build_release.sh
#	release/files_common
#	selfdrive/car/card.py
#	selfdrive/car/toyota/carcontroller.py
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/radard.py
#	selfdrive/ui/qt/api.cc
#	selfdrive/ui/qt/maps/map.cc
#	selfdrive/ui/ui.cc
#	system/athena/manage_athenad.py
#	system/athena/manage_sunnylinkd.py
#	system/athena/sunnylinkd.py
#	system/manager/gitlab_runner.sh
#	system/manager/manager.py
#	system/manager/mapd_installer.py
#	system/manager/process_config.py
#	system/manager/sunnylink.py
#	system/sentry.py
2024-06-12 14:28:20 -04:00
DevTekVE
0e7ad5918e Merge branch 'refs/heads/SP-147-sync-priv-2024' into master-dev-c3 2024-06-11 22:11:52 +02:00
DevTekVE
a2ad9cb6a4 adding back the readme 2024-06-11 22:11:35 +02:00
DevTekVE
eb93ee7b3b Merge remote-tracking branch 'origin/master-dev-c3' into master-dev-c3 2024-06-11 22:03:59 +02:00
DevTekVE
a2b3fd432c Merge branch 'refs/heads/SP-147-sync-priv-2024' into master-dev-c3
# Conflicts:
#	.gitlab-ci.yml
2024-06-11 21:53:02 +02:00
DevTekVE
dde55447d5 Update method for copying release files in CI
The method to copy release files in the continuous integration pipeline has been changed. Instead of using a complex cp command, we are now simply using a Python script with rsync, which provides cleaner and more readable code. The old method is still present but commented out for history or possible future use.
2024-06-11 21:50:22 +02:00
Jason Wen
90628c6e0f Add monitoring/helpers.py 2024-06-11 21:49:29 +02:00
DevTekVE
6c87faefdf Move mapd_manager.py to system directory
The mapd_manager.py file has been relocated from the selfdrive directory to the system directory. This change in location reflects the file hierarchy restructuring and improves the organization of the codebase.
2024-06-11 21:49:29 +02:00
DevTekVE
1f5c04f80e Update release files copy command in CI pipeline
The `.gitlab-ci.yml` file has been updated to directly use copy command instead of the output from release_files.py script, which was previously used in the pipeline. This change is implemented for security reasons - to validate the output and prevent exposure of unnecessary files. Warning outputs are also efficiently managed now, with the use of grep command.
2024-06-11 21:49:29 +02:00
DevTekVE
556e2f55a0 Update rsync flag in GitLab CI configuration
This change updates the rsync command in the GitLab CI configuration file (.gitlab-ci.yml) from '-av' to '-avm'. This introduces a more efficient synchronization by reducing the amount of file metadata transferred.
2024-06-11 21:27:01 +02:00
DevTekVE
0f94403092 Optimize scons command and update release_files script
The scons command in the GitLab CI file now includes the --minimal flag to boost performance by reducing unnecessary operations. In the release_files script, a redundant exclusion pattern has been removed, simplifying file matching.
2024-06-11 21:00:30 +02:00
DevTekVE
d21a6126ac Update file whitelists and blacklists in release_files.py
The file blacklists and whitelists in release_files.py have been thoroughly updated to reflect changes in project structure and requirements. This includes additions to the sunnypilot_blacklist, such as "system/manager/gitlab_runner.sh" and "README.md", among others. The sunnypilot_whitelist has also been
2024-06-11 20:48:55 +02:00
Jason Wen
57b5dbf31f Merge branch 'SP-147-sync-priv-2024' into master-dev-c3 2024-06-11 12:31:45 -04:00
Jason Wen
38a40b4db0 Add monitoring/helpers.py 2024-06-11 12:17:28 -04:00
DevTekVE
99ace8f1b5 Merge branch 'refs/heads/SP-147-sync-priv-2024' into master-dev-c3 2024-06-11 15:58:03 +02:00
DevTekVE
2babfe790d Move mapd_manager.py to system directory
The mapd_manager.py file has been relocated from the selfdrive directory to the system directory. This change in location reflects the file hierarchy restructuring and improves the organization of the codebase.
2024-06-11 15:53:59 +02:00
DevTekVE
725768783f Update release files copy command in CI pipeline
The `.gitlab-ci.yml` file has been updated to directly use copy command instead of the output from release_files.py script, which was previously used in the pipeline. This change is implemented for security reasons - to validate the output and prevent exposure of unnecessary files. Warning outputs are also efficiently managed now, with the use of grep command.
2024-06-11 15:47:38 +02:00
DevTekVE
55cee14105 more cleanup adjustment 2024-06-11 15:45:14 +02:00
DevTekVE
649aef3cc1 more cleanup adjustment 2024-06-11 15:32:09 +02:00
DevTekVE
f264b49c7e more cleanup adjustment 2024-06-11 15:26:04 +02:00
DevTekVE
86242fa57f more cleanup adjustment 2024-06-11 14:56:15 +02:00
DevTekVE
489ab0efe3 more cleanup 2024-06-11 14:29:08 +02:00
DevTekVE
a8bc3d30ca Update release files and remove unnecessary tests
This commit significantly updates the list of release files, adding several new ones and removing numerous others. In addition, a large number of test files deemed unnecessary have been removed. This is part of a broader effort to optimize the codebase and improve efficiency.
2024-06-11 14:27:33 +02:00
DevTekVE
06ea74d954 Merge branch 'refs/heads/SP-147-sync-priv-2024' into master-dev-c3 2024-06-11 12:57:47 +02:00
DevTekVE
135eb2f17b Remove unused files from release
The Docker-related files, SECURITY.md, codecov.yml, conftest.py, poetry.lock and .clang-tidy were removed from the release_files.py. This cleanup was made to ensure the release contains only the necessary files, reducing potential clutter and confusion.
2024-06-11 12:56:26 +02:00
DevTekVE
7a51cfcd13 Add numerous files to release_files.py
This commit majorly expands the list of files to be tracked in release_files.py. The additions range from Dockerfile configurations, README documents, test files, builder scripts and many more. This might enhance the overall tracking and versioning capability for a wider scope of files across the project.
2024-06-11 12:37:41 +02:00
DevTekVE
6a6f5f4860 Add various files to release_files.py
The commit adds a list of files related to GitLab CI, Docker, code formatting, and security guidelines to the release_files.py. These additions will provide more control and configuration for the release process.
2024-06-11 12:24:22 +02:00
DevTekVE
9f269722ab Merge branch 'refs/heads/SP-147-sync-priv-2024' into master-dev-c3 2024-06-11 12:08:32 +02:00
DevTekVE
d9170548c9 Add new entries to sunnypilot_blacklist
Two new entries have been added to the sunnypilot_blacklist array in the release_files.py script. This now includes ".run/" and "release/ci/scons_cache/".
2024-06-11 12:07:59 +02:00
DevTekVE
472948cf62 Merge branch 'refs/heads/SP-147-sync-priv-2024' into master-dev-c3 2024-06-11 11:59:58 +02:00
DevTekVE
de4cefdc1e Update import paths in athena files
The changes here correct a misalignment in the import paths in the sunnylinkd.py and manage_sunnylinkd.py files. These updates ensure that system.athena modules are accurately referenced, which is critical for the function of these scripts.
2024-06-11 11:59:46 +02:00
DevTekVE
702643188c Updating panda to point to the proper branch for dev-c3 2024-06-11 10:49:35 +02:00
DevTekVE
a42398646b Merge branch 'refs/heads/SP-147-sync-priv-2024' into master-dev-c3-snapshot
# Conflicts:
#	CHANGELOGS.md
#	panda
2024-06-11 10:45:58 +02:00
DevTekVE
7ae27b6970 Merge remote-tracking branch 'refs/remotes/origin/master-priv' into master-dev-c3-snapshot
# Conflicts:
#	selfdrive/athena/sunnylinkd.py
2024-06-11 10:44:31 +02:00
DevTekVE
ba3475a02c Add 'sunnylink_uploader.py' to temporary blacklist
We are temporarily blacklisting 'sunnylink_uploader.py' by adding it under 'sunnypilot_blacklist' in 'release/release_files.py' until it's ready for widespread roll-out. Alongside, the existing path in 'system/manager/process_config.py' has been updated to reflect the correct location of 'sunnylink_uploader.py'. This will ensure the processes are correctly managed based on its existence.
2024-06-11 09:33:27 +02:00
DevTekVE
e0110198bf Merge branch 'refs/heads/master-priv' into SP-147-sync-priv-2024
# Conflicts:
#	system/manager/process_config.py
2024-06-11 09:25:59 +02:00
Jason Wen
899b5a6e33 Update CHANGELOGS.md 2024-06-10 21:34:20 -04:00
Jason Wen
7484d75205 GitLab Pipelines: Add script for syncing LFS between comma and sunnypilot
This commit adds a new script, 'sync-lfs.sh'. This script assists by syncing the git large file storage (LFS) system. It backs up the current LFS configuration, uses the comma-separated configuration for operations like fetch and pull, and then restores the original configuration before pushing to the origin's main branch.
2024-06-10 21:24:35 -04:00
Jason Wen
e36dbe97b5 Merge branch 'master' into SP-147-sync-priv-2024
# Conflicts:
#	common/api/__init__.py
#	panda
#	release/build_release.sh
#	release/files_common
#	selfdrive/car/card.py
#	selfdrive/car/toyota/carcontroller.py
#	selfdrive/controls/controlsd.py
#	selfdrive/controls/radard.py
#	selfdrive/ui/qt/api.cc
#	selfdrive/ui/qt/maps/map.cc
#	selfdrive/ui/ui.cc
#	system/athena/manage_athenad.py
#	system/athena/manage_sunnylinkd.py
#	system/athena/sunnylinkd.py
#	system/manager/gitlab_runner.sh
#	system/manager/manager.py
#	system/manager/mapd_installer.py
#	system/manager/process_config.py
#	system/manager/sunnylink.py
#	system/sentry.py
2024-06-10 21:24:23 -04:00
DevTekVE
d79f0082eb Merge branch 'refs/heads/master-priv-log-sunnylink-error' into master-dev-c3
# Conflicts:
#	selfdrive/athena/sunnylinkd.py
2024-06-10 11:21:19 +02:00
DevTekVE
922a0f91ba Merge branch 'refs/heads/swaglog-to-cloudwatch' into master-dev-c3 2024-06-10 11:19:58 +02:00
DevTekVE
a7699c280f Change log level from info to debug in sunnylinkd.py
The logging level for 'pong' and 'ping' messages in sunnylinkd.py has been changed from 'info' to 'debug'. This adjustment will help reduce the level of verbosity in the logs and focus more on significant events.
2024-06-10 11:14:35 +02:00
DevTekVE
12841b7bb4 Update sunnylinkd.py to improve logging and connection timeout
The commit enhances the logging in the selfdrive/athena/sunnylinkd.py by adding an info statement when the handle_long_poll function starts. It also modifies the create_connection function call, removing the fixed 30 seconds timeout, providing more flexibility for connection time.
2024-06-10 09:40:08 +02:00
DevTekVE
6d8348ccf0 Change error logging to event logging in athenad.py
The logging for an invalid JSON RPC request in athenad.py has been changed from an error log to an event log. The event log still records the request as an error, improving clarity of error handling in the system.
2024-06-10 09:39:32 +02:00
DevTekVE
85fb840575 Add debug message for non-supported PC in log_handler
A debug message has been added to the log_handler function in the athenad.py file. This message will get triggered when the function is being invoked on a non-supported PC, providing a clearer indication of potential errors due to platform incompatibility.
2024-06-10 08:55:23 +02:00
DevTekVE
feff771969 Merge branch 'refs/heads/master-priv-log-sunnylink-error' into master-dev-c3 2024-06-10 08:22:47 +02:00
DevTekVE
f4415169c0 Add error logging for invalid requests in athenad.py
An error logging line was added in athenad.py to capture and log the details of any invalid requests received. This additional error handling measure will help to maintain the standards of incoming requests and provide clearer debugging information.
2024-06-10 08:17:28 +02:00
DevTekVE
b9d9346994 Merge branch 'refs/heads/master-priv-log-sunnylink-error' into master-dev-c3 2024-06-10 07:47:38 +02:00
DevTekVE
3f7403318e Add LastSunnylinkPingTime to manager and update sunnylinkStatus calculation
A new parameter "LastSunnylinkPingTime" has been introduced to the manager script, it will now be tracked and stored alongside other car status parameters. Additionally, unnecessary comments and includes have been removed in the sidebar script. The "sunnylinkStatus" calculation has also been updated to accommodate empty strings and prevent potential crashes.
2024-06-10 07:47:20 +02:00
DevTekVE
6115f73085 Merge branch 'refs/heads/master-priv-log-sunnylink-error' into master-dev-c3 2024-06-09 11:32:58 +02:00
DevTekVE
6b70ea3de6 Comment out error logging for Sunnylink status
The commit comments out a log statement that outputs an error message if Sunnylink is offline. This change is probably a temporary measure to avoid unnecessary log messages in the output, although it may affect troubleshooting of Sunnylink connection issues.
2024-06-09 11:32:43 +02:00
DevTekVE
63ed2c8e30 Merge branch 'refs/heads/master-priv-log-sunnylink-error' into master-dev-c3 2024-06-09 11:31:25 +02:00
DevTekVE
d75fd76537 Merge branch 'refs/heads/master-priv' into master-dev-c3 2024-06-09 11:30:59 +02:00
DevTekVE
609b2d8a21 Refactor sunnylink code for logs and ping timeouts
The sunnylink ping and log statements have been refactored for clarity and optimization. Log levels were changed from debug to info, resulting in more visibility for important processes in sunnylinkd.py. The timeout before re-pinging in ws_ping() was also updated from 80% to 70% to ensure more consistent connections.
2024-06-09 10:32:02 +02:00
DevTekVE
21d3fd3385 Add logging for Sunnylink offline issue
The code updates include error logging for debugging when Sunnylink goes offline. Log includes information such as the last ping time and the current time to better understand the cause of possible issues. This logging will aid in resolving status discrepancies with the Sunnylink feature.
2024-06-08 21:59:31 +02:00
Jason Wen
c740ab2a86 Revert "Update CHANGELOGS.md"
This reverts commit 910a4f6c8f.
2024-06-04 21:25:07 -04:00
Jason Wen
910a4f6c8f Update CHANGELOGS.md 2024-06-04 21:25:04 -04:00
Jason Wen
6217b2be81 Merge branch 'SP-140-toyota-pedal-bug' into master-dev-c3 2024-06-03 15:36:30 -04:00
Jason Wen
acbd1d4b4c Merge branch 'SP-132-manager-crash-git-pull' into master-dev-c3 2024-06-01 00:12:23 -04:00
Jason Wen
b66da7dd1a disable log 2024-06-01 00:12:17 -04:00
Jason Wen
cba9bc63b2 Merge branch 'SP-132-manager-crash-git-pull' into master-dev-c3 2024-06-01 00:06:30 -04:00
Jason Wen
318fc690fa Revert "have this so no need to manually do it"
This reverts commit a4f65ab740.
2024-06-01 00:06:19 -04:00
Jason Wen
2a451f859f Merge branch 'SP-132-manager-crash-git-pull' into master-dev-c3 2024-06-01 00:04:12 -04:00
Jason Wen
6f619aa48d Revert "use qprocess so text is printed live"
This reverts commit 7703ea8c51.
2024-06-01 00:02:46 -04:00
Jason Wen
b0e8fddfed Revert "deprecated"
This reverts commit 8225779bf0.
2024-06-01 00:02:46 -04:00
Jason Wen
a7e9f09338 Revert "do it like this"
This reverts commit 09be75814b.
2024-06-01 00:02:45 -04:00
Jason Wen
09be75814b do it like this 2024-06-01 00:01:14 -04:00
Jason Wen
8225779bf0 deprecated 2024-05-31 23:59:31 -04:00
Jason Wen
7703ea8c51 use qprocess so text is printed live 2024-05-31 23:58:23 -04:00
Jason Wen
96506a9097 not needed 2024-05-31 23:53:25 -04:00
Jason Wen
d615f6dd8b try not updating scroll 2024-05-31 23:51:33 -04:00
Jason Wen
449563c0bd add this 2024-05-31 23:46:03 -04:00
Jason Wen
a1662b86eb execute all commands regardless of failures 2024-05-31 23:41:37 -04:00
Jason Wen
bd2b6eb304 Revert "disable log"
This reverts commit 97409b198c.
2024-05-31 23:40:48 -04:00
Jason Wen
a335542090 Revert "just execute for now"
This reverts commit 3dc042e066.
2024-05-31 23:38:10 -04:00
Jason Wen
3dc042e066 just execute for now 2024-05-31 23:36:59 -04:00
Jason Wen
a4f65ab740 have this so no need to manually do it 2024-05-31 23:33:36 -04:00
Jason Wen
97409b198c disable log 2024-05-31 23:33:07 -04:00
Jason Wen
07f5592e4f use std::ostringstream 2024-05-31 23:31:21 -04:00
Jason Wen
db23c4a56f print them all! 2024-05-31 23:28:45 -04:00
Jason Wen
23f263304f try this 2024-05-31 23:22:52 -04:00
Jason Wen
fd68ce13ee convert str 2024-05-31 23:17:24 -04:00
Jason Wen
520ecde1cd swaglog 2024-05-31 23:16:14 -04:00
Jason Wen
8f4dc2481f add debug 2024-05-31 23:10:17 -04:00
Jason Wen
a353db8637 try printing the output in view 2024-05-31 23:07:53 -04:00
Jason Wen
c06ddb81af should add if does not exist 2024-05-31 22:47:30 -04:00
Jason Wen
b07473b9c9 oops 2024-05-31 22:43:11 -04:00
Jason Wen
ce16dd2a4f handle things better 2024-05-31 22:41:57 -04:00
Jason Wen
9dae5d1659 Revert "check if origin-update exists"
This reverts commit f4c7d3ecd3.
2024-05-31 22:27:45 -04:00
Jason Wen
c661d36c34 Revert "do this"
This reverts commit 83349a13da.
2024-05-31 22:27:44 -04:00
Jason Wen
4789730917 Revert "oops"
This reverts commit 30fe43bf01.
2024-05-31 22:27:44 -04:00
Jason Wen
30fe43bf01 oops 2024-05-31 22:26:29 -04:00
Jason Wen
83349a13da do this 2024-05-31 22:25:21 -04:00
Jason Wen
f4c7d3ecd3 check if origin-update exists 2024-05-31 22:21:11 -04:00
Jason Wen
06784e2a80 interact with reboot button too 2024-05-31 22:10:18 -04:00
Jason Wen
5a32d5b027 Merge branch 'master-priv' into master-dev-c3 2024-05-31 18:58:16 -04:00
Jason Wen
a036b5d93a Merge branch 'sentry-bootlog' into master-dev-c3 2024-05-31 11:05:39 -04:00
Jason Wen
344425ddb6 Merge branch 'SP-132-manager-crash-git-pull' into master-dev-c3 2024-05-31 11:05:24 -04:00
Jason Wen
920ff7836e Sentry: Add dongle ID to uploaded bootlog 2024-05-31 11:04:55 -04:00
Jason Wen
2ee7a0200f oops 2024-05-31 03:27:26 -04:00
Jason Wen
00ad42da50 just to test lol 2024-05-31 03:25:56 -04:00
Jason Wen
cd2a265364 update_btn instead 2024-05-31 03:15:41 -04:00
Jason Wen
46b8d83b65 fix 2024-05-31 03:03:07 -04:00
Jason Wen
8336e7b01c fix 2024-05-31 03:02:12 -04:00
Jason Wen
8bdb6631be move it 2024-05-31 02:59:23 -04:00
Jason Wen
c181a4edd4 Revert "try this"
This reverts commit fb267e91c2.
2024-05-31 02:57:34 -04:00
Jason Wen
bf886e3fe6 Revert "how about this"
This reverts commit e77ce5684b.
2024-05-31 02:57:33 -04:00
Jason Wen
e77ce5684b how about this 2024-05-31 02:51:58 -04:00
Jason Wen
fb267e91c2 try this 2024-05-31 02:45:50 -04:00
Jason Wen
ee5cdaf7bb should be add 2024-05-31 02:36:47 -04:00
Jason Wen
0842d8ace0 oops 2024-05-31 02:35:10 -04:00
Jason Wen
a57fd5585c Manager: Add Update button when Traceback is displayed 2024-05-31 02:30:12 -04:00
Jason Wen
9cbb45bab6 Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3 2024-05-30 23:42:31 -04:00
Jason Wen
29b223cb40 move to desire helper 2024-05-30 23:42:21 -04:00
Jason Wen
c0137870a2 Merge branch 'vw-distance-hold-toggle' into master-dev-c3 2024-05-30 23:38:48 -04:00
Jason Wen
ca2d189f71 Update CHANGELOGS.md 2024-05-30 21:12:56 -04:00
Jason Wen
d3a06b8df5 Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3 2024-05-30 21:10:59 -04:00
Jason Wen
4b56ea9e53 Refactor lateral speed calculation method
This commit abstracts the computation of minimal lateral speed into a function named 'get_min_lateral_speed'. It simplifies the calculation logic used for lane change speed minimum in 'selfdrive/car/interfaces.py'. The 'pause_lateral_speed' value has been changed from a string to an integer and directly used in the new function. This change improves code readability and modularity.
2024-05-30 21:10:49 -04:00
Jason Wen
14e7d0f91e Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3 2024-05-30 17:06:35 -04:00
Jason Wen
2801305283 Merge branch 'master-priv' into SP-134-pause-lateral-speed 2024-05-30 17:03:35 -04:00
Jason Wen
37c5b69529 Merge branch 'sync-priv-2024-05-30' into master-dev-c3 2024-05-30 14:34:51 -04:00
Jason Wen
ba6940f398 Add TODO 2024-05-30 13:59:06 -04:00
Jason Wen
c4eba52729 Merge branch 'master-priv' into nnlc-lateral-jerk 2024-05-29 23:44:08 -04:00
Jason Wen
9329986205 Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-29 22:45:15 -04:00
Jason Wen
d2dbbd4e69 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
#	selfdrive/controls/lib/desire_helper.py
#	selfdrive/ui/qt/widgets/controls.h
2024-05-29 22:44:32 -04:00
Jason Wen
91442072d0 Merge branch 'master-priv' into SP-134-pause-lateral-speed
# Conflicts:
#	CHANGELOGS.md
#	selfdrive/controls/lib/desire_helper.py
2024-05-29 22:43:37 -04:00
Jason Wen
a7468682c4 new line 2024-05-29 22:37:59 -04:00
Jason Wen
317a08bff3 should be all toggleable when onroad 2024-05-29 22:37:11 -04:00
Jason Wen
4b62be024c Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3
# Conflicts:
#	selfdrive/controls/lib/desire_helper.py
2024-05-29 22:31:09 -04:00
Jason Wen
999ac0b8b7 in future PR for customizable min lane change speed 2024-05-29 22:30:33 -04:00
Jason Wen
c8257721b6 Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3 2024-05-29 15:39:16 -04:00
Jason Wen
4e3f5d54cd More update name 2024-05-29 15:39:09 -04:00
Jason Wen
1427f4e79b Merge branch 'SP-133-disable-lane-change' into master-dev-c3 2024-05-29 15:34:40 -04:00
Jason Wen
5fbb3d39d6 Update name 2024-05-29 15:13:12 -04:00
DevTekVE
838d72adcb Merge branch 'refs/heads/routes-to-s3' into master-dev-c3 2024-05-29 18:23:26 +02:00
DevTekVE
dceab805de Update SUNNYLINK_BASE_URL default value
The default value of SUNNYLINK_BASE_URL has been changed to the stage environment URL. This change aids in testing and further development purposes.
2024-05-29 18:22:26 +02:00
DevTekVE
62726d612d Update upload attribute name and handle no network connection
The upload attribute name has been changed from 'user.sunnydv.upload' to 'user.sunny.upload' to improve consistency in nomenclature. Furthermore, logic has been added to handle case when there is no network connection available; the process will now sleep and retry rather than crashing or hanging.
2024-05-29 17:26:01 +02:00
Jason Wen
91fcd5a632 Merge branch 'SP-133-disable-lane-change' into master-dev-c3 2024-05-29 08:43:21 -04:00
Jason Wen
bf41202cab Auto Lane Change: Add option to disable lane change 2024-05-29 08:43:12 -04:00
Jason Wen
3c6f78979f Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3 2024-05-29 08:10:10 -04:00
Jason Wen
170a0d035e fix non-int 2024-05-29 08:09:58 -04:00
DevTekVE
e053368ebf Added headers to sunnylink upload requests
The sunnylink_uploader.py file was modified to include headers in the upload request. The headers are gathered from the 'headers' field in the URL response JSON and passed into the 'put' request method. The debug log message was also updated to display these headers along with the upload URL.
2024-05-29 11:28:12 +02:00
DevTekVE
4f5251f951 Add detailed log for upload failures
The commit introduces more detailed log events when an attempted upload fails for any reason. Now, when there is a non-null status code like 401 or 403, it will log more information, including the decoded content of the HTTP response. This aids in quickly identifying and resolving upload issues.
2024-05-29 09:54:49 +02:00
DevTekVE
ab0a10cd9c Update Sunnylink base URL and upload attribute name
Updated the base URL for SUNNYLINK to point to a new staging test environment. Changed the UPLOAD_ATTR_NAME in the sunnylink uploader from 'user.sunny.upload' to 'user.sunnydv.upload'. This provides distinction and prevents potential conflicts.
2024-05-29 08:42:42 +02:00
DevTekVE
4857b35943 Refactor status_code checks in sunnylink_uploader.py
Removed 401 and 403 status codes from the success conditions in the sunnylink_uploader.py script. The handling for these status codes has been moved to the else clause, as they were unexpectedly marked as successful previously.
2024-05-29 08:42:28 +02:00
Jason Wen
2f18b56b75 Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3 2024-05-29 00:54:32 -04:00
Jason Wen
abfc90cbb6 desire helepr too 2024-05-29 00:54:23 -04:00
Jason Wen
8cab7c4629 Merge branch 'ui-sp-optional-control-hide-btn' into master-dev-c3 2024-05-29 00:47:27 -04:00
Jason Wen
68cd82ad28 Controls: Dim button if the option cannot be adjusted 2024-05-29 00:47:09 -04:00
Jason Wen
d104beb207 Merge branch 'SP-134-pause-lateral-speed' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-29 00:22:04 -04:00
Jason Wen
57f569062c Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-29 00:21:39 -04:00
Jason Wen
01d58f5d59 Remove unused 2024-05-29 00:10:50 -04:00
Jason Wen
7a41c44e8e Merge branch 'master-priv' into SP-134-pause-lateral-speed 2024-05-29 00:08:15 -04:00
Jason Wen
daaf05e5a6 Controls: Customizable Pause Lateral Speed 2024-05-29 00:07:24 -04:00
DevTekVE
a7b52c7ac9 Add sunnylink_uploader to process_config and implement uploader
The commit adds sunnylink_uploader to the process_config and implements an uploader in a new file, sunnylink_uploader.py. The uploader handles listing, prioritizing, and uploading files to Sunnylink. Modified process_config to conditionally include the uploader process based on SunnylinkEnabled param and file existence. New getxattr and setxattr functions are also used to keep track of the uploaded files.
2024-05-28 21:51:18 +02:00
DevTekVE
2e34d88db1 Merge branch 'refs/heads/swaglog-to-cloudwatch' into master-dev-c3 2024-05-28 19:59:48 +02:00
DevTekVE
a79a044a25 Remove unnecessary os module import and file xattr removal code
The import of the 'os' module is eliminated to clean up the code, as it is no longer needed. Furthermore, the code for removing the extended attribute from all files in the current directory has been removed as well. This streamlines the setxattr function and focuses only on setting the attributes without additional file operations.
2024-05-28 19:59:36 +02:00
DevTekVE
5b559b7f8b Merge branch 'refs/heads/swaglog-to-cloudwatch' into master-dev-c3 2024-05-28 15:08:52 +02:00
DevTekVE
f4b54b1963 Change logging level from info to debug in athenad.py and sunnylinkd.py
Adjusted the logging level for certain log entries from info to debug in athenad.py and sunnylinkd.py. This change improves control over the log verbosity allowing for cleaner log files, and to debug specific sections more effectively.
2024-05-28 15:08:40 +02:00
DevTekVE
a069da1883 Merge branch 'refs/heads/swaglog-to-cloudwatch' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-28 14:58:54 +02:00
DevTekVE
bae94e292d Merge branch 'refs/heads/master-priv' into swaglog-to-cloudwatch 2024-05-28 14:56:11 +02:00
DevTekVE
0c909e98bb Spacing 2024-05-28 14:54:35 +02:00
DevTekVE
2d2a35c7e4 Apply 2 suggestion(s) to 1 file(s) 2024-05-28 12:54:11 +00:00
DevTekVE
52ea16a93a Update log file size calculation method
The code for calculating the size of the log file has been revised. Instead of using os.path.getsize, which simply captures the size of the file on disk, we're now calculating the size of the payload after it has been serialized and encoded, plus an overhead of 100 bytes. This change provides a more accurate measure of the data that will be sent.
2024-05-28 14:14:22 +02:00
DevTekVE
753bcce9a7 Implement compression and encoding for large log files
The `add_log_to_queue` function has been updated to compress and base64 encode log files that exceed a certain size, specifically for the "sunnylink" scenario. This function also provides logging for various stages of the process, including initial file size, size post-compression/encoding, and whether the final payload is small enough to be sent in one request. The change will improve handle of larger log files and prevent payload size related issues.
2024-05-28 12:20:19 +02:00
DevTekVE
091e5d1343 Adjust maximum chunk size in athenad.py
This commit decreases the maximum chunk size from 32KB to 28KB in the add_log_to_queue function in athenad.py. This size reduction will affect how the log files are loaded and processed.
2024-05-27 22:51:27 +02:00
DevTekVE
797e273ba7 Reduce maximum chunk size in athenad.py
Updating the maximum chunk size constant in athenad.py to decrease its value from 128KB to 32KB. This change has been made to optimize the handling of log files and data transmission.
2024-05-27 22:19:39 +02:00
DevTekVE
9d79f243ff Refactor log handling and add exception handling
The changes refactor the log handling in athenad.py for more efficient processing. The log is now split into maximum chunk sizes of 128KB to prevent oversized requests. Additionally, an invalid request or response exception has been introduced for better error handling.
2024-05-27 21:51:00 +02:00
DevTekVE
e7b40f61a8 Add support for network metering and PrimeType checking in sunnylinkd
This commit introduces network metering and PrimeType checking in sunnylinkd. The implementation includes an additional threading event and a new log handler function, 'sunny_log_handler'. It defines PrimeType and metering conditions to set and clear the new threading event as part of the main processing loop in handle_long_poll function.
2024-05-27 19:44:41 +02:00
Jason Wen
51cc39c74c Merge branch 'master-priv' into master-dev-c3 2024-05-26 23:45:42 -04:00
DevTekVE
86ce2bc791 Remove unused import in sunnylinkd.py
The unused import, LOG_ATTR_NAME, in the file selfdrive/athena/sunnylinkd.py has been removed to provide cleaner, simpler, and more readable code. This also helps follow good coding practices such as removing unnecessary or unused imports or resources.
2024-05-26 23:55:41 +02:00
DevTekVE
b56692bd2e Add platform-specific xattr handling in loggerd
This commit adapts the xattr handling in the loggerd module to individual platforms, specifically macOS and others. It imports specific xattr functions based on the running system, enhancing compatibility and reducing the risk of errors. In specific, 'ENOATTR' error is now also taken into account which is relevant in some non-Linux platforms.
2024-05-26 23:53:04 +02:00
DevTekVE
f1a3149551 Update attribute name for Sunnylink log upload
The attribute name used for Sunnylink's log upload function was modified. The new attribute name "user.sunny.upload" replaces the previous "sunnylink.user.upload" to reflect recent changes in naming convention.
2024-05-26 23:53:04 +02:00
DevTekVE
a366d5b873 Add custom attribute name for Sunnylink logs
The commit introduces a custom attribute name for Sunnylink log entries. The custom attribute name 'sunnylink.user.upload' is used for all operations in the athenad.py and sunnylinkd.py files that previously referred to the default LOG_ATTR_NAME. This will allow more flexibility in handling logs specific to Sunnylink.
2024-05-26 23:53:04 +02:00
DevTekVE
060b8f084d Enable log_handler in sunnylinkd.py
The 'log_handler' thread in sunnylinkd.py was previously commented out and has now been enabled for execution. This update will allow the 'log_handler' to perform its task in the thread execution sequence.
2024-05-26 23:53:04 +02:00
Jason Wen
f4d5443abe Merge branch 'ui-buttonparamcontrol-fix' into master-dev-c3 2024-05-24 02:41:39 -04:00
Jason Wen
51f815deb0 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-24 02:41:34 -04:00
Jason Wen
1b91d952bd Merge branch 'SP-130-hkg-can-long-radar-tracks-fix' into master-dev-c3 2024-05-24 02:04:35 -04:00
Jason Wen
4e3a3cb72d return RadarInterface superclass 2024-05-24 02:04:27 -04:00
Jason Wen
4c48000d0e Merge branch 'SP-130-hkg-can-long-radar-tracks-fix' into master-dev-c3 2024-05-24 01:56:46 -04:00
Jason Wen
a5e5e82d0d only set flag to false if no radar dbc assigned 2024-05-24 01:56:36 -04:00
Jason Wen
096bc72465 Merge branch 'master-priv' into SP-130-hkg-can-long-radar-tracks-fix 2024-05-24 01:41:54 -04:00
Jason Wen
ceae1ac88f Merge branch 'master-priv' into master-dev-c3 2024-05-24 01:02:59 -04:00
Jason Wen
6af6642183 fix 2024-05-24 01:00:31 -04:00
Jason Wen
9661104ed2 Merge branch 'SP-130-hkg-can-long-radar-tracks-fix' into master-dev-c3 2024-05-24 00:57:54 -04:00
Jason Wen
a6687d8193 return empty rr if can error due to missing tracks 2024-05-24 00:57:37 -04:00
Jason Wen
f867537c5a Merge branch 'master-priv' into master-dev-c3 2024-05-24 00:38:44 -04:00
Jason Wen
a468c660b6 Merge branch 'SP-35-model-selector-clear-params' into master-dev-c3 2024-05-24 00:17:20 -04:00
Jason Wen
e3becc2867 Merge branch 'SP-130-hkg-can-long-radar-tracks-fix' into master-dev-c3 2024-05-23 17:50:46 -04:00
Jason Wen
f02c4007d4 Hyundai CAN Longitudinal: Lenient parsing for auto-enabled radar configs 2024-05-23 17:50:35 -04:00
Jason Wen
5eccc47203 Merge branch 'improved-model-cabapilities-check' into master-dev-c3 2024-05-23 13:58:20 -04:00
Jason Wen
0c5b37c981 Merge branch 'master-priv' into improved-model-cabapilities-check 2024-05-23 13:58:07 -04:00
Jason Wen
4ff9eef6b1 Merge branch 'more-responsive-model-fetcher' into master-dev-c3 2024-05-23 13:57:48 -04:00
Jason Wen
1998474f67 Merge branch 'master-priv' into more-responsive-model-fetcher 2024-05-23 13:56:56 -04:00
Jason Wen
9678924263 Merge branch 'master-priv' into master-dev-c3 2024-05-23 13:40:46 -04:00
Jason Wen
37c29f710a Merge branch 'SP-128-ui-visuals-freeze-fix' into master-dev-c3 2024-05-23 13:34:21 -04:00
Jason Wen
255699c7ef Merge branch 'master-priv' into SP-128-ui-visuals-freeze-fix 2024-05-23 13:33:54 -04:00
Jason Wen
3551e7c4bc ui: ButtonParamControl: Handle out of bound param 2024-05-23 13:33:18 -04:00
DevTekVE
6355e81432 Merge branch 'refs/heads/more-responsive-model-fetcher' into master-dev-c3 2024-05-19 21:58:38 +02:00
DevTekVE
b659a979ed Change base class of ModelCapabilities from IntEnum to IntFlag
In model_capabilities.py, the base class of ModelCapabilities has been changed from IntEnum to IntFlag to better suit requirements. This changes how the enumeration values behave and interact.
2024-05-19 21:50:10 +02:00
DevTekVE
00bff6ca48 Merge branch 'refs/heads/master-priv' into improved-model-cabapilities-check
# Conflicts:
#	selfdrive/modeld/modeld.py
2024-05-19 21:32:20 +02:00
DevTekVE
a2cd756541 Merge branch 'refs/heads/master-priv' into master-dev-c3 2024-05-19 21:24:05 +02:00
DevTekVE
62af3b760c Refactor model capabilities and update model inputs
Expanded the ModelCapabilities class to better represent different model generations and their unique features. The alterations split the "DesiredCurvature" capability into two versions, "DesiredCurvatureV1" and "DesiredCurvatureV2", which have different input parameters. This change also involves updates in the "modeld.py" where conditions checking for "DesiredCurvature" are updated to check for the correct versions.
2024-05-19 17:37:23 +02:00
DevTekVE
97c7f5599f Merge branch 'refs/heads/ensure-if-model-gen-0-not-nav-features' into master-dev-c3
# Conflicts:
#	selfdrive/modeld/modeld.py
2024-05-19 16:53:59 +02:00
DevTekVE
68ae65bfa9 Update model generation conditions in modeld.py and map.cc
This commit updates the conditions for the model generation within the modeld.py and map.cc files. Previously, the code was specifically excluding model generation 4, but now it excludes model generations 0 and 4. This might affect features like navigation and model parameters processing.
2024-05-19 16:53:01 +02:00
DevTekVE
34130bb7cb Check model capabilities when using custom model
The use of a custom model is now conditional to non-default model capabilities. This change ensures that a custom model will only be used if the model capabilities are different from the default. This prevents potential issues with using custom models that don't have any distinct capabilities or are not suitable for the current application.
2024-05-18 23:32:07 +02:00
DevTekVE
8904cf731a Introduce ModelCapabilities class for model feature handling
This commit introduces a new class, ModelCapabilities, to manage model features. It changes initializations and conditional statements to use this new class, improving code readability and simplicity. The new class provides an easier and clearer way to check which features are enabled, reducing the complexity associated with generation-dependent feature handling.
2024-05-18 22:29:11 +02:00
DevTekVE
80bf5a24ca Improve progress display for model downloads
The progress indication for downloading of driving, navigation, and metadata models has been improved. We now display "PENDING" if the progress is 0.01 or less instead of showing 0%. This change gives a more intuitive indication to the users during model downloads.
2024-05-18 21:52:53 +02:00
DevTekVE
094be8ce97 Merge branch 'refs/heads/default-params-for-custom-driving-models' into master-dev-c3 2024-05-18 19:13:29 +02:00
DevTekVE
47fd6fca3d Add default values for DrivingModel parameters
The latest change includes additional default settings for the "CustomDrivingModel" and "DrivingModelGeneration" parameters. These settings were added to the default_params list within the manager.py script to ensure correct functioning under default conditions.
2024-05-18 19:12:31 +02:00
DevTekVE
76c506479d Merge branch 'refs/heads/bugfix-modeld-wrong-logic' into master-dev-c3 2024-05-18 18:50:59 +02:00
DevTekVE
422773bb9f Refactor model generation condition in modeld.py
Fixed the conditional statement checking the model generation and custom model status in modeld.py. Now, the navigation features and instructions are only updated if a custom model is being used and the model generation is not 4.
2024-05-18 18:50:32 +02:00
Jason Wen
f77f86bf36 Merge branch 'ui-visuals-freeze-fix' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-18 10:40:42 -04:00
Jason Wen
536c73d00b ui: Visuals: Fix freezing 2024-05-18 10:40:12 -04:00
Jason Wen
e05a3e135c Merge branch 'master-priv' into master-dev-c3 2024-05-17 20:03:54 -04:00
Jason Wen
00e3bd0259 Merge branch 'sentry-more-tags' into master-dev-c3 2024-05-17 19:48:51 -04:00
Jason Wen
ecafb03111 Merge branch 'SP-120-ui-slc-fix' into master-dev-c3 2024-05-17 19:48:48 -04:00
Jason Wen
538ac6b980 ui: SLC: Fix "Customize Speed Limit Control" submenu button visibility 2024-05-17 19:47:59 -04:00
Jason Wen
22d021cf24 Merge branch 'master-priv' into master-dev-c3 2024-05-17 19:38:18 -04:00
Jason Wen
d08e432637 Merge branch 'nnlc-lateral-jerk' into master-dev-c3 2024-05-17 13:17:58 -04:00
Jason Wen
fadcad8793 init at 0 2024-05-17 13:17:49 -04:00
Jason Wen
8087891bd0 Merge branch 'master-priv' into nnlc-lateral-jerk 2024-05-17 13:17:08 -04:00
Jason Wen
7dbe3967df Merge branch 'vw-non-acc-fix' into master-dev-c3 2024-05-17 13:05:14 -04:00
Jason Wen
5df451aa83 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	selfdrive/ui/qt/offroad/sunnypilot/sunnylink_settings.cc
2024-05-17 13:05:10 -04:00
DevTekVE
b9e2d4ec19 Merge branch 'refs/heads/sunnylink-for-all' into master-dev-c3 2024-05-17 18:29:54 +02:00
DevTekVE
82a4fea539 Remove sponsor check for restoring sunnypilot settings
This commit removes the clause checking whether the user is a Sunnylink sponsor before proceeding with the restoration of sunnypilot settings. Now, all users, regardless of their sponsorship status, can restore their sunnypilot settings. The related prompts and UI elements have also been cleaned up accordingly.
2024-05-17 18:29:20 +02:00
Jason Wen
34e1b8f36f Sentry: Add sunnylink_dongle_id tag 2024-05-17 11:49:19 -04:00
Jason Wen
25e89cf887 Merge branch 'master-priv' into sentry-sunnylink 2024-05-17 10:48:23 -04:00
Jason Wen
5c6cc44495 Merge branch 'ui-visual-fix' into master-dev-c3 2024-05-17 10:45:59 -04:00
Jason Wen
6ca20884d2 Manager: Initialize SidebarTemperatureOptions 2024-05-17 10:45:37 -04:00
Jason Wen
18fb3d6ab2 Merge branch 'navmodeld-fix' into master-dev-c3 2024-05-17 10:18:23 -04:00
Jason Wen
ecaea1ef78 NoO: Only start processes if NoO-enabled models are selected 2024-05-17 10:18:03 -04:00
Jason Wen
c8473fd54e Merge branch 'more-platform-fix' into master-dev-c3 2024-05-17 10:10:03 -04:00
Jason Wen
afb91322e1 use different list 2024-05-17 10:09:55 -04:00
Jason Wen
ecd6934cbe Merge branch 'more-platform-fix' into master-dev-c3 2024-05-17 09:59:40 -04:00
Jason Wen
ae964e0162 Honda Platform: Remove redundant code 2024-05-17 09:59:29 -04:00
Jason Wen
fa68a51e87 Merge branch 'SP-123-hkg-can-long-radar-tracks-all' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-17 03:17:53 -04:00
Jason Wen
e9bd81699e Update CHANGELOGS.md 2024-05-17 03:17:28 -04:00
Jason Wen
ab3c8dc294 Merge branch 'SP-123-hkg-can-long-radar-tracks-all' into master-dev-c3 2024-05-17 03:15:43 -04:00
Jason Wen
7f9f461942 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
2024-05-17 03:15:38 -04:00
Jason Wen
e234b72aa6 Hyundai CAN Longitudinal: Auto-enable radar tracks on platforms with Mando radar 2024-05-17 03:14:25 -04:00
Jason Wen
363f9c03f6 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	CHANGELOGS.md
#	selfdrive/car/hyundai/interface.py
2024-05-17 00:50:18 -04:00
Jason Wen
0f8661b434 Merge branch 'upstream-fixes' into master-dev-c3 2024-05-17 00:27:47 -04:00
Jason Wen
304311e078 Unused 2024-05-17 00:27:35 -04:00
Jason Wen
1428bb4cce Merge branch 'upstream-fixes' into master-dev-c3 2024-05-17 00:24:44 -04:00
Jason Wen
cab8c62e96 Controlsd: Fix edge_toggle variable and leadDistanceBar parsing with SP values 2024-05-17 00:24:28 -04:00
Jason Wen
f106b2ca9c Merge branch 'SP-121-upstream-platform-fixes' into master-dev-c3 2024-05-16 23:41:38 -04:00
Jason Wen
0954a0191e Merge branch 'master-priv-ford-traffic-signs' into master-dev-c3 2024-05-16 23:27:49 -04:00
Jason Wen
25b4ef7833 int flag fix 2024-05-16 23:27:40 -04:00
Jason Wen
01439b2ad1 Merge branch 'master-priv' into master-dev-c3 2024-05-16 23:06:01 -04:00
Jason Wen
24c331a6eb Merge branch 'cslc-hkg-fix' into master-dev-c3 2024-05-16 22:22:38 -04:00
Jason Wen
3c18f2babb Merge branch 'no-dcam-loggerd-ram' into master-dev-c3 2024-05-16 13:04:00 -04:00
Jason Wen
6a05e2267d dcam: do not log dcam-related things for unofficial devices with no dcam 2024-05-16 13:03:50 -04:00
Jason Wen
2188a915b6 Merge branch 'master-priv' into master-dev-c3 2024-05-16 12:45:35 -04:00
Jason Wen
2efb958727 Merge branch 'ford-q3-radar' into master-dev-c3-new 2024-05-16 11:05:14 -04:00
Jason Wen
6c50176787 Flipped platform 2024-05-16 11:04:36 -04:00
Jason Wen
ffa4744cbe Merge branch 'SP-64-ui-force-offroad' into master-dev-c3-new
# Conflicts:
#	CHANGELOGS.md
2024-05-16 11:03:00 -04:00
Jason Wen
fae405317e Merge branch 'master-priv-sunnylink-sidebar-status' into master-dev-c3-new
# Conflicts:
#	CHANGELOGS.md
2024-05-16 11:02:44 -04:00
Jason Wen
94f8f5a92c Merge branch 'mapd-update-1.9.0' into master-dev-c3-new 2024-05-16 11:02:22 -04:00
Jason Wen
a9da225e80 Merge branch 'disable-on-screen-recorder' into master-dev-c3-new 2024-05-16 11:02:15 -04:00
Jason Wen
874e8ce8e2 Merge branch 'nnlc-lateral-jerk' into master-dev-c3-new 2024-05-16 11:02:07 -04:00
Jason Wen
54e97eec07 Merge branch 'master-priv-ford-lat' into master-dev-c3-new
# Conflicts:
#	panda
#	selfdrive/car/ford/interface.py
2024-05-16 11:01:54 -04:00
Jason Wen
bab98e9c56 Merge branch 'master-priv-ford-traffic-signs' into master-dev-c3-new
# Conflicts:
#	CHANGELOGS.md
2024-05-16 11:01:23 -04:00
Jason Wen
e69a687ae3 Merge branch 'master-priv-ford' into master-dev-c3-new
# Conflicts:
#	panda
2024-05-16 11:01:01 -04:00
Jason Wen
2b1e79565c Merge branch 'custom-stock-long-planner-speed-allow-experiemtnal' into master-dev-c3-new 2024-05-16 11:00:36 -04:00
Jason Wen
31a7b6c329 Merge branch 'custom-stock-long-planner-speed' into custom-stock-long-planner-speed-allow-experiemtnal 2024-05-16 11:00:04 -04:00
Jason Wen
bafd4fe913 Merge branch 'hkg-canfd-camera-scc-long-lead' into master-dev-c3-new
# Conflicts:
#	CHANGELOGS.md
#	selfdrive/car/hyundai/interface.py
2024-05-16 10:59:17 -04:00
Jason Wen
298da42918 Update CHANGELOGS.md 2024-05-16 10:58:25 -04:00
Jason Wen
600c1d06f7 Merge branch 'custom-stock-long-planner-speed' into master-dev-c3-new 2024-05-16 10:54:44 -04:00
Jason Wen
0758881350 Merge branch 'hkg-canfd-all-long' into master-dev-c3-new
# Conflicts:
#	panda
2024-05-16 10:54:32 -04:00
Jason Wen
9d322662ef Merge branch 'ev6-taco' into master-dev-c3-new
# Conflicts:
#	panda
2024-05-16 10:54:17 -04:00
Jason Wen
bba16d6822 Merge branch 'subaru-gen2-torque-increase' into master-dev-c3-new 2024-05-16 10:51:47 -04:00
Jason Wen
21571e99c5 Merge branch 'master-priv-ford' into ford-q3-radar 2024-05-16 10:47:34 -04:00
Jason Wen
1dec79083d Merge branch 'master-priv' into SP-64-ui-force-offroad
# Conflicts:
#	CHANGELOGS.md
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/qt/offroad/settings.h
2024-05-16 02:28:17 -04:00
Jason Wen
a76a1f98ec Merge branch 'master-priv' into master-priv-sunnylink-sidebar-status 2024-05-16 02:18:35 -04:00
Jason Wen
83666c79fa Merge branch 'master-priv' into mapd-update-1.9.0
# Conflicts:
#	CHANGELOGS.md
2024-05-16 02:17:51 -04:00
Jason Wen
ac921c6ee6 Merge branch 'master-priv' into disable-on-screen-recorder 2024-05-16 02:16:58 -04:00
Jason Wen
0fb93cec60 Merge branch 'master-priv' into nnlc-lateral-jerk
# Conflicts:
#	CHANGELOGS.md
2024-05-16 02:16:11 -04:00
Jason Wen
17b7f0bdba before flag is set 2024-05-16 02:10:40 -04:00
Jason Wen
b01d6d423a update flag 2024-05-16 02:09:32 -04:00
Jason Wen
a2b0275e37 bump panda 2024-05-16 02:07:31 -04:00
Jason Wen
08fa5159f6 Merge branch 'master-priv' into master-priv-ford-lat
# Conflicts:
#	selfdrive/car/ford/carcontroller.py
#	selfdrive/car/ford/interface.py
#	selfdrive/car/ford/values.py
2024-05-16 02:07:00 -04:00
Jason Wen
79252b6b5a Update CHANGELOGS.md 2024-05-16 02:03:17 -04:00
Jason Wen
cdf0bdfe15 Merge branch 'master-priv' into master-priv-ford-traffic-signs
# Conflicts:
#	selfdrive/car/ford/carstate.py
2024-05-16 02:02:55 -04:00
Jason Wen
2833cf9d48 Update CHANGELOGS.md 2024-05-16 02:01:34 -04:00
Jason Wen
d852e4a4f0 FCR: sync with upstream supported car platforms 2024-05-16 02:00:38 -04:00
Jason Wen
f35a76dc14 Merge branch 'master-priv' into master-priv-ford
# Conflicts:
#	panda
#	selfdrive/car/ford/interface.py
#	selfdrive/car/ford/values.py
#	selfdrive/car/sunnypilot_carname.json
#	selfdrive/car/tests/routes.py
2024-05-16 01:59:30 -04:00
Jason Wen
b1715b470a Merge branch 'master-priv' into hkg-canfd-camera-scc-long-lead
# Conflicts:
#	CHANGELOGS.md
#	opendbc
2024-05-16 01:44:19 -04:00
Jason Wen
c8c4f2296d Merge branch 'master-priv' into custom-stock-long-planner-speed
# Conflicts:
#	common/params.cc
#	selfdrive/controls/controlsd.py
#	selfdrive/ui/qt/onroad/annotated_camera.cc
2024-05-16 01:40:56 -04:00
Jason Wen
8b20794fe3 Update CHANGELOGS.md 2024-05-16 01:37:49 -04:00
Jason Wen
95fc2810c7 Merge branch 'master-priv' into hkg-canfd-all-long
# Conflicts:
#	CHANGELOGS.md
2024-05-16 01:35:26 -04:00
Jason Wen
2f9e9faea5 Merge branch 'master-priv' into ev6-taco
# Conflicts:
#	CHANGELOGS.md
2024-05-16 01:34:46 -04:00
Jason Wen
e23e925d1a Merge branch 'master-priv' into subaru-gen2-torque-increase
# Conflicts:
#	CHANGELOGS.md
2024-05-16 01:34:07 -04:00
Jason Wen
836e7d5c6d Merge branch 'SP-59-sync-priv-20240507' into hkg-canfd-all-long
# Conflicts:
#	panda
2024-05-16 01:27:46 -04:00
Jason Wen
18f62b1c5b Merge branch 'SP-59-sync-priv-20240507' into ev6-taco
# Conflicts:
#	panda
#	selfdrive/car/hyundai/interface.py
#	selfdrive/car/hyundai/values.py
2024-05-16 01:26:37 -04:00
Jason Wen
2db0a9cffa bump to 1600 2024-05-16 01:24:53 -04:00
Jason Wen
8f37e795c9 Merge branch 'SP-59-sync-priv-20240507' into subaru-gen2-torque-increase
# Conflicts:
#	panda
#	selfdrive/car/subaru/values.py
2024-05-16 01:24:17 -04:00
Jason Wen
d0761ddcd4 Update CHANGELOGS.md 2024-05-16 00:37:40 -04:00
Jason Wen
8f3ca7a9b2 do we need this to close the relay? 2024-04-21 12:33:59 -04:00
Jason Wen
1d18524218 disable screen recorder again 2024-04-20 01:40:58 -04:00
Jason Wen
4757364fa9 lint 2024-04-20 01:40:06 -04:00
Jason Wen
b8d2e90e62 add same comments 2024-04-20 01:39:05 -04:00
Jason Wen
da14ac9bff lint 2024-04-20 01:37:42 -04:00
Jason Wen
1ba739c372 less 2024-04-20 01:36:09 -04:00
Jason Wen
71b489a095 Handle button style properly 2024-04-20 01:35:16 -04:00
Jason Wen
b4cb35fd23 Nuke and force immediately for all errors 2024-04-19 14:19:26 -04:00
Jason Wen
1d19029f19 cleaner 2024-04-19 11:59:58 -04:00
Jason Wen
2bbb420d28 Transition to offroad 2024-04-19 11:55:32 -04:00
Jason Wen
f3e450db85 Update CHANGELOGS.md 2024-04-18 18:22:26 -04:00
Jason Wen
5c5cc631bb More professional wording 2024-04-18 17:33:33 -04:00
Jason Wen
f5cd0b91ed do this dynamically 2024-04-18 17:11:36 -04:00
Jason Wen
92a0777aa7 use this 2024-04-18 17:07:38 -04:00
Jason Wen
c0f46cd44a do this instead, and flip the logics 2024-04-18 17:06:41 -04:00
Jason Wen
4abdf85dd1 use the param instead 2024-04-18 17:01:27 -04:00
Jason Wen
7371b7aad5 wrong int flag 2024-04-18 16:59:45 -04:00
Jason Wen
49ab5a1ca2 change it up 2024-04-18 16:59:19 -04:00
Jason Wen
2030196c8c show button at all times 2024-04-18 16:55:55 -04:00
Jason Wen
3071744acd only display message when forced 2024-04-18 16:54:46 -04:00
Jason Wen
2f4f0a7c16 display message when forced offroad 2024-04-18 16:50:34 -04:00
Jason Wen
fef46d3093 wtf 2024-04-18 12:41:15 -04:00
Jason Wen
819e5660e8 Revert "Impossible condition"
This reverts commit d2c242b17c.
2024-04-18 12:41:10 -04:00
Jason Wen
d2c242b17c Impossible condition 2024-04-18 12:37:57 -04:00
Jason Wen
153b8b8bff Add this check too 2024-04-18 12:29:02 -04:00
Jason Wen
c6bf6886cf ui: Force offroad from settings when the car is on 2024-04-18 01:01:18 -04:00
Jason Wen
0fce0cbd2f Merge branch 'master-priv' into disable-on-screen-recorder 2024-04-17 22:32:33 -04:00
DevTekVE
ba9fb8af6b Add sunnylink connectivity status to changelog
In the update information for the changelog, a record of the new feature displaying the sunnylink connectivity status on the left sidebar has been added. This lets users and developers quickly see that this change has been implemented.
2024-04-13 17:23:52 +00:00
DevTekVE
abdb9e64d0 Add disabled state to sidebar status items
A new disabled color has been added to the sidebar items. This change primarily impacts the 'Sunnylink' status where a new state has been introduced. Now, when 'Sunnylink' is not enabled, it will show as 'DISABLED' in the disabled color.
2024-04-13 17:23:52 +00:00
DevTekVE
a177818e58 Add Sunnylink status to Sidebar UI
Included a new 'ItemStatus' variable, 'sunnylinkStatus', to the Sidebar class and draw its metric in the UI. The status is determined by the value of 'LastSunnylinkPingTime', turning Sunnylink offline if it equals 0, online if the ping time is less than 80e9, and displaying an error otherwise.
2024-04-13 17:23:52 +00:00
Jason Wen
33f0bd323b only skip assert and force start if OMX_ErrorInsufficientResources 2024-04-12 00:39:56 -04:00
Jason Wen
452808f550 lib 2024-04-12 00:35:44 -04:00
Jason Wen
23e5165959 Re-enable 2024-04-12 00:27:42 -04:00
Jason Wen
caed4b34cb Do this if error is triggered 2024-04-12 00:25:57 -04:00
Jason Wen
87bfd47a59 Trigger fast UI restart directly in OMX if err != 0 2024-04-12 00:19:24 -04:00
Jason Wen
531a75134f Gate behind flag 2024-04-12 00:11:30 -04:00
Jason Wen
7ea3136d4f Merge branch 'master-priv' into disable-on-screen-recorder 2024-04-12 00:09:27 -04:00
DevTekVE
dcb786675f updating changelog nicely 2024-04-08 19:12:01 +02:00
DevTekVE
a26bb62ed0 Bumping mapd to v1.9.0 2024-04-08 19:08:25 +02:00
DevTekVE
7376ac960a nuking the option on the settings too 2024-04-04 16:34:00 +02:00
DevTekVE
058487c0a4 disable on screen recorder 2024-04-04 16:23:47 +02:00
Jason Wen
9777d74a74 Update CHANGELOGS.md 2024-03-26 17:50:48 -04:00
Jason Wen
7153a7bb84 NNLC: "Lazy" tight curve fixes and more toggles 2024-03-26 17:49:01 -04:00
Isaac Barham
709bbc8857 Update values.py 2024-03-11 14:14:50 +00:00
Isaac Barham
01ba44eb3f Update radar_interface.py 2024-03-11 14:10:55 +00:00
Isaac Barham
6e2ba55a99 Update interface.py 2024-02-20 22:37:54 -05:00
Isaac Barham
9d91771822 Update values.py 2024-02-20 22:37:37 -05:00
Isaac
f5374f6e89 Cherry pick 2024-02-20 22:37:13 -05:00
Isaac Barham
bda7a60f86 Updating Car Controller 2024-02-20 22:32:04 -05:00
Isaac
4653f530d2 Revert "Update carcontroller.py"
This reverts commit c0c461862c.
2024-02-20 22:30:23 -05:00
Isaac Barham
c0c461862c Update carcontroller.py 2024-02-20 22:29:20 -05:00
Jason Wen
05d9e81a0c Update CHANGELOGS.md 2024-02-16 07:24:55 -05:00
Jason Wen
fa9e2ddf4e Merge branch 'dev-priv/master-priv' into master-priv-ford-traffic-signs 2024-02-15 15:47:48 -05:00
Jason Wen
c260944a2d Merge branch 'dev-priv/master-priv' into master-priv-ford
# Conflicts:
#	selfdrive/car/torque_data/override.yaml
2024-02-15 15:47:07 -05:00
Jason Wen
d474db7799 Merge branch 'dev-priv/master-priv' into hkg-canfd-camera-scc-long-lead
# Conflicts:
#	CHANGELOGS.md
2024-02-15 15:46:19 -05:00
Jason Wen
ab6b12699a Merge branch 'dev-priv/master-priv' into custom-stock-long-planner-speed 2024-02-15 15:45:13 -05:00
Jason Wen
aa04ec3ffc Merge branch 'dev-priv/master-priv' into hkg-canfd-all-long 2024-02-15 15:41:48 -05:00
Jason Wen
0fce74c408 Merge branch 'dev-priv/master-priv' into ev6-taco 2024-02-15 15:41:33 -05:00
Jason Wen
df791f8fe6 Merge branch 'dev-priv/master-priv' into subaru-gen2-torque-increase 2024-02-15 15:41:13 -05:00
Jason Wen
e1b98b5df3 Fix sync conflict 2024-02-13 14:17:17 -05:00
Isaac
010ac077c1 Merging upstream 2024-02-12 22:18:43 -05:00
Jason Wen
6097be261e Merge branch 'sync-priv-20240201' into master-priv-ford-traffic-signs 2024-02-12 21:59:07 -05:00
Jason Wen
5e8ef25498 Merge branch 'sync-priv-20240201' into hkg-canfd-camera-scc-long-lead
# Conflicts:
#	CHANGELOGS.md
#	opendbc
#	selfdrive/car/hyundai/interface.py
2024-02-12 21:26:29 -05:00
Jason Wen
ad49c52513 Merge branch 'sync-priv-20240201' into custom-stock-long-planner-speed
# Conflicts:
#	selfdrive/controls/controlsd.py
2024-02-12 21:18:01 -05:00
Jason Wen
0c1cf6b5e7 Merge branch 'sync-priv-20240201' into hkg-canfd-all-long 2024-02-12 21:17:16 -05:00
Jason Wen
c986b3587e Merge branch 'sync-priv-20240201' into ev6-taco 2024-02-12 21:17:08 -05:00
Jason Wen
7cb0ab83cd Merge branch 'sync-priv-20240201' into subaru-gen2-torque-increase 2024-02-12 21:16:59 -05:00
Jason Wen
a2d8799071 Merge branch 'sync-priv-20240201' into hkg-canfd-all-long
# Conflicts:
#	panda
#	selfdrive/car/hyundai/interface.py
2024-02-12 21:14:19 -05:00
Jason Wen
6e478aedf3 Merge branch 'sync-priv-20240201' into ev6-taco
# Conflicts:
#	panda
#	selfdrive/car/hyundai/interface.py
2024-02-12 21:11:44 -05:00
Jason Wen
4119371a90 Merge branch 'sync-priv-20240201' into subaru-gen2-torque-increase
# Conflicts:
#	panda
2024-02-12 21:10:03 -05:00
Jason Wen
cdc13293ae hoomoose dongle 2023-12-21 00:26:26 -05:00
Jason Wen
e78a072676 Merge branch 'dev-priv/master-priv' into ev6-taco
# Conflicts:
#	panda
#	selfdrive/car/hyundai/values.py
2023-12-21 00:25:33 -05:00
Isaac Barham
e34ec127d1 Update carstate.py 2023-12-20 13:57:11 +00:00
Jason Wen
3aa30a5c59 Update CHANGELOGS.md 2023-12-20 13:57:11 +00:00
Jason Wen
1cf45623f1 more cleanup 2023-12-20 13:57:11 +00:00
Jason Wen
c66f3492c5 cleanup 2023-12-20 13:57:11 +00:00
Isaac
b6f1a5c429 Fixed naming 2023-12-20 13:57:11 +00:00
Isaac
39b2dcdc0f Added speed sign recognition on CAN-FD Ford 2023-12-20 13:57:11 +00:00
Jason Wen
8783bcd755 Merge branch 'dev-priv/master-priv' into master-priv-ford 2023-12-09 16:36:23 -05:00
Jason Wen
09f10362f3 Merge branch 'dev-priv/master-priv' into master-priv-ford 2023-12-07 19:44:40 -05:00
Jason Wen
4d5a6d3ece Merge branch 'dev-priv/master-priv' into hkg-canfd-camera-scc-long-lead
# Conflicts:
#	CHANGELOGS.md
2023-12-07 19:41:52 -05:00
Jason Wen
3196ade663 oops by issac ;) 2023-12-07 17:33:11 -05:00
Jason Wen
71de09824c bump panda 2023-12-07 11:44:08 -05:00
Jason Wen
bb940d1a78 Update FCR and CHANGELOGS.md 2023-12-07 11:43:19 -05:00
Jason Wen
4cc25d4c76 Merge branch 'dev-priv/master-priv' into master-priv-ford 2023-12-07 11:32:38 -05:00
Isaac Barham
2b0bec9e65 Updated to include deadzone for stopping 2023-12-05 20:10:18 +00:00
Isaac
985778c3e3 Added changes to add CAN-FD support for Ford 2023-12-04 00:30:37 -05:00
Isaac
56f69e8435 Adding changes back without spacing
(cherry picked from commit 8112017f9290bf02d936dd3869579a662a1fcc27)
2023-12-04 05:22:45 +00:00
DevTekVE
bfb02ca7f9 Add connection to ExperimentalMode toggle
This change introduces a connection to the "ExperimentalMode" toggle in the settings.cc file. Whenever the toggle state is flipped, the `updateToggles()` function will be called, maintaining the consistency of toggle update behavior across different settings.

Update dec_toggle enablement criteria

The changes in the code modified the condition for enabling the dec_toggle. Instead of relying on the status of custom_stock_long_planner, dec_toggle will now depend on the toggle status of experimental_mode_toggle. This will ensure the dec_toggle is only enabled when the experimental mode is active.

Enable dec_toggle based on custom_stock_long_planner status

The dec_toggle in the selfdrive user interface now mirrors the enabled status of the custom_stock_long_planner. Whenever the stock long planner toggle is switched, it will automatically enable or disable the dec_toggle.

update also experiemental to disable if no custom stock with planner speed

Update CustomStockLongPlanner settings interface

The interface for the CustomStockLongPlanner function has been updated to improve usability. A new connection to "toggleFlipped" signal was added, allowing real-time settings update. The planner is also now enabled when the long_personality_setting is toggled on. Additionally, the refresh function call for the planner has been added to ensure correct display of current settings. However, the removal of "ExperimentalMode" is now conditional, taking place only if the planner is not toggled on.
2023-12-02 13:45:16 +01:00
Jason Wen
e76b2d449f Update CHANGELOGS.md 2023-11-23 15:57:15 -05:00
Jason Wen
489661f182 allow all camera SCC platforms 2023-11-23 15:56:05 -05:00
Jason Wen
f017780506 bruh wrong flag! 2023-11-23 12:53:09 -05:00
Jason Wen
e6366ff5a2 maybe? 2023-11-22 20:20:04 -05:00
Jason Wen
1759c5e884 use ACC_ObjDist to detect lead 2023-11-22 15:10:04 -05:00
Jason Wen
f97df7ed87 only tucson hev 4th gen 2023-11-22 15:00:33 -05:00
Jason Wen
6c70ed0aab Hyundai CAN-FD: Lead Relative Speed for camara-based SCC platforms 2023-11-21 13:42:54 -05:00
Jason Wen
3711d5e91a Hyundai CAN-FD Longitudinal: Parse lead info for camera-based SCC platforms 2023-11-21 13:36:13 -05:00
Jason Wen
1add9975bd set to false if OP long 2023-11-14 01:32:14 -05:00
Jason Wen
e1e401a8f4 Merge branch 'dev-priv/master-priv' into custom-stock-long-planner-speed 2023-11-14 01:30:11 -05:00
Jason Wen
8f1de6b9e2 Revert "lat planner retune"
This reverts commit 1088d425f4.
2023-11-12 00:32:26 -05:00
Jason Wen
e4b9e7d07a don't check at 100 hz 2023-10-31 20:55:16 -04:00
Jason Wen
95d111bb20 var changes 2023-10-31 19:28:55 -04:00
Jason Wen
2ac06e8c5c Merge branch 'dev-priv/master-priv' into custom-stock-long-planner-speed
# Conflicts:
#	selfdrive/ui/qt/offroad/settings.cc
#	selfdrive/ui/qt/onroad_settings.cc
2023-10-31 19:07:01 -04:00
DevTekVE
cf1e01cf45 Merge branch 'master-priv' into custom-stock-long-planner-speed
# Conflicts:
#	selfdrive/car/hyundai/carcontroller.py
2023-10-22 17:26:32 +02:00
Jason Wen
023ee34771 allow dec change 2023-10-04 17:51:57 -04:00
Jason Wen
4af030b881 Merge branch 'dev-priv/master-priv' into custom-stock-long-planner-speed 2023-10-04 17:50:05 -04:00
Jason Wen
b1c05548c4 allow experimental mode 2023-10-03 20:55:04 -04:00
Jason Wen
f5910661cc convert back 2023-10-03 20:54:29 -04:00
Jason Wen
ac5a4b3ed5 Merge branch 'dev-priv/master-priv' into custom-stock-long-planner-speed 2023-10-03 17:52:07 -04:00
Jason Wen
6bb5c5166f Custom Stock Longitudinal Control: Use planner speed 2023-10-03 17:07:31 -04:00
Jason Wen
95ef2c09bb Merge branch 'dev-priv/master' into subaru-gen2-torque-increase
# Conflicts:
#	panda
2023-10-01 03:21:51 -04:00
Jason Wen
08117150d2 Merge branch 'dev-priv/master' into hkg-canfd-all-long
# Conflicts:
#	panda
2023-10-01 03:21:33 -04:00
Jason Wen
e02d32c86f Merge branch 'dev-priv/master' into ev6-taco
# Conflicts:
#	panda
#	selfdrive/car/hyundai/values.py
2023-10-01 03:20:40 -04:00
Jason Wen
705bd1a42a Merge branch 'dev-priv/master' into subaru-gen2-torque-increase
# Conflicts:
#	panda
2023-09-29 11:01:05 -04:00
Jason Wen
40ed3377f2 Merge branch 'dev-priv/master' into ev6-taco
# Conflicts:
#	panda
2023-09-29 11:00:32 -04:00
Jason Wen
13453c6468 fixes 2023-09-29 09:04:59 -04:00
Jason Wen
132628b121 Merge branch 'dev-priv/master' into hkg-canfd-all-long
# Conflicts:
#	panda
2023-09-29 09:00:19 -04:00
Jason Wen
c035228010 Merge commaai:openpilot/30021 2023-09-25 20:35:26 -04:00
Jason Wen
70cf84e7e4 Merge branch 'dev-priv/master' into ev6-taco
# Conflicts:
#	panda
2023-09-23 00:41:52 -04:00
Jason Wen
ad07b13f23 Hyundai CAN-FD: longitudinal support for all platforms 2023-09-23 00:37:25 -04:00
Jason Wen
90b170af9a Merge branch 'dev-priv/master' into subaru-gen2-torque-increase
# Conflicts:
#	panda
2023-09-23 00:10:35 -04:00
Jason Wen
d3f58ba9d7 variable fix 2023-09-08 11:02:16 -04:00
Jason Wen
11f34056ef Merge branch 'dev-priv/master' into ev6-taco
# Conflicts:
#	panda
#	selfdrive/car/hyundai/values.py
2023-09-08 11:00:34 -04:00
Jason Wen
a91a4814cd Merge branch 'dev-priv/master' into subaru-gen2-torque-increase
# Conflicts:
#	panda
2023-09-08 10:53:20 -04:00
Jason Wen
1088d425f4 lat planner retune 2023-08-19 14:35:38 -04:00
Jason Wen
fb3991c07a Revert "use SSH to enable instead"
This reverts commit 665c4a69f4.
2023-08-18 11:33:58 -04:00
Jason Wen
b4884c720d This is why it doesn't work 2023-08-18 11:33:48 -04:00
Jason Wen
665c4a69f4 use SSH to enable instead 2023-08-18 11:07:21 -04:00
Jason Wen
f6be6beb2b use this instead 2023-08-18 10:51:31 -04:00
Jason Wen
42e842324a Try this 2023-08-18 10:43:53 -04:00
Jason Wen
4f9841302e only behind flags 2023-08-18 10:40:29 -04:00
Jason Wen
b4ef0c3a5e bytes instead 2023-08-18 10:31:33 -04:00
Jason Wen
9950777919 Hyundai CAN-FD: upstream taco tune 2023-08-18 08:54:30 -04:00
Jason Wen
f5ce706df7 revert for now 2023-08-17 18:05:08 -04:00
Jason Wen
8a7f1b588b match 2023-08-17 17:53:02 -04:00
Jason Wen
079cd7833e Subaru: gen2 torque increase 2023-08-16 23:03:01 -04:00
342 changed files with 7104 additions and 5876 deletions

View File

@@ -44,7 +44,7 @@ subaru:
tesla:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/telsa/*'
- any-glob-to-all-files: 'selfdrive/car/tesla/*'
toyota:
- changed-files:

View File

@@ -7,7 +7,7 @@ on:
env:
BASE_IMAGE: openpilot-base
DOCKER_REGISTRY: ghcr.io/commaai
RUN: docker run --shm-size 1G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $DOCKER_REGISTRY/$BASE_IMAGE:latest /bin/bash -c
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $DOCKER_REGISTRY/$BASE_IMAGE:latest /bin/bash -c
jobs:
badges:

View File

@@ -10,38 +10,30 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI_RUNS: ${{ github.event.inputs.ci_runs || '50' }}
jobs:
setup:
if: github.repository == 'commaai/openpilot'
runs-on: ubuntu-latest
outputs:
ci_runs: ${{ steps.ci_runs_setup.outputs.value }}
ci_runs: ${{ steps.ci_runs_setup.outputs.matrix }}
steps:
- id: ci_runs_setup
name: CI_RUNS=${{ env.CI_RUNS }}
run: |
CI_RUNS=${{ inputs.ci_runs || '50' }}
mylist="value=["
matrix=$(python3 -c "import json; print(json.dumps({ 'run_number' : list(range(${{ env.CI_RUNS }})) }))")
echo "matrix=$matrix" >> $GITHUB_OUTPUT
for i in $(seq 1 $CI_RUNS);
do
if [ $i != $CI_RUNS ]; then
mylist+="\"$i\", "
else
mylist+="\"$i\"]"
fi
done
echo "$mylist" >> $GITHUB_OUTPUT
echo "Number of CI runs for report: $CI_RUNS"
ci_matrix_run:
needs: [ setup ]
strategy:
fail-fast: false
matrix:
value: ${{fromJSON(needs.setup.outputs.ci_runs)}}
matrix: ${{fromJSON(needs.setup.outputs.ci_runs)}}
uses: commaai/openpilot/.github/workflows/ci_weekly_run.yaml@master
with:
run_number: ${{ matrix.value }}
run_number: ${{ matrix.run_number }}
report:
needs: [ci_matrix_run]
@@ -62,62 +54,48 @@ jobs:
})
var report = {}
jobs.slice(1, jobs.length-1).forEach(job => {
const jobName = job.name.split('/')[2].trim();
if (job.conclusion === "skipped") return;
const jobName = job.name.split(" / ")[2];
const runRegex = /\((.*?)\)/;
const run = job.name.match(runRegex)[1];
report[jobName] = report[jobName] || { successes: [], failures: [], cancelled: [] };
switch (job.conclusion) {
case "success":
report[jobName].successes.push(job.html_url); break;
report[jobName].successes.push({ "run_number": run, "link": job.html_url}); break;
case "failure":
report[jobName].failures.push(job.html_url); break;
report[jobName].failures.push({ "run_number": run, "link": job.html_url }); break;
case "cancelled":
report[jobName].cancelled.push(job.html_url); break;
report[jobName].cancelled.push({ "run_number": run, "link": job.html_url }); break;
}
});
return JSON.stringify(report);
return JSON.stringify({"jobs": report});
- name: Add job results to summary
env:
JOB_RESULTS: ${{ fromJSON(steps.get-job-results.outputs.result) }}
run: |
echo $JOB_RESULTS > job_results.json
generate_html_table() {
echo "<table>"
echo "<thead>"
echo " <tr>"
echo " <th>Job</th>"
echo " <th>Succeeded ✅</th>"
echo " <th>Failed ❌</th>"
echo " <th>Cancelled (timed out) ⏰</th>"
echo " </tr>"
echo "</thead>"
jq -r '
"<tbody>",
keys[] as $job |
"<tr>",
" <td>\($job)</td>",
" <td>",
" <details>",
" <summary>(\(.[$job].successes | length))</summary>",
" \(.[$job].successes[])<br>",
" </details>",
" </td>",
" <td>",
" <details>",
" <summary>(\(.[$job].failures | length))</summary>",
" \(.[$job].failures[])<br>",
" </details>",
" </td>",
" <td>",
" <details>",
" <summary>(\(.[$job].cancelled | length))</summary>",
" \(.[$job].cancelled[])<br>",
" </details>",
" </td>",
"</tr>"
' job_results.json
echo "</tbody>"
echo "</table>"
}
echo "# CI Job Summary" >> $GITHUB_STEP_SUMMARY
generate_html_table >> $GITHUB_STEP_SUMMARY
cat <<EOF >> template.html
<table>
<thead>
<tr>
<th></th>
<th>Job</th>
<th>✅ Passing</th>
<th>Failure Details</th>
</tr>
</thead>
<tbody>
{% for key in jobs.keys() %}<tr>
<td>{% for i in range(5) %}{% if i+1 <= (5 * jobs[key]["successes"]|length // ${{ env.CI_RUNS }}) %}🟩{% else %}🟥{% endif %}{% endfor%}</td>
<td>{{ key }}</td>
<td>{{ 100 * jobs[key]["successes"]|length // ${{ env.CI_RUNS }} }}%</td>
<td>{% if jobs[key]["failures"]|length > 0 %}<details>{% for failure in jobs[key]["failures"] %}<a href="{{ failure['link'] }}">Log for run #{{ failure['run_number'] }}</a><br>{% endfor %}</details>{% else %}{% endif %}</td>
</td>
</tr>{% endfor %}
</table>
EOF
pip install jinja2-cli
echo $JOB_RESULTS | jinja2 template.html > report.html
echo "# CI Test Report - ${{ env.CI_RUNS }} Runs" >> $GITHUB_STEP_SUMMARY
cat report.html >> $GITHUB_STEP_SUMMARY

97
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,97 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master", "*-c3", "master*" ]
pull_request:
branches: [ "master", "*-c3", "master*" ]
schedule:
- cron: '39 7 * * 2'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: autobuild
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -15,31 +15,24 @@ concurrency:
group: docs-tests-ci-run-${{ inputs.run_number }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
env:
BASE_IMAGE: openpilot-base
BUILD: selfdrive/test/docker_build.sh base
RUN: docker run --shm-size 1G -v $GITHUB_WORKSPACE:/tmp/openpilot -w /tmp/openpilot -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
jobs:
docs:
name: build docs
runs-on: ubuntu-latest
timeout-minutes: 45
if: false # TODO: replace this with the new docs
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot
run: |
${{ env.RUN }} "scons -j$(nproc)"
# Build
- name: Build docs
run: |
${{ env.RUN }} "apt update && apt install -y doxygen && cd docs && make -j$(nproc) html"
# TODO: can we install just the "docs" dependency group without the normal deps?
pip install mkdocs
mkdocs build
# Push to docs.comma.ai
- uses: actions/checkout@v4
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
with:
@@ -54,16 +47,17 @@ jobs:
source release/identity.sh
cd openpilot-docs
git checkout --orphan tmp
git rm -rf .
cp -r ../build/docs/html/ docs/
cp -r ../docs/README.md .
# copy over docs
cp -r ../docs_site/ docs/
# GitHub pages config
touch docs/.nojekyll
echo -n docs.comma.ai > docs/CNAME
git add -f .
git add -f .
git commit -m "build docs"
# docs live in different repo to not bloat openpilot's full clone size

View File

@@ -0,0 +1,45 @@
name: jenkins scan
on:
issue_comment:
types: [created, edited]
jobs:
# TODO: gc old branches in a separate job in this workflow
scan-comments:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
steps:
- name: Check for trigger phrase
id: check_comment
uses: actions/github-script@v7
with:
script: |
const triggerPhrase = "trigger-jenkins";
const comment = context.payload.comment.body;
const commenter = context.payload.comment.user.login;
const { data: permissions } = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner,
repo: context.repo.repo,
username: commenter
});
const hasWriteAccess = permissions.permission === 'write' || permissions.permission === 'admin';
return (hasWriteAccess && comment.includes(triggerPhrase));
result-encoding: json
- name: Checkout repository
if: steps.check_comment.outputs.result == 'true'
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Push to tmp-jenkins branch
if: steps.check_comment.outputs.result == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b tmp-jenkins-${{ github.event.issue.number }}
GIT_LFS_SKIP_PUSH=1 git push -f origin tmp-jenkins-${{ github.event.issue.number }}

46
.github/workflows/mirror_to_gitlab.yaml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Mirror to GitLab
on:
push:
delete:
workflow_dispatch: # This enables manual triggering
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Wait for other instances of this workflow to conclude
uses: softprops/turnstyle@8db075d65b19bf94e6e8687b504db69938dc3c65
with:
same-branch-only: 'true'
abort-after-seconds: 300
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0 # Fetch full history
- name: Set up Git
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add GitLab public keys
run: |
ssh-keyscan -H gitlab.com >> ~/.ssh/known_hosts
# Note: If you have issues with "push rejected missing LFS" or something make sure you disabled LFS on the GITLAB repo if you intend to use a different LFS repo other than the target repo.
- name: Sync and commit changes
id: sync-and-commit
run: |
# Add GitLab remote
git remote add gitlab git@gitlab.com:sunnypilot/sunnyhaibin/sunnypilot-github-mirror.git
git push -u --force gitlab ${{ github.ref }}

View File

@@ -46,17 +46,13 @@ jobs:
python3 -m ensurepip --upgrade
pip3 install uv
uv lock --upgrade
- name: pre-commit autoupdate
run: |
git config --global --add safe.directory '*'
pre-commit autoupdate
- name: Create Pull Request
uses: peter-evans/create-pull-request@9153d834b60caba6d51c9b9510b087acf9f33f83
with:
author: Vehicle Researcher <user@comma.ai>
token: ${{ secrets.ACTIONS_CREATE_PR_PAT }}
commit-message: Update Python packages and pre-commit hooks
title: '[bot] Update Python packages and pre-commit hooks'
commit-message: Update Python packages
title: '[bot] Update Python packages'
branch: auto-package-updates
base: master
delete-branch: true

View File

@@ -25,7 +25,7 @@ env:
DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
BUILD: selfdrive/test/docker_build.sh base
RUN: docker run --shm-size 1G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PRE_COMMIT_HOME=/tmp/pre-commit -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/pre-commit:/tmp/pre-commit -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
RUN: docker run --shm-size 2G -v $PWD:/tmp/openpilot -w /tmp/openpilot -e CI=1 -e PYTHONWARNINGS=error -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
PYTEST: pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append --durations=0 --durations-min=5 --hypothesis-seed 0 -n logical
@@ -45,7 +45,6 @@ jobs:
- name: Build devel
timeout-minutes: 1
run: TARGET_DIR=$STRIPPED_DIR release/build_devel.sh
- uses: ./.github/workflows/setup-pre-commit
- uses: ./.github/workflows/setup-with-retry
- name: Check submodules
if: github.ref == 'refs/heads/master' && github.repository == 'commaai/openpilot'
@@ -62,20 +61,22 @@ jobs:
cd $STRIPPED_DIR
${{ env.RUN }} "release/check-dirty.sh && \
MAX_EXAMPLES=5 $PYTEST -m 'not slow' selfdrive/car"
- name: pre-commit
timeout-minutes: 3
- name: static analysis
timeout-minutes: 1
run: |
cd $GITHUB_WORKSPACE
cp .pre-commit-config.yaml $STRIPPED_DIR
cp pyproject.toml $STRIPPED_DIR
cd $STRIPPED_DIR
${{ env.RUN }} "unset PYTHONWARNINGS && SKIP=check-added-large-files,check-hooks-apply,check-useless-excludes pre-commit run --all && chmod -R 777 /tmp/pre-commit"
${{ env.RUN }} "scripts/lint.sh"
build:
strategy:
matrix:
arch: ${{ fromJson('["x86_64"]') }} # TODO: Re-add build test for aarch64 once we switched to ubuntu-2404
runs-on: ubuntu-latest
arch: ${{ fromJson(
((github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && '["x86_64", "aarch64"]' || '["x86_64"]' ) }}
runs-on: ${{ (matrix.arch == 'aarch64') && 'namespace-profile-arm64-2x8' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
with:
@@ -84,7 +85,7 @@ jobs:
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
run: |
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
: # (TODO: Re-add this once we test other archs) echo "TARGET_ARCHITECTURE=${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "TARGET_ARCHITECTURE=${{ matrix.arch }}" >> "$GITHUB_ENV"
$DOCKER_LOGIN
- uses: ./.github/workflows/setup-with-retry
with:
@@ -93,7 +94,7 @@ jobs:
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 15 || 30) }} # allow more time when we missed the scons cache
build_mac:
name: build macos
name: build macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
@@ -103,11 +104,36 @@ jobs:
- name: Install dependencies
run: ./tools/mac_setup.sh
env:
SKIP_PROMPT: 1
# package install has DeprecationWarnings
PYTHONWARNINGS: default
- name: Test openpilot environment
run: . .venv/bin/activate && scons -h
- run: echo "CACHE_COMMIT_DATE=$(git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d-%H:%M')" >> $GITHUB_ENV
- name: Getting scons cache
uses: 'actions/cache@v4'
with:
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
restore-keys: |
scons-${{ runner.arch }}-macos-${{ env.CACHE_COMMIT_DATE }}
scons-${{ runner.arch }}-macos
- name: Building openpilot
run: . .venv/bin/activate && scons -j$(nproc)
docker_push_multiarch:
name: docker push multiarch tag
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
needs: [build]
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Setup docker
run: |
$DOCKER_LOGIN
- name: Merge x64 and arm64 tags
run: |
export PUSH_IMAGE=true
scripts/retry.sh selfdrive/test/docker_tag_multiarch.sh base x86_64 aarch64
static_analysis:
name: static analysis
@@ -118,13 +144,12 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/setup-pre-commit
- uses: ./.github/workflows/setup-with-retry
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: pre-commit
timeout-minutes: 4
run: ${{ env.RUN }} "unset PYTHONWARNINGS && pre-commit run --all && chmod -R 777 /tmp/pre-commit"
- name: static analysis
timeout-minutes: 1
run: ${{ env.RUN }} "scripts/lint.sh"
unit_tests:
name: unit tests
@@ -310,8 +335,10 @@ jobs:
})
create_ui_report:
# This job name needs to be the same as UI_JOB_NAME in ui_preview.yaml
name: Create UI Report
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
@@ -328,55 +355,5 @@ jobs:
- name: Upload Test Report
uses: actions/upload-artifact@v4
with:
name: report-${{ inputs.run_number }}
path: selfdrive/ui/tests/test_ui/report_${{ inputs.run_number }}
- name: Get changes to selfdrive/ui
if: ${{ github.event_name == 'pull_request' }}
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
selfdrive/ui/**
- name: Checkout ci-artifacts
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
uses: actions/checkout@v4
with:
repository: commaai/ci-artifacts
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
path: ${{ github.workspace }}/ci-artifacts
ref: master
- name: Push Screenshots
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
working-directory: ${{ github.workspace }}/ci-artifacts
run: |
git checkout -b openpilot/pr-${{ github.event.pull_request.number }}
git config user.name "GitHub Actions Bot"
git config user.email "<>"
sudo mv ${{ github.workspace }}/selfdrive/ui/tests/test_ui/report/screenshots/* .
git add .
git commit -m "screenshots for PR #${{ github.event.pull_request.number }}"
git push origin openpilot/pr-${{ github.event.pull_request.number }} --force
- name: Comment Screenshots on PR
if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
<!-- _(run_id_screenshots **${{ github.run_id }}**)_ -->
## UI Screenshots
<table>
<tr>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/homescreen.png"></td>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/onroad.png"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/onroad_map.png"></td>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/onroad_sidebar.png"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/settings_network.png"></td>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.pull_request.number }}/settings_device.png"></td>
</tr>
</table>
comment_tag: run_id_screenshots
pr_number: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: report-${{ github.event.number }}
path: selfdrive/ui/tests/test_ui/report_1/screenshots

View File

@@ -1,12 +0,0 @@
name: 'set up pre-commit environment'
runs:
using: "composite"
steps:
- uses: ./.github/workflows/auto-cache
with:
path: .ci_cache/pre-commit
key: pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-
save: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot' }}

View File

@@ -5,8 +5,8 @@ on:
workflow_dispatch:
env:
DAYS_BEFORE_PR_CLOSE: 3
DAYS_BEFORE_PR_STALE: 14
DAYS_BEFORE_PR_CLOSE: 2
DAYS_BEFORE_PR_STALE: 9
jobs:
stale:

View File

@@ -21,7 +21,7 @@ env:
BUILD: selfdrive/test/docker_build.sh base
RUN: docker run --shm-size 1G -v $GITHUB_WORKSPACE:/tmp/openpilot -w /tmp/openpilot -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
RUN: docker run --shm-size 2G -v $GITHUB_WORKSPACE:/tmp/openpilot -w /tmp/openpilot -e FILEREADER_CACHE=1 -e PYTHONPATH=/tmp/openpilot -e NUM_JOBS -e JOB_ID -e GITHUB_ACTION -e GITHUB_REF -e GITHUB_HEAD_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -v $GITHUB_WORKSPACE/.ci_cache/scons_cache:/tmp/scons_cache -v $GITHUB_WORKSPACE/.ci_cache/comma_download_cache:/tmp/comma_download_cache -v $GITHUB_WORKSPACE/.ci_cache/openpilot_cache:/tmp/openpilot_cache $BASE_IMAGE /bin/bash -c
jobs:
@@ -74,12 +74,6 @@ jobs:
scons-${{ runner.arch }}-ubuntu2004
- name: Building openpilot
run: uv run scons -u -j$(nproc)
- name: Saving scons cache
uses: actions/cache/save@v4
if: github.ref == 'refs/heads/master'
with:
path: /tmp/scons_cache
key: scons-${{ runner.arch }}-ubuntu2004-${{ env.CACHE_COMMIT_DATE }}-${{ github.sha }}
devcontainer:
name: devcontainer

91
.github/workflows/ui_preview.yaml vendored Normal file
View File

@@ -0,0 +1,91 @@
name: "ui preview"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened, edited]
branches:
- 'master'
paths:
- 'selfdrive/ui/**'
env:
UI_JOB_NAME: "Create UI Report"
jobs:
preview:
if: github.repository == 'commaai/openpilot'
name: preview
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
pull-requests: write
actions: read
steps:
- name: Waiting for ui test to start
run: sleep 30
- name: Wait for ui report
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: ${{ env.UI_JOB_NAME }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
allowed-conclusions: success
wait-interval: 20
- name: Get workflow run ID
id: get_run_id
run: |
echo "run_id=$(curl https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.pull_request.head.sha }}/check-runs | jq -r '.check_runs[] | select(.name == "${{ env.UI_JOB_NAME }}") | .html_url | capture("(?<number>[0-9]+)") | .number')" >> $GITHUB_OUTPUT
- name: Checkout ci-artifacts
uses: actions/checkout@v4
with:
repository: commaai/ci-artifacts
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
path: ${{ github.workspace }}/ci-artifacts
ref: master
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ steps.get_run_id.outputs.run_id }}
search_artifacts: true
name: report-${{ github.event.number }}
path: ${{ github.workspace }}/ci-artifacts
- name: Push Screenshots
working-directory: ${{ github.workspace }}/ci-artifacts
run: |
git checkout -b openpilot/pr-${{ github.event.number }}
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add ${{ github.workspace }}/ci-artifacts/*
git commit -m "screenshots for PR #${{ github.event.number }}"
git push origin openpilot/pr-${{ github.event.number }} --force
- name: Comment Screenshots on PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
<!-- _(run_id_screenshots **${{ github.run_id }}**)_ -->
## UI Screenshots
<table>
<tr>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/homescreen.png"></td>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad.png"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_map.png"></td>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/onroad_sidebar.png"></td>
</tr>
<tr>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/settings_network.png"></td>
<td><img src="https://raw.githubusercontent.com/commaai/ci-artifacts/openpilot/pr-${{ github.event.number }}/settings_device.png"></td>
</tr>
</table>
comment_tag: run_id_screenshots
pr_number: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

4
.gitignore vendored
View File

@@ -14,6 +14,8 @@ model2.png
a.out
.hypothesis
/docs_site/
*.dylib
*.DSYM
*.d
@@ -103,4 +105,4 @@ Pipfile
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
.ionide

View File

@@ -9,6 +9,10 @@ variables:
GIT_CONFIG_USER_EMAIL: "gitlab@pipeline.com"
GIT_CONFIG_USER_NAME: "Gitlab Pipeline"
PUBLIC_REPO_URL: "https://github.com/sunnyhaibin/sunnypilot"
BASE_BUILD_NUMER: 3000
EXTRA_VERSION_IDENTIFIER: "${CI_PIPELINE_IID}"
NEW_BRANCH: ${CI_COMMIT_REF_NAME}-prebuilt
stages:
- build
@@ -23,7 +27,8 @@ default:
- x86
.default_before_script: &default_before_script
- 'export VERSION=$(eval $VERSION)${EXTRA_VERSION_IDENTIFIER}'
- 'if [ "$EXTRA_VERSION_IDENTIFIER" = "$CI_PIPELINE_IID" ]; then export EXTRA_VERSION_IDENTIFIER=$((CI_PIPELINE_IID + BASE_BUILD_NUMER)); fi'
- 'export VERSION=$(eval $VERSION)-${EXTRA_VERSION_IDENTIFIER}'
- 'mkdir -p "${BUILD_DIR}/"'
- 'git config --global user.email "${GIT_CONFIG_USER_EMAIL}"'
- 'git config --global user.name "${GIT_CONFIG_USER_NAME}"'
@@ -34,33 +39,31 @@ workflow: # If running on any branch other than main.
# We are an MR, but it's a draft, we won't proceed with anything.
- if: '$CI_MERGE_REQUEST_TITLE =~ /^wip:/i || $CI_MERGE_REQUEST_TITLE =~ /^draft:/i'
when: never
# We are a merge request
- if: $CI_MERGE_REQUEST_IID
variables:
EXTRA_VERSION_IDENTIFIER: "-${CI_PIPELINE_IID}"
NEW_BRANCH: ${CI_COMMIT_REF_NAME}-prebuilt
when: always
# Below are the rules when a commit is done (code has been added to the branch)
# Commit to master-dev-c3
- if: $CI_COMMIT_REF_NAME == $DEV_C3_SOURCE_BRANCH
variables:
EXTRA_VERSION_IDENTIFIER: "-${CI_PIPELINE_IID}"
EXTRA_VERSION_IDENTIFIER: "${CI_PIPELINE_IID}"
NEW_BRANCH: "dev-c3"
AUTO_BUILD: true
when: always
#commit made to main (master)
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
NEW_BRANCH: "staging-c3"
VERSION: 'cat common/version.h | grep COMMA_VERSION | sed -e "s/[^0-9|.]//g"'
EXTRA_VERSION_IDENTIFIER: "-staging"
EXTRA_VERSION_IDENTIFIER: "staging"
AUTO_PUBLISH: true
AUTO_BUILD: true
when: always
# if tag
- if: $CI_COMMIT_TAG
variables:
NEW_BRANCH: "release-c3"
VERSION: 'cat common/version.h | grep COMMA_VERSION | sed -e "s/[^0-9|.]//g"'
EXTRA_VERSION_IDENTIFIER: "-release"
EXTRA_VERSION_IDENTIFIER: "release"
AUTO_BUILD: true
- when: always
@@ -92,7 +95,7 @@ build:
- sed -i '/from .board.jungle import PandaJungle, PandaJungleDFU/s/^/#/' panda/__init__.py # comment panda jungle when prebuilt
- scons -j$(nproc) cache_dir=${CI_DIR}/scons_cache --minimal
- touch ${BUILD_DIR}/prebuilt
- sudo rm -rf ${OUTPUT_DIR}
- sudo rm -rf ${OUTPUT_DIR}
- mkdir -p ${OUTPUT_DIR}
# We first include the paths we want to keep, even if we later will be excluding the other things on those paths
- rsync -avm
@@ -135,39 +138,16 @@ build:
--chown=comma:comma
${BUILD_DIR}/ ${OUTPUT_DIR}/
after_script:
# cleanup build dir after doing work
# cleanup build dir after doing work
- find $BUILD_DIR/ -mindepth 1 -delete
artifacts:
paths:
- ${OUTPUT_DIR}/
tags: [ 'sunnypilot', 'tici' ]
rules:
- if: $CI_MERGE_REQUEST_IID
when: manual
- if: $NEW_BRANCH
- if: $AUTO_BUILD
when: always
check no source code sent:
image: alpine
stage: sanity
variables:
FORBIDDEN_FILE_EXTENSIONS: "*.a,*.o,*.os,*.pyc,moc_*,*.cc,Jenkinsfile,supercombo.onnx,.sconsign.dblite"
FORBIDDEN_DIR_PATTERNS: "*panda/certs,*panda/crypto,*release,*.github,*selfdrive/ui/replay,*__pycache__"
REQUIRED_FILE_EXTENSIONS: "*.py,*.json"
REQUIRED_DIR_PATTERNS: "*selfdrive/ui,*openpilot"
before_script:
- apk update && apk upgrade
- apk add bash findutils
script:
- cd ${OUTPUT_DIR}
- echo "Checking that we have properly cleaned up"
- ${CI_DIR}/sanity_check.sh "$FORBIDDEN_FILE_EXTENSIONS" "$FORBIDDEN_DIR_PATTERNS" true
- echo "Checking that our sanity check works and also checking that some required files are indeed found"
- ${CI_DIR}/sanity_check.sh "$REQUIRED_FILE_EXTENSIONS" "$REQUIRED_DIR_PATTERNS" false
rules:
- if: $NEW_BRANCH
when: on_success
- when: never
- when: manual
.publish_base: &publish_base
image: alpine
@@ -177,9 +157,6 @@ check no source code sent:
needs:
- job: build
artifacts: true
- job: "check no source code sent"
artifacts: false
optional: false
before_script:
- 'apk update && apk upgrade'
- 'apk add git bash openssh'
@@ -196,17 +173,19 @@ check no source code sent:
- echo "${GIT_ORIGIN}"
- echo "Calling to publish [${CI_DIR}/publish.sh ${CI_PROJECT_DIR} ${OUTPUT_DIR} ${NEW_BRANCH} ${VERSION} ${GIT_ORIGIN}]"
- git config --global --add safe.directory ${OUTPUT_DIR}
- $CI_DIR/publish.sh "${CI_PROJECT_DIR}" "${OUTPUT_DIR}" "${NEW_BRANCH}" "${VERSION}" "${GIT_ORIGIN}" "${EXTRA_VERSION_IDENTIFIER}"
- $CI_DIR/publish.sh "${CI_PROJECT_DIR}" "${OUTPUT_DIR}" "${NEW_BRANCH}" "${VERSION}" "${GIT_ORIGIN}" "-${EXTRA_VERSION_IDENTIFIER}"
allow_failure: false
publish to private gitlab prebuilt:
extends: ".publish_base"
variables:
GIT_ORIGIN: git@gitlab.com:sunnypilot/public/sunnypilot.git
GIT_ORIGIN: git@gitlab.com:sunnypilot/public/sunnypilot-prebuilts.git
rules:
- if: $NEW_BRANCH
- if: $AUTO_BUILD
when: on_success
- when: never
- if: $CI_MERGE_REQUEST_IID
when: on_success
- when: manual
publish to public github prebuilt:
extends: ".publish_base"
@@ -215,9 +194,9 @@ publish to public github prebuilt:
GIT_CONFIG_USER_EMAIL: "jason.wen@sunnypilot.ai"
GIT_CONFIG_USER_NAME: "Jason Wen"
rules:
- if: $NEW_BRANCH
when: manual
- when: never
- if: $AUTO_PUBLISH
when: on_success
- when: manual
.notify_discord: &notify_discord
image: alpine
@@ -251,6 +230,9 @@ notify new dev build:
needs: ["publish to public github prebuilt"] # This notify shall only happen after a publish to github public
variables:
TEMPLATE: "discord_template_notify_dev_public.json"
before_script:
- !reference [".notify_discord", "before_script"]
- export EXTRA_VERSION_IDENTIFIER=$((CI_PIPELINE_IID + BASE_BUILD_NUMER))
rules:
- if: $NEW_BRANCH == "dev-c3"
variables:

11
.gitmodules vendored
View File

@@ -2,20 +2,17 @@
path = panda
url = https://github.com/sunnyhaibin/panda.git
[submodule "opendbc"]
path = opendbc
url = https://github.com/sunnyhaibin/opendbc.git
path = opendbc_repo
url = https://github.com/sunnypilot/opendbc.git
[submodule "msgq"]
path = msgq_repo
url = https://github.com/commaai/msgq.git
url = https://github.com/sunnypilot/msgq.git
[submodule "rednose_repo"]
path = rednose_repo
url = https://github.com/commaai/rednose.git
[submodule "body"]
path = body
url = https://github.com/commaai/body.git
[submodule "teleoprtc_repo"]
path = teleoprtc_repo
url = https://github.com/commaai/teleoprtc
[submodule "tinygrad"]
path = tinygrad_repo
url = https://github.com/geohot/tinygrad.git
url = https://github.com/tinygrad/tinygrad.git

41
.importlinter Normal file
View File

@@ -0,0 +1,41 @@
[importlinter]
root_packages =
openpilot
[importlinter:contract:1]
name = Forbid imports from openpilot.selfdrive.car to openpilot.system
type = forbidden
source_modules =
openpilot.selfdrive.car
forbidden_modules =
openpilot.system
openpilot.body
openpilot.docs
openpilot.msgq
openpilot.panda
openpilot.rednose
openpilot.release
openpilot.teleoprtc
openpilot.tinygrad
ignore_imports =
openpilot.selfdrive.car.card -> openpilot.common.realtime
openpilot.selfdrive.car.card -> openpilot.selfdrive.controls.lib.events
openpilot.selfdrive.car.interfaces -> openpilot.selfdrive.controls.lib.events
openpilot.selfdrive.car.tests.test_models -> openpilot.tools.lib.logreader
openpilot.selfdrive.car.tests.test_models -> openpilot.selfdrive.car.card
openpilot.selfdrive.car.tests.test_models -> openpilot.tools.lib.route
openpilot.selfdrive.car.tests.test_models -> openpilot.system.hardware.hw
openpilot.selfdrive.car.tests.test_models -> openpilot.selfdrive.test.helpers
openpilot.selfdrive.car.isotp_parallel_query -> openpilot.common.swaglog
openpilot.selfdrive.car.fw_versions -> openpilot.common.swaglog
openpilot.selfdrive.car.disable_ecu -> openpilot.common.swaglog
openpilot.selfdrive.car.vin -> openpilot.common.swaglog
openpilot.selfdrive.car.ecu_addrs -> openpilot.common.swaglog
openpilot.selfdrive.car.car_helpers -> openpilot.common.swaglog
openpilot.selfdrive.car.car_helpers -> openpilot.system.version
openpilot.selfdrive.car.interfaces -> openpilot.selfdrive.controls.lib.drive_helpers
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.latcontrol_angle
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.longcontrol
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.latcontrol_torque
openpilot.selfdrive.car.tests.test_car_interfaces -> openpilot.selfdrive.controls.lib.latcontrol_pid
unmatched_ignore_imports_alerting = warn

View File

@@ -1,98 +0,0 @@
exclude: '^(tinygrad_repo)'
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
exclude: '^(third_party)/'
- id: check-json
exclude: '.devcontainer/devcontainer.json|.vscode/' # these support JSON with comments
- id: check-toml
- id: check-xml
- id: check-yaml
- id: check-merge-conflict
- id: check-symlinks
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-added-large-files
exclude: '(docs/CARS.md)|(uv.lock)|(third_party/acados/include/blasfeo/include/blasfeo_d_kernel.h)'
args:
- --maxkb=120
- --enforce-all
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude: '^(third_party/)|(body/)|(msgq/)|(panda/)|(opendbc/)|(rednose/)|(rednose_repo/)|(teleoprtc/)|(teleoprtc_repo/)|(selfdrive/ui/translations/.*.ts)|(uv.lock)'
args:
# if you've got a short variable name that's getting flagged, add it here
- -L bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn
- --builtins clear,rare,informal,usage,code,names,en-GB_to_en-US
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff
exclude: '^(third_party/)|(msgq/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)'
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
args:
- --local-partial-types
- --explicit-package-bases
exclude: '^(third_party/)|(body/)|(msgq/)|(opendbc/)|(panda/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(teleoprtc/)|(teleoprtc_repo/)'
- repo: local
hooks:
- id: cppcheck
name: cppcheck
entry: cppcheck
language: system
types: [c++]
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(tools/)|(selfdrive/modeld/thneed/debug/)|(selfdrive/modeld/test/)|(selfdrive/camerad/test/)|(installer/)'
args:
- --error-exitcode=1
- --language=c++
- --quiet
- --force
- -j8
- --library=qt
- --include=third_party/kaitai/kaitaistream.h
- repo: https://github.com/cpplint/cpplint
rev: 1.6.1
hooks:
- id: cpplint
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)'
args:
- --quiet
- --counting=total
- --linelength=240
# https://google.github.io/styleguide/cppguide.html
# relevant rules are whitelisted, see all options with: cpplint --filter=
- --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/comma,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+whitespace/tab,+readability/braces
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.16.2
hooks:
- id: cython-lint
exclude: '^(third_party/)|(msgq/)|(body/)|(rednose/)|(rednose_repo/)|(opendbc/)|(panda/)|(generated/)'
args:
- --max-line-length=240
- --ignore=E111, E302, E305
- repo: local
hooks:
- id: test_translations
name: test translations
entry: pytest selfdrive/ui/tests/test_translations.py
language: system
pass_filenames: false
files: '^selfdrive/ui/translations/'
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
hooks:
- id: check-github-workflows

View File

@@ -5,15 +5,25 @@ sunnypilot - 0.9.8.0 (2024-xx-xx)
* UPDATED: Synced with commaai's openpilot
* master commit 4ef757c (July 06, 2024)
* NEW❗: Default Driving Model: Notre Dame (July 01, 2024)
* NEW❗: Longitudinal: Acceleration Personality thanks to kegman, rav4kumar, and arne1282!
* NEW❗: Longitudinal: Acceleration Personality thanks to kegman, rav4kumar, and arne1282! (CTV 2.0: GlideTech)
* Select from three distinct acceleration personalities: Eco, Normal, and Sport
* Acceleration personalities are integrated directly into the model's acceleration matrix and can be activated in real-time!
* NEW❗: Toyota - Drive Mode Selector
* When enabled you can control acceleration personality just with press of button!
* UPDATED: Dynamic Experimental Control
* Switched to weighted moving averages to enhance responsiveness to recent data.
* Goal is to improve real-time detection accuracy in dynamic conditions.
* Capable of handling the increased complexity that comes with this approach.
* Particularly beneficial in environments where recent changes are critical to performance.
* NEW❗: Longitudinal: Dynamic Personality thanks to rav4kumar!
* Dynamically adjusts following distance and reaction based on your "Driving Personality" setting
* Personalities adapt in real-time to your speed and the distance to the lead car
* Provides a more responsive and tailored driving experience compared to predefined settings
* UPDATED: Driving Personality: Updated mode names
* Aggressive, Moderate, Standard, Relaxed
* NEW❗: Hyundai CAN: Enable Cruise Main by Default
* Set CRUISE MAIN to ON by default when the car starts, without engaging MADS
* This feature only applies when "openpilot Longitudinal Control (Alpha)" is enabled under the "Toggles" menu
* NEW❗: Toyota - Enhanced Blind Spot Monitor (BSM) thanks to arne182, rav4kumar, and eFiniLan!
* Enables Blind Spot Monitor (BSM) signals parsing in sunnypilot using the factory Blind Spot Monitor (BSM)
* sunnypilot will use debugging CAN messages to receive unfiltered BSM signals, allowing detection of more objects
@@ -23,11 +33,14 @@ sunnypilot - 0.9.8.0 (2024-xx-xx)
* Toyota TSS1/1.5, equipped with factory Blind Spot Monitoring (BSM)
* Prius TSS2, equipped with factory Blind Spot Monitoring (BSM)
* NOTE: Only enable this feature if your Toyota/Lexus vehicle has factory Blind Spot Monitor equipped, and mentioned in the supported platforms list
* UPDATED: Toyota: TSS2 longitudinal: Custom Tuning
* Re-tuned and tested by the community (July 1, 2024)
* UPDATED: Toyota: TSS2 longitudinal: Custom Tuning (CTV 2.0: GlideTech)
* Re-tuned and tested by the community (September 29, 2024)
* UPDATED: Driving Model Selector v5
* NEW❗: Driving Model additions
* Notre Dame (July 01, 2024) - NDv3
* UPDATED: Neural Network Lateral Control (NNLC)
* NEW❗: Remove Lateral Jerk Response (Alpha)
* FIXED: Hotfix for "lazy" steering performance in tighter curves thanks to twilsonco!
* UPDATED: Toyota: Continued support for Smart DSU (SDSU) and Radar CAN Filter
* In response to the official deprecation of support for Smart DSU (SDSU) and Radar CAN Filter in the upstream ([commaai/openpilot#32777](https://github.com/commaai/openpilot/pull/32777)), sunnypilot will continue maintaining software support for Smart DSU (SDSU) and Radar CAN Filter
* UPDATED: Continued support for Mapbox navigation
@@ -37,11 +50,18 @@ sunnypilot - 0.9.8.0 (2024-xx-xx)
* Auto Unlock by Shift to P: All doors are automatically unlocked when shifting the shift lever to P
* FIXED: Driving Personality:
* Maniac mode now correctly enforced when selected
* FIXED: Experimental Model Distance Button Hold
* Experimental Model toggle with distance button hold no longer changes Personality
* Personality setting remains consistent when switching between Chill and Experimental Mode
* UI Updates
* Display Metrics Below Chevron
* NEW❗: Time to Lead Car
* Displays the time to reach the position previously occupied by the lead car
* NEW❗: Display Distance, Speed, and Time to Lead Car simultaneously
* Ford F-150 2022-23 support
* Ford F-150 Lightning 2021-23 support
* Ford Mustang Mach-E 2021-23 support
* Hyundai Kona Electric Non-SCC 2019 support thanks to NikitaNekrasov!
* Kia Ceed Plug-in Hybrid Non-SCC 2022 support thanks to TerminatorNL!
sunnypilot - 0.9.7.1 (2024-06-13)
@@ -79,6 +99,8 @@ sunnypilot - 0.9.7.1 (2024-06-13)
* Force sunnypilot in the offroad state even when the car is on
* When Forced Offroad mode is on, allows changing offroad-only settings even when the car is turned on
* To engage/disengage Force Offroad, go to Settings -> Device panel
* NEW❗: Ford CAN-FD longitudinal
* NEW❗: Parse speed limit sign recognition from camera for certain supported platforms
* UPDATED: Auto Lane Change Timer -> Auto Lane Change by Blinker
* NEW❗: New "Off" option to disable lane change by blinker
* UPDATED: Pause Lateral Below Speed with Blinker
@@ -86,6 +108,8 @@ sunnypilot - 0.9.7.1 (2024-06-13)
* Pause lateral actuation with blinker when traveling below the desired speed selected. Default is 20 MPH or 32 km/h.
* UPDATED: Hyundai CAN Longitudinal
* Auto-enable radar tracks on platforms with applicable Mando radar
* UPDATED: Hyundai CAN-FD Radar-based SCC
* Longitudinal support for CAN-FD Radar-based SCC cars
* UPDATED: Hyundai CAN-FD Camera-based SCC
* NEW❗: Parse lead info for camera-based SCC platforms with longitudinal support
* Improve lead tracking when using openpilot longitudinal

77
HOW-TOS.md Normal file
View File

@@ -0,0 +1,77 @@
# How Tos
This page is a repository of useful how-tos as a supplement for additional information.
Table of Contents
=======================
* [Radar Tracks](#Radar-Tracks)
* [Enable Radar Tracks](#-Enable-Radar-Tracks)
* [Enable Mapbox Navigation](#-Enable-Mapbox-Navigation)
---
<details><summary><h3>📡 Radar Tracks</h3></summary>
Radar tracks can now be enabled manually on applicable cars through SSH thanks to [@greghogan](https://github.com/greghogan) and [@pd0wm](https://github.com/pd0wm).
Some Hyundai radars can be reconfigured to output (debug) radar points on bus 1.
Reconfiguration is done over UDS by reading/writing to 0x0142 using the Read/Write Data By Identifier
endpoints (0x22 & 0x2E). This script checks your radar firmware version against a list of known
firmware versions. If you want to try on a new radar, make sure to note the default config value
in case it is different from the other radars and you need to revert the changes.
After changing the config the car should not show any faults when openpilot is not running.
These config changes are persistent across car reboots. You need to run this script again
to go back to the default values.
**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
**How radar points can be used along with vision:**
* Current OP long policy is identify with vision first, if vision sees a vehicle match it to a radar point. If vision sees nothing you get a false negative and no lead car detection. (Source: [Hubblesphere#7894 from comma.ai community Discord](https://discord.com/channels/469524606043160576/872899198738104330/872913890793635872))
### 🚨 Enable Radar Tracks
***(EXPERIMENTAL, as of January 1st, 2022)***
***(Only applicable to some Hyundai, Kia, and Genesis cars, as of January 1st, 2022)***
*(Base on version 0.8.12 [`devel`](https://github.com/commaai/openpilot/tree/devel))*
**USE AT YOUR OWN RISK!** Stock system safety features, like AEB and FCW, might be affected by these changes.
1. Ensure the car is at the `OFF` ignition position.
2. Connect your compatible comma device (EON, C2, C3) to the car. comma device power should be ON.
3. Use a laptop or applicable device to connect to your comma device via SSH. (Tips: Instructions to SSH in [HERE](https://github.com/commaai/openpilot/wiki/SSH))
4. In the SSH terminal after successfully connected to your comma device, execute the following commands:
1. `pkill -f openpilot`
2. `python /data/openpilot/selfdrive/debug/hyundai_enable_radar_points.py`
3. Follow the instructions in the script:
* `Power on the vehicle keeping the engine off (press start button twice) then type OK to continue`.
* If successful, the following message should appear: `[DONE]. Restart your vehicle and ensure there are no faults`.
* If the script did not run successfully, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
4. Reboot your comma device:
1. C3: `sudo reboot`
2. C2 or EON: `reboot`
5. Once your comma device is rebooted, start your car with engine on (with or without comma device connected). Ensure that there are no faults from the car. If there are faults, reach out to the community in [Sunnyhaibin's Openpilot Discord Server](https://discord.gg/wRW3meAgtx) or `#hyundai-kia-genesis channel` on [commaai community Discord Server](https://discord.comma.ai) for assistance.
6. Go for a quick drive and drive behind a lead car with varied follow distance. Then, come back and allow the drive to upload its `rlogs` in [comma Connect](https://connect.comma.ai).
7. With all `rlogs` uploaded, open the drive in Cabana from [comma Connect](https://connect.comma.ai). Load DBC -> `hyundai_kia_mando_front_radar.dbc`, then search `RADAR_TRACK_50x` (`x` could be anything), open any of them, and look at `LONG_DIST`.
8. If the radar tracks data is relevant with the lead car you drove behind, you are done! Your car now have radar tracks enabled.
</details>
<details><summary><h3>🗺 Enable Mapbox Navigation</h3></summary>
1) Create a free mapbox account. Account will ask for a credit card for verification. You will not be charged for the free tier.
2) On the Dashboard, you will see a section called Access Tokens. Click `Create a Token`. Name it whatever you like. Set the scopes to allow everything for both Public and Secret. Copy both of these keys. **YOU WON'T BE ABLE TO ACCESS THE SECRET KEY AFTER THIS WINDOW.**
3) Once rebooted, connect your C3 to a network with internet access and find the C3s IP address.
4) In a browser, navigate to that IP with **port 8082** (i.e 192.168.1.69:8082). You should be greeted with the Comma logo and a public key input field.
5) Paste your Public token (pk.xx), click enter, paste your Secret key (sk.xx), click enter. You can now search for places. This page will be available at your devicess IP address/port 8082 to search for destinations.
6) To set Home and Work addresses, search for a place, select Home/Work from the dropdown and click Navigate. For non-Home/Work destinations, select Recent Places.<br>*At this time, it is not possible to search directly on the C3.*
**TIPS:**
- If your C3 is showing a black screen that says “Map Loading”, performing a reboot via the UI should fix it.
- If your phone can create a Hotspot, you are able to connect the C3 to your phone hotspot and use your phone browser to search for places.
- In the Navigation panel on the C3, you can select Home, Work, and from a list of Recent Places you have navigated to without needing a browser (assuming the C3 is connected to the internet.)
**IMPORTANT NOTE:** Your C3 will require an active internet connection to download map data, generate driving directions, and ETA. Once map data and directions are downloaded, it *is* possible to use it offline, however nothing will update (such as new driving direction after a missed turn, updated ETA, map data further into your drive etc.)
***NAVIGATION NOTE:** At this time, mapbox does not support alphanumeric addresses (i.e W123N1234 Main St). There is currently no known workaround for this.*
</details>

2
Jenkinsfile vendored
View File

@@ -83,7 +83,7 @@ def deviceStage(String stageName, String deviceType, List extra_env, def steps)
lock(resource: "", label: deviceType, inversePrecedence: true, variable: 'device_ip', quantity: 1, resourceSelectStrategy: 'random') {
docker.image('ghcr.io/commaai/alpine-ssh').inside('--user=root') {
timeout(time: 20, unit: 'MINUTES') {
timeout(time: 35, unit: 'MINUTES') {
retry (3) {
device(device_ip, "git checkout", extra + "\n" + readFile("selfdrive/test/setup_device_ci.sh"))
}

View File

@@ -170,16 +170,16 @@ After running the command to install the desired branch, your comma device shoul
* Speed Limit Control (SLC) - Set speed limit based on map data or car interface (if applicable)
* HKG only: Highway Driving Assist (HDA) status integration - Use cars native speed sign detection to set desired speed (on applicable HKG cars only)
- [**Gap Adjust Cruise (GAC)**](#gap-adjust-cruise) - Allow `GAP`/`INTERVAL`/`DISTANCE` button on the steering wheel or on-screen button to adjust the follow distance from the lead car. See table below for options
- [**Quiet Drive 🤫**](#-quiet-drive) - Toggle to mute all notification sounds (excluding driver safety warnings)
- [**Auto Lane Change Timer**](#Auto-Lane-Change-Timer) - Set a timer to delay the auto lane change operation when the blinker is used. No nudge on the steering wheel is required to auto lane change if a timer is set
- [**Force Car Recognition (FCR)**](#Force-Car-Recognition-) - Use a selector to force your car to be recognized by sunnypilot
- [**Fix sunnypilot No Offroad**](#Fix-sunnypilot-No-Offroad) - Enforce sunnypilot to go offroad and turns off after shutting down the car. This feature fixes non-official devices running sunnypilot without comma power
- [**Enable ACC+MADS with RES+/SET-**](#Enable-ACC+MADS-with-RES+/SET-) - Engage both ACC and MADS with a single press of RES+ or SET- button
- [**Offline OSM Maps**](#Offline-OSM-Maps) - OSM database can now be downloaded locally for offline use[^2]. This enables offline SLC, V-TSC and M-TSC. Currently available for US South, US West, US Northeast, Florida, Taiwan, South Africa and New Zealand
- [**Various Live Tuning**](#Various-Live-Tuning) - Ability to tailor your driving experience on the fly:
* Enforce Torque Lateral Control - Use the newest [torque controller](https://blog.comma.ai/0815release/#torque-controller) for all vehicles.
* Torque Lateral Control Live Tune - Ability to adjust the torque controllers `FRICTION` and `LAT_ACCEL_FACTOR` values to suit your vehicle.
* Torque Lateral Controller Self-Tune - Enable automatic turning for the Torque controller.
- [**Quiet Drive 🤫**](#-quiet-drive) - Toggle to mute all notification sounds (excluding driver safety warnings)
- [**Auto Lane Change Timer**](#Auto-Lane-Change-Timer) - Set a timer to delay the auto lane change operation when the blinker is used. No nudge on the steering wheel is required to auto lane change if a timer is set
- [**Force Car Recognition (FCR)**](#Force-Car-Recognition-) - Use a selector to force your car to be recognized by sunnypilot
- [**Fix sunnypilot No Offroad**](#Fix-sunnypilot-No-Offroad) - Enforce sunnypilot to go offroad and turns off after shutting down the car. This feature fixes non-official devices running sunnypilot without comma power
- [**Enable ACC+MADS with RES+/SET-**](#Enable-ACC+MADS-with-RES+/SET-) - Engage both ACC and MADS with a single press of RES+ or SET- button
- [**Offline OSM Maps**](#Offline-OSM-Maps) - OSM database can now be downloaded locally for offline use[^2]. This enables offline SLC, V-TSC and M-TSC. Currently available for US South, US West, US Northeast, Florida, Taiwan, South Africa and New Zealand
- [**Various Live Tuning**](#Various-Live-Tuning) - Ability to tailor your driving experience on the fly:
* Enforce Torque Lateral Control - Use the newest [torque controller](https://blog.comma.ai/0815release/#torque-controller) for all vehicles.
* Torque Lateral Control Live Tune - Ability to adjust the torque controllers `FRICTION` and `LAT_ACCEL_FACTOR` values to suit your vehicle.
* Torque Lateral Controller Self-Tune - Enable automatic turning for the Torque controller.
### Visual Enhancements
* **M.A.D.S Status Icon** - Dedicated icon to display M.A.D.S. engagement status
@@ -223,7 +223,7 @@ The goal of Modified Assistive Driving Safety (MADS) is to enhance the user driv
* `SET-` button enables ACC/SCC
* `CANCEL` button only disables ACC/SCC
* `CRUISE (MAIN)` must be `ON` to use ACC/SCC
* `CRUISE (MAIN)` button disables sunnypilot completely when `OFF` **(strictly enforced in panda safety code)**
* `CRUISE (MAIN)` button disables ACC/SCC completely when `OFF` **(strictly enforced in panda safety code)**
### Disengage Lateral ALC on Brake Press Mode toggle
Dedicated toggle to handle Lateral state on brake pedal press and release:

View File

@@ -110,7 +110,6 @@ if arch == "larch64":
libpath = [
"/usr/local/lib",
"/usr/lib",
"/system/vendor/lib64",
f"#third_party/acados/{arch}/lib",
]
@@ -178,7 +177,6 @@ if arch != "Darwin":
ldflags += ["-Wl,--as-needed", "-Wl,--no-undefined"]
# Enable swaglog include in submodules
cflags += ['-DSWAGLOG="\\"common/swaglog.h\\""']
cxxflags += ['-DSWAGLOG="\\"common/swaglog.h\\""']
if not GetOption('stock_ui'):
@@ -218,7 +216,6 @@ env = Environment(
"#third_party/json11",
"#third_party/linux/include",
"#third_party/snpe/include",
"#third_party/qrcode",
"#third_party",
"#cereal",
"#msgq",
@@ -246,7 +243,7 @@ env = Environment(
COMPILATIONDB_USE_ABSPATH=True,
REDNOSE_ROOT="#",
tools=["default", "cython", "compilation_db", "rednose_filter"],
toolpath=["#rednose_repo/site_scons/site_tools"],
toolpath=["#site_scons/site_tools", "#rednose_repo/site_scons/site_tools"],
)
if arch == "Darwin":
@@ -286,7 +283,8 @@ if arch == "Darwin":
else:
envCython["LINKFLAGS"] = ["-pthread", "-shared"]
Export('envCython')
np_version = SCons.Script.Value(np.__version__)
Export('envCython', 'np_version')
# Qt build environment
qt_env = env.Clone()
@@ -330,7 +328,7 @@ try:
except SCons.Errors.UserError:
qt_env.Tool('qt')
qt_env['CPPPATH'] += qt_dirs# + ["#selfdrive/ui/qt/"]
qt_env['CPPPATH'] += qt_dirs + ["#third_party/qrcode"]
qt_flags = [
"-D_REENTRANT",
"-DQT_NO_DEBUG",
@@ -379,7 +377,6 @@ Export('messaging')
# Build other submodules
SConscript([
'body/board/SConscript',
'opendbc/can/SConscript',
'panda/SConscript',
])

1
body

Submodule body deleted from 0e74db67ae

View File

@@ -137,6 +137,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
speedLimitPreActive @139;
speedLimitConfirmed @140;
torqueNNLoad @141;
hyundaiRadarTracksAvailable @142;
radarCanErrorDEPRECATED @15;
communityFeatureDisallowedDEPRECATED @62;
@@ -250,7 +251,7 @@ struct CarState {
struct CustomStockLong {
cruiseButton @0 :Int16;
finalSpeedKph @1 :Float32;
vCruiseKphPrev @2 :Float32;
vCruiseKphPrevDEPRECATED @2 :Float32;
targetSpeed @3 :Float32;
vSetDis @4 :Float32;
speedDiff @5 :Float32;

View File

@@ -16,6 +16,7 @@ enum LongitudinalPersonalitySP {
moderate @1;
standard @2;
relaxed @3;
overtake @4;
}
enum AccelerationPersonality {
@@ -34,11 +35,17 @@ enum ModelGeneration {
five @5;
}
enum MpcSource {
acc @0;
blended @1;
}
struct ControlsStateSP @0x81c2f05a394cf4af {
lateralState @0 :Text;
personality @8 :LongitudinalPersonalitySP;
dynamicPersonality @9 :Bool;
accelPersonality @10 :AccelerationPersonality;
overtakingAccelerationAssist @11 :Bool;
lateralControlState :union {
indiState @1 :LateralINDIState;
@@ -90,8 +97,10 @@ struct LongitudinalPlanSP @0xaedffd8f31e7b55d {
desiredTF @13 :Float32;
notSpeedLimit @14 :Int16;
e2eX @15 :List(Float32);
e2eBlended @18 :Text;
e2eBlendedDEPRECATED @18 :Text;
e2eStatus @22 :Bool;
mpcSource @23 :MpcSource;
dynamicExperimentalControl @24 :Bool;
distToTurn @7 :Float32;
turnSpeed @8 :Float32;

View File

@@ -137,8 +137,6 @@ struct FrameData {
requestId @28 :UInt32;
encodeId @1 :UInt32;
frameType @7 :FrameType;
# Timestamps
timestampEof @2 :UInt64;
timestampSof @8 :UInt64;
@@ -158,7 +156,7 @@ struct FrameData {
temperaturesC @24 :List(Float32);
enum FrameType {
enum FrameTypeDEPRECATED {
unknown @0;
neo @1;
chffrAndroid @2;
@@ -175,6 +173,7 @@ struct FrameData {
frameLengthDEPRECATED @3 :Int32;
globalGainDEPRECATED @5 :Int32;
frameTypeDEPRECATED @7 :FrameTypeDEPRECATED;
androidCaptureResultDEPRECATED @9 :AndroidCaptureResult;
lensPosDEPRECATED @11 :Int32;
lensSagDEPRECATED @12 :Float32;
@@ -337,9 +336,9 @@ enum LaneChangeDirection {
struct CanData {
address @0 :UInt32;
busTime @1 :UInt16;
dat @2 :Data;
src @3 :UInt8;
busTimeDEPRECATED @1 :UInt16;
}
struct DeviceState @0xa4d8b5af2aa492eb {
@@ -1252,6 +1251,38 @@ struct LiveLocationKalman {
}
}
struct LivePose {
# More info on reference frames:
# https://github.com/commaai/openpilot/tree/master/common/transformations
orientationNED @0 :XYZMeasurement;
velocityDevice @1 :XYZMeasurement;
accelerationDevice @2 :XYZMeasurement;
angularVelocityDevice @3 :XYZMeasurement;
inputsOK @4 :Bool = false;
posenetOK @5 :Bool = false;
sensorsOK @6 :Bool = false;
filterState @7 :FilterState;
struct XYZMeasurement {
x @0 :Float32;
y @1 :Float32;
z @2 :Float32;
xStd @3 :Float32;
yStd @4 :Float32;
zStd @5 :Float32;
valid @6 :Bool;
}
struct FilterState {
value @0 : List(Float64);
std @1 : List(Float64);
valid @2 : Bool;
}
}
struct ProcLog {
cpuTimes @0 :List(CPUTimes);
mem @1 :Mem;
@@ -2293,6 +2324,7 @@ struct Event {
carParams @69: Car.CarParams;
driverMonitoringState @71: DriverMonitoringState;
liveLocationKalman @72 :LiveLocationKalman;
livePose @129 :LivePose;
modelV2 @75 :ModelDataV2;
drivingModelData @128 :DrivingModelData;
driverStateV2 @92 :DriverStateV2;

View File

@@ -2,7 +2,8 @@
from msgq.ipc_pyx import Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \
set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event
from msgq.ipc_pyx import MultiplePublishersError, IpcError
from msgq import fake_event_handle, pub_sock, sub_sock, drain_sock_raw, context
from msgq import fake_event_handle, pub_sock, sub_sock, drain_sock_raw
import msgq
import os
import capnp
@@ -17,8 +18,12 @@ from cereal.services import SERVICE_LIST
NO_TRAVERSAL_LIMIT = 2**64-1
def log_from_bytes(dat: bytes) -> capnp.lib.capnp._DynamicStructReader:
with log.Event.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) as msg:
def reset_context():
msgq.context = Context()
def log_from_bytes(dat: bytes, struct: capnp.lib.capnp._StructModule = log.Event) -> capnp.lib.capnp._DynamicStructReader:
with struct.from_bytes(dat, traversal_limit_in_words=NO_TRAVERSAL_LIMIT) as msg:
return msg

52
cereal/messaging/tests/test_messaging.py Executable file → Normal file
View File

@@ -1,4 +1,3 @@
#!/usr/bin/env python3
import os
import capnp
import multiprocessing
@@ -6,8 +5,8 @@ import numbers
import random
import threading
import time
import unittest
from parameterized import parameterized
import pytest
from cereal import log, car
import cereal.messaging as messaging
@@ -28,12 +27,6 @@ def zmq_sleep(t=1):
if "ZMQ" in os.environ:
time.sleep(t)
def zmq_expected_failure(func):
if "ZMQ" in os.environ:
return unittest.expectedFailure(func)
else:
return func
# TODO: this should take any capnp struct and returrn a msg with random populated data
def random_carstate():
@@ -58,12 +51,12 @@ def delayed_send(delay, sock, dat):
threading.Timer(delay, send_func).start()
class TestMessaging(unittest.TestCase):
class TestMessaging:
def setUp(self):
# TODO: ZMQ tests are too slow; all sleeps will need to be
# replaced with logic to block on the necessary condition
if "ZMQ" in os.environ:
raise unittest.SkipTest
pytest.skip()
# ZMQ pub socket takes too long to die
# sleep to prevent multiple publishers error between tests
@@ -75,9 +68,9 @@ class TestMessaging(unittest.TestCase):
msg = messaging.new_message(evt)
except capnp.lib.capnp.KjException:
msg = messaging.new_message(evt, random.randrange(200))
self.assertLess(time.monotonic() - msg.logMonoTime, 0.1)
self.assertFalse(msg.valid)
self.assertEqual(evt, msg.which())
assert (time.monotonic() - msg.logMonoTime) < 0.1
assert not msg.valid
assert evt == msg.which()
@parameterized.expand(events)
def test_pub_sock(self, evt):
@@ -99,8 +92,8 @@ class TestMessaging(unittest.TestCase):
# no wait and no msgs in queue
msgs = func(sub_sock)
self.assertIsInstance(msgs, list)
self.assertEqual(len(msgs), 0)
assert isinstance(msgs, list)
assert len(msgs) == 0
# no wait but msgs are queued up
num_msgs = random.randrange(3, 10)
@@ -108,9 +101,9 @@ class TestMessaging(unittest.TestCase):
pub_sock.send(messaging.new_message(sock).to_bytes())
time.sleep(0.1)
msgs = func(sub_sock)
self.assertIsInstance(msgs, list)
self.assertTrue(all(isinstance(msg, expected_type) for msg in msgs))
self.assertEqual(len(msgs), num_msgs)
assert isinstance(msgs, list)
assert all(isinstance(msg, expected_type) for msg in msgs)
assert len(msgs) == num_msgs
def test_recv_sock(self):
sock = "carState"
@@ -120,14 +113,14 @@ class TestMessaging(unittest.TestCase):
# no wait and no msg in queue, socket should timeout
recvd = messaging.recv_sock(sub_sock)
self.assertTrue(recvd is None)
assert recvd is None
# no wait and one msg in queue
msg = random_carstate()
pub_sock.send(msg.to_bytes())
time.sleep(0.01)
recvd = messaging.recv_sock(sub_sock)
self.assertIsInstance(recvd, capnp._DynamicStructReader)
assert isinstance(recvd, capnp._DynamicStructReader)
# https://github.com/python/mypy/issues/13038
assert_carstate(msg.carState, recvd.carState)
@@ -139,16 +132,16 @@ class TestMessaging(unittest.TestCase):
# no msg in queue, socket should timeout
recvd = messaging.recv_one(sub_sock)
self.assertTrue(recvd is None)
assert recvd is None
# one msg in queue
msg = random_carstate()
pub_sock.send(msg.to_bytes())
recvd = messaging.recv_one(sub_sock)
self.assertIsInstance(recvd, capnp._DynamicStructReader)
assert isinstance(recvd, capnp._DynamicStructReader)
assert_carstate(msg.carState, recvd.carState)
@zmq_expected_failure
@pytest.mark.xfail(condition="ZMQ" in os.environ, reason='ZMQ detected')
def test_recv_one_or_none(self):
sock = "carState"
pub_sock = messaging.pub_sock(sock)
@@ -157,13 +150,13 @@ class TestMessaging(unittest.TestCase):
# no msg in queue, socket shouldn't block
recvd = messaging.recv_one_or_none(sub_sock)
self.assertTrue(recvd is None)
assert recvd is None
# one msg in queue
msg = random_carstate()
pub_sock.send(msg.to_bytes())
recvd = messaging.recv_one_or_none(sub_sock)
self.assertIsInstance(recvd, capnp._DynamicStructReader)
assert isinstance(recvd, capnp._DynamicStructReader)
assert_carstate(msg.carState, recvd.carState)
def test_recv_one_retry(self):
@@ -179,7 +172,7 @@ class TestMessaging(unittest.TestCase):
p = multiprocessing.Process(target=messaging.recv_one_retry, args=(sub_sock,))
p.start()
time.sleep(sock_timeout*15)
self.assertTrue(p.is_alive())
assert p.is_alive()
p.terminate()
# wait 15 socket timeouts before sending
@@ -187,9 +180,6 @@ class TestMessaging(unittest.TestCase):
delayed_send(sock_timeout*15, pub_sock, msg.to_bytes())
start_time = time.monotonic()
recvd = messaging.recv_one_retry(sub_sock)
self.assertGreaterEqual(time.monotonic() - start_time, sock_timeout*15)
self.assertIsInstance(recvd, capnp._DynamicStructReader)
assert (time.monotonic() - start_time) >= sock_timeout*15
assert isinstance(recvd, capnp._DynamicStructReader)
assert_carstate(msg.carState, recvd.carState)
if __name__ == "__main__":
unittest.main()

44
cereal/messaging/tests/test_pub_sub_master.py Executable file → Normal file
View File

@@ -1,8 +1,6 @@
#!/usr/bin/env python3
import random
import time
from typing import Sized, cast
import unittest
import cereal.messaging as messaging
from cereal.messaging.tests.test_messaging import events, random_sock, random_socks, \
@@ -10,9 +8,9 @@ from cereal.messaging.tests.test_messaging import events, random_sock, random_so
zmq_sleep
class TestSubMaster(unittest.TestCase):
class TestSubMaster:
def setUp(self):
def setup_method(self):
# ZMQ pub socket takes too long to die
# sleep to prevent multiple publishers error between tests
zmq_sleep(3)
@@ -21,21 +19,21 @@ class TestSubMaster(unittest.TestCase):
sm = messaging.SubMaster(events)
for p in [sm.updated, sm.recv_time, sm.recv_frame, sm.alive,
sm.sock, sm.data, sm.logMonoTime, sm.valid]:
self.assertEqual(len(cast(Sized, p)), len(events))
assert len(cast(Sized, p)) == len(events)
def test_init_state(self):
socks = random_socks()
sm = messaging.SubMaster(socks)
self.assertEqual(sm.frame, -1)
self.assertFalse(any(sm.updated.values()))
self.assertFalse(any(sm.alive.values()))
self.assertTrue(all(t == 0. for t in sm.recv_time.values()))
self.assertTrue(all(f == 0 for f in sm.recv_frame.values()))
self.assertTrue(all(t == 0 for t in sm.logMonoTime.values()))
assert sm.frame == -1
assert not any(sm.updated.values())
assert not any(sm.alive.values())
assert all(t == 0. for t in sm.recv_time.values())
assert all(f == 0 for f in sm.recv_frame.values())
assert all(t == 0 for t in sm.logMonoTime.values())
for p in [sm.updated, sm.recv_time, sm.recv_frame, sm.alive,
sm.sock, sm.data, sm.logMonoTime, sm.valid]:
self.assertEqual(len(cast(Sized, p)), len(socks))
assert len(cast(Sized, p)) == len(socks)
def test_getitem(self):
sock = "carState"
@@ -59,8 +57,8 @@ class TestSubMaster(unittest.TestCase):
msg = messaging.new_message(sock)
pub_sock.send(msg.to_bytes())
sm.update(1000)
self.assertEqual(sm.frame, i)
self.assertTrue(all(sm.updated.values()))
assert sm.frame == i
assert all(sm.updated.values())
def test_update_timeout(self):
sock = random_sock()
@@ -70,9 +68,9 @@ class TestSubMaster(unittest.TestCase):
start_time = time.monotonic()
sm.update(timeout)
t = time.monotonic() - start_time
self.assertGreaterEqual(t, timeout/1000.)
self.assertLess(t, 5)
self.assertFalse(any(sm.updated.values()))
assert t >= timeout/1000.
assert t < 5
assert not any(sm.updated.values())
def test_avg_frequency_checks(self):
for poll in (True, False):
@@ -118,12 +116,12 @@ class TestSubMaster(unittest.TestCase):
pub_sock.send(msg.to_bytes())
time.sleep(0.01)
sm.update(1000)
self.assertEqual(sm[sock].vEgo, n)
assert sm[sock].vEgo == n
class TestPubMaster(unittest.TestCase):
class TestPubMaster:
def setUp(self):
def setup_method(self):
# ZMQ pub socket takes too long to die
# sleep to prevent multiple publishers error between tests
zmq_sleep(3)
@@ -156,8 +154,4 @@ class TestPubMaster(unittest.TestCase):
if capnp:
msg.clear_write_flag()
msg = msg.to_bytes()
self.assertEqual(msg, recvd, i)
if __name__ == "__main__":
unittest.main()
assert msg == recvd, i

13
cereal/messaging/tests/test_services.py Executable file → Normal file
View File

@@ -1,26 +1,21 @@
#!/usr/bin/env python3
import os
import tempfile
from typing import Dict
import unittest
from parameterized import parameterized
import cereal.services as services
from cereal.services import SERVICE_LIST
class TestServices(unittest.TestCase):
class TestServices:
@parameterized.expand(SERVICE_LIST.keys())
def test_services(self, s):
service = SERVICE_LIST[s]
self.assertTrue(service.frequency <= 104)
self.assertTrue(service.decimation != 0)
assert service.frequency <= 104
assert service.decimation != 0
def test_generated_header(self):
with tempfile.NamedTemporaryFile(suffix=".h") as f:
ret = os.system(f"python3 {services.__file__} > {f.name} && clang++ {f.name}")
self.assertEqual(ret, 0, "generated services header is not valid C")
if __name__ == "__main__":
unittest.main()
assert ret == 0, "generated services header is not valid C"

View File

@@ -16,13 +16,13 @@ _services: dict[str, tuple] = {
"gyroscope2": (True, 100., 100),
"accelerometer": (True, 104., 104),
"accelerometer2": (True, 100., 100),
"magnetometer": (True, 25., 25),
"magnetometer": (True, 25.),
"lightSensor": (True, 100., 100),
"temperatureSensor": (True, 2., 200),
"temperatureSensor2": (True, 2., 200),
"gpsNMEA": (True, 9.),
"deviceState": (True, 2., 1),
"can": (True, 100., 1223), # decimation gives ~5 msgs in a full segment
"can": (True, 100., 2053), # decimation gives ~3 msgs in a full segment
"controlsState": (True, 100., 10),
"pandaStates": (True, 10., 1),
"peripheralState": (True, 2., 1),
@@ -38,7 +38,7 @@ _services: dict[str, tuple] = {
"carState": (True, 100., 10),
"carControl": (True, 100., 10),
"carOutput": (True, 100., 10),
"longitudinalPlan": (True, 20., 5),
"longitudinalPlan": (True, 20., 10),
"procLog": (True, 0.5, 15),
"gpsLocationExternal": (True, 10., 10),
"gpsLocation": (True, 1., 1),
@@ -47,9 +47,10 @@ _services: dict[str, tuple] = {
"gnssMeasurements": (True, 10., 10),
"clocks": (True, 0.1, 1),
"ubloxRaw": (True, 20.),
"liveLocationKalman": (True, 20., 5),
"livePose": (True, 20., 4),
"liveLocationKalman": (True, 20.),
"liveParameters": (True, 20., 5),
"cameraOdometry": (True, 20., 5),
"cameraOdometry": (True, 20., 10),
"lateralPlanDEPRECATED": (True, 20., 5),
"thumbnail": (True, 0.2, 1),
"onroadEvents": (True, 1., 1),

View File

@@ -24,8 +24,8 @@ int fsync_dir(const std::string &path) {
int result = -1;
int fd = HANDLE_EINTR(open(path.c_str(), O_RDONLY, 0755));
if (fd >= 0) {
result = fsync(fd);
close(fd);
result = HANDLE_EINTR(fsync(fd));
HANDLE_EINTR(close(fd));
}
return result;
}
@@ -232,6 +232,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"CustomMapboxTokenSk", PERSISTENT | BACKUP},
{"CustomOffsets", PERSISTENT | BACKUP},
{"CustomStockLong", PERSISTENT | BACKUP},
{"CustomStockLongPlanner", PERSISTENT | BACKUP},
{"CustomTorqueLateral", PERSISTENT | BACKUP},
{"DevUIInfo", PERSISTENT | BACKUP},
{"DisableOnroadUploads", PERSISTENT | BACKUP},
@@ -261,9 +262,15 @@ std::unordered_map<std::string, uint32_t> keys = {
{"HandsOnWheelMonitoring", PERSISTENT | BACKUP},
{"HasAcceptedTermsSP", PERSISTENT},
{"HideVEgoUi", PERSISTENT | BACKUP},
{"HyundaiCruiseMainDefault", PERSISTENT | BACKUP},
{"HkgCustomLongTuning", PERSISTENT | BACKUP},
{"HkgSmoothStop", PERSISTENT | BACKUP},
{"HyundaiCruiseMainDefault", PERSISTENT | BACKUP},
{"HotspotOnBoot", PERSISTENT},
{"HotspotOnBootConfirmed", PERSISTENT},
{"HyundaiRadarTracksAvailable", PERSISTENT},
{"HyundaiRadarTracksAvailableCache", PERSISTENT},
{"HyundaiRadarTracksAvailablePersistent", PERSISTENT},
{"LastCarModel", PERSISTENT | BACKUP},
{"LastSpeedLimitSignTap", PERSISTENT},
{"LastSunnylinkPingTime", CLEAR_ON_MANAGER_START},
@@ -280,6 +287,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"NavModelUrl", PERSISTENT | BACKUP},
{"NNFF", PERSISTENT | BACKUP},
{"NNFFCarModel", PERSISTENT | BACKUP},
{"NNFFNoLateralJerk", PERSISTENT | BACKUP},
{"OnroadScreenOff", PERSISTENT | BACKUP},
{"OnroadScreenOffBrightness", PERSISTENT | BACKUP},
{"OnroadScreenOffEvent", PERSISTENT | BACKUP},
@@ -290,8 +298,11 @@ std::unordered_map<std::string, uint32_t> keys = {
{"OsmLocationUrl", PERSISTENT},
{"OsmWayTest", PERSISTENT},
{"OsmDownloadedDate", PERSISTENT},
{"OvertakingAccelerationAssist", PERSISTENT},
{"PathOffset", PERSISTENT | BACKUP},
{"PauseLateralSpeed", PERSISTENT | BACKUP},
{"PCMVCruiseOverride", PERSISTENT | BACKUP},
{"PCMVCruiseOverrideSpeed", PERSISTENT | BACKUP},
{"QuietDrive", PERSISTENT | BACKUP},
{"RoadEdge", PERSISTENT | BACKUP},
{"ReverseAccChange", PERSISTENT | BACKUP},
@@ -316,10 +327,12 @@ std::unordered_map<std::string, uint32_t> keys = {
{"TermsVersionSunnypilot", PERSISTENT},
{"TorqueDeadzoneDeg", PERSISTENT | BACKUP},
{"TorqueFriction", PERSISTENT | BACKUP},
{"TorqueLateralJerk", PERSISTENT | BACKUP},
{"TorqueMaxLatAccel", PERSISTENT | BACKUP},
{"TorquedOverride", PERSISTENT | BACKUP},
{"ToyotaAutoLockBySpeed", PERSISTENT | BACKUP},
{"ToyotaAutoUnlockByShifter", PERSISTENT | BACKUP},
{"ToyotaDriveMode", PERSISTENT | BACKUP},
{"ToyotaEnhancedBsm", PERSISTENT | BACKUP},
{"ToyotaSnG", PERSISTENT | BACKUP},
{"ToyotaTSS2Long", PERSISTENT | BACKUP},

View File

@@ -47,9 +47,9 @@ class DeviceCameraConfig:
yield cam, getattr(self, cam)
_ar_ox_fisheye = CameraConfig(1928, 1208, 567.0) # focal length probably wrong? magnification is not consistent across frame
_os_fisheye = CameraConfig(2688, 1520, 567.0 / 2 * 3)
_os_fisheye = CameraConfig(2688 // 2, 1520 // 2, 567.0 / 4 * 3)
_ar_ox_config = DeviceCameraConfig(CameraConfig(1928, 1208, 2648.0), _ar_ox_fisheye, _ar_ox_fisheye)
_os_config = DeviceCameraConfig(CameraConfig(2688, 1520, 2648.0 * 2 / 3), _os_fisheye, _os_fisheye)
_os_config = DeviceCameraConfig(CameraConfig(2688 // 2, 1520 // 2, 1522.0 * 3 / 4), _os_fisheye, _os_fisheye)
_neo_config = DeviceCameraConfig(CameraConfig(1164, 874, 910.0), CameraConfig(816, 612, 650.0), _NoneCameraConfig())
DEVICE_CAMERAS = {

View File

@@ -4,7 +4,7 @@
A supported vehicle is one that just works when you install a comma device. All supported cars provide a better experience than any stock system. Supported vehicles reference the US market unless otherwise specified.
# 288 Supported Cars
# 287 Supported Cars
|Make|Model|Supported Package|ACC|No ACC accel below|No ALC below|Steering Torque|Resume from stop|<a href="##"><img width=2000></a>Hardware Needed<br>&nbsp;|Video|
|---|---|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
@@ -25,8 +25,7 @@ A supported vehicle is one that just works when you install a comma device. All
|Chrysler|Pacifica 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica 2017-18">Buy Here</a></sub></details>||
|Chrysler|Pacifica 2019-20|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica 2019-20">Buy Here</a></sub></details>||
|Chrysler|Pacifica 2021-23|All|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica 2021-23">Buy Here</a></sub></details>||
|Chrysler|Pacifica Hybrid 2017|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2017">Buy Here</a></sub></details>||
|Chrysler|Pacifica Hybrid 2018|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2018">Buy Here</a></sub></details>||
|Chrysler|Pacifica Hybrid 2017-18|Adaptive Cruise Control (ACC)|Stock|0 mph|9 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2017-18">Buy Here</a></sub></details>||
|Chrysler|Pacifica Hybrid 2019-24|Adaptive Cruise Control (ACC)|Stock|0 mph|39 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 FCA connector<br>- 1 RJ45 cable (7 ft)<br>- 1 comma 3X<br>- 1 comma power v2<br>- 1 harness box<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=Chrysler&model=Pacifica Hybrid 2019-24">Buy Here</a></sub></details>||
|comma|body|All|openpilot|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|None||
|CUPRA|Ateca 2018-23|Adaptive Cruise Control (ACC) & Lane Assist|openpilot available[<sup>1,12</sup>](#footnotes)|0 mph|0 mph|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|<details><summary>Parts</summary><sub>- 1 USB-C coupler<br>- 1 VW J533 connector<br>- 1 comma 3X<br>- 1 harness box<br>- 1 long OBD-C cable<br>- 1 mount<br>- 1 right angle OBD-C cable (1.5 ft)<br><a href="https://comma.ai/shop/comma-3x.html?make=CUPRA&model=Ateca 2018-23">Buy Here</a></sub></details>||

View File

@@ -1,3 +1,26 @@
# openpilot-docs
# openpilot docs
These docs are autogenerated from [this folder](https://github.com/commaai/openpilot/tree/master/docs) in the main openpilot repository.
This is the source for [docs.comma.ai](https://docs.comma.ai).
The site is updated on pushes to master by this [workflow](../.github/workflows/docs.yaml).
## Development
NOTE: Those commands must be run in the root directory of openpilot, **not /docs**
**1. Install the docs dependencies**
``` bash
pip install .[docs]
```
**2. Build the new site**
``` bash
mkdocs build
```
**3. Run the new site locally**
``` bash
mkdocs serve
```
References:
* https://www.mkdocs.org/getting-started/
* https://github.com/ntno/mkdocs-terminal

View File

@@ -29,7 +29,7 @@ pytest
cd system/loggerd && pytest .
# run the linter
pre-commit run --all
op lint
```
## Testing

View File

@@ -0,0 +1,22 @@
# What is a car port?
A car port enables openpilot support on a particular car. Each car model openpilot supports needs to be individually ported. All car ports live in `openpilot/selfdrive/car/`.
The complexity of a car port varies depending on many factors including:
* existing openpilot support for similar cars
* architecture and APIs available in the car
# Structure of a car port
* `interface.py`: Interface for the car, defines the CarInterface class
* `carstate.py`: Reads CAN from car and builds openpilot CarState message
* `carcontroller.py`: Builds CAN messages to send to car
* `values.py`: Limits for actuation, general constants for cars, and supported car documentation
* `radar_interface.py`: Interface for parsing radar points from the car
# Overiew
[Jason Young](https://github.com/jyoung8607) gave a talk at COMMA_CON with an overview of the car porting process. The talk is available on YouTube:
https://youtu.be/KcfzEHB6ms4?si=5szh1PX6TksOCKmM

View File

@@ -0,0 +1,8 @@
# openpilot glossary
* **route**:
* **segment**: routes are split into one minute chunks called segments.
* **panda**: this is . See the repo.
* **onroad**:
* **offroad**:
* **comma 3X**:

View File

@@ -1,10 +1,8 @@
# loggerd
# Logging
openpilot records routes in one minute chunks called segments. A route starts on the rising edge of ignition and ends on the falling edge.
Check out our [python library](https://github.com/commaai/openpilot/blob/master/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot.
## log types
Check out our [Python library](https://github.com/commaai/openpilot/blob/master/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot.
For each segment, openpilot records the following log types:
@@ -15,9 +13,10 @@ rlogs contain all the messages passed amongst openpilot's processes. See [cereal
## {f,e,d}camera.hevc
Each camera stream is H.265 encoded and written to its respective file.
* fcamera.hevc is the road camera
* ecamera.hevc is the wide road camera
* dcamera.hevc is the driver camera
* `fcamera.hevc` is the road camera
* `ecamera.hevc` is the wide road camera
* `dcamera.hevc` is the driver camera
## qlog.bz2 & qcamera.ts

1
docs/concepts/safety.md Symbolic link
View File

@@ -0,0 +1 @@
../SAFETY.md

View File

@@ -0,0 +1 @@
# Architecture

View File

@@ -0,0 +1,30 @@
# Roadmap
This is the roadmap for the next major openpilot releases. Also check out
* [Milestones](https://github.com/commaai/openpilot/milestones) for minor releases
* [Projects](https://github.com/commaai/openpilot/projects?query=is%3Aopen) for shorter-term projects not tied to releases
* [Bounties](https://comma.ai/bounties) for paid individual issues
## openpilot 0.10
openpilot 0.10 will be the first release with a driving policy trained in
a [learned simulator](https://youtu.be/EqQNZXqzFSI).
* Driving model trained in a learned simlator
* Always-on driver monitoring (behind a toggle)
* GPS removed from the driving stack
* 100KB qlogs
* `master-ci` pushed after 1000 hours of hardware-in-the-loop testing
* Car interface code moved into [opendbc](https://github.com/commaai/opendbc)
* openpilot on PC for Linux x86, Linux arm64, and Mac (Apple Silicon)
## openpilot 1.0
openpilot 1.0 will feature a fully end-to-end driving policy.
* End-to-end longitudinal control in Chill mode
* Automatic Emergency Braking (AEB)
* Driver monitoring with sleep detection
* Rolling updates/releases pushed out by CI
* [panda safety 1.0](https://github.com/orgs/commaai/projects/27)

View File

@@ -1,6 +1,6 @@
# What is openpilot?
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](docs/INTEGRATION.md) and [limitations](docs/LIMITATIONS.md).
[openpilot](http://github.com/commaai/openpilot) is an open source driver assistance system. Currently, openpilot performs the functions of Adaptive Cruise Control (ACC), Automated Lane Centering (ALC), Forward Collision Warning (FCW), and Lane Departure Warning (LDW) for a growing variety of [supported car makes, models, and model years](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). In addition, while openpilot is engaged, a camera-based Driver Monitoring (DM) feature alerts distracted and asleep drivers. See more about [the vehicle integration](https://github.com/commaai/openpilot/blob/master/docs/INTEGRATION.md) and [limitations](https://github.com/commaai/openpilot/blob/master/docs/LIMITATIONS.md).
## How do I use it?

View File

@@ -1,39 +1,42 @@
# SSH
# connect to a comma 3/3X
## Quick Start
A comma 3/3X is a normal [Linux](https://github.com/commaai/agnos-builder) computer that exposes [SSH](https://wiki.archlinux.org/title/Secure_Shell) and a [serial console](https://wiki.archlinux.org/title/Working_with_the_serial_console).
## Serial Console
On both the comma three and 3X, the serial console is accessible from the main OBD-C port.
Connect the comma 3/3X to your computer with a normal USB C cable, or use a [comma serial](https://comma.ai/shop/comma-serial) for steady 12V power.
On the comma three, the serial console is exposed through a UART-to-USB chip, and `tools/serial/connect.sh` can be used to connect.
On the comma 3X, the serial console is accessible through the [panda](https://github.com/commaai/panda) using the `panda/tests/som_debug.sh` script.
## SSH
In order to SSH into your device, you'll need a GitHub account with SSH keys. See this [GitHub article](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) for getting your account setup with SSH keys.
* Enable SSH in your device's settings
* Enter your GitHub username in the device's settings
* Connect to your device
* Username: `comma`
* Port: `22` or `8022`
* Username: `comma`
* Port: `22`
Here's an example command for connecting to your device using its tethered connection:<br />
`ssh comma@192.168.43.1`
For doing development work on device, it's recommended to use [SSH agent forwarding](https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding).
## Notes
### Notes
The public keys are only fetched from your GitHub account once. In order to update your device's authorized keys, you'll need to re-enter your GitHub username.
The `id_rsa` key in this directory only works while your device is in the setup state with no software installed. After installation, that default key will be removed.
See the [community wiki](https://github.com/commaai/openpilot/wiki/SSH) for more detailed instructions and information.
#### ssh.comma.ai proxy
# Connecting to ssh.comma.ai
SSH into your comma device from anywhere with `ssh.comma.ai`. Requires a [comma prime subscription](https://comma.ai/connect).
With a [comma prime subscription](https://comma.ai/connect), you can SSH into your comma device from anywhere.
## Setup
With software version 0.6.1 or newer, enter your GitHub username on your device under Developer Settings. Your GitHub authorized public keys will become your authorized SSH keys for `ssh.comma.ai`. You can add any additional keys in `/system/comma/home/.ssh/authorized_keys.persist`.
## Recommended .ssh/config
With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`.<br />
For example: `ssh comma-ffffffffffffffff`
With the below SSH configuration, you can type `ssh comma-{dongleid}` to connect to your device through `ssh.comma.ai`.
```
Host comma-*
@@ -41,20 +44,21 @@ Host comma-*
User comma
IdentityFile ~/.ssh/my_github_key
ProxyCommand ssh %h@ssh.comma.ai -W %h:%p
Host ssh.comma.ai
Hostname ssh.comma.ai
Port 22
IdentityFile ~/.ssh/my_github_key
```
## One-off connection
### One-off connection
```
ssh -i ~/.ssh/my_github_key -o ProxyCommand="ssh -i ~/.ssh/my_github_key -W %h:%p -p %p %h@ssh.comma.ai" comma@ffffffffffffffff
```
(Replace `ffffffffffffffff` with your dongle_id)
## ssh.comma.ai host key fingerprint
### ssh.comma.ai host key fingerprint
```
Host key fingerprint is SHA256:X22GOmfjGb9J04IA2+egtdaJ7vW9Fbtmpz9/x8/W1X4

View File

@@ -0,0 +1,14 @@
# Replay
Replaying is a critical tool for openpilot development and debugging.
## Replaying a route
*Hardware required: none*
Just run `tools/replay/replay --demo`.
## Replaying CAN data
*Hardware required: jungle and comma 3/3X*
1. Connect your PC to a jungle.
2.

View File

@@ -0,0 +1,98 @@
# Turn the speed blue
*A getting started guide for openpilot development*
In 30 minutes, we'll get an openpilot development environment setup on your computer and make some changes to openpilot's UI.
And if you have a comma 3/3X, we'll deploy the change to your device for testing.
## 1. Setup your development environment
Run this to clone openpilot and install all the dependencies:
```bash
curl -fsSL openpilot.comma.ai | bash
```
Navigate to openpilot folder & activate a Python virtual environment
```bash
cd openpilot
source .venv/bin/activate
```
Then, compile openpilot:
```bash
scons -j8
```
## 2. Run replay
We'll run the `replay` tool with the demo route to get data streaming for testing our UI changes.
```bash
# in terminal 1
tools/replay/replay --demo
# in terminal 2
selfdrive/ui/ui
```
The openpilot UI should launch and show a replay of the demo route.
If you have your own comma device, you can replace `--demo` with one of your own routes from comma connect.
## 3. Make the speed blue
Search for “mph” with git grep in the `ui` folder.
```bash
$ git grep "mph" selfdrive/ui/
paint.cc: ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular");
```
The line right above contains the actual speed. Unfortunately, COLOR_BLUE isnt defined, but a git grep of COLOR_WHITE shows its nvgRGBA(255, 255, 255, 255). Personally, I like a lighter blue, so I went with #8080FF.
```bash
$ git diff
diff --git a/selfdrive/ui/paint.cc b/selfdrive/ui/paint.cc
index 821d95115..cc996eaa1 100644
--- a/selfdrive/ui/paint.cc
+++ b/selfdrive/ui/paint.cc
@@ -175,8 +175,8 @@ static void ui_draw_vision_speed(UIState *s) {
const float speed = std::max(0.0, (*s->sm)["carState"].getCarState().getVEgo() * (s->scene.is_metric ? 3.6 : 2.2369363));
const std::string speed_str = std::to_string((int)std::nearbyint(speed));
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
- ui_draw_text(s, s->fb_w/2, 210, speed_str.c_str(), 96 * 2.5, COLOR_WHITE, "sans-bold");
- ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, COLOR_WHITE_ALPHA(200), "sans-regular");
+ ui_draw_text(s, s->fb_w/2, 210, speed_str.c_str(), 96 * 2.5, nvgRGBA(128, 128, 255, 255), "sans-bold");
+ ui_draw_text(s, s->fb_w/2, 290, s->scene.is_metric ? "km/h" : "mph", 36 * 2.5, nvgRGBA(128, 128, 255, 200), "sans-regular");
}
static void ui_draw_vision_event(UIState *s) {
```
## 4. Rebuild UI, and admire your work
```
scons -j8 && selfdrive/ui/ui
```
![](https://blog.comma.ai/img/blue_speed_ui.png)
## 5. Push your fork to GitHub
Click fork on GitHub. Then, push with:
```bash
git remote rm origin
git remote add origin git@github.com:<your-github-username>/openpilot.git
git add .
git commit -m "Make the speed blue."
git push --set-upstream origin master
```
## 6. Run your fork on device in your car!
Uninstall openpilot from your device through the settings. Then, enter the URL for your very own installer:
```
installer.comma.ai/<your-github-username>/master
```
## 7. Admire your work IRL
![](https://blog.comma.ai/img/c3_blue_ui.jpg)

1
docs/index.md Symbolic link
View File

@@ -0,0 +1 @@
getting-started/what-is-openpilot.md

View File

@@ -1,12 +0,0 @@
This is the source for a new https://docs.comma.ai. It's not hosted anywhere yet, but it's easy to run locally.
https://www.mkdocs.org/getting-started/
```
pip install mkdocs mkdocs-terminal
mkdocs serve
```
inspiration:
* https://rerun.io/docs/
* https://docs.expo.dev/

View File

@@ -1,9 +0,0 @@
# What is a car port?
All car ports live in `openpilot/selfdrive/car/`.
* interface.py: Interface for the car, defines the CarInterface class
* carstate.py: Reads CAN from car and builds openpilot CarState message
* carcontroller.py: Builds CAN messages to send to car
* values.py: Limits for actuation, general constants for cars, and supported car documentation
* radar_interface.py: Interface for parsing radar points from the car

View File

@@ -1,4 +0,0 @@
This section is for how-to's on common workflows.
They'll be like this blog post we wrote:
https://blog.comma.ai/turning-the-speed-blue/

View File

@@ -1,18 +0,0 @@
site_name: openpilot docs
docs_dir: docs
repo_url: https://github.com/commaai/openpilot/
theme:
name: terminal
features:
- navigation.side.toc.hide
nav:
- Getting Started:
- What is openpilot?: getting-started/what-is-openpilot.md
- How-to:
- Turn the speed blue: how-to/turning-the-speed-blue.md
- Car Porting:
- What is a car port?: car-porting/what-is-a-car-port.md
- Porting a car brand: car-porting/brand-port.md
- Porting a car model: car-porting/model-port.md

38
mkdocs.yml Normal file
View File

@@ -0,0 +1,38 @@
site_name: openpilot docs
repo_url: https://github.com/commaai/openpilot/
site_url: https://docs.comma.ai
exclude_docs: README.md
strict: true
docs_dir: docs
site_dir: docs_site/
theme:
name: readthedocs
navigation_depth: 3
nav:
- Getting Started:
- What is openpilot?: getting-started/what-is-openpilot.md
- How-to:
- Turn the speed blue: how-to/turn-the-speed-blue.md
- Connect to a comma 3/3X: how-to/connect-to-comma.md
#- Replay a drive: how-to/replay-a-drive.md
- Concepts:
- Logs: concepts/logs.md
- Safety: concepts/safety.md
- Car Porting:
- What is a car port?: car-porting/what-is-a-car-port.md
- Porting a car brand: car-porting/brand-port.md
- Porting a car model: car-porting/model-port.md
- Contributing:
- Roadmap: contributing/roadmap.md
#- Architecture: contributing/architecture.md
- Contributing Guide →: https://github.com/commaai/openpilot/blob/master/docs/CONTRIBUTING.md
- Links:
- Blog →: https://blog.comma.ai
- Bounties →: https://comma.ai/bounties
- GitHub →: https://github.com/commaai
- Discord →: https://discord.comma.ai
- X →: https://x.com/comma_ai

Submodule opendbc deleted from adc1fffe60

1
opendbc Symbolic link
View File

@@ -0,0 +1 @@
opendbc_repo/opendbc

1
opendbc_repo Submodule

Submodule opendbc_repo added at 529474a50e

2
panda

Submodule panda updated: 5d92bdc6de...55018eafc2

View File

@@ -26,7 +26,7 @@ dependencies = [
"pycapnp",
"Cython",
"setuptools",
"numpy < 2.0.0", # control does not support numpy 2
"numpy",
# body / webrtcd
"aiohttp",
@@ -52,27 +52,30 @@ dependencies = [
"websocket_client",
# acados deps
"casadi",
"casadi @ https://github.com/commaai/casadi/releases/download/nightly-release-3.6.6/casadi-3.6.6-cp312-none-manylinux2014_aarch64.whl ; (python_version == '3.12' and platform_machine == 'aarch64')", # TODO: Go back to pypi casadi when they fix aarch64 for python312
"casadi; platform_machine != 'aarch64' or python_version != '3.12'",
"future-fstrings",
# these should be removed
"psutil",
"pycryptodome", # used in updated/casync, panda, body, and a test
#logreader
"zstd",
# logreader
"zstandard",
]
[project.optional-dependencies]
docs = [
"Jinja2",
"natsort",
"mkdocs",
]
testing = [
"coverage",
"hypothesis ==6.47.*",
"import-linter",
"mypy",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-cpp",
@@ -83,30 +86,25 @@ testing = [
"pytest-asyncio",
"pytest-mock",
"pytest-repeat",
"ruff"
"ruff",
"codespell",
]
dev = [
"av",
"azure-identity",
"azure-storage-blob",
"breathe",
"control",
"dictdiffer",
"flaky",
"inputs",
"lru-dict",
"matplotlib",
"metadrive-simulator; platform_machine != 'aarch64'",
"mpld3",
"myst-parser",
"natsort",
"opencv-python-headless",
"metadrive-simulator@git+https://github.com/commaai/metadrive@opencv_headless ; platform_machine != 'aarch64'",
"parameterized >=0.8, <0.9",
#pprofile = "*"
#"pprofile",
"pyautogui",
"pygame",
"pyopencl; platform_machine != 'aarch64'", # broken on arm64
"pytools < 2024.1.11; platform_machine != 'aarch64'", # pyopencl use a broken version
"pywinctl",
"pyprof2calltree",
"rerun-sdk",
@@ -116,12 +114,8 @@ dev = [
# this is only pinned since 5.15.11 is broken
"pyqt5 ==5.15.2; platform_machine == 'x86_64'", # no aarch64 wheels for macOS/linux
]
[tool.uv.sources]
metadrive-simulator = { git = "https://github.com/commaai/metadrive.git", branch = "opencv_headless" }
[project.urls]
Homepage = "https://comma.ai"
@@ -132,9 +126,12 @@ build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = [ "." ]
[tool.hatch.metadata]
allow-direct-references = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--ignore=openpilot/ --ignore=cereal/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
addopts = "--ignore=openpilot/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
cpp_files = "test_*"
cpp_harness = "selfdrive/test/cpp_harness.py"
python_files = "test_*.py"
@@ -167,6 +164,13 @@ testpaths = [
"cereal/messaging/tests",
]
[tool.codespell]
count = true
quiet-level = 3
# if you've got a short variable name that's getting flagged, add it here
ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn"
builtin = "clear,rare,informal,usage,code,names,en-GB_to_en-US"
[tool.mypy]
python_version = "3.11"
plugins = [
@@ -223,7 +227,7 @@ lint.ignore = [
"UP038", # (x, y) -> x|y for isinstance
]
line-length = 160
target-version="py311"
target-version ="py311"
exclude = [
"body",
"cereal",
@@ -235,7 +239,8 @@ exclude = [
"teleoprtc_repo",
"third_party",
]
lint.flake8-implicit-str-concat.allow-multiline=false
lint.flake8-implicit-str-concat.allow-multiline = false
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"selfdrive".msg = "Use openpilot.selfdrive"
"common".msg = "Use openpilot.common"
@@ -247,5 +252,6 @@ lint.flake8-implicit-str-concat.allow-multiline=false
[tool.coverage.run]
concurrency = ["multiprocessing", "thread"]
[tool.ruff.format]
quote-style = "preserve"

View File

@@ -2,7 +2,7 @@
"embeds": [
{
"title": "🎉 sunnypilot `${NEW_BRANCH}` New Update 🎉",
"description": "[sunnypilot](${PUBLIC_REPO_URL}): Build #${CI_PIPELINE_IID} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨",
"description": "[sunnypilot](${PUBLIC_REPO_URL}): Build #${EXTRA_VERSION_IDENTIFIER} of branch [${NEW_BRANCH}](${PUBLIC_REPO_URL}/tree/${NEW_BRANCH}) has been published.\n\nDrive safe! 🚗💨",
"color": 4321431
}
]

2
release/ci/sync-lfs.sh Normal file → Executable file
View File

@@ -4,4 +4,4 @@ mv .lfsconfig-comma .lfsconfig
git lfs fetch --all; git lfs pull
mv .lfsconfig .lfsconfig-comma
mv .lfsconfig.bak .lfsconfig
git lfs fetch --all; git lfs push origin main
git lfs fetch --all; git lfs push --all origin

4
release/files_pc Normal file
View File

@@ -0,0 +1,4 @@
third_party/libyuv/x86_64/**
third_party/snpe/x86_64/**
third_party/snpe/x86_64-linux-clang/**
third_party/acados/x86_64/**

15
release/files_tici Normal file
View File

@@ -0,0 +1,15 @@
third_party/libyuv/larch64/**
third_party/snpe/larch64**
third_party/snpe/aarch64-ubuntu-gcc7.5/*
third_party/acados/larch64/**
system/camerad/cameras/camera_qcom2.cc
system/camerad/cameras/camera_qcom2.h
system/camerad/cameras/camera_util.cc
system/camerad/cameras/camera_util.h
system/camerad/cameras/process_raw.cl
system/qcomgpsd/*
selfdrive/ui/qt/spinner_larch64
selfdrive/ui/qt/text_larch64

View File

@@ -10,14 +10,12 @@ ROOT = HERE + "/.."
# - minimizing release download size
# - keeping the diff readable
blacklist = [
"body/STL/",
"panda/drivers/",
"panda/examples/",
"panda/tests/safety/",
"opendbc/.*.dbc$",
"opendbc/generator/",
"opendbc_repo/dbc/.*.dbc$",
"opendbc_repo/dbc/generator/",
"cereal/.*test.*",
"^common/tests/",
@@ -28,7 +26,6 @@ blacklist = [
"selfdrive/car/tests/test_models.*",
"^tools/",
"^scripts/",
"^tinygrad_repo/",
"matlab.*.md",
@@ -118,55 +115,55 @@ whitelist = [
"tinygrad_repo/tinygrad/.*.py",
# TODO: do this automatically
"opendbc/comma_body.dbc",
"opendbc/chrysler_ram_hd_generated.dbc",
"opendbc/chrysler_ram_dt_generated.dbc",
"opendbc/chrysler_pacifica_2017_hybrid_generated.dbc",
"opendbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc",
"opendbc/gm_global_a_powertrain_generated.dbc",
"opendbc/gm_global_a_object.dbc",
"opendbc/gm_global_a_chassis.dbc",
"opendbc/FORD_CADS.dbc",
"opendbc/ford_fusion_2018_adas.dbc",
"opendbc/ford_lincoln_base_pt.dbc",
"opendbc/honda_accord_2018_can_generated.dbc",
"opendbc/acura_ilx_2016_can_generated.dbc",
"opendbc/acura_rdx_2018_can_generated.dbc",
"opendbc/acura_rdx_2020_can_generated.dbc",
"opendbc/honda_civic_touring_2016_can_generated.dbc",
"opendbc/honda_civic_hatchback_ex_2017_can_generated.dbc",
"opendbc/honda_crv_touring_2016_can_generated.dbc",
"opendbc/honda_crv_ex_2017_can_generated.dbc",
"opendbc/honda_crv_ex_2017_body_generated.dbc",
"opendbc/honda_crv_executive_2016_can_generated.dbc",
"opendbc/honda_fit_ex_2018_can_generated.dbc",
"opendbc/honda_odyssey_exl_2018_generated.dbc",
"opendbc/honda_odyssey_extreme_edition_2018_china_can_generated.dbc",
"opendbc/honda_insight_ex_2019_can_generated.dbc",
"opendbc/acura_ilx_2016_nidec.dbc",
"opendbc/honda_civic_ex_2022_can_generated.dbc",
"opendbc/hyundai_canfd.dbc",
"opendbc/hyundai_kia_generic.dbc",
"opendbc/hyundai_kia_mando_front_radar_generated.dbc",
"opendbc/mazda_2017.dbc",
"opendbc/nissan_x_trail_2017_generated.dbc",
"opendbc/nissan_leaf_2018_generated.dbc",
"opendbc/subaru_global_2017_generated.dbc",
"opendbc/subaru_global_2020_hybrid_generated.dbc",
"opendbc/subaru_outback_2015_generated.dbc",
"opendbc/subaru_outback_2019_generated.dbc",
"opendbc/subaru_forester_2017_generated.dbc",
"opendbc/toyota_tnga_k_pt_generated.dbc",
"opendbc/toyota_new_mc_pt_generated.dbc",
"opendbc/toyota_nodsu_pt_generated.dbc",
"opendbc/toyota_adas.dbc",
"opendbc/toyota_tss2_adas.dbc",
"opendbc/vw_golf_mk4.dbc",
"opendbc/vw_mqb_2010.dbc",
"opendbc/tesla_can.dbc",
"opendbc/tesla_radar_bosch_generated.dbc",
"opendbc/tesla_radar_continental_generated.dbc",
"opendbc/tesla_powertrain.dbc",
"opendbc_repo/dbc/comma_body.dbc",
"opendbc_repo/dbc/chrysler_ram_hd_generated.dbc",
"opendbc_repo/dbc/chrysler_ram_dt_generated.dbc",
"opendbc_repo/dbc/chrysler_pacifica_2017_hybrid_generated.dbc",
"opendbc_repo/dbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc",
"opendbc_repo/dbc/gm_global_a_powertrain_generated.dbc",
"opendbc_repo/dbc/gm_global_a_object.dbc",
"opendbc_repo/dbc/gm_global_a_chassis.dbc",
"opendbc_repo/dbc/FORD_CADS.dbc",
"opendbc_repo/dbc/ford_fusion_2018_adas.dbc",
"opendbc_repo/dbc/ford_lincoln_base_pt.dbc",
"opendbc_repo/dbc/honda_accord_2018_can_generated.dbc",
"opendbc_repo/dbc/acura_ilx_2016_can_generated.dbc",
"opendbc_repo/dbc/acura_rdx_2018_can_generated.dbc",
"opendbc_repo/dbc/acura_rdx_2020_can_generated.dbc",
"opendbc_repo/dbc/honda_civic_touring_2016_can_generated.dbc",
"opendbc_repo/dbc/honda_civic_hatchback_ex_2017_can_generated.dbc",
"opendbc_repo/dbc/honda_crv_touring_2016_can_generated.dbc",
"opendbc_repo/dbc/honda_crv_ex_2017_can_generated.dbc",
"opendbc_repo/dbc/honda_crv_ex_2017_body_generated.dbc",
"opendbc_repo/dbc/honda_crv_executive_2016_can_generated.dbc",
"opendbc_repo/dbc/honda_fit_ex_2018_can_generated.dbc",
"opendbc_repo/dbc/honda_odyssey_exl_2018_generated.dbc",
"opendbc_repo/dbc/honda_odyssey_extreme_edition_2018_china_can_generated.dbc",
"opendbc_repo/dbc/honda_insight_ex_2019_can_generated.dbc",
"opendbc_repo/dbc/acura_ilx_2016_nidec.dbc",
"opendbc_repo/dbc/honda_civic_ex_2022_can_generated.dbc",
"opendbc_repo/dbc/hyundai_canfd.dbc",
"opendbc_repo/dbc/hyundai_kia_generic.dbc",
"opendbc_repo/dbc/hyundai_kia_mando_front_radar_generated.dbc",
"opendbc_repo/dbc/mazda_2017.dbc",
"opendbc_repo/dbc/nissan_x_trail_2017_generated.dbc",
"opendbc_repo/dbc/nissan_leaf_2018_generated.dbc",
"opendbc_repo/dbc/subaru_global_2017_generated.dbc",
"opendbc_repo/dbc/subaru_global_2020_hybrid_generated.dbc",
"opendbc_repo/dbc/subaru_outback_2015_generated.dbc",
"opendbc_repo/dbc/subaru_outback_2019_generated.dbc",
"opendbc_repo/dbc/subaru_forester_2017_generated.dbc",
"opendbc_repo/dbc/toyota_tnga_k_pt_generated.dbc",
"opendbc_repo/dbc/toyota_new_mc_pt_generated.dbc",
"opendbc_repo/dbc/toyota_nodsu_pt_generated.dbc",
"opendbc_repo/dbc/toyota_adas.dbc",
"opendbc_repo/dbc/toyota_tss2_adas.dbc",
"opendbc_repo/dbc/vw_golf_mk4.dbc",
"opendbc_repo/dbc/vw_mqb_2010.dbc",
"opendbc_repo/dbc/tesla_can.dbc",
"opendbc_repo/dbc/tesla_radar_bosch_generated.dbc",
"opendbc_repo/dbc/tesla_radar_continental_generated.dbc",
"opendbc_repo/dbc/tesla_powertrain.dbc",
]
# Sunnypilot whitelist

View File

@@ -0,0 +1,390 @@
#!/bin/bash -e
SRC=/tmp/openpilot/
SRC_CLONE=/tmp/openpilot-clone/
OUT=/tmp/openpilot-tiny/
REWRITE_IGNORE_BRANCHES=(
dashcam3
devel
master-ci
nightly
release2
release3
release3-staging
)
VALIDATE_IGNORE_FILES=(
".github/ISSUE_TEMPLATE/bug_report.md"
".github/pull_request_template.md"
)
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR
LOGS_DIR=$DIR/git-rewrite-$(date +"%Y-%m-%dT%H:%M:%S%z")
mkdir -p $LOGS_DIR
GIT_REWRITE_LOG=$LOGS_DIR/git-rewrite-log.txt
BRANCH_DIFF_LOG=$LOGS_DIR/branch-diff-log.txt
COMMIT_DIFF_LOG=$LOGS_DIR/commit-diff-log.txt
START_TIME=$(date +%s)
exec > >(while IFS= read -r line; do
CURRENT_TIME=$(date +%s)
ELAPSED_TIME=$((CURRENT_TIME - START_TIME))
echo "[${ELAPSED_TIME}s] $line"
done | tee -a "$GIT_REWRITE_LOG") 2>&1
# INSTALL git-filter-repo
if [ ! -f /tmp/git-filter-repo ]; then
echo "Installing git-filter-repo..."
curl -sSo /tmp/git-filter-repo https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo
chmod +x /tmp/git-filter-repo
fi
# MIRROR openpilot
if [ ! -d $SRC ]; then
echo "Mirroring openpilot..."
git clone --mirror https://github.com/commaai/openpilot.git $SRC # 4.18 GiB (488034 objects)
cd $SRC
echo "Starting size $(du -sh .)"
git remote update
# the git-filter-repo analysis is bliss - can be found in the repo root/filter-repo/analysis
echo "Analyzing with git-filter-repo..."
/tmp/git-filter-repo --force --analyze
echo "Pushing to openpilot-archive..."
# push to archive repo - in smaller parts because the 2 GB push limit - https://docs.github.com/en/get-started/using-git/troubleshooting-the-2-gb-push-limit
ARCHIVE_REPO=git@github.com:commaai/openpilot-archive.git
git push --prune $ARCHIVE_REPO +refs/heads/master:refs/heads/master # push master first so it's the default branch (when openpilot-archive is an empty repo)
git push --prune $ARCHIVE_REPO +refs/heads/*:refs/heads/* # 956.39 MiB (110725 objects)
git push --prune $ARCHIVE_REPO +refs/tags/*:refs/tags/* # 1.75 GiB (21694 objects)
# git push --mirror $ARCHIVE_REPO || true # fails to push refs/pull/* (deny updating a hidden ref) for pull requests
# we fail and continue - more reading: https://stackoverflow.com/a/34266401/639708 and https://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
fi
# REWRITE master and tags
if [ ! -d $SRC_CLONE ]; then
echo "Cloning $SRC..."
GIT_LFS_SKIP_SMUDGE=1 git clone $SRC $SRC_CLONE
cd $SRC_CLONE
echo "Checking out old history..."
git checkout tags/v0.7.1 > /dev/null 2>&1
# checkout as main, since we need master ref later
git checkout -b main
echo "Creating setup commits..."
# rm these so we don't get conflicts later
git rm -r cereal opendbc panda selfdrive/ui/ui > /dev/null
git commit -m "removed conflicting files" > /dev/null
# skip-smudge to get rid of some lfs errors that it can't find the reference of some lfs files
# we don't care about fetching/pushing lfs right now
git lfs install --skip-smudge --local
# squash initial setup commits
git cherry-pick -n -X theirs 6c33a5c..59b3d06 > /dev/null
git commit -m "switching to master" > /dev/null
# squash the two commits
git reset --soft HEAD~2
git commit -m "switching to master" -m "$(git log --reverse --format=%B 6c33a5c..59b3d06)" -m "removed conflicting files" > /dev/null
# get commits we want to cherry-pick
# will start with the next commit after #59b3d06 tools is local now
COMMITS=$(git rev-list --reverse 59b3d06..master)
# we need this for logging
TOTAL_COMMITS=$(echo $COMMITS | wc -w | xargs)
CURRENT_COMMIT_NUMBER=0
# empty this file
> commit-map.txt
echo "Rewriting master commits..."
for COMMIT in $COMMITS; do
CURRENT_COMMIT_NUMBER=$((CURRENT_COMMIT_NUMBER + 1))
# echo -ne "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Cherry-picking commit: $COMMIT"\\r
echo "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Cherry-picking commit: $COMMIT"
# set environment variables to preserve author/committer and dates
export GIT_AUTHOR_NAME=$(git show -s --format='%an' $COMMIT)
export GIT_AUTHOR_EMAIL=$(git show -s --format='%ae' $COMMIT)
export GIT_COMMITTER_NAME=$(git show -s --format='%cn' $COMMIT)
export GIT_COMMITTER_EMAIL=$(git show -s --format='%ce' $COMMIT)
export GIT_AUTHOR_DATE=$(git show -s --format='%ad' $COMMIT)
export GIT_COMMITTER_DATE=$(git show -s --format='%cd' $COMMIT)
# cherry-pick the commit
if ! GIT_OUTPUT=$(git cherry-pick -m 1 -X theirs $COMMIT 2>&1); then
# check if the failure is because of an empty commit
if [[ "$GIT_OUTPUT" == *"The previous cherry-pick is now empty"* ]]; then
echo "Empty commit detected. Skipping commit $COMMIT"
git cherry-pick --skip
# log it was empty to the mapping file
echo "$COMMIT EMPTY" >> commit-map.txt
else
# handle other errors or conflicts
echo "Cherry-pick failed. Handling error..."
echo "$GIT_OUTPUT"
exit 1
fi
else
# capture the new commit hash
NEW_COMMIT=$(git rev-parse HEAD)
# save the old and new commit hashes to the mapping file
echo "$COMMIT $NEW_COMMIT" >> commit-map.txt
# append the old commit ID to the commit message
git commit --amend -m "$(git log -1 --pretty=%B)" -m "Former-commit-id: $COMMIT" > /dev/null
fi
# prune every 3000 commits to avoid gc errors
if [ $((CURRENT_COMMIT_NUMBER % 3000)) -eq 0 ]; then
echo "Pruning repo..."
git gc
fi
done
echo "Rewriting tags..."
# remove all old tags
git tag -l | xargs git tag -d
# read each line from the tag-commit-map.txt
while IFS=' ' read -r TAG OLD_COMMIT; do
# search for the new commit in commit-map.txt corresponding to the old commit
NEW_COMMIT=$(grep "^$OLD_COMMIT " "commit-map.txt" | awk '{print $2}')
# check if this is a rebased commit
if [ -z "$NEW_COMMIT" ]; then
# if not, then just use old commit hash
NEW_COMMIT=$OLD_COMMIT
fi
echo "Rewriting tag $TAG from commit $NEW_COMMIT"
git tag -f "$TAG" "$NEW_COMMIT"
done < "$DIR/tag-commit-map.txt"
# uninstall lfs since we don't want to touch (push to) lfs right now
# git push will also push lfs, if we don't uninstall (--local so just for this repo)
git lfs uninstall --local
# force push new master
git push --force origin main:master
# force push new tags
git push --force --tags
fi
# REWRITE branches based on master
if [ ! -f "$SRC_CLONE/rewrite-branches-done" ]; then
cd $SRC_CLONE
> rewrite-branches-done
# empty file
> $BRANCH_DIFF_LOG
echo "Rewriting branches based on master..."
# will store raw diffs here, if exist
mkdir -p differences
# get a list of all branches except master and REWRITE_IGNORE_BRANCHES
BRANCHES=$(git branch -r | grep -v ' -> ' | sed 's/.*origin\///' | grep -v '^master$' | grep -v -f <(echo "${REWRITE_IGNORE_BRANCHES[*]}" | tr ' ' '\n'))
for BRANCH in $BRANCHES; do
# check if the branch is based on master history
MERGE_BASE=$(git merge-base master origin/$BRANCH) || true
if [ -n "$MERGE_BASE" ]; then
echo "Rewriting branch: $BRANCH"
# create a new branch based on the new master
NEW_MERGE_BASE=$(grep "^$MERGE_BASE " "commit-map.txt" | awk '{print $2}')
if [ -z "$NEW_MERGE_BASE" ]; then
echo "Error: could not find new merge base for branch $BRANCH" >> $BRANCH_DIFF_LOG
continue
fi
git checkout -b ${BRANCH}_new $NEW_MERGE_BASE
# get the range of commits unique to this branch
COMMITS=$(git rev-list --reverse $MERGE_BASE..origin/${BRANCH})
HAS_ERROR=0
# simple delimiter
echo "BRANCH ${BRANCH}" >> commit-map.txt
for COMMIT in $COMMITS; do
# set environment variables to preserve author/committer and dates
export GIT_AUTHOR_NAME=$(git show -s --format='%an' $COMMIT)
export GIT_AUTHOR_EMAIL=$(git show -s --format='%ae' $COMMIT)
export GIT_COMMITTER_NAME=$(git show -s --format='%cn' $COMMIT)
export GIT_COMMITTER_EMAIL=$(git show -s --format='%ce' $COMMIT)
export GIT_AUTHOR_DATE=$(git show -s --format='%ad' $COMMIT)
export GIT_COMMITTER_DATE=$(git show -s --format='%cd' $COMMIT)
# cherry-pick the commit
if ! GIT_OUTPUT=$(git cherry-pick -m 1 -X theirs $COMMIT 2>&1); then
# check if the failure is because of an empty commit
if [[ "$GIT_OUTPUT" == *"The previous cherry-pick is now empty"* ]]; then
echo "Empty commit detected. Skipping commit $COMMIT"
git cherry-pick --skip
# log it was empty to the mapping file
echo "$COMMIT EMPTY" >> commit-map.txt
else
# handle other errors or conflicts
echo "Cherry-pick of ${BRANCH} branch failed. Removing branch upstream..." >> $BRANCH_DIFF_LOG
echo "$GIT_OUTPUT" > "$LOGS_DIR/branch-${BRANCH}"
git cherry-pick --abort
git push --delete origin ${BRANCH}
HAS_ERROR=1
break
fi
else
# capture the new commit hash
NEW_COMMIT=$(git rev-parse HEAD)
# save the old and new commit hashes to the mapping file
echo "$COMMIT $NEW_COMMIT" >> commit-map.txt
# append the old commit ID to the commit message
git commit --amend -m "$(git log -1 --pretty=%B)" -m "Former-commit-id: $COMMIT" > /dev/null
fi
done
# force push the new branch
if [ $HAS_ERROR -eq 0 ]; then
# git lfs goes haywire here, so we need to install and uninstall
# git lfs install --skip-smudge --local
git lfs uninstall --local > /dev/null
git push -f origin ${BRANCH}_new:${BRANCH}
fi
# clean up local branch
git checkout master > /dev/null
git branch -D ${BRANCH}_new > /dev/null
else
echo "Deleting branch $BRANCH as it's not based on master history" >> $BRANCH_DIFF_LOG
git push --delete origin ${BRANCH}
fi
done
fi
# VALIDATE cherry-pick
if [ ! -f "$SRC_CLONE/validation-done" ]; then
cd $SRC_CLONE
> validation-done
TOTAL_COMMITS=$(grep -cve '^\s*$' commit-map.txt)
CURRENT_COMMIT_NUMBER=0
COUNT_SAME=0
COUNT_DIFF=0
# empty file
> $COMMIT_DIFF_LOG
echo "Validating commits..."
# will store raw diffs here, if exist
mkdir -p differences
# read each line from commit-map.txt
while IFS=' ' read -r OLD_COMMIT NEW_COMMIT; do
if [ "$NEW_COMMIT" == "EMPTY" ]; then
continue
fi
if [ "$OLD_COMMIT" == "BRANCH" ]; then
echo "Branch ${NEW_COMMIT} below:" >> $COMMIT_DIFF_LOG
continue
fi
CURRENT_COMMIT_NUMBER=$((CURRENT_COMMIT_NUMBER + 1))
# retrieve short hashes and dates for the old and new commits
OLD_COMMIT_SHORT=$(git rev-parse --short $OLD_COMMIT)
NEW_COMMIT_SHORT=$(git rev-parse --short $NEW_COMMIT)
OLD_DATE=$(git show -s --format='%cd' $OLD_COMMIT)
NEW_DATE=$(git show -s --format='%cd' $NEW_COMMIT)
# echo -ne "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Comparing old commit $OLD_COMMIT_SHORT ($OLD_DATE) with new commit $NEW_COMMIT_SHORT ($NEW_DATE)"\\r
echo "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Comparing old commit $OLD_COMMIT_SHORT ($OLD_DATE) with new commit $NEW_COMMIT_SHORT ($NEW_DATE)"
# generate lists of files and their hashes for the old and new commits, excluding ignored files
OLD_FILES=$(git ls-tree -r $OLD_COMMIT | grep -vE "$(IFS='|'; echo "${VALIDATE_IGNORE_FILES[*]}")")
NEW_FILES=$(git ls-tree -r $NEW_COMMIT | grep -vE "$(IFS='|'; echo "${VALIDATE_IGNORE_FILES[*]}")")
# Compare the diffs
if diff <(echo "$OLD_FILES") <(echo "$NEW_FILES") > /dev/null; then
# echo "Old commit $OLD_COMMIT_SHORT and new commit $NEW_COMMIT_SHORT are equivalent."
COUNT_SAME=$((COUNT_SAME + 1))
else
echo "[$CURRENT_COMMIT_NUMBER/$TOTAL_COMMITS] Difference found between old commit $OLD_COMMIT_SHORT and new commit $NEW_COMMIT_SHORT" >> $COMMIT_DIFF_LOG
COUNT_DIFF=$((COUNT_DIFF + 1))
set +e
diff -u <(echo "$OLD_FILES") <(echo "$NEW_FILES") > "$LOGS_DIR/commit-$CURRENT_COMMIT_NUMBER-$OLD_COMMIT_SHORT-$NEW_COMMIT_SHORT"
set -e
fi
done < "commit-map.txt"
echo "Summary:" >> $COMMIT_DIFF_LOG
echo "Equivalent commits: $COUNT_SAME" >> $COMMIT_DIFF_LOG
echo "Different commits: $COUNT_DIFF" >> $COMMIT_DIFF_LOG
fi
if [ ! -d $OUT ]; then
cp -r $SRC $OUT
cd $OUT
# remove all non-master branches
# git branch | grep -v "^ master$" | grep -v "\*" | xargs git branch -D
# echo "cleaning up refs"
# delete pull request refs since we can't alter them anyway (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally#error-failed-to-push-some-refs)
# git for-each-ref --format='%(refname)' | grep '^refs/pull/' | xargs -I {} git update-ref -d {}
echo "importing new lfs files"
# import "almost" everything to lfs
BRANCHES=$(git for-each-ref --format='%(refname)' refs/heads/ | sed 's%refs/heads/%%g' | grep -v -f <(echo "${REWRITE_IGNORE_BRANCHES[*]}" | tr ' ' '\n') | tr '\n' ' ')
git lfs migrate import --include="*.dlc,*.onnx,*.svg,*.png,*.gif,*.ttf,*.wav,selfdrive/car/tests/test_models_segs.txt,system/hardware/tici/updater,selfdrive/ui/qt/spinner_larch64,selfdrive/ui/qt/text_larch64,third_party/**/*.a,third_party/**/*.so,third_party/**/*.so.*,third_party/**/*.dylib,third_party/acados/*/t_renderer,third_party/qt5/larch64/bin/lrelease,third_party/qt5/larch64/bin/lupdate,third_party/catch2/include/catch2/catch.hpp,*.apk,*.apkpatch,*.jar,*.pdf,*.jpg,*.mp3,*.thneed,*.tar.gz,*.npy,*.csv,*.a,*.so*,*.dylib,*.o,*.b64,selfdrive/hardware/tici/updater,selfdrive/boardd/tests/test_boardd,selfdrive/ui/qt/spinner_aarch64,installer/updater/updater,selfdrive/debug/profiling/simpleperf/**/*,selfdrive/hardware/eon/updater,selfdrive/ui/qt/text_aarch64,selfdrive/debug/profiling/pyflame/**/*,installer/installers/installer_openpilot,installer/installers/installer_dashcam,selfdrive/ui/text/text,selfdrive/ui/android/text/text,selfdrive/ui/spinner/spinner,selfdrive/visiond/visiond,selfdrive/loggerd/loggerd,selfdrive/sensord/sensord,selfdrive/sensord/gpsd,selfdrive/ui/android/spinner/spinner,selfdrive/ui/qt/spinner,selfdrive/ui/qt/text,_stringdefs.py,dfu-util-aarch64-linux,dfu-util-aarch64,dfu-util-x86_64-linux,dfu-util-x86_64,stb_image.h,clpeak3,clwaste,apk/**/*,external/**/*,phonelibs/**/*,third_party/boringssl/**/*,flask/**/*,panda/**/*,board/**/*,messaging/**/*,opendbc/**/*,tools/cabana/chartswidget.cc,third_party/nanovg/**/*,selfdrive/controls/lib/lateral_mpc/lib_mpc_export/**/*,selfdrive/ui/paint.cc,werkzeug/**/*,pyextra/**/*,third_party/android_hardware_libhardware/**/*,selfdrive/controls/lib/lead_mpc_lib/lib_mpc_export/**/*,selfdrive/locationd/laikad.py,selfdrive/locationd/test/test_laikad.py,tools/gpstest/test_laikad.py,selfdrive/locationd/laikad_helpers.py,tools/nui/**/*,jsonrpc/**/*,selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/**/*,selfdrive/controls/lib/lateral_mpc/mpc_export/**/*,selfdrive/camerad/cameras/camera_qcom.cc,selfdrive/manager.py,selfdrive/modeld/models/driving.cc,third_party/curl/**/*,selfdrive/modeld/thneed/debug/**/*,selfdrive/modeld/thneed/include/**/*,third_party/openmax/**/*,selfdrive/controls/lib/longitudinal_mpc/mpc_export/**/*,selfdrive/controls/lib/longitudinal_mpc_model/lib_mpc_export/**/*,Pipfile,Pipfile.lock,gunicorn/**/*,*.qm,jinja2/**/*,click/**/*,dbcs/**/*,websocket/**/*" $BRANCHES
echo "reflog and gc"
# this is needed after lfs import
git reflog expire --expire=now --all
git gc --prune=now --aggressive
# check the git-filter-repo analysis again - can be found in the repo root/filter-repo/analysis
echo "Analyzing with git-filter-repo..."
/tmp/git-filter-repo --force --analyze
echo "New size is $(du -sh .)"
fi
cd $OUT
# fetch all lfs files from https://github.com/commaai/openpilot.git
# some lfs files are missing on gitlab, but they can be found on github
git config lfs.url https://github.com/commaai/openpilot.git/info/lfs
git config lfs.pushurl ssh://git@github.com/commaai/openpilot.git
git lfs fetch --all || true
# also fetch all lfs files from https://gitlab.com/commaai/openpilot-lfs.git
git config lfs.url https://gitlab.com/commaai/openpilot-lfs.git/info/lfs
git config lfs.pushurl ssh://git@gitlab.com/commaai/openpilot-lfs.git
git lfs fetch --all || true
# final push - will also push lfs
# TODO: switch to git@github.com:commaai/openpilot.git when ready
# git push --mirror git@github.com:commaai/openpilot-tiny.git
# using this instead to ignore refs/pull/* - since this is also what --mirror does - https://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
git push --prune git@github.com:commaai/openpilot-tiny.git +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/*

View File

@@ -0,0 +1,82 @@
v0.1 e94a30bec07e719c5a7b037ca1f4db8312702cce
v0.2 449b482cc3236ccf31829830b4f6a44b2dcc06c2
v0.2.1 17d9becd3c673091b22f09aa02559a9ed9230f50
v0.2.2 a64b9aa9b8cb5863c917b6926516291a63c02fe5
v0.2.3 adaa4ed350acda4067fc0b455ad15b54cdf4c768
v0.2.4 ecc565aa3fdc4c7e719aadc000e1fdc4d80d4fe0
v0.2.5 29c58b45882ac79595356caf98580c1d2a626011
v0.2.6 6c3afeec0fb439070b2912978b8dbb659033b1d9
v0.2.7 c6ba5dc5391d3ca6cda479bf1923b88ce45509a0
v0.2.8 95a349abcc050712c50d4d85a1c8a804eee7f6c2
v0.2.9 693bcb0f83478f2651db6bac9be5ca5ad60d03f3
v0.3.0 c5d8aec28b5230d34ae4b677c2091cc3dec7e3e8
v0.3.1 41e3a0f699f5c39cb61a15c0eb7a4aa816d47c24
v0.3.2 7fe46f1e1df5dec08a940451ba0feefd5c039165
v0.3.3 5cf91d0496688fed4f2a6c7021349b1fc0e057a2
v0.3.4 1b8c44b5067525a5d266b6e99799d8097da76a29
v0.3.5 b111277f464cf66fa34b67819a83ea683e0f64df
v0.4.0.2 da52d065a4c4f52d6017a537f3a80326f5af8bdc
v0.4.1 4474b9b3718653aeb0aee26422caefb90460cc0e
v0.4.2 28c0797d30175043bbfa31307b63aab4197cf996
v0.4.4 9a9ff839a9b70cb2601d7696af743f5652395389
v0.4.5 37285038d3f91fa1b49159c4a35a8383168e644f
v0.4.6 c6df34f55ba8c5a911b60d3f9eb20e3fa45f68c1
v0.4.7 ae5cb7a0dab8b1bed9d52292f9b4e8e66a0f8ec9
v0.5 de33bc46452b1046387ee2b3a03191b2c71135fb
v0.5.1 8f22f52235c48eada586795ac57edb22688e4d08
v0.5.2 0129a8a4ff8da5314e8e4d4d3336e89667ff6d54
v0.5.3 285c52eb693265a0a530543e9ca0aeb593a2a55e
v0.5.4 a422246dc30bce11e970514f13f7c110f4470cc3
v0.5.5 8f3539a27b28851153454eb737da9624cccaed2d
v0.5.6 860a48765d1016ba226fb2c64aea35a45fe40e4a
v0.5.7 9ce3045f139ee29bf0eea5ec59dfe7df9c3d2c51
v0.5.8 2cee2e05ba0f3824fdbb8b957958800fa99071a1
v0.5.9 ad145da3bcded0fe75306df02061d07a633963c3
v0.5.10 ff4c1557d8358f158f4358788ff18ef93d2470ef
v0.5.11 d1866845df423c6855e2b365ff230cf7d89a420b
v0.5.12 f6e8ef27546e9a406724841e75f8df71cc4c2c97
v0.5.13 dd34ccfe288ebda8e2568cf550994ae890379f45
v0.6 60a20537c5f3fcc7f11946d81aebc8f90c08c117
v0.6.1 cf5c4aeacb1703d0ffd35bdb5297d3494fee9a22
v0.6.2 095ef5f9f60fca1b269aabcc3cfd322b17b9e674
v0.6.3 d5f9caa82d80cdcc7f1b7748f2cf3ccbf94f82a3
v0.6.4 58f376002e0c654fbc2de127765fa297cf694a33
v0.6.5 70d17cd69b80e7627dcad8fd5b6438f2309ac307
v0.6.6 d4eb5a6eafdd4803d09e6f3963918216cca5a81f
v0.7 a2ae18d1dbd1e59c38ce22fa25ddffbd1d3084e3
v0.7.1 1e1de64a1e59476b7b3d3558b92149246d5c3292
v0.7.2 59bd58c940673b4c4a6a86f299022614bcf42b22
v0.7.3 d7acd8b68f8131e0e714400cf124a3e228638643
v0.7.4 e93649882c5e914eec4a8b8b593dc0587e497033
v0.7.5 8abc0afe464626a461d2c7e192c912eeebeccc65
v0.7.6 69aacd9d179fe6dd3110253a099c38b34cff7899
v0.7.7 f1caed7299cdba5e45635d8377da6cc1e5fd7072
v0.7.8 2189fe8741b635d8394d55dee28959425cfd5ad0
v0.7.9 86dc54b836a973f132ed26db9f5a60b29f9b25b2
v0.7.10 47a42ff432db8a2494e922ca5e767e58020f0446
v0.7.11 f46ed718ba8d6bb4d42cd7b0f0150c406017c373
v0.8 d56e04c0d960c8d3d4ab88b578dc508a2b4e07dc
v0.8.1 cd6f26664cb8d32a13847d6648567c47c580e248
v0.8.2 7cc0999aebfe63b6bb6dd83c1dff62c3915c4820
v0.8.3 986500fe2f10870018f1fba1e5465476b8915977
v0.8.4 f0d0b82b8d6f5f450952113e234d0a5a49e80c48
v0.8.5 f5d9ddc6c2a2802a61e5ce590c6b6688bf736a69
v0.8.6 75904ed7452c6cbfb2a70cd379a899d8a75b97c2
v0.8.7 4f9e568019492126e236da85b5ca0a059f292900
v0.8.8 a949a49d5efaaf2d881143d23e9fb5ff9e28e88c
v0.8.9 a034926264cd1025c69d6ceb3fe444965f960b75
v0.8.10 59accdd814398b884167c0f41dbf46dcccf0c29c
v0.8.11 d630ec9092f039cb5e51c5dd6d92fc47b91407e4
v0.8.12 57871c99031cf597ffa0d819057ac1401e129f32
v0.8.13 e43e6e876513450d235124fcb711f1724ed9814c
v0.8.14 71901c94dbbaa2f9f156a80c14cc7ea65219fc7c
v0.8.15 5a7c2f90361e72e9c35e88abd2e11acdc4aba354
v0.8.16 f41dc62a12cc0f3cb8c5453c0caa0ba21e1bd01e
v0.9.0 58b84fb401a804967aa0dd5ee66fafa90194fd30
v0.9.1 89f68bf0cbf53a81b0553d3816fdbe522f941fa1
v0.9.2 c7d3b28b93faa6c955fb24bc64031512ee985ee9
v0.9.3 8704c1ff952b5c85a44f50143bbd1a4f7b4887e2
v0.9.4 fa310d9e2542cf497d92f007baec8fd751ffa99c
v0.9.5 3b1e9017c560499786d8a0e46aaaeea65037acac
v0.9.6 0b4d08fab8e35a264bc7383e878538f8083c33e5
v0.9.7 f8cb04e4a8b032b72a909f68b808a50936184bee

10
scripts/lint.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR/../
# TODO: bring back rest of pre-commit checks:
# https://github.com/commaai/openpilot/blob/4b11c9e914707df9def598616995be2a5d355a6a/.pre-commit-config.yaml#L2
ruff check .

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env bash
set -e
pip install --upgrade pyupgrade
git ls-files '*.py' | grep -v 'third_party/' | xargs pyupgrade --py311-plus

View File

@@ -7,10 +7,12 @@ from dataclasses import replace
import capnp
from cereal import car
from panda.python.uds import SERVICE_TYPE
from openpilot.common.numpy_fast import clip, interp
from openpilot.common.utils import Freezable
from openpilot.selfdrive.car.docs_definitions import CarDocs
DT_CTRL = 0.01 # car state and control loop timestep (s)
# kg of standard extra cargo to count for drive, gas, etc...
STD_CARGO_KG = 136.
@@ -216,7 +218,7 @@ def create_gas_interceptor_command(packer, gas_amount, idx):
values["GAS_COMMAND"] = gas_amount * 255.
values["GAS_COMMAND2"] = gas_amount * 255.
dat = packer.make_can_msg("GAS_COMMAND", 0, values)[2]
dat = packer.make_can_msg("GAS_COMMAND", 0, values)[1]
checksum = crc8_pedal(dat[:-1])
values["CHECKSUM_PEDAL"] = checksum
@@ -224,8 +226,39 @@ def create_gas_interceptor_command(packer, gas_amount, idx):
return packer.make_can_msg("GAS_COMMAND", 0, values)
def apply_center_deadzone(error, deadzone):
if (error > - deadzone) and (error < deadzone):
error = 0.
return error
def rate_limit(new_value, last_value, dw_step, up_step):
return clip(new_value, last_value + dw_step, last_value + up_step)
def get_friction(lateral_accel_error: float, lateral_accel_deadzone: float, friction_threshold: float,
torque_params: car.CarParams.LateralTorqueTuning, friction_compensation: bool) -> float:
friction_interp = interp(
apply_center_deadzone(lateral_accel_error, lateral_accel_deadzone),
[-friction_threshold, friction_threshold],
[-torque_params.friction, torque_params.friction]
)
friction = float(friction_interp) if friction_compensation else 0.0
return friction
def make_can_msg(addr, dat, bus):
return [addr, 0, dat, bus]
return [addr, dat, bus]
def make_tester_present_msg(addr, bus, subaddr=None, suppress_response=False):
dat = [0x02, SERVICE_TYPE.TESTER_PRESENT]
if subaddr is not None:
dat.insert(0, subaddr)
dat.append(0x80 if suppress_response else 0x0) # sub-function
dat.extend([0x0] * (8 - len(dat)))
return make_can_msg(addr, bytes(dat), bus)
def get_safety_config(safety_model, safety_param = None):

View File

@@ -1,7 +1,7 @@
import numpy as np
from openpilot.common.realtime import DT_CTRL
from opendbc.can.packer import CANPacker
from openpilot.selfdrive.car import DT_CTRL
from openpilot.selfdrive.car.body import bodycan
from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM
from openpilot.selfdrive.car.interfaces import CarControllerBase
@@ -17,7 +17,7 @@ MAX_TURN_INTEGRATOR = 0.1 # meters
class CarController(CarControllerBase):
def __init__(self, dbc_name, CP, VM):
self.frame = 0
super().__init__(dbc_name, CP, VM)
self.packer = CANPacker(dbc_name)
# PIDs

View File

@@ -1,7 +1,6 @@
import math
from cereal import car
from openpilot.common.realtime import DT_CTRL
from openpilot.selfdrive.car import get_safety_config
from openpilot.selfdrive.car import DT_CTRL, get_safety_config
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
from openpilot.selfdrive.car.body.values import SPEED_FROM_RPM

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env python3
import os
import threading
import time
from types import SimpleNamespace
import cereal.messaging as messaging
@@ -9,11 +11,13 @@ from cereal import car
from panda import ALTERNATIVE_EXPERIENCE
from openpilot.common.params import Params
from openpilot.common.realtime import config_realtime_process, Priority, Ratekeeper, DT_CTRL
from openpilot.common.realtime import config_realtime_process, Priority, Ratekeeper
from openpilot.selfdrive.pandad import can_list_to_can_capnp
from openpilot.selfdrive.car import DT_CTRL
from openpilot.selfdrive.car.car_helpers import get_car, get_one_can
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
from openpilot.selfdrive.car.param_manager import ParamManager
from openpilot.selfdrive.controls.lib.events import Events
REPLAY = "REPLAY" in os.environ
@@ -90,6 +94,10 @@ class Car:
self.events = Events()
self.param_manager: ParamManager = ParamManager()
self.param_manager.update(self.params)
self._params_list: SimpleNamespace = self.param_manager.get_params()
# card is driven by can recv, expected at 100Hz
self.rk = Ratekeeper(100, print_delay_threshold=None)
@@ -98,7 +106,7 @@ class Car:
# Update carState from CAN
can_strs = messaging.drain_sock_raw(self.can_sock, wait_for_one=True)
CS = self.CI.update(self.CC_prev, can_strs)
CS = self.CI.update(self.CC_prev, can_strs, self._params_list)
self.sm.update(0)
@@ -186,10 +194,23 @@ class Car:
self.initialized_prev = initialized
self.CS_prev = CS.as_reader()
def sp_params_thread(self, event: threading.Event) -> None:
while not event.is_set():
self.param_manager.update(self.params)
self._params_list = self.param_manager.get_params()
time.sleep(0.1)
def card_thread(self):
while True:
self.step()
self.rk.monitor_time()
event = threading.Event()
thread = threading.Thread(target=self.sp_params_thread, args=(event, ))
try:
thread.start()
while True:
self.step()
self.rk.monitor_time()
finally:
event.set()
thread.join()
def main():

View File

@@ -4,8 +4,7 @@ import cereal.messaging as messaging
from common.conversions import Conversions as CV
from opendbc.can.packer import CANPacker
from openpilot.common.params import Params
from openpilot.common.realtime import DT_CTRL
from openpilot.selfdrive.car import apply_meas_steer_torque_limits
from openpilot.selfdrive.car import DT_CTRL, apply_meas_steer_torque_limits
from openpilot.selfdrive.car.chrysler import chryslercan
from openpilot.selfdrive.car.chrysler.values import RAM_CARS, RAM_DT, CarControllerParams, ChryslerFlags, ChryslerFlagsSP
from openpilot.selfdrive.car.interfaces import CarControllerBase, FORWARD_GEARS
@@ -16,9 +15,8 @@ ButtonType = car.CarState.ButtonEvent.Type
class CarController(CarControllerBase):
def __init__(self, dbc_name, CP, VM):
self.CP = CP
super().__init__(dbc_name, CP, VM)
self.apply_steer_last = 0
self.frame = 0
self.hud_count = 0
self.last_lkas_falling_edge = 0
@@ -30,9 +28,6 @@ class CarController(CarControllerBase):
self.sm = messaging.SubMaster(['longitudinalPlanSP'])
self.param_s = Params()
self.is_metric = self.param_s.get_bool("IsMetric")
self.speed_limit_control_enabled = False
self.last_speed_limit_sign_tap = False
self.last_speed_limit_sign_tap_prev = False
self.speed_limit = 0.
self.speed_limit_offset = 0
@@ -72,23 +67,19 @@ class CarController(CarControllerBase):
self.v_tsc = self.sm['longitudinalPlanSP'].visionTurnSpeed
self.m_tsc = self.sm['longitudinalPlanSP'].turnSpeed
if self.frame % 200 == 0:
self.speed_limit_control_enabled = self.param_s.get_bool("EnableSlc")
self.is_metric = self.param_s.get_bool("IsMetric")
self.last_speed_limit_sign_tap = self.param_s.get_bool("LastSpeedLimitSignTap")
self.v_cruise_min = FCA_V_CRUISE_MIN[self.is_metric] * (CV.KPH_TO_MPH if not self.is_metric else 1)
self.v_cruise_min = FCA_V_CRUISE_MIN[CS.params_list.is_metric] * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1)
can_sends = []
if not self.CP.pcmCruiseSpeed:
if not self.last_speed_limit_sign_tap_prev and self.last_speed_limit_sign_tap:
if not self.last_speed_limit_sign_tap_prev and CS.params_list.last_speed_limit_sign_tap:
self.sl_force_active_timer = self.frame
self.param_s.put_bool_nonblocking("LastSpeedLimitSignTap", False)
self.last_speed_limit_sign_tap_prev = self.last_speed_limit_sign_tap
self.last_speed_limit_sign_tap_prev = CS.params_list.last_speed_limit_sign_tap
sl_force_active = self.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
sl_inactive = not sl_force_active and (not self.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
sl_temp_inactive = not sl_force_active and (self.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
sl_force_active = CS.params_list.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
sl_inactive = not sl_force_active and (not CS.params_list.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
sl_temp_inactive = not sl_force_active and (CS.params_list.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
slc_active = not sl_inactive and not sl_temp_inactive
self.slc_active_stock = slc_active
@@ -278,8 +269,8 @@ class CarController(CarControllerBase):
return min(target_speed_kph, curve_speed)
def get_button_control(self, CS, final_speed, v_cruise_kph_prev):
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not self.is_metric else 1))
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not self.is_metric else CV.MS_TO_KPH))
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1))
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not CS.params_list.is_metric else CV.MS_TO_KPH))
cruise_button = self.get_button_type(self.button_type)
return cruise_button

View File

@@ -4,35 +4,6 @@ from openpilot.selfdrive.car.chrysler.values import CAR
Ecu = car.CarParams.Ecu
FW_VERSIONS = {
CAR.CHRYSLER_PACIFICA_2017_HYBRID: {
(Ecu.combinationMeter, 0x742, None): [
b'68239262AH',
b'68239262AI',
b'68239262AJ',
b'68239263AH',
b'68239263AJ',
],
(Ecu.srs, 0x744, None): [
b'68238840AH',
],
(Ecu.fwdRadar, 0x753, None): [
b'68226356AI',
],
(Ecu.eps, 0x75a, None): [
b'68288309AC',
b'68288309AD',
],
(Ecu.engine, 0x7e0, None): [
b'68277480AV ',
b'68277480AX ',
b'68277480AZ ',
],
(Ecu.hybrid, 0x7e2, None): [
b'05190175BF',
b'05190175BH',
b'05190226AK',
],
},
CAR.CHRYSLER_PACIFICA_2018: {
(Ecu.combinationMeter, 0x742, None): [
b'68227902AF',
@@ -55,6 +26,7 @@ FW_VERSIONS = {
],
(Ecu.fwdRadar, 0x753, None): [
b'04672758AA',
b'04672758AB',
b'68226356AF',
b'68226356AH',
b'68226356AI',
@@ -76,6 +48,7 @@ FW_VERSIONS = {
b'68352654AE ',
b'68366851AH ',
b'68366853AE ',
b'68366853AG ',
b'68372861AF ',
],
(Ecu.transmission, 0x7e1, None): [
@@ -89,6 +62,7 @@ FW_VERSIONS = {
b'68277374AD',
b'68277374AN',
b'68367471AC',
b'68367471AD',
b'68380571AB',
],
},
@@ -181,26 +155,39 @@ FW_VERSIONS = {
},
CAR.CHRYSLER_PACIFICA_2018_HYBRID: {
(Ecu.combinationMeter, 0x742, None): [
b'68239262AH',
b'68239262AI',
b'68239262AJ',
b'68239263AH',
b'68239263AJ',
b'68358439AE',
b'68358439AG',
],
(Ecu.srs, 0x744, None): [
b'68238840AH',
b'68358990AC',
b'68405939AA',
],
(Ecu.fwdRadar, 0x753, None): [
b'04672758AA',
b'68226356AI',
],
(Ecu.eps, 0x75a, None): [
b'68288309AC',
b'68288309AD',
b'68525339AA',
],
(Ecu.engine, 0x7e0, None): [
b'68277480AV ',
b'68277480AX ',
b'68277480AZ ',
b'68366580AI ',
b'68366580AK ',
b'68366580AM ',
],
(Ecu.hybrid, 0x7e2, None): [
b'05190175BF',
b'05190175BH',
b'05190226AI',
b'05190226AK',
b'05190226AM',
@@ -245,6 +232,7 @@ FW_VERSIONS = {
b'68416680AE ',
b'68416680AF ',
b'68416680AG ',
b'68444228AC ',
b'68444228AD ',
b'68444228AE ',
b'68444228AF ',
@@ -402,6 +390,7 @@ FW_VERSIONS = {
b'68294051AI',
b'68294052AG',
b'68294052AH',
b'68294059AI',
b'68294063AG',
b'68294063AH',
b'68294063AI',
@@ -412,6 +401,7 @@ FW_VERSIONS = {
b'68434858AC',
b'68434859AC',
b'68434860AC',
b'68453471AD',
b'68453483AC',
b'68453483AD',
b'68453487AD',
@@ -436,11 +426,13 @@ FW_VERSIONS = {
b'68527346AE',
b'68527361AD',
b'68527375AD',
b'68527381AD',
b'68527381AE',
b'68527382AE',
b'68527383AD',
b'68527383AE',
b'68527387AE',
b'68527397AD',
b'68527403AC',
b'68527403AD',
b'68546047AF',
@@ -531,6 +523,7 @@ FW_VERSIONS = {
b'05036066AE ',
b'05036193AA ',
b'05149368AA ',
b'05149374AA ',
b'05149591AD ',
b'05149591AE ',
b'05149592AE ',
@@ -561,6 +554,7 @@ FW_VERSIONS = {
b'68455145AC ',
b'68455145AE ',
b'68455146AC ',
b'68460927AA ',
b'68467915AC ',
b'68467916AC ',
b'68467936AC ',
@@ -579,6 +573,7 @@ FW_VERSIONS = {
b'68539650AF',
b'68539651AD',
b'68586101AA ',
b'68586102AA ',
b'68586105AB ',
b'68629919AC ',
b'68629922AC ',
@@ -617,6 +612,8 @@ FW_VERSIONS = {
b'68520867AE',
b'68520867AF',
b'68520870AC',
b'68520871AC',
b'68528325AE',
b'68540431AB',
b'68540433AB',
b'68551676AA',

View File

@@ -40,8 +40,8 @@ class CarInterface(CarInterfaceBase):
ret.flags |= ChryslerFlags.HIGHER_MIN_STEERING_SPEED.value
# Chrysler
if candidate in (CAR.CHRYSLER_PACIFICA_2017_HYBRID, CAR.CHRYSLER_PACIFICA_2018, CAR.CHRYSLER_PACIFICA_2018_HYBRID, \
CAR.CHRYSLER_PACIFICA_2019_HYBRID, CAR.CHRYSLER_PACIFICA_2020, CAR.DODGE_DURANGO):
if candidate in (CAR.CHRYSLER_PACIFICA_2018, CAR.CHRYSLER_PACIFICA_2018_HYBRID, CAR.CHRYSLER_PACIFICA_2019_HYBRID,
CAR.CHRYSLER_PACIFICA_2020, CAR.DODGE_DURANGO):
ret.lateralTuning.init('pid')
ret.lateralTuning.pid.kpBP, ret.lateralTuning.pid.kiBP = [[9., 20.], [9., 20.]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.15, 0.30], [0.03, 0.05]]
@@ -91,15 +91,16 @@ class CarInterface(CarInterfaceBase):
def _update(self, c):
ret = self.CS.update(self.cp, self.cp_cam)
self.sp_update_params()
self.CS.button_events.extend(create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}))
self.CS.button_events.extend(create_button_events(self.CS.lkas_enabled, self.CS.prev_lkas_enabled, {1: ButtonType.altButton1}))
self.CS.button_events = [
*self.CS.button_events,
*create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}),
*create_button_events(self.CS.lkas_enabled, self.CS.prev_lkas_enabled, {1: ButtonType.altButton1}),
]
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret, self.CS)
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret)
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, self.CS.accEnabled,
self.CS.button_events, c.vCruise,
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, c.vCruise, self.CS.accEnabled,
enable_buttons=(ButtonType.accelCruise, ButtonType.decelCruise, ButtonType.resumeCruise) if not self.CP.pcmCruiseSpeed else
(ButtonType.accelCruise, ButtonType.decelCruise),
resume_button=(ButtonType.resumeCruise,) if not self.CP.pcmCruiseSpeed else
@@ -112,16 +113,16 @@ class CarInterface(CarInterfaceBase):
if any(b.type == ButtonType.altButton1 and b.pressed for b in self.CS.button_events):
self.CS.madsEnabled = not self.CS.madsEnabled
self.CS.lkas_disabled = not self.CS.lkas_disabled
self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled)
self.CS.madsEnabled = self.get_acc_mads(ret, self.CS.madsEnabled)
else:
self.CS.madsEnabled = False
self.CS.madsEnabled = self.get_sp_started_mads(ret, self.CS)
self.CS.madsEnabled = self.get_sp_started_mads(ret, self.CS.madsEnabled)
if not self.CP.pcmCruise or (self.CP.pcmCruise and self.CP.minEnableSpeed > 0) or not self.CP.pcmCruiseSpeed:
if any(b.type == ButtonType.cancel for b in self.CS.button_events):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
if self.get_sp_pedal_disengage(ret):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads else False if self.CP.pcmCruise else self.CS.accEnabled
if self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed:
@@ -134,7 +135,7 @@ class CarInterface(CarInterfaceBase):
self.CS.accEnabled = False
self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled
ret, self.CS = self.get_sp_common_state(ret, self.CS, gap_button=bool(self.CS.distance_button))
ret = self.get_sp_common_state(ret)
ret.buttonEvents = [
*self.CS.button_events,
@@ -144,7 +145,7 @@ class CarInterface(CarInterfaceBase):
# events
events = self.create_common_events(ret, c, extra_gears=[car.CarState.GearShifter.low], pcm_enable=False)
events, ret = self.create_sp_events(self.CS, ret, events)
events, ret = self.create_sp_events(ret, events)
# Low speed steer alert hysteresis logic
if self.CP.carFingerprint in RAM_DT:
@@ -160,9 +161,7 @@ class CarInterface(CarInterfaceBase):
if self.low_speed_alert:
events.add(car.CarEvent.EventName.belowSteerSpeed)
ret.customStockLong = self.CS.update_custom_stock_long(self.CC.cruise_button, self.CC.final_speed_kph,
self.CC.target_speed, self.CC.v_set_dis,
self.CC.speed_diff, self.CC.button_type)
ret.customStockLong = self.update_custom_stock_long()
ret.events = events.to_msg()

View File

@@ -39,7 +39,6 @@ def _address_to_track(address):
class RadarInterface(RadarInterfaceBase):
def __init__(self, CP):
super().__init__(CP)
self.CP = CP
self.rcp = _create_radar_can_parser(CP.carFingerprint)
self.updated_messages = set()
self.trigger_msg = LAST_MSG

View File

@@ -40,34 +40,30 @@ class ChryslerCarSpecs(CarSpecs):
class CAR(Platforms):
# Chrysler
CHRYSLER_PACIFICA_2017_HYBRID = ChryslerPlatformConfig(
[ChryslerCarDocs("Chrysler Pacifica Hybrid 2017")],
ChryslerCarSpecs(mass=2242., wheelbase=3.089, steerRatio=16.2),
)
CHRYSLER_PACIFICA_2018_HYBRID = ChryslerPlatformConfig(
[ChryslerCarDocs("Chrysler Pacifica Hybrid 2018")],
CHRYSLER_PACIFICA_2017_HYBRID.specs,
[ChryslerCarDocs("Chrysler Pacifica Hybrid 2017-18")],
ChryslerCarSpecs(mass=2242., wheelbase=3.089, steerRatio=16.2),
)
CHRYSLER_PACIFICA_2019_HYBRID = ChryslerPlatformConfig(
[ChryslerCarDocs("Chrysler Pacifica Hybrid 2019-24")],
CHRYSLER_PACIFICA_2017_HYBRID.specs,
CHRYSLER_PACIFICA_2018_HYBRID.specs,
)
CHRYSLER_PACIFICA_2018 = ChryslerPlatformConfig(
[ChryslerCarDocs("Chrysler Pacifica 2017-18")],
CHRYSLER_PACIFICA_2017_HYBRID.specs,
CHRYSLER_PACIFICA_2018_HYBRID.specs,
)
CHRYSLER_PACIFICA_2020 = ChryslerPlatformConfig(
[
ChryslerCarDocs("Chrysler Pacifica 2019-20"),
ChryslerCarDocs("Chrysler Pacifica 2021-23", package="All"),
],
CHRYSLER_PACIFICA_2017_HYBRID.specs,
CHRYSLER_PACIFICA_2018_HYBRID.specs,
)
# Dodge
DODGE_DURANGO = ChryslerPlatformConfig(
[ChryslerCarDocs("Dodge Durango 2020-21")],
CHRYSLER_PACIFICA_2017_HYBRID.specs,
CHRYSLER_PACIFICA_2018_HYBRID.specs,
)
# Jeep

View File

@@ -4,22 +4,13 @@ import time
import cereal.messaging as messaging
from panda.python.uds import SERVICE_TYPE
from openpilot.selfdrive.car import make_can_msg
from openpilot.selfdrive.car import make_tester_present_msg
from openpilot.selfdrive.car.fw_query_definitions import EcuAddrBusType
from openpilot.selfdrive.pandad import can_list_to_can_capnp
from openpilot.common.swaglog import cloudlog
def make_tester_present_msg(addr, bus, subaddr=None):
dat = [0x02, SERVICE_TYPE.TESTER_PRESENT, 0x0]
if subaddr is not None:
dat.insert(0, subaddr)
dat.extend([0x0] * (8 - len(dat)))
return make_can_msg(addr, bytes(dat), bus)
def is_tester_present_response(msg: capnp.lib.capnp._DynamicStructReader, subaddr: int = None) -> bool:
def _is_tester_present_response(msg: capnp.lib.capnp._DynamicStructReader, subaddr: int = None) -> bool:
# ISO-TP messages are always padded to 8 bytes
# tester present response is always a single frame
dat_offset = 1 if subaddr is not None else 0
@@ -33,7 +24,7 @@ def is_tester_present_response(msg: capnp.lib.capnp._DynamicStructReader, subadd
return False
def get_all_ecu_addrs(logcan: messaging.SubSocket, sendcan: messaging.PubSocket, bus: int, timeout: float = 1, debug: bool = True) -> set[EcuAddrBusType]:
def _get_all_ecu_addrs(logcan: messaging.SubSocket, sendcan: messaging.PubSocket, bus: int, timeout: float = 1, debug: bool = True) -> set[EcuAddrBusType]:
addr_list = [0x700 + i for i in range(256)] + [0x18da00f1 + (i << 8) for i in range(256)]
queries: set[EcuAddrBusType] = {(addr, None, bus) for addr in addr_list}
responses = queries
@@ -58,7 +49,7 @@ def get_ecu_addrs(logcan: messaging.SubSocket, sendcan: messaging.PubSocket, que
continue
subaddr = None if (msg.address, None, msg.src) in responses else msg.dat[0]
if (msg.address, subaddr, msg.src) in responses and is_tester_present_response(msg, subaddr):
if (msg.address, subaddr, msg.src) in responses and _is_tester_present_response(msg, subaddr):
if debug:
print(f"CAN-RX: {hex(msg.address)} - 0x{bytes.hex(msg.dat)}")
if (msg.address, subaddr, msg.src) in ecu_responses:
@@ -94,7 +85,7 @@ if __name__ == "__main__":
set_obd_multiplexing(params, not args.no_obd)
print("Getting ECU addresses ...")
ecu_addrs = get_all_ecu_addrs(logcan, sendcan, args.bus, args.timeout, debug=args.debug)
ecu_addrs = _get_all_ecu_addrs(logcan, sendcan, args.bus, args.timeout, debug=args.debug)
print()
print("Found ECUs on rx addresses:")

View File

@@ -130,7 +130,8 @@ MIGRATION = {
# Removal of platform_str, see https://github.com/commaai/openpilot/pull/31868/
"COMMA BODY": BODY.COMMA_BODY,
"CHRYSLER PACIFICA HYBRID 2017": CHRYSLER.CHRYSLER_PACIFICA_2017_HYBRID,
"CHRYSLER PACIFICA HYBRID 2017": CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID,
"CHRYSLER_PACIFICA_2017_HYBRID": CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID,
"CHRYSLER PACIFICA HYBRID 2018": CHRYSLER.CHRYSLER_PACIFICA_2018_HYBRID,
"CHRYSLER PACIFICA HYBRID 2019": CHRYSLER.CHRYSLER_PACIFICA_2019_HYBRID,
"CHRYSLER PACIFICA 2018": CHRYSLER.CHRYSLER_PACIFICA_2018,

View File

@@ -3,12 +3,12 @@ from opendbc.can.packer import CANPacker
from openpilot.common.numpy_fast import clip
from openpilot.selfdrive.car import apply_std_steer_angle_limits
from openpilot.selfdrive.car.ford import fordcan
from openpilot.selfdrive.car.ford.values import CarControllerParams, FordFlags
from openpilot.selfdrive.car.ford.values import CarControllerParams, FordFlags, FordFlagsSP
from openpilot.selfdrive.car.interfaces import CarControllerBase
from openpilot.selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX
LongCtrlState = car.CarControl.Actuators.LongControlState
VisualAlert = car.CarControl.HUDControl.VisualAlert
V_CRUISE_MAX = 145
def apply_ford_curvature_limits(apply_curvature, apply_curvature_last, current_curvature, v_ego_raw):
@@ -25,17 +25,19 @@ def apply_ford_curvature_limits(apply_curvature, apply_curvature_last, current_c
class CarController(CarControllerBase):
def __init__(self, dbc_name, CP, VM):
self.CP = CP
super().__init__(dbc_name, CP, VM)
self.VM = VM
self.packer = CANPacker(dbc_name)
self.CAN = fordcan.CanBus(CP)
self.frame = 0
self.apply_curvature_last = 0
self.main_on_last = False
self.lkas_enabled_last = False
self.steer_alert_last = False
self.lead_distance_bars_last = None
self.path_angle = 0.
self.path_offset = 0.
self.curvature_rate = 0.
def update(self, CC, CS, now_nanos):
can_sends = []
@@ -75,7 +77,10 @@ class CarController(CarControllerBase):
# TODO: extended mode
mode = 1 if CC.latActive else 0
counter = (self.frame // CarControllerParams.STEER_STEP) % 0x10
can_sends.append(fordcan.create_lat_ctl2_msg(self.packer, self.CAN, mode, 0., 0., -apply_curvature, 0., counter))
if self.CP.spFlags & FordFlagsSP.SP_ENHANCED_LAT_CONTROL.value:
can_sends.append(fordcan.create_lat_ctl2_msg(self.packer, self.CAN, mode, self.path_offset, self.path_angle, -apply_curvature, self.curvature_rate, counter))
else:
can_sends.append(fordcan.create_lat_ctl2_msg(self.packer, self.CAN, mode, 0., 0., -apply_curvature, 0., counter))
else:
can_sends.append(fordcan.create_lat_ctl_msg(self.packer, self.CAN, CC.latActive, 0., 0., -apply_curvature, 0.))
@@ -92,6 +97,7 @@ class CarController(CarControllerBase):
if not CC.longActive or gas < CarControllerParams.MIN_GAS:
gas = CarControllerParams.INACTIVE_GAS
stopping = CC.actuators.longControlState == LongCtrlState.stopping
# TODO: look into using the actuators packet to send the desired speed
can_sends.append(fordcan.create_acc_msg(self.packer, self.CAN, CC.longActive, gas, accel, stopping, v_ego_kph=V_CRUISE_MAX))
### ui ###

View File

@@ -24,6 +24,7 @@ class CarState(CarStateBase):
self.lkas_enabled = None
self.prev_lkas_enabled = None
self.v_limit = 0
self.button_states = {button.event_type: False for button in BUTTONS}
@@ -72,6 +73,10 @@ class CarState(CarStateBase):
ret.cruiseState.nonAdaptive = cp.vl["Cluster_Info1_FD1"]["AccEnbl_B_RqDrv"] == 0
ret.cruiseState.standstill = cp.vl["EngBrakeData"]["AccStopMde_D_Rq"] == 3
ret.accFaulted = cp.vl["EngBrakeData"]["CcStat_D_Actl"] in (1, 2)
if self.CP.flags & FordFlags.CANFD:
ret.cruiseState.speedLimit = self.update_traffic_signals(cp_cam)
if not self.CP.openpilotLongitudinalControl:
ret.accFaulted = ret.accFaulted or cp_cam.vl["ACCDATA"]["CmbbDeny_B_Actl"] == 1
@@ -129,6 +134,16 @@ class CarState(CarStateBase):
return ret
def update_traffic_signals(self, cp_cam):
# TODO: Check if CAN platforms have the same signals
if self.CP.flags & FordFlags.CANFD:
self.v_limit = cp_cam.vl["Traffic_RecognitnData"]["TsrVLim1MsgTxt_D_Rq"]
v_limit_unit = cp_cam.vl["Traffic_RecognitnData"]["TsrVlUnitMsgTxt_D_Rq"]
speed_factor = CV.MPH_TO_MS if v_limit_unit == 2 else CV.KPH_TO_MS if v_limit_unit == 1 else 0
return self.v_limit * speed_factor if self.v_limit not in (0, 255) else 0
@staticmethod
def get_can_parser(CP):
messages = [
@@ -185,6 +200,11 @@ class CarState(CarStateBase):
("IPMA_Data", 1),
]
if CP.flags & FordFlags.CANFD:
messages += [
("Traffic_RecognitnData", 1),
]
if CP.enableBsm and CP.flags & FordFlags.CANFD:
messages += [
("Side_Detect_L_Stat", 5),

View File

@@ -112,7 +112,7 @@ def create_lat_ctl2_msg(packer, CAN: CanBus, mode: int, path_offset: float, path
}
# calculate checksum
dat = packer.make_can_msg("LateralMotionControl2", 0, values)[2]
dat = packer.make_can_msg("LateralMotionControl2", 0, values)[1]
values["LatCtlPath_No_Cs"] = calculate_lat_ctl2_checksum(mode, counter, dat)
return packer.make_can_msg("LateralMotionControl2", CAN.main, values)

View File

@@ -3,7 +3,8 @@ from panda import Panda
from openpilot.common.conversions import Conversions as CV
from openpilot.selfdrive.car import create_button_events, get_safety_config
from openpilot.selfdrive.car.ford.fordcan import CanBus
from openpilot.selfdrive.car.ford.values import Ecu, FordFlags
from openpilot.common.params import Params
from openpilot.selfdrive.car.ford.values import Ecu, FordFlags, FordFlagsSP
from openpilot.selfdrive.car.interfaces import CarInterfaceBase
ButtonType = car.CarState.ButtonEvent.Type
@@ -18,13 +19,15 @@ class CarInterface(CarInterfaceBase):
@staticmethod
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs):
ret.carName = "ford"
ret.dashcamOnly = bool(ret.flags & FordFlags.CANFD)
ret.radarUnavailable = True
ret.steerControlType = car.CarParams.SteerControlType.angle
ret.steerActuatorDelay = 0.2
ret.steerLimitTimer = 1.0
if Params().get("DongleId", encoding='utf8') in ("4fde83db16dc0802", "112e4d6e0cad05e1", "e36b272d5679115f", "24574459dd7fb3e0", "83a4e056c7072678"):
ret.spFlags |= FordFlagsSP.SP_ENHANCED_LAT_CONTROL.value
CAN = CanBus(fingerprint=fingerprint)
cfgs = [get_safety_config(car.CarParams.SafetyModel.ford)]
if CAN.main >= 4:
@@ -51,6 +54,13 @@ class CarInterface(CarInterfaceBase):
if config_tja != 0xFF or config_lca != 0xFF:
ret.dashcamOnly = True
if ret.spFlags & FordFlagsSP.SP_ENHANCED_LAT_CONTROL:
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_FORD_ENHANCED_LAT_CONTROL
ret.longitudinalTuning.kpBP = [0.]
ret.longitudinalTuning.kpV = [0.5]
ret.longitudinalTuning.kiV = [0.]
# Auto Transmission: 0x732 ECU or Gear_Shift_by_Wire_FD1
found_ecus = [fw.ecu for fw in car_fw]
if Ecu.shiftByWire in found_ecus or 0x5A in fingerprint[CAN.main] or docs:
@@ -72,15 +82,16 @@ class CarInterface(CarInterfaceBase):
def _update(self, c):
ret = self.CS.update(self.cp, self.cp_cam)
self.sp_update_params()
self.CS.button_events.extend(create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}))
self.CS.button_events.extend(create_button_events(self.CS.lkas_enabled, self.CS.prev_lkas_enabled, {1: ButtonType.altButton1}))
self.CS.button_events = [
*self.CS.button_events,
*create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}),
*create_button_events(self.CS.lkas_enabled, self.CS.prev_lkas_enabled, {1: ButtonType.altButton1}),
]
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret, self.CS)
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret)
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, self.CS.accEnabled,
self.CS.button_events, c.vCruise)
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, c.vCruise, self.CS.accEnabled)
if ret.cruiseState.available:
if self.enable_mads:
@@ -88,15 +99,15 @@ class CarInterface(CarInterfaceBase):
self.CS.madsEnabled = True
if any(b.type == ButtonType.altButton1 and b.pressed for b in self.CS.button_events):
self.CS.madsEnabled = not self.CS.madsEnabled
self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled)
self.CS.madsEnabled = self.get_acc_mads(ret, self.CS.madsEnabled)
else:
self.CS.madsEnabled = False
if not self.CP.pcmCruise or (self.CP.pcmCruise and self.CP.minEnableSpeed > 0):
if any(b.type == ButtonType.cancel for b in self.CS.button_events):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
if self.get_sp_pedal_disengage(ret):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads else False if self.CP.pcmCruise else self.CS.accEnabled
if self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed:
@@ -104,7 +115,7 @@ class CarInterface(CarInterfaceBase):
self.CS.accEnabled = False
self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled
ret, self.CS = self.get_sp_common_state(ret, self.CS, gap_button=bool(self.CS.distance_button))
ret = self.get_sp_common_state(ret)
ret.buttonEvents = [
*self.CS.button_events,
@@ -113,7 +124,7 @@ class CarInterface(CarInterfaceBase):
events = self.create_common_events(ret, c, extra_gears=[GearShifter.manumatic], pcm_enable=False)
events, ret = self.create_sp_events(self.CS, ret, events)
events, ret = self.create_sp_events(ret, events)
if not self.CS.vehicle_sensors_valid:
events.add(car.CarEvent.EventName.vehicleSensorsInvalid)

View File

@@ -11,6 +11,7 @@ DELPHI_ESR_RADAR_MSGS = list(range(0x500, 0x540))
DELPHI_MRR_RADAR_START_ADDR = 0x120
DELPHI_MRR_RADAR_MSG_COUNT = 64
STEER_ASSIST_DATA_MSGS = 0x3d7
def _create_delphi_esr_radar_can_parser(CP) -> CANParser:
msg_n = len(DELPHI_ESR_RADAR_MSGS)
@@ -28,6 +29,9 @@ def _create_delphi_mrr_radar_can_parser(CP) -> CANParser:
return CANParser(RADAR.DELPHI_MRR, messages, CanBus(CP).radar)
def _create_steer_assist_data(CP) -> CANParser:
messages = [("Steer_Assist_Data", 20)]
return CANParser(RADAR.STEER_ASSIST_DATA, messages, CanBus(CP).camera)
class RadarInterface(RadarInterfaceBase):
def __init__(self, CP):
@@ -45,6 +49,10 @@ class RadarInterface(RadarInterfaceBase):
elif self.radar == RADAR.DELPHI_MRR:
self.rcp = _create_delphi_mrr_radar_can_parser(CP)
self.trigger_msg = DELPHI_MRR_RADAR_START_ADDR + DELPHI_MRR_RADAR_MSG_COUNT - 1
elif self.radar == RADAR.STEER_ASSIST_DATA:
self.rcp = _create_steer_assist_data(CP)
self.trigger_msg = STEER_ASSIST_DATA_MSGS
else:
raise ValueError(f"Unsupported radar: {self.radar}")
@@ -68,11 +76,67 @@ class RadarInterface(RadarInterfaceBase):
self._update_delphi_esr()
elif self.radar == RADAR.DELPHI_MRR:
self._update_delphi_mrr()
elif self.radar == RADAR.STEER_ASSIST_DATA:
self._update_steer_assist_data()
ret.points = list(self.pts.values())
self.updated_messages.clear()
return ret
def _update_steer_assist_data(self):
msg = self.rcp.vl["Steer_Assist_Data"]
updated_msg = self.updated_messages
dRel = msg['CmbbObjDistLong_L_Actl']
confidence = msg['CmbbObjConfdnc_D_Stat']
new_track = False
# if dRel < 1022:
if confidence > 0:
if 0 not in self.pts:
self.pts[0] = car.RadarData.RadarPoint.new_message()
self.pts[0].trackId = self.track_id
self.vRelCol[0] = collections.deque(maxlen=20)
self.track_id += 1
new_track = True
yRel = msg['CmbbObjDistLat_L_Actl']
vRel = msg['CmbbObjRelLong_V_Actl']
yvRel = msg['CmbbObjRelLat_V_Actl']
calc = 0
if not new_track:
# if this is a newly created track - we don't have historical data so skip it
# if we are on the same track
# Let's see if we are moving:
# positive gap - lead is moving faster than us
# negative gap - lead is moving slower than us
dDiff = dRel - self.pts[0].dRel
if (abs(vRel) < 1.0e-2):
self.vRelCol[0].append(dDiff)
vRel = sum(self.vRelCol[0])
calc = 1
else:
if len(self.vRelCol[0]) > 0:
self.vRelCol[0].clear()
if abs(self.pts[0].vRel - vRel) > 2 or abs(self.pts[0].dRel - dRel) > 5:
self.pts[0].trackId = self.track_id
if len(self.vRelCol[0]) > 0:
self.vRelCol[0].clear()
self.track_id += 1
self.pts[0].dRel = dRel # from front of car
self.pts[0].yRel = yRel # in car frame's y axis, left is positive
self.pts[0].vRel = vRel
self.pts[0].aRel = float('nan')
self.pts[0].yvRel = yvRel
self.pts[0].measured = True
else:
if 0 in self.pts:
del self.pts[0]
del self.vRelCol[0]
def _update_delphi_esr(self):
for ii in sorted(self.updated_messages):
cpt = self.rcp.vl[ii]

View File

@@ -48,9 +48,14 @@ class FordFlags(IntFlag):
CANFD = 1
class FordFlagsSP(IntFlag):
SP_ENHANCED_LAT_CONTROL = 1
class RADAR:
DELPHI_ESR = 'ford_fusion_2018_adas'
DELPHI_MRR = 'FORD_CADS'
STEER_ASSIST_DATA = 'ford_lincoln_base_pt'
class Footnote(Enum):
@@ -91,7 +96,7 @@ class FordPlatformConfig(PlatformConfig):
@dataclass
class FordCANFDPlatformConfig(FordPlatformConfig):
dbc_dict: DbcDict = field(default_factory=lambda: dbc_dict('ford_lincoln_base_pt', None))
dbc_dict: DbcDict = field(default_factory=lambda: dbc_dict('ford_lincoln_base_pt', RADAR.STEER_ASSIST_DATA))
def init(self):
super().init()

View File

@@ -1,12 +1,14 @@
from cereal import car
import cereal.messaging as messaging
from openpilot.common.params import Params
from openpilot.common.conversions import Conversions as CV
from openpilot.common.numpy_fast import interp
from openpilot.common.realtime import DT_CTRL
from opendbc.can.packer import CANPacker
from openpilot.selfdrive.car import apply_driver_steer_torque_limits
from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits
from openpilot.selfdrive.car.gm import gmcan
from openpilot.selfdrive.car.gm.values import DBC, CanBus, CarControllerParams, CruiseButtons
from openpilot.selfdrive.car.interfaces import CarControllerBase
from selfdrive.controls.lib.drive_helpers import GM_V_CRUISE_MIN
VisualAlert = car.CarControl.HUDControl.VisualAlert
NetworkLocation = car.CarParams.NetworkLocation
@@ -20,12 +22,11 @@ MIN_STEER_MSG_INTERVAL_MS = 15
class CarController(CarControllerBase):
def __init__(self, dbc_name, CP, VM):
self.CP = CP
super().__init__(dbc_name, CP, VM)
self.start_time = 0.
self.apply_steer_last = 0
self.apply_gas = 0
self.apply_brake = 0
self.frame = 0
self.last_steer_frame = 0
self.last_button_frame = 0
self.cancel_counter = 0
@@ -39,6 +40,36 @@ class CarController(CarControllerBase):
self.packer_obj = CANPacker(DBC[self.CP.carFingerprint]['radar'])
self.packer_ch = CANPacker(DBC[self.CP.carFingerprint]['chassis'])
self.sm = messaging.SubMaster(['longitudinalPlanSP'])
self.param_s = Params()
self.is_metric = self.param_s.get_bool("IsMetric")
self.speed_limit_control_enabled = False
self.last_speed_limit_sign_tap = False
self.last_speed_limit_sign_tap_prev = False
self.speed_limit = 0.
self.speed_limit_offset = 0
self.timer = 0
self.final_speed_kph = 0
self.init_speed = 0
self.current_speed = 0
self.v_set_dis = 0
self.v_cruise_min = 0
self.button_type = 0
self.button_select = 0
self.button_count = 0
self.target_speed = 0
self.t_interval = 7
self.slc_active_stock = False
self.sl_force_active_timer = 0
self.v_tsc_state = 0
self.slc_state = 0
self.m_tsc_state = 0
self.cruise_button = None
self.speed_diff = 0
self.v_tsc = 0
self.m_tsc = 0
self.steady_speed = 0
def update(self, CC, CS, now_nanos):
actuators = CC.actuators
hud_control = CC.hudControl
@@ -47,9 +78,40 @@ class CarController(CarControllerBase):
if hud_v_cruise > 70:
hud_v_cruise = 0
if not self.CP.pcmCruiseSpeed:
self.sm.update(0)
if self.sm.updated['longitudinalPlanSP']:
self.v_tsc_state = self.sm['longitudinalPlanSP'].visionTurnControllerState
self.slc_state = self.sm['longitudinalPlanSP'].speedLimitControlState
self.m_tsc_state = self.sm['longitudinalPlanSP'].turnSpeedControlState
self.speed_limit = self.sm['longitudinalPlanSP'].speedLimit
self.speed_limit_offset = self.sm['longitudinalPlanSP'].speedLimitOffset
self.v_tsc = self.sm['longitudinalPlanSP'].visionTurnSpeed
self.m_tsc = self.sm['longitudinalPlanSP'].turnSpeed
if self.frame % 200 == 0:
self.speed_limit_control_enabled = self.param_s.get_bool("EnableSlc")
self.is_metric = self.param_s.get_bool("IsMetric")
self.last_speed_limit_sign_tap = self.param_s.get_bool("LastSpeedLimitSignTap")
self.v_cruise_min = GM_V_CRUISE_MIN[self.is_metric] * (CV.KPH_TO_MPH if not self.is_metric else 1)
# Send CAN commands.
can_sends = []
if not self.CP.pcmCruiseSpeed:
if not self.last_speed_limit_sign_tap_prev and self.last_speed_limit_sign_tap:
self.sl_force_active_timer = self.frame
self.param_s.put_bool_nonblocking("LastSpeedLimitSignTap", False)
self.last_speed_limit_sign_tap_prev = self.last_speed_limit_sign_tap
sl_force_active = self.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
sl_inactive = not sl_force_active and (not self.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
sl_temp_inactive = not sl_force_active and (self.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
slc_active = not sl_inactive and not sl_temp_inactive
self.slc_active_stock = slc_active
# Steering (Active: 50Hz, inactive: 10Hz)
steer_step = self.params.STEER_STEP if CC.latActive else self.params.INACTIVE_STEER_STEP
@@ -150,6 +212,15 @@ class CarController(CarControllerBase):
self.last_button_frame = self.frame
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.CAMERA, CS.buttons_counter, CruiseButtons.CANCEL))
if not (CC.cruiseControl.cancel or CC.cruiseControl.resume) and not self.CP.pcmCruiseSpeed and CS.out.cruiseState.enabled:
self.cruise_button = self.get_cruise_buttons(CS, CC.vCruise)
if self.cruise_button is not None:
send_freq = 1
if not (self.v_tsc_state != 0 or self.m_tsc_state > 1) and abs(self.target_speed - self.v_set_dis) <= 2:
send_freq = 3
if self.frame % 12 < 6: # thanks to mochi86420 for the magic numbers
can_sends.extend([gmcan.create_buttons(self.packer_pt, CanBus.CAMERA, (CS.buttons_counter + 2) % 4, self.cruise_button)] * 3)
if self.CP.networkLocation == NetworkLocation.fwdCamera:
# Silence "Take Steering" alert sent by camera, forward PSCMStatus with HandsOffSWlDetectionStatus=1
if self.frame % 10 == 0:
@@ -163,3 +234,120 @@ class CarController(CarControllerBase):
self.frame += 1
return new_actuators, can_sends
# multikyd methods, sunnyhaibin logic
def get_cruise_buttons_status(self, CS):
if not CS.out.cruiseState.enabled or CS.cruise_buttons != CruiseButtons.UNPRESS:
self.timer = 40
elif self.timer:
self.timer -= 1
else:
return 1
return 0
def get_target_speed(self, v_cruise_kph_prev):
v_cruise_kph = v_cruise_kph_prev
if self.slc_state > 1:
v_cruise_kph = (self.speed_limit + self.speed_limit_offset) * CV.MS_TO_KPH
if not self.slc_active_stock:
v_cruise_kph = v_cruise_kph_prev
return v_cruise_kph
def get_button_type(self, button_type):
self.type_status = "type_" + str(button_type)
self.button_picker = getattr(self, self.type_status, lambda: "default")
return self.button_picker()
def reset_button(self):
if self.button_type != 3:
self.button_type = 0
def type_default(self):
self.button_type = 0
return None
def type_0(self):
self.button_count = 0
self.target_speed = self.init_speed
self.speed_diff = self.target_speed - self.v_set_dis
if self.target_speed > self.v_set_dis:
self.button_type = 1
elif self.target_speed < self.v_set_dis and self.v_set_dis > self.v_cruise_min:
self.button_type = 2
return None
def type_1(self):
cruise_button = CruiseButtons.RES_ACCEL
self.button_count += 1
if self.target_speed <= self.v_set_dis:
self.button_count = 0
self.button_type = 3
elif self.button_count > 5:
self.button_count = 0
self.button_type = 3
return cruise_button
def type_2(self):
cruise_button = CruiseButtons.DECEL_SET
self.button_count += 1
if self.target_speed >= self.v_set_dis or self.v_set_dis <= self.v_cruise_min:
self.button_count = 0
self.button_type = 3
elif self.button_count > 5:
self.button_count = 0
self.button_type = 3
return cruise_button
def type_3(self):
cruise_button = CruiseButtons.UNPRESS
self.button_count += 1
if self.button_count > self.t_interval:
self.button_type = 0
return cruise_button
def get_curve_speed(self, target_speed_kph, v_cruise_kph_prev):
if self.v_tsc_state != 0:
vision_v_cruise_kph = self.v_tsc * CV.MS_TO_KPH
if int(vision_v_cruise_kph) == int(v_cruise_kph_prev):
vision_v_cruise_kph = 255
else:
vision_v_cruise_kph = 255
if self.m_tsc_state > 1:
map_v_cruise_kph = self.m_tsc * CV.MS_TO_KPH
if int(map_v_cruise_kph) == 0.0:
map_v_cruise_kph = 255
else:
map_v_cruise_kph = 255
curve_speed = self.curve_speed_hysteresis(min(vision_v_cruise_kph, map_v_cruise_kph) + 2 * CV.MPH_TO_KPH)
return min(target_speed_kph, curve_speed)
def get_button_control(self, CS, final_speed, v_cruise_kph_prev):
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not self.is_metric else 1))
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not self.is_metric else CV.MS_TO_KPH))
cruise_button = self.get_button_type(self.button_type)
return cruise_button
def curve_speed_hysteresis(self, cur_speed: float, hyst=(0.75 * CV.MPH_TO_KPH)):
if cur_speed > self.steady_speed:
self.steady_speed = cur_speed
elif cur_speed < self.steady_speed - hyst:
self.steady_speed = cur_speed
return self.steady_speed
def get_cruise_buttons(self, CS, v_cruise_kph_prev):
cruise_button = None
if not self.get_cruise_buttons_status(CS):
pass
elif CS.out.cruiseState.enabled:
set_speed_kph = self.get_target_speed(v_cruise_kph_prev)
if self.slc_state > 1:
target_speed_kph = set_speed_kph
else:
target_speed_kph = min(v_cruise_kph_prev, set_speed_kph)
if self.v_tsc_state != 0 or self.m_tsc_state > 1:
self.final_speed_kph = self.get_curve_speed(target_speed_kph, v_cruise_kph_prev)
else:
self.final_speed_kph = target_speed_kph
cruise_button = self.get_button_control(CS, self.final_speed_kph, v_cruise_kph_prev) # MPH/KPH based button presses
return cruise_button

View File

@@ -64,7 +64,7 @@ def create_gas_regen_command(packer, bus, throttle, idx, enabled, at_full_stop):
"GasRegenAlwaysOne3": 1,
}
dat = packer.make_can_msg("ASCMGasRegenCmd", bus, values)[2]
dat = packer.make_can_msg("ASCMGasRegenCmd", bus, values)[1]
values["GasRegenChecksum"] = (((0xff - dat[1]) & 0xff) << 16) | \
(((0xff - dat[2]) & 0xff) << 8) | \
((0x100 - dat[3] - idx) & 0xff)

View File

@@ -6,11 +6,10 @@ from panda import Panda
from openpilot.common.basedir import BASEDIR
from openpilot.common.conversions import Conversions as CV
from openpilot.selfdrive.car import create_button_events, get_safety_config
from openpilot.selfdrive.car import create_button_events, get_safety_config, get_friction
from openpilot.selfdrive.car.gm.radar_interface import RADAR_HEADER_MSG
from openpilot.selfdrive.car.gm.values import CAR, CruiseButtons, CarControllerParams, EV_CAR, CAMERA_ACC_CAR, CanBus
from openpilot.selfdrive.car.interfaces import CarInterfaceBase, TorqueFromLateralAccelCallbackType, FRICTION_THRESHOLD, LatControlInputs, NanoFFModel
from openpilot.selfdrive.controls.lib.drive_helpers import get_friction
ButtonType = car.CarState.ButtonEvent.Type
EventName = car.CarEvent.EventName
@@ -120,6 +119,7 @@ class CarInterface(CarInterfaceBase):
ret.pcmCruise = False
ret.openpilotLongitudinalControl = True
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
ret.customStockLongAvailable = True
else: # ASCM, OBD-II harness
ret.openpilotLongitudinalControl = True
@@ -204,9 +204,6 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def _update(self, c):
ret = self.CS.update(self.cp, self.cp_cam, self.cp_loopback)
self.sp_update_params()
distance_button = 0
# Don't add event if transitioning from INIT, unless it's to an actual button
if self.CS.cruise_buttons != CruiseButtons.UNPRESS or self.CS.prev_cruise_buttons != CruiseButtons.INIT:
@@ -216,18 +213,19 @@ class CarInterface(CarInterfaceBase):
*create_button_events(self.CS.distance_button, self.CS.prev_distance_button,
{1: ButtonType.gapAdjustCruise})
]
distance_button = self.CS.distance_button
self.CS.button_events.extend(create_button_events(self.CS.lkas_enabled, self.CS.prev_lkas_enabled, {1: ButtonType.altButton1}))
self.CS.button_events = [
*self.CS.button_events,
*create_button_events(self.CS.lkas_enabled, self.CS.prev_lkas_enabled, {1: ButtonType.altButton1}),
]
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret, self.CS)
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret)
if not self.CP.pcmCruise:
if any(b.type == ButtonType.accelCruise and b.pressed for b in self.CS.button_events):
self.CS.accEnabled = True
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, self.CS.accEnabled,
self.CS.button_events, c.vCruise)
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, c.vCruise, self.CS.accEnabled)
if ret.cruiseState.available:
if self.enable_mads:
@@ -235,15 +233,15 @@ class CarInterface(CarInterfaceBase):
self.CS.madsEnabled = True
if any(b.type == ButtonType.altButton1 and b.pressed for b in self.CS.button_events):
self.CS.madsEnabled = not self.CS.madsEnabled
self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled)
self.CS.madsEnabled = self.get_acc_mads(ret, self.CS.madsEnabled)
else:
self.CS.madsEnabled = False
if not self.CP.pcmCruise or (self.CP.pcmCruise and self.CP.minEnableSpeed > 0):
if not self.CP.pcmCruise or (self.CP.pcmCruise and self.CP.minEnableSpeed > 0) or not self.CP.pcmCruiseSpeed:
if any(b.type == ButtonType.cancel for b in self.CS.button_events):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
if self.get_sp_pedal_disengage(ret):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads else False if self.CP.pcmCruise else self.CS.accEnabled
if self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed:
@@ -251,7 +249,7 @@ class CarInterface(CarInterfaceBase):
self.CS.accEnabled = False
self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled
ret, self.CS = self.get_sp_common_state(ret, self.CS, gap_button=bool(distance_button))
ret = self.get_sp_common_state(ret)
ret.buttonEvents = [
*self.CS.button_events,
@@ -266,7 +264,7 @@ class CarInterface(CarInterfaceBase):
# if any(b.type == ButtonType.accelCruise and b.pressed for b in ret.buttonEvents):
# events.add(EventName.buttonEnable)
events, ret = self.create_sp_events(self.CS, ret, events, enable_pressed=self.CS.accEnabled,
events, ret = self.create_sp_events(ret, events, enable_pressed=self.CS.accEnabled,
enable_buttons=(ButtonType.decelCruise,))
# Enabling at a standstill with brake is allowed
@@ -280,6 +278,8 @@ class CarInterface(CarInterfaceBase):
if ret.vEgo < self.CP.minSteerSpeed and self.CS.madsEnabled:
events.add(EventName.belowSteerSpeed)
ret.customStockLong = self.update_custom_stock_long()
ret.events = events.to_msg()
return ret

View File

@@ -5,13 +5,12 @@ import cereal.messaging as messaging
from openpilot.common.conversions import Conversions as CV
from openpilot.common.numpy_fast import clip, interp
from openpilot.common.params import Params
from openpilot.common.realtime import DT_CTRL
from opendbc.can.packer import CANPacker
from openpilot.selfdrive.car import create_gas_interceptor_command
from openpilot.selfdrive.car import DT_CTRL, rate_limit, make_tester_present_msg, create_gas_interceptor_command
from openpilot.selfdrive.car.honda import hondacan
from openpilot.selfdrive.car.honda.values import CruiseButtons, VISUAL_HUD, HONDA_BOSCH, HONDA_BOSCH_RADARLESS, HONDA_NIDEC_ALT_PCM_ACCEL, CarControllerParams
from openpilot.selfdrive.car.interfaces import CarControllerBase
from openpilot.selfdrive.controls.lib.drive_helpers import rate_limit, HONDA_V_CRUISE_MIN
from openpilot.selfdrive.controls.lib.drive_helpers import HONDA_V_CRUISE_MIN
VisualAlert = car.CarControl.HUDControl.VisualAlert
LongCtrlState = car.CarControl.Actuators.LongControlState
@@ -110,11 +109,10 @@ def rate_limit_steer(new_steer, last_steer):
class CarController(CarControllerBase):
def __init__(self, dbc_name, CP, VM):
self.CP = CP
super().__init__(dbc_name, CP, VM)
self.packer = CANPacker(dbc_name)
self.params = CarControllerParams(CP)
self.CAN = hondacan.CanBus(CP)
self.frame = 0
self.braking = False
self.brake_steady = 0.
@@ -132,9 +130,6 @@ class CarController(CarControllerBase):
self.sm = messaging.SubMaster(['longitudinalPlanSP'])
self.param_s = Params()
self.is_metric = self.param_s.get_bool("IsMetric")
self.speed_limit_control_enabled = False
self.last_speed_limit_sign_tap = False
self.last_speed_limit_sign_tap_prev = False
self.speed_limit = 0.
self.speed_limit_offset = 0
@@ -173,11 +168,7 @@ class CarController(CarControllerBase):
self.v_tsc = self.sm['longitudinalPlanSP'].visionTurnSpeed
self.m_tsc = self.sm['longitudinalPlanSP'].turnSpeed
if self.frame % 200 == 0:
self.speed_limit_control_enabled = self.param_s.get_bool("EnableSlc")
self.is_metric = self.param_s.get_bool("IsMetric")
self.last_speed_limit_sign_tap = self.param_s.get_bool("LastSpeedLimitSignTap")
self.v_cruise_min = HONDA_V_CRUISE_MIN[self.is_metric] * (CV.KPH_TO_MPH if not self.is_metric else 1)
self.v_cruise_min = HONDA_V_CRUISE_MIN[CS.params_list.is_metric] * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1)
actuators = CC.actuators
hud_control = CC.hudControl
@@ -213,14 +204,14 @@ class CarController(CarControllerBase):
self.params.STEER_LOOKUP_BP, self.params.STEER_LOOKUP_V))
if not self.CP.pcmCruiseSpeed:
if not self.last_speed_limit_sign_tap_prev and self.last_speed_limit_sign_tap:
if not self.last_speed_limit_sign_tap_prev and CS.params_list.last_speed_limit_sign_tap:
self.sl_force_active_timer = self.frame
self.param_s.put_bool_nonblocking("LastSpeedLimitSignTap", False)
self.last_speed_limit_sign_tap_prev = self.last_speed_limit_sign_tap
self.last_speed_limit_sign_tap_prev = CS.params_list.last_speed_limit_sign_tap
sl_force_active = self.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
sl_inactive = not sl_force_active and (not self.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
sl_temp_inactive = not sl_force_active and (self.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
sl_force_active = CS.params_list.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
sl_inactive = not sl_force_active and (not CS.params_list.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
sl_temp_inactive = not sl_force_active and (CS.params_list.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
slc_active = not sl_inactive and not sl_temp_inactive
self.slc_active_stock = slc_active
@@ -231,7 +222,7 @@ class CarController(CarControllerBase):
# tester present - w/ no response (keeps radar disabled)
if self.CP.carFingerprint in (HONDA_BOSCH - HONDA_BOSCH_RADARLESS) and self.CP.openpilotLongitudinalControl:
if self.frame % 10 == 0:
can_sends.append((0x18DAB0F1, 0, b"\x02\x3E\x80\x00\x00\x00\x00\x00", 1))
can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True))
# Send steering command.
can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_steer, CC.latActive, self.CP.carFingerprint,
@@ -432,8 +423,8 @@ class CarController(CarControllerBase):
return min(target_speed_kph, curve_speed)
def get_button_control(self, CS, final_speed, v_cruise_kph_prev):
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not self.is_metric else 1))
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not self.is_metric else CV.MS_TO_KPH))
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1))
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not CS.params_list.is_metric else CV.MS_TO_KPH))
cruise_button = self.get_button_type(self.button_type)
return cruise_button

View File

@@ -576,6 +576,7 @@ FW_VERSIONS = {
b'28102-5MX-A900\x00\x00',
b'28102-5MX-A910\x00\x00',
b'28102-5MX-C001\x00\x00',
b'28102-5MX-C610\x00\x00',
b'28102-5MX-C910\x00\x00',
b'28102-5MX-D001\x00\x00',
b'28102-5MX-D710\x00\x00',

View File

@@ -174,11 +174,6 @@ class CarInterface(CarInterfaceBase):
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 239], [0, 239]]
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.,20], [0.,20]]
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.4,0.3], [0,0]]
tire_stiffness_factor = 0.8467
ret.longitudinalTuning.kpBP = [0., 5., 35.]
ret.longitudinalTuning.kpV = [2.4, 1.6, 0.8]
ret.longitudinalTuning.kiBP = [0., 35.]
ret.longitudinalTuning.kiV = [0.2, 0.16]
elif candidate in (CAR.HONDA_ODYSSEY, CAR.HONDA_ODYSSEY_CHN):
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]]
@@ -266,17 +261,15 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def _update(self, c):
ret = self.CS.update(self.cp, self.cp_cam, self.cp_body)
self.sp_update_params()
self.CS.button_events = [
*create_button_events(self.CS.cruise_buttons, self.CS.prev_cruise_buttons, BUTTONS_DICT),
*create_button_events(self.CS.cruise_setting, self.CS.prev_cruise_setting, SETTINGS_BUTTONS_DICT),
]
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret, self.CS)
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret)
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, self.CS.accEnabled,
self.CS.button_events, c.vCruise)
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, c.vCruise, self.CS.accEnabled)
if ret.cruiseState.available:
if self.enable_mads:
@@ -284,25 +277,30 @@ class CarInterface(CarInterfaceBase):
self.CS.madsEnabled = True
if any(b.type == ButtonType.altButton1 and b.pressed for b in self.CS.button_events):
self.CS.madsEnabled = not self.CS.madsEnabled
self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled)
self.CS.madsEnabled = self.get_acc_mads(ret, self.CS.madsEnabled)
else:
self.CS.madsEnabled = False
if not self.CP.pcmCruise or (self.CP.pcmCruise and self.CP.minEnableSpeed > 0) or not self.CP.pcmCruiseSpeed:
if any(b.type == ButtonType.cancel for b in self.CS.button_events):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
if self.get_sp_pedal_disengage(ret):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads else False if self.CP.pcmCruise else self.CS.accEnabled
min_enable_speed_pcm = self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed
if self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed:
if not self.CP.pcmCruise or min_enable_speed_pcm or not self.CP.pcmCruiseSpeed:
if any(b.type == ButtonType.cancel for b in self.CS.button_events):
self.get_sp_cancel_cruise_state()
if self.get_sp_pedal_disengage(ret):
self.get_sp_cancel_cruise_state()
ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads or min_enable_speed_pcm \
else False if self.CP.pcmCruise \
else self.CS.accEnabled
if min_enable_speed_pcm:
if ret.gasPressed and not ret.cruiseState.enabled:
self.CS.accEnabled = False
self.CS.accEnabled = ret.cruiseState.enabled or self.CS.accEnabled
if ret.cruiseState.enabled and not self.CS.out.cruiseState.enabled:
self.CS.accEnabled = True
elif not ret.cruiseState.enabled:
self.CS.accEnabled = False
ret, self.CS = self.get_sp_common_state(ret, self.CS,
min_enable_speed_pcm=(self.CP.pcmCruise and self.CP.minEnableSpeed > 0 and self.CP.pcmCruiseSpeed),
gap_button=(self.CS.cruise_setting == 3))
ret = self.get_sp_common_state(ret)
ret.buttonEvents = [
*self.CS.button_events,
@@ -314,7 +312,7 @@ class CarInterface(CarInterfaceBase):
if self.CP.pcmCruise and ret.vEgo < self.CP.minEnableSpeed and not self.CS.madsEnabled:
events.add(EventName.belowEngageSpeed)
events, ret = self.create_sp_events(self.CS, ret, events)
events, ret = self.create_sp_events(ret, events)
#if self.CP.pcmCruise:
# # we engage when pcm is active (rising edge)
@@ -331,9 +329,7 @@ class CarInterface(CarInterfaceBase):
if self.CS.CP.minEnableSpeed > 0 and ret.vEgo < 0.001:
events.add(EventName.manualRestart)
ret.customStockLong = self.CS.update_custom_stock_long(self.CC.cruise_button, self.CC.final_speed_kph,
self.CC.target_speed, self.CC.v_set_dis,
self.CC.speed_diff, self.CC.button_type)
ret.customStockLong = self.update_custom_stock_long()
ret.events = events.to_msg()

View File

@@ -1,11 +1,10 @@
from cereal import car
import cereal.messaging as messaging
from openpilot.common.conversions import Conversions as CV
from openpilot.common.numpy_fast import clip
from openpilot.common.numpy_fast import clip, interp
from openpilot.common.params import Params
from openpilot.common.realtime import DT_CTRL
from opendbc.can.packer import CANPacker
from openpilot.selfdrive.car import apply_driver_steer_torque_limits, common_fault_avoidance
from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg
from openpilot.selfdrive.car.hyundai import hyundaicanfd, hyundaican
from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, HyundaiFlagsSP, Buttons, CarControllerParams, CANFD_CAR, CAR, CAMERA_SCC_CAR, LEGACY_SAFETY_MODE_CAR
@@ -48,12 +47,11 @@ def process_hud_alert(enabled, fingerprint, hud_control):
class CarController(CarControllerBase):
def __init__(self, dbc_name, CP, VM):
self.CP = CP
super().__init__(dbc_name, CP, VM)
self.CAN = CanBus(CP)
self.params = CarControllerParams(CP)
self.packer = CANPacker(dbc_name)
self.angle_limit_counter = 0
self.frame = 0
self.accel_last = 0
self.apply_steer_last = 0
@@ -64,7 +62,7 @@ class CarController(CarControllerBase):
self.lat_disengage_init = False
self.lat_active_last = False
sub_services = ['longitudinalPlanSP']
sub_services = ['longitudinalPlan', 'longitudinalPlanSP']
if CP.openpilotLongitudinalControl:
sub_services.append('radarState')
# TODO: Always true, prep for future conditional refactoring
@@ -72,9 +70,6 @@ class CarController(CarControllerBase):
self.sm = messaging.SubMaster(sub_services)
self.param_s = Params()
self.is_metric = self.param_s.get_bool("IsMetric")
self.speed_limit_control_enabled = False
self.last_speed_limit_sign_tap = False
self.last_speed_limit_sign_tap_prev = False
self.speed_limit = 0.
self.speed_limit_offset = 0
@@ -99,9 +94,24 @@ class CarController(CarControllerBase):
self.v_tsc = 0
self.m_tsc = 0
self.steady_speed = 0
self.hkg_can_smooth_stop = self.param_s.get_bool("HkgSmoothStop")
self.speeds = 0
self.v_target_plan = 0
self.custom_stock_planner_speed = self.param_s.get_bool("CustomStockLongPlanner")
self.lead_distance = 0
self.jerk = 0.0
self.jerk_l = 0.0
self.jerk_u = 0.0
self.jerkStartLimit = 2.0
self.cb_upper = 0.0
self.cb_lower = 0.0
self.jerk_count = 0.0
self.accel_raw = 0
self.accel_val = 0
self.accel_last_jerk = 0
self.hkg_custom_long_tuning = self.param_s.get_bool("HkgCustomLongTuning")
def calculate_lead_distance(self, hud_control: car.CarControl.HUDControl) -> float:
lead_one = self.sm["radarState"].leadOne
lead_two = self.sm["radarState"].leadTwo
@@ -118,6 +128,10 @@ class CarController(CarControllerBase):
self.sm.update(0)
if not self.CP.pcmCruiseSpeed:
if self.sm.updated['longitudinalPlan']:
_speeds = self.sm['longitudinalPlan'].speeds
self.speeds = _speeds[-1] if len(_speeds) else 0
if self.sm.updated['longitudinalPlanSP']:
self.v_tsc_state = self.sm['longitudinalPlanSP'].visionTurnControllerState
self.slc_state = self.sm['longitudinalPlanSP'].speedLimitControlState
@@ -128,17 +142,20 @@ class CarController(CarControllerBase):
self.m_tsc = self.sm['longitudinalPlanSP'].turnSpeed
if self.frame % 200 == 0:
self.speed_limit_control_enabled = self.param_s.get_bool("EnableSlc")
self.is_metric = self.param_s.get_bool("IsMetric")
self.last_speed_limit_sign_tap = self.param_s.get_bool("LastSpeedLimitSignTap")
self.v_cruise_min = HYUNDAI_V_CRUISE_MIN[self.is_metric] * (CV.KPH_TO_MPH if not self.is_metric else 1)
self.custom_stock_planner_speed = self.param_s.get_bool("CustomStockLongPlanner")
self.v_cruise_min = HYUNDAI_V_CRUISE_MIN[CS.params_list.is_metric] * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1)
self.v_target_plan = min(CC.vCruise * CV.KPH_TO_MS, self.speeds)
actuators = CC.actuators
hud_control = CC.hudControl
# steering torque
if self.CP.spFlags & HyundaiFlagsSP.SP_UPSTREAM_TACO.value:
self.params = CarControllerParams(self.CP, CS.out.vEgoRaw)
new_steer = int(round(actuators.steer * self.params.STEER_MAX))
apply_steer = apply_driver_steer_torque_limits(new_steer, self.apply_steer_last, CS.out.steeringTorque, self.params)
if self.CP.spFlags & HyundaiFlagsSP.SP_UPSTREAM_TACO.value:
apply_steer = clip(apply_steer, -self.params.STEER_MAX, self.params.STEER_MAX)
# >90 degree steering fault prevention
self.angle_limit_counter, apply_steer_req = common_fault_avoidance(abs(CS.out.steeringAngleDeg) >= MAX_ANGLE, CC.latActive,
@@ -175,14 +192,14 @@ class CarController(CarControllerBase):
blinking_icon = (self.frame - self.disengage_blink) * DT_CTRL < 1.0 if self.lat_disengage_init else False
if not self.CP.pcmCruiseSpeed:
if not self.last_speed_limit_sign_tap_prev and self.last_speed_limit_sign_tap:
if not self.last_speed_limit_sign_tap_prev and CS.params_list.last_speed_limit_sign_tap:
self.sl_force_active_timer = self.frame
self.param_s.put_bool_nonblocking("LastSpeedLimitSignTap", False)
self.last_speed_limit_sign_tap_prev = self.last_speed_limit_sign_tap
self.last_speed_limit_sign_tap_prev = CS.params_list.last_speed_limit_sign_tap
sl_force_active = self.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
sl_inactive = not sl_force_active and (not self.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
sl_temp_inactive = not sl_force_active and (self.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
sl_force_active = CS.params_list.speed_limit_control_enabled and (self.frame < (self.sl_force_active_timer * DT_CTRL + 2.0))
sl_inactive = not sl_force_active and (not CS.params_list.speed_limit_control_enabled or (True if self.slc_state == 0 else False))
sl_temp_inactive = not sl_force_active and (CS.params_list.speed_limit_control_enabled and (True if self.slc_state == 1 else False))
slc_active = not sl_inactive and not sl_temp_inactive
self.slc_active_stock = slc_active
@@ -199,14 +216,17 @@ class CarController(CarControllerBase):
if self.frame % 100 == 0 and not ((self.CP.flags & HyundaiFlags.CANFD_CAMERA_SCC.value) or escc) and \
self.CP.carFingerprint not in CAMERA_SCC_CAR and self.CP.openpilotLongitudinalControl:
# for longitudinal control, either radar or ADAS driving ECU
addr, bus = 0x7d0, 0
addr, bus = 0x7d0, self.CAN.ECAN if self.CP.carFingerprint in CANFD_CAR else 0
if self.CP.flags & HyundaiFlags.CANFD_HDA2.value:
addr, bus = 0x730, self.CAN.ECAN
can_sends.append([addr, 0, b"\x02\x3E\x80\x00\x00\x00\x00\x00", bus])
can_sends.append(make_tester_present_msg(addr, bus, suppress_response=True))
# for blinkers
if self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
can_sends.append([0x7b1, 0, b"\x02\x3E\x80\x00\x00\x00\x00\x00", self.CAN.ECAN])
can_sends.append(make_tester_present_msg(0x7b1, self.CAN.ECAN, suppress_response=True))
if self.CP.openpilotLongitudinalControl:
self.make_jerk(CS, accel, actuators)
# CAN-FD platforms
if self.CP.carFingerprint in CANFD_CAR:
@@ -234,9 +254,11 @@ class CarController(CarControllerBase):
if self.CP.openpilotLongitudinalControl:
if hda2:
can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame))
else:
can_sends.extend(hyundaicanfd.create_fca_warning_light(self.packer, self.CAN, self.frame))
if self.frame % 2 == 0:
can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled and CS.out.cruiseState.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override,
set_speed_in_units, hud_control))
can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CS, CC.enabled and CS.out.cruiseState.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override,
set_speed_in_units, hud_control, self.jerk_u, self.jerk_l))
self.accel_last = accel
else:
# button presses
@@ -280,15 +302,13 @@ class CarController(CarControllerBase):
self.lead_distance = self.calculate_lead_distance(hud_control)
if self.frame % 2 == 0 and self.CP.openpilotLongitudinalControl:
if self.hkg_can_smooth_stop:
stopping = stopping and CS.out.vEgoRaw < 0.05
# TODO: unclear if this is needed
jerk = 3.0 if actuators.longControlState == LongCtrlState.pid else 1.0
use_fca = self.CP.flags & HyundaiFlags.USE_FCA.value
can_sends.extend(hyundaican.create_acc_commands(self.packer, CC.enabled and CS.out.cruiseState.enabled, accel, jerk, int(self.frame / 2),
self.make_accel(CS, actuators)
can_sends.extend(hyundaican.create_acc_commands(self.packer, CC.enabled and CS.out.cruiseState.enabled, self.accel_raw, self.accel_val, self.jerk_l, self.jerk_u, int(self.frame / 2),
hud_control, set_speed_in_units, stopping,
CC.cruiseControl.override, use_fca, CS, escc, self.CP, self.lead_distance))
CC.cruiseControl.override, use_fca, CS, escc, self.CP, self.lead_distance, self.cb_lower, self.cb_upper))
# 20 Hz LFA MFA message
if self.frame % 5 == 0 and self.CP.flags & HyundaiFlags.SEND_LFA.value:
@@ -433,8 +453,8 @@ class CarController(CarControllerBase):
return min(target_speed_kph, curve_speed)
def get_button_control(self, CS, final_speed, v_cruise_kph_prev):
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not self.is_metric else 1))
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not self.is_metric else CV.MS_TO_KPH))
self.init_speed = round(min(final_speed, v_cruise_kph_prev) * (CV.KPH_TO_MPH if not CS.params_list.is_metric else 1))
self.v_set_dis = round(CS.out.cruiseState.speed * (CV.MS_TO_MPH if not CS.params_list.is_metric else CV.MS_TO_KPH))
cruise_button = self.get_button_type(self.button_type)
return cruise_button
@@ -455,6 +475,8 @@ class CarController(CarControllerBase):
target_speed_kph = set_speed_kph
else:
target_speed_kph = min(v_cruise_kph_prev, set_speed_kph)
if self.custom_stock_planner_speed:
target_speed_kph = self.curve_speed_hysteresis(self.v_target_plan * CV.MS_TO_KPH)
if self.v_tsc_state != 0 or self.m_tsc_state > 1:
self.final_speed_kph = self.get_curve_speed(target_speed_kph, v_cruise_kph_prev)
else:
@@ -462,3 +484,66 @@ class CarController(CarControllerBase):
cruise_button = self.get_button_control(CS, self.final_speed_kph, v_cruise_kph_prev) # MPH/KPH based button presses
return cruise_button
# jerk calculations thanks to apilot!
def cal_jerk(self, accel, actuators):
self.accel_raw = accel
if actuators.longControlState == LongCtrlState.off:
accel_diff = 0.0
elif actuators.longControlState == LongCtrlState.stopping:# or hud_control.softHold > 0:
accel_diff = 0.0
else:
accel_diff = self.accel_raw - self.accel_last_jerk
accel_diff /= DT_CTRL
self.jerk = self.jerk * 0.9 + accel_diff * 0.1
return self.jerk
def make_jerk(self, CS, accel, actuators):
jerk = self.cal_jerk(accel, actuators)
a_error = accel - CS.out.aEgo
jerk = jerk + (a_error * 2.0)
if not self.hkg_custom_long_tuning:
self.jerk_u = 3.0 if actuators.longControlState == LongCtrlState.pid else 1.0
self.jerk_l = 5.0
elif True: #self.CP.carFingerprint in CANFD_CAR or self.CP.carFingerprint == CAR.HYUNDAI_KONA_EV_2022:
startingJerk = 0.5
jerkLimit = 5.0
self.jerk_count += DT_CTRL
jerk_max = interp(self.jerk_count, [0, 1.5, 2.5], [startingJerk, startingJerk, jerkLimit])
if actuators.longControlState == LongCtrlState.off:
self.jerk_u = jerkLimit
self.jerk_l = jerkLimit
self.jerk_count = 0
else:
self.jerk_u = min(max(0.5, jerk * 2.0), jerk_max)
self.jerk_l = min(max(1.0, -jerk * 3.0), jerkLimit)
else:
startingJerk = self.jerkStartLimit
jerkLimit = 5.0
self.jerk_count += DT_CTRL
jerk_max = interp(self.jerk_count, [0, 1.5, 2.5], [startingJerk, startingJerk, jerkLimit])
self.cb_upper = self.cb_lower = 0
if actuators.longControlState == LongCtrlState.off:
self.jerk_u = jerkLimit
self.jerk_l = jerkLimit
self.jerk_count = 0
else:
self.jerk_u = min(max(0.5, jerk * 2.0), jerk_max)
self.jerk_l = min(max(0.5, -jerk * 2.0), jerkLimit)
self.cb_upper = clip(0.9 + accel * 0.2, 0, 1.2)
self.cb_lower = clip(0.8 + accel * 0.2, 0, 1.2)
def make_accel(self, CS, actuators):
long_control = actuators.longControlState
is_ice = not self.CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV)
rate_up = 0.1
rate_down = 0.1
if long_control == LongCtrlState.off or (long_control == LongCtrlState.stopping and CS.out.standstill):
self.accel_raw, self.accel_val = 0, 0
else:
#self.accel_val = clip(self.accel_raw, self.accel_last - rate_down, self.accel_last + rate_up)
self.accel_val = self.accel_raw
self.accel_last = self.accel_val
self.accel_last_jerk = self.accel_val

View File

@@ -62,6 +62,11 @@ class CarState(CarStateBase):
self.escc_aeb_dec_cmd = 0
self._speed_limit_clu = 0
def get_main_enabled(self, ret) -> bool:
if self.prev_main_buttons != 1 and self.main_buttons[-1] == 1:
self.mainEnabled = not self.mainEnabled
return ret.cruiseState.available and self.mainEnabled
def update(self, cp, cp_cam):
if self.CP.carFingerprint in CANFD_CAR:
return self.update_canfd(cp, cp_cam)
@@ -112,7 +117,7 @@ class CarState(CarStateBase):
# cruise state
if self.CP.openpilotLongitudinalControl:
# These are not used for engage/disengage since openpilot keeps track of state using the buttons
ret.cruiseState.available = cp.vl["TCS13"]["ACCEnable"] == 0 and self.mainEnabled
ret.cruiseState.available = cp.vl["TCS13"]["ACCEnable"] == 0
ret.cruiseState.enabled = cp.vl["TCS13"]["ACC_REQ"] == 1
ret.cruiseState.standstill = False
ret.cruiseState.nonAdaptive = False
@@ -207,17 +212,12 @@ class CarState(CarStateBase):
self.cruise_buttons.extend(cp.vl_all["CLU11"]["CF_Clu_CruiseSwState"])
self.main_buttons.extend(cp.vl_all["CLU11"]["CF_Clu_CruiseSwMain"])
if self.CP.openpilotLongitudinalControl:
if self.prev_main_buttons != 1:
if self.main_buttons[-1] == 1:
self.mainEnabled = not self.mainEnabled
ret.cruiseState.available = ret.cruiseState.available and self.mainEnabled
ret.cruiseState.available = self.get_main_enabled(ret)
self.prev_mads_enabled = self.mads_enabled
self.prev_lfa_enabled = self.lfa_enabled
if self.CP.spFlags & HyundaiFlagsSP.SP_CAN_LFA_BTN:
self.lfa_enabled = cp.vl["BCM_PO_11"]["LFA_Pressed"]
self.mads_enabled = False if not self.control_initialized else ret.cruiseState.available
if self.CP.spFlags & HyundaiFlagsSP.SP_NAV_MSG or self.CP.spFlags & HyundaiFlagsSP.SP_LKAS12:
self._update_traffic_signals(cp, cp_cam)
ret.cruiseState.speedLimit = self._calculate_speed_limit() * speed_conv
@@ -282,6 +282,7 @@ class CarState(CarStateBase):
ret.cruiseState.standstill = False
else:
cp_cruise_info = cp_cam if self.CP.flags & HyundaiFlags.CANFD_CAMERA_SCC else cp
ret.cruiseState.available = cp_cruise_info.vl["SCC_CONTROL"]["MainMode_ACC"] == 1
ret.cruiseState.enabled = cp_cruise_info.vl["SCC_CONTROL"]["ACCMode"] in (1, 2)
ret.cruiseState.standstill = cp_cruise_info.vl["SCC_CONTROL"]["CRUISE_STANDSTILL"] == 1
ret.cruiseState.speed = cp_cruise_info.vl["SCC_CONTROL"]["VSetDis"] * speed_factor
@@ -298,6 +299,8 @@ class CarState(CarStateBase):
self.prev_main_buttons = self.main_buttons[-1]
self.cruise_buttons.extend(cp.vl_all[self.cruise_btns_msg_canfd]["CRUISE_BUTTONS"])
self.main_buttons.extend(cp.vl_all[self.cruise_btns_msg_canfd]["ADAPTIVE_CRUISE_MAIN_BTN"])
if self.CP.openpilotLongitudinalControl:
ret.cruiseState.available = self.get_main_enabled(ret)
self.prev_mads_enabled = self.mads_enabled
self.prev_lfa_enabled = self.lfa_enabled
self.lfa_enabled = cp.vl[self.cruise_btns_msg_canfd]["LFA_BTN"]

View File

@@ -171,6 +171,7 @@ FW_VERSIONS = {
(Ecu.eps, 0x7d4, None): [
b'\xf1\x00DN8 MDPS C 1,00 1,01 56310L0010\x00 4DNAC101',
b'\xf1\x00DN8 MDPS C 1.00 1.01 56310-L0010 4DNAC101',
b'\xf1\x00DN8 MDPS C 1.00 1.01 56310-L0200 4DNAC102',
b'\xf1\x00DN8 MDPS C 1.00 1.01 56310-L0210 4DNAC101',
b'\xf1\x00DN8 MDPS C 1.00 1.01 56310-L0210 4DNAC102',
b'\xf1\x00DN8 MDPS C 1.00 1.01 56310L0010\x00 4DNAC101',
@@ -291,6 +292,7 @@ FW_VERSIONS = {
b'\xf1\x00TM MDPS C 1.00 1.02 56310-CLAC0 4TSHC102',
b'\xf1\x00TM MDPS C 1.00 1.02 56310-CLEC0 4TSHC102',
b'\xf1\x00TM MDPS C 1.00 1.02 56310-GA000 4TSHA100',
b'\xf1\x00TM MDPS C 1.00 1.02 56310GA000\x00 4TSHA100',
b'\xf1\x00TM MDPS R 1.00 1.05 57700-CL000 4TSHP105',
b'\xf1\x00TM MDPS R 1.00 1.06 57700-CL000 4TSHP106',
],
@@ -407,6 +409,7 @@ FW_VERSIONS = {
b'\xf1\x00ON ESC \x0b 100\x18\x12\x18 58910-S9360',
b'\xf1\x00ON ESC \x0b 101\x19\t\x05 58910-S9320',
b'\xf1\x00ON ESC \x0b 101\x19\t\x08 58910-S9360',
b'\xf1\x00ON ESC \x0b 103$\x04\x08 58910-S9360',
],
(Ecu.eps, 0x7d4, None): [
b'\xf1\x00LX2 MDPS C 1,00 1,03 56310-S8020 4LXDC103',
@@ -480,11 +483,13 @@ FW_VERSIONS = {
},
CAR.GENESIS_G80: {
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DH__ SCC F-CU- 1.00 1.01 96400-B1110 ',
b'\xf1\x00DH__ SCC F-CUP 1.00 1.01 96400-B1120 ',
b'\xf1\x00DH__ SCC F-CUP 1.00 1.02 96400-B1120 ',
b'\xf1\x00DH__ SCC FHCUP 1.00 1.01 96400-B1110 ',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DH LKAS AT EUR LHD 1.01 1.01 95895-B1500 161014',
b'\xf1\x00DH LKAS AT KOR LHD 1.01 1.01 95895-B1500 161014',
b'\xf1\x00DH LKAS AT KOR LHD 1.01 1.02 95895-B1500 170810',
b'\xf1\x00DH LKAS AT USA LHD 1.01 1.01 95895-B1500 161014',
@@ -585,6 +590,7 @@ FW_VERSIONS = {
b'\xf1\x00DL3 MDPS C 1.00 1.02 56310-L7220 4DLHC102',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00DL3HMFC AT KOR LHD 1.00 1.01 99210-L2000 191022',
b'\xf1\x00DL3HMFC AT KOR LHD 1.00 1.02 99210-L2000 200309',
b'\xf1\x00DL3HMFC AT KOR LHD 1.00 1.04 99210-L2000 210527',
],
@@ -595,6 +601,7 @@ FW_VERSIONS = {
b'\xf1\x00OS IEB \x02 210 \x02\x14 58520-K4000',
b'\xf1\x00OS IEB \x02 212 \x11\x13 58520-K4000',
b'\xf1\x00OS IEB \x03 210 \x02\x14 58520-K4000',
b'\xf1\x00OS IEB \x03 211 \x04\x02 58520-K4000',
b'\xf1\x00OS IEB \x03 212 \x11\x13 58520-K4000',
b'\xf1\x00OS IEB \r 105\x18\t\x18 58520-K4000',
],
@@ -705,6 +712,7 @@ FW_VERSIONS = {
],
(Ecu.fwdRadar, 0x7d0, None): [
b'\xf1\x00DEhe SCC F-CUP 1.00 1.02 99110-G5100 ',
b'\xf1\x00DEhe SCC FHCUP 1.00 1.02 99110-G5100 ',
b'\xf1\x00DEhe SCC H-CUP 1.01 1.02 96400-G5100 ',
],
},
@@ -757,10 +765,12 @@ FW_VERSIONS = {
b'\xf1\x00JF__ SCC F-CUP 1.00 1.00 96400-D4100 ',
],
(Ecu.abs, 0x7d1, None): [
b'\xf1\x00JF ESC \t 17 \x16\x06# 58920-D4180',
b'\xf1\x00JF ESC \x0f 16 \x16\x06\x17 58920-D5080',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00JFWGN LDWS AT USA LHD 1.00 1.02 95895-D4100 G21',
b'\xf1\x00JFWGN LKAS AT EUR LHD 1.00 1.01 95895-D4100 G20',
],
},
CAR.KIA_OPTIMA_G4_FL: {
@@ -1161,6 +1171,17 @@ FW_VERSIONS = {
b'\xf1\x006T6J0_C2\x00\x006T6K1051\x00\x00TOS4N20NS2\x00\x00\x00\x00',
],
},
CAR.HYUNDAI_KONA_EV_NON_SCC: {
(Ecu.abs, 0x7d1, None): [
b'\xf1\x00OS IEB \x02 212 \x11\x13 58520-K4000',
],
(Ecu.eps, 0x7d4, None): [
b'\xf1\x00OS MDPS C 1.00 1.04 56310K4000\x00 4OEDC104',
],
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00OSE LKAS AT USA LHD 1.00 1.00 95740-K4100 W40',
],
},
CAR.KIA_CEED_PHEV_2022_NON_SCC: {
(Ecu.eps, 0x7D4, None): [
b'\xf1\x00CD MDPS C 1.00 1.01 56310-XX000 4CPHC101',

View File

@@ -81,7 +81,7 @@ def create_lkas11(packer, frame, CP, apply_steer, steer_req,
# Genesis and Optima fault when forwarding while engaged
values["CF_Lkas_LdwsActivemode"] = 2
dat = packer.make_can_msg("LKAS11", 0, values)[2]
dat = packer.make_can_msg("LKAS11", 0, values)[1]
if CP.flags & HyundaiFlags.CHECKSUM_CRC8:
# CRC Checksum as seen on 2019 Hyundai Santa Fe
@@ -130,8 +130,8 @@ def create_lfahda_mfc(packer, enabled, lat_active, lateral_paused, blinking_icon
}
return packer.make_can_msg("LFAHDA_MFC", 0, values)
def create_acc_commands(packer, enabled, accel, upper_jerk, idx, hud_control, set_speed, stopping, long_override, use_fca,
CS, escc, CP, lead_distance):
def create_acc_commands(packer, enabled, accel_raw, accel_val, lower_jerk, upper_jerk, idx, hud_control, set_speed, stopping, long_override, use_fca,
CS, escc, CP, lead_distance, cb_lower, cb_upper):
commands = []
scc11_values = {
@@ -150,8 +150,8 @@ def create_acc_commands(packer, enabled, accel, upper_jerk, idx, hud_control, se
scc12_values = {
"ACCMode": 2 if enabled and long_override else 1 if enabled else 0,
"StopReq": 1 if stopping else 0,
"aReqRaw": accel,
"aReqValue": accel, # stock ramps up and down respecting jerk limit until it reaches aReqRaw
"aReqRaw": accel_raw,
"aReqValue": accel_val, # stock ramps up and down respecting jerk limit until it reaches aReqRaw
"CR_VSM_Alive": idx % 0xF,
}
@@ -166,16 +166,16 @@ def create_acc_commands(packer, enabled, accel, upper_jerk, idx, hud_control, se
scc12_values["CF_VSM_DecCmdAct"] = CS.escc_aeb_dec_cmd_act
scc12_values["CR_VSM_DecCmd"] = CS.escc_aeb_dec_cmd
scc12_dat = packer.make_can_msg("SCC12", 0, scc12_values)[2]
scc12_dat = packer.make_can_msg("SCC12", 0, scc12_values)[1]
scc12_values["CR_VSM_ChkSum"] = 0x10 - sum(sum(divmod(i, 16)) for i in scc12_dat) % 0x10
commands.append(packer.make_can_msg("SCC12", 0, scc12_values))
scc14_values = {
"ComfortBandUpper": 0.0, # stock usually is 0 but sometimes uses higher values
"ComfortBandLower": 0.0, # stock usually is 0 but sometimes uses higher values
"ComfortBandUpper": cb_upper, # stock usually is 0 but sometimes uses higher values
"ComfortBandLower": cb_lower, # stock usually is 0 but sometimes uses higher values
"JerkUpperLimit": upper_jerk, # stock usually is 1.0 but sometimes uses higher values
"JerkLowerLimit": 5.0, # stock usually is 0.5 but sometimes uses higher values
"JerkLowerLimit": lower_jerk, # stock usually is 0.5 but sometimes uses higher values
"ACCMode": 2 if enabled and long_override else 1 if enabled else 4, # stock will always be 4 instead of 0 after first disengage
"ObjGap": get_object_gap(lead_distance), # 5: >30, m, 4: 25-30 m, 3: 20-25 m, 2: < 20 m, 0: no lead
}
@@ -197,7 +197,7 @@ def create_acc_commands(packer, enabled, accel, upper_jerk, idx, hud_control, se
"FCA_DrvSetStatus": 1,
"FCA_Status": 1, # AEB disabled
}
fca11_dat = packer.make_can_msg("FCA11", 0, fca11_values)[2]
fca11_dat = packer.make_can_msg("FCA11", 0, fca11_values)[1]
fca11_values["CR_FCA_ChkSum"] = hyundai_checksum(fca11_dat[:7])
commands.append(packer.make_can_msg("FCA11", 0, fca11_values))
@@ -207,7 +207,7 @@ def create_acc_opt(packer, escc, CS, CP):
commands = []
scc13_values = {
"SCCDrvModeRValue": 2,
"SCCDrvModeRValue": 3,
"SCC_Equip": 1,
"Lead_Veh_Dep_Alert_USM": 2,
}

View File

@@ -121,7 +121,7 @@ def create_lfahda_cluster(packer, CAN, enabled, lat_active, lateral_paused, blin
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)
def create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_override, set_speed, hud_control):
def create_acc_control(packer, CAN, CS, enabled, accel_last, accel, stopping, gas_override, set_speed, hud_control, upper_jerk, lower_jerk):
jerk = 5
jn = jerk / 50
if not enabled or gas_override:
@@ -132,13 +132,13 @@ def create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_ov
values = {
"ACCMode": 0 if not enabled else (2 if gas_override else 1),
"MainMode_ACC": 1,
"MainMode_ACC": 1 if CS.mainEnabled else 0,
"StopReq": 1 if stopping else 0,
"aReqValue": a_val,
"aReqRaw": a_raw,
"VSetDis": set_speed,
"JerkLowerLimit": jerk if enabled else 1,
"JerkUpperLimit": 3.0,
"JerkLowerLimit": lower_jerk,
"JerkUpperLimit": upper_jerk,
"ACC_ObjDist": 1,
"ObjValid": 0,
@@ -172,6 +172,20 @@ def create_spas_messages(packer, CAN, frame, left_blink, right_blink):
return ret
def create_fca_warning_light(packer, CAN, frame):
ret = []
if frame % 2 == 0:
values = {
'AEB_SETTING': 0x1, # show AEB disabled icon
'SET_ME_2': 0x2,
'SET_ME_FF': 0xff,
'SET_ME_FC': 0xfc,
'SET_ME_9': 0x9,
}
ret.append(packer.make_can_msg("ADRV_0x160", CAN.ECAN, values))
return ret
def create_adrv_messages(packer, CAN, frame):
# messages needed to car happy after disabling
# the ADAS Driving ECU to do longitudinal control
@@ -182,15 +196,7 @@ def create_adrv_messages(packer, CAN, frame):
}
ret.append(packer.make_can_msg("ADRV_0x51", CAN.ACAN, values))
if frame % 2 == 0:
values = {
'AEB_SETTING': 0x1, # show AEB disabled icon
'SET_ME_2': 0x2,
'SET_ME_FF': 0xff,
'SET_ME_FC': 0xfc,
'SET_ME_9': 0x9,
}
ret.append(packer.make_can_msg("ADRV_0x160", CAN.ECAN, values))
ret.extend(create_fca_warning_light(packer, CAN, frame))
if frame % 5 == 0:
values = {

View File

@@ -1,6 +1,8 @@
import cereal.messaging as messaging
from cereal import car
from panda import Panda
from openpilot.common.params import Params
from openpilot.selfdrive.car.sunnypilot.fingerprinting import can_fingerprint, get_one_can
from openpilot.selfdrive.car.hyundai.enable_radar_tracks import enable_radar_tracks
from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, HyundaiFlagsSP, CAR, DBC, CANFD_CAR, CAMERA_SCC_CAR, CANFD_RADAR_SCC_CAR, \
@@ -91,7 +93,7 @@ class CarInterface(CarInterfaceBase):
# *** longitudinal control ***
if candidate in CANFD_CAR:
ret.experimentalLongitudinalAvailable = candidate not in (CANFD_UNSUPPORTED_LONGITUDINAL_CAR | CANFD_RADAR_SCC_CAR | NON_SCC_CAR)
ret.experimentalLongitudinalAvailable = candidate not in (CANFD_UNSUPPORTED_LONGITUDINAL_CAR | NON_SCC_CAR)
if ret.flags & HyundaiFlags.CANFD_CAMERA_SCC and not hda2:
ret.spFlags |= HyundaiFlagsSP.SP_CAMERA_SCC_LEAD.value
else:
@@ -102,13 +104,20 @@ class CarInterface(CarInterfaceBase):
ret.pcmCruise = not ret.openpilotLongitudinalControl
ret.stoppingControl = True
ret.startingState = True
ret.vEgoStarting = 0.1
ret.startAccel = 1.0
ret.startAccel = 1.6
ret.longitudinalActuatorDelay = 0.5
if ret.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV):
ret.startingState = False
ret.stopAccel = -2.0
else:
ret.startingState = True
ret.stopAccel = -1.0
if DBC[ret.carFingerprint]["radar"] is None:
if ret.spFlags & (HyundaiFlagsSP.SP_ENHANCED_SCC | HyundaiFlagsSP.SP_CAMERA_SCC_LEAD):
ret.radarTimeStep = 0.02
ret.radarUnavailable = False
# *** feature detection ***
@@ -117,6 +126,8 @@ class CarInterface(CarInterfaceBase):
if 0x1fa in fingerprint[CAN.ECAN]:
ret.spFlags |= HyundaiFlagsSP.SP_NAV_MSG.value
if Params().get("DongleId", encoding='utf8') in ("012c95f06918eca4", "68d6a96e703c00c9", "11c1f1909ca37bca"):
ret.spFlags |= HyundaiFlagsSP.SP_UPSTREAM_TACO.value
else:
ret.enableBsm = 0x58b in fingerprint[0]
@@ -125,7 +136,8 @@ class CarInterface(CarInterfaceBase):
if ret.flags & HyundaiFlags.MANDO_RADAR and ret.radarUnavailable:
ret.spFlags |= HyundaiFlagsSP.SP_RADAR_TRACKS.value
ret.radarUnavailable = False
if Params().get_bool("HyundaiRadarTracksAvailable"):
ret.radarUnavailable = False
# *** panda safety config ***
if candidate in CANFD_CAR:
@@ -142,6 +154,8 @@ class CarInterface(CarInterfaceBase):
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CANFD_ALT_BUTTONS
if ret.flags & HyundaiFlags.CANFD_CAMERA_SCC:
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_CAMERA_SCC
if ret.spFlags & HyundaiFlagsSP.SP_UPSTREAM_TACO:
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_UPSTREAM_TACO
else:
if candidate in LEGACY_SAFETY_MODE_CAR:
# these cars require a special panda safety mode due to missing counters and checksums in the messages
@@ -167,7 +181,8 @@ class CarInterface(CarInterfaceBase):
elif ret.flags & HyundaiFlags.EV:
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_EV_GAS
if candidate in (CAR.HYUNDAI_KONA, CAR.HYUNDAI_KONA_EV, CAR.HYUNDAI_KONA_HEV, CAR.HYUNDAI_KONA_EV_2022, CAR.HYUNDAI_KONA_NON_SCC):
if candidate in (CAR.HYUNDAI_KONA, CAR.HYUNDAI_KONA_EV, CAR.HYUNDAI_KONA_HEV, CAR.HYUNDAI_KONA_EV_2022,
CAR.HYUNDAI_KONA_NON_SCC, CAR.HYUNDAI_KONA_EV_NON_SCC):
ret.flags |= HyundaiFlags.ALT_LIMITS.value
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_ALT_LIMITS
@@ -177,16 +192,13 @@ class CarInterface(CarInterfaceBase):
if 0x2AA in fingerprint[0]:
ret.minSteerSpeed = 0.
if Params().get_bool("HkgSmoothStop"):
ret.vEgoStopping = 0.1
return ret
@staticmethod
def init(CP, logcan, sendcan):
if CP.openpilotLongitudinalControl and not ((CP.flags & HyundaiFlags.CANFD_CAMERA_SCC.value) or (CP.spFlags & HyundaiFlagsSP.SP_ENHANCED_SCC)) and \
CP.carFingerprint not in CAMERA_SCC_CAR:
addr, bus = 0x7d0, 0
addr, bus = 0x7d0, CanBus(CP).ECAN if CP.carFingerprint in CANFD_CAR else 0
if CP.flags & HyundaiFlags.CANFD_HDA2.value:
addr, bus = 0x730, CanBus(CP).ECAN
disable_ecu(logcan, sendcan, bus=bus, addr=addr, com_cont_req=b'\x28\x83\x01')
@@ -201,44 +213,63 @@ class CarInterface(CarInterfaceBase):
if CP.spFlags & HyundaiFlagsSP.SP_RADAR_TRACKS:
enable_radar_tracks(logcan, sendcan, bus=0, addr=0x7d0, config_data_id=b'\x01\x42')
params = Params()
rt_avail = params.get_bool("HyundaiRadarTracksAvailable")
rt_avail_persist = params.get_bool("HyundaiRadarTracksAvailablePersistent")
params.put_bool_nonblocking("HyundaiRadarTracksAvailableCache", rt_avail)
if not rt_avail_persist:
messaging.drain_sock_raw(logcan)
fingerprint = can_fingerprint(lambda: get_one_can(logcan))
radar_unavailable = RADAR_START_ADDR not in fingerprint[1] or DBC[CP.carFingerprint]["radar"] is None
params.put_bool_nonblocking("HyundaiRadarTracksAvailable", not radar_unavailable)
params.put_bool_nonblocking("HyundaiRadarTracksAvailablePersistent", True)
def _update(self, c):
if not self.CS.control_initialized and not self.CP.pcmCruise:
can_cruise_main_default = self.CP.spFlags & HyundaiFlagsSP.SP_CAN_LFA_BTN and not self.CP.flags & HyundaiFlags.CANFD and \
self.CS.params_list.hyundai_cruise_main_default
self.CS.mainEnabled = True if can_cruise_main_default or self.CP.carFingerprint in CANFD_CAR else False
ret = self.CS.update(self.cp, self.cp_cam)
self.sp_update_params()
self.CS.button_events.extend(create_button_events(self.CS.cruise_buttons[-1], self.CS.prev_cruise_buttons, BUTTONS_DICT))
self.CS.button_events.extend(create_button_events(self.CS.lfa_enabled, self.CS.prev_lfa_enabled, {1: ButtonType.altButton1}))
self.CS.button_events.extend(create_button_events(self.CS.main_buttons[-1], self.CS.prev_main_buttons, {1: ButtonType.altButton3}))
self.CS.button_events = [
*create_button_events(self.CS.cruise_buttons[-1], self.CS.prev_cruise_buttons, BUTTONS_DICT),
*create_button_events(self.CS.lfa_enabled, self.CS.prev_lfa_enabled, {1: ButtonType.altButton1}),
*create_button_events(self.CS.main_buttons[-1], self.CS.prev_main_buttons, {1: ButtonType.altButton3}),
]
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, self.CS.accEnabled,
self.CS.button_events, c.vCruise)
self.CS.mads_enabled = self.get_sp_cruise_main_state(ret)
self.CS.mads_enabled = False if not self.mads_main_toggle else self.CS.mads_enabled
self.CS.accEnabled = self.get_sp_v_cruise_non_pcm_state(ret, c.vCruise, self.CS.accEnabled)
if ret.cruiseState.available:
if not self.CP.pcmCruiseSpeed:
if any(b.type in (ButtonType.altButton3, ButtonType.cancel) and not b.pressed for b in self.CS.button_events):
self.CS.accEnabled = True
if self.enable_mads:
if not self.CS.prev_mads_enabled and self.CS.mads_enabled:
self.CS.madsEnabled = True
if any(b.type == ButtonType.altButton1 and b.pressed for b in self.CS.button_events):
self.CS.madsEnabled = not self.CS.madsEnabled
self.CS.madsEnabled = self.get_acc_mads(ret.cruiseState.enabled, self.CS.accEnabled, self.CS.madsEnabled)
else:
if self.enable_mads:
if not self.CS.prev_mads_enabled and self.CS.mads_enabled and (self.CP.pcmCruise or
(any(b.type == ButtonType.altButton3 for b in self.CS.button_events) and not self.CP.pcmCruise)):
self.CS.madsEnabled = True
if any(b.type == ButtonType.altButton1 and b.pressed for b in self.CS.button_events):
self.CS.madsEnabled = not self.CS.madsEnabled
self.CS.madsEnabled = self.get_acc_mads(ret, self.CS.madsEnabled)
if not ret.cruiseState.available and self.CS.out.cruiseState.available:
self.CS.madsEnabled = False
if not self.CP.pcmCruise or not self.CP.pcmCruiseSpeed:
if not self.CP.pcmCruise:
if any(b.type == ButtonType.cancel for b in self.CS.button_events):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
if not self.CP.pcmCruiseSpeed:
if not ret.cruiseState.enabled:
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
if self.get_sp_pedal_disengage(ret):
self.CS.madsEnabled, self.CS.accEnabled = self.get_sp_cancel_cruise_state(self.CS.madsEnabled)
self.get_sp_cancel_cruise_state()
ret.cruiseState.enabled = ret.cruiseState.enabled if not self.enable_mads else False if self.CP.pcmCruise else self.CS.accEnabled
ret, self.CS = self.get_sp_common_state(ret, self.CS, gap_button=(self.CS.cruise_buttons[-1] == 3))
ret = self.get_sp_common_state(ret)
ret.buttonEvents = [
*self.CS.button_events,
@@ -252,7 +283,7 @@ class CarInterface(CarInterfaceBase):
events = self.create_common_events(ret, c, extra_gears=[GearShifter.sport, GearShifter.low, GearShifter.manumatic],
pcm_enable=False, allow_enable=allow_enable)
events, ret = self.create_sp_events(self.CS, ret, events, main_enabled=True, allow_enable=allow_enable)
events, ret = self.create_sp_events(ret, events, main_enabled=True, allow_enable=allow_enable)
# low speed steer alert hysteresis logic (only for cars with steer cut off above 10 m/s)
if ret.vEgo < (self.CP.minSteerSpeed + 2.) and self.CP.minSteerSpeed > 10.:
@@ -262,9 +293,10 @@ class CarInterface(CarInterfaceBase):
if self.low_speed_alert and self.CS.madsEnabled:
events.add(car.CarEvent.EventName.belowSteerSpeed)
ret.customStockLong = self.CS.update_custom_stock_long(self.CC.cruise_button, self.CC.final_speed_kph,
self.CC.target_speed, self.CC.v_set_dis,
self.CC.speed_diff, self.CC.button_type)
if self.CS.params_list.hyundai_radar_tracks_available and not self.CS.params_list.hyundai_radar_tracks_available_cache:
events.add(car.CarEvent.EventName.hyundaiRadarTracksAvailable)
ret.customStockLong = self.update_custom_stock_long()
ret.events = events.to_msg()

Some files were not shown because too many files have changed in this diff Show More