Skip to content

Commit

Permalink
Partial merge with Britkat version
Browse files Browse the repository at this point in the history
Moved some logger lines to debug only. (Others retained as info - either not used by GivTCP or really useful to users, such as SoC calculation)
  • Loading branch information
salewis38 authored Nov 11, 2023
1 parent 439434a commit 7dfe4f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions palm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(self):
self.consumption: int = 0
self.soc: int = 0
self.base_load = stgs.GE.base_load
self.tgt_soc = 100
self.tgt_soc: int = 100
self.cmd_list = stgs.GE_Command_list['data']
self.plot = [""] * 5

Expand Down Expand Up @@ -228,7 +228,7 @@ def get_load_hist_day(offset: int):
i: int = 0
while i < len(stgs.GE.load_hist_weight):
if stgs.GE.load_hist_weight[i] > 0:
logger.info("Processing load history for day -"+ str(i + 1))
logger.debug("Processing load history for day -"+ str(i + 1))
load_hist_array = get_load_hist_day(i)
j = 0
while j < 48:
Expand All @@ -238,7 +238,7 @@ def get_load_hist_day(offset: int):
total_weight += stgs.GE.load_hist_weight[i]
logger.debug(str(acc_load)+ " total weight: "+ str(total_weight))
else:
logger.info("Skipping load history for day -"+ str(i + 1)+ " (weight <= 0)")
logger.debug("Skipping load history for day -"+ str(i + 1)+ " (weight <= 0)")
i += 1

# Avoid DIV/0 if config file contains incorrect weightings
Expand All @@ -251,7 +251,7 @@ def get_load_hist_day(offset: int):
while i < 48:
self.base_load[i] = round(acc_load[i]/total_weight, 1)
i += 1
logger.info("Load Calc Summary: "+ str(self.base_load))
logger.debug("Load Calc Summary: "+ str(self.base_load))

def set_mode(self, cmd: str):
"""Configures inverter operating mode"""
Expand Down

0 comments on commit 7dfe4f0

Please sign in to comment.