Vibecoded Load Switch Manager #267
Closed
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
This is a fully vibe coded load switch manager component made in Cursor. The original prompt was as follows:
Based on the current structure of this repository, I would like to start implementing a loadswitch manager in CircuitPython. Help me with this process.
Generally what I want this component to do is to:
It is kind of shocking that it actually works! I did not personally write a single line of code in this PR. After some deliberation during the July 1, 2025 software working group meeting though we decided to move in a different direction, so this PR will probably be abandoned for that instead.
The new approach we want to look into is just having device managers inherit the load switch proto, so their on/off state is stored locally rather than in a separate component. This would simplify use of the code significantly, but it would also cause challenges for backwards compatibility on boards that don't have load switching capabilities. See #230 for a little more discussion about this.
How was this tested
Test on Hardware Output