Skip to content

Commit e7bda97

Browse files
committed
Fix LPP typo for hems demo cmd
1 parent 9cc1fcf commit e7bda97

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

cmd/hems/main.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/enbility/eebus-go/api"
1717
"github.com/enbility/eebus-go/service"
1818
ucapi "github.com/enbility/eebus-go/usecases/api"
19-
"github.com/enbility/eebus-go/usecases/cs/lpc"
2019
cslpc "github.com/enbility/eebus-go/usecases/cs/lpc"
2120
cslpp "github.com/enbility/eebus-go/usecases/cs/lpp"
2221
eglpc "github.com/enbility/eebus-go/usecases/eg/lpc"
@@ -122,7 +121,7 @@ func (h *hems) OnLPCEvent(ski string, device spineapi.DeviceRemoteInterface, ent
122121
}
123122

124123
switch event {
125-
case lpc.WriteApprovalRequired:
124+
case cslpc.WriteApprovalRequired:
126125
// get pending writes
127126
pendingWrites := h.uccslpc.PendingConsumptionLimits()
128127

@@ -131,7 +130,7 @@ func (h *hems) OnLPCEvent(ski string, device spineapi.DeviceRemoteInterface, ent
131130
fmt.Println("Approving LPC write with msgCounter", msgCounter, "and limit", write.Value, "W")
132131
h.uccslpc.ApproveOrDenyConsumptionLimit(msgCounter, true, "")
133132
}
134-
case lpc.DataUpdateLimit:
133+
case cslpc.DataUpdateLimit:
135134
if currentLimit, err := h.uccslpc.ConsumptionLimit(); err != nil {
136135
fmt.Println("New LPC Limit set to", currentLimit.Value, "W")
137136
}
@@ -146,7 +145,7 @@ func (h *hems) OnLPPEvent(ski string, device spineapi.DeviceRemoteInterface, ent
146145
}
147146

148147
switch event {
149-
case lpc.WriteApprovalRequired:
148+
case cslpp.WriteApprovalRequired:
150149
// get pending writes
151150
pendingWrites := h.uccslpp.PendingProductionLimits()
152151

@@ -155,7 +154,7 @@ func (h *hems) OnLPPEvent(ski string, device spineapi.DeviceRemoteInterface, ent
155154
fmt.Println("Approving LPP write with msgCounter", msgCounter, "and limit", write.Value, "W")
156155
h.uccslpp.ApproveOrDenyProductionLimit(msgCounter, true, "")
157156
}
158-
case lpc.DataUpdateLimit:
157+
case cslpp.DataUpdateLimit:
159158
if currentLimit, err := h.uccslpp.ProductionLimit(); err != nil {
160159
fmt.Println("New LPP Limit set to", currentLimit.Value, "W")
161160
}

0 commit comments

Comments
 (0)