We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fda2bf8 + 8522964 commit b8198d9Copy full SHA for b8198d9
python/samples/i2cgui.py
@@ -6,6 +6,8 @@
6
import threading
7
from functools import partial
8
9
+import serial.tools.list_ports as slp
10
+
11
import wx
12
import wx.lib.newevent as NE
13
@@ -242,7 +244,9 @@ def read(self, e):
242
244
self.stop()
243
245
246
def devices(self):
- if sys.platform == 'darwin':
247
+ if sys.platform == 'win32':
248
+ return {pi.device: pi.device for pi in slp.comports()}
249
+ elif sys.platform == 'darwin':
250
devdir = "/dev/"
251
pattern = "^cu.usbserial-(.*)"
252
else:
@@ -312,7 +316,6 @@ def check_m(self, e):
312
316
def set_speed(self, e):
313
317
w = e.EventObject
314
318
s = int(w.GetString(w.GetCurrentSelection()))
315
- print(s)
319
self.sd.setspeed(s)
320
321
def hot(self, i, s):
0 commit comments