From 445699150a1f1cdfe824efb2465de77b2eb0a9a3 Mon Sep 17 00:00:00 2001 From: Jochen Vothknecht <jochen3120@gmail.com> Date: Thu, 14 Apr 2022 15:08:17 +0200 Subject: [PATCH] =?UTF-8?q?Prepare=20testing=20things=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLC-qthing/device_main.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/CLC-qthing/device_main.cpp b/CLC-qthing/device_main.cpp index 7ad8c95..58df9c1 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); -- GitLab