Segment API

- moved all drawing logic to segment
- moved transitions to segment
Conditional 2D compile.
Rearranged effect IDs.
Implemented dynamic effect arrays.
This commit is contained in:
Blaz Kristan
2022-07-10 22:23:25 +02:00
parent f0992d56c1
commit d9f2c2b968
17 changed files with 1473 additions and 1401 deletions

View File

@@ -91,6 +91,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
Bus::setCCTBlend(strip.cctBlending);
strip.setTargetFps(hw_led["fps"]); //NOP if 0, default 42 FPS
#ifndef WLED_DISABLE_2D
// 2D Matrix Settings
JsonObject matrix = hw_led[F("matrix")];
if (!matrix.isNull()) {
@@ -125,6 +126,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
strip.setUpMatrix();
}
#endif
JsonArray ins = hw_led["ins"];
@@ -620,6 +622,7 @@ void serializeConfig() {
hw_led["fps"] = strip.getTargetFps();
hw_led[F("rgbwm")] = Bus::getAutoWhiteMode(); // global override
#ifndef WLED_DISABLE_2D
// 2D Matrix Settings
if (strip.isMatrix) {
JsonObject matrix = hw_led.createNestedObject(F("matrix"));
@@ -641,6 +644,7 @@ void serializeConfig() {
pnl["s"] = strip.panel[i].serpentine;
}
}
#endif
JsonArray hw_led_ins = hw_led.createNestedArray("ins");