Skip to content

Commit 80a1196

Browse files
WIP adjustments
1 parent 9b35e61 commit 80a1196

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

CLUE_Light_Painter/bmp2led.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ def process(self, input_filename, output_filename, rows,
250250
callback(position)
251251
# Scale position into pixel space...
252252
if loop: # 0 to image height
253-
position *= rows
254-
else: # 0 to last row
255-
position *= (rows - 1)
253+
position *= self.bmp_specs.height
254+
else: # 0 to last row
255+
position *= (self.bmp_specs.height - 1)
256256

257257
# Separate absolute position into several values:
258258
# integer 'a' and 'b' row indices, floating 'a' and
@@ -312,7 +312,7 @@ def process(self, input_filename, output_filename, rows,
312312
# use soon, would replace these two Python ops).
313313
got[got < 0] = 0
314314
got[got > 255] = 255
315-
# ulab.compare.clip(got, 0, 255)
315+
#ulab.compare.clip(got, 0, 255)
316316
# Now quantize the floating-point 'got' to uint8
317317
# type. This represents the actual final byte values
318318
# that will be issued to the LED strip.
84.4 KB
Binary file not shown.
67.6 KB
Binary file not shown.

CLUE_Light_Painter/code.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
FLIP_SCREEN = False # If True, turn CLUE screen & buttons upside-down
3737
GAMMA = 2.6 # Correction factor for perceptually linear brightness
3838

39+
PIXEL_ORDER = 'gbr'
3940

4041
def centered_label(text, y_pos, scale):
4142
"""
@@ -190,7 +191,8 @@ def load_image(self):
190191
group.append(self.rect)
191192
board.DISPLAY.show(group)
192193

193-
duration = 5.0 - self.speed * 4.5
194+
#duration = 5.0 - self.speed * 4.5
195+
duration = 3.0 - self.speed * 2.75
194196
rows = duration * self.rows_per_second
195197
try:
196198
self.num_rows = self.bmp2led.process(self.path + '/' +

0 commit comments

Comments
 (0)