Compare commits

..

1210 Commits

Author SHA1 Message Date
Kumar 8c93e31897 Update long_mpc.py 2024-08-29 17:02:07 -07:00
Kumar eb3d99fcd5 gg 2024-08-29 16:33:57 -07:00
rav4kumar 3c04bc747d very very fast priusgovroom: prius > g70 2024-08-29 05:09:32 -07:00
rav4kumar 1a807f3c97 tt 2024-08-28 07:46:07 -07:00
rav4kumar b14f37e096 ui: eco status 2024-08-27 21:40:07 -07:00
Kumar da48c225f1 gg 2024-08-27 16:17:56 -07:00
Kumar 46fa2360c1 tun 2024-08-27 07:26:33 -07:00
rav4kumar f093f460a3 firyahhhhh! 2024-08-23 07:42:48 -07:00
Kumar bbbbe3b8ef Update interface.py 2024-08-22 13:10:32 -07:00
rav4kumar 4182f29840 low speed 2024-08-22 07:04:35 -07:00
Stupefacient 2d4f31bcec Remove device (#416) 2024-08-22 07:46:37 +02:00
Kumar 5e798af4a1 Update dynamic_experimental_controller.py 2024-08-21 17:41:52 -07:00
Kumar dd40b8a1e8 Update accel_controller.py 2024-08-21 16:43:58 -07:00
Kumar 202ea9141f Update dynamic_experimental_controller.py 2024-08-21 08:24:42 -07:00
Kumar 1e8a276027 Update dynamic_experimental_controller.py 2024-08-21 08:17:47 -07:00
rav4kumar 817592c184 tune 2024-08-21 07:51:07 -07:00
rav4kumar 1797d978a4 dec: use "WeightedMovingAverageCalculator" for more responsiveness and for smoohter transtion 2024-08-21 07:48:25 -07:00
rav4kumar df8046ec8c dec: use anomaly to filter noise 2024-08-20 07:40:33 -07:00
rav4kumar ba52a42514 ll 2024-08-20 07:16:41 -07:00
rav4kumar c1cc78d401 tiny tiny 2024-08-18 20:13:24 -07:00
Kumar 3281ab4b84 gg 2024-08-17 20:44:11 -07:00
Kumar d00d623173 staged 2024-08-17 13:01:01 -07:00
Kumar 36109bc743 Update accel_controller.py 2024-08-16 13:59:08 -07:00
Kumar 4c198769b1 Update long_mpc.py 2024-08-16 08:16:33 -07:00
Kumar 57fce9f3a4 Update long_mpc.py 2024-08-16 07:09:54 -07:00
Kumar 852302b97b Update accel_controller.py 2024-08-15 16:36:44 -07:00
rav4kumar a176851afe readjust low speed 2024-08-15 05:32:29 -07:00
Kumar ce4d1f8505 142 2024-08-14 07:55:54 -07:00
rav4kumar a0f2b086c7 Merge remote-tracking branch 'origin/master-dev-c3' into lt 2024-08-13 17:58:07 -07:00
Kumar 59ad1b0926 readjust ll 2024-08-13 16:35:41 -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 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
Kumar add019179f tt 2024-08-12 13:28:29 -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 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
rav4kumar 4a51023102 low low lose 2024-08-11 12:12:54 -07:00
rav4kumar 1f0415e310 Merge remote-tracking branch 'origin/master-dev-c3' into lt 2024-08-11 11:54:03 -07:00
Kumar 1937140890 Update long_mpc.py 2024-08-10 22:17:14 -07:00
Kumar b9d1980f6e Update accel_controller.py 2024-08-10 22:16:08 -07: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
Kumar 0b766c67b3 fine tune - cutin 2024-08-10 09:47:59 -07: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
rav4kumar f31bd02087 Merge remote-tracking branch 'origin/master-dev-c3' into lt 2024-08-09 20:01:06 -07: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
Kumar f9a195bab7 safety 2024-08-09 07:45:19 -07: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 21a2aa79b2 Merge branch 'hkg-can-jerk' into lt 2024-08-08 21:01:09 -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
rav4kumar 31ba711819 dec 2024-08-08 07:22:09 -07:00
rav4kumar 805fd9a290 low speed 2024-08-08 07:13:50 -07:00
Jason Wen 72101c51ee Merge branch 'hkg-can-jerk' into master-dev-c3 2024-08-07 13:23:53 -04:00
Jason Wen b8f63740bc Merge branch 'hkg-can-jerk' into lt 2024-08-07 13:23:46 -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 c5ebb3a5a1 Merge branch 'hkg-can-jerk' into lt 2024-08-07 11:21:22 -04:00
Jason Wen bd5228e394 check ttc 2024-08-07 11:21:11 -04:00
Jason Wen c365aac60a Merge branch 'hkg-can-jerk' into lt 2024-08-07 07:48:09 -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 98e9890004 Merge branch 'hkg-can-jerk' into lt 2024-08-07 07:16:59 -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
Kumar 8b976ee3ac Lt (#402) 2024-08-06 21:42:51 -07:00
Kumar c0d5f23ac0 Merge branch 'lt' into lt 2024-08-06 21:42:26 -07:00
Jason Wen 5341eb30fe Merge branch 'hkg-can-jerk' into lt 2024-08-07 00:16:36 -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 a07bb99d0c Merge branch 'hkg-can-jerk' into lt
# Conflicts:
#	selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py
#	selfdrive/controls/lib/longitudinal_planner.py
2024-08-06 23:45:29 -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
rav4kumar bc65566017 Revert "dynamically change *coast @cydia2020"
This reverts commit c831b5f2af.
2024-08-06 17:36:53 -07: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
Kumar db684508da Update accel_controller.py 2024-08-06 16:48:44 -07: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
cgw1968acc 94fc8a9b5a Update accel_controller.py 2024-08-07 00:01:57 +08:00
cgw1968acc 080ca6e62f Update accel_controller.py 2024-08-06 23:59:42 +08:00
cgw1968acc 4e3e220f37 Update accel_controller.py 2024-08-06 23:54:51 +08:00
cgw1968acc b2dfc01469 Update accel_controller.py 2024-08-06 23:29:32 +08:00
Kumar 3413f077fb Simplify 2024-08-06 08:20:37 -07:00
cgw1968acc c32595e63f Update accel_controller.py 2024-08-06 23:04:49 +08:00
rav4kumar cae49279e5 Merge remote-tracking branch 'origin/master-dev-c3' into lt 2024-08-06 07:37:56 -07:00
rav4kumar 72deb320a7 Merge remote-tracking branch 'origin/master' into lt 2024-08-06 07:06:04 -07:00
rav4kumar f532c73c60 accel 2024-08-06 07:05:50 -07:00
rav4kumar bb3d041bb1 rockettttt 2024-08-06 07:00:38 -07:00
cgw1968acc f7da0a2af5 Update accel_controller.py 2024-08-06 21:24:23 +08:00
cgw1968acc 2773e214a8 Update accel_controller.py 2024-08-06 21:09:51 +08: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
Kumar d0608fc987 Update long_mpc.py 2024-08-05 17:37:22 -07:00
Kumar 2f56309bb6 Update long_mpc.py 2024-08-05 17:17:27 -07: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 e602ac636c Merge branch 'hkg-can-jerk' into lt 2024-08-05 13:44:01 -04:00
Jason Wen 5986c6611e oops forgot to push 2024-08-05 13:43:40 -04:00
Kumar 1ce2ecd153 Update accel_controller.py 2024-08-05 08:09:38 -07:00
Jason Wen dc9a8ddca7 Oops 2024-08-04 17:11:22 -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
Kumar b4fd05617c Update long_mpc.py 2024-08-04 08:06:12 -07: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 373d6c2e59 Merge branch 'hkg-can-jerk' into lt 2024-08-04 11:02:14 -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
rav4kumar 7aef4728ca low speed breakpoints / closer stop to the lead in front 2024-08-04 06:16:49 -07:00
Jason Wen ca5fa0e6d9 Merge branch 'hkg-can-jerk' into lt 2024-08-04 09:11:32 -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
rav4kumar 0c76a761ce Merge remote-tracking branch 'origin/master' into lt 2024-08-04 06:07:41 -07: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
rav4kumar dee11f6d54 bump ref 2024-08-03 22:13:26 -07:00
rav4kumar 76efd9e8ae fix ui 2024-08-03 22:02:51 -07:00
rav4kumar 2721e85275 gg 2024-08-03 21:51:24 -07:00
rav4kumar dd08146711 tune 2024-08-03 21:50:54 -07:00
rav4kumar c219ba7c79 ttttttt 2024-08-03 21:50:47 -07:00
rav4kumar ee67635e8d tune 2024-08-03 21:50:40 -07:00
rav4kumar 972c69bd2a df 2024-08-03 21:50:16 -07:00
rav4kumar 16e9625626 stop distance tune 2024-08-03 21:49:55 -07:00
rav4 kumar 6b71d82019 vroom vroom vroom vroom vroom 2024-08-03 21:49:33 -07:00
rav4kumar 8d693e1d41 dec update 2024-08-03 21:49:10 -07:00
rav4kumar cab9ccf0d8 prius glides tunes 2024-08-03 21:48:19 -07:00
rav4kumar c831b5f2af dynamically change *coast @cydia2020 2024-08-03 21:47:38 -07:00
rav4kumar 58f994496c bsm 2024-08-03 21:20:43 -07:00
rav4kumar 2e15f519bc Reapply "Toyota: Auto Brake Hold"
This reverts commit be72a8ed06.
2024-08-03 21:19:27 -07: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 aa831ca69c Merge remote-tracking branch 'commaai/openpilot/master' into master-dev-c3 2024-08-03 20:21:32 -04: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
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
Jason Wen 1fb3ab1d1a no more body 2024-08-02 18:45:59 -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
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
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
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
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
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 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
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 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
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 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
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
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
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
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
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
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
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
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
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
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
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
Jason Wen 796e6ae924 SCC "Fast" mode 2024-07-26 23:59:56 -04: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
Jason Wen a33d4e51c7 use jerk limit to change accel to car 2024-07-25 16:44:54 -04: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
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
Jason Wen 97f0178d5e ui: Lead car chevron: Time to Lead Car 2024-07-25 17:16:57 +00: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
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
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
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
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
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
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
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 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
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
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
Jason Wen ee229c2b70 maps: Use UIStateSP and disconnect 2024-07-19 15:52:19 -04: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
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
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
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
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
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
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
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
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
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
Jason Wen bc1aad6f6a git-crypt: add collaborators 2024-07-12 21:36:28 +00: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
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
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
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
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
Jason Wen bbef8d5764 Merge branch 'master-priv' into master-dev-c3
# Conflicts:
#	panda
2024-07-07 20:39:24 -04: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
109 changed files with 1884 additions and 540 deletions
+14
View File
@@ -31,10 +31,16 @@ sunnypilot - 0.9.8.0 (2024-xx-xx)
* 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
* In response to the official temporary deprecation of support for Mapbox navigation in the upstream ([commaai/openpilot#32773](https://github.com/commaai/openpilot/pull/32773)), sunnypilot will continue maintaining software support for Mapbox navigation
* NEW❗: Toyota - Automatic Brake Hold (AHB) thanks to AlexandreSato!
* When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold
* NOTE: Only for Toyota/Lexus vehicles with TSS2/LSS2
* NEW❗: Toyota - Automatic Door Locking and Unlocking thanks to AlexandreSato, cydia2020, and dragonpilot-community!
* Auto Lock by Speed: All doors are automatically locked when vehicle speed is approximately 6 mph (10 km/h) or higher
* Auto Unlock by Shift to P: All doors are automatically unlocked when shifting the shift lever to P
@@ -48,6 +54,10 @@ sunnypilot - 0.9.8.0 (2024-xx-xx)
* 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)
@@ -85,6 +95,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
@@ -92,6 +104,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
+32 -3
View File
@@ -48,6 +48,7 @@ Join the official sunnypilot Discord server to stay up to date with all the late
To use sunnypilot in a car, you need the following:
* A supported device to run this software
* a [comma three](https://comma.ai/shop/products/three), or
* a comma two (only with older versions below 0.8.13)
* This software
* One of [the 250+ supported cars](https://github.com/commaai/openpilot/blob/master/docs/CARS.md). We support Honda, Toyota, Hyundai, Nissan, Kia, Chrysler, Lexus, Acura, Audi, VW, Ford and more. If your car is not supported but has adaptive cruise control and lane-keeping assist, it's likely able to run sunnypilot.
* A [car harness](https://comma.ai/shop/products/car-harness) to connect to your car
@@ -114,12 +115,40 @@ Please refer to [Recommended Branches](#-recommended-branches) to find your pref
Requires further assistance with software installation? Join the [sunnypilot Discord server](https://discord.sunnypilot.com) and message us in the `#installation-help` channel.
comma two
------
1. [Factory reset/uninstall](https://github.com/commaai/openpilot/wiki/FAQ#how-can-i-reset-the-device) the previous software if you have another software/fork installed.
2. After factory reset/uninstall and upon reboot, select `Custom Software` when given the option.
3. Input the installation URL per [Recommended Branches](#-recommended-branches). Example: ```https://smiskol.com/fork/sunnyhaibin/0.8.12-4-prod```
4. Complete the rest of the installation following the onscreen instructions.
Requires further assistance with software installation? Join the [sunnypilot Discord server](https://discord.sunnypilot.com) and message us in the `#installation-help` channel.
</details>
<details>
<summary>SSH (More Versatile)</summary>
<br>
Prerequisites: [How to SSH](https://github.com/commaai/openpilot/wiki/SSH)
If you are looking to install sunnypilot via SSH, run the following command in an SSH terminal after connecting to your device:
comma three:
------
* [`release-c3`](https://github.com/sunnyhaibin/openpilot/tree/release-c3):
```
cd /data && rm -rf ./openpilot && git clone -b release-c3 --recurse-submodules https://github.com/sunnyhaibin/sunnypilot.git openpilot && cd openpilot && sudo reboot
cd /data; rm -rf ./openpilot; git clone -b release-c3 --recurse-submodules https://github.com/sunnyhaibin/sunnypilot.git openpilot; cd openpilot; sudo reboot
```
comma two:
------
* [`0.8.12-prod-personal-hkg`](https://github.com/sunnyhaibin/openpilot/tree/0.8.12-prod-personal-hkg):
```
cd /data; rm -rf ./openpilot; git clone -b 0.8.12-prod-personal-hkg --recurse-submodules https://github.com/sunnyhaibin/sunnypilot.git openpilot; cd openpilot; sudo reboot
```
After running the command to install the desired branch, your comma device should reboot.
@@ -194,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:
@@ -326,7 +355,7 @@ Example:
---
How-To instructions can be found in [HOW-TOS.md](HOW-TOS.md).
How-To instructions can be found in [HOW-TOS.md](https://github.com/sunnyhaibin/openpilot/blob/(!)README/HOW-TOS.md).
</details>
+1
View File
@@ -138,6 +138,7 @@ struct CarEvent @0x9b1657f34caf3ad3 {
speedLimitConfirmed @140;
torqueNNLoad @141;
hyundaiRadarTracksAvailable @142;
spAutoBrakeHold @143;
radarCanErrorDEPRECATED @15;
communityFeatureDisallowedDEPRECATED @62;
+10 -1
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;
+10
View File
@@ -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},
@@ -254,6 +255,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"EndToEndLongToggle", PERSISTENT | BACKUP},
{"EnforceTorqueLateral", PERSISTENT | BACKUP},
{"EnhancedScc", PERSISTENT | BACKUP},
{"FastTakeOff", PERSISTENT | BACKUP},
{"FeatureStatus", PERSISTENT | BACKUP},
{"FleetManagerPin", PERSISTENT},
{"ForceOffroad", CLEAR_ON_MANAGER_START},
@@ -262,7 +264,9 @@ std::unordered_map<std::string, uint32_t> keys = {
{"HasAcceptedTermsSP", PERSISTENT},
{"HideVEgoUi", PERSISTENT | BACKUP},
{"HyundaiCruiseMainDefault", PERSISTENT | BACKUP},
{"HkgCustomLongTuning", PERSISTENT | BACKUP},
{"HkgSmoothStop", PERSISTENT | BACKUP},
{"HyundaiCruiseMainDefault", PERSISTENT | BACKUP},
{"HotspotOnBoot", PERSISTENT},
{"HotspotOnBootConfirmed", PERSISTENT},
{"HyundaiRadarTracksAvailable", PERSISTENT},
@@ -284,6 +288,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},
@@ -294,8 +299,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},
@@ -320,8 +328,10 @@ 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},
{"ToyotaAutoHold", PERSISTENT | BACKUP},
{"ToyotaAutoLockBySpeed", PERSISTENT | BACKUP},
{"ToyotaAutoUnlockByShifter", PERSISTENT | BACKUP},
{"ToyotaEnhancedBsm", PERSISTENT | BACKUP},
+1 -1
Submodule panda updated: 6a6cd44519...827201c04a
+6 -50
View File
@@ -1,51 +1,7 @@
#!/usr/bin/env bash
# How to use: run from the root of the openpilot repository with the following command: ./release/ci/sync-lfs.sh
# Set variables
export their_repo="https://github.com/commaai/openpilot.git"
export their_branch="master"
export current_branch=$(git rev-parse --abbrev-ref HEAD)
export our_lfs_url=${LFS_URL:-"https://gitlab.com/sunnypilot/public/sunnypilot-lfs.git/info/lfs"}
export our_lfs_push_url=${LFS_PUSH_URL:-"ssh://git@gitlab.com/sunnypilot/public/sunnypilot-lfs.git"}
echo "Syncing LFS objects from $their_repo:$their_branch to $our_lfs_url"
echo "Pushing LFS objects to $our_lfs_push_url"
# Function to reset to the current branch and perform a hard reset
function reset_hard {
exit_status=$?
echo "Resetting to the current branch and performing a hard reset..."
git reset --hard
git switch $current_branch
exit $exit_status
}
# Set trap to ensure reset on exit
trap reset_hard SIGINT SIGTERM EXIT
# Add remote if it does not exist
git remote add comma $their_repo 2>/dev/null || echo "Remote 'comma' already exists."
# Fetch the specified branch from the remote
git fetch comma $their_branch
# Clean up old branch if it exists
git branch -D ${their_branch}-upstream 2>/dev/null || echo "No old branch to clean up."
# Checkout new branch based on the upstream branch
git checkout -b ${their_branch}-upstream comma/$their_branch
# Write the .lfsconfig directly
cat <<EOL > .lfsconfig
[lfs]
url = $our_lfs_url
pushurl = $our_lfs_push_url
locksverify = false
EOL
# Fetch all LFS objects and push them to the specified pushurl
git lfs fetch --all
git lfs push --all $our_lfs_push_url
git restore .lfsconfig
# Switch back to the current branch (handled by trap)
mv .lfsconfig .lfsconfig.bak
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 --all origin
+4
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
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
+3
View File
@@ -60,6 +60,7 @@ class Car:
self.mads_disengage_lateral_on_brake = self.params.get_bool("DisengageLateralOnBrake")
self.mads_dlob = self.enable_mads and self.mads_disengage_lateral_on_brake
self.mads_ndlob = self.enable_mads and not self.mads_disengage_lateral_on_brake
self.sp_toyota_auto_brake_hold = self.params.get_bool("ToyotaAutoHold")
self.CP.alternativeExperience = 0
if not self.disengage_on_accelerator:
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.DISABLE_DISENGAGE_ON_GAS
@@ -67,6 +68,8 @@ class Car:
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.ENABLE_MADS
elif self.mads_ndlob:
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.MADS_DISABLE_DISENGAGE_LATERAL_ON_BRAKE
if self.sp_toyota_auto_brake_hold:
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.ALLOW_AEB
if self.CP.customStockLongAvailable and self.CP.pcmCruise and self.params.get_bool("CustomStockLong"):
self.CP.pcmCruiseSpeed = False
+8 -2
View File
@@ -3,7 +3,7 @@ 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
LongCtrlState = car.CarControl.Actuators.LongControlState
@@ -35,6 +35,9 @@ class CarController(CarControllerBase):
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 = []
@@ -74,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.))
+20
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),
+12 -2
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:
+64
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]
+6 -1
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()
+190
View File
@@ -1,4 +1,6 @@
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 opendbc.can.packer import CANPacker
@@ -6,6 +8,7 @@ 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
@@ -37,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
@@ -45,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
@@ -148,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:
@@ -161,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
+4 -1
View File
@@ -119,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
@@ -236,7 +237,7 @@ class CarInterface(CarInterfaceBase):
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.get_sp_cancel_cruise_state()
if self.get_sp_pedal_disengage(ret):
@@ -277,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
+104 -10
View File
@@ -1,7 +1,7 @@
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 opendbc.can.packer import CANPacker
from openpilot.selfdrive.car import DT_CTRL, apply_driver_steer_torque_limits, common_fault_avoidance, make_tester_present_msg
@@ -62,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
@@ -94,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
@@ -113,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
@@ -122,14 +141,21 @@ class CarController(CarControllerBase):
self.v_tsc = self.sm['longitudinalPlanSP'].visionTurnSpeed
self.m_tsc = self.sm['longitudinalPlanSP'].turnSpeed
if self.frame % 200 == 0:
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,
@@ -190,7 +216,7 @@ 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(make_tester_present_msg(addr, bus, suppress_response=True))
@@ -199,6 +225,9 @@ class CarController(CarControllerBase):
if self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
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:
hda2 = self.CP.flags & HyundaiFlags.CANFD_HDA2
@@ -225,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, CS, CC.enabled and CS.out.cruiseState.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override,
set_speed_in_units, hud_control))
set_speed_in_units, hud_control, self.jerk_u, self.jerk_l))
self.accel_last = accel
else:
# button presses
@@ -271,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:
@@ -446,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:
@@ -453,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
+11
View File
@@ -1171,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',
+8 -8
View File
@@ -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,
}
@@ -172,10 +172,10 @@ def create_acc_commands(packer, enabled, accel, upper_jerk, idx, hud_control, se
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
}
@@ -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,
}
+18 -12
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, CS, 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:
@@ -137,8 +137,8 @@ def create_acc_control(packer, CAN, CS, enabled, accel_last, accel, stopping, ga
"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 = {
+16 -8
View File
@@ -93,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:
@@ -104,11 +104,17 @@ 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
@@ -120,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"):
ret.spFlags |= HyundaiFlagsSP.SP_UPSTREAM_TACO.value
else:
ret.enableBsm = 0x58b in fingerprint[0]
@@ -146,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
@@ -171,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
@@ -181,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')
+15 -7
View File
@@ -3,7 +3,7 @@ from dataclasses import dataclass, field
from enum import Enum, IntFlag
from cereal import car
from panda.python import uds
from panda.python import uds, Panda
from openpilot.common.conversions import Conversions as CV
from openpilot.selfdrive.car import CarSpecs, DbcDict, PlatformConfig, Platforms, dbc_dict
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarDocs, CarParts, Column
@@ -16,7 +16,7 @@ class CarControllerParams:
ACCEL_MIN = -3.5 # m/s
ACCEL_MAX = 2.0 # m/s
def __init__(self, CP):
def __init__(self, CP, vEgoRaw=100.):
self.STEER_DELTA_UP = 3
self.STEER_DELTA_DOWN = 7
self.STEER_DRIVER_ALLOWANCE = 50
@@ -26,12 +26,13 @@ class CarControllerParams:
self.STEER_STEP = 1 # 100 Hz
if CP.carFingerprint in CANFD_CAR:
self.STEER_MAX = 270
self.STEER_DRIVER_ALLOWANCE = 250
upstream_taco = CP.safetyConfigs[-1].safetyParam & Panda.FLAG_HYUNDAI_UPSTREAM_TACO
self.STEER_MAX = 270 if not upstream_taco else 384 if vEgoRaw < 11. else 330
self.STEER_DRIVER_ALLOWANCE = 250 if not upstream_taco else 350
self.STEER_DRIVER_MULTIPLIER = 2
self.STEER_THRESHOLD = 250
self.STEER_DELTA_UP = 2
self.STEER_DELTA_DOWN = 3
self.STEER_THRESHOLD = 250 if not upstream_taco else 350
self.STEER_DELTA_UP = 2 if not upstream_taco else 10 if vEgoRaw < 11. else 2
self.STEER_DELTA_DOWN = 3 if not upstream_taco else 10 if vEgoRaw < 11. else 3
# To determine the limit for your car, find the maximum value that the stock LKAS will request.
# If the max stock LKAS request is <384, add your car to this list.
@@ -108,6 +109,7 @@ class HyundaiFlagsSP(IntFlag):
SP_CAMERA_SCC_LEAD = 2 ** 6
SP_LKAS12 = 2 ** 7
SP_RADAR_TRACKS = 2 ** 8
SP_UPSTREAM_TACO = 2 ** 9
class Footnote(Enum):
@@ -574,6 +576,12 @@ class CAR(Platforms):
HYUNDAI_KONA.specs,
spFlags=HyundaiFlagsSP.SP_NON_SCC | HyundaiFlagsSP.SP_NON_SCC_FCA,
)
HYUNDAI_KONA_EV_NON_SCC = HyundaiPlatformConfig(
[HyundaiCarDocs("Hyundai Kona Electric Non-SCC 2019", "No Smart Cruise Control (SCC)", car_parts=CarParts.common([CarHarness.hyundai_g]))],
HYUNDAI_KONA.specs,
flags=HyundaiFlags.EV,
spFlags=HyundaiFlagsSP.SP_NON_SCC | HyundaiFlagsSP.SP_NON_SCC_FCA,
)
KIA_CEED_PHEV_2022_NON_SCC = HyundaiPlatformConfig(
[HyundaiCarDocs("Kia Ceed PHEV Non-SCC 2022", "No Smart Cruise Control (SCC)", car_parts=CarParts.common([CarHarness.hyundai_i]))],
CarSpecs(mass=1650, wheelbase=2.65, steerRatio=13.75, tireStiffnessFactor=0.5),
+1 -1
View File
@@ -406,7 +406,7 @@ class CarInterfaceBase(ABC):
@staticmethod
def sp_configure_custom_torque_tune(ret, params):
ret.lateralTuning.torque.friction = float(params.get("TorqueFriction", encoding="utf8")) * 0.01
ret.lateralTuning.torque.friction = float(params.get("TorqueFriction", encoding="utf8")) * 0.001
ret.lateralTuning.torque.latAccelFactor = float(params.get("TorqueMaxLatAccel", encoding="utf8")) * 0.01
return ret
+1 -1
View File
@@ -21,7 +21,7 @@ class CarControllerParams:
self.STEER_DRIVER_FACTOR = 1 # from dbc
if CP.flags & SubaruFlags.GLOBAL_GEN2:
self.STEER_MAX = 1000
self.STEER_MAX = 1600
self.STEER_DELTA_UP = 40
self.STEER_DELTA_DOWN = 40
elif CP.carFingerprint == CAR.SUBARU_IMPREZA_2020:
+6
View File
@@ -29,6 +29,9 @@
"Ford Escape Plug-in Hybrid 2020-22": "FORD_ESCAPE_MK4",
"Ford Explorer 2020-23": "FORD_EXPLORER_MK6",
"Ford Explorer Hybrid 2020-23": "FORD_EXPLORER_MK6",
"Ford F-150 2022-23": "FORD_F_150_MK14",
"Ford F-150 Hybrid 2022-23": "FORD_F_150_MK14",
"Ford F-150 Lightning 2021-23": "FORD_F_150_LIGHTNING_MK1",
"Ford Focus 2018": "FORD_FOCUS_MK4",
"Ford Focus Hybrid 2018": "FORD_FOCUS_MK4",
"Ford Kuga 2020-22": "FORD_ESCAPE_MK4",
@@ -38,6 +41,8 @@
"Ford Maverick 2023-24": "FORD_MAVERICK_MK1",
"Ford Maverick Hybrid 2022": "FORD_MAVERICK_MK1",
"Ford Maverick Hybrid 2023-24": "FORD_MAVERICK_MK1",
"Ford Mustang Mach-E 2021-23": "FORD_MUSTANG_MACH_E_MK1",
"Ford Ranger 2024": "FORD_RANGER_MK2",
"Genesis G70 2018": "GENESIS_G70",
"Genesis G70 2019-21": "GENESIS_G70_2020",
"Genesis G70 2022-23": "GENESIS_G70_2020",
@@ -101,6 +106,7 @@
"Hyundai Kona Electric 2018-21": "HYUNDAI_KONA_EV",
"Hyundai Kona Electric 2022-23": "HYUNDAI_KONA_EV_2022",
"Hyundai Kona Electric (with HDA II, Korea only) 2023": "HYUNDAI_KONA_EV_2ND_GEN",
"Hyundai Kona Electric Non-SCC 2019": "HYUNDAI_KONA_EV_NON_SCC",
"Hyundai Kona Hybrid 2020": "HYUNDAI_KONA_HEV",
"Hyundai Kona Non-SCC 2019": "HYUNDAI_KONA_NON_SCC",
"Hyundai Palisade 2020-22": "HYUNDAI_PALISADE",
+1 -1
View File
@@ -17,7 +17,6 @@ from openpilot.selfdrive.car.body.values import CAR as COMMA
# TODO: add routes for these cars
non_tested_cars = [
FORD.FORD_F_150_MK14,
GM.CADILLAC_ATS,
GM.HOLDEN_ASTRA,
GM.CHEVROLET_MALIBU,
@@ -54,6 +53,7 @@ routes = [
CarTestRoute("e886087f430e7fe7|2023-06-16--23-06-36", FORD.FORD_FOCUS_MK4),
CarTestRoute("bd37e43731e5964b|2023-04-30--10-42-26", FORD.FORD_MAVERICK_MK1),
CarTestRoute("112e4d6e0cad05e1|2023-11-14--08-21-43", FORD.FORD_F_150_LIGHTNING_MK1),
CarTestRoute("24574459dd7fb3e0|2023-11-06--06-23-44", FORD.FORD_F_150_MK14),
CarTestRoute("83a4e056c7072678|2023-11-13--16-51-33", FORD.FORD_MUSTANG_MACH_E_MK1),
CarTestRoute("37998aa0fade36ab/00000000--48f927c4f5", FORD.FORD_RANGER_MK2),
#TestRoute("f1b4c567731f4a1b|2018-04-30--10-15-35", FORD.FUSION),
@@ -86,6 +86,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
"KIA_FORTE_2021_NON_SCC" = "HYUNDAI_SONATA"
"KIA_SELTOS_2023_NON_SCC" = "HYUNDAI_SONATA"
"HYUNDAI_KONA_NON_SCC" = "HYUNDAI_KONA_EV"
"HYUNDAI_KONA_EV_NON_SCC" = "HYUNDAI_KONA_EV"
"HYUNDAI_ELANTRA_2022_NON_SCC" = "HYUNDAI_ELANTRA_2021"
"GENESIS_G70_2021_NON_SCC" = "HYUNDAI_SONATA"
"KIA_CEED_PHEV_2022_NON_SCC" = "HYUNDAI_SONATA"
+32
View File
@@ -55,6 +55,13 @@ class CarController(CarControllerBase):
self.last_blindspot_frame = 0
self._auto_lock_speed = 0.0
if CP.spFlags & ToyotaFlagsSP.SP_AUTO_BRAKE_HOLD:
self.brake_hold_active: bool = False
self._brake_hold_counter: int = 0
self._brake_hold_reset: bool = False
self._prev_brake_pressed: bool = False
self._auto_lock_once = False
self._gear_prev = GearShifter.park
@@ -168,6 +175,9 @@ class CarController(CarControllerBase):
self.last_standstill = CS.out.standstill
if self.CP.spFlags & ToyotaFlagsSP.SP_AUTO_BRAKE_HOLD:
can_sends.extend(self.create_auto_brake_hold_messages(CS))
# handle UI messages
fcw_alert = hud_control.visualAlert == VisualAlert.fcw
steer_alert = hud_control.visualAlert in (VisualAlert.steerRequired, VisualAlert.ldw)
@@ -286,3 +296,25 @@ class CarController(CarControllerBase):
# print("bsm poll right")
return can_sends
# auto brake hold (https://github.com/AlexandreSato/)
def create_auto_brake_hold_messages(self, CS: car.CarState, brake_hold_allowed_timer: int = 100):
can_sends = []
disallowed_gears = [GearShifter.park, GearShifter.reverse]
brake_hold_allowed = CS.out.standstill and CS.out.cruiseState.available and not CS.out.gasPressed and \
not CS.out.cruiseState.enabled and (CS.out.gearShifter not in disallowed_gears)
if brake_hold_allowed:
self._brake_hold_counter += 1
self.brake_hold_active = self._brake_hold_counter > brake_hold_allowed_timer and not self._brake_hold_reset
self._brake_hold_reset = not self._prev_brake_pressed and CS.out.brakePressed and not self._brake_hold_reset
else:
self._brake_hold_counter = 0
self.brake_hold_active = False
self._brake_hold_reset = False
self._prev_brake_pressed = CS.out.brakePressed
if self.frame % 2 == 0:
can_sends.append(toyotacan.create_brake_hold_command(self.packer, self.frame, CS.pre_collision_2, self.brake_hold_active))
return can_sends
+9
View File
@@ -79,6 +79,9 @@ class CarState(CarStateBase):
self._right_blindspot_d2 = 0
self._right_blindspot_counter = 0
if CP.spFlags & ToyotaFlagsSP.SP_AUTO_BRAKE_HOLD:
self.pre_collision_2 = {}
self.frame = 0
def update(self, cp, cp_cam):
@@ -260,6 +263,9 @@ class CarState(CarStateBase):
if self.CP.spFlags & ToyotaFlagsSP.SP_ENHANCED_BSM and self.frame > 199:
ret.leftBlindspot, ret.rightBlindspot = self.sp_get_enhanced_bsm(cp)
if self.CP.spFlags & ToyotaFlagsSP.SP_AUTO_BRAKE_HOLD:
self.pre_collision_2 = copy.copy(cp_cam.vl["PRE_COLLISION_2"])
self._update_traffic_signals(cp_cam)
ret.cruiseState.speedLimit = self._calculate_speed_limit()
self.frame += 1
@@ -463,4 +469,7 @@ class CarState(CarStateBase):
("PCS_HUD", 1),
]
if CP.spFlags & ToyotaFlagsSP.SP_AUTO_BRAKE_HOLD:
messages.append(("PRE_COLLISION_2", 33))
return CANParser(DBC[CP.carFingerprint]["pt"], messages, 2)
+12 -7
View File
@@ -160,26 +160,23 @@ class CarInterface(CarInterfaceBase):
sp_tss2_long_tune = Params().get_bool("ToyotaTSS2Long")
# hand tuned (July 1, 2024)
# hand tuned (August 12, 2024)
def custom_tss2_longitudinal_tuning():
ret.vEgoStopping = 0.01
ret.vEgoStarting = 0.01
ret.stoppingDecelRate = 0.35
ret.stoppingDecelRate = 0.007
def default_tss2_longitudinal_tuning():
ret.vEgoStopping = 0.25
ret.vEgoStarting = 0.25
ret.stoppingDecelRate = 0.3 # reach stopping target smoothly
def default_longitudinal_tuning():
tune.kiBP = [0., 5., 35.]
tune.kiV = [3.6, 2.4, 1.5]
tune = ret.longitudinalTuning
if candidate in TSS2_CAR or ret.enableGasInterceptorDEPRECATED:
if sp_tss2_long_tune:
tune.kiBP = [0., 5., 12., 20., 27., 36., 50]
tune.kiV = [0.35, 0.23, 0.20, 0.17, 0.10, 0.07, 0.01]
tune.kiBP = [ 0., 5., 12., 20., 27., 40.]
tune.kiV = [.35, .228, .205, .195, .10, .01]
custom_tss2_longitudinal_tuning()
else:
tune.kpV = [0.0]
@@ -195,6 +192,9 @@ class CarInterface(CarInterfaceBase):
if candidate == CAR.TOYOTA_PRIUS_TSS2:
ret.spFlags |= ToyotaFlagsSP.SP_NEED_DEBUG_BSM.value
if Params().get_bool("ToyotaAutoHold") and candidate in (TSS2_CAR - RADAR_ACC_CAR):
ret.spFlags |= ToyotaFlagsSP.SP_AUTO_BRAKE_HOLD.value
return ret
@staticmethod
@@ -268,6 +268,11 @@ class CarInterface(CarInterfaceBase):
# while in standstill, send a user alert
events.add(EventName.manualRestart)
# auto brake hold
if self.CP.spFlags & ToyotaFlagsSP.SP_AUTO_BRAKE_HOLD:
if self.CC.brake_hold_active and not ret.brakeHoldActive:
events.add(EventName.spAutoBrakeHold)
ret.events = events.to_msg()
return ret
+34
View File
@@ -130,3 +130,37 @@ def create_set_bsm_debug_mode(lr_blindspot, enabled):
def create_bsm_polling_status(lr_blindspot):
return make_can_msg(0x750, lr_blindspot + b"\x02\x21\x69\x00\x00\x00\x00", 0)
# auto brake hold
def create_brake_hold_command(packer, frame, pre_collision_2, brake_hold_active):
# forward PRE_COLLISION_2 when auto brake hold is not active
values = {s: pre_collision_2[s] for s in [
"DSS1GDRV",
"DS1STAT2",
"DS1STBK2",
"PCSWAR",
"PCSALM",
"PCSOPR",
"PCSABK",
"PBATRGR",
"PPTRGR",
"IBTRGR",
"CLEXTRGR",
"IRLT_REQ",
"BRKHLD",
"AVSTRGR",
"VGRSTRGR",
"PREFILL",
"PBRTRGR",
"PCSDIS",
"PBPREPMP",
]}
if brake_hold_active:
values = {
"DSS1GDRV": 0x3FF,
"PBRTRGR": frame % 730 < 727, # cut actuation for 3 frames
}
return packer.make_can_msg("PRE_COLLISION_2", 0, values)
+2 -1
View File
@@ -16,7 +16,7 @@ PEDAL_TRANSITION = 10. * CV.MPH_TO_MS
class CarControllerParams:
ACCEL_MAX = 1.5 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
ACCEL_MAX = 2.0 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
ACCEL_MIN = -3.5 # m/s2
STEER_STEP = 1
@@ -64,6 +64,7 @@ class ToyotaFlagsSP(IntFlag):
SP_ZSS = 1
SP_ENHANCED_BSM = 2
SP_NEED_DEBUG_BSM = 4
SP_AUTO_BRAKE_HOLD = 8
class Footnote(Enum):
+51 -5
View File
@@ -174,10 +174,13 @@ class Controls:
self.live_torque = self.params.get_bool("LiveTorque")
self.torqued_override = self.params.get_bool("TorquedOverride")
self.custom_stock_planner_speed = self.params.get_bool("CustomStockLongPlanner")
self.enable_mads = self.params.get_bool("EnableMads")
self.mads_disengage_lateral_on_brake = self.params.get_bool("DisengageLateralOnBrake")
self.mads_ndlob = self.enable_mads and not self.mads_disengage_lateral_on_brake
self.pcm_v_cruise_override = self.params.get_bool("PCMVCruiseOverride")
self.pcm_v_cruise_override_speed = int(self.params.get("PCMVCruiseOverrideSpeed", encoding="utf-8"))
self.process_not_running = False
self.experimental_mode_update = False
@@ -186,6 +189,12 @@ class Controls:
self.custom_model_metadata.capabilities & ModelCapabilities.LateralPlannerSolution
self.dynamic_personality = self.params.get_bool("DynamicPersonality")
self.overtaking_accel = self.params.get_bool("OvertakingAccelerationAssist")
self.overtaking_accel_engaged = False
self.prev_overtaking_accel_engaged = False
self.overtaking_accel_allowed = False
self.prev_overtaking_accel_allowed = False
self.overtaking_accel_blocked = False
self.accel_personality = self.read_accel_personality_param()
@@ -490,7 +499,9 @@ class Controls:
def state_transition(self, CS):
"""Compute conditional state transitions and execute actions on state transitions"""
self.v_cruise_helper.update_v_cruise(CS, self.enabled_long, self.is_metric, self.reverse_acc_change, self.sm['longitudinalPlanSP'])
# sp - PCM speed override
sp_override_speed = self.pcm_v_cruise_override_speed if self.pcm_v_cruise_override else False
self.v_cruise_helper.update_v_cruise(CS, self.enabled_long, self.is_metric, self.reverse_acc_change, sp_override_speed, self.sm['longitudinalPlanSP'])
# decrement the soft disable timer at every step, as it's reset on
# entrance in SOFT_DISABLING state
@@ -639,9 +650,15 @@ class Controls:
self.LoC.reset()
if not self.joystick_mode:
speeds = long_plan.speeds
a_lead = self.sm['radarState'].leadOne.aLeadK
resume = False
if len(speeds):
resume = self.enabled_long and CS.standstill and self.CP.carName == "hyundai" and speeds[-1] > 0.1 and a_lead > 0.1
# accel PID loop
pid_accel_limits = self.CI.get_pid_accel_limits(self.CP, CS.vEgo, self.v_cruise_helper.v_cruise_kph * CV.KPH_TO_MS)
actuators.accel = self.LoC.update(CC.longActive, CS, long_plan.aTarget, long_plan.shouldStop, pid_accel_limits)
actuators.accel = self.LoC.update(CC.longActive, CS, long_plan.aTarget, long_plan.shouldStop, pid_accel_limits, resume)
# Steering PID loop and lateral MPC
if self.model_use_lateral_planner:
@@ -817,11 +834,36 @@ class Controls:
# Curvature & Steering angle
lp = self.sm['liveParameters']
lp_mono_time_svs = 'lateralPlanDEPRECATED' if self.model_use_lateral_planner else 'modelV2'
dh = 'lateralPlanDEPRECATED' if self.model_use_lateral_planner else 'modelV2'
steer_angle_without_offset = math.radians(CS.steeringAngleDeg - lp.angleOffsetDeg)
curvature = -self.VM.calc_curvature(steer_angle_without_offset, CS.vEgo, lp.roll)
lat_plan = self.sm['lateralPlanDEPRECATED']
long_plan = self.sm['longitudinalPlan']
dm_state = self.sm['driverMonitoringState']
blinker_svs = lat_plan if self.model_use_lateral_planner else model_v2.meta
self.prev_overtaking_accel_allowed = self.overtaking_accel_allowed
if not self.overtaking_accel_allowed and not self.prev_overtaking_accel_allowed:
self.overtaking_accel_blocked = False
self.overtaking_accel_allowed = ((blinker_svs.laneChangeDirection == LaneChangeDirection.right and dm_state.isRHD) or
(blinker_svs.laneChangeDirection == LaneChangeDirection.left and not dm_state.isRHD)) and \
(blinker_svs.laneChangeState in (LaneChangeState.preLaneChange, LaneChangeState.laneChangeStarting)) and \
not self.overtaking_accel_blocked
self.prev_overtaking_accel_engaged = self.overtaking_accel_engaged
ttc = self.sm['radarState'].leadOne.dRel / CS.vEgo if CS.vEgo > 0 else 255
overtaking_accel_engaged = self.overtaking_accel and self.overtaking_accel_allowed and \
(CS.vEgo > ((60 * CV.KPH_TO_MS) if self.is_metric else (40 * CV.MPH_TO_MS))) and \
not (CS.leftBlinker and CS.rightBlinker)
if ttc < 0.75 and self.prev_overtaking_accel_engaged and overtaking_accel_engaged:
overtaking_accel_engaged = False
self.overtaking_accel_blocked = True
if overtaking_accel_engaged and not self.prev_overtaking_accel_engaged and \
long_plan.hasLead and long_plan.aTarget > -0.1 and (0.75 < ttc < 3.0):
self.overtaking_accel_engaged = True
elif not overtaking_accel_engaged:
self.overtaking_accel_engaged = False
# controlsState
dat = messaging.new_message('controlsState')
dat.valid = CS.canValid
@@ -836,7 +878,7 @@ class Controls:
controlsState.alertSound = current_alert.audible_alert
controlsState.longitudinalPlanMonoTime = self.sm.logMonoTime['longitudinalPlan']
controlsState.lateralPlanMonoTime = self.sm.logMonoTime[lp_mono_time_svs]
controlsState.lateralPlanMonoTime = self.sm.logMonoTime[dh]
controlsState.enabled = not (CS.brakePressed and (not self.CS_prev.brakePressed or not CS.standstill)) and (self.enabled or CS.cruiseState.enabled) and CS.gearShifter not in [GearShifter.park, GearShifter.reverse]
controlsState.active = not (CS.brakePressed and (not self.CS_prev.brakePressed or not CS.standstill)) and (self.active or CS.cruiseState.enabled)
controlsState.curvature = curvature
@@ -874,6 +916,7 @@ class Controls:
controlsStateSP.personality = self.personality
controlsStateSP.dynamicPersonality = self.dynamic_personality
controlsStateSP.accelPersonality = self.accel_personality
controlsStateSP.overtakingAccelerationAssist = self.overtaking_accel_engaged
if self.enable_nnff and lat_tuning == 'torque':
controlsStateSP.lateralControlState.torqueState = self.LaC.pid_long_sp
@@ -931,7 +974,8 @@ class Controls:
def params_thread(self, evt):
while not evt.is_set():
self.is_metric = self.params.get_bool("IsMetric")
self.experimental_mode = self.params.get_bool("ExperimentalMode") and self.CP.openpilotLongitudinalControl
self.experimental_mode = self.params.get_bool("ExperimentalMode") and (self.CP.openpilotLongitudinalControl or
(not self.CP.pcmCruiseSpeed and self.custom_stock_planner_speed))
self.personality = self.read_personality_param()
self.dynamic_personality = self.params.get_bool("DynamicPersonality")
self.accel_personality = self.read_accel_personality_param()
@@ -940,9 +984,11 @@ class Controls:
self.reverse_acc_change = self.params.get_bool("ReverseAccChange")
self.dynamic_experimental_control = self.params.get_bool("DynamicExperimentalControl")
self.overtaking_accel = self.params.get_bool("OvertakingAccelerationAssist")
if self.sm.frame % int(2.5 / DT_CTRL) == 0:
self.live_torque = self.params.get_bool("LiveTorque")
self.custom_stock_planner_speed = self.params.get_bool("CustomStockLongPlanner")
time.sleep(0.1)
def controlsd_thread(self):
+39 -5
View File
@@ -65,6 +65,10 @@ VOLKSWAGEN_V_CRUISE_MIN = {
True: 30,
False: int(20 * CV.MPH_TO_KPH),
}
GM_V_CRUISE_MIN = {
True: 30,
False: int(20 * CV.MPH_TO_KPH),
}
SpeedLimitControlState = custom.LongitudinalPlanSP.SpeedLimitControlState
@@ -84,12 +88,20 @@ class VCruiseHelper:
self.slc_state_prev = SpeedLimitControlState.inactive
self.slc_speed_limit_offsetted = 0
# sp: PCM speed override
self.sp_override_v_cruise_kph = V_CRUISE_UNSET
self.sp_override_cruise_speed_last = V_CRUISE_UNSET
self.sp_override_enabled_last = False
self.experimental_mode_update = False
@property
def v_cruise_initialized(self):
return self.v_cruise_kph != V_CRUISE_UNSET
def update_v_cruise(self, CS, enabled, is_metric, reverse_acc, long_plan_sp):
def update_v_cruise(self, CS, enabled, is_metric, reverse_acc, sp_override_speed, long_plan_sp):
self.v_cruise_kph_last = self.v_cruise_kph
self.slc_state_prev = self.slc_state
self.slc_state = long_plan_sp.speedLimitControlState
if not self.CP.pcmCruiseSpeed:
@@ -102,12 +114,32 @@ class VCruiseHelper:
self._update_v_cruise_slc(long_plan_sp)
self.v_cruise_cluster_kph = self.v_cruise_kph
else:
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
self.v_cruise_cluster_kph = CS.cruiseState.speedCluster * CV.MS_TO_KPH
if enabled and sp_override_speed and CS.cruiseState.speed * CV.MS_TO_KPH < sp_override_speed:
if self.sp_override_v_cruise_kph == V_CRUISE_UNSET:
self.sp_override_v_cruise_kph = max(CS.vEgo * CV.MS_TO_KPH, V_CRUISE_MIN)
else:
self.sp_override_v_cruise_kph = V_CRUISE_UNSET
# when we have an override_speed, use it
if self.sp_override_v_cruise_kph != V_CRUISE_UNSET:
self.v_cruise_kph = self.sp_override_v_cruise_kph
self.v_cruise_cluster_kph = self.sp_override_v_cruise_kph
else:
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
self.v_cruise_cluster_kph = CS.cruiseState.speedCluster * CV.MS_TO_KPH
#print("sp_override_v_cruise_kph:", self.sp_override_v_cruise_kph)
#print("v_cruise_kph:", self.v_cruise_kph)
#print("v_cruise_cluster_kph:", self.v_cruise_cluster_kph)
self.sp_override_cruise_speed_last = CS.cruiseState.speed
self.sp_override_enabled_last = enabled
self.update_button_timers(CS, enabled)
else:
self.sp_override_v_cruise_kph = V_CRUISE_UNSET
self.v_cruise_kph = V_CRUISE_UNSET
self.v_cruise_cluster_kph = V_CRUISE_UNSET
self.experimental_mode_update = False
def _update_v_cruise_non_pcm(self, CS, enabled, is_metric, reverse_acc):
# handle button presses. TODO: this should be in state_control, but a decelCruise press
@@ -202,6 +234,8 @@ class VCruiseHelper:
initial = MAZDA_V_CRUISE_MIN[is_metric]
elif self.CP.carName == "volkswagen":
initial = VOLKSWAGEN_V_CRUISE_MIN[is_metric]
elif self.CP.carName == "gm":
initial = GM_V_CRUISE_MIN[is_metric]
# 250kph or above probably means we never had a set speed
if any(b.type in resume_buttons for b in CS.buttonEvents) and self.v_cruise_kph_last < 250:
@@ -220,8 +254,6 @@ class VCruiseHelper:
if self.slc_state == SpeedLimitControlState.active and self.slc_state_prev == SpeedLimitControlState.preActive:
self.v_cruise_kph = clip(round(self.slc_speed_limit_offsetted, 1), self.v_cruise_min, V_CRUISE_MAX)
self.slc_state_prev = self.slc_state
def _update_v_cruise_min(self, is_metric):
if is_metric != self.is_metric_prev:
if self.CP.carName == "honda":
@@ -234,6 +266,8 @@ class VCruiseHelper:
self.v_cruise_min = MAZDA_V_CRUISE_MIN[is_metric]
elif self.CP.carName == "volkswagen":
self.v_cruise_min = VOLKSWAGEN_V_CRUISE_MIN[is_metric]
elif self.CP.carName == "gm":
self.v_cruise_min = GM_V_CRUISE_MIN[is_metric]
self.is_metric_prev = is_metric
+8
View File
@@ -744,6 +744,14 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
ET.NO_ENTRY: NoEntryAlert("Brake Hold Active"),
},
EventName.spAutoBrakeHold: {
ET.PERMANENT: Alert(
"sunnypilot Brake Hold Active",
"",
AlertStatus.normal, AlertSize.small,
Priority.LOWEST, VisualAlert.none, AudibleAlert.prompt, 0.),
},
EventName.parkBrake: {
ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
ET.NO_ENTRY: NoEntryAlert("Parking Brake Engaged"),
+14 -3
View File
@@ -83,7 +83,8 @@ class LatControlTorque(LatControl):
self.torqued_override = self.param_s.get_bool("TorquedOverride")
self._frame = 0
self.use_lateral_jerk = False # TODO: make this a parameter in the UI
self.use_lateral_jerk = self.param_s.get_bool("TorqueLateralJerk") # TODO: make this a parameter in the UI
self.nnff_no_lateral_jerk = self.param_s.get_bool("NNFFNoLateralJerk") # TODO: make this a parameter in the UI
# Twilsonco's Lateral Neural Network Feedforward
self.use_nn = CI.has_lateral_torque_nn
@@ -140,11 +141,13 @@ class LatControlTorque(LatControl):
if self._frame % 250 == 0:
self._frame = 0
self.torqued_override = self.param_s.get_bool("TorquedOverride")
self.use_lateral_jerk = self.param_s.get_bool("TorqueLateralJerk")
self.nnff_no_lateral_jerk = self.param_s.get_bool("NNFFNoLateralJerk")
if not self.torqued_override:
return
self.torque_params.latAccelFactor = float(self.param_s.get("TorqueMaxLatAccel", encoding="utf8")) * 0.01
self.torque_params.friction = float(self.param_s.get("TorqueFriction", encoding="utf8")) * 0.01
self.torque_params.friction = float(self.param_s.get("TorqueFriction", encoding="utf8")) * 0.001
@property
def pid_long_sp(self):
@@ -197,7 +200,7 @@ class LatControlTorque(LatControl):
predicted_lateral_jerk = get_predicted_lateral_jerk(model_data.acceleration.y, self.t_diffs)
desired_lateral_jerk = (interp(self.desired_lat_jerk_time, ModelConstants.T_IDXS, model_data.acceleration.y) - desired_lateral_accel) / self.desired_lat_jerk_time
lookahead_lateral_jerk = get_lookahead_value(predicted_lateral_jerk[LAT_PLAN_MIN_IDX:friction_upper_idx], desired_lateral_jerk)
if self.use_steering_angle or lookahead_lateral_jerk == 0.0:
if self.nnff_no_lateral_jerk or self.use_steering_angle or lookahead_lateral_jerk == 0.0:
lookahead_lateral_jerk = 0.0
actual_lateral_jerk = 0.0
self.lat_accel_friction_factor = 1.0
@@ -206,6 +209,7 @@ class LatControlTorque(LatControl):
if self.use_nn and model_good:
# update past data
pitch = 0
roll = params.roll
if len(llk.calibratedOrientationNED.value) > 1:
pitch = self.pitch.update(llk.calibratedOrientationNED.value[1])
@@ -231,7 +235,14 @@ class LatControlTorque(LatControl):
+ past_rolls + future_rolls
torque_from_setpoint = self.torque_from_nn(nnff_setpoint_input)
torque_from_measurement = self.torque_from_nn(nnff_measurement_input)
pid_log.error = torque_from_setpoint - torque_from_measurement
error_blend_factor = interp(abs(desired_lateral_accel), [1.0, 2.0], [0.0, 1.0])
if error_blend_factor > 0.0: # blend in stronger error response when in high lat accel
nnff_error_input = [CS.vEgo, setpoint - measurement, lateral_jerk_setpoint - lateral_jerk_measurement, 0.0]
torque_from_error = self.torque_from_nn(nnff_error_input)
if sign(pid_log.error) == sign(torque_from_error) and abs(pid_log.error) < abs(torque_from_error):
pid_log.error = pid_log.error * (1.0 - error_blend_factor) + torque_from_error * error_blend_factor
# compute feedforward (same as nn setpoint output)
error = setpoint - measurement
+5 -5
View File
@@ -11,11 +11,11 @@ LongCtrlState = car.CarControl.Actuators.LongControlState
def long_control_state_trans(CP, active, long_control_state, v_ego,
should_stop, brake_pressed, cruise_standstill):
should_stop, brake_pressed, cruise_standstill, resume):
# Ignore cruise standstill if car has a gas interceptor
cruise_standstill = cruise_standstill and not CP.enableGasInterceptorDEPRECATED
stopping_condition = should_stop
starting_condition = (not should_stop and
stopping_condition = should_stop and not resume
starting_condition = ((not should_stop or resume) and
not cruise_standstill and
not brake_pressed)
started_condition = v_ego > CP.vEgoStarting
@@ -58,14 +58,14 @@ class LongControl:
def reset(self):
self.pid.reset()
def update(self, active, CS, a_target, should_stop, accel_limits):
def update(self, active, CS, a_target, should_stop, accel_limits, resume):
"""Update longitudinal control. This updates the state machine and runs a PID loop"""
self.pid.neg_limit = accel_limits[0]
self.pid.pos_limit = accel_limits[1]
self.long_control_state = long_control_state_trans(self.CP, active, self.long_control_state, CS.vEgo,
should_stop, CS.brakePressed,
CS.cruiseState.standstill)
CS.cruiseState.standstill, resume)
if self.long_control_state == LongCtrlState.off:
self.reset()
output_accel = 0.
@@ -4,6 +4,7 @@ import time
import numpy as np
from cereal import custom
from openpilot.common.numpy_fast import clip
from openpilot.common.conversions import Conversions as CV
from openpilot.common.realtime import DT_MDL
from openpilot.common.swaglog import cloudlog
# WARNING: imports outside of constants will not trigger a rebuild
@@ -63,9 +64,11 @@ def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard):
elif personality==custom.LongitudinalPersonalitySP.standard:
return 1.0
elif personality==custom.LongitudinalPersonalitySP.moderate:
return 0.8
return 0.95
elif personality==custom.LongitudinalPersonalitySP.aggressive:
return 0.6
return 0.9
elif personality==custom.LongitudinalPersonalitySP.overtake:
return 0.1
else:
raise NotImplementedError("Longitudinal personality not supported")
@@ -79,32 +82,47 @@ def get_T_FOLLOW(personality=custom.LongitudinalPersonalitySP.standard):
return 1.25
elif personality==custom.LongitudinalPersonalitySP.aggressive:
return 1.0
elif personality==custom.LongitudinalPersonalitySP.overtake:
return 0.25
else:
raise NotImplementedError("Longitudinal personality not supported")
def get_dynamic_personality(v_ego, personality=custom.LongitudinalPersonalitySP.standard):
if personality==custom.LongitudinalPersonalitySP.relaxed:
x_vel = [0, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01]
y_dist = [1.5, 1.5, 1.5, 1.6, 1.76, 1.76, 1.78, 1.78, 1.8, 1.8]
x_vel = [0, 5., 5.01, 20., 27.7]
y_dist = [1.0, 1.0, 1.75, 1.75, 1.83]
elif personality==custom.LongitudinalPersonalitySP.standard:
x_vel = [0, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01]
y_dist = [1.40, 1.40, 1.40, 1.50, 1.60, 1.76, 1.76, 1.78, 1.8, 1.8]
x_vel = [0, 20., 27.7]
y_dist = [1.70, 1.70, 1.70]
elif personality==custom.LongitudinalPersonalitySP.moderate:
x_vel = [0, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01]
y_dist = [1.3, 1.3, 1.3, 1.35, 1.35, 1.385, 1.385, 1.4, 1.4, 1.45]
x_vel = [0, 27.69, 27.7]
y_dist = [1.40, 1.40, 1.45]
elif personality==custom.LongitudinalPersonalitySP.aggressive:
x_vel = [0, 5, 5.01, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01]
y_dist = [1.12, 1.12, 1.12, 1.12, 1.12, 1.105, 1.105, 1.15, 1.15, 1.18, 1.20, 1.23]
x_vel = [0, 5., 20.0, 20.01, 27.69, 27.7]
y_dist = [0.80, 1.10, 1.10, 1.12, 1.12, 1.20]
else:
raise NotImplementedError("Dynamic personality not supported")
return np.interp(v_ego, x_vel, y_dist)
def get_stopped_equivalence_factor(v_lead):
return (v_lead**2) / (2 * COMFORT_BRAKE)
def get_stopped_equivalence_factor_krkeegen(v_lead, v_ego):
# KRKeegan this offset rapidly decreases the following distance when the lead pulls
# away, resulting in an early demand for acceleration.
v_diff_offset = 0
v_diff_offset_max = 12
speed_to_reach_max_v_diff_offset = 26 # in kp/h
speed_to_reach_max_v_diff_offset = speed_to_reach_max_v_diff_offset * CV.KPH_TO_MS
delta_speed = v_lead - v_ego
if np.all(delta_speed > 0):
v_diff_offset = delta_speed * 2
v_diff_offset = np.clip(v_diff_offset, 0, v_diff_offset_max)
# increase in a linear behavior
v_diff_offset = np.maximum(v_diff_offset * ((speed_to_reach_max_v_diff_offset - v_ego)/speed_to_reach_max_v_diff_offset), 0)
return (v_lead**2) / (2 * COMFORT_BRAKE) + v_diff_offset
def get_safe_obstacle_distance(v_ego, t_follow):
return (v_ego**2) / (2 * COMFORT_BRAKE) + t_follow * v_ego + STOP_DISTANCE
@@ -299,15 +317,24 @@ class LongitudinalMpc:
for i in range(N):
self.solver.cost_set(i, 'Zl', Zl)
def set_weights(self, prev_accel_constraint=True, personality=custom.LongitudinalPersonalitySP.standard):
def set_weights(self, prev_accel_constraint=True, personality=custom.LongitudinalPersonalitySP.standard, v_lead0=0, v_lead1=0):
jerk_factor = get_jerk_factor(personality)
v_ego = self.x0[1]
v_ego_bps = [0, 10]
# KRKeegan adjustments to improve sluggish acceleration
# do not apply to deceleration
j_ego_v_ego = 1
a_change_v_ego = 1
if (v_lead0 - v_ego >= 0) and (v_lead1 - v_ego >= 0):
j_ego_v_ego = np.interp(v_ego, v_ego_bps, [.05, 1.])
a_change_v_ego = np.interp(v_ego, v_ego_bps, [.05, 1.])
if self.mode == 'acc':
a_change_cost = A_CHANGE_COST if prev_accel_constraint else 0
cost_weights = [X_EGO_OBSTACLE_COST, X_EGO_COST, V_EGO_COST, A_EGO_COST, jerk_factor * a_change_cost, jerk_factor * J_EGO_COST]
cost_weights = [X_EGO_OBSTACLE_COST, X_EGO_COST, V_EGO_COST, A_EGO_COST, jerk_factor * a_change_cost * a_change_v_ego, jerk_factor * J_EGO_COST * j_ego_v_ego]
constraint_cost_weights = [LIMIT_COST, LIMIT_COST, LIMIT_COST, DANGER_ZONE_COST]
elif self.mode == 'blended':
a_change_cost = 40.0 if prev_accel_constraint else 0
cost_weights = [0., 0.1, 0.2, 5.0, a_change_cost, 1.0]
cost_weights = [0., 0.1, 0.2, 5.0, a_change_cost * a_change_v_ego, 1.0]
constraint_cost_weights = [LIMIT_COST, LIMIT_COST, LIMIT_COST, 50.0]
else:
raise NotImplementedError(f'Planner mode {self.mode} not recognized in planner cost set')
@@ -358,9 +385,11 @@ class LongitudinalMpc:
self.cruise_min_a = min_a
self.max_a = max_a
def update(self, radarstate, v_cruise, x, v, a, j, personality=custom.LongitudinalPersonalitySP.standard, dynamic_personality=False):
def update(self, radarstate, v_cruise, x, v, a, j, personality=custom.LongitudinalPersonalitySP.standard,
dynamic_personality=False, overtaking_acceleration_assist=False, fast_take_off = False):
v_ego = self.x0[1]
t_follow = get_dynamic_personality(v_ego, personality) if dynamic_personality else get_T_FOLLOW(personality)
t_follow = get_T_FOLLOW(custom.LongitudinalPersonalitySP.overtake) if overtaking_acceleration_assist else t_follow
self.status = radarstate.leadOne.status or radarstate.leadTwo.status
lead_xv_0 = self.process_lead(radarstate.leadOne)
@@ -369,8 +398,12 @@ class LongitudinalMpc:
# To estimate a safe distance from a moving lead, we calculate how much stopping
# distance that lead needs as a minimum. We can add that to the current distance
# and then treat that as a stopped car/obstacle at this new distance.
lead_0_obstacle = lead_xv_0[:,0] + get_stopped_equivalence_factor(lead_xv_0[:,1])
lead_1_obstacle = lead_xv_1[:,0] + get_stopped_equivalence_factor(lead_xv_1[:,1])
if fast_take_off:
lead_0_obstacle = lead_xv_0[:,0] + get_stopped_equivalence_factor_krkeegen(lead_xv_0[:,1], v_ego)
lead_1_obstacle = lead_xv_1[:,0] + get_stopped_equivalence_factor_krkeegen(lead_xv_1[:,1], v_ego)
else:
lead_0_obstacle = lead_xv_0[:,0] + get_stopped_equivalence_factor(lead_xv_0[:,1])
lead_1_obstacle = lead_xv_1[:,0] + get_stopped_equivalence_factor(lead_xv_1[:,1])
cruise_target_e2ex = T_IDXS * np.clip(v_cruise, v_ego - 2.0, 1e3) + x[0]
e2e_xforward = ((v[1:] + v[:-1]) / 2) * (T_IDXS[1:] - T_IDXS[:-1])
+19 -7
View File
@@ -3,7 +3,7 @@ import math
import numpy as np
from openpilot.common.numpy_fast import clip, interp
from openpilot.common.params import Params
from cereal import car
from cereal import car, log, custom
import cereal.messaging as messaging
from openpilot.common.conversions import Conversions as CV
@@ -12,6 +12,7 @@ from openpilot.common.realtime import DT_MDL
from openpilot.selfdrive.modeld.constants import ModelConstants
from openpilot.selfdrive.controls.lib.sunnypilot.common import Source
from openpilot.selfdrive.controls.lib.sunnypilot.speed_limit_controller import SpeedLimitController
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags
from openpilot.selfdrive.car.interfaces import ACCEL_MIN, ACCEL_MAX
from openpilot.selfdrive.controls.lib.longcontrol import LongCtrlState
from openpilot.selfdrive.controls.lib.longitudinal_mpc_lib.long_mpc import LongitudinalMpc
@@ -35,6 +36,7 @@ _A_TOTAL_MAX_V = [1.7, 3.2]
_A_TOTAL_MAX_BP = [20., 40.]
MpcSource = custom.MpcSource
EventName = car.CarEvent.EventName
@@ -82,7 +84,8 @@ class LongitudinalPlanner:
self.dt = dt
self.a_desired = init_a
self.v_desired_filter = FirstOrderFilter(init_v, 2.0, self.dt)
v_ego_sec = 0.6 if CP.carName == "hyundai" and not CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV) else 2.0
self.v_desired_filter = FirstOrderFilter(init_v, v_ego_sec, self.dt)
self.v_model_error = 0.0
self.v_desired_trajectory = np.zeros(CONTROL_N)
@@ -100,6 +103,7 @@ class LongitudinalPlanner:
self.turn_speed_controller = TurnSpeedController()
self.dynamic_experimental_controller = DynamicExperimentalController()
self.accel_controller = AccelController()
self.fast_take_off = False
def read_param(self):
try:
@@ -107,6 +111,7 @@ class LongitudinalPlanner:
except AttributeError:
self.dynamic_experimental_controller = DynamicExperimentalController()
self.accel_controller = AccelController()
self.fast_take_off = self.params.get_bool("FastTakeOff")
@staticmethod
def parse_model(model_msg, model_error):
@@ -129,10 +134,13 @@ class LongitudinalPlanner:
self.read_param()
self.param_read_counter += 1
if self.dynamic_experimental_controller.is_enabled() and sm['controlsState'].experimentalMode:
self.mpc.mode = self.dynamic_experimental_controller.get_mpc_mode(self.CP.radarUnavailable, sm['carState'], sm['radarState'].leadOne, sm['modelV2'], sm['controlsState'], sm['navInstruction'].maneuverDistance)
self.dynamic_experimental_controller.set_mpc_fcw_crash_cnt(self.mpc.crash_cnt)
self.dynamic_experimental_controller.update(self.CP.radarUnavailable, sm['carState'], sm['radarState'].leadOne, sm['modelV2'], sm['controlsState'], sm['navInstruction'].maneuverDistance)
self.mpc.mode = self.dynamic_experimental_controller.get_mpc_mode()
else:
self.mpc.mode = 'blended' if sm['controlsState'].experimentalMode else 'acc'
v_ego = sm['carState'].vEgo
v_cruise_kph = min(sm['controlsState'].vCruise, V_CRUISE_MAX)
v_cruise = v_cruise_kph * CV.KPH_TO_MS
@@ -153,8 +161,10 @@ class LongitudinalPlanner:
accel_limits = [ACCEL_MIN, ACCEL_MAX]
accel_limits_turns = [ACCEL_MIN, ACCEL_MAX]
overtaking_accel_engaged = sm['controlsStateSP'].overtakingAccelerationAssist
# override accel using Accel Controller
if self.accel_controller.is_enabled(accel_personality=sm['controlsStateSP'].accelPersonality):
if self.accel_controller.is_enabled(accel_personality=custom.AccelerationPersonality.sport if overtaking_accel_engaged else
sm['controlsStateSP'].accelPersonality):
# get min, max from accel controller
min_limit, max_limit = self.accel_controller.get_accel_limits(v_ego, accel_limits)
if self.mpc.mode == 'acc':
@@ -189,11 +199,12 @@ class LongitudinalPlanner:
accel_limits_turns[0] = min(accel_limits_turns[0], self.a_desired + 0.05)
accel_limits_turns[1] = max(accel_limits_turns[1], self.a_desired - 0.05)
self.mpc.set_weights(prev_accel_constraint, personality=sm['controlsStateSP'].personality)
self.mpc.set_weights(prev_accel_constraint, personality=custom.LongitudinalPersonalitySP.overtake if overtaking_accel_engaged else sm['controlsStateSP'].personality)
self.mpc.set_accel_limits(accel_limits_turns[0], accel_limits_turns[1])
self.mpc.set_cur_state(self.v_desired_filter.x, self.a_desired)
x, v, a, j = self.parse_model(sm['modelV2'], self.v_model_error)
self.mpc.update(sm['radarState'], v_cruise, x, v, a, j, personality=sm['controlsStateSP'].personality, dynamic_personality=sm['controlsStateSP'].dynamicPersonality)
self.mpc.update(sm['radarState'], v_cruise, x, v, a, j, personality=sm['controlsStateSP'].personality,
dynamic_personality=sm['controlsStateSP'].dynamicPersonality, overtaking_acceleration_assist=overtaking_accel_engaged, fast_take_off=self.fast_take_off)
self.v_desired_trajectory = np.interp(CONTROL_N_T_IDX, T_IDXS_MPC, self.mpc.v_solution)
self.a_desired_trajectory = np.interp(CONTROL_N_T_IDX, T_IDXS_MPC, self.mpc.a_solution)
@@ -262,7 +273,8 @@ class LongitudinalPlanner:
longitudinalPlanSP.turnSpeedControlState = self.turn_speed_controller.state
longitudinalPlanSP.turnSpeed = float(self.turn_speed_controller.v_target)
longitudinalPlanSP.e2eBlended = self.mpc.mode
longitudinalPlanSP.mpcSource = MpcSource.blended if self.mpc.mode == 'blended' else MpcSource.acc
longitudinalPlanSP.dynamicExperimentalControl = self.dynamic_experimental_controller.is_enabled()
pm.send('longitudinalPlanSP', plan_sp_send)
@@ -21,23 +21,24 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# Last updated: July 1, 2024
# Last updated: August 12, 2024
from cereal import custom
from openpilot.common.numpy_fast import interp
AccelPersonality = custom.AccelerationPersonality
# accel personality by @arne182 modified by cgw
_DP_CRUISE_MIN_V = [-1.03, -0.79, -0.77, -0.77, -0.75, -0.75, -0.88, -0.82]
_DP_CRUISE_MIN_V_ECO = [-1.02, -0.78, -0.75, -0.75, -0.73, -0.73, -0.80, -0.80]
_DP_CRUISE_MIN_V_SPORT = [-1.04, -0.81, -0.79, -0.79, -0.77, -0.77, -0.90, -0.84]
_DP_CRUISE_MIN_BP = [0., 0.05, 0.1, 0.5, 8.33, 16., 30., 40.]
# accel personality by @arne182 modified by cgw and kumar
_DP_CRUISE_MIN_V = [-0.69, -0.69, -0.69, -0.69, -0.69, -0.69, -0.79, -0.79, -0.79, -0.79, -1.0, -1.0]
_DP_CRUISE_MIN_V_ECO = [-0.68, -0.68, -0.68, -0.68, -0.68, -0.68, -0.78, -0.78, -0.88, -0.88, -1.0, -1.0]
_DP_CRUISE_MIN_V_SPORT = [-0.70, -0.70, -0.70, -0.70, -0.70, -0.70, -0.80, -0.80, -0.90, -0.90, -1.0, -1.0]
_DP_CRUISE_MIN_BP = [0., 3.0, 3.01, 10., 10.01, 14., 14.01, 18., 18.01, 22., 22.01, 30.]
_DP_CRUISE_MAX_V = [2.0, 2.0, 2.0, 1.80, 1.11, .70, .54, .38, .17]
_DP_CRUISE_MAX_V_ECO = [2.0, 2.0, 2.0, 1.60, 0.90, .53, .43, .32, .09]
_DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 2.0, 2.00, 1.40, .90, .70, .50, .30]
_DP_CRUISE_MAX_BP = [0., 4., 6., 8., 11., 20., 25., 30., 40.]
_DP_CRUISE_MAX_V = [2.5, 2.5, 2.5, 1.70, 1.05, .81, .625, .42, .348, .12]
_DP_CRUISE_MAX_V_ECO = [2.0, 2.0, 2.0, 1.4, .80, .68, .53, .32, .20, .085]
_DP_CRUISE_MAX_V_SPORT = [3.5, 3.5, 2.8, 2.4, 1.4, 1.0, .89, .75, .50, .2]
_DP_CRUISE_MAX_BP = [0., 1., 6., 8., 11., 15., 20., 25., 30., 55.]
class AccelController:
@@ -21,33 +21,39 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# Version = 2024-1-29
# Version = 2024-7-11
from common.numpy_fast import interp
from openpilot.selfdrive.controls.lib.lateral_planner import TRAJECTORY_SIZE
import numpy as np
LEAD_WINDOW_SIZE = 5
# d-e2e, from modeldata.h
TRAJECTORY_SIZE = 33
LEAD_WINDOW_SIZE = 4
LEAD_PROB = 0.6
SLOW_DOWN_WINDOW_SIZE = 5
SLOW_DOWN_PROB = 0.6
SLOW_DOWN_BP = [0., 10., 20., 30., 40., 50., 55., 60.]
SLOW_DOWN_DIST = [20, 30., 50., 70., 80., 90., 105., 120.]
SLOWNESS_WINDOW_SIZE = 20
SLOWNESS_PROB = 0.6
SLOWNESS_WINDOW_SIZE = 12
SLOWNESS_PROB = 0.5
SLOWNESS_CRUISE_OFFSET = 1.05
DANGEROUS_TTC_WINDOW_SIZE = 5
DANGEROUS_TTC = 2.0
DANGEROUS_TTC_WINDOW_SIZE = 3
DANGEROUS_TTC = 2.3
HIGHWAY_CRUISE_KPH = 75
HIGHWAY_CRUISE_KPH = 70
STOP_AND_GO_FRAME = 60
SET_MODE_TIMEOUT = 10
MPC_FCW_WINDOW_SIZE = 5
MPC_FCW_PROB = 0.6
MPC_FCW_WINDOW_SIZE = 10
MPC_FCW_PROB = 0.5
V_ACC_MIN = 9.72
class SNG_State:
@@ -77,29 +83,51 @@ class GenericMovingAverageCalculator:
self.data = []
self.total = 0
class WeightedMovingAverageCalculator:
def __init__(self, window_size):
self.window_size = window_size
self.data = []
self.weights = np.linspace(1, 2, window_size) # Linear weights, adjust as needed
def add_data(self, value):
if len(self.data) == self.window_size:
self.data.pop(0)
self.data.append(value)
def get_weighted_average(self):
if len(self.data) == 0:
return None
weighted_sum = np.dot(self.data, self.weights[-len(self.data):])
weight_total = np.sum(self.weights[-len(self.data):])
return weighted_sum / weight_total
def reset_data(self):
self.data = []
class DynamicExperimentalController:
def __init__(self):
self._is_enabled = False
self._mode = 'acc'
self._mode_prev = 'acc'
self._mode_changed = False
self._frame = 0
self._lead_gmac = GenericMovingAverageCalculator(window_size=LEAD_WINDOW_SIZE)
# Use weighted moving average for filtering leads
self._lead_gmac = WeightedMovingAverageCalculator(window_size=LEAD_WINDOW_SIZE)
self._has_lead_filtered = False
self._has_lead_filtered_prev = False
self._slow_down_gmac = GenericMovingAverageCalculator(window_size=SLOW_DOWN_WINDOW_SIZE)
self._slow_down_gmac = WeightedMovingAverageCalculator(window_size=SLOW_DOWN_WINDOW_SIZE)
self._has_slow_down = False
self._has_blinkers = False
self._slowness_gmac = GenericMovingAverageCalculator(window_size=SLOWNESS_WINDOW_SIZE)
self._slowness_gmac = WeightedMovingAverageCalculator(window_size=SLOWNESS_WINDOW_SIZE)
self._has_slowness = False
self._has_nav_instruction = False
self._dangerous_ttc_gmac = GenericMovingAverageCalculator(window_size=DANGEROUS_TTC_WINDOW_SIZE)
self._dangerous_ttc_gmac = WeightedMovingAverageCalculator(window_size=DANGEROUS_TTC_WINDOW_SIZE)
self._has_dangerous_ttc = False
self._v_ego_kph = 0.
@@ -113,13 +141,46 @@ class DynamicExperimentalController:
self._sng_transit_frame = 0
self._sng_state = SNG_State.off
self._mpc_fcw_gmac = GenericMovingAverageCalculator(window_size=MPC_FCW_WINDOW_SIZE)
self._mpc_fcw_gmac = WeightedMovingAverageCalculator(window_size=MPC_FCW_WINDOW_SIZE)
self._has_mpc_fcw = False
self._mpc_fcw_crash_cnt = 0
self._set_mode_timeout = 0
pass
def _adaptive_slowdown_threshold(self):
"""
Adapts the slow down threshold based on vehicle speed and recent behavior.
"""
return interp(self._v_ego_kph, SLOW_DOWN_BP, SLOW_DOWN_DIST) * (1.0 + 0.05 * np.log(1 + len(self._slow_down_gmac.data)))
def _anomaly_detection(self, recent_data, threshold=2.0):
"""
Basic anomaly detection using standard deviation.
"""
if len(recent_data) < 3:
return False
mean = np.mean(recent_data)
std_dev = np.std(recent_data)
anomaly = recent_data[-1] > mean + threshold * std_dev
return anomaly
def _smoothed_lead_detection(self, lead_prob, smoothing_factor=0.2):
"""
Smoothing the lead detection to avoid erratic behavior.
"""
self._has_lead_filtered = (1 - smoothing_factor) * self._has_lead_filtered + smoothing_factor * lead_prob
return self._has_lead_filtered > LEAD_PROB
def _adaptive_lead_prob_threshold(self):
"""
Adapts lead probability threshold based on driving conditions.
"""
if self._v_ego_kph > HIGHWAY_CRUISE_KPH:
return LEAD_PROB + 0.1 # Increase the threshold on highways
return LEAD_PROB
def _update(self, car_state, lead_one, md, controls_state, maneuver_distance):
self._v_ego_kph = car_state.vEgo * 3.6
self._v_cruise_kph = controls_state.vCruise
@@ -128,18 +189,27 @@ class DynamicExperimentalController:
# fcw detection
self._mpc_fcw_gmac.add_data(self._mpc_fcw_crash_cnt > 0)
self._has_mpc_fcw = self._mpc_fcw_gmac.get_moving_average() >= MPC_FCW_PROB
self._has_mpc_fcw = self._mpc_fcw_gmac.get_weighted_average() > MPC_FCW_PROB
# nav enable detection
self._has_nav_instruction = md.navEnabledDEPRECATED and maneuver_distance / max(car_state.vEgo, 1) < 13
# lead detection
# lead detection with smoothing
self._lead_gmac.add_data(lead_one.status)
self._has_lead_filtered = self._lead_gmac.get_moving_average() >= LEAD_PROB
self._has_lead_filtered = self._lead_gmac.get_weighted_average() > LEAD_PROB
#lead_prob = self._lead_gmac.get_weighted_average() or 0
#self._has_lead_filtered = self._smoothed_lead_detection(lead_prob)
# slow down detection
self._slow_down_gmac.add_data(len(md.orientation.x) == len(md.position.x) == TRAJECTORY_SIZE and md.position.x[TRAJECTORY_SIZE - 1] < interp(self._v_ego_kph, SLOW_DOWN_BP, SLOW_DOWN_DIST))
self._has_slow_down = self._slow_down_gmac.get_moving_average() >= SLOW_DOWN_PROB
# adaptive slow down detection
adaptive_threshold = self._adaptive_slowdown_threshold()
slow_down_trigger = len(md.orientation.x) == len(md.position.x) == TRAJECTORY_SIZE and md.position.x[TRAJECTORY_SIZE - 1] < adaptive_threshold
self._slow_down_gmac.add_data(slow_down_trigger)
self._has_slow_down = self._slow_down_gmac.get_weighted_average() > SLOW_DOWN_PROB
# anomaly detection for slow down events
if self._anomaly_detection(self._slow_down_gmac.data):
# Handle anomaly: potentially log it, adjust behavior, or issue a warning
self._has_slow_down = False # Reset slow down if anomaly detected
# blinker detection
self._has_blinkers = car_state.leftBlinker or car_state.rightBlinker
@@ -161,7 +231,7 @@ class DynamicExperimentalController:
# slowness detection
if not self._has_standstill:
self._slowness_gmac.add_data(self._v_ego_kph <= (self._v_cruise_kph*SLOWNESS_CRUISE_OFFSET))
self._has_slowness = self._slowness_gmac.get_moving_average() >= SLOWNESS_PROB
self._has_slowness = self._slowness_gmac.get_weighted_average() > SLOWNESS_PROB
# dangerous TTC detection
if not self._has_lead_filtered and self._has_lead_filtered_prev:
@@ -171,14 +241,14 @@ class DynamicExperimentalController:
if self._has_lead and car_state.vEgo >= 0.01:
self._dangerous_ttc_gmac.add_data(lead_one.dRel/car_state.vEgo)
self._has_dangerous_ttc = self._dangerous_ttc_gmac.get_moving_average() is not None and self._dangerous_ttc_gmac.get_moving_average() <= DANGEROUS_TTC
self._has_dangerous_ttc = self._dangerous_ttc_gmac.get_weighted_average() is not None and self._dangerous_ttc_gmac.get_weighted_average() <= DANGEROUS_TTC
# keep prev values
self._has_standstill_prev = self._has_standstill
self._has_lead_filtered_prev = self._has_lead_filtered
self._frame += 1
def _blended_priority_mode(self):
def _radarless_mode(self):
# when mpc fcw crash prob is high
# use blended to slow down quickly
if self._has_mpc_fcw:
@@ -190,21 +260,21 @@ class DynamicExperimentalController:
self._set_mode('blended')
return
# when blinker is on and speed is driving below highway cruise speed: blended
# when blinker is on and speed is driving below V_ACC_MIN: blended
# we dont want it to switch mode at higher speed, blended may trigger hard brake
if self._has_blinkers and self._v_ego_kph < HIGHWAY_CRUISE_KPH:
self._set_mode('blended')
return
#if self._has_blinkers and self._v_ego_kph < V_ACC_MIN:
# self._set_mode('blended')
# return
# when at highway cruise and SNG: blended
# ensuring blended mode is used because acc is bad at catching SNG lead car
# especially those who accel very fast and then brake very hard.
if self._sng_state == SNG_State.going and self._v_cruise_kph >= HIGHWAY_CRUISE_KPH:
self._set_mode('blended')
return
#if self._sng_state == SNG_State.going and self._v_cruise_kph >= V_ACC_MIN:
# self._set_mode('blended')
# return
# when standstill: blended
# in case of lead car suddenly move away under traffic light, acc mode wont brake at traffic light.
# in case of lead car suddenly move away under traffic light, acc mode won't brake at traffic light.
if self._has_standstill:
self._set_mode('blended')
return
@@ -226,9 +296,9 @@ class DynamicExperimentalController:
self._set_mode('acc')
return
self._set_mode('blended')
self._set_mode('acc')
def _acc_priority_mode(self):
def _radar_mode(self):
# when mpc fcw crash prob is high
# use blended to slow down quickly
if self._has_mpc_fcw:
@@ -236,18 +306,18 @@ class DynamicExperimentalController:
return
# If there is a filtered lead, the vehicle is not in standstill, and the lead vehicle's yRel meets the condition,
#if self._has_lead_filtered and not self._has_standstill:
# self._set_mode('acc')
# return
# when blinker is on and speed is driving below highway cruise speed: blended
# we dont want it to switch mode at higher speed, blended may trigger hard brake
if self._has_blinkers and self._v_ego_kph < HIGHWAY_CRUISE_KPH:
self._set_mode('blended')
if self._has_lead_filtered and not self._has_standstill:
self._set_mode('acc')
return
# when blinker is on and speed is driving below V_ACC_MIN: blended
# we dont want it to switch mode at higher speed, blended may trigger hard brake
#if self._has_blinkers and self._v_ego_kph < V_ACC_MIN:
# self._set_mode('blended')
# return
# when standstill: blended
# in case of lead car suddenly move away under traffic light, acc mode wont brake at traffic light.
# in case of lead car suddenly move away under traffic light, acc mode won't brake at traffic light.
if self._has_standstill:
self._set_mode('blended')
return
@@ -270,17 +340,22 @@ class DynamicExperimentalController:
self._set_mode('acc')
def get_mpc_mode(self, radar_unavailable, car_state, lead_one, md, controls_state, maneuver_distance):
def update(self, radar_unavailable, car_state, lead_one, md, controls_state, maneuver_distance):
if self._is_enabled:
self._update(car_state, lead_one, md, controls_state, maneuver_distance)
if radar_unavailable:
self._blended_priority_mode()
self._radarless_mode()
else:
self._acc_priority_mode()
self._radar_mode()
self._mode_changed = self._mode != self._mode_prev
self._mode_prev = self._mode
def get_mpc_mode(self):
return self._mode
def has_changed(self):
return self._mode_changed
def set_enabled(self, enabled):
self._is_enabled = enabled
+1 -1
View File
@@ -32,7 +32,7 @@ def plannerd_thread():
pm = messaging.PubMaster(['longitudinalPlan', 'longitudinalPlanSP'] + lateral_planner_svs)
sm = messaging.SubMaster(['carControl', 'carState', 'controlsState', 'radarState', 'modelV2',
'longitudinalPlan', 'navInstruction', 'longitudinalPlanSP',
'liveMapDataSP', 'e2eLongStateSP', 'controlsStateSP'] + lateral_planner_svs,
'liveMapDataSP', 'e2eLongStateSP', 'controlsStateSP', 'driverMonitoringState'] + lateral_planner_svs,
poll='modelV2', ignore_avg_freq=['radarState'])
while True:
+1 -1
View File
@@ -83,7 +83,7 @@ class TorqueEstimator(ParameterEstimator):
params = Params()
if params.get_bool("EnforceTorqueLateral"):
if params.get_bool("CustomTorqueLateral"):
self.offline_friction = float(params.get("TorqueFriction", encoding="utf8")) * 0.01
self.offline_friction = float(params.get("TorqueFriction", encoding="utf8")) * 0.001
self.offline_latAccelFactor = float(params.get("TorqueMaxLatAccel", encoding="utf8")) * 0.01
if params.get_bool("LiveTorqueRelaxed"):
self.min_bucket_points = np.array([0, 200, 300, 500, 500, 300, 200, 0]) / (10 if decimated else 1)
+1 -1
View File
@@ -145,4 +145,4 @@ void HttpRequest::requestFinished() {
QNetworkAccessManager *HttpRequest::nam() {
static QNetworkAccessManager *networkAccessManager = new QNetworkAccessManager(qApp);
return networkAccessManager;
}
}
+2 -2
View File
@@ -24,7 +24,7 @@ class HttpRequest : public QObject {
Q_OBJECT
public:
enum class Method {GET, DELETE, POST, PUT};
enum class Method { GET, DELETE, POST, PUT };
explicit HttpRequest(QObject* parent, bool create_jwt = true, int timeout = 20000);
virtual void sendRequest(const QString &requestURL, Method method);
@@ -47,4 +47,4 @@ protected:
protected slots:
void requestTimeout();
void requestFinished();
};
};
+2 -1
View File
@@ -86,7 +86,8 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) {
}
void HomeWindow::mouseDoubleClickEvent(QMouseEvent* e) {
HomeWindow::mousePressEvent(e);
// By removing the static call to HomeWindow::mousePressEvent, we can now rely on child classes to handle the event
mousePressEvent(e);
const SubMaster &sm = *(uiState()->sm);
if (sm["carParams"].getCarParams().getNotCar()) {
if (onroad->isVisible()) {
+2 -2
View File
@@ -47,7 +47,7 @@ protected:
void mouseDoubleClickEvent(QMouseEvent* e) override;
Sidebar *sidebar;
OffroadHome *home;
OffroadHome* home;
OnroadWindow *onroad;
BodyWindow *body;
DriverViewWindow *driver_view;
@@ -55,4 +55,4 @@ protected:
protected slots:
virtual void updateState(const UIState &s);
};
};
+1 -1
View File
@@ -16,7 +16,7 @@
#include "selfdrive/ui/qt/widgets/ssh_keys.h"
#ifdef SUNNYPILOT
#include "selfdrive/ui/sunnypilot/sunnypilot_main.h"
#endif
#endif
TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
RETURN_IF_SUNNYPILOT
+1
View File
@@ -91,6 +91,7 @@ protected:
virtual void updateToggles();
};
class SoftwarePanel : public ListWidget {
Q_OBJECT
public:
+3 -3
View File
@@ -26,7 +26,7 @@
void SoftwarePanel::checkForUpdates() {
std::system("pkill -SIGUSR1 -f system.updated.updated");
std::system("pkill -SIGUSR1 -f updated");
}
SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) {
@@ -45,7 +45,7 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) {
if (downloadBtn->text() == tr("CHECK")) {
checkForUpdates();
} else {
std::system("pkill -SIGHUP -f system.updated.updated");
std::system("pkill -SIGHUP -f updated");
}
});
addItem(downloadBtn);
@@ -162,4 +162,4 @@ void SoftwarePanel::updateLabels() {
installBtn->setDescription(QString::fromStdString(params.get("UpdaterNewReleaseNotes")));
update();
}
}
+1
View File
@@ -2,6 +2,7 @@
#include <QHBoxLayout>
#include <QMouseEvent>
#include <QVBoxLayout>
#include "selfdrive/ui/qt/offroad/experimental_mode.h"
#include "selfdrive/ui/qt/util.h"
+7
View File
@@ -1,12 +1,19 @@
#pragma once
#include <QFrame>
#include <QLabel>
#include <QPushButton>
#include <QStackedLayout>
#include <QStackedWidget>
#include <QTimer>
#include <QWidget>
#include "common/params.h"
#include "selfdrive/ui/qt/offroad/driverview.h"
#include "selfdrive/ui/qt/body.h"
#include "selfdrive/ui/qt/onroad/onroad_home.h"
#include "selfdrive/ui/qt/widgets/offroad_alerts.h"
#include "selfdrive/ui/ui.h"
#ifdef SUNNYPILOT
#include "selfdrive/ui/sunnypilot/qt/widgets/controls.h"
+1 -1
View File
@@ -385,4 +385,4 @@ void AnnotatedCameraWidget::showEvent(QShowEvent *event) {
ui_update_params(uiState());
prev_draw_t = millis_since_boot();
}
}
+1 -1
View File
@@ -50,4 +50,4 @@ protected:
double prev_draw_t = 0;
FirstOrderFilter fps_filter;
};
};
+2 -1
View File
@@ -26,7 +26,8 @@ ExperimentalButton::ExperimentalButton(QWidget *parent) : experimental_mode(fals
void ExperimentalButton::changeMode() {
const auto cp = (*uiState()->sm)["carParams"].getCarParams();
bool can_change = hasLongitudinalControl(cp) && params.getBool("ExperimentalModeConfirmed");
bool can_change = (hasLongitudinalControl(cp) || (!cp.getPcmCruiseSpeed() && params.getBool("CustomStockLongPlanner")))
&& params.getBool("ExperimentalModeConfirmed");
if (can_change) {
params.putBool("ExperimentalMode", !experimental_mode);
}
+1 -1
View File
@@ -31,4 +31,4 @@ private:
QPixmap experimental_img;
};
void drawIcon(QPainter &p, const QPoint &center, const QPixmap &img, const QBrush &bg, float opacity);
void drawIcon(QPainter &p, const QPoint &center, const QPixmap &img, const QBrush &bg, float opacity);
+1 -1
View File
@@ -66,4 +66,4 @@ void OnroadWindow::offroadTransition(bool offroad) {
void OnroadWindow::paintEvent(QPaintEvent *event) {
QPainter p(this);
p.fillRect(rect(), QColor(bg.red(), bg.green(), bg.blue(), 255));
}
}
+1 -1
View File
@@ -26,4 +26,4 @@ protected:
protected slots:
virtual void offroadTransition(bool offroad);
virtual void updateState(const UIState &s);
};
};
+1 -1
View File
@@ -20,4 +20,4 @@ private:
Params params;
QTimer *timer;
QString prevResp;
};
};
+1 -1
View File
@@ -65,4 +65,4 @@ protected:
private:
std::unique_ptr<PubMaster> pm;
};
};
+1 -1
View File
@@ -61,4 +61,4 @@ int main(int argc, char *argv[]) {
)");
return a.exec();
}
}
+1 -1
View File
@@ -59,4 +59,4 @@ private:
QFileSystemWatcher *watcher;
QHash<QString, QString> params_hash;
Params params;
};
};
+1 -1
View File
@@ -35,4 +35,4 @@ private:
void refresh();
void getUserKeys(const QString &username);
};
};
+1 -1
View File
@@ -30,7 +30,7 @@ sp_maps_widgets_src = [
]
sp_qt_util = [
# "#selfdrive/ui/sunnypilot/qt/api.cc",
# "#selfdrive/ui/sunnypilot/qt/api.cc",
"#selfdrive/ui/sunnypilot/qt/util.cc",
]
+1
View File
@@ -33,6 +33,7 @@ Last updated: July 29, 2024
#include <QApplication>
#include <QJsonDocument>
#include <memory>
#include <string>
#include <common/swaglog.h>
+5
View File
@@ -26,6 +26,11 @@ Last updated: July 29, 2024
#pragma once
#include <QJsonObject>
#include <QNetworkReply>
#include <QString>
#include <QTimer>
#include "selfdrive/ui/qt/api.h"
#include "selfdrive/ui/sunnypilot/qt/util.h"
#include "common/util.h"
+3
View File
@@ -28,10 +28,13 @@ Last updated: July 29, 2024
#include <QHBoxLayout>
#include <QMouseEvent>
#include <QStackedWidget>
#include <QVBoxLayout>
#include <common/swaglog.h>
#include "selfdrive/ui/qt/offroad/experimental_mode.h"
#include "selfdrive/ui/qt/util.h"
#include "selfdrive/ui/qt/widgets/prime.h"
// HomeWindowSP: the container for the offroad and onroad UIs
HomeWindowSP::HomeWindowSP(QWidget* parent) : HomeWindow(parent){
+6
View File
@@ -27,9 +27,14 @@ Last updated: July 29, 2024
#pragma once
#include <QFrame>
#include <QLabel>
#include <QPushButton>
#include <QStackedLayout>
#include <QTimer>
#include <QWidget>
#include "common/params.h"
#include "selfdrive/ui/qt/offroad/driverview.h"
#include "selfdrive/ui/qt/body.h"
#include "selfdrive/ui/qt/widgets/offroad_alerts.h"
#include "selfdrive/ui/sunnypilot/ui.h"
@@ -37,6 +42,7 @@ Last updated: July 29, 2024
#ifdef SUNNYPILOT
#include "selfdrive/ui/sunnypilot/qt/sidebar.h"
#include "selfdrive/ui/sunnypilot/qt/onroad/onroad_home.h"
#define OnroadWindow OnroadWindowSP
#else
#include "selfdrive/ui/qt/sidebar.h"
@@ -30,6 +30,7 @@ Last updated: July 29, 2024
#include <vector>
#include <QFileInfo>
#include "common/watchdog.h"
#include "selfdrive/ui/qt/qt_window.h"
#include "selfdrive/ui/qt/widgets/prime.h"
@@ -28,9 +28,11 @@ Last updated: July 29, 2024
#include <map>
#include <string>
#include <tuple>
#include <vector>
#include "selfdrive/ui/sunnypilot/qt/widgets/controls.h"
#include "selfdrive/ui/sunnypilot/qt/widgets/scrollview.h"
class MonitoringPanel : public QFrame {
Q_OBJECT
@@ -57,6 +57,12 @@ TogglesPanelSP::TogglesPanelSP(SettingsWindow *parent) : TogglesPanel(parent) {
tr("When enabled, sunnypilot will attempt to control stock longitudinal control with ACC button presses.\nThis feature must be used along with SLC, and/or V-TSC, and/or M-TSC."),
"../assets/offroad/icon_blank.png",
},
{
"CustomStockLongPlanner",
tr("Use Planner Speed"),
"",
"../assets/offroad/icon_blank.png",
},
{
"ExperimentalMode",
tr("Experimental Mode"),
@@ -223,6 +229,7 @@ void TogglesPanelSP::updateToggles() {
auto custom_stock_long_toggle = toggles["CustomStockLong"];
auto dec_toggle = toggles["DynamicExperimentalControl"];
auto dynamic_personality_toggle = toggles["DynamicPersonality"];
auto custom_stock_long_planner = toggles["CustomStockLongPlanner"];
const QString e2e_description = QString("%1<br>"
"<h4>%2</h4><br>"
"%3<br>"
@@ -261,16 +268,22 @@ void TogglesPanelSP::updateToggles() {
accel_personality_setting->setEnabled(true);
op_long_toggle->setEnabled(true);
custom_stock_long_toggle->setEnabled(false);
custom_stock_long_planner->setEnabled(false);
params.remove("CustomStockLong");
dec_toggle->setEnabled(true);
dynamic_personality_toggle->setEnabled(true);
} else if (custom_stock_long_toggle->isToggled()) {
op_long_toggle->setEnabled(false);
experimental_mode_toggle->setEnabled(false);
long_personality_setting->setEnabled(false);
accel_personality_setting->setEnabled(false);
experimental_mode_toggle->setEnabled(custom_stock_long_planner->isToggled());
experimental_mode_toggle->setDescription(e2e_description);
custom_stock_long_planner->setEnabled(true);
long_personality_setting->setEnabled(custom_stock_long_planner->isToggled());
accel_personality_setting->setEnabled(custom_stock_long_planner->isToggled());
dec_toggle->setEnabled(experimental_mode_toggle->isToggled());
if (!custom_stock_long_planner->isToggled()) {
params.remove("ExperimentalMode");
}
params.remove("ExperimentalLongitudinalEnabled");
params.remove("ExperimentalMode");
} else {
// no long for now
experimental_mode_toggle->setEnabled(false);
@@ -295,6 +308,7 @@ void TogglesPanelSP::updateToggles() {
custom_stock_long_toggle->setEnabled(CP.getCustomStockLongAvailable());
dec_toggle->setEnabled(false);
dynamic_personality_toggle->setEnabled(false);
custom_stock_long_planner->setEnabled(false);
params.remove("DynamicExperimentalControl");
params.remove("DynamicPersonality");
}
@@ -302,6 +316,7 @@ void TogglesPanelSP::updateToggles() {
experimental_mode_toggle->refresh();
op_long_toggle->refresh();
custom_stock_long_toggle->refresh();
custom_stock_long_planner->refresh();
dec_toggle->refresh();
dynamic_personality_toggle->refresh();
} else {
@@ -310,6 +325,7 @@ void TogglesPanelSP::updateToggles() {
custom_stock_long_toggle->setVisible(false);
dec_toggle->setVisible(false);
dynamic_personality_toggle->setVisible(false);
custom_stock_long_planner->setVisible(false);
}
}
@@ -43,12 +43,24 @@ SunnypilotPanel::SunnypilotPanel(QWidget *parent) : QFrame(parent) {
tr("Enable the beloved M.A.D.S. feature. Disable toggle to revert back to stock openpilot engagement/disengagement."),
"../assets/offroad/icon_blank.png",
},
{
"FastTakeOff",
tr("Very fast prius"),
tr("When prius goes faster then sunnys car :) vroom"),
"../assets/offroad/icon_blank.png",
},
{
"VisionCurveLaneless",
tr("Laneless for Curves in \"Auto\" Mode"),
tr("While in Auto Lane, switch to Laneless for current/future curves."),
"../assets/offroad/icon_blank.png",
},
{
"OvertakingAccelerationAssist",
tr("Overtaking Acceleration Assist"),
tr("Overtaking Acceleration Assist will operate when the turn signal indicator is turned on to the left (left-hand drive) or turned on to the right (right-hand drive) while openpilot Longitudinal Control is operating."),
"../assets/offroad/icon_blank.png",
},
{
"EnableSlc",
tr("Speed Limit Control (SLC)"),
@@ -91,12 +103,24 @@ SunnypilotPanel::SunnypilotPanel(QWidget *parent) : QFrame(parent) {
"",
"../assets/offroad/icon_blank.png",
},
{
"NNFFNoLateralJerk",
tr("NNLC: Remove Lateral Jerk Response (Alpha)"),
tr("When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response."),
"../assets/offroad/icon_blank.png",
},
{
"EnforceTorqueLateral",
tr("Enforce Torque Lateral Control"),
tr("Enable this to enforce sunnypilot to steer with Torque lateral control."),
"../assets/offroad/icon_blank.png",
},
{
"TorqueLateralJerk",
tr("Lateral Jerk with Torque Lateral Control (Alpha)"),
tr("Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection."),
"../assets/offroad/icon_blank.png",
},
{
"LiveTorque",
tr("Enable Self-Tune"),
@@ -298,7 +322,7 @@ SunnypilotPanel::SunnypilotPanel(QWidget *parent) : QFrame(parent) {
list->addItem(dlp_settings);
}
if (param == "VisionCurveLaneless") {
if (param == "OvertakingAccelerationAssist") {
list->addItem(laneChangeSettingsLayout);
list->addItem(horizontal_line());
@@ -345,6 +369,17 @@ SunnypilotPanel::SunnypilotPanel(QWidget *parent) : QFrame(parent) {
}
});
connect(toggles["EnforceTorqueLateral"], &ToggleControlSP::toggleFlipped, [=](bool state) {
if (state) {
toggles["NNFF"]->setEnabled(false);
params.putBool("NNFF", false);
toggles["NNFF"]->refresh();
} else {
toggles["NNFF"]->setEnabled(true);
toggles["NNFF"]->refresh();
}
});
// trigger updateToggles() when toggleFlipped
for (const auto& updateToggleName : updateTogglesNames) {
if (toggles.find(updateToggleName) != toggles.end()) {
@@ -366,6 +401,7 @@ SunnypilotPanel::SunnypilotPanel(QWidget *parent) : QFrame(parent) {
toggles["EnableMads"]->setConfirmation(true, false);
toggles["EndToEndLongAlertLight"]->setConfirmation(true, false);
toggles["CustomOffsets"]->showDescription();
toggles["OvertakingAccelerationAssist"]->setConfirmation(true, false);
connect(toggles["EnableMads"], &ToggleControlSP::toggleFlipped, mads_settings, &MadsSettings::updateToggles);
connect(toggles["EnableMads"], &ToggleControlSP::toggleFlipped, [=](bool state) {
@@ -470,6 +506,8 @@ void SunnypilotPanel::updateToggles() {
toggles["VisionCurveLaneless"]->setEnabled(dynamic_lane_profile_param == "2");
toggles["VisionCurveLaneless"]->refresh();
auto overtaking_acceleration_assist = toggles["OvertakingAccelerationAssist"];
bool custom_driving_model_valid = params.getBool("CustomDrivingModel");
auto driving_model_generation = QString::fromStdString(params.get("DrivingModelGeneration"));
bool model_use_lateral_planner = custom_driving_model_valid && driving_model_generation == "1";
@@ -549,6 +587,7 @@ void SunnypilotPanel::updateToggles() {
if (!slcSettings->isVisible() && enable_slc_param) {
slcSettings->setVisible(true);
}
overtaking_acceleration_assist->setEnabled(hasLongitudinalControl(CP));
} else {
v_tsc->setEnabled(false);
m_tsc->setEnabled(false);
@@ -556,18 +595,21 @@ void SunnypilotPanel::updateToggles() {
slc_toggle->setEnabled(false);
params.remove("EnableSlc");
slcSettings->setEnabled(false);
overtaking_acceleration_assist->setEnabled(false);
}
enforce_torque_lateral->refresh();
slc_toggle->refresh();
nnff_toggle->refresh();
m_tsc->refresh();
overtaking_acceleration_assist->refresh();
} else {
v_tsc->setEnabled(false);
m_tsc->setEnabled(false);
reverse_acc->setEnabled(false);
slc_toggle->setEnabled(false);
slcSettings->setEnabled(false);
overtaking_acceleration_assist->setEnabled(false);
nnff_toggle->setDescription(nnff_toggle->isToggled() ? nnffDescriptionBuilder(nnff_status_init) : nnff_description);
}
@@ -577,7 +619,7 @@ void SunnypilotPanel::updateToggles() {
}
// toggle names to update when EnforceTorqueLateral is flipped
std::vector<std::string> torqueLateralGroup{"CustomTorqueLateral", "LiveTorque", "LiveTorqueRelaxed", "TorquedOverride"};
std::vector<std::string> torqueLateralGroup{"CustomTorqueLateral", "TorqueLateralJerk", "LiveTorque", "LiveTorqueRelaxed", "TorquedOverride"};
for (const auto& torqueLateralToggle : torqueLateralGroup) {
if (toggles.find(torqueLateralToggle) != toggles.end()) {
if (nnff_toggle->isToggled()) {
@@ -594,6 +636,24 @@ void SunnypilotPanel::updateToggles() {
}
}
// toggle names to update when EnforceTorqueLateral is flipped
std::vector<std::string> nnffGroup{"NNFFNoLateralJerk"};
for (const auto& nnffToggle : nnffGroup) {
if (toggles.find(nnffToggle) != toggles.end()) {
if (enforce_torque_lateral->isToggled()) {
toggles[nnffToggle]->setVisible(false);
toggles[nnffToggle]->setEnabled(false);
}
}
}
for (const auto& nnffToggle : nnffGroup) {
if (toggles.find(nnffToggle) != toggles.end()) {
toggles[nnffToggle]->setVisible(nnff_toggle->isToggled());
toggles[nnffToggle]->setEnabled(nnff_toggle->isToggled());
}
}
if (enforce_torque_lateral->isToggled()) {
live_torque_relaxed->setVisible(live_torque->isToggled());
torqued_override->setVisible(custom_torque_lateral->isToggled());
@@ -622,13 +682,14 @@ TorqueFriction::TorqueFriction() : OptionControlSP(
tr("FRICTION"),
tr("Adjust Friction for the Torque Lateral Controller. <b>Live</b>: Override self-tune values; <b>Offline</b>: Override self-tune offline values at car restart."),
"../assets/offroad/icon_blank.png",
{0, 50}) {
{0, 500},
5) {
refresh();
}
void TorqueFriction::refresh() {
float torqueFrictionVal = QString::fromStdString(params.get("TorqueFriction")).toInt() * 0.01;
float torqueFrictionVal = QString::fromStdString(params.get("TorqueFriction")).toInt() * 0.001;
setTitle("FRICTION - " + (params.getBool("TorquedOverride") ? tr("Real-time and Offline") : tr("Offline Only")));
setLabel(QString::number(torqueFrictionVal));
}
@@ -29,6 +29,7 @@ Last updated: July 29, 2024
#include <map>
#include <string>
#include "common/model.h"
#include "selfdrive/ui/sunnypilot/ui.h"
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/custom_offsets_settings.h"
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/sunnypilot/lane_change_settings.h"
@@ -101,13 +101,14 @@ SPVehiclesTogglesPanel::SPVehiclesTogglesPanel(VehiclePanel *parent) : ListWidge
// Hyundai/Kia/Genesis
addItem(new LabelControlSP(tr("Hyundai/Kia/Genesis")));
auto hkgSmoothStop = new ParamControlSP(
"HkgSmoothStop",
tr("HKG CAN: Smoother Stopping Performance (Beta)"),
tr("Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control."),
"../assets/offroad/icon_blank.png");
hkgSmoothStop->setConfirmation(true, false);
addItem(hkgSmoothStop);
auto hkgCustomLongTuning = new ParamControlSP(
"HkgCustomLongTuning",
tr("HKG: Custom Tuning for New Longitudinal API"),
tr(""),
"../assets/offroad/icon_blank.png"
);
hkgCustomLongTuning->setConfirmation(true, false);
addItem(hkgCustomLongTuning);
hyundaiCruiseMainDefault = new ParamControlSP(
"HyundaiCruiseMainDefault",
@@ -158,6 +159,18 @@ SPVehiclesTogglesPanel::SPVehiclesTogglesPanel(VehiclePanel *parent) : ListWidge
toyotaTss2LongTune->setConfirmation(true, false);
addItem(toyotaTss2LongTune);
auto toyotaAbh = new ParamControlSP(
"ToyotaAutoHold",
tr("Enable Automatic Brake Hold (AHB)"),
QString("<b>%1</b><br><br>%2<br><br><b>%3</b>")
.arg(tr("WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK."))
.arg(tr("When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold."))
.arg(tr("Changing this setting takes effect when the car is powered off.")),
"../assets/offroad/icon_blank.png"
);
toyotaAbh->setConfirmation(true, false);
addItem(toyotaAbh);
toyotaEnhancedBsm = new ParamControlSP(
"ToyotaEnhancedBsm",
tr("Enable Enhanced Blind Spot Monitor"),
@@ -203,9 +216,10 @@ SPVehiclesTogglesPanel::SPVehiclesTogglesPanel(VehiclePanel *parent) : ListWidge
// trigger offroadTransition when going onroad/offroad
connect(uiStateSP(), &UIStateSP::offroadTransition, [=](bool offroad) {
is_onroad = !offroad;
hkgSmoothStop->setEnabled(offroad);
hkgCustomLongTuning->setEnabled(offroad);
hyundaiCruiseMainDefault->setEnabled(offroad);
toyotaTss2LongTune->setEnabled(offroad);
toyotaAbh->setEnabled(offroad);
toyotaEnhancedBsm->setEnabled(offroad);
toyotaSngHack->setEnabled(offroad);
volkswagenCCOnly->setEnabled(offroad);
@@ -28,8 +28,10 @@ Last updated: July 29, 2024
#include <QApplication>
#include "common/watchdog.h"
#include "selfdrive/ui/sunnypilot/ui.h"
#include "selfdrive/ui/sunnypilot/qt/widgets/controls.h"
#include "selfdrive/ui/sunnypilot/qt/widgets/scrollview.h"
class VehiclePanel : public QWidget {
Q_OBJECT
@@ -30,6 +30,7 @@ Last updated: July 29, 2024
#include "selfdrive/ui/qt/offroad/experimental_mode.h"
#include "selfdrive/ui/qt/widgets/prime.h"
#include <QStackedWidget>
#include "selfdrive/ui/sunnypilot/sunnypilot_main.h"
#ifdef ENABLE_MAPS
@@ -31,6 +31,7 @@ Last updated: July 29, 2024
#include "selfdrive/ui/qt/maps/map_settings.h"
#endif
class OffroadHomeSP : public OffroadHome {
Q_OBJECT
@@ -216,6 +216,7 @@ void AnnotatedCameraWidgetSP::updateState(const UIStateSP &s) {
latAccelFactorFiltered = ltp.getLatAccelFactorFiltered();
frictionCoefficientFiltered = ltp.getFrictionCoefficientFiltered();
liveValid = ltp.getLiveValid();
ecoMode = vEgo > 0 && car_state.getEngineRpm() == 0;
// ############################## DEV UI END ##############################
btnPerc = s.scene.sleep_btn_opacity * 0.05;
@@ -320,8 +321,8 @@ void AnnotatedCameraWidgetSP::updateState(const UIStateSP &s) {
// TODO: Add toggle variables to cereal, and parse from cereal
longitudinalPersonality = s.scene.longitudinal_personality;
dynamicLaneProfile = s.scene.dynamic_lane_profile;
mpcMode = QString::fromStdString(lp_sp.getE2eBlended());
mpcMode = (mpcMode == "blended") ? mpcMode.replace(0, 1, mpcMode[0].toUpper()) : mpcMode.toUpper();
const auto mpc_source = lp_sp.getMpcSource();
mpcSource = mpc_source == cereal::MpcSource::BLENDED ? QString(tr("blended")) : QString(tr("acc"));
static int reverse_delay = 0;
bool reverse_allowed = false;
@@ -523,10 +524,32 @@ void AnnotatedCameraWidgetSP::drawHud(QPainter &p) {
// current speed
if (!hideVEgoUi) {
// Set up the font for the speed text
p.setFont(InterFont(176, QFont::Bold));
drawColoredText(p, rect().center().x(), 210, speedStr, brakeLights ? QColor(0xff, 0, 0, 255) : QColor(0xff, 0xff, 0xff, 255));
// Define text coordinates
int centerX = rect().center().x();
int centerY = 210;
// Draw a red border if brakeLights is active
if (brakeLights) {
for (int offsetX = -6; offsetX <= 6; offsetX++) {
for (int offsetY = -6; offsetY <= 6; offsetY++) {
// Avoid drawing at the original text position
if (offsetX != 0 || offsetY != 0) {
drawColoredText(p, centerX + offsetX, centerY + offsetY, speedStr, QColor(255, 0, 0, 255)); // Red border
}
}
}
}
// Draw the main speed text: green if ecoMode is on, otherwise white
QColor speedTextColor = ecoMode ? QColor(0, 245, 0) : QColor(255, 255, 255, 255);
drawColoredText(p, centerX, centerY, speedStr, speedTextColor);
// Draw the speed unit below the main text
p.setFont(InterFont(66));
drawText(p, rect().center().x(), 290, speedUnit, 200);
drawText(p, centerX, 290, speedUnit, 200);
}
if (!reversing) {
@@ -1061,7 +1084,7 @@ void AnnotatedCameraWidgetSP::drawFeatureStatusText(QPainter &p, int x, int y) {
p.setBrush(dec_color);
p.drawEllipse(dec_btn);
QString dec_status_text;
dec_status_text.sprintf("DEC: %s\n", dynamicExperimentalControlToggle ? (experimentalMode ? QString(mpcMode).toStdString().c_str() : QString("Inactive").toStdString().c_str()) : "OFF");
dec_status_text.sprintf("DEC: %s\n", dynamicExperimentalControlToggle ? (experimentalMode ? QString(mpcSource).toStdString().c_str() : QString("Inactive").toStdString().c_str()) : "OFF");
p.setPen(QPen(shadow_color, 2));
p.drawText(x + drop_shadow_size, y + drop_shadow_size, dec_status_text);
p.setPen(QPen(text_color, 2));
@@ -1165,7 +1188,7 @@ void AnnotatedCameraWidgetSP::drawLaneLines(QPainter &painter, const UIStateSP *
}
// TODO: Fix empty spaces when curiving back on itself
painter.setBrush(QColor::fromRgbF(1.0, 0.0, 0.0, 0.2));
painter.setBrush(QColor::fromRgbF(1.0, 0.0, 0.0, 0.4));
if (left_blindspot) painter.drawPolygon(scene.lane_barrier_vertices[0]);
if (right_blindspot) painter.drawPolygon(scene.lane_barrier_vertices[1]);
@@ -1177,6 +1200,10 @@ void AnnotatedCameraWidgetSP::drawLaneLines(QPainter &painter, const UIStateSP *
// paint path
QLinearGradient bg(0, height(), 0, 0);
const auto long_plan_sp = sm["longitudinalPlanSP"].getLongitudinalPlanSP();
bool exp_mode_path = (long_plan_sp.getDynamicExperimentalControl() && long_plan_sp.getMpcSource() == cereal::MpcSource::BLENDED) ||
(!long_plan_sp.getDynamicExperimentalControl() && sm["controlsState"].getControlsState().getExperimentalMode());
if (madsEnabled || car_state.getCruiseState().getEnabled()) {
if (steerOverride && latActive) {
bg.setColorAt(0.0, QColor::fromHslF(20 / 360., 0.94, 0.51, 0.17));
@@ -1185,7 +1212,7 @@ void AnnotatedCameraWidgetSP::drawLaneLines(QPainter &painter, const UIStateSP *
} else if (!(latActive || car_state.getCruiseState().getEnabled())) {
bg.setColorAt(0, whiteColor());
bg.setColorAt(1, whiteColor(0));
} else if (sm["controlsState"].getControlsState().getExperimentalMode()) {
} else if (exp_mode_path) {
// The first half of track_vertices are the points for the right side of the path
const auto &acceleration = sm["modelV2"].getModelV2().getAcceleration().getX();
const int max_len = std::min<int>(scene.track_vertices.length() / 2, acceleration.size());
@@ -1286,46 +1313,25 @@ void AnnotatedCameraWidgetSP::drawDriverState(QPainter &painter, const UIStateSP
}
void AnnotatedCameraWidgetSP::rocketFuel(QPainter &p) {
UIState *s = uiState();
float accel = (*s->sm)["carControl"].getCarControl().getActuators().getAccel();
int widgetHeight = rect().height();
float halfHeightAbs = std::abs(accel) * widgetHeight / 2.0f;
const float scannerWidth = 15;
QRect scannerRect;
static const int ct_n = 1;
static float ct;
int rect_w = rect().width();
int rect_h = rect().height();
const int n = 15 + 1; //Add one off screen due to timing issues
static float t[n];
int dim_n = (sin(ct / 5) + 1) * (n - 0.01);
t[dim_n] = 1.0;
t[(int)(ct/ct_n)] = 1.0;
UIStateSP *s = uiStateSP();
float vc_accel0 = (*s->sm)["carState"].getCarState().getAEgo();
static float vc_accel;
vc_accel = vc_accel + (vc_accel0 - vc_accel) / 5;
float hha = 0;
if (vc_accel > 0) {
hha = 0.85 - 0.1 / vc_accel; // only extend up to 85%
if (accel > 0) {
p.setBrush(QColor(0, 245, 0, 200));
}
if (vc_accel < 0) {
hha = 0.85 + 0.1 / vc_accel; // only extend up to 85%
p.setBrush(QColor(245, 0, 0, 200));
}
if (hha < 0) {
hha = 0;
}
hha = hha * rect_h;
float wp = 28;
if (vc_accel > 0) {
QRect ra = QRect(rect_w - wp, rect_h / 2 - hha / 2, wp, hha / 2);
p.drawRect(ra);
scannerRect = QRect(0, widgetHeight / 2 - halfHeightAbs, scannerWidth, halfHeightAbs);
} else {
QRect ra = QRect(rect_w - wp, rect_h / 2, wp, hha / 2);
p.drawRect(ra);
p.setBrush(QColor(245, 0, 0, 200));
scannerRect = QRect(0, widgetHeight / 2, scannerWidth, halfHeightAbs);
}
p.drawRect(scannerRect);
}
void AnnotatedCameraWidgetSP::drawLead(QPainter &painter, const cereal::RadarState::LeadData::Reader &lead_data, const QPointF &vd,
int num, const cereal::CarState::Reader &car_data, int chevron_data) {
painter.save();
@@ -176,6 +176,7 @@ private:
float latAccelFactorFiltered;
float frictionCoefficientFiltered;
bool liveValid;
bool ecoMode;
// ############################## DEV UI END ##############################
float btnPerc;
@@ -192,7 +193,7 @@ private:
cereal::LongitudinalPlanSP::SpeedLimitControlState slcState;
int longitudinalPersonality;
int dynamicLaneProfile;
QString mpcMode;
QString mpcSource;
int speed_limit_frame;
bool slcShowSign = true;
@@ -26,6 +26,8 @@ Last updated: July 29, 2024
#include "selfdrive/ui/sunnypilot/qt/onroad/onroad_home.h"
#include <QPainter>
#include <QStackedLayout>
#ifdef ENABLE_MAPS
#include "selfdrive/ui/sunnypilot/qt/maps/map_helpers.h"
@@ -29,6 +29,9 @@ Last updated: July 29, 2024
#include "selfdrive/ui/qt/onroad/onroad_home.h"
#include "common/params.h"
#include "selfdrive/ui/qt/onroad/alerts.h"
// #include "selfdrive/ui/sunnypilot/qt/onroad/annotated_camera.h"
class OnroadWindowSP : public OnroadWindow {
Q_OBJECT
@@ -59,6 +62,7 @@ private:
void createMapWidget();
void createOnroadSettingsWidget();
void mousePressEvent(QMouseEvent* e) override;
// AnnotatedCameraWidgetSP *nvg;
QWidget *map = nullptr;
QWidget *onroad_settings = nullptr;
@@ -193,7 +193,7 @@ void OnroadSettings::changeDynamicPersonality() {
void OnroadSettings::changeDynamicExperimentalControl() {
UISceneSP &scene = uiStateSP()->scene;
const auto cp = (*uiStateSP()->sm)["carParams"].getCarParams();
bool can_change = hasLongitudinalControl(cp);
bool can_change = hasLongitudinalControl(cp) || (!cp.getPcmCruiseSpeed() && params.getBool("CustomStockLongPlanner"));
if (can_change) {
scene.dynamic_experimental_control = !scene.dynamic_experimental_control;
params.putBool("DynamicExperimentalControl", scene.dynamic_experimental_control);
@@ -26,6 +26,7 @@ Last updated: July 29, 2024
#include "selfdrive/ui/sunnypilot/qt/onroad/onroad_settings_panel.h"
#include <QHBoxLayout>
#include <QWidget>
#include "selfdrive/ui/sunnypilot/qt/onroad/onroad_settings.h"
+2
View File
@@ -34,6 +34,7 @@ Last updated: July 29, 2024
#include "selfdrive/ui/sunnypilot/qt/util.h"
#include "common/params.h"
SidebarSP::SidebarSP(QWidget *parent) : Sidebar(parent) {
// Because I know that stock sidebar makes this connection, I will disconnect it and connect it to the new updateState function
QObject::disconnect(uiState(), &UIState::uiUpdate, this, &Sidebar::updateState);
@@ -122,6 +123,7 @@ void SidebarSP::updateState(const UIStateSP &s) {
setProperty("sunnylinkStatus", QVariant::fromValue(sunnylinkStatus));
}
void SidebarSP::DrawSidebar(QPainter &p){
Sidebar::DrawSidebar(p);
// metrics
+2
View File
@@ -28,6 +28,8 @@ Last updated: July 29, 2024
#include <memory>
#include <QFrame>
#include <QMap>
#include "selfdrive/ui/qt/sidebar.h"
#include "selfdrive/ui/sunnypilot/ui.h"
+1
View File
@@ -25,6 +25,7 @@ Last updated: July 29, 2024
***/
#pragma once
#include "selfdrive/ui/ui.h"
const float DRIVING_PATH_WIDE = 0.9;
const float DRIVING_PATH_NARROW = 0.25;
@@ -31,6 +31,13 @@ Last updated: July 29, 2024
#include <string>
#include <vector>
#include <QButtonGroup>
#include <QFrame>
#include <QHBoxLayout>
#include <QLabel>
#include <QPainter>
#include <QPushButton>
#include "common/params.h"
#include "selfdrive/ui/qt/widgets/controls.h"
#include "selfdrive/ui/qt/widgets/input.h"
@@ -36,6 +36,7 @@ Last updated: July 29, 2024
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/software_settings.h"
#include "selfdrive/ui/sunnypilot/qt/offroad/settings/sunnylink_settings.h"
inline void ReplaceWidget(QWidget* old_widget, QWidget* new_widget) {
if (old_widget && old_widget->parentWidget() && old_widget->parentWidget()->layout()) {
old_widget->parentWidget()->layout()->replaceWidget(old_widget, new_widget);
+1
View File
@@ -34,6 +34,7 @@ Last updated: July 29, 2024
#include "common/transformations/orientation.hpp"
#include "common/params.h"
#include "common/swaglog.h"
#include "common/util.h"
#include "common/watchdog.h"
#include "selfdrive/ui/sunnypilot/qt/network/sunnylink/models/role_model.h"
+2
View File
@@ -33,9 +33,11 @@ Last updated: July 29, 2024
#include "selfdrive/ui/ui.h"
#include "cereal/messaging/messaging.h"
#include "common/timing.h"
#include "qt/network/sunnylink/models/role_model.h"
#include "qt/network/sunnylink/models/sponsor_role_model.h"
#include "qt/network/sunnylink/models/user_model.h"
#include "selfdrive/ui/sunnypilot/qt/ui_scene.h"
#include "system/hardware/hw.h"
const int UI_ROAD_NAME_MARGIN_X = 14;
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">ميل/س</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished">MAX</translation>
@@ -1466,11 +1474,15 @@ This may take up to a minute.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1517,6 +1529,22 @@ This may take up to a minute.</source>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1583,18 +1611,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2521,6 +2537,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2529,6 +2553,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2914,6 +2946,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished">الوضع التجريبي</translation>
@@ -3281,6 +3317,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3309,14 +3353,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">mph</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished">MAX</translation>
@@ -1448,11 +1456,15 @@ This may take up to a minute.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1499,6 +1511,22 @@ This may take up to a minute.</source>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1565,18 +1593,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2505,6 +2521,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2513,6 +2537,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2900,6 +2932,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished">Experimenteller Modus</translation>
@@ -3267,6 +3303,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3295,14 +3339,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>
+47 -11
View File
@@ -207,6 +207,14 @@
<source>LIMIT</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AutoLaneChangeTimer</name>
@@ -1445,14 +1453,6 @@ Esto puede tardar un minuto.</translation>
<source>Hyundai/Kia/Genesis</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subaru</source>
<translation type="unfinished"></translation>
@@ -1564,15 +1564,31 @@ Reboot Required.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -2681,6 +2697,22 @@ Reboot Required.</source>
<source>Default is Laneless. In Auto mode, sunnnypilot dynamically chooses between Laneline or Laneless model based on lane recognition confidence level on road and certain conditions.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TermsPage</name>
@@ -3046,6 +3078,10 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Enable the sunnypilot longitudinal control (alpha) toggle to allow Experimental mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TorqueFriction</name>
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">mi/h</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished">MAX</translation>
@@ -1450,11 +1458,15 @@ Cela peut prendre jusqu&apos;à une minute.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1501,6 +1513,22 @@ Cela peut prendre jusqu&apos;à une minute.</translation>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1567,18 +1595,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2505,6 +2521,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2513,6 +2537,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2898,6 +2930,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished">Mode expérimental</translation>
@@ -3265,6 +3301,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3293,14 +3337,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">mph</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished"></translation>
@@ -1444,11 +1452,15 @@ This may take up to a minute.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1495,6 +1507,22 @@ This may take up to a minute.</source>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1561,18 +1589,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2499,6 +2515,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2507,6 +2531,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2892,6 +2924,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished"></translation>
@@ -3259,6 +3295,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3287,14 +3331,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">mph</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished">MAX</translation>
@@ -1446,11 +1454,15 @@ This may take up to a minute.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1497,6 +1509,22 @@ This may take up to a minute.</source>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1563,18 +1591,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2501,6 +2517,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2509,6 +2533,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2894,6 +2926,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished"> </translation>
@@ -3261,6 +3297,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3289,14 +3333,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">mph</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished">LIMITE</translation>
@@ -1450,11 +1458,15 @@ Isso pode levar até um minuto.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1501,6 +1513,22 @@ Isso pode levar até um minuto.</translation>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1567,18 +1595,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2505,6 +2521,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2513,6 +2537,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2898,6 +2930,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished">Modo Experimental</translation>
@@ -3265,6 +3301,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3293,14 +3337,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">/.</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished"></translation>
@@ -1446,11 +1454,15 @@ This may take up to a minute.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1497,6 +1509,22 @@ This may take up to a minute.</source>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1563,18 +1591,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2501,6 +2517,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2509,6 +2533,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2894,6 +2926,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished"></translation>
@@ -3261,6 +3297,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3289,14 +3333,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>
+58 -22
View File
@@ -203,6 +203,14 @@
<source>mph</source>
<translation type="unfinished">mph</translation>
</message>
<message>
<source>blended</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>acc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MAX</source>
<translation type="unfinished">MAX</translation>
@@ -1444,11 +1452,15 @@ This may take up to a minute.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Smoother Stopping Performance (Beta)</source>
<source>HKG: Custom Tuning for New Longitudinal API</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smoother stopping behind a stopped car or desired stopping event. This is only applicable to HKG CAN platforms using openpilot longitudinal control.</source>
<source>HKG CAN: Enable Cruise Main By Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1495,6 +1507,22 @@ This may take up to a minute.</source>
<source>Smoother longitudinal performance for Toyota/Lexus TSS2/LSS2 cars. Big thanks to dragonpilot-community for this implementation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Automatic Brake Hold (AHB)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: Only for Toyota/Lexus vehicles with TSS2/LSS2. USE AT YOUR OWN RISK.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When you stop the vehicle completely by depressing the brake pedal, sunnypilot will activate Auto Brake Hold.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changing this setting takes effect when the car is powered off.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Enhanced Blind Spot Monitor</source>
<translation type="unfinished"></translation>
@@ -1561,18 +1589,6 @@ Reboot Required.</source>
<source>Tested on RAV4 TSS1, Lexus LSS1, Toyota TSS1/1.5, and Prius TSS2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>HKG CAN: Enable Cruise Main by Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>WARNING: This feature only applies when &quot;openpilot Longitudinal Control (Alpha)&quot; is enabled under &quot;Toggles&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enabling this toggle sets CRUISE MAIN to ON by default when the car starts, without engaging MADS. The user still needs to manually engage MADS.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsWindow</name>
@@ -2499,6 +2515,14 @@ Reboot Required.</source>
<source>Neural Network Lateral Control (NNLC)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>NNLC: Remove Lateral Jerk Response (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>When NNLC is active, enable this to disables the use of lateral jerk in steering torque calculations, focusing solely on lateral acceleration for a simplified control response.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enforce Torque Lateral Control</source>
<translation type="unfinished"></translation>
@@ -2507,6 +2531,14 @@ Reboot Required.</source>
<source>Enable this to enforce sunnypilot to steer with Torque lateral control.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lateral Jerk with Torque Lateral Control (Alpha)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Utilizes limited lateral jerk control for improved steering response, leveraging stock torque lateral controller capabilities. Designed to mimic NNLC behavior without training models or data collection.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Self-Tune</source>
<translation type="unfinished"></translation>
@@ -2892,6 +2924,10 @@ Reboot Required.</source>
This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Use Planner Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Experimental Mode</source>
<translation type="unfinished"></translation>
@@ -3259,6 +3295,14 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Speed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Display Metrics Below Chevron</source>
<translation type="unfinished"></translation>
@@ -3287,14 +3331,6 @@ This feature must be used along with SLC, and/or V-TSC, and/or M-TSC.</source>
<source>Display Temperature on Sidebar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>All</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WiFiPromptWidget</name>

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