Commit Graph

80 Commits

Author SHA1 Message Date
Justin Newberry
267ce0dfca bump panda (#30419)
old-commit-hash: eed0ddc3b8
2023-11-08 16:30:22 -08:00
Justin Newberry
83038edcbf Subaru: initial eyesight disable support (#30373)
* initial eyesight disable

* disable_eyesight

* comment
old-commit-hash: 60b21b55d2
2023-11-06 22:13:39 -08:00
Justin Newberry
3b91610c0b Precommit: ensure executable bit is set (#29784)
* precommit ensure executable

* exclude tinygrad

* bump submodules

* exclude tinygrad globally
old-commit-hash: 4e69937d0d
2023-09-05 16:33:26 -07:00
martinl
5f1528708e Subaru: Ascent 2023 dashcam mode (#27583)
* Subaru: Add support for 2023 Ascent

* Update supported cars list

* Remove tester present from fw query

* merge master

* fix merge issues

* minimize diff

* add comment about 23 ascent

* add comment

* correct spot

* fix name

* nocap

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: a1bf66a0d2
2023-08-25 20:55:21 -07:00
Shane Smiskol
acec4fc22f Subaru: Forester Hybrid 2020 dashcam (#24770)
* Add support for Forester Hybrid 2020

Co-authored-by: martinl <martin@mlp.ee>

* it's a param now

* make it work

* fix

* merge and cleanup

* remove duplicate

* should be forester

* bump submodules

* should be abs

* add missing params

* still need a test route

* still need a test route

* consitent

* here too

* todo

* more

* Update selfdrive/car/tests/routes.py

* clean up

---------

Co-authored-by: martinl <martin@mlp.ee>
Co-authored-by: Justin Newberry <jnewberry0502@gmail.com>
old-commit-hash: 3719be8b76
2023-08-23 21:30:12 -07:00
Adeeb Shihadeh
56facfcc5a Subaru: Crosstrek Hybrid dashcam mode (#25378)
* Subaru: Crosstrek Hybrid support

* hybrid cars in dashcam only

* revert that

* just dashcam

* tah should be abs

* remove unused import

* use the old dbc for now

* hybrid car exceptions in carstate

* need dashstatus until we get a proper cruiseactivated bit

* missing CP

* merge conflicts

* lets be consistent about extend

* cleanup

* fix and comments

* preglobal fix

* and the rest

* and this

* added hybrid to release

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
old-commit-hash: 973d90be77
2023-08-23 18:50:55 -07:00
Adeeb Shihadeh
16ec56398c 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
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Jason Young
ac83f87b36 interfaces: add common STD_CARGO_KG to mass (#29416)
* cleanup std_cargo_kg

* fix Sonata mass

* remove snowflake construct

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: f76ffbdbbc
2023-08-17 21:06:07 -07:00
Justin Newberry
7faefd677b Subaru: Global gen1 experimental longitudinal (#28872)
* Add longitudinal support for Subaru Crosstrek and Impreza

* Update experimentalLongitudinalAvailable check

* Update supported cars list

* bump panda

* Remove/rename es_lkas_msg to es_lkas_state_msg

* Use stockAeb for AEB passthrough

* bump panda

* bump panda

* remove stockFcw from stockAeb

* Subaru: Add FCW_Cont_Beep to stockFcw signals

* bump panda

* bump panda

* update poetry deps: shellingham

* bump panda

* bump panda

* Revert "update poetry deps: shellingham"

This reverts commit 6e9b20964890c8a5c416a17b8aaad4cc16fddcfc.

* Merge fixes

* bump panda

* bump panda

* update supported cars list

* dont use counters for long control

* fix unittests

* submodules update

* only soft disable in long control

* use common functions and cleanup

* apply hystersis correctly

* move to comma repo

* use CanBus

* cleanup

* explicit copy

* behind a flag

* remove unrequired rpm checks

* add comment

* fix flag issue

* we still need to check rpm

* update docs

* enable long for a test route

* unit tests

* inactive throttle fix

* Update subarucan.py

* Update carcontroller.py

* Update carcontroller.py

* inactive throttle fix

* Delete settings

* fix rate limit

* bump submodules

* bump panda

* bump panda

* bump panda

* bump panda

* simplify initial implementation, remove AEB

* reduce initial complexity by not intercepting cruisecontrol or brake_status

* fix fwd hook test

* show pcb off warning

* cleanup and setup for tuning

* fix sumobuldes

* revert unrelated changes

* only whats required

* only whats required

* clean that up

* better comments

* behind the flag for now

* comments and minimize diff

* align stuff

* cleanup for PR

* apply review suggestions

---------

Co-authored-by: Martin Lillepuu <martin@mlp.ee>
old-commit-hash: d6c682b401
2023-08-16 12:58:09 -07:00
Justin Newberry
cb45be4b6f Subaru: New LKAS Angle based cars in dashcam only (#29190)
* dashcam mode only

* fix name

* added those cars in dashcam mode only
old-commit-hash: 38954418f0
2023-07-31 13:58:33 -07:00
Justin Newberry
63794374e9 Subaru: rename legacy to preglobal (#28204)
* rename

* submodules too

* missed some variables

* fix find/replace error

* revert modules

* bump submodules

* bump cereal
old-commit-hash: f327053ac0
2023-05-15 19:12:47 -07:00
Shane Smiskol
d916e0ed2d Car docs: pass docs flag to car interfaces (#27311)
* docs

* docs

* docs

* docs

* use docs in gm
old-commit-hash: 5aebdb0ad0
2023-04-18 12:22:22 -07:00
Justin Newberry
da2f2114d6 Subaru: infotainment status intercept and rewrite (#27829)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* remove compiler flag stuff

* force error for testing

* bump panda and fix mistake

* wip

* bump panda

* wip

* wip

* forgot checksum and stuff

* add to signals

* rename

* test

* test

* bump panda and opendbc

* bump cereal

* add blank filler

* test

* add steer required to infotainment

* fix missing bit

* fix missing bit

* cleanup for PR

* cleanup for PR

* bump submodules

* wip

* wip

* i wonder what 1 is

* seemed to also be obstacle detected?

* bumppanda

* only if global

* only global gen 2

* fix order

* detect and send

* detect in rest of places

* update refs

* bumpopendbc

* copy whole message (camera sometimes sets these signals)

* bumppanda

* update refs!

* bumppanda

* let's not change this

* same as all the other functions

* Revert "same as all the other functions"

This reverts commit e86dbb695ef84a18f3123720fed37a6b81391cc4.

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: d59bfa5519
2023-04-17 19:05:16 -07:00
Shane Smiskol
acc8e38111 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
old-commit-hash: 8f5057ff2d
2023-02-09 15:37:39 -08:00
Adeeb Shihadeh
20fbb0a8fd rename carState.radarOffCan to radarUnavailable (#27187)
* rename carState.radarOffCan to radarUnavailable

* bump cereal
old-commit-hash: 6fa9b555a4
2023-02-02 11:38:09 -08:00
Shane Smiskol
d6f6b0de91 Car interface: set tire stiffness in common function (#26625)
* common stiffness

* GM uses factors
old-commit-hash: 712b9014d7
2022-11-29 12:50:27 -08:00
Shane Smiskol
8aadc8dda6 Car interface: set common params after port (#26613)
* remove pylint exception, _get_params takes no defaults

* clean up

* mock uses it too

* unused

* unused

* fix that

* bump

* Update selfdrive/car/interfaces.py
old-commit-hash: 860f441e2f
2022-11-29 11:49:13 -08:00
Adeeb Shihadeh
e4f9781c17 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
old-commit-hash: 655a64b603
2022-09-07 17:12:49 -07:00
Shane Smiskol
1fcc31aac6 Car docs: add auto-resume column (#25572)
* Move auto resume in sng to car interface

* Update docs

* shorter name, star

* order

* resumes?

* add hidden detail sentence

* good to know this works, but revert

* VW auto resume

* bump cereal to master

* Update ref_commit

* match cereal

* try this

* ?

?

* like this
old-commit-hash: 452d5e42ec
2022-08-30 17:54:40 -07:00
Adeeb Shihadeh
2865664679 Subaru: Legacy 2020-22 support (#25313)
* Subaru: Legacy 2020 support

* clean that up

* force for now

* update years

* test route
old-commit-hash: a21780dbea
2022-08-18 09:02:33 -07:00
Adeeb Shihadeh
b34f0129e2 Subaru: 2020 Outback support (#25248)
* Subaru: 2020 Outback support

* bump panda

* bump panda

* update refs

* update refs
old-commit-hash: efa326e208
2022-07-31 12:43:27 -07:00
Adeeb Shihadeh
512590034e Subaru: move all pre-global cars to torque tune (#25281)
* Subaru: move all pre-global cars to torque tune

* pid init
old-commit-hash: 5d4d2c3b0d
2022-07-25 15:55:43 -07:00
Adeeb Shihadeh
5263356958 remove CS.steeringRateLimited (#25251)
* remove CS.steeringRateLimited

* bump cereal

* update refs
old-commit-hash: d462a08056
2022-07-24 14:56:55 -07:00
Shane Smiskol
0d83812f86 Clean up CarControllers (#25008)
* do VW

* Do the rest

* unused

* ford cc formatting

* final clean ups

* also just return update output
old-commit-hash: d2c2154a32
2022-06-30 17:23:12 -07:00
HaraldSchafer
b0b1aff5cc Rocket league model (#24869)
* dd9a502d-c8e2-4831-b365-804b0ae0739d/600 80041070-d276-4fed-bdb9-0075e5442908/420

* no elementwise op

* 9dabf0fe-2e60-44bf-8d3a-d20a74aca072/600 ae746590-0bb5-4a16-80db-15f02d314f03/300 c4663a12-b499-4c9b-90dd-b169e3948cb1/60

* explicit slice

* some copies are useful

* 1456d261-d232-4654-8885-4d9fde883894/440 c06eba55-1931-4e00-9d63-acad00161be0/700 af2eb6ba-1935-4318-aaf8-868db81a4932/425

* 154f663e-d3e9-4020-ad49-0e640588ebbe/399 badb5e69-504f-4544-a99e-ba75ed204b74/800 08330327-7663-4874-af7a-dcbd2c994ba7/800

* set steer rate cost to 1.0

* smaller temporal size

* Update model reg

* update model ref again

* This did upload somehow

* Update steer rate cost

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
old-commit-hash: 9283040d84
2022-06-15 15:29:42 -07:00
HaraldSchafer
f7edd5f3d3 Car interface: set max lateral torque from table (#24789)
* json

* better naem

* Read from table

* formatting and default to nan

* Generate docs

* Read from table

* this should be the same

* Prius v is full

* test we always set the tunes correctly

add to release files

* Set for all cars

Set for all cars

* Revert tuning changes

Revert tuning changes

* remove that

* fixes

* update ref commit for new maxLateralAccels

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 3066ad81a8
2022-06-10 17:57:23 -07:00
Shane Smiskol
1a2bf8412c Car documentation: set steering torque star using car interface (#24709)
* Set good torque using torque controller tuning

* should be equal to

* save lateral accel to car params

* use maxLateralAccel

* always

* same convention

* nan will always evaluate to false

* The great good torque purge

* adjust default friction

* Add data for more cars

* adjust name

* Welcome back, guys. Only adjust good torque if maxLatAccel is set

* Update refs (1.7 is 1.7000001...)
old-commit-hash: c6bc03311c
2022-06-03 17:41:20 -07:00
Adeeb Shihadeh
3789587df1 add alert for CAN bus timeout (#24162)
* add alert for CAN bus timeout

* add alert

* set in interface

* cleanup

* cleanup

* add event

* fix mock

* bump

* bump opendbc

* update refs

* return reader
old-commit-hash: 49c2164814
2022-04-12 22:58:34 -07:00
Adeeb Shihadeh
3327348aeb don't read params in car interfaces (#23978)
old-commit-hash: bae78dd46b
2022-03-16 15:17:47 -07:00
Shane Smiskol
3e61c7e6ae 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>
old-commit-hash: 629399a449
2022-03-13 20:58:44 -07:00
Adeeb Shihadeh
71da8d1250 No actuation while in pre-enabled state (#23658)
* No actuation while in pre-enabled state

* update refs
old-commit-hash: 72e00a0768
2022-01-28 16:03:44 -08:00
Dean Lee
98de810849 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>
old-commit-hash: a653461dec
2022-01-10 16:36:51 +01:00
Dean Lee
0a762c27ce interfaces/apply: follow capnp best practices (#23371)
old-commit-hash: 05b905d140
2022-01-04 11:34:49 +01:00
Willem Melching
7b3e330def 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
old-commit-hash: 4f1eb4278a
2021-12-16 13:08:20 +01:00
martinl
b99c359d61 Subaru: Add Impreza/Crosstrek 2020 (#21011)
* Add Subaru Impreza/Crosstrek 2020

* Update selfdrive/test/test_routes.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 7fd98757b4
2021-12-15 15:13:31 -08:00
Robbe Derks
58c99158a1 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
old-commit-hash: 91987f38d4
2021-10-08 17:54:34 +02:00
Adeeb Shihadeh
821f1f6cb6 remove community supported cars from community features (#22330)
* remove community supported cars from community features

* remove bosch and hkg long

* remove test case

* update refs
old-commit-hash: 649af76fd4
2021-09-23 17:34:52 -07:00
HaraldSchafer
a73a820338 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>
old-commit-hash: 1ac89f14aa
2021-08-30 09:32:52 -07:00
Adeeb Shihadeh
691ea8553f deprecate CP.enableCamera (#21509)
* deprecate CP.enableCamera

* more removal

* one more

* update refs
old-commit-hash: c72d163e14
2021-07-07 14:59:18 -07:00
CrispinFlowerday
4f02e178db 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>
old-commit-hash: 7458e143e3
2021-06-07 15:06:28 -07:00
martinl
1b6fe77d69 Add enableBsm for Subaru Preglobal (#20962)
old-commit-hash: 79050611d6
2021-05-18 23:45:37 -07:00
Adeeb Shihadeh
7546f7d084 enforce message checks in can parser (#20742)
* enforce message checks in can parser

* nissan

* vw

* hkg

* subaru

* toyota

* honda bosch

* gm

* honda nidec

* bump opendbc

* not all tss2 have bsm

* toyota fixes

* honda fixes

* vw fix

* fix subaru

* fix long tests

* update refs

* crv bsm
old-commit-hash: 6c7ed8f2e4
2021-04-25 12:52:16 -07:00
Igor
95bb79c51c Parametrize MIN_CAN_SPEED in car interfaces (#2684)
* Parametrize MIN_CAN_SPEED in car interfaces

* fixed instance in planner.py

* fix typo

* var name change

* changed var name to minSpeedCan for consistency with other uses of CAN in the capnproto files

* added default value to get_std_params, removed unneeded instances from car interface files

* Revert PEP8 autoformat corrections

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 093456cc40
2020-12-04 11:09:34 +01:00
Adeeb Shihadeh
f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f5
2020-11-03 19:56:25 -08:00
martinl
6a000279ad Add preglobal Subaru Forester and Outback (#1993)
* Add preglobal Forester and Outback

* Tests and values cleanup

* Update units in carstate

* Remove ()

* Add OUTBACK_PREGLOBAL_2018 to non_tested_cars

* Add replay route for OUTBACK_PREGLOBAL_2018
old-commit-hash: c9adc4900b
2020-08-10 12:31:40 -07:00
martinl
0aeae7d81e Subaru pre-global: add support for Subaru Legacy 2015-18 (#1805)
* Add support for Subaru Legacy 2015-18

* syntax fix

* Add Legacy 2018 FPv1

* Add Subaru Ascent from upstream

* Use GLOBAL_CAR and LEGACY_CAR lists

* Change LEGACY_2015 to LEGACY_PREGLOBAL

* Add LEGACY_CAR to carstate

* Change LEGACY_2015 to LEGACY_PREGLOBAL in test_car_models

* Add missing SafetyModel to Ascent

* Use GLOBAL_CAR and LEGACY_CAR to set safetyModel

* Change LEGACY_CAR to PREGLOBAL_CARS, remove GLOBAL_CAR

* Fix PREGLOBAL_CARS in carstate and subarucan

* Minor cleanups

* Add accelCruise button event

* Change Preglobal Driver Torque limit to match Global

* Match comments to upstream

* Use Steer_Warning and Steer_Error_1 only for Global

* Change mph units to match upstream values

* Increase Preglobal brakePressed  threshold to 2

* Add DashcamOnly to LEGACY_PREGLOBAL

* Fix typo in variable name

* Update README, add create_preglobal_steering_control

* cleanup carcontroller

* cleanup values

* missed that one

* Update STEER_STEP

* Update STEER_MAX

* Add preglobal signal frequency checks

* remove PREGLOBAL_CARS from subarucan

* Remove whitespace

* Use common frequency checks

* cleanup carstate

* cleanup subarucan

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e37b8e5d56
2020-08-06 21:55:13 -07:00
Adeeb Shihadeh
39d98d3d2d Car cleanup (#1924)
* cleanup car code

* more pruning

* little more

* less pylint disables

* radar stuff

* fix

* udpate refs

* fix honda bosch

* fix test
old-commit-hash: 892e1162c0
2020-07-25 15:07:27 -07:00
Adeeb Shihadeh
e50c6ad58d Subaru cleanup (#1809)
old-commit-hash: 30d6d77e26
2020-07-02 13:37:53 -07:00
martinl
dfee3692f6 Support for 2019 Subaru Ascent (#1801)
* Add support for Subaru Ascent 2019

* remove duplicate safetyModel

* Add Ascent 2019 to README.md
old-commit-hash: b1abf17752
2020-07-01 16:54:40 -07:00
martinl
0d04c2cc26 Subaru Forester 2019 (#1768)
* Add initial Forester 2019 support

* Add dgranger15 Forester 2019 FPv1

* fingerprint syntax fix

* FPv1 syntax fix 2

* Add Forester 2019 to CAR

* fix indent

* Add Forester 2019 to test_car_models ignore list

* Update Forester 2019 steering tuning (dgranger15)

* Add Forester 2019 to README.md

* Change lists to single value

* Add test route for Forester 2019

* Remove model year

* Remove Forester model year in test_car_models

* Remove usernames, add Forester ACC speed mph unit value
old-commit-hash: 09e7d4ab3a
2020-06-23 16:07:46 -07:00