Skip to content

Brown protection go!#129

Open
Mond-Mann wants to merge 10 commits intomainfrom
brownoutprevention
Open

Brown protection go!#129
Mond-Mann wants to merge 10 commits intomainfrom
brownoutprevention

Conversation

@Mond-Mann
Copy link
Copy Markdown
Contributor

BrownProtection runs every robot loop at runtime, reading battery voltage from RobotController and total robot current from CurrentDrawLogger, smooths both with a 10-sample moving average, and converts them into normalized budgets (voltage budget and current budget). It then takes the worst of those budgets, and that becomes protectionBudget. Then it generates a difference and separates it into driveScale and mechanismScale. The drivetrain is prioritized, while aiming and extension mechanisms are slowed more aggressively.

Copy link
Copy Markdown
Collaborator

@codeNinja-1 codeNinja-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also delete emsdk.

@codeNinja-1 codeNinja-1 linked an issue Mar 19, 2026 that may be closed by this pull request
@Mond-Mann Mond-Mann requested a review from a team March 19, 2026 18:24
@Mond-Mann Mond-Mann self-assigned this Mar 19, 2026
@Mond-Mann Mond-Mann requested a review from codeNinja-1 March 19, 2026 18:24
@Mond-Mann Mond-Mann force-pushed the brownoutprevention branch from af92339 to 50b12a7 Compare March 26, 2026 01:25
@Mond-Mann
Copy link
Copy Markdown
Contributor Author

Also delete emsdk.
done, this needs another code review

Copy link
Copy Markdown
Collaborator

@codeNinja-1 codeNinja-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've made amazing progress on this very complicated problem! There are a few things to change about how the brownout protection should fit into the rest of the code and the details of how it should be behave. Other than that, there are some changes that shouldn't be included in this pull request, because this one is only focused on brownout protection, but could be added in other PRs.

@Mond-Mann Mond-Mann requested a review from codeNinja-1 March 29, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent brownouts

2 participants