spacemanspiff2007 / PyArtNet

"Python wrappers for the Art-Net protocol to send DMX over Ethernet"
GNU General Public License v3.0
70 stars 14 forks source link

add_fade invalid assert #8

Closed dturpin74 closed 3 years ago

dturpin74 commented 3 years ago

seems like this line is problematic dmx_channel.py line 91

assert 0 <= k.val_target <= 255 ** self._CHANNEL_SIZE

this does not work when using 16bit+ channels. The upper limit of fade value would be 65025 or 0xFE01 instead of the expected 0xFFFF

Value should be compared against (256 ** channel_size) - 1 instead

spacemanspiff2007 commented 3 years ago

Thanks for your report - I'll fix it right away!