View Single Post
  #23   Spotlight this post!  
Unread 15-05-2009, 17:04
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 805
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Misbehaving encoders

Quote:
Originally Posted by nathanww View Post
And with the long-int %d--even if this was printing incorrectly, the encoder stopped flag should be changing, right?
The long-int printing question is easily fixed. I don't know if it is incorrect as previously written, but typecasting will get rid of all doubt and make sure it works as you think it should.

Code:
printf("encoder1=%d", (int)(encoder1->Get()));