Small things

- Remove leds[] in comments
- freqmatrix default mapping to circle
- t_bri compile error
This commit is contained in:
ewowi 2022-08-02 18:05:55 +02:00
parent 2ca5e0c8b8
commit 4202fb8cdc
2 changed files with 6 additions and 6 deletions

View File

@ -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)));

View File

@ -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);