Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   printf & User_Autonomous_Code (http://www.chiefdelphi.com/forums/showthread.php?t=52323)

robind 20-01-2007 01:49

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?

Kevin Sevcik 20-01-2007 02:31

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.

robind 20-01-2007 02:38

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.

Kevin Watson 20-01-2007 02:43

Re: printf & User_Autonomous_Code
 
Quote:

Originally Posted by robind (Post 560978)
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

robind 20-01-2007 02:44

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.


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

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