Commit Graph

24 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
Shane Smiskol
b895095031 Cleanup auto_fingerprints.py (#32377)
* messyyy

* super clean car wash

* rm
2024-05-08 15:58:27 -07:00
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
Shane Smiskol
e5107b1eab debug test_models script fixes (#32362)
* some things were renamed without checking

* fix that
2024-05-06 15:01:06 -07:00
Shane Smiskol
6acf763db4 Volkswagen: fingerprint on VIN chassis code (#32148)
* add function signature and behavior comment

* add test

* move chassis codes to platform config!

* add a shared chassis code test

* function

* test matching

* this commit isn't complete yet

* Revert "this commit isn't complete yet"

This reverts commit ae77d5cd54e1f43d390fb70c4da38a95ac34f8da.

* need to check WMI

* TODO: test WMI

* test wmi

* radar FW sanity check

* fix test

* fixes from merge

fixes from merge

* whoops

* fix static analysis!

* do match_fw_to_car

match_fw_to_car takes vin

* makes sense to keep it one function, and we can return exact or fuzzy!

* clean up

* kinda pointless

* fix more tests

* back to function being only fuzzy

* revert test_fw_fingerprint

* revert test_fw_fingerprint

* simplify

* clean up/fixes

* rename test

* less duplicatey WMI descriptions

* fix

* convert to enum

* I am confident about these WMIs

* these are also good

* we support 5N AUS/NZ and NAR (North American) AX Tiguans

fixes

* Tiguan also Mexico

* only one user for caddy

* got from the test route

* check that the gateway type matches the platform (each platform has 1 or 2 types)

* ~gateway~ -> exact FW match

* remove re

* ensure WMIs are set

* actually no reason to delete

* move comment up to the platform config

* proper wmis typing

* spacing

* flip
2024-04-12 22:00:03 -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
0b92f4e9ee more car info -> car docs (#31885) 2024-03-17 16:53:57 -07:00
Justin Newberry
ca5a2ed942 move getting platform to get_params (#31871)
* better

* string

* not here
2024-03-14 21:58:25 -07:00
Justin Newberry
a919d27afc fix car test routes typing (#31773)
* Fix typing

* and fix test_car_model

* fix
2024-03-07 11:33:40 -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
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
824ddffec8 CommaCarSegments: BIG Database! (#31169)
* sanetized selector

* god damn

* add to re

* slog branch

* slog

* source

* big

* not slog

* cleanup

* no space

* works!

* trigger

* main!
2024-01-27 01:07:29 -08:00
Justin Newberry
1bade14fda car porting examples: subaru fuzzy fingerprinting (#31139)
initial commit
2024-01-24 10:23:59 -08:00
Justin Newberry
dd0c474e6c LogReader: replace get_first_message with LogReader.first (#31146)
* first

* str
2024-01-24 10:21:57 -08:00
Justin Newberry
ac71c30ad5 auto_source: add commaCarSegments source (#31137)
add source
2024-01-23 21:40:04 -08:00
Justin Newberry
abf2801122 use get_first_message for auto_fingerprint 2024-01-23 20:59:32 -08:00
Justin Newberry
389b8ca30d add example of using the comma car segments database (#31117)
* add vin fingerprinting example

* perhaps!

* remove segment

* easier
2024-01-22 18:23:07 -08:00
Justin Newberry
3d73512c07 rename segmentrangereader to logreader (#30981)
* Replace multilogiterator

* replace logreader

* update readme

* fix from_Bytes

* new section

* reset before iter

* selector

* fix internal

* whitespace
2024-01-12 12:53:50 -08:00
Justin Newberry
8d9e431f43 car porting examples: add example of plotting the response of brake_pressure vs acceleration (#30958)
* another example

* add comment

* fix that

* oop

* fix link
2024-01-11 13:35:50 -08:00
Justin Newberry
0d126e1e9e SegmentRangeReader: new format for reading multiple segments (#30940)
* segment range reader

* rename that

* revert that

* cleanup

* revert this for now

* revert this for now

* Fix + test

* rm that

* rm that

* use for auto_fingerprint

* simpler

* for notebook too

* match numpy indexing

* just use numpy directly

* remove that

* spacing

* spacing

* use qlog for auto fingerprint

* add 'read mode'

* pass in read mode

* add test for modes

* numpy indexing

* fix that case

* more examples

* fix the notebook

* cleanup the notebook

* cleaner

* fix those
2024-01-10 11:55:19 -08:00
Justin Newberry
239b228ca6 add the notebook example to car port docs (#30920)
* add the notebook example

* fix link

* add image

* no lfs

* no lfs
2024-01-05 13:57:02 -08:00
Justin Newberry
e86d74b347 move car porting tools to tools/car_porting (#30916)
just this for now
2024-01-05 11:53:03 -08:00
Justin Newberry
15e0a906ad tools: add car porting example notebook (#30918)
* add car porting example notebooks

* not required
2024-01-05 11:52:24 -08:00