mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
Merge pull request #2110 from gohai/serial-new
Trivial cleanups to the Serial library
This commit is contained in:
@@ -1 +0,0 @@
|
||||
serial.jar
|
||||
@@ -1 +1,4 @@
|
||||
This is using a modified version of Java Simple Serial Connector by Alexey Sokolov. See https://github.com/gohai/java-simple-serial-connector for details on the modifications.
|
||||
|
||||
To compile the C++ portion of the library on OS X:
|
||||
g++ -shared [or: -dynamiclib?] -arch i386 -arch x86_64 -I/System/Library/Frameworks/IOKit.framework/Versions/A/Headers -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin -framework IOKit -framework CoreFoundation -o libjSSC-2.6.jnilib jssc.cpp
|
||||
|
||||
@@ -186,8 +186,6 @@ public class Serial implements SerialPortEventListener {
|
||||
|
||||
|
||||
public static Map<String, String> getProperties(String portName) {
|
||||
//SerialPortList list = new SerialPortList();
|
||||
//return list.getPortProperties(portName);
|
||||
return SerialPortList.getPortProperties(portName);
|
||||
}
|
||||
|
||||
@@ -214,8 +212,6 @@ public class Serial implements SerialPortEventListener {
|
||||
public static String[] list() {
|
||||
// returns list sorted alphabetically, thus cu.* comes before tty.*
|
||||
// this was different with RXTX
|
||||
//SerialPortList list = new SerialPortList();
|
||||
//return list.getPortNames();
|
||||
return SerialPortList.getPortNames();
|
||||
}
|
||||
|
||||
@@ -457,4 +453,4 @@ public class Serial implements SerialPortEventListener {
|
||||
throw new RuntimeException("Error writing to serial port " + e.getPortName() + ": " + e.getExceptionType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user