Update visualization.py

In order to fit custom number of pixels
This commit is contained in:
kanapoutz78 2017-12-19 16:43:14 +01:00 committed by GitHub
parent 437b07f8a4
commit c55c0f4cb9
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):
# 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
_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)]