mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Add "enable" to forwarder, fix udp listener (#91)
* Add "enable" to forwarder fix udp listener - address and port parsing was broken * updated example configs * updated example config with comments
This commit is contained in:
@@ -522,7 +522,7 @@ LedDevice * Hyperion::createColorSmoothing(const Json::Value & smoothingConfig,
|
||||
MessageForwarder * Hyperion::createMessageForwarder(const Json::Value & forwarderConfig)
|
||||
{
|
||||
MessageForwarder * forwarder = new MessageForwarder();
|
||||
if ( ! forwarderConfig.isNull() )
|
||||
if ( ( ! forwarderConfig.isNull() ) && ( forwarderConfig.get("enable", true).asBool() ) )
|
||||
{
|
||||
if ( ! forwarderConfig["json"].isNull() && forwarderConfig["json"].isArray() )
|
||||
{
|
||||
|
@@ -20,10 +20,11 @@ UDPListener::UDPListener(const int priority, const int timeout, const std::strin
|
||||
_ledColors(Hyperion::getInstance()->getLedCount(), ColorRgb::BLACK),
|
||||
_log(Logger::getInstance("UDPLISTENER")),
|
||||
_isActive(false),
|
||||
_listenPort(listenPort),
|
||||
_bondage(shared ? QAbstractSocket::ShareAddress : QAbstractSocket::DefaultForPlatform)
|
||||
{
|
||||
_server = new QUdpSocket(this);
|
||||
QHostAddress listenAddress = address.empty()
|
||||
_listenAddress = address.empty()
|
||||
? QHostAddress::AnyIPv4
|
||||
: QHostAddress( QString::fromStdString(address) );
|
||||
|
||||
|
Reference in New Issue
Block a user