Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent ball search from marking playfield active #1610

Merged
merged 3 commits into from
Oct 29, 2021
Merged

Conversation

cobra18t
Copy link
Collaborator

Added ignore_switch_ms to ball search resets to prevent a ball search from cancelling itself because of erroneous switch reads during reset.

Added ignore_switch_ms to ball search resets to prevent a ball search from cancelling itself because of erroneous switch reads during reset.
@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 27, 2021

Makes sense. Got a test case as well?

@cobra18t
Copy link
Collaborator Author

I do not have a test case. There is an ignore_switch_ms test in drop_targets already, but I am not sure how to incorporate the ball search aspect.

@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 29, 2021

I guess you are solving some issue with this right? Basically, that the switch activation is delayed after the reset, right? We should reproduce the condition in a test to make sure we do not regress this later on.

@cobra18t
Copy link
Collaborator Author

Yes, how do I call the _ball_search method from drop_targets.py in a test?

@cobra18t
Copy link
Collaborator Author

OK. I added a test. For each ball search phase, it waits for a drop reset to occur, twiddles the drop reset switch within ignore_switch_ms, and confirms that the state of the target has not changed. The new version of drop_targets.py passes the test and the old version fails.

@jabdoa2 jabdoa2 closed this Oct 29, 2021
@jabdoa2 jabdoa2 reopened this Oct 29, 2021
@jabdoa2
Copy link
Collaborator

jabdoa2 commented Oct 29, 2021

Awesome. Thanks!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jabdoa2 jabdoa2 merged commit 5ff8386 into dev Oct 29, 2021
@cobra18t cobra18t deleted the cobra18t-patch-1 branch October 30, 2021 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants