Changeset 247 for trunk/brainstorms/Puzzlebox
- Timestamp:
- 12/06/10 01:51:07 (12 years ago)
- Location:
- trunk/brainstorms/Puzzlebox/Brainstorms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/brainstorms/Puzzlebox/Brainstorms/Interface.py
r246 r247 436 436 437 437 # Prevent attempting to connect to a device which does not exist 438 device = str(self.comboBox NXTPortSelect.currentText())438 device = str(self.comboBoxHelicopterPortSelect.currentText()) 439 439 if device == 'N/A': 440 440 self.pushButtonHelicopterConnect.setChecked(False) … … 543 543 544 544 # Prevent attempting to connect to a device which does not exist 545 device = str(self.comboBox NXTPortSelect.currentText())545 device = str(self.comboBoxWheelchairPortSelect.currentText()) 546 546 if device == 'N/A': 547 547 self.pushButtonWheelchairConnect.setChecked(False) … … 932 932 QtCore.SIGNAL("pressed()"), \ 933 933 self.driveWheelchairReverse) 934 self.connect(self.pushButtonWheelchair Forward, \934 self.connect(self.pushButtonWheelchairReverse, \ 935 935 QtCore.SIGNAL("released()"), \ 936 936 self.stopWheelchair) … … 939 939 QtCore.SIGNAL("pressed()"), \ 940 940 self.driveWheelchairLeft) 941 self.connect(self.pushButtonWheelchair Forward, \941 self.connect(self.pushButtonWheelchairLeft, \ 942 942 QtCore.SIGNAL("released()"), \ 943 943 self.stopWheelchair) … … 946 946 QtCore.SIGNAL("pressed()"), \ 947 947 self.driveWheelchairRight) 948 self.connect(self.pushButtonWheelchairRight, \ 949 QtCore.SIGNAL("released()"), \ 950 self.stopWheelchair) 948 951 949 952 self.connect(self.pushButtonWheelchairStop, \ -
trunk/brainstorms/Puzzlebox/Brainstorms/Wheelchair_Control.py
r242 r247 56 56 'forward': '00110010', 57 57 'reverse': '00110111', 58 'left': '01110011', 59 'right': '00100011', 58 # 'left': '01110011', # Turning in Speed 2 is disproportionately fast 59 # 'right': '00100011', # Turning in Speed 2 is disproportionately fast 60 'left': '10110011', # Turn Speed 1 61 'right': '00010011', # Turn Speed 1 60 62 'stop': '00110011', 61 63 }, … … 63 65 'forward': '00110000', 64 66 'reverse': '00111111', 65 'left': '11110011', 66 'right': '00000011', 67 # 'left': '11110011', # Turning in Speed 3 is too fast 68 # 'right': '00000011', # Turning in Speed 3 is too fast 69 'left': '01110011', # Turn Speed 2 70 'right': '00100011', # Turn Speed 2 67 71 'stop': '00110011', 68 72 }, … … 201 205 202 206 def sendCommand(self, speed, command): 203 204 self.device.write('%s%s' % (COMMAND_CHARACTER, \ 205 WHEELCHAIR_COMMANDS[speed][command])) 207 208 output = '%s%s' % (COMMAND_CHARACTER, \ 209 WHEELCHAIR_COMMANDS[speed][command]) 210 211 self.device.write(output) 206 212 207 213 if self.DEBUG: 208 print "--> Wheelchair Command: %s [Speed %i]" % \209 (command, speed )214 print "--> Wheelchair Command: %s (Speed %i) [%s]" % \ 215 (command, speed, output) 210 216 211 217 self.wheelchair_speed = speed
Note: See TracChangeset
for help on using the changeset viewer.