I’m trying to debug my robot and trying to print some values to the terminal using this code: std::cout << pose.x << std::endl;
. However, I don’t see any output in the terminal. I’m using the PROS VSCode extension.
make sure you are looking after running the pros terminal
command or clicking the Brain Terminal
button in the PROS Sidebar. Additionally, make sure you have a sizable delay in between print statements (greater than 70ms in between any commands to the controller), as the controller takes a lot longer to transmit than a direct connection to the brain.
1 Like
- Does the 70ms delay apply to two different commands, like doing
std::cout << "text";
and thenmaster.set_text(0, 0, "more text");
? - What happens if you print two things without a delay between them? Does the second print statement get ignored just like with controller text setting?
- Does
std::cout << "stuff" << std::endl;
count as 1 print statement or two?
- Yes, you will need a delay between those commands.
- It depends, sometimes it works sometimes it wont. Generally you wont see the second message.
- I’m not sure if that is one or 2 commands.
printf(“some text here \n”);
counts as one command, so im assuming the cout would be 1 command
1 Like
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.