diff --git a/desktop/src/app/indi/indi.component.html b/desktop/src/app/indi/indi.component.html index ed92efcae..bc2a991c3 100644 --- a/desktop/src/app/indi/indi.component.html +++ b/desktop/src/app/indi/indi.component.html @@ -45,7 +45,9 @@ #listbox [options]="messages" [filter]="true" - styleClass="border-0 h-full" /> + class="h-full" + styleClass="border-0 h-full" + [listStyle]="{ maxHeight: 'calc(100vh - 174px)' }" /> diff --git a/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/INDIDeviceProtocolHandler.kt b/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/INDIDeviceProtocolHandler.kt index b16af722b..3605c3159 100644 --- a/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/INDIDeviceProtocolHandler.kt +++ b/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/INDIDeviceProtocolHandler.kt @@ -273,7 +273,7 @@ abstract class INDIDeviceProtocolHandler : AbstractINDIDeviceProvider(), Message if (device.isEmpty()) { val text = "[%s]: %s\n".format(message.timestamp, message.message) fireOnEventReceived(DeviceMessageReceived(null, text)) - } else if (message.name.isNotEmpty()) { + } else { device.forEach { it.handleMessage(message) } } @@ -299,6 +299,8 @@ abstract class INDIDeviceProtocolHandler : AbstractINDIDeviceProvider(), Message } } + LOG.d("message received: {}", message) + return } } diff --git a/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/camera/INDICamera.kt b/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/camera/INDICamera.kt index fb428f4e0..fd3f09a1c 100644 --- a/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/camera/INDICamera.kt +++ b/nebulosa-indi-client/src/main/kotlin/nebulosa/indi/client/device/camera/INDICamera.kt @@ -74,6 +74,7 @@ internal open class INDICamera( @Volatile final override var hasThermometer = false @Volatile final override var temperature = 0.0 + @Suppress("LeakingThis") private val guideOutput = INDIGuideOutputHandler(this) final override val canPulseGuide @@ -86,7 +87,7 @@ internal open class INDICamera( private set override fun handleMessage(message: INDIProtocol) { - val isGuider = message.name[0] == 'G' + val isGuider = message.name.isNotEmpty() && message.name[0] == 'G' val isGuideHead = this is GuideHead when (message) {