Better condition for auto-selecting the last used port.

master
Keegi 2011-12-28 21:08:01 +02:00
parent a4b375194d
commit 6a63009895
1 changed files with 1 additions and 1 deletions

View File

@ -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])