![]() |
Counter class issues
I am using the counter class as a makeshift encoder. During testing I had the code print out what value the getPeriod function was getting. The print statement however, was only outputting the correct number when the sensor gave a pulse. While there was no pulse it gave me zeroes. Does anyone have any clue as to why this may be happening?
|
Re: Counter class issues
getPeriod() would be working as intended. If the encoder is not getting a pulse it means the velocity is zero and thus getPeriod is zero.
Here's the actual source code for the method. Code:
public double getPeriod() {Code:
public boolean getStopped() { |
| All times are GMT -5. The time now is 10:08. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi