diff --git a/CLC-qthing/device_main.cpp b/CLC-qthing/device_main.cpp index 7ad8c95e00f8f714da11d4b35014670f82e584c1..58df9c1da6071bca88d40d2062f9d7b6f84306d3 100644 --- a/CLC-qthing/device_main.cpp +++ b/CLC-qthing/device_main.cpp @@ -13,8 +13,10 @@ // ### LIBS FOR TESTING ### #include <cstdlib> //#include "SpiderLib/SNTP.hpp" +#include "SpiderLib/Util.hpp" #include "SiliconTorch/CyanBusCRC.hpp" -#include "SiliconTorch/CyanBusTOUT.hpp" +#include "SiliconTorch/CyanBusBREAK.hpp" +// #include "SiliconTorch/CyanBusTOUT.hpp" // ### END LIBS ### @@ -25,36 +27,28 @@ CyanLight::CyanLightControl* ctrl; void device_main() { + ESP_LOGE("TAG", "Time in s[ %d ] ms[ %lld ] µs[ %lld ]", (int)SpiderLib::Time::s, (long long int)SpiderLib::Time::ms, (long long int)SpiderLib::Time::us); /*qthing::enable_wifi(); cfg.apply(); - return; + return; */ // Needed for packet parsing, animation rendering and stuff qthing::power_managment_max_power(); - uint8_t L = 9; - uint8_t* buffer = new uint8_t[L+1]; - std::memcpy(buffer, "fxk8y", 5); - buffer[L-4] = 0x84; - buffer[L-3] = 0xF1; - buffer[L-2] = 0xEF; - buffer[L-1] = 0x44; - buffer[L] = 0x00; - - ESP_LOGW("CheckCRC", "CRC of str[ %s ] is crc[ %s ]", buffer, SiliconTorch::Impl::checkCRC(buffer, L) ? "true" : "false"); - - return; */ - /* SiliconTorch::CyanBusTOUT::CyanBus cyanBus(13, 14, 12, 15); // Pinout of CyanStripe + SiliconTorch::CyanBusBREAK::CyanBus cyanBus(13, 14, 12, 15); // Pinout of CyanStripe // TODO: ??? cfg.apply(); - return; */ + return; + + + ctrl = new CyanLight::CyanLightControl(3); //ctrl->addChannel(16);