Changeset 328
- Timestamp:
- 03/13/12 13:06:16 (9 years ago)
- Location:
- trunk/Puzzlebox/Synapse
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Puzzlebox/Synapse/Configuration.py
r325 r328 2 2 # -*- coding: utf-8 -*- 3 3 4 # Copyright Puzzlebox Productions, LLC (2010-201 1)4 # Copyright Puzzlebox Productions, LLC (2010-2012) 5 5 # 6 6 # This code is released under the GNU Pulic License (GPL) version 2 … … 8 8 9 9 __changelog__ = """\ 10 Last Update: 201 1.12.0410 Last Update: 2012.03.13 11 11 """ 12 12 … … 115 115 THINKGEAR_DEVICE_ID = None 116 116 117 # Timeouts sent to PyBluez 118 119 #THINKGEAR_BLUETOOTH_SEARCH = True 120 THINKGEAR_BLUETOOTH_SEARCH = False 121 THINKGEAR_BLUETOOTH_DISCOVER_DEVICES_TIMEOUT = 8 # default 8 122 THINKGEAR_BLUETOOTH_LOOKUP_NAME_TIMEOUT = 10 # default 10 123 117 124 ##################################################################### 118 125 # Server configuration -
trunk/Puzzlebox/Synapse/Interface.py
r327 r328 755 755 devices.append('/dev/ttyUSB9') 756 756 757 if os.path.exists('/dev/rfcomm0'): 758 devices.append('/dev/rfcomm0') 759 if os.path.exists('/dev/rfcomm1'): 760 devices.append('/dev/rfcomm1') 761 if os.path.exists('/dev/rfcomm2'): 762 devices.append('/dev/rfcomm2') 763 if os.path.exists('/dev/rfcomm3'): 764 devices.append('/dev/rfcomm3') 765 if os.path.exists('/dev/rfcomm4'): 766 devices.append('/dev/rfcomm4') 767 757 768 if os.path.exists('/dev/ttyACM0'): 758 769 devices.append('/dev/ttyACM0') … … 917 928 #self.pushButtonBluetoothSearch.setText('Searching') 918 929 919 if (sys.platform != 'win32' and sys.platform != 'darwin'): 930 if ((sys.platform != 'win32' and sys.platform != 'darwin') and \ 931 configuration.THINKGEAR_BLUETOOTH_SEARCH): 920 932 921 933 # Bluetooth module doesn't compile properly under Windows 922 934 # and doesn't exist under OS X 935 936 # PyBluez API Documentation 937 # http://pybluez.googlecode.com/svn/www/docs-0.7/index.html 923 938 924 939 bluetooth_devices = [] … … 932 947 933 948 bluetooth_devices = bluetooth.discover_devices( \ 934 duration=5, \949 duration=configuration.THINKGEAR_BLUETOOTH_DISCOVER_DEVICES_TIMEOUT, \ 935 950 flush_cache=True, \ 936 951 lookup_names=False) 937 952 938 953 for address in bluetooth_devices: 939 device_name = bluetooth.lookup_name(address) 954 955 if self.DEBUG: 956 print "INFO: Device discovered", 957 print address 958 959 device_name = bluetooth.lookup_name(address, \ 960 configuration.THINKGEAR_BLUETOOTH_LOOKUP_NAME_TIMEOUT) 940 961 if ((device_name == 'MindSet' or device_name == 'MindWave Mobile') and \ 941 962 (address not in thinkgear_devices)):
Note: See TracChangeset
for help on using the changeset viewer.