Quote:
Originally Posted by SenorPotter
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!
|
I've always used printf() with no issues. It is surprising that you are having this issue, but printf() could be a workaround.