Commit Graph

125 Commits

Author SHA1 Message Date
Shane Smiskol
f597d63bf6 PlatformConfig: clean up and print all flags (#32369)
* script to print flags

* don't need

* SAL

* back

* fix
2024-05-07 15:00:02 -07:00
Jack Merrill
5783bdc513 Subaru: Increase RPM Limit (#32299)
Increase the Subaru RPM limit in values.py, update panda submodule
2024-04-26 16:07:17 -07:00
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
thenhnn
489528dcae PlatformConfig: automatically get platform_str from the enum name (#31868)
* get platform_str from the enum name

* fix tests

* add migration table

* remove impossible todo

* Add link to PR in MIGRATION table

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Remove useless brand name comments and rename RAM_1500 to RAM_1500_5TH_GEN

* rename RAM_HD to RAM_HD_5TH_GEN

* rename references to RAM_HD and RAM_1500

* change "mock" to "MOCK" and rename torque data of Nissan Leaf 2018 IC

* remove MOCK from fingerprints.py

* change hard-coded car model in test_can_fingerprint.py/test_timing

* migration

* update ref

* space

* prius

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: justin newberry <justin@comma.ai>
Co-authored-by: Justin Newberry <jnewberry0502@gmail.com>
2024-03-19 11:16:02 -07:00
Justin Newberry
655e5f7c3e rename CarInfo to CarDocs (#31879)
car info to car docs
2024-03-15 11:45:44 -07:00
Shane Smiskol
bdae188c6f docs: don't support multi-type car info (#31875)
don't support multi-type car info
2024-03-15 00:11:41 -07:00
Shane Smiskol
5be3f0b7db Subaru: log alt request (#31812)
* add alt query (same as Hyundai)

* refs
2024-03-08 19:36:33 -08:00
Shane Smiskol
66adf8781e Subaru: extra logging request for camera (#31783)
* 7f - service not supported in active session

* update refs

* rm short

* Apply suggestions from code review

* bus 0
2024-03-08 17:00:07 -08:00
Shane Smiskol
99610c8819 Revert "common PlatformFlags base class + test for < 32 bits" (#31793)
Revert "common PlatformFlags base class + test for < 32 bits (#31779)"

This reverts commit 8ba5d660f3.
2024-03-08 00:15:21 -08:00
Shane Smiskol
90442e3597 Subaru: make OBD query logging (#31785)
* make OBD query logging

* Update selfdrive/car/subaru/values.py

Co-authored-by: Justin Newberry <justin@comma.ai>

* wording

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2024-03-07 18:57:15 -08:00
Justin Newberry
8ba5d660f3 common PlatformFlags base class + test for < 32 bits (#31779)
* add 32 bit check

* space

* this is not required

* jk yes we do
2024-03-07 14:01:28 -08:00
Shane Smiskol
78a46ce724 car values formatting (#31747)
values formatting
2024-03-06 15:47:44 -08:00
Justin Newberry
25ccb2426c cars: remove CAR_INFO map (#31739)
* no carinfo map

* smaller diff

* not on mock
2024-03-06 11:22:12 -08:00
Justin Newberry
b0eae8c1b7 platformconfig and carspecs are now required, carspecs no longer kwarg (#31667)
* required

* mock can be a platform!

* default is mock

* fix that

* and that one
2024-03-01 11:31:51 -08:00
Shane Smiskol
690dc55ea2 Car flags: label static flags (#31639)
* comment, consistent source

* no caps not global

* no field

* label rest
2024-02-29 15:36:40 -08:00
Justin Newberry
ac16c5518a add CAR.print_debug (#31652)
print debug
2024-02-29 15:01:47 -08:00
Shane Smiskol
5d291cb64d Subaru: group steer rate limited with GEN2 (#31640)
* remove sideways diff

* make a subclass

* fix

* fix
2024-02-29 14:45:31 -08:00
Justin Newberry
3a6c3315ab Subaru: move to flags within PlatformConfig (#31584)
* flags

* update ref

* use the flags directly

* use post_init (don't freeze)

* we can maintain frozen with custom class

* not preglobal

* move to common

* cleanup
2024-02-28 20:12:14 -08:00
Justin Newberry
9ecff49118 platformconfig: freeze all dataclasses (#31605)
* frozen

* frozen
2024-02-26 21:16:05 -08:00
Justin Newberry
cdd4d418aa Subaru: fix forester weight (#31585)
fix weight
2024-02-24 23:15:16 -08:00
Cameron Clough
995250ae49 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
2024-02-24 16:41:23 -08:00
Justin Newberry
1161d33c18 Subaru: move carspecs to PlatformConfig (#31550)
* subaru platform config

* forester wrong dbc

* spacing

* subaru car specs

* someday!

* more red diff

* all brands can be done like this

* but this should be done first and thats subaru specific

* that seems very low but we shouldn't change it here

* as long as it subclasses str its fine

* fix
2024-02-23 13:23:40 -08:00
Justin Newberry
73a497ded8 cleanup PlatformConfig (#31551)
cleanup
2024-02-22 17:49:27 -08:00
Justin Newberry
015eed5d61 Subaru: move to PlatformConfig (#31547)
* subaru platform config

* forester wrong dbc

* spacing
2024-02-22 17:17:00 -08:00
Justin Newberry
51e3daf244 Subaru: add 2024 forester (#31520)
* also angle based

* 24 forester
2024-02-20 15:02:56 -08:00
Justin Newberry
54fe19206e Subaru: eps is non-essential for gen2 cars (#31220)
* eps non essential

* comment

* suggestions
2024-01-29 16:48:03 -08:00
Justin Newberry
aff3d5ae09 Subaru: move non-obd requests out of logging (#31174)
enable
2024-01-27 09:07:14 -08:00
Justin Newberry
28eed156e0 Move all fingerprints to fingerprints.py (#30790)
* move fingerpints

* fix circular imports

* fix circular imports

* fix auto fingerprint

* fix those tests

* and controlsd

* add labeler rule

* no defaultdict
2023-12-18 14:04:27 -08:00
Justin Newberry
5f24078a48 Subaru: enable alpha longitudinal for gen1 cars (#30714)
* enable alpha long

* update docs

* added footnote about eyesight

* only for these cars

* add alpha

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

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-13 20:17:33 -08:00
Justin Newberry
a2bb41e0ec Subaru: non-obd FW queries logging (#30552)
* add subaru logging fw

* whitelist + comma

* whitelist is empty for the other requests

* all whitelisted
2023-11-29 17:47:09 -08:00
Justin Newberry
44ef143ae7 Subaru: add 2023 forester (#30554)
23
2023-11-29 14:53:43 -08:00
Nickolas Komarnitsky
cf2d4fd7ea Subaru: Add FW for 2022 Legacy (#30434)
Update values.py
2023-11-09 17:42:36 -08:00
Justin Newberry
60b21b55d2 Subaru: initial eyesight disable support (#30373)
* initial eyesight disable

* disable_eyesight

* comment
2023-11-06 22:13:39 -08:00
Justin Newberry
ace14698c4 Subaru: 2019-2020 forester is also rate limited (#30391)
* forester rate limited

* better comment

* better comment
2023-11-06 13:22:58 -08:00
Justin Newberry
df79ec5314 Subaru: improve longitudinal tuning (#30389)
subaru long tuning
2023-11-05 17:53:42 -08:00
Justin Newberry
0fbc36bce1 Subaru: forester 2017 fingerprint (#30388)
forester fw
2023-11-05 01:21:46 -07:00
Justin Newberry
1463fd3917 Subaru: 2015 outback fingerprint (#30387)
subaru outback fw
2023-11-04 22:31:09 -07:00
Justin Newberry
b791c0296b Subaru: 2016 legacy fingerprint (#30386)
legacy fw
2023-11-04 22:09:43 -07:00
Stephen Marin
240f43b421 Subaru: Fingerprint for 2021 Outback XT (#30380)
* Fingerprint for 2021 Outback XT

* that one already exists

---------

Co-authored-by: Justin Newberry <jnewberry0502@gmail.com>
2023-11-04 22:04:54 -07:00
Justin Newberry
998763b4bc Subaru: 2021 impreza fingerprint (#30249) 2023-10-15 17:15:41 -04:00
Justin Newberry
7f945f10c6 Subaru: Outback 2023 fingerprint (#30190)
fingerprint
2023-10-05 17:15:26 -07:00
Justin Newberry
8cc8952d81 Subaru: crosstrek hybrid is a B harness (#30150)
its a b harness
2023-10-03 13:29:07 -07:00
Justin Newberry
6ae465e4af Use StrEnum for car classes (#30114)
* str enum

* import sort

* fix car helpers

* fix that

* fix static analysis
2023-09-30 17:15:34 -07:00
Justin Newberry
fb06b98667 Subaru: remove 2020+ temporary steering faults (#29116)
* subaru steer faults

* it takes a bool now

* Update selfdrive/car/subaru/carcontroller.py

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

* that was removed

* should be abs

* bump panda

* bump panda

* subaru faults

* add fixme

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

* review suggestions

* still want zero steer when lat not active

* bump submodules

* move it under the non-preglobal section

* better comment for steer limited

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

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-09-07 15:28:46 -07:00
Justin Newberry
f4f92f1a2f Subaru: impreza 22 fingerprint (#29765)
add fingerprint
2023-09-03 13:12:31 -07:00
martinl
a1bf66a0d2 Subaru: Ascent 2023 dashcam mode (#27583)
* Subaru: Add support for 2023 Ascent

* Update supported cars list

* Remove tester present from fw query

* merge master

* fix merge issues

* minimize diff

* add comment about 23 ascent

* add comment

* correct spot

* fix name

* nocap

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-25 20:55:21 -07:00
Shane Smiskol
3719be8b76 Subaru: Forester Hybrid 2020 dashcam (#24770)
* Add support for Forester Hybrid 2020

Co-authored-by: martinl <martin@mlp.ee>

* it's a param now

* make it work

* fix

* merge and cleanup

* remove duplicate

* should be forester

* bump submodules

* should be abs

* add missing params

* still need a test route

* still need a test route

* consitent

* here too

* todo

* more

* Update selfdrive/car/tests/routes.py

* clean up

---------

Co-authored-by: martinl <martin@mlp.ee>
Co-authored-by: Justin Newberry <jnewberry0502@gmail.com>
2023-08-23 21:30:12 -07:00
Adeeb Shihadeh
973d90be77 Subaru: Crosstrek Hybrid dashcam mode (#25378)
* Subaru: Crosstrek Hybrid support

* hybrid cars in dashcam only

* revert that

* just dashcam

* tah should be abs

* remove unused import

* use the old dbc for now

* hybrid car exceptions in carstate

* need dashstatus until we get a proper cruiseactivated bit

* missing CP

* merge conflicts

* lets be consistent about extend

* cleanup

* fix and comments

* preglobal fix

* and the rest

* and this

* added hybrid to release

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2023-08-23 18:50:55 -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
Justin Newberry
d6c682b401 Subaru: Global gen1 experimental longitudinal (#28872)
* Add longitudinal support for Subaru Crosstrek and Impreza

* Update experimentalLongitudinalAvailable check

* Update supported cars list

* bump panda

* Remove/rename es_lkas_msg to es_lkas_state_msg

* Use stockAeb for AEB passthrough

* bump panda

* bump panda

* remove stockFcw from stockAeb

* Subaru: Add FCW_Cont_Beep to stockFcw signals

* bump panda

* bump panda

* update poetry deps: shellingham

* bump panda

* bump panda

* Revert "update poetry deps: shellingham"

This reverts commit 6e9b20964890c8a5c416a17b8aaad4cc16fddcfc.

* Merge fixes

* bump panda

* bump panda

* update supported cars list

* dont use counters for long control

* fix unittests

* submodules update

* only soft disable in long control

* use common functions and cleanup

* apply hystersis correctly

* move to comma repo

* use CanBus

* cleanup

* explicit copy

* behind a flag

* remove unrequired rpm checks

* add comment

* fix flag issue

* we still need to check rpm

* update docs

* enable long for a test route

* unit tests

* inactive throttle fix

* Update subarucan.py

* Update carcontroller.py

* Update carcontroller.py

* inactive throttle fix

* Delete settings

* fix rate limit

* bump submodules

* bump panda

* bump panda

* bump panda

* bump panda

* simplify initial implementation, remove AEB

* reduce initial complexity by not intercepting cruisecontrol or brake_status

* fix fwd hook test

* show pcb off warning

* cleanup and setup for tuning

* fix sumobuldes

* revert unrelated changes

* only whats required

* only whats required

* clean that up

* better comments

* behind the flag for now

* comments and minimize diff

* align stuff

* cleanup for PR

* apply review suggestions

---------

Co-authored-by: Martin Lillepuu <martin@mlp.ee>
2023-08-16 12:58:09 -07:00