Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
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
Exemple #4
0
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
Exemple #5
0
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