![]() |
Encoder Instance
Our team is programming in Java, and we can't find out how to create a proper instance of an encoder. We looked at the constructor method for Encoder, and it needs a boolean. However, when we put 'true' or 'false' in, we kept producing an error. The code looks sort of like this:
rfEncoder = new Encoder(true, 5); since this isn't working, what should we do instead? |
Re: Encoder Instance
Quote:
Encoder(int aChannel, int bChannel, boolean reverseDirection) Are you sure your looking at the Encoders in the Java 2011 Javadocs? I can't think of another reason why the javadocs you're looking at simply calls for two arguments, one of which is a boolean. Are you trying to program the magnetic encoders or the quad us Digital ones? I only have experience with the USDigital ones, with them you need two digital inputs for them to function correctly. Edit: Noticed you mentioned that the code look sort of like that. Could you post the exact line your writing? |
| All times are GMT -5. The time now is 22:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi