refactor: Led layout, clearAll (#703)

* add SSDP name field

* YALL - yet another led layout

* led layout migration

* add initial vscode config

* merge clearAll with clear, rename Hyperion::compStateChange

* simpler components api

* Corrected code formatting

+ triggered PR build

* fix: regression from #636

* Support for color patterns

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
brindosch
2020-02-26 18:54:56 +01:00
committed by GitHub
parent ef51d28463
commit 8db85c9a5a
47 changed files with 656 additions and 738 deletions

View File

@@ -32,7 +32,7 @@ BlackBorderProcessor::BlackBorderProcessor(Hyperion* hyperion, QObject* parent)
connect(_hyperion, &Hyperion::settingsChanged, this, &BlackBorderProcessor::handleSettingsUpdate);
// listen for component state changes
connect(_hyperion, &Hyperion::componentStateChanged, this, &BlackBorderProcessor::componentStateChanged);
connect(_hyperion, &Hyperion::compStateChangeRequest, this, &BlackBorderProcessor::handleCompStateChangeRequest);
}
BlackBorderProcessor::~BlackBorderProcessor()
@@ -65,11 +65,11 @@ void BlackBorderProcessor::handleSettingsUpdate(const settings::type& type, cons
Debug(Logger::getInstance("BLACKBORDER"), "Set mode to: %s", QSTRING_CSTR(_detectionMode));
// eval the comp state
componentStateChanged(hyperion::COMP_BLACKBORDER, obj["enable"].toBool(true));
handleCompStateChangeRequest(hyperion::COMP_BLACKBORDER, obj["enable"].toBool(true));
}
}
void BlackBorderProcessor::componentStateChanged(const hyperion::Components component, bool enable)
void BlackBorderProcessor::handleCompStateChangeRequest(const hyperion::Components component, bool enable)
{
if(component == hyperion::COMP_BLACKBORDER)
{
@@ -85,7 +85,7 @@ void BlackBorderProcessor::componentStateChanged(const hyperion::Components comp
_enabled = enable;
}
_hyperion->getComponentRegister().componentStateChanged(hyperion::COMP_BLACKBORDER, enable);
_hyperion->setNewComponentState(hyperion::COMP_BLACKBORDER, enable);
}
}