Commit f2f0b555 authored by Christian Wander's avatar Christian Wander
Browse files

display images according to config

parent 5e26a219
......@@ -29,7 +29,7 @@ def images():
"""
if request.method == 'POST':
print(f'>> receiving: {request.json}')
# print(f'>> receiving: {request.json}')
config.update(request.json)
return config.config
......@@ -18,4 +18,4 @@ def update(data):
config['images'] = data['images']
if "path" in data:
config['path'] = data['path']
\ No newline at end of file
config['path'] = data['path']
......@@ -3,6 +3,7 @@ import queue
import time
import pixelframe.blink as blink
import pixelframe.image_config as config
import sacn
running = False
......@@ -38,9 +39,20 @@ def display_pixels():
while running is True:
# print(f'>> Doing some work within thread, running={running} ')
pic = blink.Thing(file="data/cyber-12x12.png")
sender[universe].dmx_data = pic.snake_tuple()
time.sleep(2)
images = config.config['images']
for i in images:
file = config.config['path'] + "/" + i
print(f'>> current image: {file}')
pic = blink.Thing(file=file)
sender[universe].dmx_data = pic.snake_tuple()
print(f'>> current config: {config.config}')
time.sleep(2)
sender.stop()
print(f'>> Finished work within thread!')
print(f'>> pixel_service stopping.')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment