cpldcpu/light_ws2812

AVR configuration files do not work

Closed this issue · 6 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 6f56c5c 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?

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

which compiler did you use?

Gcc on linux, Fedora30. Also my own Makefile.

In 6f56c5c, 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.

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

This should be fixed now