Better condition for auto-selecting the last used port.
parent
a4b375194d
commit
6a63009895
|
@ -392,7 +392,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
|
||||||
self.serialport.Clear()
|
self.serialport.Clear()
|
||||||
self.serialport.AppendItems(portslist)
|
self.serialport.AppendItems(portslist)
|
||||||
try:
|
try:
|
||||||
if os.path.exists(self.settings.port) or self.settings.port.upper().startswith('COM'):
|
if os.path.exists(self.settings.port) or self.settings.port in scan:
|
||||||
self.serialport.SetValue(self.settings.port)
|
self.serialport.SetValue(self.settings.port)
|
||||||
elif len(portslist)>0:
|
elif len(portslist)>0:
|
||||||
self.serialport.SetValue(portslist[0])
|
self.serialport.SetValue(portslist[0])
|
||||||
|
|
Loading…
Reference in New Issue