Commit Graph

43 Commits

Author SHA1 Message Date
Cameron Clough
011eed0daf Ford: show longitudinal personality in IPC (#31796)
* Ford: show longitudinal personality in IPC

Adjust the time gap to 2, 3 or 4 bars for openpilot long.

TODO: set AccTGap_D_Dsply when value changes so that the popup appears
with the new time gap

Depends on #31760.

* ACC UI: show time gap popup when distance changes

* Revert "ACC UI: show time gap popup when distance changes"

This reverts commit c4e8e10970078a534d5714ddced92d540e9e3c0c.

* ACC UI: send on distance bars change

* don't need this check - just send on first frame
2024-03-11 20:30:09 -07:00
Cameron Clough
682f16d1b5 Ford: fix counter in LateralMotionControl2 message (#31806)
The counter should be between 0-15 inclusive. This only affects CAN FD cars.
2024-03-09 20:54:54 -08:00
Cameron Clough
341b81c0a5 Ford: use flags for CANFD (#31664) 2024-03-01 12:18:03 -05: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
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
Harald Schäfer
8c25741e46 Ford: radar + long control fixups (#28948)
* enable radar

* manual new track

* Don't filter points

* cleanup

* Update radar_interface.py

* This is non-zero in stock

* add speed

* more extreme

* A few more things

* fixes

* cleanup

* revert that

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-12-13 19:54:06 -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
Cameron Clough
e7c858d590 Ford: align car groups with convention
no plural
2023-07-18 11:42:15 +01:00
Cameron Clough
47f948c5c6 Ford: show FCW alert on IPC (#27924)
* Ford: show FCW alert on IPC

* forward fcw from ipma

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-06-28 16:22:53 -07:00
Cameron Clough
30c12e4557 Ford: detect auxiliary panda (#28491) 2023-06-10 23:22:12 -07:00
Cameron Clough
de5e0d0c71 Ford: fix counter in LateralMotionControl2 message (#28328) 2023-05-27 21:54:37 -07:00
Shane Smiskol
c7d3b28b93 Ford: longitudinal clean up (#28231)
clean ups
2023-05-18 14:30:07 -07:00
Cameron Clough
717bc04ddc Ford: improved ACC UI for OP long (#28114)
* Ford: improved ACC UI for OP long

- Show "stopped" status message on IPC when in standstill, similar to stock
- Prevent the distance control UI from appearing on button press (as
this does not influence OP long).

* set lead indicator and only override stock when OP is controlling long

* match DBC
2023-05-14 00:20:34 +01:00
Cameron Clough
4ee6c68ba5 Ford: cleanup long control and send stopping signal (#28110)
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-05-04 14:04:54 -07:00
Shane Smiskol
d888400402 Ford: curvature rate limit safety (#28059)
* bump panda

* add carcontroller

* add carcontroller

* cmt

* bumppanda

* ubmp
2023-05-04 05:37:31 +00:00
Shane Smiskol
8e3e9141ee Ford safety: curvature error limit (#27981)
* clip Ford requested curvature to current +- delta

* fix bug, allow for more limit

* bump panda to branch

* bump panda

* rename

* rename function

* make a wrapper function (ford uses dynamic up/down limits

* make two functions consistent

* use apply_dist_to_meas_limits

* only above 12 ms

* simplify, clean up

* this isn't used

* https://github.com/commaai/openpilot/pull/27446

* bump panda

* one m/s fudge

* fix current curvature

* also fix panda

* fix panda blocking msgs

* bump panda to fix more blocked msgs

* clip

* bump panda

* lower to 9 ms

* clean up carcontroller

* bump panda

* bump

* bumppanda

* bumppanda

* bumppanda

* split line
2023-04-27 00:43:14 -07:00
Cameron Clough
42f2e39213 ford: correct messages frequencies (#28027)
* ford: correct messages frequencies

* fix STEER_STEP

* fix comment

* cleanup
2023-04-26 00:00:08 -07:00
Cameron Clough
49220985f4 ford: cleanup fordcan methods (#28026)
* fordcan: consistent naming

* fordcan cleanup
2023-04-25 18:15:56 -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
Cameron Clough
df5ccda731 Ford CAN FD (#27166)
* add LateralMotionControl2 message

* send LatCtl2 message on CAN FD cars
2023-01-31 11:06:03 -08:00
Cameron Clough
ef9deeb6eb Ford longitudinal control (#27161)
ford long
2023-01-30 22:37:54 -08:00
Shane Smiskol
701b7d89b6 Ford: use curvature without roll compensation (#27110)
* Ford: use actuators.curvature

* ford is mathless
2023-01-26 22:29:01 -08:00
Shane Smiskol
4f4f4afe8a Ford: set lateral ramp type to 0 (#27106)
set ramp type always to 0
2023-01-26 19:11:44 -08:00
Shane Smiskol
2bdce2d92e Ford: use curvature signal for lateral control (#27091)
* do carcontroller

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

* values done

* just send latActive in, cleaner

* Update selfdrive/car/ford/values.py

* fix a crash

* adjust ramp as well

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
2023-01-25 21:39:46 -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
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
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
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
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
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
HaraldSchafer
cf466222f6 Road Roll Compensation Rebased (#23251)
* first commit

* update refs
2021-12-16 17:34:12 -08: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
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
wolterhv
93911a7dbe Replace hardcoded values for Pi (#20235)
* Avoid redefining pi, use instead math.pi or M_PI from math.h

* Revert overwriting of the gpsPi variable, which is part the GPS standard.

* Move standard library imports to top, remove standard library import comments.
2021-03-03 14:22:06 -08:00
Adeeb Shihadeh
312b681a46 cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
2021-02-16 21:39:32 -08: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
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
bfa79153b4 Ford: have carstate update returning capnp struct directly (#1113)
* 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

* WIP

* more WIP

* ops, missed this conflict

* ford as well

* not sure why this got deleted

* no need to copy

* remove copy

* remove copy import

* remove unnecessary intermediate variable

* remove obsolete comments

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-02-17 14:42:41 -08:00
George Hotz
71ead9adea selfdrive/car 2020-01-17 10:58:43 -08:00