projects
/
saartuer.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
7b212a194f79bdc5398c47e52cf2c2dccf9aa4c0
[saartuer.git]
/
waker.py
1
from libtuer import ThreadRepeater
2
from statemachine import StateMachine
3
4
class Waker():
5
def __init__(self, sm):
6
self._sm = sm
7
self._t = ThreadRepeater(self._wake, 0.5, name="Waker")
8
9
def _wake(self):
10
self._sm.callback(StateMachine.CMD_WAKEUP)
11
12
def stop(self):
13
self._t.stop()