mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
new: grid plugin can now do messaging
This commit is contained in:
@ -12,6 +12,13 @@ class State(object):
|
||||
self._state[key] = elem
|
||||
self._changes[key] = True
|
||||
|
||||
def has_element(self, key):
|
||||
return key in self._state
|
||||
|
||||
def remove_element(self, key):
|
||||
del self._state[key]
|
||||
self._changes[key] = True
|
||||
|
||||
def add_listener(self, key, cb):
|
||||
with self._lock:
|
||||
self._listeners[key] = cb
|
||||
|
Reference in New Issue
Block a user