kusti8 / hue-plus

A Windows and Linux driver in Python for the NZXT Hue+
GNU General Public License v3.0
229 stars 18 forks source link

Program crash on 8+ colors in fading mode. #35

Open zachdnvn opened 6 years ago

zachdnvn commented 6 years ago

Hello, I notice when you add more than 8 colors under the fading menu (Like a spectrum wave, but with only one color), the program crashes. I have attached the popup error. Upon selecting "Okay" the program exits.

An unhandled exception has occurred
----------------------------------------
<class 'ValueError'>: 
byte must be in range(0, 256)
----------------------------------------
  File "C:\Users\\AppData\Local\hue_plus\pkgs\hue_plus\hue_ui.py", line 640, in applyFunc
    self.indexApply[self.presetModeWidget.currentIndex()]()
  File "C:\Users\\AppData\Local\hue_plus\pkgs\hue_plus\hue_ui.py", line 380, in fadingApply
    hue.fading(ser, 0, self.getChannel(), self.getColors(self.fadingList), speed)
  File "C:\Users\\AppData\Local\hue_plus\pkgs\hue_plus\hue.py", line 450, in fading
    command = create_command(ser, channel, color, "fading", 0, 0, 0, speed)
  File "C:\Users\\AppData\Local\hue_plus\pkgs\hue_plus\hue.py", line 374, in create_command
    command = bytearray(command)

Windows v1.4.5