Revision 286 trunk/common/common.py
| common.py (revision 286) | ||
|---|---|---|
| 42 | 42 |
TT_PROGM = 'p' |
| 43 | 43 |
TT_PROGD = 'd' |
| 44 | 44 |
|
| 45 |
#depricated |
|
| 46 |
TT_ON = 'o' |
|
| 47 |
|
|
| 45 | 48 |
TT_MAX_RETRY = 3 |
| 46 | 49 |
|
| 47 | 50 |
MAX_PAYLOAD_LEN = 32 |
| ... | ... | |
| 109 | 112 |
def sendTool(t): |
| 110 | 113 |
tn = t |
| 111 | 114 |
print "sending power to tool ID",tn |
| 112 |
sendMessage(tn, TT_GRANT, "") |
|
| 115 |
sendMessage(tn, TT_ON, "") #TT_GRANT, "") |
|
| 113 | 116 |
|
| 114 | 117 |
def sendGrant(): |
| 115 | 118 |
print "seding grant to cardbox (",CARDBOX_ID,")"
|
| ... | ... | |
| 248 | 251 |
def initBus(filename): |
| 249 | 252 |
global bus |
| 250 | 253 |
|
| 251 |
bus = serial.Serial(filename, BAUD_RATE, timeout = 2) |
|
| 254 |
bus = serial.Serial(filename, BAUD_RATE, timeout = 1) |
|
| 252 | 255 |
bus.flushInput() |
| 253 | 256 |
print bus |
| 254 | 257 |
|
Also available in: Unified diff