Northeastern-Electric-Racing / Cerberus

Our FreeRTOS-based vehicle control application
1 stars 0 forks source link

Better pedals #154

Closed nwdepatie closed 2 months ago

nwdepatie commented 2 months ago

Changes

Changed to DMA implementation of ADC reading, revamped whole pedal reading sequence to be a lot simpler, offloading the work to hardware

Notes

We are no longer polling the pedal ADCs which should significantly increase performance while also allowing for us to read 4 channels of the same ADC to use ADCs more efficiently

There is also a case to be made to have the DMA drive the pedal conversions, essentially replacing the "pedal monitoring task" with a callback invoked by the interrupt function. Might be in scope of this PR because it isn't too bad, but I want to validate ADC DMA stuff first

Test Cases

To Do

Any remaining things that need to get done