How on exactly do you make text scroll on the controller screen?
To be honest, I’ve never done it before. However, I have guess on what might help you make it.
I assume you want to use up and down arrows (or some other buttons) on the controller to scroll through some list of printed information from controller.screen.print().
First, if you have a very small amount of information you want printed, you could just print on the three rows, and then use the setcursor to print more information on the other side of the screen for a total of 6ish pieces of info.
Else, if you need scrolling for some reason, you could try building something like this. Note, I use python, but that shouldn’t be relevant:
Create a global variable tracking your position in the list of information and set it to 0.
Then, in your main function, add two callbacks so that whenever the specified buttons are pressed they call an increase or a decrease function. In those functions, set the tracker = max(tracker - 1,0) or min(tracker + 1, [# OF LINES - 2]). The max and min make sure you don’t scroll off the end. Finally, you’ll need a function that prints all of the data you want printed. You could either call think function every 20 milliseconds or something, or, probably more difficult, call it every time one of those data points is updated or when the scrolling functions are called.
Inside the printing function, you would have a controller.screen.clear, and then print out the piece of data corresponding to the tracker position. Then, the tracker position + 1, then the tracker position + 2. You might have to call a nextrow function in between each print, not sure. Also, the data you want to print would probably have to be stored in an array to by easily accessed.
Of course, you could probably make a better system, but hopefully that gives you an idea on how to make it. If this didn’t help, please elaborate a bit more on what exactly your problem is.
Note: This mostly assumes you have the information you want to print accessible by a random custom print function that you would create.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.