mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-03 10:56:16 +00:00
BatteryService: add log warn if incorrect mode is set
This commit is contained in:
@@ -57,6 +57,7 @@ Singleton {
|
||||
|
||||
function setChargingMode(newMode) {
|
||||
if (newMode !== BatteryService.ChargingMode.Full && newMode !== BatteryService.ChargingMode.Balanced && newMode !== BatteryService.ChargingMode.Lifespan) {
|
||||
Logger.warn("BatteryService", `Invalid charging mode set ${newMode}`)
|
||||
return
|
||||
}
|
||||
BatteryService.chargingMode = newMode
|
||||
|
||||
Reference in New Issue
Block a user