Go to Post I guess we're going amish this year. - Jon Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 03-12-2005, 21:54
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Encoder help

Quote:
Originally Posted by RbtGal1351
I had a problem much like that before; none of my variables (longs) would change ever. Then I changed them to ints and it worked.
I suspect they were changing as they should, and the problem was that they just weren't printing correctly. printf isn't very friendly, and expects to print ints unless you can convince it otherwise. If you try to print a long the way you print most things, you just get the top couple of bytes of the value, which is usually going to end up being either 0 or -1.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoder Output Problems Mike Electrical 5 25-11-2005 21:43
encoder vs. motor stephenthe1 Programming 55 06-01-2005 22:07
Updated Encoder Code Available Kevin Watson Programming 2 04-01-2005 01:00
how to add steps in the provided encoder program for the edu Zaramel2002 Programming 3 11-02-2004 08:35


All times are GMT -5. The time now is 14:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi