Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Chris
Pixelframe
Commits
a219b691
Commit
a219b691
authored
Dec 22, 2020
by
Christian Wander
Browse files
renaming stuff
parent
c8832518
Changes
2
Hide whitespace changes
Inline
Side-by-side
pixelframe/controllers.py
View file @
a219b691
from
pixelframe
import
app
from
flask
import
render_template
import
pixelframe.
threadfun
as
t
import
pixelframe.
pixel_service
as
pixel_service
@
app
.
route
(
'/'
)
def
main_page
():
...
...
@@ -13,11 +13,11 @@ def hello_method():
return
render_template
(
'hello.html'
,
name
=
"foo"
)
@
app
.
route
(
'/start'
)
def
threadfun
():
t
.
doit
()
def
start_pixels
():
pixel_service
.
doit
()
return
"Started work."
@
app
.
route
(
'/stop'
)
def
threadstop
():
t
.
stopit
()
return
"Stopped work"
\ No newline at end of file
def
stop_pixels
():
pixel_service
.
stopit
()
return
"Stopped work"
pixelframe/
threadfun
.py
→
pixelframe/
pixel_service
.py
View file @
a219b691
...
...
@@ -37,7 +37,7 @@ def display_pixels():
sender
[
universe
].
destination
=
"192.168.178.37"
while
running
is
True
:
print
(
f
'>> Doing some work within thread, running=
{
running
}
'
)
#
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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment