Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chaotikum-logo-20px
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
malte
chaotikum-logo-20px
Commits
c80e79df
Commit
c80e79df
authored
Aug 29, 2020
by
Malte Schmitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix constant bit length
parent
0504b778
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
foo.py
foo.py
+2
-2
No files found.
foo.py
View file @
c80e79df
...
...
@@ -18,13 +18,13 @@ print("\n\n\n\n\n")
array
=
"{"
+
","
.
join
([
hex
(
p
)
for
p
in
pixels
])
+
"}"
code
=
"""uint32_t[{width}] = {array};
code
=
"""uint32_t[{width}]
pixels
= {array};
for (int x = 0; x < {width}; x++) {{
uint32_t line = pixels[x];
for (int y = 0; y < {height}; y++) {{
uint32_t color = 0;
if (line & (1 << y)) {{
if (line & (1
l
<< y)) {{
color = 0xFFFFFF;
}}
strip.setPixelColor(y, color);
...
...
Write
Preview
Markdown
is supported
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