fix: Retry-Wartezeit beim EVSE-Auslesen greift nur beim ersten Fehlversuch - #3845
Open
seaspotter wants to merge 1 commit into
Open
fix: Retry-Wartezeit beim EVSE-Auslesen greift nur beim ersten Fehlversuch#3845seaspotter wants to merge 1 commit into
seaspotter wants to merge 1 commit into
Conversation
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.
In
request_and_check_hardware()(packages/modules/common/hardware_check.py) soll zwischen den Retry-Versuchen beim EVSE-Auslesen jeweilsRETRY_DELAY_SECONDSgewartet werden, bevor der nächste Versuch gestartet wird. Die aktuelle Bedingung dafür ist:Bei
MAX_ATTEMPTS = 3ergibtMAX_ATTEMPTS - 2 = 1, die Bedingungattempt < 1ist also nur beim allerersten Fehlschlag (attempt == 0) erfüllt. Zwischen Versuch 2 und 3 wird dadurch sofort erneut probiert, ohne Wartezeit. Der gesamte Retry-Zyklus dauert dadurch effektiv nur eine statt zwei Wartezeiten (~0,3 s statt ~0,6 s) und gibt der Hardware entsprechend weniger Zeit, sich von einem kurzen Bus-Aussetzer zu erholen, bevorEVSE_BROKENgeworfen wird.Fix
Damit wird nach jedem Fehlversuch außer dem letzten gewartet (bei 3 Versuchen: 2 Wartezeiten), statt nur einmal.