Revision 283 trunk/swipe/manualtron.py
| manualtron.py (revision 283) | ||
|---|---|---|
| 29 | 29 |
common.initBus(sys.argv[1]) |
| 30 | 30 |
|
| 31 | 31 |
def key(): |
| 32 |
if not common.sendKeyRequest(): |
|
| 33 |
print "could not send request!!" |
|
| 32 |
x = readTransaction() |
|
| 33 |
|
|
| 34 |
if x == None: |
|
| 35 |
print "Didn't get valid transaction" |
|
| 34 | 36 |
return False |
| 35 | 37 |
|
| 36 |
ret = common.readKey() |
|
| 37 |
common.sendAck(2) |
|
| 38 |
[key,card] = x |
|
| 38 | 39 |
|
| 39 |
print ret |
|
| 40 |
print "key:",key |
|
| 41 |
print "cardnum:",card |
|
| 42 |
return True |
|
| 40 | 43 |
|
| 44 |
|
|
| 41 | 45 |
def ping(t): |
| 42 | 46 |
common.sendMessage(t, common.TT_PING, "") |
| 43 | 47 |
print common.checkAck(t) |
Also available in: Unified diff