Skip to content

Commit

Permalink
Distribute over production between batteries
Browse files Browse the repository at this point in the history
  • Loading branch information
GJSBRT committed Apr 6, 2024
1 parent ad43b1c commit b7cb108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (c *Control) Start() {
metrics.SetMetricValue("control", "action", map[string]string{"action": "charge_batteries"}, 1)

// charge batteries with 20% less than over production
batteryChargeWatts := uint(math.Floor(float64(overProductionWatts) * 0.80))
batteryChargeWatts := uint(math.Floor(float64(overProductionWatts) * 0.90)) / uint(len(batteries))

for _, battery := range batteries {
if battery.capacity < 100 {
Expand Down

0 comments on commit b7cb108

Please sign in to comment.