Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add threshold setting in ES for battery warning #1296

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

cdeletre
Copy link
Contributor

This PR adds the possibility to adjust the battery threshold in ES for the warnings.

The slide is displayed even if ENABLE AUDIBLE BATTERY WARNING is set to false because it the threshold is also used for the LED alert (which I wasn't able to test on RP5).

I've added this lines because I'm not 100% about the default behaviour when the value is not found in system.cfg after an upgrade.

	if (SystemConf::getInstance()->get("system.battery.warning_threshold").length() == 0) {
		SystemConf::getInstance()->set("system.battery.warning_threshold", "25");
	}

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.

2 participants