When implementing tests for an off season evaluation I've run into a lack of documentation on how to mock out encoders. Obviously, for booleans and analogs it is possible to do stuff like:
Code:
hal_data['analog_in'][2]['voltage'] = self.position
However, for encoder data this becomes a bit more complicated. I tried checking into 1418's code but they are heavily based on CAN and seem to be mocking CAN messages reporting the encoder values.
Was curious if anyone had tried to do this and found a good way to do it?
(65% test coverage is bothering me)