#include "containers/LedStripRGBW.h" #include "effects/AlexaSwipe.h" #include #include template void printVec(const std::vector &vec) { std::cout << "["; for (const auto &e : vec) std::cout << e << ","; std::cout << "]\n"; } int main(int argc, char **argv) { auto cfg = EffectAlexaSwipeConfig{20, 20, 90, 5, 180, ColorRGBW{255, 0, 0, 0}, ColorRGBW{0, 0, 255, 0}}; LedStripRGBW<51> strip; EffectAlexaSwipe effect(cfg, strip); effect.currentPosition_ = 150; const auto numLeds = strip.numLeds() / 2; std::vector brightness(numLeds, 0); std::vector interpolation(numLeds, 0); for (int i = 0; i < numLeds; ++i) effect.getParams(float(i), interpolation[i], brightness[i]); printVec(brightness); printVec(interpolation); effect(); return 0; }