Skip to content

Commit 5b79f98

Browse files
Define UPS_States values as pow of 2 to fix state change detection
1 parent 668f13b commit 5b79f98

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

WinNUT_V2/WinNUT-Client_Common/Common_Enums.vb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,18 @@ End Enum
101101

102102
<Flags()>
103103
Public Enum UPS_States
104-
None
105-
OL
106-
OB
107-
LB
108-
HB
109-
CHRG
110-
DISCHRG
111-
FSD
112-
BYPASS
113-
CAL
114-
OFF
115-
OVER
116-
TRIM
117-
BOOST
104+
None = 0
105+
OL = 1 << 0
106+
OB = 1 << 1
107+
LB = 1 << 2
108+
HB = 1 << 3
109+
CHRG = 1 << 4
110+
DISCHRG = 1 << 5
111+
FSD = 1 << 6
112+
BYPASS = 1 << 7
113+
CAL = 1 << 8
114+
OFF = 1 << 9
115+
OVER = 1 << 10
116+
TRIM = 1 << 11
117+
BOOST = 1 << 12
118118
End Enum

0 commit comments

Comments
 (0)