Changeset 77 for remote_control/puzzlebox_brainstorms_client_interface.py
- Timestamp:
- 06/30/10 09:34:59 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
remote_control/puzzlebox_brainstorms_client_interface.py
r74 r77 9 9 # For more information please refer to http://www.gnu.org/copyleft/gpl.html 10 10 # 11 # Last Update: 2010.06.2 811 # Last Update: 2010.06.29 12 12 # 13 13 ##################################################################### … … 46 46 NXT_BLUETOOTH_DEVICE = configuration.NXT_BLUETOOTH_DEVICE 47 47 48 THINKGEAR_SERVER_HOST = configuration.THINKGEAR_SERVER_HOST 49 THINKGEAR_SERVER_PORT = configuration.THINKGEAR_SERVER_PORT 50 48 51 ##################################################################### 49 52 # Classes … … 61 64 62 65 self.configureSettings() 63 self.configureNetwork ()66 self.configureNetworkBrainstorms() 64 67 self.connectWidgets() 65 68 … … 69 72 def configureSettings(self): 70 73 71 # Bluetooth readout current not available 72 self.textLabelBluetoothStatus.setText("Status: N/A") 74 # LEGO Mindstorms 75 76 # NXT Bluetooth readout current not available 77 self.textLabelNXTStatus.setText("Status: N/A") 73 78 74 79 # Display communication port for LEGO Mindstorms NXT device 75 self.lineEditBluetoothPort.setText(NXT_BLUETOOTH_DEVICE) 76 77 # Bluetooth connection control not available 78 self.pushButtonBluetoothConnect.setEnabled(False) 80 self.lineEditNXTPort.setText(NXT_BLUETOOTH_DEVICE) 81 self.lineEditNXTPort.setEnabled(False) 82 83 # NXT Bluetooth connection control not available 84 self.pushButtonNXTConnect.setEnabled(False) 85 86 87 # EEG Headset 88 89 # Display Host for ThinkGear Connect Socket Server 90 self.lineEditThinkGearHost.setText(THINKGEAR_SERVER_HOST) 91 self.lineEditThinkGearHost.setEnabled(False) 92 93 # Display Port for ThinkGear Connect Socket Server 94 self.lineEditThinkGearPort.setText('%i' % THINKGEAR_SERVER_PORT) 95 self.lineEditThinkGearPort.setEnabled(False) 96 97 98 # Thresholds Removed 79 99 80 100 # Set concentration threshold value 81 concentration_threshold = \82 self.getMinimumThreshold(THINKGEAR_POWER_THRESHOLDS['concentration'])83 self.spinBoxConcentrationThreshold.setValue(concentration_threshold)84 self.spinBoxConcentrationThreshold.update()101 #concentration_threshold = \ 102 #self.getMinimumThreshold(THINKGEAR_POWER_THRESHOLDS['concentration']) 103 #self.spinBoxConcentrationThreshold.setValue(concentration_threshold) 104 #self.spinBoxConcentrationThreshold.update() 85 105 86 106 # Concentration threshold value not modifiable 87 self.spinBoxConcentrationThreshold.setEnabled(False)107 #self.spinBoxConcentrationThreshold.setEnabled(False) 88 108 89 109 # Set relaxation threshold value 90 relaxation_threshold = \91 self.getMinimumThreshold(THINKGEAR_POWER_THRESHOLDS['relaxation'])92 self.spinBoxRelaxationThreshold.setValue(relaxation_threshold)93 self.spinBoxRelaxationThreshold.update()110 #relaxation_threshold = \ 111 #self.getMinimumThreshold(THINKGEAR_POWER_THRESHOLDS['relaxation']) 112 #self.spinBoxRelaxationThreshold.setValue(relaxation_threshold) 113 #self.spinBoxRelaxationThreshold.update() 94 114 95 115 # Relaxation threshold value not modifiable 96 self.spinBoxRelaxationThreshold.setEnabled(False)116 #self.spinBoxRelaxationThreshold.setEnabled(False) 97 117 98 118 … … 122 142 ################################################################## 123 143 124 def configureNetwork (self):144 def configureNetworkBrainstorms(self): 125 145 126 146 self.brainstormsClient = \ 127 147 brainstorms_client.puzzlebox_brainstorms_network_client(self.log, parent=self) 148 149 150 ################################################################## 151 152 def configureNetworkThinkGear(self): 128 153 129 154 self.thinkgearClient = \ 130 155 thinkgear_client.puzzlebox_brainstorms_network_client_thinkgear(self.log, parent=self) 156 157 self.pushButtonThinkGearConnect.setText('Connected') 158 self.pushButtonThinkGearConnect.setEnabled(False) 131 159 132 160 … … 166 194 167 195 168 #self.connect(self.pushButtonBluetoothConnect, \169 #QtCore.SIGNAL("clicked()"), \170 #self.test)196 self.connect(self.pushButtonThinkGearConnect, \ 197 QtCore.SIGNAL("clicked()"), \ 198 self.configureNetworkThinkGear) 171 199 172 200
Note: See TracChangeset
for help on using the changeset viewer.