Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jamesbowman/i2cdriver
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbowman committed Mar 3, 2019
2 parents fda2bf8 + 8522964 commit b8198d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/samples/i2cgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import threading
from functools import partial

import serial.tools.list_ports as slp

import wx
import wx.lib.newevent as NE

Expand Down Expand Up @@ -242,7 +244,9 @@ def read(self, e):
self.stop()

def devices(self):
if sys.platform == 'darwin':
if sys.platform == 'win32':
return {pi.device: pi.device for pi in slp.comports()}
elif sys.platform == 'darwin':
devdir = "/dev/"
pattern = "^cu.usbserial-(.*)"
else:
Expand Down Expand Up @@ -312,7 +316,6 @@ def check_m(self, e):
def set_speed(self, e):
w = e.EventObject
s = int(w.GetString(w.GetCurrentSelection()))
print(s)
self.sd.setspeed(s)

def hot(self, i, s):
Expand Down

0 comments on commit b8198d9

Please sign in to comment.