Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   dprintf (http://www.chiefdelphi.com/forums/showthread.php?t=72037)

bobbyt14 13-01-2009 15:51

dprintf
 
so the vision docs say that dprintf is supposed to print to a file in the root directory of the robot when SetDebugFlag() is set correctly. When I run programs initialized in this way, no file exists when I ftp the root file directory.

I'm wondering if there's some additional function i need to flush the file or some other way of running the robot (rather than download the code and reset the robot in windriver).

thanks

foemill 15-01-2009 13:24

Re: dprintf
 
Here's a blurb from the FRC_Visio_API docs:

SetDebugFlag
Sets the debug flag to write to a file or console output. The debug files are written to the root directory
and are called “filename.debug” where filename = name of the calling routine.
The files may be ftp’d to
the PC for inspection. Be careful to remove these periodically so that they do not get too large and fill up
the disk. It is recommended to use file debug levels only during active debugging, and turn off debug (or
screen only) most of the time.

void SetDebugFlag ( FrcvDebugOutputType flag )

Parameters:
flag – Debug output type. This can be:

DEBUG_OFF, // no debug
DEBUG_MOSTLY_OFF, // only critical/fatal errors logged
DEBUG_SCREEN_ONLY, // no file, only console
DEBUG_FILE_ONLY, or // no console, only file
DEBUG_SCREEN_AND_FILE. // both console & file


Are you setting "funcName" to some string value in your function?

EX:
char funcName[] = “someFunctionName”;
dprintf(LOG_DEBUG, "Test from %s", funcName );



Quote:

Originally Posted by bobbyt14 (Post 800294)
so the vision docs say that dprintf is supposed to print to a file in the root directory of the robot when SetDebugFlag() is set correctly. When I run programs initialized in this way, no file exists when I ftp the root file directory.

I'm wondering if there's some additional function i need to flush the file or some other way of running the robot (rather than download the code and reset the robot in windriver).

thanks



All times are GMT -5. The time now is 00:13.

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