Skip to content

Commit

Permalink
Only reset all outputs of full xLights control
Browse files Browse the repository at this point in the history
  • Loading branch information
cybercop23 committed Jan 9, 2025
1 parent 89e9495 commit 64a7370
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions xLights/controllers/ESPixelStick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,11 +464,15 @@ bool ESPixelStick::SetOutputsV4(ModelManager* allmodels, OutputManager* outputMa

GetOutputConfig(outputConfig);

if (outputConfig.HasMember("channels")) {
wxJSONValue& channels = outputConfig["channels"];
for (const auto& key : channels.GetMemberNames()) {
wxJSONValue& channel = channels[key];
if (channel.HasMember("type")) channel["type"] = 0; // disable all outputs, since used ones will be re-enabled next
if (controller->IsFullxLightsControl()) {
if (outputConfig.HasMember("channels")) {
wxJSONValue& channels = outputConfig["channels"];
for (const auto& key : channels.GetMemberNames()) {
wxJSONValue& channel = channels[key];
if (channel.HasMember("type"))
channel["type"] = 0; // disable all outputs, since used ones will be re-enabled next
}
changed = true;
}
}

Expand Down

0 comments on commit 64a7370

Please sign in to comment.