Allow use of pseudo-terminals on Linux.
This commit is contained in:
parent
97a8efcec3
commit
5741a2f827
14
INSTALL
14
INSTALL
|
@ -123,31 +123,31 @@ Maven:
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fazecast</groupId>
|
<groupId>com.fazecast</groupId>
|
||||||
<artifactId>jSerialComm</artifactId>
|
<artifactId>jSerialComm</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
Ivy:
|
Ivy:
|
||||||
|
|
||||||
<dependency org="com.fazecast" name="jSerialComm" rev="1.3.2"/>
|
<dependency org="com.fazecast" name="jSerialComm" rev="1.3.3"/>
|
||||||
|
|
||||||
Grape:
|
Grape:
|
||||||
|
|
||||||
@Grapes(
|
@Grapes(
|
||||||
@Grab(group='com.fazecast', module='jSerialComm', version='1.3.2')
|
@Grab(group='com.fazecast', module='jSerialComm', version='1.3.3')
|
||||||
)
|
)
|
||||||
|
|
||||||
Gradle:
|
Gradle:
|
||||||
|
|
||||||
'com.fazecast:jSerialComm:1.3.2'
|
'com.fazecast:jSerialComm:1.3.3'
|
||||||
|
|
||||||
Buildr:
|
Buildr:
|
||||||
|
|
||||||
'com.fazecast:jSerialComm:jar:1.3.2'
|
'com.fazecast:jSerialComm:jar:1.3.3'
|
||||||
|
|
||||||
SBT:
|
SBT:
|
||||||
|
|
||||||
libraryDependencies += "com.fazecast" % "jSerialComm" % "1.3.2"
|
libraryDependencies += "com.fazecast" % "jSerialComm" % "1.3.3"
|
||||||
|
|
||||||
Leiningen:
|
Leiningen:
|
||||||
|
|
||||||
[com.fazecast/jSerialComm "1.3.2"]
|
[com.fazecast/jSerialComm "1.3.3"]
|
||||||
|
|
|
@ -4,7 +4,7 @@ apply plugin: 'maven'
|
||||||
|
|
||||||
group = 'com.fazecast'
|
group = 'com.fazecast'
|
||||||
archivesBaseName = 'jSerialComm'
|
archivesBaseName = 'jSerialComm'
|
||||||
version = '1.3.2'
|
version = '1.3.3'
|
||||||
|
|
||||||
sourceCompatibility = 1.6
|
sourceCompatibility = 1.6
|
||||||
targetCompatibility = 1.6
|
targetCompatibility = 1.6
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* SerialPort.java
|
* SerialPort.java
|
||||||
*
|
*
|
||||||
* Created on: Feb 25, 2012
|
* Created on: Feb 25, 2012
|
||||||
* Last Updated on: May 04, 2015
|
* Last Updated on: May 18, 2015
|
||||||
* Author: Will Hedgecock
|
* Author: Will Hedgecock
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2015 Fazecast, Inc.
|
* Copyright (C) 2012-2015 Fazecast, Inc.
|
||||||
|
@ -38,7 +38,7 @@ import java.util.Date;
|
||||||
* This class provides native access to serial ports and devices without requiring external libraries or tools.
|
* This class provides native access to serial ports and devices without requiring external libraries or tools.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 1.3.2
|
* @version 1.3.3
|
||||||
* @see java.io.InputStream
|
* @see java.io.InputStream
|
||||||
* @see java.io.OutputStream
|
* @see java.io.OutputStream
|
||||||
*/
|
*/
|
||||||
|
@ -192,9 +192,11 @@ public final class SerialPort
|
||||||
*/
|
*/
|
||||||
static public SerialPort getCommPort(String portDescriptor)
|
static public SerialPort getCommPort(String portDescriptor)
|
||||||
{
|
{
|
||||||
// Correct Windows port descriptor, if needed
|
// Correct port descriptor, if needed
|
||||||
if (isWindows)
|
if (isWindows)
|
||||||
portDescriptor = "\\\\.\\" + portDescriptor.substring(portDescriptor.lastIndexOf('\\')+1);
|
portDescriptor = "\\\\.\\" + portDescriptor.substring(portDescriptor.lastIndexOf('\\')+1);
|
||||||
|
else if (portDescriptor.contains("/pts/"))
|
||||||
|
portDescriptor = "/dev/pts/" + portDescriptor.substring(portDescriptor.lastIndexOf('/')+1);
|
||||||
else
|
else
|
||||||
portDescriptor = "/dev/" + portDescriptor.substring(portDescriptor.lastIndexOf('/')+1);
|
portDescriptor = "/dev/" + portDescriptor.substring(portDescriptor.lastIndexOf('/')+1);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventListener;
|
||||||
* This interface must be implemented to enable simple event-based serial port I/O.
|
* This interface must be implemented to enable simple event-based serial port I/O.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 1.3.2
|
* @version 1.3.3
|
||||||
* @see java.util.EventListener
|
* @see java.util.EventListener
|
||||||
*/
|
*/
|
||||||
public interface SerialPortDataListener extends EventListener
|
public interface SerialPortDataListener extends EventListener
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventObject;
|
||||||
* This class describes an asynchronous serial port event.
|
* This class describes an asynchronous serial port event.
|
||||||
*
|
*
|
||||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 1.3.2
|
* @version 1.3.3
|
||||||
* @see java.util.EventObject
|
* @see java.util.EventObject
|
||||||
*/
|
*/
|
||||||
public final class SerialPortEvent extends 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.
|
* <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>
|
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||||
* @version 1.3.2
|
* @version 1.3.3
|
||||||
* @see com.fazecast.jSerialComm.SerialPortDataListener
|
* @see com.fazecast.jSerialComm.SerialPortDataListener
|
||||||
* @see java.util.EventListener
|
* @see java.util.EventListener
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue