Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fjen Undso
nchl
Commits
af0078ad
Commit
af0078ad
authored
Jan 23, 2018
by
Fjen Undso
Browse files
lights: test every color
parent
f41f600e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lights.py
View file @
af0078ad
...
...
@@ -87,8 +87,16 @@ def make_stripe_data(pixellist):
pixellist
+=
missing_pixels
*
[
0
]
return
pixel2bytes
(
pixellist
)
def
test
(
colors
):
"""Test colors by bruteforcing sequence numbers."""
for
i
in
range
(
128
):
send_broadcast
(
colors
)
if
__name__
==
'__main__'
:
colors
=
make_stripe_data
([
0
,
255
,
255
,
0
]
*
24
)
for
i
in
range
(
128
):
# bruteforce sequence numbers
send_broadcast
(
colors
)
test
(
make_stripe_data
([
255
,
0
,
0
,
0
]
*
LED_NUM
)
time
.
sleep
(
1
)
test
(
make_stripe_data
([
0
,
255
,
0
,
0
]
*
LED_NUM
)
time
.
sleep
(
1
)
test
(
make_stripe_data
([
0
,
0
,
255
,
0
]
*
LED_NUM
)
time
.
sleep
(
1
)
test
(
make_stripe_data
([
0
,
0
,
0
,
255
]
*
LED_NUM
)
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