Skip to content

Commit

Permalink
chore: cleanup logging
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Nov 15, 2023
1 parent 3580766 commit 6c0a64e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charger/eebus.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ func (c *EEBus) waitForConnection() error {
}

func (c *EEBus) onConnect(ski string) {
c.log.TRACE.Println("!! onConnect invoked on ski ", ski)
c.log.TRACE.Println("connect ski:", ski)

c.expectedEnableUnpluggedState = false
c.setDefaultValues()
c.setConnected(true)
}

func (c *EEBus) onDisconnect(ski string) {
c.log.TRACE.Println("!! onDisconnect invoked on ski ", ski)
c.log.TRACE.Println("disconnect ski:", ski)

c.expectedEnableUnpluggedState = false
c.setConnected(false)
Expand Down
3 changes: 0 additions & 3 deletions core/loadpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -990,13 +990,11 @@ func (lp *Loadpoint) scalePhasesRequired() bool {

// scalePhasesIfAvailable scales if api.PhaseSwitcher is available
func (lp *Loadpoint) scalePhasesIfAvailable(phases int) error {
want := phases
if lp.ConfiguredPhases != 0 {
phases = lp.ConfiguredPhases
}

if _, ok := lp.charger.(api.PhaseSwitcher); ok {
lp.log.DEBUG.Printf("!! scalePhasesIfAvailable: %dp -> %dp", want, phases)
return lp.scalePhases(phases)
}

Expand All @@ -1011,7 +1009,6 @@ func (lp *Loadpoint) scalePhases(phases int) error {
panic("charger does not implement api.PhaseSwitcher")
}

lp.log.DEBUG.Printf("!! scalePhases: GetPhases %dp <> %dp wanted", lp.GetPhases(), phases)
if lp.GetPhases() != phases {
// switch phases
if err := cp.Phases1p3p(phases); err != nil {
Expand Down

0 comments on commit 6c0a64e

Please sign in to comment.