Merge branch 'pr/3036' into maintenance
This commit is contained in:
commit
dd3b318327
2 files changed
+13
-13
No files matched your search
@@ -96,6 +96,7 @@ date of first contribution):
|
||||
* [Aldo Hoeben](https://github.com/fieldofview)
|
||||
* [Henning Groß](https://github.com/hgross)
|
||||
* [Jubaleth](https://github.com/jubaleth)
|
||||
* [Daniel Joyce](https://github.com/DanielJoyce)
|
||||
|
||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
+12
-13
@@ -2541,19 +2541,18 @@ class MachineCom(object):
|
||||
|
||||
# connect to regular serial port
|
||||
self._log("Connecting to: %s" % port)
|
||||
if baudrate == 0:
|
||||
baudrates = baudrateList()
|
||||
serial_obj = serial.Serial(str(port),
|
||||
baudrates[0],
|
||||
timeout=read_timeout,
|
||||
write_timeout=0,
|
||||
parity=serial.PARITY_ODD)
|
||||
else:
|
||||
serial_obj = serial.Serial(str(port),
|
||||
baudrate,
|
||||
timeout=read_timeout,
|
||||
write_timeout=0,
|
||||
parity=serial.PARITY_ODD)
|
||||
|
||||
serial_port_args = {
|
||||
"port": str(port),
|
||||
"baudrate": baudrateList()[0] if baudrate == 0 else baudrate,
|
||||
"timeout": read_timeout,
|
||||
"write_timeout": 0,
|
||||
"parity": serial.PARITY_ODD,
|
||||
"exclusive": True
|
||||
}
|
||||
|
||||
serial_obj = serial.Serial(**serial_port_args)
|
||||
|
||||
serial_obj.close()
|
||||
serial_obj.parity = serial.PARITY_NONE
|
||||
serial_obj.open()
|
||||
|
||||
Reference in new issue
Block a user