Skip to content

added low battery alert#40

Merged
bangxiao0927 merged 5 commits into
mainfrom
aarush/lowbatterywarnin
Dec 20, 2025
Merged

added low battery alert#40
bangxiao0927 merged 5 commits into
mainfrom
aarush/lowbatterywarnin

Conversation

@AluskyWolf
Copy link
Copy Markdown
Contributor

6328 and a few other teams have these low battery alerts so when they are testing or during drive practice they know when to change batteries to maximize the lifetime, I thought we could try it next season, and it will also help during drive practice

Copy link
Copy Markdown
Contributor

@matthewcwheeler matthewcwheeler left a comment

Choose a reason for hiding this comment

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

lgtm, just wondering if the alert logic can be cleaned up a bit.

Comment thread src/main/java/frc/robot/Robot.java Outdated
}
double batteryVoltage = RobotController.getBatteryVoltage();

if(batteryVoltage<= kLowBatteryVoltage && disabledTimer.hasElapsed(kLowBatteryDisabledTime) && lowBatteryCycleCount >= kLowBatteryMinCycles){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How often is it the case that cycle count is less than 10, but that the elapsed time is greater than 1.5 (seconds, minutes?)? That is, do you need both checks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i dont think we need both checks - updated in the newest commit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@matthewcwheeler can you do one more check before i merge?

Copy link
Copy Markdown
Contributor

@bangxiao0927 bangxiao0927 left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: Bang Xiao <bangxiao0927@gmail.com>
@bangxiao0927 bangxiao0927 merged commit 6235f47 into main Dec 20, 2025
1 check passed
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.

3 participants