mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Webui: extend led hardware config + connection lost page (#226)
* split content and js tune leds config * implement connection lost page * split js/html in huebridge * add js action for connection lost * extend led config make connection loss nicer * tune led code add menu entry for grabber * more tuning of webui * switch back to botstrap textarea add v4l to components * add icon * extend schema for jsoneditor * implement ledcolors streaming with 4fps * implement component state
This commit is contained in:
@@ -17,6 +17,7 @@ GrabberWrapper::GrabberWrapper(std::string grabberName, const int priority, hype
|
||||
_timer.setSingleShot(false);
|
||||
|
||||
_forward = _hyperion->getForwarder()->protoForwardingEnabled();
|
||||
_hyperion->getComponentRegister().componentStateChanged(hyperion::COMP_BLACKBORDER, _processor->blackBorderDetectorEnabled());
|
||||
connect(_hyperion, SIGNAL(componentStateChanged(hyperion::Components,bool)), this, SLOT(componentStateChanged(hyperion::Components,bool)));
|
||||
connect(&_timer, SIGNAL(timeout()), this, SLOT(action()));
|
||||
|
||||
@@ -45,27 +46,36 @@ void GrabberWrapper::stop()
|
||||
|
||||
void GrabberWrapper::componentStateChanged(const hyperion::Components component, bool enable)
|
||||
{
|
||||
if (component == _grabberComponentId && _timer.isActive() != enable)
|
||||
if (component == _grabberComponentId)
|
||||
{
|
||||
if (enable) start();
|
||||
else stop();
|
||||
|
||||
_forward = _hyperion->getForwarder()->protoForwardingEnabled();
|
||||
|
||||
if ( enable == _timer.isActive() )
|
||||
if (_timer.isActive() != enable)
|
||||
{
|
||||
Info(_log, "grabber change state to %s", (_timer.isActive() ? "enabled" : "disabled") );
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIf( enable, _log, "enable grabber failed");
|
||||
if (enable) start();
|
||||
else stop();
|
||||
|
||||
_forward = _hyperion->getForwarder()->protoForwardingEnabled();
|
||||
|
||||
|
||||
if ( enable == _timer.isActive() )
|
||||
{
|
||||
Info(_log, "grabber change state to %s", (_timer.isActive() ? "enabled" : "disabled") );
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIf( enable, _log, "enable grabber failed");
|
||||
}
|
||||
}
|
||||
_hyperion->getComponentRegister().componentStateChanged(component, _timer.isActive());
|
||||
}
|
||||
|
||||
if (component == hyperion::COMP_BLACKBORDER && _processor->blackBorderDetectorEnabled() != enable)
|
||||
if (component == hyperion::COMP_BLACKBORDER)
|
||||
{
|
||||
_processor->enableBlackBorderDetector(enable);
|
||||
Info(_log, "bb detector change state to %s", (_processor->blackBorderDetectorEnabled() ? "enabled" : "disabled") );
|
||||
if (_processor->blackBorderDetectorEnabled() != enable)
|
||||
{
|
||||
_processor->enableBlackBorderDetector(enable);
|
||||
Info(_log, "bb detector change state to %s", (_processor->blackBorderDetectorEnabled() ? "enabled" : "disabled") );
|
||||
}
|
||||
_hyperion->getComponentRegister().componentStateChanged(component, _processor->blackBorderDetectorEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user