Skip to content

Commit

Permalink
Added error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Feb 19, 2024
1 parent 9b96f4f commit fe027ab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions etc/dbus-serialbattery/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,9 @@ def calcMaxChargeCurrentReferringToCellVoltage(self) -> float:
False,
)
except Exception:
logger.warning(
"Error while executing calcMaxChargeCurrentReferringToCellVoltage(). Using default value instead."
)
return self.max_battery_charge_current

def calcMaxDischargeCurrentReferringToCellVoltage(self) -> float:
Expand All @@ -871,6 +874,9 @@ def calcMaxDischargeCurrentReferringToCellVoltage(self) -> float:
True,
)
except Exception:
logger.warning(
"Error while executing calcMaxDischargeCurrentReferringToCellVoltage(). Using default value instead."
)
return self.max_battery_charge_current

def calcMaxChargeCurrentReferringToTemperature(self) -> float:
Expand Down Expand Up @@ -934,6 +940,9 @@ def calcMaxChargeCurrentReferringToSoc(self) -> float:
True,
)
except Exception:
logger.warning(
"Error while executing calcMaxChargeCurrentReferringToSoc(). Using default value instead."
)
return self.max_battery_charge_current

def calcMaxDischargeCurrentReferringToSoc(self) -> float:
Expand All @@ -951,6 +960,9 @@ def calcMaxDischargeCurrentReferringToSoc(self) -> float:
True,
)
except Exception:
logger.warning(
"Error while executing calcMaxDischargeCurrentReferringToSoc(). Using default value instead."
)
return self.max_battery_discharge_current

def get_min_cell(self) -> int:
Expand Down

0 comments on commit fe027ab

Please sign in to comment.