Commit 6a630098 authored by Keegi's avatar Keegi

Better condition for auto-selecting the last used port.

parent a4b37519
......@@ -392,7 +392,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.serialport.Clear()
self.serialport.AppendItems(portslist)
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)
elif len(portslist)>0:
self.serialport.SetValue(portslist[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment