Commit Graph

244 Commits

Author SHA1 Message Date
cl0cks4fe
dd9d5d4528 Unittest to pytest (#32366)
* add pytest-asyncio

* switch common

* switch selfdrive

* switch system

* switch tools

* small fixes

* fix setUp and valgrind pytest

* switch to setup

* fix random

* switch mock

* switch test_lateral_limits

* revert test_ui

* fix poetry.lock

* add unittest to banned-api

* add inline ignores to remaining unittest imports

* revert test_models

* revert check_can_parser_performance

* one more skip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-05-17 11:01:44 -07:00
Eric Brown
20c6cbc1d2 Remove ASCM harness footnote from car docs (#32271)
* Remove ASCM harness footnote from car docs

* Re-add Footnote class

* fix

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-04-22 12:22:48 -07:00
Shane Smiskol
9f4cf8017f GM: hide ASCM from car docs (#32260)
* stash

* clean up

* programmatically

* Update selfdrive/car/gm/values.py

* do flags later

* clean up
2024-04-19 20:33:48 -07:00
Shane Smiskol
fa1a6bcd6b GM: clean up test (#32261)
* not necessary

* Update selfdrive/car/gm/tests/test_gm.py
2024-04-19 19:38:39 -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
Adeeb Shihadeh
3a7582d9a6 Abstract out common CarInterface.apply (#31924) 2024-03-19 13:46:31 -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
Jason Wen
3d7595dfe3 GM Longitudinal: Display personality in instrument cluster (#31801)
* GM Longitudinal: Display personality in instrument cluster

* Correct value

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

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-03-11 13:31:01 -07:00
Jason Wen
5ca733c415 GM: Parse distance button from steering wheel (#31762) 2024-03-09 21:00:32 -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
Shane Smiskol
638aaa9e53 Platform configs: move tire stiffness into config (#31678)
* first one to open PR

* mazda

* oh it is

* fix gm car specs and create MazdaCarSpecs

* fix

* do honda

* ruff
2024-03-05 15:10:58 -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
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
Shane Smiskol
ec9856b784 GM: add more FW logging (#31633)
* add more DIDs

* one more

* update refs

* rm

* btr

* Update selfdrive/car/gm/values.py
2024-02-28 18:01:58 -08:00
Justin Newberry
d4c497d826 add CarControllerBase base class to all CarControllers (#31630)
just base class for now
2024-02-28 17:13:44 -08:00
Justin Newberry
9ecff49118 platformconfig: freeze all dataclasses (#31605)
* frozen

* frozen
2024-02-26 21:16:05 -08:00
Eric Brown
5012e15aa6 GM: move to platform config (#31553)
* subaru platform config

* forester wrong dbc

* spacing

* subaru car specs

* someday!

* more red diff

* Move GM to platform config

* Implement CarSpecs

* Simplify centerToFront

* Accidentally had subaru DBC

* Fix typo in DBC name

* done above

* two spaces

* that is moved up

* fix hardcoded fingerprints

* whitespace

* values

* better?

* fix

* bump

* fix

* fix

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2024-02-25 17:53:26 -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
Eric Brown
416e8253ec GM: Remove Equinox from dashcam mode (#31257)
* Remove Equinox from dashcam mode

* Add fingerprint

* Set moving backward only if not moving forward

* Bump opendbc

* Update moving backward definition

* Update docs

* Bump opendbc

* REVERTME: Add assert statement at Shane's request

* REVERTME: check unsupported and fault status

* Revert "REVERTME: check unsupported and fault status"

This reverts commit 5a0ebad66c4dcd33ee4eb5d0c5d3f036244653e2.

* Revert "REVERTME: Add assert statement at Shane's request"

This reverts commit b4b885eb11ad3079a84033f20f670cc905113bb9.

* Use or

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

* Add comment

* Add test route

* Use newer fingerprint

* Emtpy commit to rerun CI

* Empty commit to rerun CI

* Update selfdrive/car/gm/fingerprints.py

* little more

* remove from non-tested

* update

* add to releases

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Justin Newberry <justin@comma.ai>
2024-02-12 21:35:44 -08:00
Vivek Aithal
619625625c CHEVROLET BOLT EUV 2022: Add a simple neural feed forward (#31266)
* add simple neural feed forward

* update refs

* do not sample during inference in op

* update refs
2024-02-01 12:30:43 -08:00
Vivek Aithal
056b330e8b LatControlTorque: Add more inputs (#31252)
* add history and state to the ff inputs

* add history

* resolve comments

* remove history, simplify

* don't compute lateral accel, roll comp always
2024-02-01 04:12:48 -08:00
Eric Brown
1ab3745400 GM: Fix wheel direction signals (#31258)
* Fix wheel direction signals

* Update name

* Add comment

* Remove signal value table

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

* bump

* add 3

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-01-31 18:45:10 -08:00
Shane Smiskol
c2ee072907 format fingerprints: fix empty FW versions (#31230)
fix
2024-01-30 03:07:00 -08:00
Shane Smiskol
06f0e50964 GM: FPv2 logging (#31221)
* bump

* from https://github.com/commaai/openpilot/pull/27929

* get VIN on bolt!

* might as well try on other gms

* remove vin

* ugh gm is going to be slow

* fix

* should really fix this

* revert

* happy?1

* fix unit test

* bump

* functional addressing must be an OBD gateway feature, this does nothing

* fix vin response

* fix addr!

* finally fix fw_versions bugs since boardd IsOnroad refactor

* for

* only bus 0

* clean up

* Update selfdrive/car/gm/values.py

* ChatGPT re-write

* filter out did

* todo

* oof

* preview: what multiple DIDs per ECU would look like in the future

* Revert "preview: what multiple DIDs per ECU would look like in the future"

This reverts commit 88f0d8611e638de644adc5feabade848c03d59e4.

* function to get all ecus

* we can remove this!

* can also do this!

* and this one too :o

* consistency

* yay

* clean up
2024-01-30 02:19:12 -08:00
garrettpall
58ef40eb22 GM: Add BSM from Powertrain Bus (#30861)
* Add GM BSM

* Move BSM check to fwdCam only

* Detect if BSM message if present

* Remove hardcoding

* Apply Commit Suggestion

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

* Cleanup Suggestions

* bump opendbc

* test out bsm

* BCMBlindSpotMonitors -> BCMBlindSpotMonitor

* Revert "test out bsm"

This reverts commit 0e166530e60165269c1be200f48ead9918d5fe96.

* up here

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-01-27 20:56:10 -08:00
Adeeb Shihadeh
af137bac58 GM: remove GMLAN dash msg (#30547)
* remove GMLAN

* update refs
2024-01-08 19:49:22 -08:00
Justin Newberry
3713e4d5ea add script to automatically format fingerprints file (#30792)
* Add script

* fix script

* fix script

* fix for subaddr

* run the script

* old style can fingerprints

* cleanup

* sort imports, make executable, fix path

* newline w/o newline

* match og can formatting

* match og formatting

* generate template once

* standard name

* less nested

* can fingerprints comments

* fix spacing

* no need for PLATFORM_TO_ENUM_NAME!

* prep for PRs

* comments for all, add honda comments

* Auto-generated fingerprint PR from fuzzy fingerprinting cars

* Revert "Auto-generated fingerprint PR from fuzzy fingerprinting cars"

This reverts commit 97bc9e3bdb9d819dcbe684ceba92ea702d40eaf0.

* even closer to original

* readd this comment

* and run script

* add to precommit

* add comments

* add comments

* add to release

* use for auto fingerprint

* disable precommit for now

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-20 11:18:29 -08:00
Shane Smiskol
adb04b5dc5 fingerprints: fix formatting (#30814)
formatting
2023-12-19 23:47:34 -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
Tim Wilson
b95d69ae1b Car port: CADILLAC ESCALADE ESV 2019 (#29913)
* add CADILLAC ESCALADE ESV PLATINUM 2019

* add test route

* Update selfdrive/car/gm/interface.py

* combine params

* that's just a trim

* wow, there's a huge torque offset (left is 1.2 m/s^2, right is 1.9 m/s^2 max lat accel)

* don't hard code

* Update selfdrive/car/torque_data/override.yaml

* consistent formatting

* add to releases

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-10-21 02:04:24 -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
Shane Smiskol
7ceccaf6c3 bump opendbc (#29922)
* change signals

* bump opendbc

* bump

* bump
2023-09-15 00:30:49 -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
Vivek Aithal
2fe3231b49 CHEVROLET SILVERADO 1500 2020: Make Silverado lateral tune non-linear (#29540)
add nonlinear values to silverado
2023-08-22 16:11:21 -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
1a08c2986e Revert "radard: tie radard frequency to modelV2 vol. 2 (#29240)" (#29474)
* Revert "static analysis fixes"

This reverts commit a1e85f3661.

* Revert "radard: tie radard frequency to modelV2 vol. 2 (#29240)"

This reverts commit 460f5c8e0b.

* update refs
2023-08-18 22:56:43 -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
Shane Smiskol
fd8f8d8785 CAN fingerprinting test (#29427)
* timing test

* test

* fix

* print

* loop

* clean up

* wider range

* Update selfdrive/car/tests/test_models.py

* Apply suggestions from code review

* run many times

* Update selfdrive/car/tests/test_models.py

* run for many its

* run with unittest and print as list

* Update .github/workflows/selfdrive_tests.yaml

* Update .github/workflows/selfdrive_tests.yaml

* total time is super inconsistent (body)

* Update selfdrive/car/tests/test_models.py

* clean up

* clean up

* clean up

* this works!

* draft

* test suite not as modular

* try something like this

* can do kb, but not too representative

* clean up

* remove kb? it depends on signals

* clean up

* more clean up

* rename

* just measure all CANParsers

* can do all this manually

* but this is way simpler

* comment

* stash

* draft

* draft

* remove old script

* clean up

* revert

* use it

* remove test

* opt

* no partial

* remove

* revert test_models

* test can fingerprinting

* so much simpler!

* fix dict resizing

* simplify

* need to do this

* fix

* move to new file

* rename

* comment

* ignore function-uses-loop-variable
2023-08-17 00:57:12 -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
morrislee
060aa33b99 Closer Silverado 1500 Weight (#29355) 2023-08-12 17:24:12 -07:00
Kacper Rączy
460f5c8e0b radard: tie radard frequency to modelV2 vol. 2 (#29240)
* radard: tie radard frequency to modelV2

Accumulate parsed messages until state is updated (toyota)

Same for honda

Rename rr to something more descriptive

* Change _update method name, since signature has changed

* Update ref commit

* Some renames

* Check for number of cans
2023-08-11 18:07:06 -07:00
Justin Newberry
e4ead4f183 Ruff: b905 (strict zip) (#29336)
* added mutable default args

* most of the Bs

* add comment about lrucache

* b905
2023-08-11 16:13:51 -07:00
Shane Smiskol
cbfcc40571 Car interfaces: remove hard-coded signal definitions (#27773)
* What if: no signals! 🙅🤌🎆

* do hyundai

* honda!

* do gm

* and vw! (sorry comments)

* do those

* -500

* little more

* fix subie

* change back

* bumpopendbc

* oof lol

* messages

* some clean up

* here too

* clean up honda radar_interface.py

fix

rm

* bump opendbc to master

* add todo

* rename checks in tesla/radar_interface

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-10 20:30:35 -07:00
Justin Newberry
7fdd9fc37c CI: Pylint to ruff (#29294)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad

* set line length

* pylint exclusions to ruff

* same excludes as old linter

* fix tools QA

* remove unrequired check

* revert linting third_party

* ignore e402
2023-08-09 13:26:54 -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
8bff75c010 GM: remove unused CANParser flag (#29244)
setting to 0 does same thing
2023-08-04 21:42:34 -07:00
Kacper Rączy
1774b4fc61 Revert "radard: tie radard frequency to modelV2 (#29063)" (#29243)
This reverts commit 255f5c13f2.
2023-08-04 20:25:40 -07:00