sgupta999 / wled-alexa-relay-usermod

3 stars 0 forks source link

Errors when compiling #1

Closed smcgann99 closed 1 year ago

smcgann99 commented 1 year ago

Hi,

Bit new to all this so I'm probably doing something wrong ;-)

I copied your files over the top of the files from https://github.com/Aircoookie/WLED.git

However I cannot get it to compile, it seems there is code missing from your version of fcn_declare.h any ideas please ?

wled00/cfg.cpp: In function 'bool deserializeConfig(ArduinoJson::JsonObject, bool)': wled00/cfg.cpp:341:34: error: 'NeoGammaWLEDMethod' has not been declared if (gammaCorrectVal != 2.8f) NeoGammaWLEDMethod::calcGammaTable(gammaCorrectVal); ^ *** [.pio\build\esp32dev\src\cfg.cpp.o] Error 1 wled00/colors.cpp:305:9: error: 'NeoGammaWLEDMethod' has not been declared uint8_t NeoGammaWLEDMethod::gammaT[256] = { ^ wled00/colors.cpp:324:6: error: 'NeoGammaWLEDMethod' has not been declared void NeoGammaWLEDMethod::calcGammaTable(float gamma) ^ wled00/colors.cpp:331:9: error: 'NeoGammaWLEDMethod' has not been declared uint8_t NeoGammaWLEDMethod::Correct(uint8_t value) ^ wled00/colors.cpp:338:10: error: 'NeoGammaWLEDMethod' has not been declared uint32_t NeoGammaWLEDMethod::Correct32(uint32_t color) ^ *** [.pio\build\esp32dev\src\colors.cpp.o] Error 1

sgupta999 commented 1 year ago

yeah this was always a possibility with changing the fcn_declare.h

I would remove my fcn_declare.h and copy the new one since they probably added more methods

just make sure in the new file you add void relaysOnAlexaChange(EspalexaDevice* dev); in the following section

hopefully that should fix it

ifndef WLED_DISABLE_ALEXA

void onAlexaChange(EspalexaDevice dev); void alexaInit(); void handleAlexa(); void onAlexaChange(EspalexaDevice dev); void relaysOnAlexaChange(EspalexaDevice* dev);

endif

smcgann99 commented 1 year ago

Thanks I have it running now.

I have 1 relay setup as kitchen in multi relay mod, and 1 setup in led prefs (to switch external psu)

If I switch wled on and off via gui both relays change state, via alexa I can turn kitchen on and off but again if I use Alexa to turn wled on or off it changes kitchen as well ?

sgupta999 commented 1 year ago

do you have the external checkbox checked for the one in the kitchen - if not wled controls it otherwise only external this is in the usermod configuration section

smcgann99 commented 1 year ago

Thanks all good now ;-)

sgupta999 commented 1 year ago

cool - i need to fix README a wee bit i guess