Closed FreezyExp closed 1 year ago
As I use it on my installs and not had any issue, please post error message where this happens for you.
This happened with me too in linking stage with
and
I do not know which source you are compiling but this piece of code ensures the existence of 2D functions even if WLED_DISABLE_2D is defined.
I guess you may have caching issues.
I can reproduce it on a fresh Gitpod.
As I see linker need the missed functions Segment::getPixelColorXY(unsigned short, unsigned short)
, Segment::setPixelColorXY(int, int, unsigned int)
, Segment::move(unsigned char, unsigned char)
to make that evaluation work in runtime (1D or 2D) but those are not available because of the WLED_DISABLE_2D
preprocessor directive.
https://github.com/Aircoookie/WLED/blob/2e5b19575f234c0ea550dbe91e93172f523908e3/wled00/FX.cpp#L1205
Segment class has definition (not just declaration) of all those functions in case of WLED_DISABLE_2D. You can verify that in source (FX.h, linked above). I am using mac and Windows machines to compile and none produces linker error.
I've just tried it on my PC, by adding -DWLED_DISABLE_2D to the build_flags in [env:nodemcuv2], and it works for me.
[env:nodemcuv2]
...
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP8266 -DWLED_DISABLE_2D
HOWEVER when i put #define WLED_DISABLE_2D
into my_config.h
, then the build fails. Could this be the clue to explain build failures seen by @FreezyExp and @drhideg ?
@FreezyExp where exactly did you define WLED_DISABLE_2D?
Update: i think this one is fixed.
I just put #define WLED_DISABLE_2D
into my_config.h and compilation worked.
2D disabled:
RAM: [====== ] 59.8% (used 48996 bytes from 81920 bytes)
Flash: [======== ] 84.4% (used 753772 bytes from 892912 bytes)
2D included:
RAM: [====== ] 60.0% (used 49140 bytes from 81920 bytes)
Flash: [========= ] 89.2% (used 796460 bytes from 892912 bytes)
@FreezyExp and @drhideg please confirm if it works for you now, too.
I did swap #includes.
Confirmed. Works as it should. 2D enabled:
RAM: [====== ] 57.7% (used 47256 bytes from 81920 bytes)
Flash: [======= ] 71.8% (used 749836 bytes from 1044464 bytes)
2D disabled:
RAM: [====== ] 57.5% (used 47096 bytes from 81920 bytes)
Flash: [======= ] 67.7% (used 707292 bytes from 1044464 bytes)
Fixed in 0a3d9116025a34079827f6fc400eb94ac4f288c9
What happened?
Code is still attempting to use the removed getPixelColorXY
To Reproduce Bug
define WLED_DISABLE_2D
Expected Behavior
defining WLED_DISABLE_2D removes WLED_DISABLE_2D related code
Install Method
Self-Compiled
What version of WLED?
0.14
Which microcontroller/board are you seeing the problem on?
Other
Relevant log/trace output
No response
Anything else?
No response
Code of Conduct