Go to Post Once you go hex you'll never go back. - sdcantrell56 [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-09-2008, 08:24
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot not doing what we need it to, and printfs aren't working

Your print statements have mixed types where you attempt to print unsigned char (e.g., pwm01) and double (wFL) types as ints (%d). Typecast the arguments (int).

Statements such as:
pwm01 = (int)wFL + 127;
start with a double, typecast it to int, then assign it to unsigned char
as opposed to keeping your calculation as double then typecasting the result to unsigned char.
Are you doing that to speed things up? Just curious, not a problem.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 18-09-2008 at 08:37.
Closed Thread


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
Need some help with arm not working... neilcooper Programming 3 15-03-2008 06:16
If the computer and internet was not invented, what would you be doing right now? Bharat Nain Chit-Chat 55 03-06-2006 11:55
my comp is not working right and i need help Timmyd Chit-Chat 17 07-11-2005 23:39
Camera not working when connected to robot MarkVH Programming 5 14-02-2005 15:40
Robot Controller Not Working !?!?! Team1425 Electrical 3 24-01-2004 20:52


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

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