Changeset 19c8d3e in robotics


Ignore:
Timestamp:
08/11/13 18:16:01 (8 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master
Children:
cd4f159
Parents:
98791c8 (diff), 9757141 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of ssh://puzzlebox.info:22/repo/robotics

Location:
wheelchair
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • wheelchair/python/DoraRecieve.py

    r24bf8e2 r98791c8  
    3232previousTarget= 'i' 
    3333 
     34#DIRECTION_CODES = { 
     35        #'0': '', \ 
     36        #'1': 'left', \ 
     37        #'2': 'right', \ 
     38        #'3': 'reverse', \ 
     39        #'4': 'forward', \ 
     40        #'5': 'stop' 
     41#} 
     42 
     43# '\n' is equivalent to C++ endl 
    3444DIRECTION_CODES = { 
    3545        '0': '', \ 
     
    3848        '3': 'reverse', \ 
    3949        '4': 'forward', \ 
    40         '5': 'stop' 
     50        '5': 'stop', 
     51        '0\n': '', \ 
     52        '1\n': 'left', \ 
     53        '2\n': 'right', \ 
     54        '3\n': 'reverse', \ 
     55        '4\n': 'forward', \ 
     56        '5\n': 'stop' 
    4157} 
    4258 
  • wheelchair/python/Wheelchair_Control.py

    r9bf1fe2 r98791c8  
    5959COMMAND_CHARACTER = 'x' 
    6060GUI_SLEEP_TIMER = 1 * 100 # 100ms 
     61 
     62DEVICE_KEEPALIVE_TIMER = 1500 # 1.5s 
     63 
     64DEVICE_KEEPALIVE_CHECKSUM = 'Pz' 
    6165 
    6266WHEELCHAIR_COMMANDS = { 
     
    178182                self.speed = None 
    179183                self.setSpeed(0) 
     184                 
     185                 
     186                timer = QtCore.QTimer(self) 
     187                QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), self.deviceKeepalive) 
     188                #timer.start(256) 
     189                timer.start(DEVICE_KEEPALIVE_TIMER) 
     190         
     191         
     192        ################################################################## 
     193         
     194        def deviceKeepalive(self): 
     195                 
     196                if self.DEBUG: 
     197                        print "deviceKeepalive()" 
     198                         
     199                if self.wheelchair_command == 'stop': 
     200                        #self.moveBot('stop') 
     201                        self.setOutput(DEVICE_KEEPALIVE_CHECKSUM) 
    180202         
    181203         
Note: See TracChangeset for help on using the changeset viewer.