Plugin to refresh display every X changes
This commit is contained in:
parent
a2ea71c75c
commit
88b1eacd74
@ -48,6 +48,9 @@ main:
|
|||||||
wigle:
|
wigle:
|
||||||
enabled: false
|
enabled: false
|
||||||
api_key: ~
|
api_key: ~
|
||||||
|
screen_refresh:
|
||||||
|
enabled: false
|
||||||
|
refresh_interval: 50
|
||||||
|
|
||||||
# monitor interface to use
|
# monitor interface to use
|
||||||
iface: mon0
|
iface: mon0
|
||||||
|
27
pwnagotchi/plugins/default/screen_refresh.py
Normal file
27
pwnagotchi/plugins/default/screen_refresh.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
__author__ = 'pwnagotcchi [at] rossmarks [dot] uk'
|
||||||
|
__version__ = '1.0.0'
|
||||||
|
__name__ = 'screen_refresh'
|
||||||
|
__license__ = 'GPL3'
|
||||||
|
__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
|
||||||
|
update_count += 1
|
||||||
|
if update_count == OPTIONS['refresh_interval']:
|
||||||
|
ui._init_display()
|
||||||
|
ui.set('status', "Screen cleaned")
|
||||||
|
logging.info("Screen refreshing")
|
||||||
|
update_count = 0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user