Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ford: add Edge 2022 #31767

Closed
wants to merge 20 commits into from
Closed

Ford: add Edge 2022 #31767

wants to merge 20 commits into from

Conversation

incognitojam
Copy link
Member

@incognitojam incognitojam commented Mar 7, 2024

Follow up to #30762 since there were conflicts preventing it being merged. (changes one less file!)

FW is from 3d4e31f900dd3a88 (2022 Ford Edge, VIN: 2FMPK4J95NBA30321) and 26da1db30eff4fcc (2022 Ford Edge Titanium but retrofit ACC, VIN: 2FMPK4K98NBA52134)

Alternate steering message

  • I'd also like to double check that there is no other steering angle signal that we can use...
  • SteeringPinion_Data sent by the PSCM moved to 0x85; StePinComp_An_Est is not populated (-1600) and StePinCompAnEst_D_Qf is faulty/not populated (0).
  • BrakeSnData_6 containing StePinOffst_An_Est is missing (couldn't find the new address if it has moved)
  • ParkAid_Data.ExtSteeringAngleReq2 has an estimated steering angle we can use instead, and the raw values 32766 and 32767 can be used to detect unknown/invalid state.

The 2GC platform code in the EPS pn/fw is only on the Edge/Nautilus (and Fusion/Continental/MKZ but they can't be supported). (from the Ford FW table)
image

Dependencies

Checklist

  • added entry to CarInfo in selfdrive/car/*/values.py and ran selfdrive/car/docs.py to generate new docs
  • test route added to routes.py
  • route with openpilot: 3d4e31f900dd3a88|2023-12-15--11-31-09 (experimental mode: 3d4e31f900dd3a88|2023-12-15--11-19-47)
  • route with stock system: 3d4e31f900dd3a88|2023-12-17--16-47-36
  • car harness: Ford Q3

Full credit goes to @MikeDoyal for getting this supported and @mikehundley for testing

Copy link
Contributor

github-actions bot commented Mar 7, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@github-actions github-actions bot added the car vehicle-specific label Mar 7, 2024
@incognitojam
Copy link
Member Author

incognitojam commented Mar 7, 2024

I tried moving the ParkAid_Data message to the camera CAN parser since the DBC says it comes from IPMA_ADAS, but it actually comes from the car side of the harness (bus 0)? It could be from the PAM (parking aid module). Moved it back.

image

@incognitojam incognitojam marked this pull request as ready for review March 7, 2024 15:34
@incognitojam incognitojam marked this pull request as draft March 20, 2024 11:20
@incognitojam
Copy link
Member Author

ParkAid_Data.ExtSteeringAngleReq2 is probably not the "estimated steering angle", but the actual steering angle requested from the PAM. I assume if park assist is enabled this will not be what we want, and I assume not every Edge has the park assist package.

@incognitojam
Copy link
Member Author

incognitojam commented Mar 20, 2024

The PAM starts sending the true steering angle after 1 second. I'm still not sure how it knows the steering angle offset before the vehicle starts moving (it either learns itself and stores it, or it's getting it from another module?)

image

@jyoung8607 jyoung8607 added the ford label Jul 3, 2024
@sshane
Copy link
Contributor

sshane commented Aug 20, 2024

We've moved the car interfacing code to our opendbc repository, which is now the new home for car ports and fingerprints. Please re-open your pull request against opendbc at your convenience by using this command below. This will transform all changes under selfdrive/car/ to opendbc_repo/opendbc/car/. Make sure you have initialized submodules beforehand and have checked out the latest opendbc commit.

PR_NUMBER=33045
curl -L https://github.com/commaai/openpilot/pull/$PR_NUMBER.patch | sed -e 's/selfdrive\/car/opendbc_repo\/opendbc\/car/g' | git apply -v --reject

Simply replace the PR number with your own. Once done, add the files, fix any conflicts, and open a new PR. Alternatively, you may start a new PR from scratch if that is easier for you.

@sshane sshane closed this Aug 20, 2024
@incognitojam incognitojam deleted the ford-edge branch January 30, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car port car vehicle-specific ford
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants