From 4202fb8cdc18c72ceb2e530f89ed56e9737ca43d Mon Sep 17 00:00:00 2001 From: ewowi Date: Tue, 2 Aug 2022 18:05:55 +0200 Subject: [PATCH] Small things - Remove leds[] in comments - freqmatrix default mapping to circle - t_bri compile error --- wled00/FX.cpp | 8 ++++---- wled00/FX_fcn.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 1a21c3912..3fbcb76ba 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -3836,7 +3836,7 @@ uint16_t phased_base(uint8_t moder) { // We're making sine wave for (int i = 0; i < SEGLEN; i++) { if (moder == 1) modVal = (inoise8(i*10 + i*10) /16); // Let's randomize our mod length with some Perlin noise. - uint16_t val = (i+1) * allfreq; // This sets the frequency of the waves. The +1 makes sure that leds[0] is used. + uint16_t val = (i+1) * allfreq; // This sets the frequency of the waves. The +1 makes sure that led 0 is used. if (modVal == 0) modVal = 1; val += *phase * (i % modVal +1) /2; // This sets the varying phase change of the waves. By Andrew Tuline. uint8_t b = cubicwave8(val); // Now we make an 8 bit sinewave. @@ -4888,7 +4888,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https: // else do nothing! } //x,y - // calculate CRC16 of leds[] + // calculate CRC16 of leds uint16_t crc = crc16((const unsigned char*)prevLeds, dataSize-1); //ewowi: prevLeds instead of leds work as well, tbd: compare more patterns, see SR! // check if we had same CRC and reset if needed @@ -6764,7 +6764,7 @@ uint16_t mode_freqmatrix(void) { // Freqmatrix. By Andreas Plesch return FRAMETIME; } // mode_freqmatrix() -static const char *_data_FX_MODE_FREQMATRIX PROGMEM = "Freqmatrix ♫@Time delay,Sound effect,Low bin,High bin,Sensivity;;;mp12=0,ssim=0"; // Pixels, Beatsin +static const char *_data_FX_MODE_FREQMATRIX PROGMEM = "Freqmatrix ♫@Time delay,Sound effect,Low bin,High bin,Sensivity;;;mp12=1,ssim=0"; // Circel, Beatsin ////////////////////// @@ -6968,7 +6968,7 @@ uint16_t mode_rocktaves(void) { // Rocktaves. Same note from eac frTemp -=132; // This should give us a base musical note of C3 frTemp = fabs(frTemp * 2.1); // Fudge factors to compress octave range starting at 0 and going to 255; -// leds[beatsin8(8+octCount*4,0,SEGLEN-1,0,octCount*8)] += CHSV((uint8_t)frTemp,255,volTemp); // Back and forth with different frequencies and phase shift depending on current octave. +// SEGMENT.setPixelColor(beatsin8(8+octCount*4,0,SEGLEN-1,0,octCount*8), CHSV((uint8_t)frTemp,255,volTemp)); // Back and forth with different frequencies and phase shift depending on current octave. uint16_t i = map(beatsin8(8+octCount*4, 0, 255, 0, octCount*8), 0, 255, 0, SEGLEN-1); SEGMENT.setPixelColor(i, color_add(SEGMENT.getPixelColor(i),color_blend(SEGCOLOR(1), SEGMENT.color_from_palette((uint8_t)frTemp, false, PALETTE_SOLID_WRAP, 0), volTemp))); diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 22f0c9cc1..bad4f3133 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -434,8 +434,8 @@ void IRAM_ATTR Segment::setPixelColor(int i, uint32_t col) strip.leds[start + i] = col; //ewowi: is this right? uint16_t len = length(); - uint8_t _bri_t = strip._bri_t; - //uint8_t _bri_t = currentBri(getOption(SEG_OPTION_ON) ? opacity : 0); + // uint8_t _bri_t = strip._bri_t; + uint8_t _bri_t = currentBri(getOption(SEG_OPTION_ON) ? opacity : 0); if (_bri_t < 255) { byte r = scale8(R(col), _bri_t); byte g = scale8(G(col), _bri_t);