Pros, print to controller only show one line

I use update-to-date PROS and V5 firmware.
I try to print three lines to the controller screen. However only the first line printed. Thank you for your help.

void  opcontrol() {

 	pros::Controller master(CONTROLLER_MASTER);

  master.clear();
 
 	while (true) {

    master.print(0, 0, "Vex");
    master.print(1, 0, "girl");
    master.print(2, 0, "arm:%8.2f", arm.get_position());

 		pros::delay(100);
 	}
 }

You to wait 50ms between updates.

1 Like

Thanks.
I already have pros::delay(100) at the end of code which should delay 100 ms. Or should I add pros::delay after each print command?

void  opcontrol() {

 	pros::Controller master(CONTROLLER_MASTER);
        master.print(0, 0, "Vex");
        auto timeFlag=pros::millis();
 	while (true) {
           if(pros::millis()-timeFlag>=1000)
             {
                    master.print(1, 0, "arm:%8.2f", arm.get_position());
                    timeFlag=pros::millis();
             }
         pros::Task::delay_until(&timeFlag, 10);
 	}
 }

You can ask me directly via wechat

He can only display two lines in my previous version test.
I don’t need Pros:: delay(), which is 10ms at most. It can’t be 100ms.

2 Likes

Thanks. It works. I guess each print command should be 50 ms apart.

1 Like