View Single Post
  #1   Spotlight this post!  
Unread 25-02-2014, 19:07
SenorPotter SenorPotter is offline
Student Programmer/Electrical
AKA: Daniel
FRC #3880 (Tiki Techs)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2012
Location: United States
Posts: 4
SenorPotter is an unknown quantity at this point
Trouble Printing to NetConsole

I've been having an interesting issue with printing data to the NetConsole using the standard cout<< function. When printing just one or two different reads, like this (from the end of our OperatorControl) then it works fine:

Code:
if (h%24 == 0){
	*G = int(gyro->GetAngle());
	cout<<("Gyroscope Angle: " && *G && "\n");
}
h++;
Wait(0.03);	// wait for a motor update time
But whenever I try to print a few more (I'll attach the second example, it's a bit cumbersome to look at in this format), I get an error from NetConsole about a kernel issue, the cRio crashes, and we have to reboot the robot and take away the cout's to make it work again.
The code's been compiling just fine otherwise, but I can't imagine why this wouldn't work. Would the cRio somehow be overloaded by the few extra prints? Any help is appreciated!
Attached Files
File Type: txt Won't Print.txt (625 Bytes, 14 views)

Last edited by SenorPotter : 25-02-2014 at 19:55. Reason: Realized I could wrap the code as a neat little code block
Reply With Quote