Go to Post Can anyone tell that it is 5:20 in the morning and I can't sleep? Thanks, Dave. - ChuckDickerson [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 21-02-2005, 22:56
PVC Pirates PVC Pirates is offline
Programmer
#1058 (PVC Pirates)
Team Role: Programmer
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Londonderry, NH
Posts: 7
PVC Pirates is an unknown quantity at this point
Send a message via AIM to PVC Pirates Send a message via MSN to PVC Pirates
printf statements do not display in autonomous mode

When I try to use a printf statement in the autonomous code, nothing displays on the console on the computer that is connected to the RC. I don't know why the printf statements don't work, but the autonomous code doesn't entirely work correctly either. Is it possible that the two problems are related? Even if they are unrelated, I need the printf statements to help me fix the problem.

Any insight into this problem would be appreciated.
__________________
In practice, the difference between theory and practice, is greater than it is in theory.
  #2   Spotlight this post!  
Unread 21-02-2005, 23:04
neilsonster's Avatar
neilsonster neilsonster is offline
Registered User
AKA: Andrew Neilson
FRC #0772 (Sabre Bytes)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 188
neilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to allneilsonster is a name known to all
Send a message via MSN to neilsonster
Re: printf statements do not display in autonomous mode

Quote:
Originally Posted by PVC Pirates
When I try to use a printf statement in the autonomous code, nothing displays on the console on the computer that is connected to the RC. I don't know why the printf statements don't work, but the autonomous code doesn't entirely work correctly either. Is it possible that the two problems are related? Even if they are unrelated, I need the printf statements to help me fix the problem.

Any insight into this problem would be appreciated.

Well this might be obvious but have you #included printf_lib.h in user_routines_fast? and are you giving the commands in the while (autonomous_mode) (or whatever it is) loop? I'm not sure what else could be wrong.. sorry :/.
  #3   Spotlight this post!  
Unread 22-02-2005, 00:41
probizzle's Avatar
probizzle probizzle is offline
Registered User
AKA: Prabhas Pokharel
#0639 (Code Red)
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2003
Location: Ithaca
Posts: 78
probizzle will become famous soon enoughprobizzle will become famous soon enough
Send a message via AIM to probizzle
Re: printf statements do not display in autonomous mode

Make sure Initialize_Serial_Comms or Serial_Driver_Initialized is called before any printfs...

dunno if that's the error
__________________
Code Red Team 639 Winners of the 2005 FingerLakes Regional with 191 and 494.
--
http://pset.deu83.com << my baby
http://www.setgame.com/set/ << it's mother
  #4   Spotlight this post!  
Unread 22-02-2005, 15:41
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,820
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: printf statements do not display in autonomous mode

If you are using the printf that came with the new compiler you will need:
Code:
#include <stdio.h>
in every file you want to use printfs, such as user_routines_fast.c, or else you will neither compile error, nor any printout.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 22-02-2005 at 15:48.
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
a simple autonomous mode question chippermonky Programming 3 18-02-2005 01:54
A little question about the autonomous mode Anton Programming 4 18-01-2005 14:08
Future of Autonomous Mode FadyS. Programming 41 24-05-2004 19:45
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11


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

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