Merge ccf7a85de7 into ae4d5baac2
This commit is contained in:
commit
5e78c81bc7
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue