Skip to content

Commit

Permalink
Fix for 10 and now cw retruns 0 if 0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidy committed Oct 22, 2021
1 parent 2e29a93 commit e0c92da
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions pywizlight/bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ def _set_rgb(self, values: tuple):
self.pilot_params["b"] = blue
else:
raise ValueError("Blue is not in range between 0-255.")
# No CW because of full color
if cw is None:
cw = 0
# Use the existing set_warm_white function to set the CW values
self._set_warm_white(cw)
# Use the existing set_cold_white function to set the CW values
Expand Down
2 changes: 0 additions & 2 deletions pywizlight/rgbcw.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ def trapezoid(hueVec, saturation):
# scale back to the pilot color space
rgb = vecInt(vecMul(rgb, 255))
cw = int(max(0, cw * CWMAX))
if cw == 0:
cw = None
debug(" RGB OUT: {}, CW: {}".format(rgb, cw))
# the wiz light appears to have 5 different LEDs, r, g, b, warm_white, and cold_white
# there appears to be a max power supplied across the 5 LEDs, which explains why all-
Expand Down

0 comments on commit e0c92da

Please sign in to comment.