light_ws2812 icon indicating copy to clipboard operation
light_ws2812 copied to clipboard

AVR configuration files do not work

Open PaulKlinger opened this issue 7 years ago • 5 comments

According to the readme, to set configuration options one should modify e.g. ws2812_config.h and include it before light_ws2812.h. However this does not actually work, the custom options are ignored and the default ones in light_ws2812.h are used. (See also #67.)

As far as I understand it this is because the two files are part of different compilation units and DEFINEs are not shared between them. Before the commit 6f56c5c091ab6df631460eaa4186d4a6ded51723 ws2812_config.h was included in light_ws2812.h, so everything worked.

Is there some way to get the current setup to work or is this a bug?

PaulKlinger avatar Feb 08 '19 16:02 PaulKlinger

I can confirm that. I added #include "ws2812_config.h" to light_ws2812.h to fix.

ghost avatar Nov 14 '19 13:11 ghost

which compiler did you use?

cpldcpu avatar Dec 03 '19 06:12 cpldcpu

Gcc on linux, Fedora30. Also my own Makefile.

ghost avatar Dec 03 '19 09:12 ghost

In 6f56c5c091ab6df631460eaa4186d4a6ded51723, the line #include "ws2812_config.h" has been removed from light_ws2812.h. Now when light_ws2812.c is compiled, the user-defined configuration is not included anymore.

chschu avatar Sep 08 '20 11:09 chschu

As a workaround, you can change the defaults in light_ws2812.h or pass -Dws2812_port=... and -Dws2812_pin=... as compiler flags.

chschu avatar Sep 08 '20 11:09 chschu

This should be fixed now

cpldcpu avatar Nov 18 '23 22:11 cpldcpu