Re: amt10 odd behavior
figured out what's going on.
first, there appears to be a bug (or feature depending upon how you view it) in the smartdashboard wrt the "zero distance" button on the encoder widget. in test mode, if you click on the "zero distance" button for the encoder, it sets the displayed value to zero. it DOES NOT set the the distance accumulator to zero. basically if the smartdashboard is showing 90 as the current distance from the encoder, clicking the zero distance button will set the displayed value to 0. but the value in the acculator is still 90. as soon as i moved the encoder, the displayed value will jump from zero to 90 and start tracking.
this is not the case for the reset method on the encoder class. that appears to function properly, setting the accumulated value to zero.
in addition (and this is our fault) the connectors we used to connect the encoder wire to the roborio port were not very secure and as such i believe were causing either spikes or missed edges which in turn made using the distance in a PID controller unstable. we have since purchased connectors from digikey that are much more secure and show a clean edge on an o-scope.
so, is there a way to log a bug against smartdashboard? or get the source code so i can propose a patch?
|