mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
Implements the active() method for Serial and Server (Issue #2364).
This commit is contained in:
@@ -135,6 +135,15 @@ public class Serial implements SerialPortEventListener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return true if this port is still active and hasn't run
|
||||
* into any trouble.
|
||||
*/
|
||||
public boolean active() {
|
||||
return (port.isOpened());
|
||||
}
|
||||
|
||||
|
||||
public void pre() {
|
||||
if (serialAvailableMethod != null && invokeSerialAvailable) {
|
||||
invokeSerialAvailable = false;
|
||||
|
||||
Reference in New Issue
Block a user