Skip 1st fix, save LED count, removed reverse.
This commit is contained in:
parent
77dee439e6
commit
d60506a75d
@ -140,13 +140,13 @@ class BusDigital : public Bus {
|
|||||||
|
|
||||||
void setPixelColor(uint16_t pix, uint32_t c) {
|
void setPixelColor(uint16_t pix, uint32_t c) {
|
||||||
if (reversed) pix = _len - pix -1;
|
if (reversed) pix = _len - pix -1;
|
||||||
pix += _skip;
|
else pix += _skip;
|
||||||
PolyBus::setPixelColor(_busPtr, _iType, pix, c, _colorOrder);
|
PolyBus::setPixelColor(_busPtr, _iType, pix, c, _colorOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getPixelColor(uint16_t pix) {
|
uint32_t getPixelColor(uint16_t pix) {
|
||||||
if (reversed) pix = _len - pix -1;
|
if (reversed) pix = _len - pix -1;
|
||||||
pix += _skip;
|
else pix += _skip;
|
||||||
return PolyBus::getPixelColor(_busPtr, _iType, pix, _colorOrder);
|
return PolyBus::getPixelColor(_busPtr, _iType, pix, _colorOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,7 +350,6 @@
|
|||||||
<option value="2">Linear (never wrap)</option>
|
<option value="2">Linear (never wrap)</option>
|
||||||
<option value="3">None (not recommended)</option>
|
<option value="3">None (not recommended)</option>
|
||||||
</select><br>
|
</select><br>
|
||||||
Reverse LED order (rotate 180): <input type="checkbox" name="RV"><br>
|
|
||||||
Skip first LED: <input type="checkbox" name="SL"><br>
|
Skip first LED: <input type="checkbox" name="SL"><br>
|
||||||
<span class="wc">
|
<span class="wc">
|
||||||
Auto-calculate white channel from RGB:<br>
|
Auto-calculate white channel from RGB:<br>
|
||||||
|
@ -134,9 +134,8 @@ required><br>Mode: <select name="TW"><option value="0">Wait and set</option>
|
|||||||
value="3">Sunrise</option></select><h3>Advanced</h3>Palette blending: <select
|
value="3">Sunrise</option></select><h3>Advanced</h3>Palette blending: <select
|
||||||
name="PB"><option value="0">Linear (wrap if moving)</option><option value="1">
|
name="PB"><option value="0">Linear (wrap if moving)</option><option value="1">
|
||||||
Linear (always wrap)</option><option value="2">Linear (never wrap)</option>
|
Linear (always wrap)</option><option value="2">Linear (never wrap)</option>
|
||||||
<option value="3">None (not recommended)</option></select><br>
|
<option value="3">None (not recommended)</option></select><br>Skip first LED:
|
||||||
Reverse LED order (rotate 180): <input type="checkbox" name="RV"><br>
|
<input type="checkbox" name="SL"><br><span class="wc">
|
||||||
Skip first LED: <input type="checkbox" name="SL"><br><span class="wc">
|
|
||||||
Auto-calculate white channel from RGB:<br><select name="AW"><option value="0">
|
Auto-calculate white channel from RGB:<br><select name="AW"><option value="0">
|
||||||
None</option><option value="1">Brighter</option><option value="2">Accurate
|
None</option><option value="1">Brighter</option><option value="2">Accurate
|
||||||
</option><option value="3">Dual</option><option value="4">Legacy</option>
|
</option><option value="3">Dual</option><option value="4">Legacy</option>
|
||||||
|
@ -126,14 +126,14 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
|||||||
}
|
}
|
||||||
colorOrder = request->arg(co).toInt();
|
colorOrder = request->arg(co).toInt();
|
||||||
start = (request->hasArg(ls)) ? request->arg(ls).toInt() : 0;
|
start = (request->hasArg(ls)) ? request->arg(ls).toInt() : 0;
|
||||||
ledCount += length;
|
// ledCount += length;
|
||||||
|
|
||||||
// actual finalization is done in loop()
|
// actual finalization is done in loop()
|
||||||
if (busConfigs[s] != nullptr) delete busConfigs[s];
|
if (busConfigs[s] != nullptr) delete busConfigs[s];
|
||||||
busConfigs[s] = new BusConfig(type, pins, start, length, colorOrder, request->hasArg(cv), skipFirstLed);
|
busConfigs[s] = new BusConfig(type, pins, start, length, colorOrder, request->hasArg(cv), skipFirstLed);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ledCount = request->arg(F("LC")).toInt();
|
ledCount = request->arg(F("LC")).toInt();
|
||||||
// if (t > 0 && t <= MAX_LEDS) ledCount = t;
|
// if (t > 0 && t <= MAX_LEDS) ledCount = t;
|
||||||
//DMA method uses too much ram, TODO: limit!
|
//DMA method uses too much ram, TODO: limit!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user