Skip to content

Commit

Permalink
Update LPC & LPP logging
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Sep 7, 2024
1 parent 243e370 commit 974c8ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions usecases/cs/lpc/usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ func (e *LPC) approveOrDenyConsumptionLimit(msg *spineapi.Message, approve bool,
// the implementation only considers write messages for this use case and
// approves all others
func (e *LPC) loadControlWriteCB(msg *spineapi.Message) {
logging.Log().Debug("LPC loadControlWriteCB")
if msg.RequestHeader == nil || msg.RequestHeader.MsgCounter == nil ||
msg.Cmd.LoadControlLimitListData == nil {
logging.Log().Debug("LPC loadControlWriteCB: invalid message")
Expand Down Expand Up @@ -151,7 +150,6 @@ func (e *LPC) loadControlWriteCB(msg *spineapi.Message) {
for _, item := range data.LoadControlLimitData {
if item.LimitId == nil ||
limitId != *item.LimitId {
logging.Log().Debug("LPC loadControlWriteCB: no matching limit id")
continue
}

Expand Down
3 changes: 3 additions & 0 deletions usecases/cs/lpp/usecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/enbility/eebus-go/features/server"
ucapi "github.com/enbility/eebus-go/usecases/api"
"github.com/enbility/eebus-go/usecases/usecase"
"github.com/enbility/ship-go/logging"
spineapi "github.com/enbility/spine-go/api"
"github.com/enbility/spine-go/model"
"github.com/enbility/spine-go/spine"
Expand Down Expand Up @@ -123,11 +124,13 @@ func (e *LPP) approveOrDenyProductionLimit(msg *spineapi.Message, approve bool,
func (e *LPP) loadControlWriteCB(msg *spineapi.Message) {
if msg.RequestHeader == nil || msg.RequestHeader.MsgCounter == nil ||
msg.Cmd.LoadControlLimitListData == nil {
logging.Log().Debug("LPC loadControlWriteCB: invalid message")
return
}

_, limitId, err := e.loadControlServerAndLimitId()
if err != nil {
logging.Log().Debug("LPC loadControlWriteCB: error getting limit id")
return
}

Expand Down

0 comments on commit 974c8ea

Please sign in to comment.