statusscreen

Status screens on the display: one line per step, newest at the bottom.

Shows what the board does while it starts (“Dashboard startet …”, “Verbinde mit <WLAN> …”) and which files an update brought before the board restarts, so both can be seen at once instead of only when the next data arrive. Switched on with defaults.STATUS_SCREENS.

The first line comes with a full refresh; each further line with a partial refresh against the image this module keeps itself, as the display controller’s RAM cannot be relied on (see epd4in2). The display and its framebuffer are injected, so this runs on the host.

Attributes

Classes

StatusScreen

Lines of progress, newest at the bottom.

Functions

update_summary(updated, removed[, old, new])

Lines to show before the restart after an update.

Module Contents

statusscreen.WIDTH = 400
statusscreen.HEIGHT = 300
statusscreen.MARGIN = 10
statusscreen.LINE_GAP = 4
statusscreen.BLACK = 0
statusscreen.WHITE = 1
class statusscreen.StatusScreen(epd, fb, buffer)

Lines of progress, newest at the bottom.

epd
fb
buffer
lines = []
shown = None
max_lines()

How many lines fit on the screen.

show(text, max_lines=2)

Add text (wrapped to max_lines) and update the panel.

close()

Put the display to sleep; the lines stay on the panel.

statusscreen.FILE_LINES = 6
statusscreen.update_summary(updated, removed, old=None, new=None)

Lines to show before the restart after an update.

Parameters:
  • updated – Names of the files stored.

  • removed – Names of the files deleted.

  • old – Version running now, or None.

  • new – Version after the restart, or None if the deploy tool did not send it.

Returns:

A list of (text, max_lines) for StatusScreen.show.