-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling error: "in expansion of macro 'F'" #83
Comments
This issue has been around for quite a while. See the explanation for this bug here: esp8266/Arduino#3351 |
Thanks! Updated to V2.4.1 but the problem persist. Have to dig deeper into the link you provided, but so far it seems that one have to modify more or less the actual source codes of WS2812FX or Mysensors library. For future maintainability/upgradeability I'm not very keen to go that path. But hopefully there will be some neat solution I haven't found yet... |
I think you're right about having to modify the library source code. I agree, not a great option for future maintainability. But for the WS2812FX lib it's not terribly hard. You just need to move all the strings out of Flash memory and into RAM memory, i.e. change all the F(...) functions to regular strings and change all the __FlashStringHelper references to char references. The getModeName() function in WS2812FX.cpp becomes this: const char* WS2812FX::getModeName(uint8_t m) {
if(m < MODE_COUNT) {
return _name[m];
} else {
return "";
}
} And all the mode strings in WS2812FX.h change to regular strings: _name[FX_MODE_STATIC] = "Static";
_name[FX_MODE_BLINK] = "Blink";
_name[FX_MODE_BREATH] = "Breath";
... I'll have to give some thought to changing all the strings in WS2812FX to global variables, so this doesn't continue to be a problem. |
Hello, |
When trying to compile WS2812FX with MySensors node, I get following error message:
Not sure where the problem lies. Have around 100 MySensor nodes and this is the first time I get this error. Something overlapping or...?
The text was updated successfully, but these errors were encountered: