Skip to content

Simulated display

Matthieu Houdebine edited this page Mar 10, 2024 · 7 revisions

If you do not have a Turing LCD for now, or do not want to use it at some point, you can always use the "simulated display" mode included with this project.
The "simulated display" mode works for System Monitor and standalone code.

When enabled, all bitmaps will be written to a file on the filesystem instead of being sent to a real display.
This allow to save screen captures, and to easily test themes during creation.

Enable the "Simulated display" mode for System Monitor

From the Configuration UI, select Simulated screen as Smart screen model.
Don't forget to also select the size of your simulated display, to get related themes.
Capture d’écran_2024-03-10_21-21-21
When it's done, click on Save and run button.

You can also edit manually config.yaml and change REVISION to REVISION: SIMU then start the program.

Enable the "Simulated display" mode for standalone code

from library.lcd_simulated import LcdSimulated

lcd_comm = LcdSimulated(display_width=320,
                        display_height=480)

Use "Simulated LCD" mode

A bitmap named screencap.png will be created and updated like the real display would.
You can open this bitmap and copy it to save a screenshot.
A webserver will also be started, serving a webpage on http://localhost:5678 displaying screencap.png with auto-refresh.