Skip to content

Commit 9c7df28

Browse files
committed
color_mode is not unpacked to an enum
Fixes jath03#69
1 parent 43c8bda commit 9c7df28

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

openrgb/utils.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class ModeDirections(IntEnum):
3333

3434

3535
class ModeColors(IntEnum):
36+
"""
37+
Partial list of color_mode values. This is not a comprehensive set so do not use this to unpack.
38+
"""
3639
NONE = 0
3740
PER_LED = 1
3841
MODE_SPECIFIC = 2
@@ -245,7 +248,7 @@ class ModeData:
245248
speed: Optional[int]
246249
brightness: Optional[int]
247250
direction: Optional[ModeDirections]
248-
color_mode: ModeColors
251+
color_mode: int
249252
colors: Optional[list[RGBColor]]
250253

251254
def validate(self, version: int):
@@ -329,7 +332,7 @@ def unpack(cls, data: Iterator[int], version: int, index: int = 0) -> ModeData:
329332
else:
330333
brightness = None
331334
direction = parse_var('I', data)
332-
color_mode = ModeColors(parse_var('I', data))
335+
color_mode = parse_var('I', data)
333336
num_colors = parse_var('H', data)
334337

335338
colors = []

0 commit comments

Comments
 (0)