Quote:
Originally Posted by lineskier
Get rate is not ideal.
We store a last time variable.
Take counter.getdistance / (current time - last time)
Then reset the counter.
You will get a much stabler speed this way
|
this is straight out of the encoder class
Code:
* Get the current rate of the encoder.
* Units are distance per second as scaled by the value from setDistancePerPulse().
its practically the same as current time - last time