Revert "Merge branch 'master' into framerate"
This reverts commit38cc460358
, reversing changes made to8600360173
.
This commit is contained in:
parent
38cc460358
commit
0d4d1eff94
@ -301,24 +301,24 @@ uint16_t WS2812FX::scan(bool dual)
|
||||
uint32_t cycleTime = 750 + (255 - SEGMENT.speed)*150;
|
||||
uint32_t perc = now % cycleTime;
|
||||
uint16_t prog = (perc * 65535) / cycleTime;
|
||||
uint16_t size = 1 + ((SEGMENT.intensity * SEGLEN) >>9);
|
||||
uint16_t ledIndex = (prog * ((SEGLEN *2) - size *2)) >> 16;
|
||||
uint16_t ledIndex = (prog * ((SEGLEN * 2) - 2)) >> 16;
|
||||
uint16_t size = 1 + SEGMENT.intensity >> 3;
|
||||
|
||||
fill(SEGCOLOR(1));
|
||||
|
||||
int led_offset = ledIndex - (SEGLEN - size);
|
||||
int led_offset = ledIndex - (SEGLEN - 1);
|
||||
led_offset = abs(led_offset);
|
||||
|
||||
if (dual) {
|
||||
for (uint16_t j = led_offset; j < led_offset + size; j++) {
|
||||
uint16_t i2 = SEGMENT.stop -1 -j;
|
||||
setPixelColor(i2, color_from_palette(i2, true, PALETTE_SOLID_WRAP, (SEGCOLOR(2))? 2:0));
|
||||
}
|
||||
uint16_t i = SEGMENT.start + led_offset;
|
||||
for (int16_t j=i-size/2; j<=i+size/2; j++) {
|
||||
if (j>=0) setPixelColor(j, color_from_palette(i, true, PALETTE_SOLID_WRAP, 0));
|
||||
}
|
||||
|
||||
for (uint16_t j = led_offset; j < led_offset + size; j++) {
|
||||
uint16_t i = SEGMENT.start + j;
|
||||
setPixelColor(i, color_from_palette(i, true, PALETTE_SOLID_WRAP, 0));
|
||||
if (dual) {
|
||||
uint16_t i2 = SEGMENT.start + SEGLEN - led_offset - 1;
|
||||
for (int16_t j=i2-size/2; j<=i2+size/2; j++) {
|
||||
if (j>=0) setPixelColor(j, color_from_palette(i2, true, PALETTE_SOLID_WRAP, 0));
|
||||
}
|
||||
}
|
||||
|
||||
return FRAMETIME;
|
||||
@ -1004,7 +1004,7 @@ uint16_t WS2812FX::larson_scanner(bool dual) {
|
||||
|
||||
for (uint16_t i = SEGENV.step; i < index; i++) {
|
||||
uint16_t j = (SEGENV.aux0)?i:SEGLEN-1-i;
|
||||
setPixelColor(SEGMENT.start + j, color_from_palette(j, true, PALETTE_SOLID_WRAP, 0));
|
||||
setPixelColor(j, color_from_palette(j, true, PALETTE_SOLID_WRAP, 0));
|
||||
}
|
||||
if (dual) {
|
||||
uint32_t c;
|
||||
@ -1016,7 +1016,7 @@ uint16_t WS2812FX::larson_scanner(bool dual) {
|
||||
|
||||
for (uint16_t i = SEGENV.step; i < index; i++) {
|
||||
uint16_t j = (SEGENV.aux0)?SEGLEN-1-i:i;
|
||||
setPixelColor(SEGMENT.start + j, c);
|
||||
setPixelColor(j, c);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1034,7 +1034,7 @@ uint16_t WS2812FX::mode_comet(void) {
|
||||
|
||||
fade_out(SEGMENT.intensity);
|
||||
|
||||
setPixelColor(SEGMENT.start + index, color_from_palette(index, true, PALETTE_SOLID_WRAP, 0));
|
||||
setPixelColor(index, color_from_palette(index, true, PALETTE_SOLID_WRAP, 0));
|
||||
|
||||
return FRAMETIME;
|
||||
}
|
||||
|
14
wled00/FX.h
14
wled00/FX.h
@ -84,7 +84,7 @@
|
||||
#define IS_REVERSE ((SEGMENT.options & REVERSE ) == REVERSE )
|
||||
#define IS_SELECTED ((SEGMENT.options & SELECTED) == SELECTED )
|
||||
|
||||
#define MODE_COUNT 92
|
||||
#define MODE_COUNT 89
|
||||
|
||||
#define FX_MODE_STATIC 0
|
||||
#define FX_MODE_BLINK 1
|
||||
@ -175,9 +175,6 @@
|
||||
#define FX_MODE_SPOTS_FADE 86
|
||||
#define FX_MODE_GLITTER 87
|
||||
#define FX_MODE_CANDLE 88
|
||||
#define FX_MODE_BOUNCINGBALLS 89
|
||||
#define FX_MODE_SINELON 90
|
||||
#define FX_MODE_POPCORN 91
|
||||
|
||||
|
||||
class WS2812FX {
|
||||
@ -322,9 +319,6 @@ class WS2812FX {
|
||||
_mode[FX_MODE_TRI_STATIC_PATTERN] = &WS2812FX::mode_tri_static_pattern;
|
||||
_mode[FX_MODE_SPOTS] = &WS2812FX::mode_spots;
|
||||
_mode[FX_MODE_SPOTS_FADE] = &WS2812FX::mode_spots_fade;
|
||||
_mode[FX_MODE_BOUNCINGBALLS] = &WS2812FX::mode_BouncingBalls;
|
||||
_mode[FX_MODE_SINELON] = &WS2812FX::mode_sinelon;
|
||||
_mode[FX_MODE_POPCORN] = &WS2812FX::mode_popcorn;
|
||||
_mode[FX_MODE_GLITTER] = &WS2812FX::mode_glitter;
|
||||
_mode[FX_MODE_CANDLE] = &WS2812FX::mode_candle;
|
||||
|
||||
@ -508,9 +502,6 @@ class WS2812FX {
|
||||
mode_tri_static_pattern(void),
|
||||
mode_spots(void),
|
||||
mode_spots_fade(void),
|
||||
mode_BouncingBalls(void),
|
||||
mode_sinelon(void),
|
||||
mode_popcorn(void),
|
||||
mode_glitter(void),
|
||||
mode_candle(void);
|
||||
|
||||
@ -587,8 +578,7 @@ const char JSON_mode_names[] PROGMEM = R"=====([
|
||||
"Two Dots","Two Areas","Circus","Halloween","Tri Chase","Tri Wipe","Tri Fade","Lightning","ICU","Multi Comet",
|
||||
"Scanner Dual ","Stream 2","Oscillate","Pride 2015","Juggle","Palette","Fire 2012","Colorwaves","Bpm","Fill Noise",
|
||||
"Noise 1","Noise 2","Noise 3","Noise 4","Colortwinkles","Lake","Meteor","Meteor Smooth","Railway","Ripple",
|
||||
"Twinklefox","Twinklecat","Halloween Eyes","Solid Pattern","Solid Pattern Tri","Spots","Spots Fade","Glitter","Candle",
|
||||
"Bouncing Balls", "Sinelon","Popcorn"
|
||||
"Twinklefox","Twinklecat","Halloween Eyes","Solid Pattern","Solid Pattern Tri","Spots","Spots Fade","Glitter","Candle"
|
||||
])=====";
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@
|
||||
|
||||
|
||||
//version code in format yymmddb (b = daily build)
|
||||
#define VERSION 1912232
|
||||
#define VERSION 1912231
|
||||
char versionString[] = "0.9.0-b2";
|
||||
|
||||
|
||||
|
@ -561,7 +561,6 @@ bool applyPreset(byte index, bool loadBri = true, bool loadCol = true, bool load
|
||||
col[j] = EEPROM.read(i+j+2);
|
||||
colSec[j] = EEPROM.read(i+j+6);
|
||||
}
|
||||
strip.setColor(2, EEPROM.read(i+12), EEPROM.read(i+13), EEPROM.read(i+14), EEPROM.read(i+15)); //tertiary color
|
||||
}
|
||||
if (loadFX)
|
||||
{
|
||||
@ -600,12 +599,6 @@ void savePreset(byte index)
|
||||
EEPROM.write(i+10, effectCurrent);
|
||||
EEPROM.write(i+11, effectSpeed);
|
||||
|
||||
uint32_t colTer = strip.getSegment(strip.getMainSegmentId()).colors[2];
|
||||
EEPROM.write(i+12, (colTer >> 16) & 0xFF);
|
||||
EEPROM.write(i+13, (colTer >> 8) & 0xFF);
|
||||
EEPROM.write(i+14, (colTer >> 0) & 0xFF);
|
||||
EEPROM.write(i+15, (colTer >> 24) & 0xFF);
|
||||
|
||||
EEPROM.write(i+16, effectIntensity);
|
||||
EEPROM.write(i+17, effectPalette);
|
||||
} else { //segment 16 can save segments
|
||||
|
Loading…
Reference in New Issue
Block a user