Commit Graph

74 Commits

Author SHA1 Message Date
Justin Newberry
b0eb3ba4f4 cars: platform enums -> prepend brand name (#31927)
* with brand name

* migrate

* Fix

* fixes

* more

* passes

* fix

* fix the doc

* collects

* these too

* more stuff

* body exception :/

* more

* hardcode i guess

* update ref

* toyota

* more toyota

* and here

* final!

* fix notebooks and ccs

* move this here
2024-03-19 17:29:50 -07:00
Adeeb Shihadeh
3a7582d9a6 Abstract out common CarInterface.apply (#31924) 2024-03-19 13:46:31 -07:00
Shane Smiskol
0fa3445ddb Subaru: use carParams flags in interface (#31653)
* Subaru: don't use platform flags

* clean up
2024-02-29 15:19:31 -08:00
Justin Newberry
3a6c3315ab Subaru: move to flags within PlatformConfig (#31584)
* flags

* update ref

* use the flags directly

* use post_init (don't freeze)

* we can maintain frozen with custom class

* not preglobal

* move to common

* cleanup
2024-02-28 20:12:14 -08:00
Eric Brown
5012e15aa6 GM: move to platform config (#31553)
* subaru platform config

* forester wrong dbc

* spacing

* subaru car specs

* someday!

* more red diff

* Move GM to platform config

* Implement CarSpecs

* Simplify centerToFront

* Accidentally had subaru DBC

* Fix typo in DBC name

* done above

* two spaces

* that is moved up

* fix hardcoded fingerprints

* whitespace

* values

* better?

* fix

* bump

* fix

* fix

---------

Co-authored-by: Justin Newberry <justin@comma.ai>
2024-02-25 17:53:26 -08:00
Justin Newberry
e6009d80e9 cars: introduce "Platform" union type for all car enums (#31558)
* Hmm

* release

* hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

* unrelated

* forgot

* cleaner

* Platform

* new syntax

* Fix

* clean

* Fix
2024-02-24 22:18:13 -08:00
Justin Newberry
1161d33c18 Subaru: move carspecs to PlatformConfig (#31550)
* subaru platform config

* forester wrong dbc

* spacing

* subaru car specs

* someday!

* more red diff

* all brands can be done like this

* but this should be done first and thats subaru specific

* that seems very low but we shouldn't change it here

* as long as it subclasses str its fine

* fix
2024-02-23 13:23:40 -08:00
Justin Newberry
e7657d896f Subaru: fix disable eyesight enum (#30974)
value
2024-01-11 17:15:37 -08:00
Justin Newberry
5f24078a48 Subaru: enable alpha longitudinal for gen1 cars (#30714)
* enable alpha long

* update docs

* added footnote about eyesight

* only for these cars

* add alpha

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

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-13 20:17:33 -08:00
Justin Newberry
eed0ddc3b8 bump panda (#30419) 2023-11-08 16:30:22 -08:00
Justin Newberry
60b21b55d2 Subaru: initial eyesight disable support (#30373)
* initial eyesight disable

* disable_eyesight

* comment
2023-11-06 22:13:39 -08:00
Justin Newberry
4e69937d0d Precommit: ensure executable bit is set (#29784)
* precommit ensure executable

* exclude tinygrad

* bump submodules

* exclude tinygrad globally
2023-09-05 16:33:26 -07:00
martinl
a1bf66a0d2 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>
2023-08-25 20:55:21 -07:00
Shane Smiskol
3719be8b76 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>
2023-08-23 21:30:12 -07:00
Adeeb Shihadeh
973d90be77 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>
2023-08-23 18:50:55 -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
Jason Young
f76ffbdbbc 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>
2023-08-17 21:06:07 -07:00
Justin Newberry
d6c682b401 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>
2023-08-16 12:58:09 -07:00
Justin Newberry
38954418f0 Subaru: New LKAS Angle based cars in dashcam only (#29190)
* dashcam mode only

* fix name

* added those cars in dashcam mode only
2023-07-31 13:58:33 -07:00
Justin Newberry
f327053ac0 Subaru: rename legacy to preglobal (#28204)
* rename

* submodules too

* missed some variables

* fix find/replace error

* revert modules

* bump submodules

* bump cereal
2023-05-15 19:12:47 -07:00
Shane Smiskol
5aebdb0ad0 Car docs: pass docs flag to car interfaces (#27311)
* docs

* docs

* docs

* docs

* use docs in gm
2023-04-18 12:22:22 -07:00
Justin Newberry
d59bfa5519 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>
2023-04-17 19:05:16 -07: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
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
712b9014d7 Car interface: set tire stiffness in common function (#26625)
* common stiffness

* GM uses factors
2022-11-29 12:50:27 -08:00
Shane Smiskol
860f441e2f 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
2022-11-29 11:49:13 -08:00
Adeeb Shihadeh
655a64b603 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
2022-09-07 17:12:49 -07:00
Shane Smiskol
452d5e42ec 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
2022-08-30 17:54:40 -07:00
Adeeb Shihadeh
a21780dbea Subaru: Legacy 2020-22 support (#25313)
* Subaru: Legacy 2020 support

* clean that up

* force for now

* update years

* test route
2022-08-18 09:02:33 -07:00
Adeeb Shihadeh
efa326e208 Subaru: 2020 Outback support (#25248)
* Subaru: 2020 Outback support

* bump panda

* bump panda

* update refs

* update refs
2022-07-31 12:43:27 -07:00
Adeeb Shihadeh
5d4d2c3b0d Subaru: move all pre-global cars to torque tune (#25281)
* Subaru: move all pre-global cars to torque tune

* pid init
2022-07-25 15:55:43 -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
HaraldSchafer
9283040d84 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>
2022-06-15 15:29:42 -07:00
HaraldSchafer
3066ad81a8 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>
2022-06-10 17:57:23 -07:00
Shane Smiskol
c6bc03311c 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...)
2022-06-03 17:41:20 -07:00
Adeeb Shihadeh
49c2164814 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
2022-04-12 22:58:34 -07:00
Adeeb Shihadeh
bae78dd46b don't read params in car interfaces (#23978) 2022-03-16 15:17:47 -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
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
Dean Lee
05b905d140 interfaces/apply: follow capnp best practices (#23371) 2022-01-04 11:34:49 +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
martinl
7fd98757b4 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>
2021-12-15 15:13:31 -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
649af76fd4 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
2021-09-23 17:34:52 -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
Adeeb Shihadeh
c72d163e14 deprecate CP.enableCamera (#21509)
* deprecate CP.enableCamera

* more removal

* one more

* update refs
2021-07-07 14:59:18 -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
martinl
79050611d6 Add enableBsm for Subaru Preglobal (#20962) 2021-05-18 23:45:37 -07:00