Skip to content

Commit

Permalink
[api][desktop]: Fix INDI Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagohm committed Oct 21, 2024
1 parent e2f0e8e commit 2790c8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion desktop/src/app/indi/indi.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)' }" />
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}

Expand All @@ -299,6 +299,8 @@ abstract class INDIDeviceProtocolHandler : AbstractINDIDeviceProvider(), Message
}
}

LOG.d("message received: {}", message)

return
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 2790c8e

Please sign in to comment.