Commit f28d96d8 authored by gordon bleu's avatar gordon bleu
Browse files

beautify the usage of config

parent 97c87d7e
......@@ -3,7 +3,7 @@ import queue
import time
import pixelframe.blink as blink
import pixelframe.image_config as config
from pixelframe.image_config import config
import sacn
running = False
......@@ -21,13 +21,15 @@ def doit():
running = True
x = threading.Thread(target=display_pixels, daemon=True)
x.start()
print(f'>> Thread started.')
print(f'>> pixelservice started.')
def stopit():
global running
running = False
print(">> pixelservice stopping")
def display_pixels():
......@@ -38,9 +40,8 @@ def display_pixels():
sender[universe].destination = "192.168.178.37"
while running is True:
# print(f'>> Doing some work within thread, running={running} ')
images = config.config['images']
images = config['images']
for i in images:
......@@ -50,7 +51,7 @@ def display_pixels():
pic = blink.Thing(file=file)
sender[universe].dmx_data = pic.snake_tuple()
print(f'>> current config: {config.config}')
print(f'>> current config: {config}')
time.sleep(10)
......
Markdown is supported
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