Commit Graph

27 Commits

Author SHA1 Message Date
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
Shane Smiskol
ed6e72ae1f car/__init__: missing ending newline 2023-08-25 00:43:29 -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
8dcd108972 Rename CivicParams (#29459)
* CivicParams -> ReferenceCarParams

* remove usage in interface

* better name

* revert
2023-08-17 21:02:09 -07:00
Justin Newberry
7ec52da33a Subaru: calculate steering angle rate (#29409)
* 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
2023-08-15 15:28:46 -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
Shane Smiskol
2a38f38be1 common_fault_avoidance: take a bool (#29328) 2023-08-11 00:27:53 -07:00
Shane Smiskol
dba4492aa0 Clean up common steer fault avoidance code (#29200)
* fix spacing

* more spacing

* better names and comments

* this default doesn't make sense

* or this

* explicitly boolean since latActive is
2023-08-01 14:02:15 -07:00
Justin Newberry
a19f8dce92 Homogenize Steering Fault Avoidance (#29140)
* fix subaru fault

* try this!

* wip

* try this

* this more or less worked

* this is all under gen2

* that needs to be up there

* comment

* steer_angle

* test

* wip

* wip

* sync

* wip

* cleanup

* remove print

* use sets and fix unittests

* common fault avoidance

* common fault avoidance

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* revert subaru to get this part merged

* revert name change

* revert name change

* revert name change

* same as before

* add test case

* also verify zero tolerance

* keep the current behavior

* split into multiple tests for easier debugging

* added comments and remove tests

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Comma Device <device@comma.ai>
2023-08-01 10:27:06 -07:00
Shane Smiskol
f99ac84b5c CanBusBase: fix offset calculation (#28938) 2023-07-14 11:06:22 +01:00
Cameron Clough
28bf743693 selfdrive/car: reusable CanBus helper (#28489) 2023-06-10 22:50:19 -07:00
Shane Smiskol
581fd62d26 steer limits: rename common dist to meas function (#27453)
* rename function

* make a wrapper function (ford uses dynamic up/down limits

* make two functions consistent

* make torque function convert to int
2023-02-26 17:32:52 -08:00
Shane Smiskol
d5688ae49f Angle control: fix limiting bug (#27428)
* fix steer up bug

* Update ref_commit
2023-02-23 16:18:32 -08:00
Shane Smiskol
41667d020a Car controls: common angle limiting function (#26732)
* common angle limiting function

* save a line
2022-12-08 16:26:41 -08:00
Jason Young
135270f65c Allow car port to define enable buttons (#25793)
* Allow car port to define enable buttons

* simplify

* oops
2022-10-12 16:27:23 -07:00
Shane Smiskol
ef26abcf65 ui: support ego speed hysteresis (#25702)
* toyota: match set speed from dash

* Use unit bit

* Use RSA2

* flip this

* Universal unit signal, set vEgoCluster

* remove this and bump opendbc

* detect if car interface sets cluster fields

* revert

* needs to be cp

* UI_SPEED is actually always in kph?

* forgot to actually convert it

* same in onroad

* try conv factor only for imperial

* Seems like UI_SPEED is not the UI speed at all

* the dash might floor it

* same openpilot behavior

* bump

* ego speed factor is dynamic across speeds, handle Lexus exceptions with
diff msg

* remove test, bump opendbc

* secret formula

* secret formula v2

* 1.03 is sufficient

* try short press

* bump opendbc

* surely this can be cleaned up

surely this can be cleaned up

* use filter

* redo factors

* try UI_SPEED again with a factor

try UI_SPEED again with a factor

* dash applies hysteresis to speed. this matches pretty well, but not exactly

* make hysteresis generic

* clean up

* revert this

* try this

* read from fake params

* should be mostly good for imperial now

* revert

* revert

* remove toyota stuff

* common function for everyone

* rm line

* fix

* an example with Toyota

* use CS.out

* one mph

* 1 kph

* cmt

* remove cmt

* abs it

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-09-13 23:34:51 -07:00
Adeeb Shihadeh
baef4c1fb2 expand fingerprint dict size for multipanda setups 2022-08-17 15:30:20 -07:00
Shane Smiskol
40deea7d7b Honda: fix enabling before PCM (#24715)
* Don't enable for pcmCruise Honda

* make it a no entry as well

* do in another PR
2022-06-02 22:06:01 -07:00
Shane Smiskol
eed6803ccc Button-enable cars: common functions for button events (#24678)
* function for creating button events

* fix

* one line

* alphabetical

alphabetical

* only needed once

* common function for enable events

* add to list

* extend

* fixes

* add type hints

* flip around
2022-06-01 12:03:34 -07:00
Dylan Herman
d2eef1955c add mypy check for return-any (#24379)
* add mypy check for return-any

* remove unused import

* typing

* remove unnecessary variable typing

* cleanup

* cleanup

* bump submodules

* small fixes

* only a problem on mac

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-05-12 14:59:00 +02:00
Adeeb Shihadeh
b07ddad6ed comma pedal: rename create_gas_command -> create_gas_interceptor_command 2021-11-20 20:13:58 -08:00
Robbe Derks
91987f38d4 Make pandaState and safetyMode a list (#22454)
* wip: move to pandaStates

* bump cereal

* wip: SafetyMode struct

* move to safetyMode

* fix typo

* this can be None

* fix potential empty pandaStates list

* fix thermald

* fix controlsd

* rename safetyModes to safetyConfigs

* update process_replay

* fix test_models

* bump cereal
2021-10-08 17:54:34 +02:00
Adeeb Shihadeh
a19d94ae2d Toyota: use FW query for DSU detection (#20615)
* Toyota: use FW query for DSU detection

* make sure we have at least some fw responses

* bool

* add test to test_startup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-04-20 14:32:34 +02:00
Greg Hogan
825821f010 Honda CRV BSM alert from B-CAN (#1867) 2020-07-21 17:41:45 +02:00
Willem Melching
843a64c72f Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Adeeb
d9bf9f0a40 Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
2020-05-30 20:14:58 -07:00
George Hotz
71ead9adea selfdrive/car 2020-01-17 10:58:43 -08:00