Commit Graph

24 Commits

Author SHA1 Message Date
Adeeb Shihadeh
16ec56398c 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
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Justin Newberry
715f028a0e Ruff: enable flake8-builtins (#29315)
* enable flake8-builtins

* replace any with contains

* fix typo in pack

* fix type

* format is from the parent module, has to be enabled

* item_id

* fix item_id

* disable for id since that's what the remote server returns
old-commit-hash: 8793cbff40
2023-08-10 18:58:22 -07:00
Justin Newberry
a14f162bc7 Ruff: comprehensions conventions (#29317)
ignore c408
old-commit-hash: 4a9afd7554
2023-08-10 16:40:30 -07:00
Maxime Desroches
dcdb4db5b9 car docs: test print_docs_diff (#28459)
* test print docs

* delete

* remove this

* print
old-commit-hash: 181b44b28e
2023-06-09 14:13:22 -07:00
Shane Smiskol
31c1e66a01 car docs: document parts of parts (#28292)
* more stuff

* even more

* all parts func

* start to use it

* include self in parts

* use car_parts_new

* not used

* more usages

* remove get_parts

* remove more commented stuff

* remove iter

* clean up some more stuff

* more

more

* ford

* optional

optional

* nissan

* use new classes

* fix tests

* fix

* order

* no more required

* connector

* CARS.md

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
old-commit-hash: 024abe6455
2023-05-31 21:30:50 -07:00
Maxime Desroches
734b6481b7 car docs: list all needed hardware (#28212)
* generic car parts

* better carparts

* add part type

* more tests

* multiple enums

* unit tests

* just check isinstance

* better name

* remove _connector suffix

* remove those hyundai lines

* remove default arg

* Revert "remove default arg"

This reverts commit 139650a3b6b94358c3b9b12bb5fbe0a326d7abad.

* cleaner code structure

* use fingerprint

* review

* abstrac data class + common

* no more dataclass

* conflict

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 9f5f8b603c
2023-05-22 10:17:33 -07:00
Maxime Desroches
4626add29c add harness kit content to the doc (#28139)
* add harness kit content to the doc

* parts as enum

* nissan

* merge column

* rename column

* scaling

* scaling again

* 500px

* align text

* more px

* add style

* more width

* more

* more

* smaller text

* make all text smaller

* prev width

* default list

* remove hidden a ref

* try to remove again

* revert

* replace harness with harness_kit

* try fix

* cleaner

* center everything

* make pylint happy

* allow more than 1 of each parts

* use copy module

* review

* testing spacing

* revert

* bigger text

* formating

* split harness col lines

* remove print

* resolve

* rename to view

* keep formating in template

* simplify

* add unit test

* more generic way

* better

* harness connector only

* comment

* review

* put back harness parts

* missing dash

* too much space

* don't reload when clicking

* shorter comment

* only last line

* generate

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 70677fe5fc
2023-05-15 15:33:54 -07:00
Shane Smiskol
82b4e11585 car docs: speedup test (#26337)
* faster

* faster
old-commit-hash: 80e8d76d39
2022-11-02 20:40:42 -07:00
Shane Smiskol
c32368fd20 Car docs: test no duplicate years (#25975)
* unit test

* clean up

* revert test

* clean up

* like this

like this

* no model model
old-commit-hash: 6db9f051f7
2022-10-05 17:09:46 -07:00
Cameron Clough
a16eff689a Kia: update required packages (#25824)
* Kia: LKAS is standard on Ceed 2019

https://www.downeys.co.uk/newmodels/Ceed_V3_24_09_2019.pdf

* Kia: delete Forte 2018

It doesn't appear that this vehicle has Adaptive/Smart Cruise Control in
any form, which was later added in 2019.

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-forte.pdf
https://cdn.dealereprocess.org/cdn/brochures/kia/2019-forte.pdf

* Kia: LKAS is standard on Forte 2019+

https://cdn.dealereprocess.org/cdn/brochures/kia/2019-forte.pdf
https://cdn.dealereprocess.org/cdn/brochures/kia/2020-forte.pdf

* Kia: rename Niro Electric to EV

https://www.kia.com/us/en/niro

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

* Kia: LKAS is standard on Niro PHEV 2018+

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-niro.pdf
https://cdn.dealereprocess.org/cdn/brochures/kia/2019-niro.pdf

* Kia: update required package on Optima 2017

The ACC package on the Optima 2017 is named "Advanced Smart Cruise
Control". It also doesn't have an LKAS package, only LDWS is available.

https://cdn.dealereprocess.org/cdn/brochures/kia/2017-optima.pdf

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

* Kia: LKAS is standard on Optima 2019

https://cdn.dealereprocess.org/cdn/brochures/kia/2019-optima.pdf

* Kia: revert package change to Seltos 2021

LKAS is NOT a standard package on the Seltos 2021

https://cdn.dealereprocess.org/cdn/brochures/kia/2021-seltos.pdf

* Kia: update required package on Sorento 2018

Similar to the Optima 2017, the ACC package on the Sorento 2018 is named
"Advanced Smart Cruise Control". It also doesn't have an LKAS package,
only LDWS.

SCC and LKAS were introduced in MY2019.

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-sorento.pdf

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

* Kia: SCC is standard on Kia Niro PHEV 2018-19

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-niro.pdf

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

* Kia: update required package on Optima Hybrid 2017

Similar to the Optima 2017, the ACC package on he Optima Hybrid 2017 is
named "Advanced Smart Cruise Control". It also doesn't have an LKAS
pacakge, only LDWS.

https://cdn.dealereprocess.org/cdn/brochures/kia/2017-optimahybrid.pdf

* update docs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 06fb52c146
2022-09-17 00:24:57 -07:00
Shane Smiskol
2f2016fda6 Car docs: show more information about cars (#25415)
* back to actual information

* remove some star code

* round speeds

* Try out showing lateral acceleration

* remove that

* Fix speed units

* Add harness and try rounding to nearest half before scapping it

fix

^2

^2

* Add back steering torque star

* Fix static analysis

* auto-generate header

* fix static analysis. set to Harness.none by default

* rm
old-commit-hash: 747bcb013d
2022-08-18 15:12:18 -07:00
Shane Smiskol
d98977c6c8 Car docs: test for missing harnesses (#25444)
* All cars must have a harness

* except body

* skip test

* Q for IoniQ
old-commit-hash: 574021a0ac
2022-08-15 21:44:15 -07:00
Shane Smiskol
e1ff4f9f5b CarInfo: parse out model years (#25208)
* add function

* split model and years

* typing and clean uop

* one function to split into make, model, years

* add test for bad years

* simpler re

* don't match only numbers

* clean up

* we can just use name

* clean up
old-commit-hash: b30871daad
2022-07-18 22:34:50 -07:00
Adeeb Shihadeh
89a11b1ca5 simplify compatibility docs (#25190)
* simplify tiers

* little more

* cleanup

* fix test
old-commit-hash: 500d16622c
2022-07-18 17:53:00 -07:00
Shane Smiskol
7f7ea75033 compatibility docs: fixup steering torque star (#24940)
* Ascent has good torque, hard code Toyota, print all unexpected torque star cars

* update docs

* Use subtests

* hardcode CHR for now

generate

* Hard code Impreza

* update refs
old-commit-hash: 789f2d195c
2022-06-22 01:03:29 -07:00
HaraldSchafer
f7edd5f3d3 Car interface: set max lateral torque from table (#24789)
* json

* better naem

* Read from table

* formatting and default to nan

* Generate docs

* Read from table

* this should be the same

* Prius v is full

* test we always set the tunes correctly

add to release files

* Set for all cars

Set for all cars

* Revert tuning changes

Revert tuning changes

* remove that

* fixes

* update ref commit for new maxLateralAccels

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 3066ad81a8
2022-06-10 17:57:23 -07:00
Shane Smiskol
c0c0250077 Common interface attribute function (#24731)
* replace get_attr_from_cars with get_interface_attr

* and not combining the brands

* explicit check

* minimize diff

* values
old-commit-hash: 3fbbb7f4b0
2022-06-03 04:16:39 -07:00
Shane Smiskol
0f85c8a19c CarInfo: Add test for missing platform info (#24607)
* Add test for missing car info

* Make optional
old-commit-hash: b73d7cf3a5
2022-05-23 14:22:10 -07:00
Shane Smiskol
077a70d80d Support RAV4 2022 with stock longitudinal (#24367)
* support for ICE 2022 RAV4

* add to releases

* swap

* add fingerprints from a5c341bb250ca2f0

* update test route

* update docs

* add test for rav4

* values.py is a comma file
old-commit-hash: bdaf174154
2022-05-18 19:04:11 -07:00
Shane Smiskol
10fb405bfa car info: function that sorts all car info into tiers (#24498)
* base function that returns all car info sorted by make model

* don't need to pass it in quite yet
old-commit-hash: dabcfd266e
2022-05-11 15:59:08 -07:00
Shane Smiskol
9f4c123a14 car docs test: check car name (#24193)
old-commit-hash: f3bcbb1b50
2022-04-12 12:45:31 -07:00
Shane Smiskol
bacfb41d63 car docs: enforce naming conventions (#24116)
* assert car docs naming conventions

* fix static analysis

* It's actually Plug-in according to Hyundai (Google capitalizes it)

* fix docs
old-commit-hash: 433f649faa
2022-04-04 15:50:27 -07:00
Shane Smiskol
426a300c21 docs: support for automatically generating website vehicles page (#24020)
* add vehicles.vue template

* add original vue file

* stash

* stash

* clean up a bit

* add template for now

* implement footnotes and tier copy

* no more generator

* convert to 2 spaces

* should work, now onto vue

* does GH handle this html well?

* fix

* auto-generate descriptions and make tiers' maps non-str

* remove old files

* move template specific variable into templates, should be a bit simpler

* js template is simplier too now

js template is simplier too now

js template is simplier too now

* add video links from the nice car_info

* make rows attributes

* clean up

* fix

* remove template

* experiment with video links in GH

add image

how does this look?

fix

* Revert "experiment with video links in GH"

This reverts commit 8375e717b563f7b4ecf009ffae00174de1a0b8e9.

* sort tier_car_info in place

* unused Tuple

* no type check

* fix script
old-commit-hash: 85d8997a8a
2022-03-23 13:42:53 -07:00
Shane Smiskol
bf8262394f Docs: auto-generate supported cars documentation (#23762)
* make CAR class enum, and values.py formatting

* Revert "make CAR class enum, and values.py formatting"

This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a.

* stash

* add supported packages and model years

* don't change model years in fps

* move Lexus to info dict and make int enum

* remove sometimes wrong model years from name string

* use enum names

* convert Honda's values

* nice names

* use name

* GM

* Mazda, Ford

* Hyundai: WIP

* finish Hyundai

* fix

* Nissan

* Subaru

* Tesla

* formatting is for another PR

* Chrysler: todo: unify the Pacificas?

* do volkswagen

* this isn't a zoo

* skip enums for now

* Update selfdrive/car/volkswagen/values.py

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>

* set All

* temp cars

* auto-generate CARS.md

* update type hinting

* add generated file

* add longitudinal star to cars that support disabling radar

* add TODO

* add notes

* add min_steer_speed exception for hatchback

* add minimum steering speeds

* Add exceptions and run generator

* Missing Telluride

* fix Prius v

* missing Prius Prime

generate

* start to convert years to strings

* Fixup Hyundai

* convert year sets to strings

* handle this

* missing S3

* Fix and add all missing cars (verified with script

* Supported Package fixes

* add get_tiered_cars

* Check radarOffCan for removing most Honda from op long

* Update for Avalon stop and go update on master

* Fix missing car params

* add my temporary script i'm using to verify new generated DBC

add my temporary script i'm using to verify new generated DBC

* generate with jinja template

* add header and footer

* clean up

* rename

rename

* add exceptions. jinja is nice, but why are its loop indexes starting at 1?

* add list of known car videos

* See how these look

* Add nice table formatting for column description

Add nice table formatting for column description

* generate

* consisten br tag

* small clean up

* temp

* Move car videos into CarInfo

* add new copy and rename to footnotes

* Revert "temp"

This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846.

clean up

* generate

* replace with svg

* simplify a bit

* add footnotes to CarInfo

* move some variables to docs.py

* Add video link for Acadia

* Make Footnote an enum so we don't use random ints

* static analysis fixes

* move to CARS.md

* fix last missing footnote

* add to release files

* rm test file

* use svg

generate

* fix sorting

* not needed

* not sure how this got here

* remove Sedan/Couple and add Diesel footnote

* finish todos

* move make specific footnotes to selfdrive/car/*/values.py

rename

* change to zeros

* align bottom to center

* Apply some suggestions

* Update selfdrive/car/mock/values.py

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

* Update copy

* Try headers + bullet points

* somehow better

somehow better

* finish updating copy

* move template and add links to sups

* stars shouldn't be clickable

that didn't work

try this

try this

this is better

* add type hints to CarInfo

add more type hinting

* optional needs a type and any covers all (?)

* move good steering torque to */values.py

* dataclasses are much nicer than attr

* use tuple

* Update docs/cars.py

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

* suggestions

* suggestions

* suggestions

remove

* clean up a bit

* add more type hints

* center stars and remove hardcoding from template

* update copy

* Add test

* Fix types

Fix types

* add supported cars documentation test

* clean up

* replace with docs_definitions

* Add back Footnote enums

* Ah so these are like fstrings!

* Update selfdrive/car/CARS_template.md

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

* Update selfdrive/car/docs.py

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

* Update year from master merge

* Fix longitudinal star from merge

* sort properly stars by Column enum

* clean up

* HKG: Sorry guys

* Prius V gets FSR star, like others

* Update selfdrive/car/docs.py

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

* update comment

* No Prius docs change for now

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 31a6b141d6
2022-03-16 21:27:05 -07:00