Skip to content
This repository was archived by the owner on Jun 29, 2024. It is now read-only.

Commit 7bed341

Browse files
Fix lpc lpp loadchange events (#34)
2 parents 5dd2ea6 + 7b81919 commit 7bed341

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

uclpcserver/events.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (e *UCLPCServer) subscribeHeartbeatWorkaround(payload spineapi.EventPayload
136136

137137
// the load control limit data was updated
138138
func (e *UCLPCServer) loadControlLimitDataUpdate(payload spineapi.EventPayload) {
139-
if _, err := e.ConsumptionLimit(); err != nil {
139+
if _, err := e.ConsumptionLimit(); err == nil {
140140
e.eventCB(payload.Ski, payload.Device, payload.Entity, DataUpdateLimit)
141141
}
142142
}

uclppserver/events.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (e *UCLPPServer) subscribeHeartbeatWorkaround(payload spineapi.EventPayload
136136

137137
// the load control limit data was updated
138138
func (e *UCLPPServer) loadControlLimitDataUpdate(payload spineapi.EventPayload) {
139-
if _, err := e.ProductionLimit(); err != nil {
139+
if _, err := e.ProductionLimit(); err == nil {
140140
e.eventCB(payload.Ski, payload.Device, payload.Entity, DataUpdateLimit)
141141
}
142142
}

0 commit comments

Comments
 (0)