Go to Post I have always gotten the answers I need. They're just not always the answers I want... - Alan Anderson [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 17-01-2012, 13:15
makahn64 makahn64 is offline
Registered User
FRC #0256
 
Join Date: Nov 2011
Location: United States
Posts: 27
makahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these partsmakahn64 is infamous around these parts
NetConsole cout vs. printf on Old/New CRIO

Just a heads up that wasted a bit of my time...

It seems our new CRIO (4 slot) can print to the Net Console using cout without a namespace qualifier:

cout << "In autonomous mode";

Works fine. The exact same code on our old CRIO (8 slot) does not print to the screen. But printf works fine. Both have been 2012 re-imaged.

Not a big deal, but does anyone know why? Is there a magic namespace qualifier I can stick in front of cout to make it work for both?

netconsole::cout << "yada yada";
Reply With Quote
  #2   Spotlight this post!  
Unread 17-01-2012, 22:18
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: NetConsole cout vs. printf on Old/New CRIO

cerr (not cout) worked on the 8 slot one, try it on the 4 slot one, or redirect cout to cerr
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2012, 01:54
emusteve's Avatar
emusteve emusteve is offline
Registered User
AKA: Steve Martin
#0470 (Alpha Omega)
 
Join Date: Jan 2004
Location: Ypsilanti
Posts: 66
emusteve is just really niceemusteve is just really niceemusteve is just really niceemusteve is just really nice
Re: NetConsole cout vs. printf on Old/New CRIO

We have an 8-slot unit, and we get all the vxWorks startup output on NetConsole, but nothing from either a printf or cout. Tried the cerr suggestion as well, but nada!

We're trying to embed a simple text message (like printf("I'm Alive!\n"); )in the teleop section of the Simple Robot Template as a test case. Tried adding an Include# "stdio.h", but that didn't help either. No errors show up in the Build.

Anyone have an idea what I'm doing wrong?

Thanks,
Steve
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2012, 22:35
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: NetConsole cout vs. printf on Old/New CRIO

Quote:
Originally Posted by emusteve View Post
We have an 8-slot unit, and we get all the vxWorks startup output on NetConsole, but nothing from either a printf or cout. Tried the cerr suggestion as well, but nada!

We're trying to embed a simple text message (like printf("I'm Alive!\n"); )in the teleop section of the Simple Robot Template as a test case. Tried adding an Include# "stdio.h", but that didn't help either. No errors show up in the Build.

Anyone have an idea what I'm doing wrong?

Thanks,
Steve
You may need to check the box when you flash the cRIO with the imaging tool. It has to be enabled and is not by default.

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2012, 16:52
emusteve's Avatar
emusteve emusteve is offline
Registered User
AKA: Steve Martin
#0470 (Alpha Omega)
 
Join Date: Jan 2004
Location: Ypsilanti
Posts: 66
emusteve is just really niceemusteve is just really niceemusteve is just really niceemusteve is just really nice
Re: NetConsole cout vs. printf on Old/New CRIO

We did that (checked the NetConsole box when imaging), and it does give us all the vxWorks system messages, just nothing from our code.

Too much broken...switching to Java for this season.
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 04:55.

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