Fix flag in serial port

This commit is contained in:
Alexander Nozik 2024-11-29 10:04:55 +03:00
parent becde94403
commit 9a0c55b24a
2 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,7 @@ public class AsynchronousSerialPort(
private val serialPortListener = object : SerialPortDataListener { private val serialPortListener = object : SerialPortDataListener {
override fun getListeningEvents(): Int = 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) { override fun serialEvent(event: SerialPortEvent) {
when (event.eventType) { when (event.eventType) {

View File

@ -11,6 +11,8 @@ import space.kscience.dataforge.names.asName
public class SerialPortPlugin : AbstractPlugin() { public class SerialPortPlugin : AbstractPlugin() {
public val ports: Ports by require(Ports)
override val tag: PluginTag get() = Companion.tag override val tag: PluginTag get() = Companion.tag
override fun content(target: String): Map<Name, Any> = when (target) { override fun content(target: String): Map<Name, Any> = when (target) {