kopia lustrzana https://github.com/evil-mad/EggBot
Initial checkin
git-svn-id: https://eggbotcode.googlecode.com/svn/trunk@99 72233254-1b6c-9e9c-5072-401df62706fbpull/47/head
rodzic
a7f90bddb6
commit
b2a38270ea
|
|
@ -0,0 +1,23 @@
|
|||
import os, sys
|
||||
|
||||
platform = sys.platform.lower()
|
||||
|
||||
if platform == 'darwin':
|
||||
strDir = '/dev'
|
||||
strPrefix = 'cu.usbmodem'
|
||||
elif platform == 'sunos5':
|
||||
strDir = '/dev/term'
|
||||
strPrefix = None
|
||||
else:
|
||||
strDir = '/dev'
|
||||
strPrefix = 'ttyACM'
|
||||
|
||||
def findEiBotBoards():
|
||||
return []
|
||||
|
||||
def findPorts():
|
||||
for device in os.listdir( strDir ):
|
||||
if strPrefix != None:
|
||||
if not device.startswith( strPrefix ):
|
||||
continue
|
||||
yield strDir + '/' + device
|
||||
Ładowanie…
Reference in New Issue