Allow urls to be passed to PySerial for RFC2217/hwgrep support
This commit is contained in:
commit
7a34e6640a
@ -4,7 +4,7 @@ import threading
|
||||
from string import printable
|
||||
|
||||
from PyQt4 import QtCore, QtGui, QtWebKit
|
||||
from serial import Serial, SerialException
|
||||
from serial import Serial, SerialException, serial_for_url
|
||||
|
||||
from colourterm import SettingsDialog, ConnectDialog, SComboBox, Highlight, from_utf8, translate, \
|
||||
create_default_highlights
|
||||
@ -293,8 +293,8 @@ class MainWindow(QtGui.QMainWindow, UiMainWindow):
|
||||
except (TypeError, ValueError):
|
||||
QtGui.QMessageBox.critical(self, 'Error opening port', 'Error: Port is not valid')
|
||||
return
|
||||
self.device = Serial(
|
||||
port=port,
|
||||
self.device = serial_for_url(
|
||||
url=port,
|
||||
baudrate=self.connect_dialog.get_baud(),
|
||||
bytesize=self.connect_dialog.get_data_bits(),
|
||||
parity=self.connect_dialog.get_parity(),
|
||||
@ -302,7 +302,8 @@ class MainWindow(QtGui.QMainWindow, UiMainWindow):
|
||||
timeout=1,
|
||||
xonxoff=self.connect_dialog.get_software_handshake(),
|
||||
rtscts=self.connect_dialog.get_hardware_handshake(),
|
||||
dsrdtr=None
|
||||
dsrdtr=None,
|
||||
do_not_open=False
|
||||
)
|
||||
self.device_closed = False
|
||||
if not self.device.isOpen():
|
||||
|
Loading…
Reference in New Issue
Block a user