Commit Graph

35 Commits

Author SHA1 Message Date
Justin Newberry
d4c497d826 add CarControllerBase base class to all CarControllers (#31630)
just base class for now
2024-02-28 17:13:44 -08:00
Jason Wen
7fbb7254fa Carcontroller: consolidate can sends method imports (#29695)
* Carcontroller: consolidate can sends method imports

* fix

* ruff
2023-08-29 10:51:50 -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
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
8f5057ff2d GM: enforce steering command message timing (#27250)
* draft

* bump opendbc

* still draft

* that's not right

* superset of the changes, 33hz

* cleanup

* this should work

* remove line

* pass it in again

* actually no need to check updated now

* now_nanos

* consistent name

* fix replay

* one line isn't that bad

switch

switch

* fix CarController tests

* Update ref_commit
2023-02-09 15:37:39 -08:00
Shane Smiskol
aab33b1c5f Lateral jerk unit test (#25759)
* stash

* more test

* less test

* clean test

* no angle

* add tolerance

* fix gm

fix gm

* test both

* lower some rates on hkg

* stash

* simpler

* bump panda

* Revert "bump panda"

This reverts commit f2137c221145cca723fe6ee3378ba947b7061965.

* only torque

* make kona pass

* duplicate __init__

* move

* half clean up

* half clean up

* more clean up

* more clean up

* fix static analysis

* calculate over 0.5 seconds

* limit to max steer

* type annotation

* calc once
2022-12-15 21:52:07 -08:00
Shane Smiskol
f36a3664b0 CarController: log steer sent to the car (#26743)
* log value sent to the car

* rename

* bump

* Update ref_commit
2022-12-10 02:03:40 -08:00
Shane Smiskol
a7fb5da6e5 Chrysler: fix LKAS fault for 2017 Pacifica (#26711)
* gate on FW

* fix

* reverse docs

* fix

* Revert "fix"

This reverts commit a0f2558fba0adc59c70eb92ffb8bd815bf033979.

Revert "reverse docs"

This reverts commit 9a46c517dfa7182f2f30501de801e35f7e1004c4.

Revert "fix"

This reverts commit 7b4d4bd3d2c2216890ea1877d52fdfbd9cec3ed7.

Revert "gate on FW"

This reverts commit 296826e71323e63f8e57b8988e573cef33149022.

* use a flag

* fix

* draft

* clean up

* clean up

* more clear

* comment

* remove
2022-12-07 12:04:33 -08:00
Adeeb Shihadeh
e0e0aad144 Chrysler: ensure control bit is high before torque cmd (#25465)
* Chrysler: ensure control bit is high before torque cmd

* move that & update refs

* check control bit too
2022-08-17 15:20:18 -07:00
Adeeb Shihadeh
d462a08056 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
2022-07-24 14:56:55 -07:00
Adeeb Shihadeh
0ca62bf7df let can packer handle counter (#25240)
* let can packer handle counter

* diff is expected

* update refs

* clean that up

* bump opendbc

* fix sim
2022-07-21 20:54:53 -07:00
Adeeb Shihadeh
d5719913a9 Chrysler: never drop control bit on older models (#25159)
* Chrysler: never drop control bit on older models

* update refs
2022-07-13 13:22:30 -07:00
Adeeb Shihadeh
97d7ee369b Chrysler: send LKAS control bit while above minSteerSpeed (#25150)
* Chrysler: send LKAS control bit while above minSteerSpeed

* update refs

* rework that a bit

* little more

* update refs
2022-07-12 23:11:55 -07:00
Adeeb Shihadeh
614b3a01f8 Chrysler: limit buttons to 20Hz (#25125)
* Chrysler: limit buttons to 10Hz

* cleanup

* 20hz
2022-07-11 22:10:06 -07:00
HaraldSchafer
bdfaa1d1ee Ram 1500 torque tune (#25117)
* torque control again

* 3mss per s

* no bad sensors

* tweaks

* Need more checks before we can do this

* update refs

* only ram for now

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-07-11 15:19:55 -07:00
Adeeb Shihadeh
ea80ee0845 Chrysler: resume from cruise standstill (#25009)
* Chrysler: resume from cruise standstill

* bump panda

* resume isn't set yet
2022-07-07 09:40:04 -07:00
Adeeb Shihadeh
9b0acacf5e Ram 1500 (#24878)
* RamInit

* bump submodules

* lil cleanup

* clean up carstate formatting and platform grouping

make tuple

* give it a gold torque star (looks around 2.4 from rough data)

* Dasm Fault

* bump panda

* more cleanup

* cleanup car state

* more cleanup

* some fixes

* remove more stuff

* fix angle signal scaling and fix lkas control bit

* bump panda

* update those

* same limits as pacifica

* cleanup hud alert building

* better fault logic

* fix rate

* set ahb

* bring that back

* update refs

Co-authored-by: Jonathan <jraycec@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Comma Device <device@comma.ai>
2022-07-06 23:42:07 -07:00
realfast
38ff2982eb Chrysler: carState signals update (#24760)
* carstate update

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-30 17:27:35 -07:00
Shane Smiskol
ed41b14b55 Chrysler: reduce ACC faults when disengaging on gas (#24445) 2022-05-07 01:23:19 -07:00
Shane Smiskol
3f0b06b16e Chrysler: clean up CarController (#24337)
* clean up

* max range is 15

* use wheel buttons counter and clean up

* no

* try spamming 10 times with next counter value

* try 50 hz

* this is dead code

* revert behavior changes, just clean up

* revert more

* also that

* no multiline can creation

* sort imports
2022-05-03 13:17:24 -07:00
Adeeb Shihadeh
2219cb4478 cars: cleanup CS usage (#23957) 2022-03-18 15:39:22 -07:00
Willem Melching
4f1eb4278a Log actuators after applying rate limits in CarController (#23230)
* return actuators from carcontroller

* log it

* pass to latcontrol

* chrysler

* gm

* honda

* more brands

* rest of the brands

* gm cleanup

* hyundai cleanup

* update ref

* rename field

* fix subaru

* add types

* more subaru fixes #23240

* consistent whitespace

* bump cereal
2021-12-16 13:08:20 +01:00
qadmus
0d61d8a4b6 int(round()) on apply_steer for correct comparison after rate limiting (#20425) 2021-03-22 13:01:33 +01:00
Drew Hintz
01f20229cb include PACIFICA_2020 in late-model behavior (#20399)
These models need to turn off gone_fast_yet bit at -3 to avoid LKAS
faults.

This was likely an accidental omission from PR #1297
To avoid future similar mistakes, we could define a list of these cars
in values.py instead of having the list in multiple places.
2021-03-18 17:29:36 -07:00
Willem Melching
e4cf43c6fc Move all CarControllerParams into values.py (#19663)
* toyota

* use scale from values.py

* nissan

* subaru

* honda

* gm

* toyota combine into CarControllerParams

* nissan refactor

* chrysler refactor

* mazda refactor

* hyundai refactor

* subaru refactor
2021-01-06 11:20:44 +01:00
Adeeb Shihadeh
892e1162c0 Car cleanup (#1924)
* cleanup car code

* more pruning

* little more

* less pylint disables

* radar stuff

* fix

* udpate refs

* fix honda bosch

* fix test
2020-07-25 15:07:27 -07:00
Adeeb Shihadeh
f3dcf861c7 enable flake8 E303: too many blank lines 2020-05-31 17:21:11 -07:00
Adeeb
6ff08f8dee Chrsyler: calculate checksum in CAN packer (#1438) 2020-04-30 15:43:59 -07:00
Adeeb
8d791d78dd Abstract pcmEnable and pcmDisable events (#1350)
* don't need individual prev state vars since whole CS is copied

* don't need a whole function since toyota alerts were simplified

* better here

* abstract pcmEnable/pcmDisable events

* the flippening came to NEOS

* delete

* unused

* Revert "the flippening came to NEOS"

This reverts commit 91cfb73b2914f637863335f4e5f5952620b3e977.
2020-04-10 16:12:58 -07:00
Willem Melching
85e8bb90d4 Merge 2019 and 2020 Chrysler Pacifica Hybrid (#1142)
* Merge 2019 and 2020 Chrysler Pacifica Hybrid

* fix carcontroller
2020-02-20 16:23:10 -08:00
Adeeb
13f60eae91 Abstract CarInterface init (#1131)
* abstract CarInterface init

* unused

* subaru

* gm cleanup

* vw

* typo

* carcontroller

* more cleanup

* fix vw
2020-02-19 20:37:07 -08:00
rbiasini
703eb511da Chrysler: carstate returns capnp struct directly (#1110)
* Before abstraction, adding speed init from VW as well

* strting to abstract carstate class

* fix bug and update lock?

* revert pipfile change

* another bug

* fix linter

* bug fix

* remove a bunch of diplicated kf code

* better to not have class vars. will abstract __init__ anyway later

* abstract common instance vars in carstate init and a generic gear parser static method

* abstract gear parser for chrysler

* abstract gm gear parser too

* remove unnecessary random vars

* Chrysler: carstate returns capnp struct directly

* revert ref commit

* test ref

* ops, missed this conflict

* not sure why this got deleted

* no need to copy

* remove copy import

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-02-17 13:35:51 -08:00
Drew Hintz
5aff2b6885 support for Chrysler Pacifica 2020 Hybrid (#1021)
* support for Chrysler Pacifica 2020 Hybrid
Thanks to Benson in Discord.
Example segment: 8190c7275a24557b|2020-01-29--08-33-58--7

* Add relevant route to selfdrive/test/test_car_models.py

* fix segment test name
2020-02-03 09:17:45 -08:00
Adeeb
dafdb79db2 Clean up ECU redundancy in selfdrive/car/* (#963)
* clean up ecu redundancy in selfdrive/car

* clean up gear parsing
2020-01-18 23:35:10 -08:00
George Hotz
71ead9adea selfdrive/car 2020-01-17 10:58:43 -08:00