def drawPage(header, entries, duration): now = datetime.now() display.clear() y = display.drawHeader(20, header) display.drawEntries(entries, y, 15, 1) display.show() time.sleep(duration - (datetime.now() - now).seconds) return
def drawPage(duration): now = datetime.now() duration = timedelta(seconds=duration) while (datetime.now() - now).seconds < duration.seconds: display.clear() y = display.drawHeader(15, "CCU") drawEntries(y) display.show() return
def drawPage(duration): now = datetime.now() duration = timedelta(seconds=duration) while (datetime.now() - now).seconds < duration.seconds: display.clear() y = display.drawHeader(15, getIP()) display.drawEntries((getCpuLoad(), getMemUsage(), getDiskUsage(), getCpuTemp()), y, 12, 2) display.show() time.sleep(0.250) return
def drawPage(duration): now = datetime.now() duration = timedelta(seconds=duration) while (datetime.now() - now).seconds < duration.seconds: display.clear() y = display.drawHeader(15, "USV") display.drawEntries((getAkku(), getRuntime(), getVoltage(), getLoad()), y, 12, 2) # display.DRAW.bitmap((0,0), Image.open('ac.png').convert("RGBA")) display.show() return
def drawPage(duration): now = datetime.now() duration = timedelta(seconds=duration) MQTT.loop_start() while (datetime.now() - now).seconds < duration.seconds: display.clear() y = display.drawHeader(15, "Mosquitto") drawEntries(y) display.show() time.sleep(.1) MQTT.loop_stop() return