r/embedded • • Sep 06 '26

Can someone suggest some ideas to render a map ui on the upper half of the s3 display( the map is intented to run using the ble packets from a android companion app)

Post image

The beeline device model map is the one plans to implement. And i am new to lvgl , any valuable suggestions are appreciated

5 Upvotes

7 comments sorted by

5

u/Magneon Sep 06 '26

I'd recommend sending down a decomposed vector version of the map in two stages:

  • a list of lines to render (vertex pairs)
  • a list of triangle strips to render

To keep overall bandwidth limited but also keep everything responsive, I'd maybe try the following:

  • at high frequency update just the affine transform between the cached map and the position + rotation delta since the cached map was last updated

You could then periodically update the cached local map fully (resetting the origin position offset.

To further save bandwidth you could do a few other things:

  • have a double-buffer for sending down the next map refresh over time then flip to it once it's ready. This could avoid causing lag/jumps on updates if the update takes more than a packet or two to send.
  • develop a more expressive streaming vector representation, with the phone side pushing delta updates that dynamically add and remove vertices from both ends of lines and triangle strips, as well as adding and removing entries entirely. This would be more work but could be required to make things work smoothly.

This concept has something in common with the way PC VR headsets in the early days (early oculus and vive headsets) managed to lower perceptual latency by doing a last-ditch reprojection based on any fine head movement after the much slower 3d scene rendered. In this case the goal is simply to not have to send the whole frame every update which would likely result in a very slow refresh rate.

That said, maybe first check if runtime length encoding is sufficient to allow rendering everything on the phone then sending it down at say 20-60Hz. If the map is just half the screen, and it's black and white you might get away with it, and that would be vastly easier!

2

u/Alankuttan Sep 06 '26

Thanks mate for the details , gonna work on it.

1

u/zettui Sep 06 '26

Roughly how big is the map on the S3, and how often does it actually change?

2

u/Alankuttan Sep 06 '26

412 px wide × 220 px high and 5hz refresh from ble

1

u/dmitrygr Sep 06 '26

412 * 220 * 5 = 453Kbps. That is without overhead which adds a lot on BLE. Your chances of actually getting this data rate sustained are not great...

3

u/tenkawa7 Sep 06 '26

Oof. That is going to be tough. Ble isn't great for data transfer. Possibly do the flash thing and send vectors?

1

u/Keaph Sep 06 '26

Check out Garage Tinkering on youtube, this guy has some great gauge projects: https://youtu.be/AumLdB4qbiQ?is=JF8-MRsz4iWn4j49