Commit Graph

216 Commits

Author SHA1 Message Date
Justin Newberry
b0eb3ba4f4 cars: platform enums -> prepend brand name (#31927)
* with brand name

* migrate

* Fix

* fixes

* more

* passes

* fix

* fix the doc

* collects

* these too

* more stuff

* body exception :/

* more

* hardcode i guess

* update ref

* toyota

* more toyota

* and here

* final!

* fix notebooks and ccs

* move this here
2024-03-19 17:29:50 -07:00
Adeeb Shihadeh
3a7582d9a6 Abstract out common CarInterface.apply (#31924) 2024-03-19 13:46:31 -07:00
Justin Newberry
2e0db7f8d8 Hyundai: move car specs to platformconfig (#31661)
* specs

* override

* fixes 1

* fix 3

* fixes 4

* fixes

* fixes

* fixc

* fix number 723124

* that too

* fixes

* aa
2024-03-01 10:31:43 -08:00
Shane Smiskol
cff1ad9dd3 Revert "Hyundai CAN-FD: Panda safety config assignments cleanup (#29733)" (#31443)
This reverts commit 8009b11516.
2024-02-13 21:11:22 -08:00
Shane Smiskol
b4f958c13f HKG CAN FD: Merge Sorento Plug-in Hybrid and Hybrid (#31241)
* merge sorento plug-in hybrid and hybrid

* format

* allow fuzzy fingerprinting

* rm todo

* Revert "rm todo"

This reverts commit f2457eb58f88f780b25625942dbd9c74202acbb8.

* Revert "allow fuzzy fingerprinting"

This reverts commit 91f143f3115e31107752a5e84d3f587e6917933f.
2024-01-31 00:41:57 -08:00
Shane Smiskol
2f4cadc6bf Hyundai CAN FD: merge Sportage platforms (#31235)
* merge Tucson 4th gen!

* format fingerprints

* fix torque params

* fix

* detect CANFD hybrid with ACCELERATOR_ALT

* passes

* add test

* pass test

* cmt

* Revert "pass test"

This reverts commit 5f48ab1f6e6569def1cbbc92c9c0dd4ea5eebbe2.

* combine sportage hybrid

* merge sportage

* format
2024-01-31 00:19:15 -08:00
Shane Smiskol
e92e856f7a Hyundai CAN FD: merge Tucson and Tucson Hybrid (#31238)
* combine tucson and tucson hybrid can fd

* format fingerprints
2024-01-30 23:06:24 -08:00
Shane Smiskol
e5a8ddc3d0 Hyundai CAN FD: detect hybrid (#31237)
* detect can fd hybrid

* remove from set

* prevent EV & hybrid somehow
2024-01-30 22:43:56 -08:00
Shane Smiskol
b40660692b Hyundai: use hybrid & ev flags (#31236)
* hyundai: use hybrid & ev flags

* Update ref_commit

* todo

* match order
2024-01-30 21:57:29 -08:00
Jason Wen
8009b11516 Hyundai CAN-FD: Panda safety config assignments cleanup (#29733)
* Hyundai CAN-FD: Interface small cleanup

* some more

* Do this too

* fix

* cleaner

* use flag

* consolidate

* do it there

* Fix

* hda2 only

* cleaner

* default to False

* in another PR

* lint
2023-12-13 20:15:25 -08:00
Jason Wen
d6465e39bd Hyundai: Car Port for Staria 2023 (#30672)
* Hyundai: Car Port for Staria 2023

* camera scc!

* add test route

* Update RELEASES.md

* Apply suggestions from code review

* bump down max torque

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-13 08:23:10 -08:00
Jason Wen
9807bd99db HKG: Car Port for Kia Niro Plug-in Hybrid 2022 (#30576)
* HKG: Car Port for Kia Niro Plug-in Hybrid 2022

* Update CARS.md and add test route

* add to releases

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-11 20:32:36 -08:00
Jason Wen
63bf098017 Hyundai CAN-FD Longitudinal: Enable for ICE camera-SCC cars (non-HDA2) (#30034)
* Hyundai CAN-FD Longitudinal: Enable for all camera-based SCC platforms (non-HDA2)

* allow ice camera scc longitudinal

* allow ice camera scc longitudinal

* Update docs

* Merge commaai#30021

* Update CARS.md

* revert unrelated changes

* add test route

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-09 17:36:34 -08:00
Shane Smiskol
964460c0c3 Hyundai: remove Kona EV and Ioniq 6 from radar-ACC set (#30214)
* ADAS ECU sends SCC

* try non-silenced

* leave rx enabled?

* revert

* also not a radar scc car

* make a canfd unsupported long set

* comment
2023-10-21 04:25:16 -07:00
Jason Wen
820cccf8d9 Hyundai: split Elantra and Elantra GT (i30) platforms (#29969)
* Hyundai: Add FW Versions for 2019 Elantra

* wrong platform

* Update selfdrive/car/hyundai/values.py

* split platforms again

* add engine and other trans

* legacy: don't trust long

* fix

* elantra has no eps and i30 has no dates as well

* 19 still has no sng

* new harness

* todo comment

* Update CARS.md

* re-did

* add back

* rev

* Add Elantra 2017 FW from f6f9e1708bae2ef6

* Add Elantra 2017 FW from 5af39b105269f0f3

* Add Elantra 2017 FW from 2e158bb0e7396dd9

* should be all i30 and elantra drivers

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-10-21 03:16:50 -07:00
Notstupe
364353d897 hyundai: fix ioniq5/6 sorting (#30122)
put ioniq5/6 back in there place
2023-10-02 13:47:53 -07:00
Saber
db50e42202 HKG: Car Port for Hyundai Custin 1st Gen (#29476)
* HKG: Car Port for Hyundai Cusitn 1st Gen

Hyundai Custin is asia only car ,named Custo in China.
Hyundai K , talk with Sotana CAN BUS
test route"0bbe367c98fa1538|2023-08-19--01-58-42--0"

It's my fisrt time to PR a port car. I must miss something I don't know. Waiting your instruction to complete it.

* Add route

Add route

* update interface.py

Add interface values

* Update values.py

type

* slight cleanup

* stock openpilot route

* Add credit to release note

* lkas11 fault fix

* Generate CARS.md

* SCC is standard

* crc8

* Update new route

Add a new route "0bbe367c98fa1538|2023-09-16--00-16-49--0"

* sort

* Update selfdrive/car/hyundai/interface.py

* rename platform var

* we want abs!

* was looking at a vw lol

* 096

---------

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-26 02:56:32 -07:00
Hoya
e16d530da9 Hyundai: Car port for AZERA Hybrid 6TH Generation (#29984)
* Update interface.py

add AZERA HEV 6TH_GEN

* Update hyundaican.py

ADD AZERA HEV 6TH_GEN

* Update values.py

add AZERA_HEV_6TH_GEN

* Update override.yaml

add AZERA HEV 6TH GEN

* Update CARS.md

add AZERA HEV 6TH GEN

* Update CARS.md

* Update routes.py

Add AZERA HEV 6TH GEN

* Update routes.py

* Update values.py

* Update values.py

* Update routes.py

* Update routes.py

* Update values.py

* Update values.py

* Update CARS.md

* Update values.py

* Update RELEASES.md

* Update RELEASES.md

* Update routes.py

* Update routes.py

* Update routes.py

* The route driven by added value.py with engine and transmission finger.

* Update interface.py

I applied it with the actual vehicle spec value.

* move up release to 096

* fixes

* docs

* fix mass

---------

Co-authored-by: haram-KONA <88036668+haram-KONA@users.noreply.github.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-22 02:06:16 -07:00
Shane Smiskol
39c8bfc09c Kia: Optima Hybrid 2019 car port (#29992)
* add 2019 OptimaH

* fix

* fix gears

* rename

* should be in unsup long

* fix

* probable cause

* add test route

* update docs

* fix test

* spacing

* note it's only old
2023-09-22 00:58:14 -07:00
Jason Wen
0d3cc2ae04 HKG: Car Port for Kia K8 Hybrid 2023 (HDA2) (#29899)
* HKG: Car Port for Kia K8 2023 (HDA2)

* Fix release docs

* add test route

* engaged segment

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-13 15:20:03 -07:00
Jason Wen
748eb4a7c7 Hyundai: Car Port for Azera 6th Generation (#29876)
* Hyundai: Car Port for Azera 2022

* harness k

* not crc8

* use gen

* add test route

* Middle East only

* Revert "Middle East only"

This reverts commit 1abe795ad00d10344761e99f415a1cfc14f4c163.

* rename to 6th gen

* sorting

* has a little less torque

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-13 02:22:04 -07:00
Justin Newberry
4e69937d0d Precommit: ensure executable bit is set (#29784)
* precommit ensure executable

* exclude tinygrad

* bump submodules

* exclude tinygrad globally
2023-09-05 16:33:26 -07:00
Jason Wen
7bc2667ab6 Hyundai: Car Port for Ioniq 6 2023 (HDA2) (#29486)
* Hyundai: Car Port for Ioniq 6 2023

* Update docs

* bump panda

* Attempt to block laneline information to suppress LFA

* Try 0x364

* Block 0x364|BYTE7

* Attempt to block LFA on 0x364

* Block all bus 2/6 messages

* Lowercase to match DBC

* Aight

* we don't use this

* Final test to block LFA

* No byte 7

* Fix

* Fix tx

* This platform does SCC from radar

* Generate CARS.md

* cleanup

* Fix

* Fix 2

* bump submodules

* add test route for HDA2

* Support non-HDA2 trims in future PR

* segment 6

* bump opendbc

* Update username

* Check for new LKAS addr instead

* Update comment

* sync with dbc

* Combine LFA suppress can sends

* Add new tx to unit test

* bump opendbc

* we'd need a new DBC for that

* update docs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-30 01:10:28 -07:00
Jason Wen
fafca0e44d Hyundai: Car Port for Kona EV 2nd Generation (HDA2, 2023 Korean Ver.) (#28725)
* Hyundai: Car Port for Kona EV 2nd Generation (2023 Korean Ver.)

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* gate with flag

* new blinker signals for 2nd Gen Kona

* add test route

* Update CARS.md

* bump opendbc

* match opendbc definition

* Attempt to block laneline information to suppress LFA

* Try 0x364

* Block 0x364|BYTE7

* Block all bus 2/6 messages

* Lowercase to match DBC

* Aight

* we don't use this

* Final test to block LFA

* No byte 7

* Fix

* Fix tx

* cleanup

* HDA2 support

* Update RELEASES.md

* bump opendbc

* from `liveTorqueParameters`

* add test route

* bump panda

* official spec

* Check for new LKAS addr instead

* Update comment

* sync with dbc

* Combine LFA suppress can sends

* bump opendbc

* Add new tx to unit test

* linter

* Consolidate

* rename and update torque params

* add note for blinker weirdness

* bump

* bump

* clean up block msg

* it uses LFA if long

* not used in multiple places

* bump panda

* correct name

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-30 00:02:19 -07:00
Shane Smiskol
3b69187b67 Kia: add test route for Optima Hybrid (#29520)
* add Optima H FW

* undashcam

* add to routes, but keep in dashcam mode for now

* rearrange
2023-08-25 20:12:57 -07:00
Shane Smiskol
24f5a6170d car interfaces: handle buttons changing state without going unpressed (#26463)
* rename function first and foremost

* the function

* comment

* move usages over

* probably fine

* comments

* btn

* single line

* not comments

* fix keyword

* is it not clear?

* noEntry while holding cancel

* bumpo

* remove

* better?

* better?

* try this

* try this

* loop

* better

* more clear

* Revert "more clear"

This reverts commit 37e0277e4bfe6f1c553dbbcece6f532a280be62e.

* no optional

* fine

* add comment

* clean up honda

* one line

* can also do this

* but unclear

This reverts commit 1984a72cc8680b23c202695b8aeeb1aa28f7160c.

* bumppanda
2023-08-25 16:47:10 -07:00
Jason Wen
bfa714ef3b HKG: Car Port for Kia Sorento Hybrid 2023 (#29322)
* HKG: Car Port for Kia Sorento Hybrid 2023

* Update CARS.md

* Oops

* add test route

* specify segment

* all packages

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-21 14:34:53 -07:00
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Shane Smiskol
38f1523742 add Kia Niro Hybrid 2019 to legacy safety mode list (#29472)
* add Kia Niro Hybrid 2019 to legacy safety mode list

* list

* test

* update docs

* space
2023-08-18 20:57:42 -07:00
Jason Young
f76ffbdbbc interfaces: add common STD_CARGO_KG to mass (#29416)
* cleanup std_cargo_kg

* fix Sonata mass

* remove snowflake construct

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-17 21:06:07 -07:00
Jason Young
e1a64260d3 HKG: Vehicle mass corrections (#29418)
* HKG: Vehicle mass corrections

* not gross

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-15 20:46:57 -07:00
Jason Young
90c4bbe8e4 car interfaces: cleanup tire stiffness calculation (#28263)
* cleanup tire stiffness calculation

* bump cereal

* think these todos still apply

* gm: same default

* revert comments

* bump

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-15 14:17:08 -07:00
Justin Newberry
cf64b27168 Linter: Fix >160 line length test (#29287)
* test

* fix line length

* fix line length

* fix file size

* revert poetry

* cleanup for PR
2023-08-08 17:13:35 -07:00
Shane Smiskol
bc24783657 Hyundai: add Ioniq 6 platform (#28915) 2023-07-13 12:49:38 +01:00
Jason Wen
f1c604bde7 HKG: Car Port for Kia Carnival 2023 (HDA1) (#27785)
* HKG: Car Port for Kia Carnival (China only) 2023 (HDA1)

* add FW

* seems to be radar SCC

* Update CARS.md

* Update CARS.md

* Add test route

* Fix docs

* New route

* Fix docs formatting

* update with US model

* 2 total

* Update RELEASES.md

* add FW for US carnival 2023

* fix docs

* update test routes

* no rlogs for chinese route

* update docs

* revert chinese to merge now

* Apply suggestions from code review

* fine to fully remove

* less precise

* remove from releases

* Apply suggestions from code review

* Update selfdrive/car/tests/routes.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-07-06 00:37:49 -07:00
Cameron Clough
28bf743693 selfdrive/car: reusable CanBus helper (#28489) 2023-06-10 22:50:19 -07:00
JWingate80
758a9d7c24 HKG: Genesis GV80 2023 support (#28069)
* Update values.py

* Update values.py

* Update routes.py

* Update values.py

* Update values.py

* Update interface.py

* Update override.yaml

* Updated car name in torque settings to the correct one

* Removed unused ECU's from GV80

Fix AssertionError: 3 != 0 : GENESIS GV80 2023: Car model has ECUs not in auxiliary request whitelists: Ecu.eps, Ecu.transmission, Ecu.engine

* Update routes.py

Updated to a better route

* Update routes.py

* Update test_models.py

* Update test_models.py

* Hopefully this route will work...

* Update selfdrive/car/hyundai/values.py

* Update selfdrive/car/hyundai/values.py

* this could use some cargo

* don't need to combine just yet

* add to docs and releases

* Update routes.py

* Update RELEASES.md

* Update routes.py

Updated route, hopefully this one works...

* Update selfdrive/car/tests/routes.py

* alphabetical

* update docs

* Update routes.py

Hopefully this route works

* Update routes.py

Trying segment 1 for GV80

* bump

* no need

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2023-05-06 23:18:06 -07:00
Shane Smiskol
5aebdb0ad0 Car docs: pass docs flag to car interfaces (#27311)
* docs

* docs

* docs

* docs

* use docs in gm
2023-04-18 12:22:22 -07:00
Adeeb Shihadeh
08e2149b0f Hyundai: factor out bus numbers (#27903)
* mv bus

* mv that

* if len

* fix tests

* use that

* same name
2023-04-14 11:23:22 -07:00
Josselin Lecocq
e8d8304548 HKG: Car Port for Kia Niro EV 2023 (HDA1, European version) (#27788)
* Update values.py for 2023 Kia Niro EV

* Update interface.py for 2023 Kia Niro EV

* Update params.yaml for 2023 Kia Niro EV

* Update RELEASES.md for 2023 Kia Niro EV

* Update interface.py for 2023 Kia Niro EV

* Update routes.py for 2023 Kia Niro EV

* Update CARS.md for 2023 Kia Niro EV

* Update CARS.md for 2023 Kia Niro EV

* Put 2023 Kia Niro EV in CANFD_RADAR_SCC_CAR

* New values in params.yaml for 2023 Kia Niro EV

* Rollback - Remove CAR.KIA_NIRO_EV_2ND_GEN from CANFD_RADAR_SCC_CAR

* Update routes.py for 2023 Kia Niro EV

* Apply suggestions from code review

* use new route

* update cars

* test

* pass test

* add params, rename

* use average

use average

use average

use average

* around 2.05

* Update selfdrive/car/hyundai/interface.py

* Update selfdrive/car/hyundai/interface.py

* lower

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-04-07 15:15:10 -07:00
Jason Wen
a20f07144b Hyundai CAN-FD: common PT bus function cleanup (#27397)
* Hyundai CAN-FD: common PT bus function cleanup

* use CP

* Update selfdrive/car/hyundai/hyundaicanfd.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-02-20 13:19:17 -08:00
Shane Smiskol
b6fd39856c HKG: simplify Ioniq car params (#27371)
* move PHEV to other ioniqs

* reverse if

* order

* order
2023-02-17 18:39:27 -08:00
Shane Smiskol
b2453d55c1 Hyundai: detect FCA feature (#27322)
* detect fca

* use value

* it will be from camera on camera acc cars

* Update ref_commit
2023-02-16 21:52:32 -08:00
Shane Smiskol
65a9843ff9 Hyundai: detect LFA HDA message (#27323)
* detect lfa message

* comment

* ?

* fix

* Update ref_commit
2023-02-13 21:12:13 -08:00
Shane Smiskol
8f5057ff2d GM: enforce steering command message timing (#27250)
* draft

* bump opendbc

* still draft

* that's not right

* superset of the changes, 33hz

* cleanup

* this should work

* remove line

* pass it in again

* actually no need to check updated now

* now_nanos

* consistent name

* fix replay

* one line isn't that bad

switch

switch

* fix CarController tests

* Update ref_commit
2023-02-09 15:37:39 -08:00
Jason Wen
dae1331817 HKG: Car Port for Kia Niro Hybrid 2023 (HDA1) (#26827)
* HKG: Car Port for Kia Niro Hybrid 2023 (HDA1)

* bump opendbc

* bump

* Found gear signal

* Only set one flag

* bump opendbc

* Update CARS.md

* Update routes.py

* bump opendbc

* Update CARS.md

* some values cleanup

* new route with rlogs

* set from data

* merge

(3854+3391+3227+3336)/4

* fine move back down here for now

fine move back down here for now

* Update selfdrive/car/hyundai/interface.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-02-08 19:21:50 -08:00
Jason Wen
1816b499c4 HKG: Car Port for Kia K5 Hybrid 2020 (#26947)
* HKG: Car Port for Kia K5 Hybrid 2020

* Add test route (Experimental Mode)

* No abs

* remove extra trans

* move up

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-02-02 22:58:29 -08:00
Adeeb Shihadeh
6fa9b555a4 rename carState.radarOffCan to radarUnavailable (#27187)
* rename carState.radarOffCan to radarUnavailable

* bump cereal
2023-02-02 11:38:09 -08:00
Jason Wen
69f8ac0b65 HKG: Car Port for Kia Sorento 2022 (#26874)
* HKG: Car Port for Kia Sorento 2022

* Harness K

* SCC is on bus 4

* Add test route

* seems reasonable

* more interesting segment

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-01-11 21:17:58 -08:00
Harald Schäfer
8744384a4f Sonata less starting state accel (#26363)
* Sonata less start accel

* Update ref_commit
2022-12-16 17:21:42 -08:00