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:
@@ -25,15 +25,12 @@ UDPListener::UDPListener(const int priority, const int timeout, const QString& a
|
||||
_bondage(shared ? QAbstractSocket::ShareAddress : QAbstractSocket::DefaultForPlatform)
|
||||
{
|
||||
_server = new QUdpSocket(this);
|
||||
_listenAddress = address.isEmpty()
|
||||
? QHostAddress::AnyIPv4
|
||||
: QHostAddress(address);
|
||||
_listenAddress = address.isEmpty()? QHostAddress::AnyIPv4 : QHostAddress(address);
|
||||
|
||||
// Set trigger for incoming connections
|
||||
connect(_server, SIGNAL(readyRead()), this, SLOT(readPendingDatagrams()));
|
||||
|
||||
_hyperion->registerPriority("UDPLISTENER", _priority);
|
||||
|
||||
_hyperion->registerPriority("UDPLISTENER", _priority);
|
||||
}
|
||||
|
||||
UDPListener::~UDPListener()
|
||||
@@ -84,11 +81,15 @@ void UDPListener::stop()
|
||||
|
||||
void UDPListener::componentStateChanged(const hyperion::Components component, bool enable)
|
||||
{
|
||||
if (component == COMP_UDPLISTENER && _isActive != enable)
|
||||
if (component == COMP_UDPLISTENER)
|
||||
{
|
||||
if (enable) start();
|
||||
else stop();
|
||||
Info(_log, "change state to %s", (enable ? "enabled" : "disabled") );
|
||||
if (_isActive != enable)
|
||||
{
|
||||
if (enable) start();
|
||||
else stop();
|
||||
Info(_log, "change state to %s", (enable ? "enabled" : "disabled") );
|
||||
}
|
||||
_hyperion->getComponentRegister().componentStateChanged(component, enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user