screen ====== .. py:module:: screen .. autoapi-nested-parse:: The image on the panel, kept on flash between updates. A partial refresh needs the image the panel shows as the "old" one, but the display controller loses its RAM on every init (the reset after deep sleep), and with config.DISPLAY_OFF_IN_SLEEP also its supply. So the image is saved here after every refresh: 15000 bytes per fetch, spread by the file system's wear levelling over the free flash. Attributes ---------- .. autoapisummary:: screen.SCREEN_FILE Functions --------- .. autoapisummary:: screen.save screen.load Module Contents --------------- .. py:data:: SCREEN_FILE :value: 'screen.bin' .. py:function:: save(buffer, path=SCREEN_FILE) Store the image; a power cut leaves the previous file intact. .. py:function:: load(size, path=SCREEN_FILE) The saved image, or None if there is none of the expected size.