Skip to content

Commit

Permalink
added ability to DisableMonitoring by default for certain controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
computergeek1507 committed Dec 13, 2024
1 parent 09a6a9b commit 0b35e7b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
1 change: 1 addition & 0 deletions controllers/experience.xcontroller
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<SmartRemoteTypes>
<Type>falcon_v2</Type>
</SmartRemoteTypes>
<DisableMonitoring/>
<ConfigDriver>Experience</ConfigDriver>
</AbstractVariant>
<Controller Name="Genius Pixel 8">
Expand Down
3 changes: 3 additions & 0 deletions controllers/hinkspix.xcontroller
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<SupportsAutoLayout/>
<SupportsFullxLightsControl/>
<SupportsDefaultBrightness/>
<DisableMonitoring/>
<PixelProtocols>
<Protocol>ws2811</Protocol>
<Protocol>ws2801</Protocol>
Expand Down Expand Up @@ -56,6 +57,7 @@
<SupportsAutoLayout/>
<SupportsFullxLightsControl/>
<SupportsDefaultBrightness/>
<DisableMonitoring/>
<PixelProtocols>
<Protocol>ws2811</Protocol>
<Protocol>ws2801</Protocol>
Expand Down Expand Up @@ -102,6 +104,7 @@
<SupportsAutoLayout/>
<SupportsFullxLightsControl/>
<SupportsDefaultBrightness/>
<DisableMonitoring/>
<PixelProtocols>
<Protocol>ws2811</Protocol>
<Protocol>ws2801</Protocol>
Expand Down
3 changes: 3 additions & 0 deletions controllers/holidaycoro.xcontroller
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<AllInputUniversesMustBeSameSize/>
<NeedsFullUniverseForSerial/>
<SupportsAutoLayout/>
<DisableMonitoring/>
<PixelProtocols>
<Protocol>ws2811</Protocol>
<Protocol>tm18xx</Protocol>
Expand Down Expand Up @@ -46,6 +47,7 @@
<AllInputUniversesMustBeSameSize/>
<SupportsAutoLayout/>
<NeedsFullUniverseForSerial/>
<DisableMonitoring/>
<PixelProtocols>
<Protocol>ws2811</Protocol>
<Protocol>tm18xx</Protocol>
Expand Down Expand Up @@ -77,6 +79,7 @@
<MaxPixelPortChannels>1020</MaxPixelPortChannels>
<AllInputUniversesMustBeSameSize/>
<SupportsAutoLayout/>
<DisableMonitoring/>
<PixelProtocols>
<Protocol>ws2811</Protocol>
<Protocol>tm18xx</Protocol>
Expand Down
3 changes: 3 additions & 0 deletions xLights/controllers/ControllerCaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,9 @@ std::string ControllerCaps::GetConfigDriver() const
return GetXmlNodeContent(_config, "ConfigDriver", "");
}

bool ControllerCaps::DisableMonitoring() const {
return DoesXmlNodeExist(_config, "DisableMonitoring");
}

std::vector<std::string> ControllerCaps::GetSmartRemoteTypes() const {
if (!SupportsSmartRemotes()) {
Expand Down
1 change: 1 addition & 0 deletions xLights/controllers/ControllerCaps.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class ControllerCaps


std::string GetConfigDriver() const;
bool DisableMonitoring() const;

void Dump() const;

Expand Down
38 changes: 22 additions & 16 deletions xLights/outputs/ControllerEthernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,23 +696,29 @@ void ControllerEthernet::VMVChanged(wxPropertyGrid *grid)
auto c = ControllerCaps::GetControllerConfig(_vendor, _model, _variant);
if (c != nullptr) {
auto const& prefer = c->GetPreferredInputProtocol();
bool autoLayout = IsAutoLayout();
if (!prefer.empty() && autoLayout) {
#ifndef EXCLUDENETWORKUI
if (grid && GetProtocol() != prefer) {
if (_outputs.size() > 0) {
_outputs.front()->RemoveProperties(grid);
}
SetProtocol(prefer);
if (_outputs.size() > 0) {
std::list<wxPGProperty *> expandProperties;
auto before = grid->GetProperty("Managed");
_outputs.front()->AddProperties(grid, before, this, AllSameSize(), expandProperties);
bool const autoLayout = IsAutoLayout();
auto const& disable_monitor = c->DisableMonitoring();
if (disable_monitor) {
SetMonitoring(false);
}
if (autoLayout) {
if (!prefer.empty()) {
#ifndef EXCLUDENETWORKUI
if (grid && GetProtocol() != prefer) {
if (_outputs.size() > 0) {
_outputs.front()->RemoveProperties(grid);
}
SetProtocol(prefer);
if (_outputs.size() > 0) {
std::list<wxPGProperty*> expandProperties;
auto before = grid->GetProperty("Managed");
_outputs.front()->AddProperties(grid, before, this, AllSameSize(), expandProperties);
}
} else
#endif
{
SetProtocol(prefer);
}
} else
#endif
{
SetProtocol(prefer);
}
}
}
Expand Down

0 comments on commit 0b35e7b

Please sign in to comment.