Go to Post Super Regional? I don't know...if you combine NJ and Philly the universe might tear a hole in itself...and we wouldn't want that now would we? Mwahaha. - George A. [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-03-2013, 20:05
omsahmad's Avatar
omsahmad omsahmad is offline
Registered User
FRC #1595 (Dragons)
 
Join Date: Oct 2010
Rookie Year: 2011
Location: Spokane, WA
Posts: 66
omsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really nice
Where does Windriver printf

So I know you can setup smartdashboard or DriverStationLCD, but where does Windriver print a line if you just put in the following (as seen in vision example):
Code:
	if(scoreCompare(scores[i], false))
	{
		printf("particle: %d  is a High Goal  centerX: %f  centerY: %f \n", i, report->center_mass_x_normalized, report->center_mass_y_normalized);
		printf("Distance: %f \n", computeDistance(thresholdImage, report, false));
	} else if (scoreCompare(scores[i], true)) {
		printf("particle: %d  is a Middle Goal  centerX: %f  centerY: %f \n", i, report->center_mass_x_normalized, report->center_mass_y_normalized);
		printf("Distance: %f \n", computeDistance(thresholdImage, report, true));
	} else {
		printf("particle: %d  is not a goal  centerX: %f  centerY: %f \n", i, report->center_mass_x_normalized, report->center_mass_y_normalized);
	}
	printf("rect: %f  ARinner: %f \n", scores[i].rectangularity, scores[i].aspectRatioInner);
	printf("ARouter: %f  xEdge: %f  yEdge: %f  \n", scores[i].aspectRatioOuter, scores[i].xEdge, scores[i].yEdge);	
}
printf("\n");
DriverStationLCD is pretty limited and I am still figuring stuff in SmartDashboard.

Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-03-2013, 20:12
Tanaythan's Avatar
Tanaythan Tanaythan is offline
Programmer
AKA: Tanay Nathan
FRC #3256 (Warriorborgs)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2010
Location: San Jose
Posts: 27
Tanaythan is an unknown quantity at this point
Re: Where does Windriver printf

Printf's go to the NetConsole for cRio or to the target console that can be accessed from Windriver. NetConsole is much more convenient as it does not go away when the cRio reboots; if you enabled NetConsole with your cRio imaging tool, I highly recommend the use of NetConsole. You can monitor all printfs from there.
__________________
Tanay Nathan
Programmer
Team #3256 Warriorborgs
Reply With Quote
  #3   Spotlight this post!  
Unread 15-03-2013, 14:40
omsahmad's Avatar
omsahmad omsahmad is offline
Registered User
FRC #1595 (Dragons)
 
Join Date: Oct 2010
Rookie Year: 2011
Location: Spokane, WA
Posts: 66
omsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really nice
Re: Where does Windriver printf

Quote:
Originally Posted by rawrxp View Post
Printf's go to the NetConsole for cRio or to the target console that can be accessed from Windriver. NetConsole is much more convenient as it does not go away when the cRio reboots; if you enabled NetConsole with your cRio imaging tool, I highly recommend the use of NetConsole. You can monitor all printfs from there.
Awesome, thanks
Reply With Quote
  #4   Spotlight this post!  
Unread 15-03-2013, 15:45
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Where does Windriver printf

Just be careful of sending a printf() in your while(IsOperatorControl()) loop. The frequency of such a thing is very high and will quickly swamp the network/cRio etc. Often we will use a static int counter or a timer.HasPeriodPassed(500) to only allow a printf to occur a few times per second.

bob
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
  #5   Spotlight this post!  
Unread 15-03-2013, 21:18
rbmj rbmj is offline
Registered User
FRC #0612 (Chantilly Robotics)
Team Role: Alumni
 
Join Date: Apr 2011
Rookie Year: 2011
Location: DC Area/Fairfax County
Posts: 192
rbmj is a jewel in the roughrbmj is a jewel in the roughrbmj is a jewel in the rough
Re: Where does Windriver printf

Quote:
Originally Posted by bob.wolff68 View Post
Just be careful of sending a printf() in your while(IsOperatorControl()) loop. The frequency of such a thing is very high and will quickly swamp the network/cRio etc. Often we will use a static int counter or a timer.HasPeriodPassed(500) to only allow a printf to occur a few times per second.
^This. Another good option is to printf() in a separate task that sleeps for 100ms or so every loop - we did this for our DriverStationLCD stuff and any printf()s we needed for debugging last year.
__________________
FRC 612 '12
USNA '16
Reply With Quote
Reply


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


All times are GMT -5. The time now is 03:32.

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