This commit is contained in:
Disappear9 2025-01-22 00:11:36 -03:00 committed by GitHub
commit 5e78c81bc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -682,7 +682,7 @@ namespace MENU_Utils {
}
#endif
#ifdef HAS_AXP2101
if (Config.notification.lowBatteryBeep && !POWER_Utils::isCharging() && batteryCharge.toInt() < lowBatteryPercent) {
if (Config.notification.buzzerActive && Config.notification.lowBatteryBeep && !POWER_Utils::isCharging() && batteryCharge.toInt() < lowBatteryPercent) {
lowBatteryPercent = batteryCharge.toInt();
NOTIFICATION_Utils::lowBatteryBeep();
if (batteryCharge.toInt() < 6) {
@ -721,4 +721,4 @@ namespace MENU_Utils {
}
}
}
}

View File

@ -181,8 +181,10 @@ namespace MSG_Utils {
if (messageLed && ledOnDelta > 1 * 1000) {
digitalWrite(Config.notification.ledMessagePin, LOW);
}
if (!messageLed && digitalRead(Config.notification.ledMessagePin) == HIGH) {
digitalWrite(Config.notification.ledMessagePin, LOW);
if (!messageLed && Config.notification.ledMessage){
if (digitalRead(Config.notification.ledMessagePin) == HIGH){
digitalWrite(Config.notification.ledMessagePin, LOW);
}
}
}
@ -547,4 +549,4 @@ namespace MSG_Utils {
}
}
}
}

View File

@ -466,7 +466,7 @@ namespace POWER_Utils {
void shutdown() {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "SHUTDOWN !!!");
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
if (Config.notification.shutDownBeep) NOTIFICATION_Utils::shutDownBeep();
if (Config.notification.buzzerActive && Config.notification.shutDownBeep) NOTIFICATION_Utils::shutDownBeep();
displayToggle(false);
PMU.shutdown();
#else
@ -504,4 +504,4 @@ namespace POWER_Utils {
#endif
}
}
}