Go to Post What do you do after making a design public? Improve it! What do you do when you give your opponents a weapon? Come up with a better one or a way to beat it! What is Wildstang going to do, you ask? Make their drivetrains better! - EricH [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 20-01-2007, 01:49
robind robind is offline
Registered User
FRC #0675
 
Join Date: Dec 2006
Location: Rohnert Park
Posts: 31
robind is an unknown quantity at this point
printf & User_Autonomous_Code

printf()s that take place in user_autonomous_code are not showing up on my terminal emulator. I'm using the dipswitches to force it into autonomous mode.

The code compiles fine with no errors or warnings, and I'm including <stdio.h>

What am I missing?
  #2   Spotlight this post!  
Unread 20-01-2007, 02:31
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,721
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: printf & User_Autonomous_Code

Posting your code will help us help you. As it is, we have no idea where your printfs are in your code. If you're calling the printfs in the fast loop instead of the slow loop, then the serial port is getting swamped and isn't having a chance to output the strings.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #3   Spotlight this post!  
Unread 20-01-2007, 02:38
robind robind is offline
Registered User
FRC #0675
 
Join Date: Dec 2006
Location: Rohnert Park
Posts: 31
robind is an unknown quantity at this point
Re: printf & User_Autonomous_Code

Ah, sorry, I guess I wasn't clear enough.

I'm calling printf('hello world'); from user_routines_fast.c/User_Autonomous_Code in the 'slow' (26.2ms loop area) loop.
  #4   Spotlight this post!  
Unread 20-01-2007, 02:43
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: printf & User_Autonomous_Code

Quote:
Originally Posted by robind View Post
Ah, sorry, I guess I wasn't clear enough.

I'm calling printf('hello world'); from user_routines_fast.c/User_Autonomous_Code in the 'slow' (26.2ms loop area) loop.
You need to use double quotes.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #5   Spotlight this post!  
Unread 20-01-2007, 02:44
robind robind is offline
Registered User
FRC #0675
 
Join Date: Dec 2006
Location: Rohnert Park
Posts: 31
robind is an unknown quantity at this point
Re: printf & User_Autonomous_Code

Ah, my mistake, I am using double quotes. Astronouth just informed me that I need to include the newline or else it won't flush. I'll give that a shot tomorrow.
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
Printf BillyJ Programming 9 21-01-2006 14:03
pic: The Bobcats 2001 &amp; 2003 &amp; Admirers CD47-Bot Robot Showcase 19 28-02-2004 12:36
printf isn't printf-ing. Help! Meandmyself Programming 14 15-02-2004 16:27
User_Autonomous_Code() questions sscanf Programming 8 07-02-2004 07:16


All times are GMT -5. The time now is 23:51.

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