Commit Graph

3652 Commits

Author SHA1 Message Date
Shane Smiskol 35a99d7fc6 Common CI._update function (#33289)
* use CP

* no car control, consistent _update function signatures

* eh it's fine to name it whatever

* clean up

* oops

* !!

* now we can delete this!

* nobody does anymore
old-commit-hash: 7248b00086f9b8d5d95c80a2eb7fe89c387f44ea
2024-08-13 22:59:25 -07:00
Shane Smiskol fae517416e card: set mock carState fields (#33294)
* mock carstate inside card

* not used
old-commit-hash: cb61d0045cb38f7fed362a848dcf3646b130d951
2024-08-13 22:48:55 -07:00
Shane Smiskol 9cf575657e Move buttonEvents to CarState (#33292)
* move mazda button events to carstate

* do  more

* remove

* some more

* clean up
old-commit-hash: 9f14c447db234d90a8fafe55d3e7b6439198f19f
2024-08-13 22:30:46 -07:00
Shane Smiskol d26b49a409 Consistent spacing in car interfaces (#33293)
* formatting

* fix these

* not these
old-commit-hash: 29882b4519b00dbcd10f950dcf7c2986aae2fc1c
2024-08-13 22:08:48 -07:00
Shane Smiskol 6ab415bc59 fix static analysis
old-commit-hash: d65e1d9500be32f45ebd19ff939ecbc458fcc5ed
2024-08-13 21:28:06 -07:00
Maxime Desroches c551f1d239 fix bash + python3 shebangs (#33287)
fix shebangs
old-commit-hash: 1dcd66081531f4568a8de69637fc7a3f4ef3214f
2024-08-13 21:22:13 -07:00
Shane Smiskol b97ed10ea1 Car interface clean up (#33290)
* remove some defs

* now carstate

* remove carControl from CI update function

* almost merged that

* and that
old-commit-hash: 65fccbf7563ceca5ec84bb75ceb39556371a74de
2024-08-13 21:16:39 -07:00
Shane Smiskol e46d96bb11 Move events out of car interfaces (#33280)
* 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: cf39cc823ad5aea33af6d51214ffb14bc51ec6c4
2024-08-13 20:40:36 -07:00
Shane Smiskol 6a15aa3f8c interfaces: assume CarState is instantiated (#33284)
test to make sure mock doesn't crash!
old-commit-hash: 3d2fbe9aa3403e635d476fba9c8232b741e54cce
2024-08-13 19:36:21 -07:00
Shane Smiskol 7b4a538eaa fix fingerprint debug scripts (#33277)
* fix fp debugging

* fix these
old-commit-hash: 90ce7781f4caf0d0469d8897259612e4117e3a48
2024-08-12 15:41:08 -07:00
Shane Smiskol 7a4b2b5c44 [bot] Fingerprints: add missing FW versions from new users (#33276)
Export fingerprints
old-commit-hash: 4618e8c12403bd1d716cf6ac224f5a0dc4960722
2024-08-12 12:41:14 -07:00
Shane Smiskol 11c9105a60 carState: add invalid sensors field (#33266)
* add to CS

* add vehicleSensorsInvalid to CarState

* fix ord

* clean up
old-commit-hash: 7ec998634097f062afe8fb584e34e4c8a1d9fb54
2024-08-11 23:12:42 -07:00
Shane Smiskol d18a0868c6 move the body events to card (#33262)
* move the body events to card

* rm import
old-commit-hash: 093c09a7373868a77d8f9e56f7f26304601855dc
2024-08-11 20:25:08 -07:00
Shane Smiskol b014b1cc90 Fix some car typing (#33256)
* ??

* fix these

* more typing and some fixes

* fix

* rm this for now

* fix
old-commit-hash: 2dab8b31f20503b2eaf0d11302da31759d9867e2
2024-08-11 19:12:46 -07:00
Shane Smiskol 162436088f move capnp CarParams decoding out of car_helpers (#33251)
* move capnp byte decoding out of car_helpers

* always wanted to type this

* and process replay

* this does nothing

* might as well
old-commit-hash: ee62b9c88baf4a53f6db88381da2b8052c3fab17
2024-08-10 00:06:56 -07:00
Shane Smiskol 7dd22b9567 Honda: round minEnableSpeed correctly (#33250)
round to even
old-commit-hash: 4300f37cc4b6bd405391815afc5c6b2c740e7e43
2024-08-09 23:42:40 -07:00
Shane Smiskol a7db075f08 selfdrive/car: generic CAN send/receive callbacks (#33215)
* start

* hmm API doesn't seem great

* better

* rm line

* sendcan -> can_send callable for best static type coverage, list -> tuple msg

TODO: logcan

* more sendcan -> can_send references

* remove pandad's capnp from selfdrive/car

* fix and remove cereal from test_can_fingerprint

* test_fw_fingerprint: remove pandad, less cereal

* comment done too

* better comment

* fix test_models test

* niceeee it works

* move to can_definitions

* can't come up with a better name :(

* I think we can remove SimpleNamespace soon

* fix test_can_fingerprint.py

* maintain previous behavior

* Revert "maintain previous behavior"

This reverts commit f848fd32132391692c6191a305bb38f74091ec91.

* can test comment

* no need for get_one_can now!

* big clean up: no SimpleNamespace

* now self explanatory!

* not needed

* use empty can again since this is now real

* cmt
old-commit-hash: 9880b1393c7bfc2b71aec01b6b91caffb72f9cc0
2024-08-07 23:49:25 -07:00
Shane Smiskol 8131716c9e CAN fingerprinting: count empty CAN packets as frames (#33232)
* content of can packet won't affect can fingerprint time

* remove get_one_can

* fix comment

* actually we still want to be able to send empty can (xx fingerprint func does this if it runs out of msgs)

* fix process replay
old-commit-hash: 87f183f43cccdb07f6fb9d0947f4ada2d806e294
2024-08-07 23:12:47 -07:00
Shane Smiskol c1084b3df3 selfdrive/car: rm make_can_msg (#33231)
* rm make_can_msg

* fix
old-commit-hash: bd4f0cec18d7f22f16d906de5c3b0f97ae1450ae
2024-08-07 21:58:16 -07:00
Shane Smiskol 7f4f1d4c5f make_can_msg: returns tuple (#33222)
* bump

* make_man_msg returns tuple

* fix CI.update typing

* bump

* better name

* Revert "better name"

This reverts commit 4deb38d4ed99e43721960f69da1dd46a1069eb42.

* common
old-commit-hash: 51bd3682148ce7a00ac76281d76c278716a1c24a
2024-08-07 16:12:00 -07:00
Shane Smiskol 54d10c2aa3 remove CAN capnp conversion from car interfaces (#33218)
remove pandad from interfaces
old-commit-hash: ba7a60c5a20c5f252bc89ba3e2559edf5ab65c59
2024-08-07 00:05:32 -07:00
Shane Smiskol d8f56b30b5 selfdrive/car: ban common (#33210)
* 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: 8d961a12e5b033855f2abf5d8bd9c51374f74c6e
2024-08-06 20:45:11 -07:00
Shane Smiskol 2c49f6b20d selfdrive/car: ban selfdrive/controls (#33211)
ban controls (VM isn't used anymore)
old-commit-hash: 6c837332ea9ae854caf4f7747d3ef84101cd93c6
2024-08-06 16:36:38 -07:00
Shane Smiskol c0f721180f get_car: returns just CI (#33204)
just return CI
old-commit-hash: d00a53983089be6bed0e037474abfea823f2fc3e
2024-08-06 00:30:25 -07:00
Shane Smiskol 1a74993ee2 selfdrive/car: ban params (#33198)
* ban params too with a callback

* all sorts of messed up

* use cloudlog

* consistent order

* order

* better type hint

* format

* this is a bit nicer

* hmm

* fix PLR1704

* no carvin

* fix process replay
old-commit-hash: 5a1596a32299d6f78d89c89469ab6893b8d5e083
2024-08-06 00:10:53 -07:00
Shane Smiskol 59b2f1f511 fingerprinted: log platform string
This does get safely converted to a string in the logs, but in the console it's the repr
old-commit-hash: d1140cc6440c9dba795743dd0f0b82915879fbb7
2024-08-06 00:08:39 -07:00
Shane Smiskol a1c2971f13 selfdrive/car: OBD callback (#33200)
* finish

* pass empty cb

* last fix!

* i keep messing this up

* even more coverage!

* not needed
old-commit-hash: 86aeb123bcdac9544db046a2db7e2974b5a687e1
2024-08-05 23:30:52 -07:00
Shane Smiskol 3df0a1ebbf remove CarVin parameter
old-commit-hash: 87c6afccf71788ba58685f43d967290816d4dfbf
2024-08-05 22:31:04 -07:00
Shane Smiskol 9e4a7484be remove unnecessary debugging function from car_helpers.py (#33199)
* format

* better better

* huh
old-commit-hash: 5c1e111d8a8476a2bddaeee29fcaca1c2c38f609
2024-08-05 21:27:43 -07:00
Shane Smiskol c45e72dd2f remove more car import exceptions (#33193)
* remove another exception (remove mention of events from car stack)

* guess this should've been here all along

* reorganize exceptions

* fix
old-commit-hash: 06216d43bbd0926cfd89c91c43cfc0cf9247c324
2024-08-05 17:27:28 -07:00
Maxime Desroches df13b36638 fix all codespell issues (#33194)
* bring back

* remove 2020 dictionary
old-commit-hash: 44c7144e1c5f5aa66596c8d240b64827148b960d
2024-08-05 15:25:02 -07:00
Shane Smiskol 550178261a [bot] Fingerprints: add missing FW versions from new users (#33191)
Export fingerprints
old-commit-hash: 7a7200cbdadba2c33d9c561a90259e7f458bfc1b
2024-08-05 13:29:14 -07:00
Shane Smiskol cfc2cda37c separate car logger forwarded to cloudlog (#33170)
* 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: 12a7b7f7fb1d3a275314b0232795942a7ff3b955
2024-08-05 12:31:31 -07:00
Shane Smiskol 799fabd707 Reapply "update to new opendbc API (#32009)" (#33151)
This reverts commit f2f01e3afaeaa267af61c8d7ab918da04d3411f2.
old-commit-hash: 7c112341c358b57ee9d0209cb2b2c53383adcca9
2024-07-31 15:37:39 -07:00
Shane Smiskol 0ea25665bb get_fw_versions: test the full stack (#33156)
* add the test

fix

* bump

* not sure why mypy didn't catch this
old-commit-hash: ebff7cab1ab897526800e229e30b01ec4cf1114c
2024-07-31 14:53:13 -07:00
Shane Smiskol 2c11e7b49a Revert "update to new opendbc API (#32009)"
This reverts commit d21755b2e216c3f547db0b55b7088357c4368801.

old-commit-hash: ac130001cc83734118524f59a83a96a2065dd56e
2024-07-31 02:38:44 -07:00
Dean Lee 2f1ee6e832 update to new opendbc API (#32009)
* use new opendbc api

* export pandad_python

* merge master

* merge master

* bump opendbc

* bump opendbc

* improve func

* keep interface unchanged

* fix test_car_interfaces

* bump opendbc

* bump opendbc

* fix test_models

* the interface now has to convert from can capnp to list, so we should include this time

* goes from ~210 to ~240 mean ms real time

* remoe busTime

* lowercase sendcan

* consistent msgtype

* bump

* bump

* not used in lat_mpc

* space

* bump to master

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 0dddc97dca8bf4e023b29c35cb92fd3dd0a9a3a2
2024-07-31 00:24:46 -07:00
Shane Smiskol b4b3ae5da8 CarController: call to super's init (#33148)
* this should be common

* super!

* bump

* and frame is common

* bump
old-commit-hash: 1b6ac2d876fe3170968944722df67ee815d8cb1b
2024-07-30 23:55:23 -07:00
Shane Smiskol 5cc7d1c36b deprecate busTime (#33146)
* deprecate busTime

* bump

* do car can + more

* forgot some

* bump opendbc

* fix that too

* bump
old-commit-hash: 42f2601416bcb53c25e24b899131e66ee00177b8
2024-07-30 21:26:58 -07:00
Shane Smiskol 7b724ed243 tester present msgs: use helper (#33147)
use helper
old-commit-hash: b6d124d268ec705585e49d4ba84a316810e3b2b8
2024-07-30 18:09:22 -07:00
Shane Smiskol 5e0168a7f0 Ford: add long controls todo
old-commit-hash: 661ef03a24171addba79b69bb14867425f5a9474
2024-07-30 15:18:26 -07:00
Shane Smiskol 2cb381997f cars: remove some external imports (#33133)
* ford and gm

* clean that up

* also this

* honda

* temp fix

* move into selfdrive.car

* clean up

* more
old-commit-hash: 0739d79a512965abbe22f0b15c7fddcdd71478d0
2024-07-30 14:27:27 -07:00
Shane Smiskol 3e39d610bc [bot] Fingerprints: add missing FW versions from new users (#33123)
Export fingerprints
old-commit-hash: 606890cba5ca8c65391abebba505fc211ca1e6b4
2024-07-29 12:32:51 -07:00
eivegau 805f2ff3bf Kia: add missing Optima EUR FW versions (#33027)
* Update fingerprints.py

* Apply suggestions from code review

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: cd8a603ad0f14d744d12e2f5f743c7880ce907a3
2024-07-25 13:47:43 -07:00
Shane Smiskol fd0fc08f8a [bot] Fingerprints: add missing FW versions from new users (#33039)
Export fingerprints
old-commit-hash: bd00a9d800c1cf308feb2bf85f7fde11d6f0ff7b
2024-07-22 13:36:53 -07:00
Shane Smiskol 30848f76d7 [bot] Fingerprints: add missing FW versions from new users (#33038)
Export fingerprints
old-commit-hash: 8d77cea3a509ac80c18ecdd705a9f01754d1cb2c
2024-07-22 13:05:57 -07:00
Shane Smiskol 927bde4936 [bot] Fingerprints: add missing FW versions from new users (#32996)
Export fingerprints
old-commit-hash: aa8484093e886cd8ae90e4eb42118306794fc439
2024-07-15 14:40:24 -07:00
Dean Lee 34e307fd94 selfdrive/car/ecu_addrs: prefix internal functions with underscore (#32980)
underscore prefix
old-commit-hash: c0739cd9ee41ccd372bd8cd816c44dfce4e3a8a2
2024-07-15 12:05:20 -07:00
Shane Smiskol e8c4fb0177 Reapply "selfdrive/car: ban imports from external modules" (#32993) (#32994)
* Reapply "selfdrive/car: ban imports from external modules" (#32993)

This reverts commit 626d78ec548fe19acfdf3c2c3e063fac3b257dc6.

* controls will just use controls

* also these

* ignore
old-commit-hash: d684d8f0f6900d80a2a1618099b0b8e19e6492a2
2024-07-15 11:59:25 -07:00
Shane Smiskol a878118b00 Revert "selfdrive/car: ban imports from external modules" (#32993)
Revert "selfdrive/car: ban imports from external modules (#32973)"

This reverts commit c1e8ff2dbc47ccb07fb41a4e88bfb66af2669254.
old-commit-hash: 35a4a773f1ff6c7b171b7acdb2fd4a65279edebd
2024-07-15 11:14:04 -07:00