Skip to content

Commit 0d5c961

Browse files
committed
Fix CS LPC&LPP device connection handling
1 parent 7261473 commit 0d5c961

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

usecases/cs/lpc/events.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import (
1212

1313
// handle SPINE events
1414
func (e *LPC) HandleEvent(payload spineapi.EventPayload) {
15-
if !e.IsCompatibleEntityType(payload.Entity) {
15+
if internal.IsDeviceConnected(payload) {
16+
e.deviceConnected(payload)
1617
return
1718
}
1819

19-
if internal.IsDeviceConnected(payload) {
20-
e.deviceConnected(payload)
20+
if !e.IsCompatibleEntityType(payload.Entity) {
2121
return
2222
}
2323

usecases/cs/lpp/events.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import (
1212

1313
// handle SPINE events
1414
func (e *LPP) HandleEvent(payload spineapi.EventPayload) {
15-
if !e.IsCompatibleEntityType(payload.Entity) {
15+
if internal.IsDeviceConnected(payload) {
16+
e.deviceConnected(payload)
1617
return
1718
}
1819

19-
if internal.IsDeviceConnected(payload) {
20-
e.deviceConnected(payload)
20+
if !e.IsCompatibleEntityType(payload.Entity) {
2121
return
2222
}
2323

0 commit comments

Comments
 (0)