Remove G and S options (only segment properties now)

This commit is contained in:
cschwinne 2020-01-14 10:59:57 +01:00
parent ae6ba79f1e
commit 081a6888fa
7 changed files with 7 additions and 25 deletions

Binary file not shown.

View File

@ -123,6 +123,8 @@ Color order:
<option value=1>RGB</option>
<option value=2>BRG</option>
<option value=3>RBG</option>
<option value=4>BGR</option>
<option value=5>GBR</option>
</select>
<h3>Defaults</h3>
Turn LEDs on after power up/reset: <input type=checkbox name=BO><br>
@ -150,10 +152,7 @@ Palette blending:
<option value=3>None (not recommended)</option>
</select><br>
Reverse LED order (rotate 180): <input type=checkbox name=RV><br>
Skip first LED: <input type=checkbox name=SL><br>
LED spacing: <input type=number min=0 max=255 name=SP><br>
(Turns off N LEDs between each lit one, spacing out effects)<br>
LED grouping: <input type=number min=1 max=255 name=GR><hr>
Skip first LED: <input type=checkbox name=SL><hr>
<button type=button onclick=B()>Back</button><button type=submit>Save</button>
</form></body></html>)=====";

View File

@ -98,7 +98,7 @@
//version code in format yymmddb (b = daily build)
#define VERSION 2001051
#define VERSION 2001071
char versionString[] = "0.9.0-b2";
@ -149,8 +149,6 @@ bool enableSecTransition = true; //also enable transition for secon
uint16_t transitionDelay = 750; //default crossfade duration in ms
bool skipFirstLed = false; //ignore first LED in strip (useful if you need the LED as signal repeater)
uint8_t spacing = 0; //disables N LEDs between active nodes. (Useful for spacing out lights for more traditional christmas light look)
uint8_t group = 1; //Group LEDs into one logical LED
byte briMultiplier = 100; //% of brightness to set (to limit power, if you set it to 50 and set bri to 255, actual brightness will be 127)

View File

@ -230,9 +230,6 @@ void saveSettingsToEEPROM()
saveCurrPresetCycConf = false;
}
EEPROM.write(2213, spacing);
EEPROM.write(2214, group);
writeStringToEEPROM(2220, blynkApiKey, 35);
for (int i = 0; i < 8; ++i)
@ -491,9 +488,6 @@ void loadSettingsFromEEPROM(bool first)
presetApplyFx = EEPROM.read(2212);
}
spacing = EEPROM.read(2213);
group = max(1, EEPROM.read(2214));
bootPreset = EEPROM.read(389);
wifiLock = EEPROM.read(393);
utcOffsetSecs = EEPROM.read(394) + ((EEPROM.read(395) << 8) & 0xFF00);

View File

@ -237,8 +237,6 @@ void getSettingsJS(byte subPage, char* dest)
sappend('i',"PB",strip.paletteBlend);
sappend('c',"RV",strip.reverseMode);
sappend('c',"SL",skipFirstLed);
sappend('v',"SP",spacing);
sappend('v',"GR",group);
}
if (subPage == 3)

View File

@ -104,8 +104,6 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
if (t >= 0 && t < 4) strip.paletteBlend = t;
strip.reverseMode = request->hasArg("RV");
skipFirstLed = request->hasArg("SL");
spacing = request->arg("SP").toInt();
group = request->arg("GR").toInt();
t = request->arg("BF").toInt();
if (t > 0) briMultiplier = t;
}
@ -291,7 +289,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
}
if (subPage != 6 || !doReboot) saveSettingsToEEPROM(); //do not save if factory reset
if (subPage == 2) {
strip.init(useRGBW,ledCount,group,spacing,skipFirstLed);
strip.init(useRGBW,ledCount,skipFirstLed);
}
if (subPage == 4) alexaInit();
}
@ -392,7 +390,7 @@ bool handleSet(AsyncWebServerRequest *request, const String& req)
if (pos > 0) {
stopI = getNumVal(&req, pos);
}
strip.setSegment(main, startI, stopI, 1, 0);
strip.setSegment(main, startI, stopI);
main = strip.getMainSegmentId();

View File

@ -8,11 +8,6 @@ void wledInit()
ledCount = EEPROM.read(229) + ((EEPROM.read(398) << 8) & 0xFF00);
if (ledCount > MAX_LEDS || ledCount == 0) ledCount = 30;
spacing = EEPROM.read(2213);
//this was reading 255 after inital flash causing bootloop. Don't know why.
spacing = spacing!= 255 ? spacing : 0;
group = max(1, EEPROM.read(2214));
#ifdef ESP8266
#if LEDPIN == 3
if (ledCount > MAX_LEDS_DMA) ledCount = MAX_LEDS_DMA; //DMA method uses too much ram
@ -31,7 +26,7 @@ void wledInit()
DEBUG_PRINT("heap ");
DEBUG_PRINTLN(ESP.getFreeHeap());
strip.init(EEPROM.read(372),ledCount,group,spacing,EEPROM.read(2204)); //init LEDs quickly
strip.init(EEPROM.read(372),ledCount,EEPROM.read(2204)); //init LEDs quickly
strip.setBrightness(0);
DEBUG_PRINT("LEDs inited. heap usage ~");