Commit Graph

8792 Commits

Author SHA1 Message Date
Justin Newberry e9ca84c95c platformconfig and carspecs are now required, carspecs no longer kwarg (#31667)
* required

* mock can be a platform!

* default is mock

* fix that

* and that one
old-commit-hash: b0eae8c1b7264b2d0c63ee2957689bc1317616f1
2024-03-01 11:31:51 -08:00
Justin Newberry 3ec004d482 Body: move to car specs (#31666)
* specs

* override

* fixes 1

* fix 3

* fixes 4

* fixes

* fixes

* fixc

* fix number 723124

* that too

* fixes

* aa

* do body real quick too

* body too
old-commit-hash: a5ee1638b8d4f7dde23b9160e26d715cd1420202
2024-03-01 10:32:31 -08:00
Justin Newberry 9b6963a00d Hyundai: move car specs to platformconfig (#31661)
* specs

* override

* fixes 1

* fix 3

* fixes 4

* fixes

* fixes

* fixc

* fix number 723124

* that too

* fixes

* aa
old-commit-hash: 2e0db7f8d87457d05fef8156eccb94c949623cf3
2024-03-01 10:31:43 -08:00
Cameron Clough d02888ce23 Ford: use flags for CANFD (#31664)
old-commit-hash: 341b81c0a5c5f378f749a8ba07514f48f0f9faa5
2024-03-01 12:18:03 -05:00
Shane Smiskol 2ac06e8d7d Toyota: use platform config (#31607)
* part 1. Toyota platform config

* more

* everything works now

* no more DBC

* janky but that saves a lot of car lines

* need to init inside values or else it won't be reliable

* no return

* fixes

* minor update

* common flags, no dbc grouping

* some clean up

* some clean up

* rename

* copied wrong :(

* another

* copied specs for easiest ones first

* second easiest

* fix erroneous commas

* more clean up

* do the rest

* bug

* the refactor is so error prone

* huh?!

* static

* fix stiffness factor

* detect unsupported DSU

* Revert "detect unsupported DSU"

This reverts commit 9b72de6c8ef282ce20f6472970874a960761884b.

* fix DBC diff

* test carparams

* test sets

* scratch

* catches this

* Revert "scratch"

This reverts commit de08daa9fb8cc0368c5847b669e87b1b2e577616.

* Revert "test sets"

This reverts commit 62402f9b021cdf16a27fd9fb0883d81169711cbd.

* Revert "test carparams"

This reverts commit b02971659c2a8268d0ac8fdff02231dc36b5a197.

* Update ref_commit
old-commit-hash: 52ee070fe0a6880b7e3a5db408a0453c8310be86
2024-03-01 02:14:33 -08:00
Adeeb Shihadeh c4904800eb simple pyqt ui
old-commit-hash: 9c3f0450bb277a02effdeccbe6e89986ed5678b9
2024-02-29 21:46:35 -08:00
Justin Newberry 3816b6a4b6 basic platform config tests
old-commit-hash: 00f2703bbb70d5d79d3b64cb6b2974efb36cb4d4
2024-03-01 04:01:59 +00:00
Justin Newberry 30429b15f5 VW: use flags for PQ (#31659)
pq use flags
old-commit-hash: e576da1457f2e978f1dbd594b857bff034a359d7
2024-02-29 19:51:20 -08:00
Justin Newberry 8ba78b778d Honda: move carspecs to platformconfig (#31657)
* first pass

* fix
old-commit-hash: a6a6f7bb50ecbca61dfa44ca23f0cab201439342
2024-02-29 19:14:31 -08:00
Justin Newberry 0ffb29accd HKG: move to platform config (#31649)
* fuck me!

* that kinda makes things pretty nice

* move it down

* and move this comment

* Wip

* more flags :/

* add the debug shit

* add

* lets not break this yet

* MORE flags git add .git add .git add .git add .!

* B

* add mando

* update ref

* possibly better?

* we can use flags here

* formatting

* formatting

* move up

* canfd subclass

* this is more clear

* spacing

* static!

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: e341707b0f1b26bc235fb0a3d4a1703723c0e48b
2024-02-29 17:04:54 -08:00
Justin Newberry 3fadc8cd21 Chrysler: fix radar not being enabled (#31655)
fix radar
old-commit-hash: 7014b5259628bf44a7b4fcf0eb5809d2bcdcf3b2
2024-02-29 15:56:11 -08:00
Shane Smiskol 6addeddd6d Car flags: label static flags (#31639)
* comment, consistent source

* no caps not global

* no field

* label rest
old-commit-hash: 690dc55ea26dadb26ed768103baafba47428cda6
2024-02-29 15:36:40 -08:00
Shane Smiskol 03d35a8b09 Subaru: use carParams flags in interface (#31653)
* Subaru: don't use platform flags

* clean up
old-commit-hash: 0fa3445ddb829122fc8d67cd6aab7b9842a6e089
2024-02-29 15:19:31 -08:00
Justin Newberry b3bb450e4a add CAR.print_debug (#31652)
print debug
old-commit-hash: ac16c5518a300df5fa31e088a6e2a03d1a0d1747
2024-02-29 15:01:47 -08:00
Shane Smiskol a254be8fe3 Subaru: group steer rate limited with GEN2 (#31640)
* remove sideways diff

* make a subclass

* fix

* fix
old-commit-hash: 5d291cb64d2ff925a13cbf0f783517642929917f
2024-02-29 14:45:31 -08:00
Justin Newberry 1a5b057983 Honda: move to platformconfig (#31637)
* first

* Fixes

* not

* not

* Fixes

* fix

* cleanup + use sets for now

* update ref

* update ref
old-commit-hash: 5734d7c2bf13c217e469d37c4900321cba469121
2024-02-29 11:29:40 -08:00
Justin Newberry 1567508bd4 Mazda: move to platform config (#31647)
* mazda platform config

* update ref
old-commit-hash: e122f1d7498d5964066bcc6b3f63b7d215f6d591
2024-02-29 11:14:00 -08:00
Justin Newberry 1df44de8db Tesla: move to platform config (#31648)
tesla platform config
old-commit-hash: 80807879de395ae87ae3bcd88cd83eaac24ca744
2024-02-29 11:11:37 -08:00
Justin Newberry b17981eced carspecs: add more units (#31646)
more units
old-commit-hash: f775faf26d555a99f43b74f8949aeb463d1d868e
2024-02-29 10:42:11 -08:00
Cameron Clough 220ac6c422 test_processes: fix unclosed file (#31644)
old-commit-hash: 251eee46644c7975d732cb557af419d211532895
2024-02-29 11:17:13 -05:00
eFini 1aeceb60d6 CHS/CHT translation update (#31642)
update ZH translations
old-commit-hash: 8e82bce17ae10b5df8c87ee77135ac556c4c1aac
2024-02-29 02:47:32 -08:00
Shane Smiskol d8c7b75973 Platform config small cleanup (#31638)
no field, label mass, correct spacing
old-commit-hash: 85150c0289605c86f6aaeceebfc2376cd6027cf7
2024-02-28 23:54:41 -08:00
Adeeb Shihadeh 5b69d84a7e Revert "Ford: remove unnecessary __init__"
This reverts commit 65283c3439a4d8316d3d644415f651371fedaeb8.

old-commit-hash: b8c9d3bd09171a5b9a30cb91a262e9c089d28cfd
2024-02-28 21:13:26 -08:00
Shane Smiskol 88c941a097 Ford: remove unnecessary __init__
old-commit-hash: 7687cafe8cc805a8be139c4d8a797bffd0df3fc8
2024-02-28 20:47:49 -08:00
vanillagorillaa 70580d7979 Honda: add CanBus class (#31528)
* init canbus class

* zero

* put back after rebase

* cmt

* ordering

* fix bsm bus

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: e0a80d34d993fb4e7f2247ed3fc853d6e925f08e
2024-02-28 20:45:48 -08:00
Shane Smiskol d35f01464a move CarControllerBase up with other car classes
old-commit-hash: f20bfacb9434d5f9d2a6692352c1f686dec9327f
2024-02-28 20:23:09 -08:00
Justin Newberry 9ccd7f15f9 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
old-commit-hash: 3a6c3315ab181bf7390ae1faa6e87c93b1a97338
2024-02-28 20:12:14 -08:00
Harald Schäfer add26a5d1f GpsLocation: Rename accuracy to horizontal accuracy (#31629)
* Rename accuracy to horizontal accuracy

* typo in cereal
old-commit-hash: 85eb221e4c9344a5c135789691e8e0500aa51482
2024-02-28 19:55:57 -08:00
Alexandre Nobuharu Sato ae2cfa285a Multilang: update pt-BR translations (#31634)
update pt-BR translations
old-commit-hash: 3ae151635d829ce432c13d72b0b075ced892f704
2024-02-28 19:33:37 -08:00
Shane Smiskol 477e4253f6 GM: add more FW logging (#31633)
* add more DIDs

* one more

* update refs

* rm

* btr

* Update selfdrive/car/gm/values.py
old-commit-hash: ec9856b784e6cda8f02e012076666aebe7476650
2024-02-28 18:01:58 -08:00
Justin Newberry c3f35c3fbd add CarControllerBase base class to all CarControllers (#31630)
just base class for now
old-commit-hash: d4c497d82674126103118a4d5bb7a39db2823609
2024-02-28 17:13:44 -08:00
Shea_D 67c8dc043c Ford - Add OBDC Cable Length to CarPartList (#31608)
* Update comma cable requirement for Ford CANFD

* Adding Long_Cable to part list

* Moving cable info into doc_definitions under CarHarness

* Updating parts for ford_q4

* Updating Q3 info

* Updated MachE with USBC coupler

* fix typo

* updating docs/cars.md

* Add 3X angled no cable

* Adding in nocable device package

* Add missing )

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

* Generating new Docs.MD

* Added threex_nocable for MachE

* Swap MachE to regular mount no cable

* confirmed with Comma Operations all boxes include 1.5ft cable regardless of 9.5ft selection

* Updating CarInfo

* Update USB_Coupler for Q4 Harness

* Remove cable from import

* removed ]

* Disagree with the inconsistency but OK

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

* Update selfdrive/car/ford/values.py

---------

Co-authored-by: sheaduncan <sduncan@Yeti-PC>
Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 4cec88c02902ff15eafbb497e779c5ca2dc13d8b
2024-02-28 17:07:06 -08:00
Adeeb Shihadeh 62bbd08492 setup: add openpilot button (#31628)
* setup: add openpilot button

* rename
old-commit-hash: 6cf7599bcd1a0218bb359f72c3d17e15c53bae93
2024-02-28 15:54:21 -08:00
Justin Newberry 0f1f246bc0 scons: fix race condition with opendbc (#31621)
* fix race condition

* add to release

* fix for now

* bump
old-commit-hash: 7cf2b28b7883fdc3e68ad9e0974879103fa3a6ba
2024-02-28 11:41:42 -08:00
Shane Smiskol 2f507b42b8 Honda Civic (Nidec): allow fingerprinting without comma power (#31501)
* civic: FP with no OBD port

* non essential ecus
old-commit-hash: 2c247ea2c6f6c22aa6ce55a6220e75ab17b58e06
2024-02-27 22:12:00 -08:00
Shane Smiskol 080aaab898 Volkswagen: log camera ECU FW
old-commit-hash: a5fa419fbd32afe176dc4380e84c785bf84ba8aa
2024-02-27 21:48:40 -08:00
Shane Smiskol 2ff56746cf Honda Accord: allow fingerprinting without comma power (#31477)
* Do Accord

* add comment

* good test

* this catches the accord/accordh issue!

* as expected, only if both radar&camera have in common FW does the test fail

* cmt

* clean up

* better

* Use HondaFlags

* detect alt brake

* for test

* hypothesis isn't installed

* test failure

* works

* Revert " works"

This reverts commit bfc0d808abe548630e6507431f13b01e8a1316cb.

* Revert "test failure"

This reverts commit 10ab6eb63ccd411740751b742f31fd610397fe8e.

* Revert "hypothesis isn't installed"

This reverts commit d474cc3f0ed7e84fe8bd24f452b3315fd2b8d47c.

* Revert "for test"

This reverts commit 98e039f4fc0189ccb57c1dae6b344209ef15eb1c.

* this is important too

* clean up

* merge accord fingerprints, test

* remove duplicates

* accordh doesn't have these

* rm

* no unknown

* start over, merge platforms

* add cmt

* note non-essential ecus

* add non essential obd ecus

* combine FW

* format fingerprints (remove dups)

* migrate test models segs

* cmt

* Update ref_commit

* clean up
old-commit-hash: ce6637cd8ffdd9eef39a57fe67c3528c55b11c68
2024-02-27 20:09:02 -08:00
Shane Smiskol a0f30b7f96 Honda Accord: label non-essential ECUs (#31624)
* note non-essential ecus

* do accordh
old-commit-hash: 56e343b3f1e0117d379ad4582170d51609599530
2024-02-27 17:41:52 -08:00
Justin Newberry 013a965d1a tici tests: remove pytest.main (#31622)
pytest.main is bad!
old-commit-hash: 19db56b1f6a86a6a250e6b69f1533ae02d1fb367
2024-02-27 14:06:18 -08:00
Harald Schäfer 2f0d283183 Wheeled body (#31614)
* Wheeled body

* 100hz only for balance

* No carparams in locationd no more

* Update ref
old-commit-hash: c05b37979d49c0a586b56db9294aa061c2c079e2
2024-02-27 13:23:04 -08:00
Cameron Clough 4be71cbbad Ford: fix As-Built request identifier (#31609)
Should be 0xDE00 not 0xDE
old-commit-hash: 0e41bf34746854869ad0d319fbb6bb765288ce50
2024-02-27 10:59:27 -08:00
Justin Newberry bacfdaf539 chrysler: freeze dataclass + remove more from interface (#31613)
* fix

* fix
old-commit-hash: d457ed9d50801905b762c870c4799e734dea05b1
2024-02-27 10:23:13 -08:00
Justin Newberry fd574afc3e Chrylser: move to platform config (#31600)
* do chrysler

* chrysler specs

* cleanup

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

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 666c41d96923b1826f34a971b568f7d7754b4070
2024-02-27 10:16:22 -08:00
Justin Newberry 3321dfe90b Nissan: move to platform config (#31599)
* do nissan

* cleanup + fix
old-commit-hash: d3f0f76a7e33832bb7312597f85b802b50f2d757
2024-02-27 10:16:06 -08:00
Shane Smiskol 54684335d4 [bot] Fingerprints: add missing FW versions from new users (#31572)
* Export fingerprints

* get these FP in
old-commit-hash: 3978e7e98caef295ea60277bc7994e77b38823f3
2024-02-27 04:40:46 -08:00
Cameron Clough f7eed2aabf Ford: log interesting module configuration data (#31569)
* Ford: log interesting module configuration data

Ford ECUs have what is called "As-Built Data" which is configured at the
factory/workshop to set what packages/features are enabled on the car.
But they also contain vehicle specific information (VIN, make, model,
weight, wheel base...), DTC information and driver preferences.

I dumped the CAN traffic for the FORScan diagnostic tool to see how it
requests this information from the ECUs.

<details>
<summary>FORScan communication with IPMA (camera)</summary>
<pre>
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': '0200'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'TESTER_PRESENT', 'hex': '00'}
{'addr': 1806, 'type': 'positive_response', 'service': 'TESTER_PRESENT', 'hex': '00'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f190'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de00'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de00020799dbaa10296516a440000000000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f113'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1\x13JX7T-19H406-CH\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f1134a5837542d3139483430362d434800000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f188'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1\x88JX7T-14F397-AH\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f1884a5837542d3134463339372d414800000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f120'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1 JX7T-14F397-BF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f1204a5837542d3134463339372d424600000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f121'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f124'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1$JX7T-14F398-AG\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f1244a5837542d3134463339382d414700000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f125'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1%JX7T-14F398-BF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f1254a5837542d3134463339382d424600000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f126'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f10a'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f111'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1\x11JX7T-14F403-CA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f1114a5837542d3134463430332d434100000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f18c'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1\x8c182762191\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f18c31383237363231393100000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f162'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f110'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1\x10DS-JX7T-19H406-AD\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f11044532d4a5837542d3139483430362d414400000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': '0202'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'd100'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'd10001'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'd700'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'd70001010101'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'd701'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'd70101020000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'dd01'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'dd010102f8'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'f113'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'data': b'\xf1\x13JX7T-19H406-CH\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'hex': 'f1134a5837542d3139483430362d434800000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'fd08'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'fd0800000500500100300000000000000000000000300000000000000000200100400300100200001200f00300500000000000000300c00b00400200000000000000000000000000000000200f01201e01501400a00200200400700d02501d01700700e06405005e05503401100a000000002002002001000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'fd09'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'fd09ffec0001fef60002'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de00'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de00020799dbaa10296516a440000000000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DTC_INFORMATION', 'hex': '028f'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DTC_INFORMATION', 'hex': '02ff50019768c253002cc401862cc418862c'}
... skip DTC requests ...
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de00'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de00020799dbaa10296516a440000000000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de01'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de01fd5616db5fffff557fe1f842080000000800000008000000080000000819bfe00f7c00000000000000000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de02'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de02800000008000000080000000800000008337fc00800000008000000080000000800000008337fc0000000000000000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de03'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de03fffc26c3800000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de04'}
{'addr': 1806, 'type': 'positive_response', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de04546a8c0000000000'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de05'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de06'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de07'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de08'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de09'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de0a'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de0b'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de0c'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de0d'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
{'addr': 1798, 'type': 'request', 'service': 'READ_DATA_BY_IDENTIFIER', 'hex': 'de0e'}
{'addr': 1806, 'type': 'negative_response', 'hex': '2231'}
</pre>
</details>

Using UDS service `READ_DATA_BY_IDENTIFIER`, we can read the As-Built
blocks from `0xDExx` with no diagnostic session/security access necessary.

I used [Online As-Built databases](https://cyanlabs.net/asbuilt-db/) and
various coding spreadsheets shared online to find values we might be
interested in using for fingerprinting (both vehicle parameters and
identifying the platform).

ABS:
- Payload tier (Base, Mid Payload Upgrade, Heavy Duty Payload
  Upgrade...)
- Wheelbase
- Steering ratio
- Cruise Control Mode (Normal, Adaptive)
- Enable Stop and Go

PSCM:
- Enable Lane Keeping Aid
- Enable Traffic Jam Assist
- Enable Lane Centering Assist

IPMA (Q4):
- Steering ratio
- Wheelbase

APIM (Sync 3 and Sync 4):
- Steering ratio
- Vehicle weight
- Wheelbase

There are more potentially useful signals which I haven't included
although they might not be necessary:
- Vehicle (Ford platform code, like "C344" or "C519" - although the
  source of the mapping from index to code is FORScan and not Ford
themselves unless we can find a better source).
- Fuel type
- Vehicle length/height/front track/rear track
- Tire circumference (could be useful for converting wheel speed rad/s
  to m/s)
- Steering angle source (Pinion, Wheel)
- Country code (letters, e.g. US, CA or UK)
- Transmission type
- CAN network architecture
- More feature flags (the APIM also stores settings for ACC, LCA, BLIS)

The full list of settings I have found is
[here](https://github.com/incognitojam/op-notebooks/blob/main/ford/settings.py).

* FwQueryConfig: add data_requests

* add car_data to CarInterface get_params

* Revert "add car_data to CarInterface get_params"

This reverts commit aa161a6b82082705db97bea2c4317e1888a74845.

* test_ford: add APIM ecu address

* Revert "FwQueryConfig: add data_requests"

This reverts commit dc5484a9b80be5bc61a7fdf55560b8813bc43ef7.

* fix block numbers and add extra queries

* bump test_fw_query_timing

* add missing query whitelists

* simplify asbuilt requests

* use forscan block ids

* formatting

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: c724d1c86ce4044bfc03f1e7941871466f51a708
2024-02-27 04:22:10 -08:00
Justin Newberry d6f9e2c805 platformconfig: freeze all dataclasses (#31605)
* frozen

* frozen
old-commit-hash: 9ecff49118a053917b462aac9dd20cadcf56dd1a
2024-02-26 21:16:05 -08:00
Justin Newberry 36d50a2e45 remove cast for platformconfig (#31604)
* this isnt required

* Cleaner
old-commit-hash: 6d0027342ab00486e9cfbed1ffbd098642f2abd7
2024-02-26 21:01:41 -08:00
Justin Newberry c799790b9b move with_http_server to selfdrive/test/helpers (#31597)
* move

* fix
old-commit-hash: 9d1cafd0fccc0406a91309a2f9aa1053b498601d
2024-02-26 12:53:17 -08:00
Cameron Clough bf6a9e54af 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>
old-commit-hash: 8e03cdfc2ae72ea09208ce41ddc8f7a118c3b973
2024-02-25 17:55:42 -08:00