screen

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

Functions

save(buffer[, path])

Store the image; a power cut leaves the previous file intact.

load(size[, path])

The saved image, or None if there is none of the expected size.

Module Contents

screen.SCREEN_FILE = 'screen.bin'
screen.save(buffer, path=SCREEN_FILE)

Store the image; a power cut leaves the previous file intact.

screen.load(size, path=SCREEN_FILE)

The saved image, or None if there is none of the expected size.