summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt5
-rw-r--r--serial/serialjava.py6
2 files changed, 7 insertions, 4 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index d31c6d2..1443975 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -480,7 +480,10 @@ Version 2.8 2014-xx-xx
---------------------------
- [FTR pyserial:37] Support fileno() function in the socket protocol
- Posix: [Patch pyserial:31] Mark/space parity on Linux
-- Linux: [Patch pyserial:32] Module list_ports for linux should include the product information as description.
+- Linux: [Patch pyserial:32] Module list_ports for linux should include the
+ product information as description.
+- Java: fix 2 bugs (stop bits if/else and non-integer timeouts) (Torsten
+ Roemer)
Bugfixes:
diff --git a/serial/serialjava.py b/serial/serialjava.py
index 46a78f8..ac538e3 100644
--- a/serial/serialjava.py
+++ b/serial/serialjava.py
@@ -93,8 +93,8 @@ class JavaSerial(SerialBase):
if self._stopbits == STOPBITS_ONE:
jstopbits = comm.SerialPort.STOPBITS_1
- elif stopbits == STOPBITS_ONE_POINT_FIVE:
- self._jstopbits = comm.SerialPort.STOPBITS_1_5
+ elif self._stopbits == STOPBITS_ONE_POINT_FIVE:
+ jstopbits = comm.SerialPort.STOPBITS_1_5
elif self._stopbits == STOPBITS_TWO:
jstopbits = comm.SerialPort.STOPBITS_2
else:
@@ -125,7 +125,7 @@ class JavaSerial(SerialBase):
self.sPort.setFlowControlMode(jflowin | jflowout)
if self._timeout >= 0:
- self.sPort.enableReceiveTimeout(self._timeout*1000)
+ self.sPort.enableReceiveTimeout(int(self._timeout*1000))
else:
self.sPort.disableReceiveTimeout()