Skip to content

Conversation

@AluskyWolf
Copy link
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
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.

}
double batteryVoltage = RobotController.getBatteryVoltage();

if(batteryVoltage<= kLowBatteryVoltage && disabledTimer.hasElapsed(kLowBatteryDisabledTime) && lowBatteryCycleCount >= kLowBatteryMinCycles){
Copy link
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
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
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
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.

4 participants