Changeset 324
- Timestamp:
- 03/02/12 17:40:22 (9 years ago)
- Location:
- trunk/Puzzlebox/Synapse
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Puzzlebox/Synapse/Interface.py
r317 r324 10 10 11 11 __changelog__ = """\ 12 Last Update: 201 1.12.0712 Last Update: 2012.03.02 13 13 """ 14 14 … … 49 49 50 50 51 if (sys.platform != 'win32'):51 if (sys.platform == 'win32'): 52 52 import bluetooth 53 53 DEFAULT_IMAGE_PATH = '/usr/share/puzzlebox_synapse/images' 54 elif (sys.platform == 'darwin'): 55 DEFAULT_IMAGE_PATH = 'images' 54 56 else: 55 57 import _winreg as winreg … … 729 731 if os.path.exists('/dev/ttyACM4'): 730 732 devices.append('/dev/ttyACM4') 733 734 if os.path.exists('/dev/tty.MindSet-DevB'): 735 devices.append('/dev/tty.MindSet-DevB') 736 737 if os.path.exists('/dev/tty.MindWave'): 738 devices.append('/dev/tty.MindWave') 739 if os.path.exists('/dev/tty.MindWave1'): 740 devices.append('/dev/tty.MindWave1') 741 if os.path.exists('/dev/tty.MindWave2'): 742 devices.append('/dev/tty.MindWave2') 743 if os.path.exists('/dev/tty.MindWave3'): 744 devices.append('/dev/tty.MindWave3') 745 if os.path.exists('/dev/tty.MindWave4'): 746 devices.append('/dev/tty.MindWave4') 747 if os.path.exists('/dev/tty.MindWave5'): 748 devices.append('/dev/tty.MindWave5') 749 750 if os.path.exists('/dev/tty.MindWaveMobile-SPPDev'): 751 devices.append('/dev/tty.MindWaveMobile-SPPDev') 731 752 732 753 … … 748 769 output = os.popen(command, 'r') 749 770 750 for line in output.readlines(): 771 try: 772 result = output.readlines() 773 except Exception, e: 774 if self.DEBUG: 775 print "ERROR [Synapse-Interface]: Failed reading result from call to hcitool:", 776 print e 777 result = '' 778 779 if result == '': 780 return([]) # Under OS X hcitool doesn't exist so we don't see any devices 781 782 for line in result: 751 783 line = line.strip() 752 784 if line == '' or line == 'Scanning ...': … … 803 835 output = os.popen(command, 'r') 804 836 805 for line in output.readlines(): 837 try: 838 result = output.readlines() 839 except Exception, e: 840 if self.DEBUG: 841 print "ERROR [Synapse-Interface]: Failed reading result from call to hcitool:", 842 print e 843 result = '' 844 845 if result == '': 846 return([]) # Under OS X hcitool doesn't exist so we don't see any devices 847 848 for line in result: 806 849 line = line.strip() 807 850 if line == '' or line == 'Connections:': -
trunk/Puzzlebox/Synapse/Protocol.py
r323 r324 91 91 import serial 92 92 93 if (sys.platform != 'win32'): 93 if ((sys.platform != 'win32') and \ 94 (sys.platform != 'darwin')): 94 95 import bluetooth 95 96
Note: See TracChangeset
for help on using the changeset viewer.