statusscreen ============ .. py:module:: statusscreen .. autoapi-nested-parse:: 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 …") 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 ---------- .. autoapisummary:: statusscreen.WIDTH statusscreen.HEIGHT statusscreen.MARGIN statusscreen.LINE_GAP statusscreen.BLACK statusscreen.WHITE statusscreen.FILE_LINES Classes ------- .. autoapisummary:: statusscreen.StatusScreen Functions --------- .. autoapisummary:: statusscreen.update_summary Module Contents --------------- .. py:data:: WIDTH :value: 400 .. py:data:: HEIGHT :value: 300 .. py:data:: MARGIN :value: 10 .. py:data:: LINE_GAP :value: 4 .. py:data:: BLACK :value: 0 .. py:data:: WHITE :value: 1 .. py:class:: StatusScreen(epd, fb, buffer) Lines of progress, newest at the bottom. .. py:attribute:: epd .. py:attribute:: fb .. py:attribute:: buffer .. py:attribute:: lines :value: [] .. py:attribute:: shown :value: None .. py:method:: max_lines() How many lines fit on the screen. .. py:method:: show(text, max_lines=2) Add `text` (wrapped to `max_lines`) and update the panel. .. py:method:: close() Put the display to sleep; the lines stay on the panel. .. py:data:: FILE_LINES :value: 6 .. py:function:: update_summary(updated, removed, old=None, new=None) Lines to show before the restart after an update. :param updated: Names of the files stored. :param removed: Names of the files deleted. :param old: Version running now, or None. :param 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`.