RSDK-8836: Gantry Can't Home with Limit Switches #4383
Merged
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.
when checking if the gantry hit a limit switch during homing, we were also checking if it hit the other limit switch that we didn't expect, and returned an error so the user knows their limit switches aren't configured correctly. this caused an out of range error when there was only 1 limit switch since there isn't a second limit switch to check but we were assuming there was.
I thought there'd be a software test to check this but all the functions, specifically
GPIOPinByName
are injected so it failed when we told it to and passed when we told it to. looking for suggestions of a good way to add a test for this even now that it's fixed