-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCathodeButton.py
39 lines (31 loc) · 874 Bytes
/
CathodeButton.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from AbstractButtonController import ButtonController
import MainLogicController as mainlogic
class CathodeButton(ButtonController):
def __init__(self, gpio_pin):
super(CathodeButton, self).__init__(gpio_pin)
def myCallBack(self, channel):
print "Button Controller: Cathode Button pressed"
inc = super(CathodeButton, self).getIncrementType()
mainlogic.cathodeCallBack(channel, inc)
'''
a = CathodeButton(15)
a.setIncrementType('up')
a.registerForButtonEvent()
a.myCallBack(15)
a.myCallBack(15)
a.myCallBack(15)
a.myCallBack(15)
a.myCallBack(15)
a.myCallBack(15)
for x in range(0, 99):
a.myCallBack(15)
b = CathodeButton(14)
b.setIncrementType('down')
b.registerForButtonEvent()
b.myCallBack(14)
b.myCallBack(14)
b.myCallBack(14)
b.myCallBack(14)
for x in range(0, 99):
b.myCallBack(15)
'''