Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fadecandy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scanlime
Fadecandy
Commits
99a12922
Commit
99a12922
authored
11 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
Example client: Debug flags, manually triggered frames
For debugging interpolation code.
parent
c36382ba
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/usb-basic.py
+8
-7
8 additions, 7 deletions
examples/usb-basic.py
with
8 additions
and
7 deletions
examples/usb-basic.py
+
8
−
7
View file @
99a12922
...
...
@@ -21,9 +21,10 @@ dev.set_configuration()
print
"
Serial number: %s
"
%
usb
.
util
.
get_string
(
dev
,
255
,
dev
.
iSerialNumber
)
# Disable dithering?
if
0
:
dev
.
write
(
1
,
'
\x80\x01
'
)
# Debug flags
flags
=
0x00
dev
.
write
(
1
,
'
\x80
'
+
chr
(
flags
)
+
(
'
\x00
'
*
62
))
# Set up a default color LUT
...
...
@@ -55,9 +56,9 @@ while True:
data
=
chr
(
control
)
+
''
.
join
(
chr
(
random
.
randrange
(
256
))
for
i
in
range
(
63
))
dev
.
write
(
1
,
data
)
print
binascii
.
b2a_hex
(
data
)
#time.sleep(0.1)
#print binascii.b2a_hex(data)
print
time
.
sleep
(
0.1
)
#print
raw_input
()
#time.sleep(0.1)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment