Skip to content

Commit f7efe81

Browse files
committed
Fix: ensuring that battery runtime, when not available, will not be used as a shutdown condition. Making sure when runtime is not available shutdown will not start immediately regardless of specified percentage
See: #195
1 parent c556b78 commit f7efe81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WinNUT_V2/WinNUT-Client/WinNUT.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ Public Class WinNUT
642642
LogFile.LogTracing("Battery properties unavailable, unable to validate shutdown conditions.", LogLvl.LOG_WARNING, Me)
643643
ElseIf Not ShutdownStatus Then
644644
If .Batt_Charge <= My.Settings.PW_BattChrgFloor Or
645-
.Batt_Runtime <= My.Settings.PW_RuntimeFloor Then
645+
(.Batt_Runtime <> -1 AndAlso .Batt_Runtime <= My.Settings.PW_RuntimeFloor) Then
646646
LogFile.LogTracing("UPS battery has dropped below stop condition limits.",
647647
LogLvl.LOG_NOTICE, Me, StrLog.Item(AppResxStr.STR_LOG_SHUT_START))
648648
Shutdown_Event()

0 commit comments

Comments
 (0)