From 0c81d25aec21bfe52d6a4fd996a2c11c4e7305bb Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Tue, 8 Oct 2019 17:04:46 +0200 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- pwnagotchi/plugins/default/screen_refresh.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pwnagotchi/plugins/default/screen_refresh.py b/pwnagotchi/plugins/default/screen_refresh.py index 72681515..72c2a1c1 100644 --- a/pwnagotchi/plugins/default/screen_refresh.py +++ b/pwnagotchi/plugins/default/screen_refresh.py @@ -6,22 +6,19 @@ __description__ = 'Refresh he e-ink display after X amount of updates' import logging -from pwnagotchi.ui.components import LabeledValue -from pwnagotchi.ui.view import BLACK -import pwnagotchi.ui.fonts as fonts - OPTIONS = dict() update_count = 0; + def on_loaded(): logging.info("Screen refresh plugin loaded") + def on_ui_update(ui): - global update_count + global update_count update_count += 1 if update_count == OPTIONS['refresh_interval']: ui._init_display() ui.set('status', "Screen cleaned") logging.info("Screen refreshing") update_count = 0 -