diff --git a/CLC-qthing/device_main.cpp b/CLC-qthing/device_main.cpp index 054ba95dad7b1787860166d66c231518e524db24..6d2e42f4030b4f3b7ee39917bf6e0d74f6e982f2 100644 --- a/CLC-qthing/device_main.cpp +++ b/CLC-qthing/device_main.cpp @@ -10,13 +10,11 @@ #include "CyanLight.hpp" #include "SiliconTorch/FxCyanF.hpp" -#include "SpiderLib/NumberTypes.hpp" +#include <SpiderLib.hpp> // ### LIBS FOR TESTING ### #include <cstdlib> -//#include "SpiderLib/SNTP.hpp" -#include "SpiderLib/Util.hpp" #include "SiliconTorch/CyanBus.hpp" @@ -45,7 +43,7 @@ SiliconTorch::CyanBus::CyanBus* cyanBus = NULL; //SiliconTorch::FxPublish::FxPublish* fxPub = NULL; SiliconTorch::FxCyanRGB8::FxCyanRGB8* cyanRGB = NULL; -CyanLight::CyanLightControl* ctrl; +CyanLight::CyanLightControl* ctrl = NULL; @@ -80,22 +78,13 @@ void device_main() { // TODO: ??? - // Trigger singleton initialization - SiliconTorch::NVSExplorer::NVSExplorer::instance(); + // Do it in another task do control stack size + new SpiderLib::Util::LambdaTask([&]() { + // Trigger singleton initialization + SiliconTorch::NVSExplorer::NVSExplorer::instance(); - - //std::set<std::string> namespaces = SiliconTorch::NVSExplorer::NVSExplorer::instance().listNamespaces(); - - //std::string _ns = SiliconTorch::NVSExplorer::toString(namespaces, " ~=[]=~ "); - - //ESP_LOGW("__SET__", "Listing Namespaces: %s", _ns.c_str()); - - - - ctrl = new CyanLight::CyanLightControl(0); - - // auto fxCyanF = (SiliconTorch::FxCyanF::FxCyanF) *ctrl; - // SiliconTorch::FxCyanF::configureFromNVS(fxCyanF); + SiliconTorch::FxCyanF::configureFromNVS(); + }); qthing::enable_wifi(); return;