From 9a0c55b24aed4a8831e0d7113804342199be5405 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 29 Nov 2024 10:04:55 +0300 Subject: [PATCH] Fix flag in serial port --- .../space/kscience/controls/serial/AsynchronousSerialPort.kt | 2 +- .../kotlin/space/kscience/controls/serial/SerialPortPlugin.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/AsynchronousSerialPort.kt b/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/AsynchronousSerialPort.kt index a9c4ede..b581405 100644 --- a/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/AsynchronousSerialPort.kt +++ b/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/AsynchronousSerialPort.kt @@ -29,7 +29,7 @@ public class AsynchronousSerialPort( private val serialPortListener = object : SerialPortDataListener { override fun getListeningEvents(): Int = - SerialPort.LISTENING_EVENT_DATA_RECEIVED and SerialPort.LISTENING_EVENT_DATA_AVAILABLE + SerialPort.LISTENING_EVENT_DATA_RECEIVED or SerialPort.LISTENING_EVENT_DATA_AVAILABLE override fun serialEvent(event: SerialPortEvent) { when (event.eventType) { diff --git a/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/SerialPortPlugin.kt b/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/SerialPortPlugin.kt index f0d099f..b43fc00 100644 --- a/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/SerialPortPlugin.kt +++ b/controls-serial/src/jvmMain/kotlin/space/kscience/controls/serial/SerialPortPlugin.kt @@ -11,6 +11,8 @@ import space.kscience.dataforge.names.asName public class SerialPortPlugin : AbstractPlugin() { + public val ports: Ports by require(Ports) + override val tag: PluginTag get() = Companion.tag override fun content(target: String): Map = when (target) {