opgm / openpilot

GM openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 100 supported car makes and models.
https://standbacklabs.com
MIT License
57 stars 37 forks source link

Pedal Interceptor major overhaul #70

Open JasonJShuler opened 2 years ago

JasonJShuler commented 2 years ago

Shane changed the interceptor code on other cars to read the values raw (but the write is still scaled).

I have observed that the ADC/DAC values are not consistent from car to car. Heck, even temperature could have an impact.

I propose abandoning dbc scaling, and using a BP\V to hold the effective min and max raw value - initial values could go in CarParams, but I further propose that OP perform continuous or periodic calibration.

In GM's case, this could be done while parked if we have a good min/max value from the ECM.

no more mystery scaling, or hand calibration.

We should be monitoring and logging the status of the interceptor and generating events appropriately.

Unfortunately, this doesn't resolve GM's resistance difference from other cars - I was hoping to use the idle values to identify a GM car. It still may be possible, as the uncorrected ADC values are much much lower than anyone else...