From 3aad2459ebf3c76492a36ccf1fc6d8666a9930ed Mon Sep 17 00:00:00 2001 From: Jason Millard Date: Wed, 10 Sep 2025 18:15:22 -0400 Subject: [PATCH] misc: fix static effects not working (thx @winxi01) --- include/DOF/DOF.h | 2 +- src/cab/toys/layer/AnalogAlphaToy.cpp | 4 ---- src/ledcontrol/setup/Configurator.cpp | 8 ++------ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/include/DOF/DOF.h b/include/DOF/DOF.h index e7ec981..b21aa35 100644 --- a/include/DOF/DOF.h +++ b/include/DOF/DOF.h @@ -2,7 +2,7 @@ #define LIBDOF_VERSION_MAJOR 0 // X Digits #define LIBDOF_VERSION_MINOR 4 // Max 2 Digits -#define LIBDOF_VERSION_PATCH 2 // Max 2 Digits +#define LIBDOF_VERSION_PATCH 3 // Max 2 Digits #define _LIBDOF_STR(x) #x #define LIBDOF_STR(x) _LIBDOF_STR(x) diff --git a/src/cab/toys/layer/AnalogAlphaToy.cpp b/src/cab/toys/layer/AnalogAlphaToy.cpp index c84823b..8eef5a2 100644 --- a/src/cab/toys/layer/AnalogAlphaToy.cpp +++ b/src/cab/toys/layer/AnalogAlphaToy.cpp @@ -89,20 +89,16 @@ int AnalogAlphaToy::GetResultingValue() for (int layerNumber : layerNumbers) { AnalogAlpha* layer = m_layers.GetLayer(layerNumber, 1); - Log::Debug(StringExtensions::Build("Layer {0}: layer={1}", std::to_string(layerNumber), StringExtensions::ToAddressString(layer))); if (layer != nullptr) { const AnalogAlpha& layerValue = layer[0]; int alpha = layerValue.GetAlpha(); int val = layerValue.GetValue(); - Log::Debug(StringExtensions::Build("Layer {0}: alpha={1}, value={2}", std::to_string(layerNumber), std::to_string(alpha), std::to_string(val))); if (alpha != 0) { float oldValue = AlphaMappingTable::AlphaMapping[255 - alpha][static_cast(value)]; float newValue = AlphaMappingTable::AlphaMapping[alpha][layerValue.GetValue()]; value = oldValue + newValue; - Log::Debug(StringExtensions::Build( - "Alpha blend: alpha={0}, oldVal={1}, newVal={2}, result={3}", std::to_string(alpha), std::to_string(oldValue), std::to_string(newValue), std::to_string(value))); } } } diff --git a/src/ledcontrol/setup/Configurator.cpp b/src/ledcontrol/setup/Configurator.cpp index e6b6587..8600dc4 100644 --- a/src/ledcontrol/setup/Configurator.cpp +++ b/src/ledcontrol/setup/Configurator.cpp @@ -908,12 +908,8 @@ void Configurator::SetupTable( switch (tcs->GetOutputControl()) { case OutputControlEnum::FixedOn: - { - std::vector tableElementDescriptors; - tableElementDescriptors.push_back(StringExtensions::Build("{0}.{1}.{2}", std::to_string(ledWizNr), std::to_string(tcc->GetNumber()), std::to_string(settingNumber))); - AssignEffectToTableElements(table, tableElementDescriptors, finalEffect); - } - break; + table->GetAssignedStaticEffects()->Add(finalEffect->GetName()); + break; case OutputControlEnum::Controlled: if (!StringExtensions::IsNullOrWhiteSpace(tcs->GetTableElement())) {