Project

General

Profile

Revision 210

Updated jumptable and Makefile for tooltron to work with bootloader
updated tooltron.py to handle NACKs
Fixed tooltron.py to send 'o' instead of 'O'

View differences:

tooltron.py
81 81
TT_NACK    = 'n'
82 82
TT_TO      = 'f'
83 83
TT_TIMEOUT = 't'
84
TT_ON      = 'o'
84 85

  
85 86
BAUD_RATE = 9600
86 87

  
......
220 221
    # ^ <src> <dest> <data>
221 222
    def sendTool(t):
222 223
        tn = keypad2toolID(t)
223
        msg = '^' + chr(1) + chr(tn) + 'O' + chr(1 ^ tn ^ ord('O'))
224
        msg = '^' + chr(1) + chr(tn) + TT_ON + chr(1 ^ tn ^ ord(TT_ON))
224 225
        print "seding power to tool ID",tn
225 226
        bus.write(msg)
226 227
        return

Also available in: Unified diff