Fixed bug whereby Event-Based Reading hangs forever on Windows if there is no input from the serial port.
This commit is contained in:
parent
de600d05c8
commit
cb3b50196f
14
INSTALL
14
INSTALL
|
@ -123,31 +123,31 @@ Maven:
|
|||
<dependency>
|
||||
<groupId>com.fazecast</groupId>
|
||||
<artifactId>jSerialComm</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
|
||||
Ivy:
|
||||
|
||||
<dependency org="com.fazecast" name="jSerialComm" rev="1.3.1"/>
|
||||
<dependency org="com.fazecast" name="jSerialComm" rev="1.3.2"/>
|
||||
|
||||
Grape:
|
||||
|
||||
@Grapes(
|
||||
@Grab(group='com.fazecast', module='jSerialComm', version='1.3.1')
|
||||
@Grab(group='com.fazecast', module='jSerialComm', version='1.3.2')
|
||||
)
|
||||
|
||||
Gradle:
|
||||
|
||||
'com.fazecast:jSerialComm:1.3.1'
|
||||
'com.fazecast:jSerialComm:1.3.2'
|
||||
|
||||
Buildr:
|
||||
|
||||
'com.fazecast:jSerialComm:jar:1.3.1'
|
||||
'com.fazecast:jSerialComm:jar:1.3.2'
|
||||
|
||||
SBT:
|
||||
|
||||
libraryDependencies += "com.fazecast" % "jSerialComm" % "1.3.1"
|
||||
libraryDependencies += "com.fazecast" % "jSerialComm" % "1.3.2"
|
||||
|
||||
Leiningen:
|
||||
|
||||
[com.fazecast/jSerialComm "1.3.1"]
|
||||
[com.fazecast/jSerialComm "1.3.2"]
|
||||
|
|
|
@ -38,7 +38,7 @@ import java.util.Date;
|
|||
* This class provides native access to serial ports and devices without requiring external libraries or tools.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 1.3.1
|
||||
* @version 1.3.2
|
||||
* @see java.io.InputStream
|
||||
* @see java.io.OutputStream
|
||||
*/
|
||||
|
@ -792,8 +792,13 @@ public final class SerialPort
|
|||
if (!isListening)
|
||||
return;
|
||||
isListening = false;
|
||||
|
||||
int oldEventFlags = eventFlags;
|
||||
eventFlags = 0;
|
||||
configEventFlags();
|
||||
try { serialEventThread.join(); } catch (InterruptedException e) {}
|
||||
serialEventThread = null;
|
||||
eventFlags = oldEventFlags;
|
||||
}
|
||||
|
||||
public final void waitForSerialEvent() throws NullPointerException
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventListener;
|
|||
* This interface must be implemented to enable simple event-based serial port I/O.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 1.1.1
|
||||
* @version 1.3.2
|
||||
* @see java.util.EventListener
|
||||
*/
|
||||
public interface SerialPortDataListener extends EventListener
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventObject;
|
|||
* This class describes an asynchronous serial port event.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 1.1.1
|
||||
* @version 1.3.2
|
||||
* @see java.util.EventObject
|
||||
*/
|
||||
public final class SerialPortEvent extends EventObject
|
||||
|
|
|
@ -31,7 +31,7 @@ package com.fazecast.jSerialComm;
|
|||
* <i>Note</i>: Using this interface will negate any serial port read timeout settings since they make no sense in an asynchronous context.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 1.1.1
|
||||
* @version 1.3.2
|
||||
* @see com.fazecast.jSerialComm.SerialPortDataListener
|
||||
* @see java.util.EventListener
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.Scanner;
|
|||
* This class provides a test case for the jSerialComm library.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@gmail.com>
|
||||
* @version 1.3.1
|
||||
* @version 1.3.2
|
||||
* @see java.io.InputStream
|
||||
* @see java.io.OutputStream
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue