Fix #114: remove redundant initial state check in LC_SampleAPs - #140
Open
philphauler wants to merge 1 commit into
Open
Fix #114: remove redundant initial state check in LC_SampleAPs#140philphauler wants to merge 1 commit into
philphauler wants to merge 1 commit into
Conversation
The guard on the starting AP's state prevented sampling the entire range when the first AP happened to be PERMOFF or NOT_USED. LC_SampleSingleAP already checks each AP's state individually, making this pre-check redundant and harmful.
Author
|
Removes a redundant initial-state check that |
Contributor
|
@philphauler Thank you for your contribution. Please resolve the workflow failures. |
Author
|
Already onnit 🫡🙏 |
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.
Summary
Remove the redundant guard on the starting AP state in
LC_SampleAPs.Problem
LC_SampleAPs(StartIndex, EndIndex)checksARTPtr[StartIndex].CurrentStatebefore entering the sampling loop. If the first AP is
PERMOFForNOT_USED,the entire range is skipped and an error event is emitted -- even though
subsequent APs in the range may be operational.
LC_SampleSingleAPalready checks each AP state individually, making thispre-check redundant and harmful when a range begins with a disabled AP.
Fix
Remove the pre-check. Let
LC_SampleSingleAPhandle per-AP state filteringfor each action point in the range. Net deletion of 21 lines.