Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/control/chargepoint/chargepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ def initiate_phase_switch(self):
log.debug(
f"Lp {self.num}: Ladung aktiv halten "
f"{charging_ev.ev_template.data.keep_charge_active_duration}s")
phase_switch.thread_phase_switch(self)
if phase_switch.thread_phase_switch(self) is False:
return
log.debug("start phase switch phases_to_use " +
str(self.data.set.phases_to_use) +
" control_parameter phases " +
Expand Down
16 changes: 8 additions & 8 deletions packages/control/phase_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def thread_phase_switch(cp) -> None:
Phasenumschaltung erfolgt in Threads, da diese länger als ein Zyklus dauert.
"""
try:
if thread_handler(threading.Thread(
target=_perform_phase_switch,
args=(cp.chargepoint_module,
cp.data.control_parameter.phases,
cp.data.set.charging_ev_data,
cp.data.get.charge_state),
name=f"phase switch cp{cp.chargepoint_module.config.id}")):
log.debug("Thread zur Phasenumschaltung an LP"+str(cp.num)+" gestartet.")
log.debug("Starte Thread zur Phasenumschaltung an LP"+str(cp.num))
return thread_handler(threading.Thread(
target=_perform_phase_switch,
args=(cp.chargepoint_module,
cp.data.control_parameter.phases,
cp.data.set.charging_ev_data,
cp.data.get.charge_state),
name=f"phase switch cp{cp.chargepoint_module.config.id}"))
except Exception:
log.exception("Fehler im Phasenumschaltungs-Modul")

Expand Down