Commit Graph

70 Commits

Author SHA1 Message Date
Adeeb Shihadeh
3a7582d9a6 Abstract out common CarInterface.apply (#31924) 2024-03-19 13:46:31 -07:00
Cameron Clough
98a491b1f2 Ford: parse distance button (#31733)
Ford: parse ACC gap toggle button

Use the ACC gap toggle button signal from the SCCM. There are two other
signals for "increase" and "decrease" gap buttons, but no supported car
has these buttons.
2024-03-07 01:54:33 -08:00
Cameron Clough
341b81c0a5 Ford: use flags for CANFD (#31664) 2024-03-01 12:18:03 -05:00
Cameron Clough
8e03cdfc2a Ford: move to PlatformConfig (#31554)
* Ford: move to PlatformConfig

* Align Aviator model years with Explorer

* Add CarSpecs to PlatformConfig

---------

Co-authored-by: justin <justin@comma.ai>
2024-02-25 17:55:42 -08:00
Shane Smiskol
378ba114f9 Ford: support hybrid Q3 platforms (#31568)
* bump

* ford: remove dynamic dashcam lockout for hybrids

* releases?

* Revert "releases?"

This reverts commit 88d950043d79b8c00535f48ed84b854bc2ab2557.

* bump

* Reapply "releases?"

This reverts commit db5079dc3f1a6bce70bd04430be45704d8604e76.

* 097
2024-02-23 21:22:34 -08:00
Harald Schäfer
feaf52dd4c Ford long control improvements (#31123)
* Ford updates

* back to normal

* Small fixes

* Try max

* Does pred matter

* ref commit

* Update ref
2024-01-30 11:40:52 -08:00
Isaac
26a67641d2 Ford: Add Mach-E (#30691)
* Update interface.py

* Update values.py

* Update routes.py

* Update override.yaml

* Update selfdrive/car/ford/values.py

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

* Update interface.py

* order

* only have dongles for these

42f08a29af3699f4
83a4e056c7072678

from https://github.com/commaai/openpilot/pull/30444

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-12-13 09:05:41 -08:00
Shane Smiskol
77066a2260 Ford: consolidate comments about unsupported hybrid platforms (#30709)
* fix typo, move comments to one place

* -appear

* Update selfdrive/car/ford/carstate.py
2023-12-12 20:37:37 -08:00
Isaac
2192cc170c Ford: Add F-150 Lightning (#30692)
* Update interface.py

* Update values.py

* Update routes.py

* Update override.yaml

* Update values.py

* Update interface.py

* Update selfdrive/car/ford/interface.py

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

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-12-12 20:07:59 -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
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
Cameron Clough
e7c858d590 Ford: align car groups with convention
no plural
2023-07-18 11:42:15 +01:00
Cameron Clough
17e71cdf44 Ford: add F-150 2023 support (dashcam only) (#28974) 2023-07-17 16:16:28 +01:00
Cameron Clough
d0e6076059 Ford: set CAN FD safety param (#28979) 2023-07-16 13:00:42 -07:00
Cameron Clough
78bb637993 Ford: remove Focus Mk4 from dashcam only (#28551) 2023-06-17 15:16:59 +01:00
Cameron Clough
30c12e4557 Ford: detect auxiliary panda (#28491) 2023-06-10 23:22:12 -07:00
Cameron Clough
d4dec3ba5e Ford: longitudinal behind alpha toggle (#28196)
* bump panda

* set safety config/configure experimental longitudinal

* send inactive signals

* bump

* just calculate in function

* already in the variable

* clean that up

* add comment, on ford stock long, prchg seems to be set from the possible future accel

* comment

* this signal didn't have an impact on engaging

* add comment and fix

* worst case while AEB

* and kill ACCDATAs

* this could be dangerous

* need to test this too

* Revert "need to test this too"

This reverts commit 09bba75950fa55d90a82f0109e3138ffe5a1d08c.

* Revert "this could be dangerous"

This reverts commit 323143e84727f1a780bbb600be5f7ceb763516b1.

* Revert "and kill ACCDATAs"

This reverts commit 15f6804bf64d01145daf57a592c2f3fd44ceba27.

* Revert "worst case while AEB"

This reverts commit 85e1aaa8e1af90373c688d1973dbfbb07b1fb8b2.

* bump panda

* Update selfdrive/car/ford/fordcan.py

* move around

* was already here

* rm

* use variable

* update docs

* Update ref_commit

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-05-18 15:25:24 -07:00
Cameron Clough
202751a796 Ford: add Maverick test route (#28181)
* Ford: add Maverick test route

* docs

* bump
2023-05-13 23:38:28 +01:00
Shane Smiskol
344064d6bd Ford: hybrids are unsupported (#28171)
* hybrid fords are dashcammed

* something like this?

* just do an alert

* good comment

* space

* bb

bb

* top

* Update selfdrive/car/ford/interface.py

* add a noEntry

* remove from release notes

* sad :(

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2023-05-11 23:35:07 -07:00
Shane Smiskol
fb29d0f3bf Ford: add alert for steering wheel angle not ready (#28140)
* add event for steering angle calibrating

* how about this

how about this

* rename

* more openpilot-y

* add comment to code

* move to top

* better wording

* more general

* fix

* ?

* above

* bump cereal to master

* add more comms
2023-05-08 22:03:30 -07:00
Cameron Clough
a0d2e4e711 Ford: add Escape test route and remove dashcam only (#28113)
* Ford: add Escape Mk4 test route

* generate docs

* remove from non_tested

* fix model years

* clearer packages for EU

* docs

* 2020 hybrid

26b2cace68e36212

1FMCU9DZ9LUA82589

* 2021 phev

1FMCU0LZXMUA80767

f8eaaccd2a90aef8

* add this too

* more docs
2023-05-04 17:21:36 -07:00
Shane Smiskol
d05d9dac04 Ford: remove from dashcam (#28103)
* no dashcam 🎉

* update docs

* not these

* update refs

* bump panda
2023-05-04 06:55:09 +00:00
Cameron Clough
48ff8fa734 Ford: fix minEnableSpeed for docs flag 2023-04-26 00:57:26 -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
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
60f73657de Ford: set radarOffCan (#27120)
Fix
2023-01-27 13:44:37 -08:00
Shane Smiskol
226d80964d Ford: lower lateral actuator delay (#27113)
Update interface.py
2023-01-26 23:14:05 -08:00
Cameron Clough
c7790d0e07 Ford: params fixup (#27097)
* reduce steer actuator delay to 0.25s

* update steer ratio
2023-01-25 22:03:00 -08:00
Cameron Clough
cf69653440 Ford: add Maverick 2022 (#27093)
* Ford: add Maverick 2022

VIN: 3FTTW8E36NRA74219

a6427650bff6b419|2022-09-19--10-51-30

* Ford: add missing Maverick 2022 FW

VIN: 3FTTW8F98NRA75889

c845bd8c366e6f3d|2022-12-03--18-57-00--0

* steer ratio
2023-01-25 21:18:35 -08:00
Cameron Clough
d410206f14 Ford: add Bronco Sport 2021-22 (#27092)
* cleanup

* add Ford Bronco Sport 2021 fw

VIN: 3FMCR9B61MRA17853

62241b0c7fea4589|2022-10-25--13-40-05--0

* add test route

* add Ford Bronco Sport 2022 fw

VIN: 3FMCR9B69NRD15990

54827bf84c38b14f|2023-01-23--14-58-23--0
2023-01-25 20:56:03 -08:00
Cameron Clough
3cd60a4724 Ford cleanup (#27090)
* fordcan cleanup

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* no fordcan

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* more

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* these weren't even used in CS, follow rest of the brands

* we won't use this

* rename to more standard powertrain can bus

* no arguments for lka anymore

* Revert "rename to more standard powertrain can bus"

This reverts commit 0bc3f79f9bad2218c48a350bbf5ec6f726e0a028.

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-01-25 20:21:14 -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
Cameron Clough
80259f377f Ford: cleanup and fix button press (#26033)
* cleanup

* use Veh_V_ActlBrk for vEgoRaw

* remove unused CarState.yaw_data

* less resume spam

* set steering ramp rate

* match DBC range

* add LCA/TJA notes
2022-10-12 14:23:12 -07:00
Adeeb Shihadeh
9241de2210 Ford Explorer 2020-21 (#25614)
* add model years

* update Focus steer ratio

* Ford: add EU label to Focus Mk4

* add packages

* add Ford Explorer 2020

Package: Co-Pilot 360 Assist+

Optional on XLT
Standard on Limited, Limited Hybrid, ST and Platinum

https://cdn.dealereprocess.org/cdn/brochures/ford/2020-explorer.pdf

* Ford: steering control with path angle

* Ford: add TJA toggle to buttons

* add Ford Explorer 2021

`62241b0c7fea4589|2022-08-30--11-58-24--0`

Package: Co-Pilot 360 Assist+

Optional on XLT
Standard on Limited, Limited Hybrid, ST and Platinum (same as 2020)

https://cdn.dealereprocess.org/cdn/brochures/ford/2021-explorer.pdf

* Ford: add shiftByWire ECU fw

* angle/steer refactor

* try always stop and go for US models

* no dashcam

* car info

* send resume button

* skip explorer

* escape and focus back in dashcam

* passthru buttons

* fordcan set bus for button message

* toggle off stock traffic jam assist so camera does not enforce driver presence checks

* not used

* update ramp rate/precision notes

* cleanup

* bump steering pressed torque to 0.8 Nm

* add standstill

* bump steer ratio

* try increasing delay?

* fix docs

* add kuga car info

* maybe fix tja toggle?

* compensate for ford roll compensation??

* oops

* better ui

* block non-adaptive

* add note on ui warning for hands on wheel

* try only checking/toggling TJA every 2 seconds

* add car test route

* dashcam only again

* send buttons to camera

* add process replay segment

* cleanup

* bump panda

* add extra FW

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2022-09-08 15:49:51 -07: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
Cameron Clough
2351ae48b9 Ford: fix gear parsing (#25267)
* Ford: fix gear shifter state

* Ford: manumatic is drive

* add full gear names to CarStateBase

* fix for unrecognised gears

* Update interfaces.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-07-25 13:02:27 -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
Cameron Clough
acd455ed3a Ford: Support for LCA vehicles (#23331)
* Ford: add Focus Mk4

Also removes support for the Ford Fusion.

* Ford: LKAS/LCA steering and UI CAN commands

* Ford: implement CarController w/ steering and lanes ui

* Ford: FPv2 firmware request

* Ford: Add FW for 2018 Ford Focus

* Ford: add Escape Mk4

* bump panda

* cleanup

* add that back

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-14 14:32:03 -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
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
Shane Smiskol
4f4f18a648 Ford: add minEnableSpeed (#23940) 2022-03-09 12:40:20 -08:00
Shane Smiskol
9de8f8cd8c base LatControl class (#21967)
* base LatControl class, move sat check out of pid.py

clean up

clean up

* fix

* global variable for min control speed

* nicer name

* unify latcontrol class init arguments

* add to release files

* saturated if close to limit

* move angle mode saturation checks into class

* check_saturation function takes in current saturated status

undo

* apply latcontrol_angle's active checking to all controllers

* clean up

* move those back

* make abstract baseclass

* add test for saturation

* keep clip

* update ref

* fix static analysis

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-01-26 17:10:41 +01: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