SEBWIN-489: Changed power supply thresholds from 40% = low and 20% = critical to 20% = low and 10% = critical.

This commit is contained in:
Damian Büchel 2021-05-10 22:12:19 +02:00
parent 8d6dc3b51b
commit 7ad97b954c

View file

@ -37,7 +37,7 @@ namespace SafeExamBrowser.SystemComponents.PowerSupply
var status = new PowerSupplyStatus();
status.BatteryCharge = charge;
status.BatteryChargeStatus = charge <= 0.4 ? (charge <= 0.2 ? BatteryChargeStatus.Critical : BatteryChargeStatus.Low) : BatteryChargeStatus.Okay;
status.BatteryChargeStatus = charge <= 0.2 ? (charge <= 0.1 ? BatteryChargeStatus.Critical : BatteryChargeStatus.Low) : BatteryChargeStatus.Okay;
status.BatteryTimeRemaining = new TimeSpan(hours, minutes, 0);
status.IsOnline = SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online;