Commit Graph

55 Commits

Author SHA1 Message Date
Jason Wen
3d7595dfe3 GM Longitudinal: Display personality in instrument cluster (#31801)
* GM Longitudinal: Display personality in instrument cluster

* Correct value

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2024-03-11 13:31:01 -07:00
Justin Newberry
d4c497d826 add CarControllerBase base class to all CarControllers (#31630)
just base class for now
2024-02-28 17:13:44 -08:00
Adeeb Shihadeh
af137bac58 GM: remove GMLAN dash msg (#30547)
* remove GMLAN

* update refs
2024-01-08 19:49:22 -08: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
Justin Newberry
cf64b27168 Linter: Fix >160 line length test (#29287)
* test

* fix line length

* fix line length

* fix file size

* revert poetry

* cleanup for PR
2023-08-08 17:13:35 -07:00
Shane Smiskol
653daba9ed GM ASCM: don't apply gas when stopping (#28699)
* don't apply gas when stopping

* simpler?

* todo

* fixme
2023-07-14 05:58:17 -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
14d44e4444 GM: remove redundant CarController class variable (#27280)
* clean up

* fix check

* only set ts_nanos on update
2023-02-20 15:33:15 -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
ec6a55057f Rename GM CS variable to be consistent to the CAN parsers 2023-02-08 17:51:53 -08:00
Shane Smiskol
5b9f2c3fcd GM: refactor steering control code (#27251)
* hopefully easier to understand?

* space

* no confusing elif, move comment to relevant part

* better
2023-02-08 00:09:49 -08:00
Adeeb Shihadeh
6fa9b555a4 rename carState.radarOffCan to radarUnavailable (#27187)
* rename carState.radarOffCan to radarUnavailable

* bump cereal
2023-02-02 11:38:09 -08:00
Shane Smiskol
022ef679e6 GM camera ACC: reliable relay closing (#27164)
* Reliable relay open

* Reliable relay close

* ign in a loop

* fixes

* we need this

* log

* comment to remind me tmrw

* ign fix

* this makes it 2x more reliable, but messyyy

* Revert "this makes it 2x more reliable, but messyyy"

This reverts commit 03401dc4a705cfacbe5a7048d95dccb6fa80d57f.

* revert non-related stuff

* comments, spaces

* a stands for indefinite article

* not applicable for non-camera acc

* something...

* Revert "something..."

This reverts commit de8a158488efd5ef257434fbc3c55aefff800cb7.

* Update ref_commit
2023-01-31 20:26:33 -08:00
Shane Smiskol
09cd0b4900 GM camera ACC: reliable relay open init (#27163)
Reliable relay open
2023-01-31 01:09:36 -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
2fb7b4ffad GM camera ACC: vision-only ACC behind toggle (#25631)
* put gm camera voacc behind disable radar toggle

* bump panda

* bump panda

* bump panda

* experimental long

* fixes

* car control notes and fixes for Bolt EUV

* might enable stop and go

* consistent name

* min enable speed seems to be around 5 kph

* camera acc can engage under 5 kph if stopped

* comment

* comment

* remove this for now

* only real brake

* comments

* update max brake

* bump

* clean up/fix

* same if

* simplify

* fix

* old comment

* no brake_pressed

* temporary fault fix

* tune longitudinal

* update docs

* bump panda

* GM camera ACC cars have no regen in ACC

* cleaner

* cleaner

* fix

* set max gas

* fixes

* fix LKAS unavailable warning from camera

* only camera

* bump panda

* bump panda

* bump panda

* bump panda

* clean up gmcan

* clean up CC

* flip

* rm

* rm comment

* clean up

* custom starting/stopping probably not needed

* Update selfdrive/car/gm/carcontroller.py

* fix crash

* long tuning

* we need long control state to resume

* CAMERA_ACC_CAR not needed

* no interp on accel

* tuning

* formatting

* formatting

* formatting

* formatting

* formatting

* no need to init ccp

* makes more sense now
2022-11-02 02:46:29 -07:00
Shane Smiskol
27e315e58f GM: reduce LKAS faults while inactive (#26196)
* send at 10hz when inactive

* try to make it fine to switch rates

* fix rate

* todododo

* fine if we skip, we usually send too early

* clean up

* this may be required, 50Hz is not really needed to sync/initialize

* preserves previous behavior (not sure if this makes sense)

* Revert "preserves previous behavior (not sure if this makes sense)"

This reverts commit 3b297bca72307b5cba09bec4e2cd8e0f2761af42.

* Revert "this may be required, 50Hz is not really needed to sync/initialize"

This reverts commit a6b4693814214d3f508db922f3b371c402a13995.

* rm com

* Update ref_commit

* gate behind GM Cam

* common logic

* bet

* update refs
2022-10-25 00:12:49 -07:00
Shane Smiskol
66c01801a5 GM: clean up gmcan (#26206)
* camera

* clean up gmcan

* fix

* revv
2022-10-22 00:09:37 -07:00
Shane Smiskol
6efd2c3de3 GM camera ACC: cancel after delay (#26197)
* add delay to GM camera ACC cancel to avoid FCW and cruise fault

* we can revert brake pressed threshold now

* bump panda

* add proper threshold

* bump

* bujmp panda
2022-10-21 18:15:52 -07:00
Shane Smiskol
3a70253567 GM: inactive gas/regen safety (#26184)
* Add INACTIVE_REGEN

* bump

* Update selfdrive/car/gm/carcontroller.py
2022-10-21 01:14:15 -07:00
Shane Smiskol
63d552cafc GM camera ACC: hide take steering alert (#26010)
* add all signals

* try to forward this PSCMStatus

* fixes

* see if this works

* modify checksum when bit flipped

* bump opendbc

* so i can test without restarting

* bump

* bump panda

* clean up

* comment

* also fix this

* bump

* bump

* every 5 seconds

* only send our values

* fix

* try sending everything again (+1 counter)

* revert

* revert, forward msg

* forward

* fix that

* bump panda

* bump panda

* fine to not copy

* after cancel, pass bus

* fix

* Revert "fine to not copy"

This reverts commit 654ac1a7dad4f7b9b0a3de52768522fb60cc55bd.
2022-10-19 23:41:54 -07:00
Shane Smiskol
0f94d81b7a GM camera ACC: reduce LKAS faults on startup (#26039)
* GM camera ACC: no faults on start up 2.0

And by 2.0 I mean we don't need to wait for blocked msg support to be merged first to merge this without regressing accidental single blocked msg count handling.

* Send the camera counter + 1

* Keep updating the first counter until we get a message on the bus

* Only update right before sending so sent_lka_steering_cmd is updated first

* Update ref_commit
2022-10-11 22:33:37 -07:00
Shane Smiskol
fe509e0354 GM pcmCruise: cancel more reliably (#25454)
* Cancel more reliably

* Apply suggestions from code review

* Try sending multiple

* Apply suggestions from code review

* Apply suggestions from code review

* Update selfdrive/car/gm/carcontroller.py

* lower rate a bit

* try this

* Update selfdrive/car/gm/carcontroller.py
2022-08-19 12:04:12 -07:00
Jason Shuler
4ffe9e68db GM: Bolt EUV 2022-23 port (#24875)
* Switch to ECMPRDNL2 for GM gear

* Removing manumatic gear #

* values.py almost complete

* Silverado and Bolt EUV val and CP

* GM controller updated

* Cam hrns supp done (in theory)

* cleanup for new cars

* Remove extra constant

* WS, etc cleanup

* removing the unused

* Fix kpBP typo

* Updated docs

* Skip's PIF tune

* Dropped LKA CAN error patch

* Add silverado sigmoid ff

* CAN Err & LKA latch patch

* Remove EPS fault fix (another PR)

* Remove Silverado (another PR)

* clean up some common params

* Remove Escalade FP

Remove Escalade FP

* comment

* Premier is just a trim

Premier is just a trim

Premier is just a trim

* no footnote: new Bolt is like most other cars, older GM were outliers not at the camera

* clean up

clean up

* bump panda

* bump panda

* bump panda

* bump panda

* bump panda

* remove comments

* try spamming buttons on bus 2

* bump panda

* bumping opendbc w btn rc

* not needed for this port

This reverts commit 6af1f0ba799e075f877d7acc8ca0f117d97da361.

* add button safety

* Send next rc when spamming btns

* forward other signals in message

* missing DriveModeButton

* fill cruiseState.speed

* see if resume works without counter

* try the whole message

* send immediately and at 10Hz

* no resume, back to just button signal

* even holding random buttons it cancels

* Use torque controller with base tune

* stock long GM don't auto-resume yet

* Testing GM zero min steer speed

* Revert latcontrol

* revert opendbc

* latActive is basically lkas_enabled

* Update Bolt torque params

* comment

* clean up

* Add to releases

* Add test route

* Don't specify segment

* bump panda

* bump panda

* no harness for Bolt just yet

* Apply suggestions from code review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* We support all and 2023

* move safetyParam up to first cam check

* Bump panda and update docs

* Update RELEASES.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

Co-authored-by: Shane Smiskol <shane@smiskol.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-12 16:10:34 -07:00
Tim Wilson
2a4020da60 GM: separate EV/ICE gas/brake lookup tables (#25354)
* GM: separate EV/ICE gas/brake lookup tables

* removed blank line

* V are the same

* comment

better ordering

comment

comment

* Add some delay for the laggy brakes

Add some delay for the laggy brakes

* move actuator to only acadia

* start braking at 0 m/s/s

* Revert "start braking at 0 m/s/s"

This reverts commit 55c1dee733aab3dc037fb1705c9bd0ace55c849f.

* add delay for escalade

* revert EV changes

* Update selfdrive/car/gm/carcontroller.py

* comment

* only ACADIA

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-08-08 13:55:40 -07:00
Adeeb Shihadeh
d462a08056 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
2022-07-24 14:56:55 -07:00
Shane Smiskol
d2c2154a32 Clean up CarControllers (#25008)
* do VW

* Do the rest

* unused

* ford cc formatting

* final clean ups

* also just return update output
2022-06-30 17:23:12 -07:00
Jason Shuler
9279c02258 GM: prep and cleanup for future ports (#24910)
* Interface radarOffCan set, comments

* pass pcmCruise value to common events

* add transType and networkLoc to iface

* carstate use transtype to detect EV

* ctrl: limit sends by config

* Add clarifying comments for new vals

* clean up

* comment on new line

* these have the same frequency

* remove 25hz

* add to upper comment

* update refs

* update refs

* move into same block

move into same block

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-06-30 15:47:26 -07:00
Shane Smiskol
0f61a388c3 GM: resolve cruise faults (#24167)
* these should be enabled

* bump panda

* bump

* allow in pre-enabled state

* bump panda

* add comment

* bump and update refs

* bump panda

* bump panda
2022-04-07 20:44:09 -07:00
Shane Smiskol
c8f5b21744 Clean up CarInterface.apply and CarControllers (#24060)
* do tesla

* parentheses

* Do Chrysler

* Make sure Hyundai long never actuates when long inactive

.

* clean up Hyundai

* more clear

* formatting

* Stock sets these to zero

* fix params

* move jerk logic into CC

clean up
2022-04-05 23:38:45 -07:00
Adeeb Shihadeh
5c3f3e44bc break up selfdrive.config (#23959)
* break up selfdrive.config

* add to release files

* fix import order
2022-03-13 21:42:39 -07:00
Shane Smiskol
629399a449 carControl: add long and lat active fields (#23859)
* proof of concept

* actuators packet describes which actuators are active

* bump cereal

* fixes

* not needed for this PR

* Do Toyota

* add back controlsState.active

* bump cereal

* rest of cars

* in actuators

* add active back

* which

* use controlsState.active for now

* will make an issue

* Update selfdrive/controls/controlsd.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* move local lat_active checks into CC.latActive

* remove redundant checks

* move comment

move comment

* fix joystick mode

* get enabled from carcontrol

* do standstill check in controlsd

* make sure we consider the gas press case for GM

* use CC.actuators

* fix

* capitalization

* Bump cereal

Bump cereal

* make intermediate actuators

* similar convention to before

* clean that up

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-13 20:58:44 -07:00
Adeeb Shihadeh
87849f93b1 better steer fault names (#23890)
* better steer fault names

* bump cereal
2022-03-01 22:53:55 -08:00
Adeeb Shihadeh
72e00a0768 No actuation while in pre-enabled state (#23658)
* No actuation while in pre-enabled state

* update refs
2022-01-28 16:03:44 -08:00
Dean Lee
a653461dec check in tuple instead of list (#23477)
* check in tuple instead of list

* Update selfdrive/car/toyota/carcontroller.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* Update selfdrive/car/mazda/interface.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-10 16:36:51 +01: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
Jason Young
b49f518782 GM: EPS fault workaround (#22404)
* seems legit

* panda -> loopback

* fix comment

* add some "why" comments for the next guy

* re-test with stock 50Hz rate

* ugly test

* Update selfdrive/car/gm/carstate.py

Co-authored-by: qadmus <42746943+qadmus@users.noreply.github.com>

* update refs

* Update selfdrive/car/gm/carstate.py

Co-authored-by: qadmus <42746943+qadmus@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-10-28 16:54:12 -07:00
HaraldSchafer
1ac89f14aa Change car controller interface from gas/brake to acceleration (#21911)
* retune civic

* seems smooth

* back to normal

* new ref

* fix conflict

* runs

* rm

* accel scale is 4

* toyota should be good

* more cleanup

* fixup

* better naming

* update ref

* deprecated

* sending brake when not enable causes a fault

* rm gas and brake

* unused

* update ref

* acura logic is no more

* wrong before

* revert tuning cleanup

* adress comments

* update ref

* already on master

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-08-30 09:32:52 -07:00
Jason Young
f5d9216a01 GM: Correctly handle EPS warning vs error states (#21641) 2021-07-18 12:50:50 -07:00
CrispinFlowerday
7458e143e3 Subaru: show LDW on dash for correct lane (#20934)
* Emit correct alerts for LDW Left & Right on Subarus

This change switches the ldw event to use VisualAlert.ldw and
alters all cars to use the prior behaviour for that alert, except
global subarus - they emit the correct warning to the dash

* Remove whitespace, and add comment about not overwriting stock alerts

Co-authored-by: Crispin Flowerday <crispin@theflowerdays.com>
2021-06-07 15:06:28 -07:00
qadmus
0d61d8a4b6 int(round()) on apply_steer for correct comparison after rate limiting (#20425) 2021-03-22 13:01:33 +01: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
472fe66962 GM cleanup + ignition fix (#1729)
* small cleanup

* alertmanager handles that

* improve tuning

* below steer speed

* Revert "improve tuning"

This reverts commit 5d2de147d2c9979af09b7964ad59e4b95ddb2f2a.

* bump panda

* update refs

* bump panda
2020-06-18 12:24:47 -07: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 Shihadeh
6466ec982a enable flake8 E502: backslash is redundant between brackets 2020-05-31 17:41:18 -07:00
Adeeb Shihadeh
27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -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
Kishan Karunaratne
9256530a1d [GM] Show FCW from OP on dashboard UI / LED (#1596) 2020-05-30 10:17:04 -07:00
Adeeb
337529d5cb Add steerWarning and steerError to carState (#1444)
* Add steerWarning and steerError to carState

* fix gm and hyundai

* update refs
2020-05-01 13:13:12 -07:00