Repository navigation
Fix: CP retry firing every cycle - #4329
Open
seaspotter wants to merge 2 commits into
Open
seaspotter wants to merge 2 commits into
seaspotter wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/control/load_protocol.py" line_range="65" />
<code_context>
self.data.control_parameter.timestamp_charge_start = create_timestamp()
elif self.data.set.current == 0:
self.data.control_parameter.timestamp_charge_start = None
+ self.data.control_parameter.timestamp_last_cp_retry = None
def is_charging_stop_allowed(self) -> bool:
</code_context>
<issue_to_address>
**Retries carry across charging sessions**
When current is zero, `timestamp_charge_start` is already `None`, and `timestamp_last_cp_retry` is still set before charging resumes, `set_timestamp_charge_start` skips the reset, so `initiate_control_pilot_interruption` uses the stale retry timestamp and retries before the configured interval has elapsed, causing an immediate control-pilot interruption.
Clear `timestamp_last_cp_retry` whenever current is zero, even when `timestamp_charge_start` is already `None`.
</issue_to_address>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hier gefunden: #4289 (comment)
Summary by Sourcery
Reset charge-point retry timing when charging is no longer active to prevent repeated retries across control cycles.
Bug Fixes:
Enhancements:
Tests: