* move most of /car
* move some car tests
move some car tests
* fix selfdrive/car/tests
* fix selfdrive/controls tests
* fix the rest of the selfdrive tests
* bump opendbc
* fix all tests
* few more non-test references
* remove opcar and move docs to car
fix these debugging scripts
fix docs
* bump opendbc and panda
forgot panda
old-commit-hash: e735a7f379
* ban cereal and msgq
* common too
* do toyota/values.py
* do all fingerprints
* example without builder
* this still works, but no type checking anymore
* stash
* wtf, how does this work
* okay actually not bad
* safe
* epic!
* stash data_structures.py
* some clean up
* hell yeah
* clean up old file
* add to delete
* delete
This reverts commit 90239b7797.
* switch more CarParams stuff over
remove unused
* fix car tests by removing cereal! mypy forgets about dataclass if we wrap it :(
* fix this too
* fix this too
* remove more cereal and add some good hyundai tests
* bunch more typing
* override default with 20hz radar
* temp capnp converter helper
* more lateralTuning
* small union replicator is better than what i was trying, and fixes mypy dynamic typing issues
* can keep all this the same now!
* type ret: CarParams, add more missing structs, revert lateralTuning changes (smaller diff!)
* revert more
* get first enum automatically, but ofc mypy doesn't pick up the new metaclass so can't use :(
would have been `CarParams.NetworkLocation()`
* Revert "get first enum automatically, but ofc mypy doesn't pick up the new metaclass so can't use :("
This reverts commit bb28b228be.
* remove cereal from car_helpers (TODO: caching)
* remove a bunch of temp lines
* use dataclass_transform!
* remove some car.CarParams from the interfaces
* remove rest of car.CarParams from the interfaces
* same which() API
* sort
* from cereal/cache from fingerprinting!
* more typing
* dataclass to capnp helper for CarParams, cached it since it's kinda slow
* (partial) fix process replay fingerprintig for new API
* latcontrollers take capnp
* forgot this
* fix test_models
* fix unit tests
* not here
* VehicleModel and controller still takes capnp CP since they get it from Params()
* fix modeld test
* more fix
* need to namespace to structs, since CarState is both class and struct
* this was never in the base class?!
* clean that up again
* fix import error
fix import error
* cmts and more structs
* remove some more cereal from toyota + convert CarState to capnp
* bruh this was wrong
* replace more cereal
* EventName is one of the last things...
* replace a bunch more cereal.car
* missing imports
* more
* can fix this typing now
* proper toyota+others CS typing!
* mypy can detect return type of CS.update() now
* fix redeclaration of cruise_buttons type
* mypy is only complaining about events now
* temp fix
* add carControl struct
* replace CarControl
i hope there's no circular imports in hyundai's CC
* fine now
* lol this was wrong too
* fix crash
* include my failed attempts at recursively converting to dataclass (doesn't implicitly convert types/recursively :( )
but attrs does, maybe will switch in the future
* clean up
* try out attr.s for its converter (doesn't work recursively yet, but interesting!)
* Revert "try out attr.s for its converter (doesn't work recursively yet, but interesting!)"
This reverts commit ff2434f7bb.
* test processes doesn't fail anymore (on toyota)!
* fix honda crash
* stash
* Revert "stash"
This reverts commit c1762af4e7.
* remove a bunch more cereal!
* LET'S GOOO
* fix these tests
* and these
* and that
* stash, something is wrong with hyundai enable
* Revert "stash, something is wrong with hyundai enable"
This reverts commit 39cf327def.
* forgot these
* remove cereal from fw_versions
* Revert "remove cereal from fw_versions"
This reverts commit 232b37cd40.
* remove rest of the cereal exceptions!
* fix that
* add typing to radard since I didn't realize RI.update() switched from cereal to structs
* and here too!
* add TODO for slots
* needed CS to be capnp, fix comparisons, and type hint car_specific so it's easier to catch type issues (capnp isn't detected by mypy :( )
* remove the struct converter
* save ~4-5% CPU at 100hz, we don't modify after so no need to deepcopy
btw pickle.loads(pickle.dumps()) is faster by ~1% CPU
* deepcopy -> copy: we can technically make a reference, but copy is almost free and less error-prone
saves ~1% CPU
* add non-copying asdict function
* should save ~3% CPU (still 4% above baseline)
* fix that, no dict support
* ~27% decrease in time for 20k iterations on 3X (3.37857 -> 2.4821s)
* give a better name
* fix
* dont support none, capitalize
* sheesh, this called type() on every field
* remove CS.events, clean up
* bump card %
* this was a bug on master!
* add a which enum
* default to pid
* revert
* update refs
* not needed, but consistent
* just Ecu
* don't need to do this in this pr
* clean up
* no cast
* consistent typing
* rm
* fix
* can do this if we're desperate for the last few %
* Revert "can do this if we're desperate for the last few %"
This reverts commit 18e11ac788.
* type this
* don't need to convert carControl
* i guess don't support set either
* fix CP type hint
* simplify that
old-commit-hash: 6a15c42143
* chrysler down
* honda and ford
* we can pass the class for this
* do the rest
* clean that up
* remove EventName
* fix CI
* move smallest bodies to top
* rm todo
* eps_timer_soft_disable_alert is too ingrained in carcontroller
* re-did everything w/ no diff (except just passing cereal instead of class)
old-commit-hash: cf39cc823a
* ban all of common & copy numpy_fast
* add numpy_fast
* these are okay
* and ban controls
* better name
* Conversions
* do utils, kalman
* clean up
* sorting
* don't forget
old-commit-hash: 8d961a12e5
* car logger
* try this
* fix double printing!
* clean up
* need to import where we actually use it (card won't be in submodule)
* NullHandler does not forward everything properly, need propagate=False to stop root logger from printing
* card is staying
* set up
* forward
old-commit-hash: 12a7b7f7fb
* Reapply "selfdrive/car: ban imports from external modules" (#32993)
This reverts commit 626d78ec548fe19acfdf3c2c3e063fac3b257dc6.
* controls will just use controls
* also these
* ignore
old-commit-hash: d684d8f0f6
Revert "selfdrive/car: ban imports from external modules (#32973)"
This reverts commit c1e8ff2dbc47ccb07fb41a4e88bfb66af2669254.
old-commit-hash: 35a4a773f1
* 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>
old-commit-hash: 489528dcae
Revert "common PlatformFlags base class + test for < 32 bits (#31779)"
This reverts commit 7e75a99b03be1289aa515894e81caa1138374a38.
old-commit-hash: 99610c8819
* part 1. Toyota platform config
* more
* everything works now
* no more DBC
* janky but that saves a lot of car lines
* need to init inside values or else it won't be reliable
* no return
* fixes
* minor update
* common flags, no dbc grouping
* some clean up
* some clean up
* rename
* copied wrong :(
* another
* copied specs for easiest ones first
* second easiest
* fix erroneous commas
* more clean up
* do the rest
* bug
* the refactor is so error prone
* huh?!
* static
* fix stiffness factor
* detect unsupported DSU
* Revert "detect unsupported DSU"
This reverts commit 9b72de6c8e.
* fix DBC diff
* test carparams
* test sets
* scratch
* catches this
* Revert "scratch"
This reverts commit de08daa9fb.
* Revert "test sets"
This reverts commit 62402f9b02.
* Revert "test carparams"
This reverts commit b02971659c.
* Update ref_commit
old-commit-hash: 52ee070fe0
* fuck me!
* that kinda makes things pretty nice
* move it down
* and move this comment
* Wip
* more flags :/
* add the debug shit
* add
* lets not break this yet
* MORE flags git add .git add .git add .git add .!
* B
* add mando
* update ref
* possibly better?
* we can use flags here
* formatting
* formatting
* move up
* canfd subclass
* this is more clear
* spacing
* static!
---------
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: e341707b0f
* 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
old-commit-hash: 3a6c3315ab
* 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
* well that sucked
* cleanup and follow refactor
* diff reduction
* oops
* fix
* force fingerprint
* Revert "force fingerprint"
This reverts commit 600fbcd7d5.
* space
* Fix specs
* this one too
---------
Co-authored-by: Justin Newberry <justin@comma.ai>
old-commit-hash: da540eac13
* 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
old-commit-hash: 1161d33c18
* 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 37e0277e4b.
* no optional
* fine
* add comment
* clean up honda
* one line
* can also do this
* but unclear
This reverts commit 1984a72cc8.
* bumppanda
old-commit-hash: 24f5a6170d
* calculate rate
* added adeeb's comment
* move to selfdrive/car
* that makes way more sense
* much simpler
* fix rate
* preglobal doesn't have a counter
* update ref
* merge
* update ref after merging
old-commit-hash: 7ec52da33a