Project

General

Profile

Revision 294

Added by Red Robot almost 14 years ago

updated to use TT_GRANT instead of deprecated TT_ON, and also updated test/main.c to use majority and call parse_packet

View differences:

common.py
43 43
TT_PROGD = 'd'
44 44

  
45 45
#depricated
46
TT_ON = 'o'
46
#TT_ON = 'o'
47 47

  
48 48
TT_MAX_RETRY = 3
49 49

  
......
112 112
def sendTool(t):
113 113
    tn = t
114 114
    print "sending power to tool ID",tn
115
    sendMessage(tn, TT_ON, "") #TT_GRANT, "")
115
    sendMessage(tn, TT_GRANT, "")
116 116

  
117 117
def sendGrant():
118 118
    print "seding grant to cardbox (",CARDBOX_ID,")"
......
163 163
    start = bus.read(1)
164 164
    if start == '^':
165 165
        src = bus.read(1)
166
        if src == chr(1): #reflection
167
            print "(reflection)"
168
            flushPacket('^' + src)
169
            return readMessage()
166
        # if src == chr(1): #reflection
167
        #     print "(reflection)"
168
        #     flushPacket('^' + src)
169
        #     return readMessage()
170 170

  
171 171
        dest = bus.read(1)
172 172
        cmd = bus.read(1)

Also available in: Unified diff