Commit Graph

30 Commits

Author SHA1 Message Date
Shane Smiskol
1302e1bb25 ruff: enable preview rules (#2621)
* preview

* fmt

* fix formatting!

* Revert "fix formatting!"

This reverts commit 559d291cfa27c3500e5fa3105ffdea809bdd1b27.

* some of these are good, but can enable in steps

* and

* ruff check --fix

* preview

* format
2025-08-04 15:38:04 -07:00
DevTekVE
a517b9973a refactor: move lateral methods from init to lateral.py (#2594)
* Extracting lateral methods to lateral.py

* cleaning

* more cleaning

* more cleaning

* Making sure it remains where it should

* Leave rate_limit where it belongs

* Moving things to `car/controls/`

* Moving rate limit to get a taste of the changes

* clean

* copy verbatim

* clean up

* more

* now we can format

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-07-31 20:49:19 -07:00
Nelson Chen
90ccf18322 Toyota: Add FW for 2025 Lexus LC (Taiwan) (#2397)
* Firmware fingerprint for 2025 Lexus LC (Taiwan)

Validation
* Dongle ID: 3feba96d337138a6

* Add an extra year to the toyota document's date for LC 2025
2025-07-01 12:38:18 -04:00
Shane Smiskol
9b029fce71 Toyota: remove extra community cars (#2417)
* fix that

* fix
2025-06-27 15:39:43 -07:00
ugtthis
fee9d5b806 Fix Toyota Yaris year format (#2408)
place year after regional marker
2025-06-27 15:35:26 -07:00
Shane Smiskol
d8abecb8b2 [bot] Fingerprints: add missing FW versions from new users (#2390)
Export fingerprints
2025-06-12 00:42:56 -07:00
Adeeb Shihadeh
760874ae0c video_link -> video 2025-05-14 10:28:08 -07:00
Nelson Chen
1754a76924 Toyota: Add Lexus RC 2023 (#2082)
* Add Lexus RC 2023

* add route for Lexus RC TSS2
2025-05-06 14:27:45 -07:00
Alexandre Nobuharu Sato
c1a9b7489d Toyota: 2023 Toyota Yaris (JDM) (#1668)
* init

* fix

* add test route

* fix E501 Line too long (167 > 160)

* use the new generic SecOC carPlatform

* update test route

* change to torque tune

* test route using torque control

* no break line

* update from a better test 0b54d0594d924cd9/000000aa--889e1e396a

* better

* new tune from 0b54d0594d924cd9/00000007--2b30cce35b

* Update test route

---------

Co-authored-by: Jason Young <jyoung8607@gmail.com>
2025-03-29 13:30:25 -04:00
Shane Smiskol
64a9a23cdf Toyota: bump RAV4 ICE to 2025 (#2036)
Update values.py
2025-03-24 19:05:17 -07:00
Shane Smiskol
e3d641fc7f angle limits: use a struct (#1885)
* struct to prevent forgetting something and make more organized

* use it

* move all over

* clean up

* rm
2025-02-28 21:05:02 -08:00
Shane Smiskol
fbe0041b6d angle limits: enforce a max angle and inactive angle (#1870)
* do inactive and max angle in function

* do the rest

* formatting

* rm

* wtf
2025-02-27 18:04:23 -08:00
Shane Smiskol
1a5e908833 Safety flags: remove redundant namespace (#1778)
remove triple namespace
2025-02-20 22:02:38 -08:00
Shane Smiskol
0eab9bf26e Rename to SafetyFlags (#1711)
safety flags
2025-02-11 15:55:49 -08:00
Eric Brown
25b3266b0b Move car-specific panda flags into opendbc (#1589)
* Move car-specific panda flags into opendbc

* Use .value

* Move comment to satisfy linter

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2025-02-10 15:49:14 -08:00
Shane Smiskol
9417e3f175 [bot] Car docs: update model years from new users (#1673)
* Update car docs

* Update opendbc/car/honda/values.py
2025-01-27 19:11:38 -08:00
Shane Smiskol
b64f0edd0d Revert Yaris SecOC for now (#1653)
* Revert "Toyota: Yaris SecOC is hybrid (#1641)"

This reverts commit 7af6f3885d.

* Revert "Toyota: JDM Yaris with SecOC (#1578)"

This reverts commit acdaaa1969.
2025-01-21 20:45:20 -08:00
Alexandre Nobuharu Sato
7af6f3885d Toyota: Yaris SecOC is hybrid (#1641) 2025-01-16 14:04:12 -08:00
Dylan Staley
5eb77a9e0a docs: Add support for 2025 Toyota RAV4 Hybrid (#1639) 2025-01-15 13:42:50 -08:00
Alexandre Nobuharu Sato
acdaaa1969 Toyota: JDM Yaris with SecOC (#1578)
* init

* fix

* add test route

* fix E501 Line too long (167 > 160)

* use the new generic SecOC carPlatform

---------

Co-authored-by: Jason Young <jyoung8607@gmail.com>
2025-01-15 10:07:52 -05:00
Jason Young
bc2143ba93 Toyota: Standard SecOC platform config (#1619) 2025-01-09 23:25:35 -05:00
Jason Young
462b5e70fb Toyota: Use properly generated DBC for SecOC cars (#1618)
Toyota: Use DBC generator for SecOC cars
2025-01-09 22:50:43 -05:00
Shane Smiskol
6d1c7e3699 [bot] Fingerprints: add missing FW versions from new users (#1551)
Export fingerprints
2024-12-02 09:58:11 -08:00
Robbe Derks
38c867912a CAN parser dict (#1470)
* refactor in base classes

* refactor body + chrysler

* refactor the rest

* tiny cleanup

* Bus enum

* lowercase buses

* small cleanups

* no str allowed

* no None allowed

* type hint

* name cleanup

* rm empty line

* never None

* never Str

* this isn't valid

* fix

* = > |=
2024-11-15 22:50:21 +01:00
Shane Smiskol
e642522112 Toyota: fix hybrid query for some cars (#1375)
fix hybrid query
2024-10-14 20:56:54 -07:00
hdoublearp
c78d9bbc91 Toyota: Fix RAV4 Prime mass and wheelbase (#1354)
* Fix curb weight, steering ratio, wheelbase for RAV4 Prime

Weight and wheelbase specifications obtained from https://web.archive.org/web/20221005134205/https://www.toyota.com/rav4prime/2022/features/mpg_other_price/4544/4550. Steering ratio obtained from https://www.toyota.com/content/dam/toyota/brochures/pdf/2022/rav4_ebrochure.pdf.

* Align with currently available documentation

Rounding up wheelbase to two decimal
Updating mass to be more accurate with real world measurement
Reverting steering ratio, to account for the learner behavior in OpenPilot; as described in the PR comment history
2024-10-07 20:32:54 -04:00
Jason Young
0ebc4cb4cb Toyota: Add 2021-23 Toyota Sienna with SecOC (#1344)
* from @pd0wm commaai/opendbc#1005

* from @pd0wm commaai/openpilot#31179

* we did need that flag rename

* those flags were numbered like that for a reason

* no more bustime

* add secOCKey to structs

* hack around new pitch value for now

* secOCKey placeholder

* help the test along for now

* codespell disapproves of my creative vision

* add crypto dependency

* the other one

* the other other one

* temp use SecOC branch of Panda

* i am the panda, for now

* propitiate static type checker

* on second thought, moving car.capnp is a good idea

* remove the SecOC key from CarParams

* remove SecOC key reading from Toyota port

* add secoc_key to CS/CC

* update SecOC key references

* default key in interfaces for tests

* more CarParams.SecurityConfig

* set secOcRequired at startup for SecOC car

* see if type checker likes this better

* santa please bring car.capnp back soon

* list -> flag

* diff reduction: won't need the flag rename

* add IDLE_COAST signal

* regen RAV4 DBC

* consolidate and remove ALT_GAS_MSG flag

* consolidate and remove GEAR_PACKET_HYBRID flag

* cleanup pitch signal

* cleanup can_gear

* cleanup SECOC_SYNCHRONIZATION

* more cleanup

* cleanup Mirai

* FLAG.value consistency, in case capnp move needs this

* not necessary, reduce diff with master

* prettier

* validation like this should be an offline test

* match non-SecOC LTA message

* follow secoc library move

* repack flag values

* whitespace fix

* cleanup stockAeb

* comment not necessary

* add explicit FIXME for pandacan ref

* how did that sneak back in

* mention why CarDocs are missing

* use carlog to note wrong key problems

* limit logging volume

* add SecOC Sienna, FW from 970f02decf19930c/00000007--744397430a

* add FW from 0bbe367c98fa1538/00000001--1c0d7ae2e4

* add CI test route for Sienna

* SR closer to online learned, tweak mass to Edmunds value

* add FW from 8bfb000e03b2a257/00000004--f9eee5f52e

* fix transposition
2024-10-07 13:16:58 -04:00
Jason Young
c90858514c Toyota: 2021-23 RAV4 Prime (#1287)
* from @pd0wm commaai/opendbc#1005

* from @pd0wm commaai/openpilot#31179

* we did need that flag rename

* those flags were numbered like that for a reason

* no more bustime

* add secOCKey to structs

* hack around new pitch value for now

* secOCKey placeholder

* help the test along for now

* codespell disapproves of my creative vision

* add crypto dependency

* the other one

* the other other one

* temp use SecOC branch of Panda

* i am the panda, for now

* propitiate static type checker

* on second thought, moving car.capnp is a good idea

* remove the SecOC key from CarParams

* remove SecOC key reading from Toyota port

* add secoc_key to CS/CC

* update SecOC key references

* default key in interfaces for tests

* more CarParams.SecurityConfig

* set secOcRequired at startup for SecOC car

* see if type checker likes this better

* santa please bring car.capnp back soon

* list -> flag

* diff reduction: won't need the flag rename

* add IDLE_COAST signal

* regen RAV4 DBC

* consolidate and remove ALT_GAS_MSG flag

* consolidate and remove GEAR_PACKET_HYBRID flag

* cleanup pitch signal

* cleanup can_gear

* cleanup SECOC_SYNCHRONIZATION

* more cleanup

* cleanup Mirai

* FLAG.value consistency, in case capnp move needs this

* not necessary, reduce diff with master

* prettier

* validation like this should be an offline test

* match non-SecOC LTA message

* follow secoc library move

* repack flag values

* whitespace fix

* cleanup stockAeb

* comment not necessary

* add explicit FIXME for pandacan ref

* how did that sneak back in

* mention why CarDocs are missing

* use carlog to note wrong key problems

* limit logging volume

* prep for new CARS.md infra

* pandacan back to panda master
2024-10-04 16:12:17 -04:00
Shane Smiskol
b937eefca1 Lexus ES TSS2: improve start from stop for ICE variants (#1248)
* Improve start from stop for Lexus ES TSS2 ICE

* won't be perfect, but we don't pitch compensate for other cars yet

* rm

* ramp to 0 when negative

* add todo

* clean up

* ugh, it's a subtype mypy!!

* huh, most lexus don't have CLUTCH, will have to find those later

* bug fixes

* clean up
2024-09-17 17:50:49 -07:00
Shane Smiskol
9a53f08080 move selfdrive/car to opendbc (#1049)
* move most of /car

* rename selfdrive.car imports to opendbc.car

* move some car tests

move some car tests

* fix car tests

* fix actions?

* add panda ignore to pytest

* need these ignores from openpilot

* fix tests for outside pip install (openpilot/local)

forgot
2024-08-17 00:38:33 -07:00