Merge pull request #1 from kanapoutz78/patch-1

Custom number of pixels bug
This commit is contained in:
not-matt 2017-12-19 18:04:00 +00:00 committed by GitHub
commit 1b105f4769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ class Visualizer():
def _wavelength_set_color_mode(self, mode): def _wavelength_set_color_mode(self, mode):
# chunks of colour gradients # chunks of colour gradients
self.rgb_overlay = np.zeros((3,242)) self.rgb_overlay = np.zeros((3,config.N_PIXELS))
# used to construct rgb overlay. [0-255,255...] whole length of strip # used to construct rgb overlay. [0-255,255...] whole length of strip
_gradient_whole = [int(i*255/(config.N_PIXELS//2)) for i in range(config.N_PIXELS//2)] +\ _gradient_whole = [int(i*255/(config.N_PIXELS//2)) for i in range(config.N_PIXELS//2)] +\
[255 for i in range(config.N_PIXELS//2)] [255 for i in range(config.N_PIXELS//2)]