11struct LEDOutputConfig;
14void fftLEDOutput(LEDOutputConfig *cfg, LEDOutput *matrix);
80 for (
int j = 0; j <
ledCount(); j++) {
87 if (
p_fft !=
nullptr) {
128 int index =
xy(x, y);
133 CRGB &
led(uint8_t index) {
141 for (uint8_t y = 0; y < currY; y++) {
147 for (uint8_t y = currY; y <
cfg.
y; y++) {
148 ledXY(x, y) = CRGB::Black;
174 if (
p_vol !=
nullptr) {
178 if (
p_fft !=
nullptr) {
179 for (
int j = 0; j <
cfg.
x; j++) {
209 for (
int x = 1; x <
cfg.
x; x++) {
210 for (
int y = 0; y <
cfg.
y; y++) {
214 for (
int y = 0; y <
cfg.
y; y++) {
219 uint16_t
xy(uint8_t x, uint8_t y) {
234 uint8_t reverseX = (
cfg.
x - 1) - x;
235 i = (y *
cfg.
x) + reverseX;
257 for (
int x = 0; x < cfg->
x; x++) {
260 LOGD(
"x: %d, y: %d", x, currY);
269 int currY = mapT<float>(vol, 0,
271 static_cast<float>(cfg->
y));
278 int color =
map(magnitude, 0, 7, 255, 0);
279 return CHSV(color, 255, 100);
long map(long x, long in_min, long in_max, long out_min, long out_max)
Maps input to output values.
Definition Arduino.h:182
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30