Detecting digital inputs

At the San Diego regional, we had a digital sidecar fail on us. We replaced it with another one from spare parts, and our autonomous mode and frisbee detection failed in the next match. Upon inspection of the replacement sidecar, we found that a capacitor leading to the digital inputs was destroyed, and we were unable to receive any digital signals. For safety reasons, I don’t want autonomous to run out of control when our encoders return a constant 0. Is there any protection we can do in software? Put a jumper on one of the inputs and check for that? Any ideas are appreciated.

Ideas:

-Wire between DSC 5v/6v to spare ADC channels to check for voltage supply issues. We do this with the analog 5v supply (with a jumper in ADC 7 between 5v and sig), and could do this with digital 5v supply if we wanted to (6v only makes sense if you use servos or vex motors). The NI ADC card will measure ±10v, so you can connect 6v directly.

-It might be possible to measure the voltage on a DIO pin set to input mode to measure the strength of the pull-up resistor on that pin. A failure upstream of that specific resistor (such as the power supply capacitor in this case) could be detected by measuring a spare pin

-You could jumper two digital pins, one in input and another in output and see if changing the output changes the input. However, this would work even if the pull-up resistors fail, which is likely the fault you saw.
–You can also use a Relay output and digital input, they are low-speed DO’s on shift registers (shifted every 5ms).

For encoders, you can do rationality checks based on assumed noise vs expected motion:
-If abs(applied motor power) > 0.1 and count delta for this loop < cal increment error counter for that sensor
-else decrement error counter
-if error counter > error thresh cal then fault sensor
-if disabled reset counter
-if sensor faulted then determine limpin strategy (use other encoder if it’s not faulted, ??? if both are faulted)