master
Raphaël Vinot 2015-03-30 22:16:23 +02:00
parent 28deb6bbf1
commit bd9268860b
2 changed files with 2 additions and 5 deletions

View File

@ -11,7 +11,6 @@ width = 8
framerate = 40 framerate = 40
##################################### #####################################
gamma = 1.7
brightness = 0.2 brightness = 0.2
dimension = 0 dimension = 0
@ -24,7 +23,6 @@ ledTCP = None
data = None data = None
current_px = 0 current_px = 0
gammatable = None
def TCPConfigure(server, port): def TCPConfigure(server, port):
return Client(this, server, port) return Client(this, server, port)
@ -39,7 +37,6 @@ def check_config(max_height, max_width, max_framerate):
return True, None return True, None
def setup(): def setup():
global gammatable
global dimension global dimension
global data global data
global ledTCP global ledTCP
@ -53,7 +50,7 @@ def setup():
size(width, height) size(width, height)
dimension = width * height dimension = width * height
frameRate(framerate) frameRate(framerate)
data = prepare_data(dimension, gamma, brightness) data = prepare_data(dimension, brightness)
loadPixels() loadPixels()
for i in range(dimension): for i in range(dimension):
pixels[i] = color(0, 0, 0) pixels[i] = color(0, 0, 0)

View File

@ -36,7 +36,7 @@ def _encode_pixel(c):
encoded = _encode_color_grb(rgb) encoded = _encode_color_grb(rgb)
return encoded return encoded
def prepare_data(dimension, gamma, b): def prepare_data(dimension, b):
global brightness global brightness
global _byte_lookup global _byte_lookup
if b > brightness_max: if b > brightness_max: