Skip to content

Commit

Permalink
chore: better formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Aug 26, 2024
1 parent 028c188 commit af752f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/wrapper/chargerater.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (cr *ChargeRater) StartCharge(continued bool) {
if m, ok := cr.meter.(api.MeterEnergy); ok {
if f, err := m.TotalEnergy(); err == nil {
cr.startEnergy = f
cr.log.DEBUG.Printf("charge start energy: %.3gkWh", f)
cr.log.DEBUG.Printf("charge start energy: %.3fkWh", f)
} else {
cr.log.ERROR.Printf("charge total import: %v", err)
}
Expand All @@ -71,7 +71,7 @@ func (cr *ChargeRater) StopCharge() {
if m, ok := cr.meter.(api.MeterEnergy); ok {
if f, err := m.TotalEnergy(); err == nil {
cr.chargedEnergy += f - cr.startEnergy
cr.log.DEBUG.Printf("charge final energy: %.3gkWh", cr.chargedEnergy)
cr.log.DEBUG.Printf("charge final energy: %.3fkWh", cr.chargedEnergy)
} else {
cr.log.ERROR.Printf("charge total import: %v", err)
}
Expand Down

0 comments on commit af752f4

Please sign in to comment.