how to display data with PROS like Brain.Screen.printAt() of vexcode
PROS is using Atom as its editor, which is much more conventient to use. but i can find PROS api do print simple things, it has LVGL, but not that friendly to use. and the Legacy LCD Emulator is not that cool .
thanks
This is what I use for making my auton selector but it can print anything you want on to the screen. For diagnostic stuff I use printf and the pros terminal. Which can be accessed with prosv5 terminal or through atom.
pros::lcd::initialize(); //This only needs to be called once at the start of you program.
pros::lcd::set_text(7, "Hello World!"); //The 7 is the line number.
I think @vex_lq doesn’t want to use the LCD emulator. I would recommend going to the LVGL GitHub page and going through the root code to form a better understanding of how the code works. That and using the examples.
Or instead of going through the source you coukd just read the docs: https://docs.littlevgl.com
Keep in mind that the version of LVGL in PROS is 5.1.1, not the latest 5.3, so there may be some discrepancies between the docs and reality (images especially).
That’s very similar to the what one of the coders on the team I coach did. It looks like you have multiple “labels” where he only has one but stores multiple lines of text in a string array to be printed on different lines of the label.
I’ve tried to get him to publish it but he’s spends all his free time working on 3d printing now.
I’m not sure there is a way to disable the LVGL task without recompiling pros =)
Unless there is a way to access the task handle by name and manually stop it.
Edit: Unless LVGL does not write until there is a change.
It doesn’t call the function to update the screen unless there is a change, that’s internal to LVGL, some sort of dirty flag I guess.
(at least that’s what I noticed when I ported LVGL over to VEXcode)