Skip to content

Commit

Permalink
render debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
jackw01 committed Jan 24, 2021
1 parent bc3e76f commit 8344aa5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ledcontrol/driver/led_render.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <math.h>

const uint8_t debug = 0;

ws2811_channel_t *ws2811_channel_get(ws2811_t *ws, int channelnum) {
return &ws->channel[channelnum];
}
Expand Down Expand Up @@ -220,6 +222,7 @@ uint32_t render_hsv2rgb_rainbow_float(color_hsv_float hsv,
g = scale_8(g, corr_rgb.g);
b = scale_8(b, corr_rgb.b);

if (debug) printf("%d %d %d %d\n", r, g, b, w);
return pack_rgbw(r, g, b, w);
}

Expand Down Expand Up @@ -287,6 +290,7 @@ uint32_t render_rgb_float(color_rgb_float rgb,
g8 = scale_8(g8, corr_rgb.g);
b8 = scale_8(b8, corr_rgb.b);

if (debug) printf("%d %d %d %d\n", r8, g8, b8, w8);
return pack_rgbw(r8, g8, b8, w8);
}

Expand Down
1 change: 1 addition & 0 deletions ledcontrol/driver/ledcontrol_rpi_ws281x_driver.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions ledcontrol/driver/ledcontrol_rpi_ws281x_driver_wrap.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8344aa5

Please sign in to comment.