Northeastern-Electric-Racing / Cerberus

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

Pedal Faulting Conditions #78

Closed nwdepatie closed 6 months ago

nwdepatie commented 11 months ago

We need to trigger a fault in vPedalsMonitor if:

  1. Reading of both accelerator sensors differ for more than 100ms
  2. Reading of an accelerator sensor is bottomed out (just 0, detecting short circuit)
  3. Reading of an accelerator sensor is maxed out (max ADC reading, detecting open circuit)
  4. Do all of these for brake sensor too
  5. If we detect that the brake and pedal sensor are both pressed

This should mirror the fault handling we do here: https://github.com/Northeastern-Electric-Racing/Cerberus/commit/ad37d09fe37fe43a9a614c74d39618830ecaf754