mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Details coming soon.
This commit is contained in:
@@ -21,7 +21,7 @@ ProviderUdp::ProviderUdp()
|
||||
, _defaultHost("127.0.0.1")
|
||||
{
|
||||
_latchTime_ms = 1;
|
||||
_udpSocket = new QUdpSocket();
|
||||
_udpSocket = new QUdpSocket(this);
|
||||
}
|
||||
|
||||
ProviderUdp::~ProviderUdp()
|
||||
@@ -34,7 +34,7 @@ bool ProviderUdp::init(const QJsonObject &deviceConfig)
|
||||
LedDevice::init(deviceConfig);
|
||||
|
||||
QString host = deviceConfig["host"].toString(_defaultHost);
|
||||
|
||||
|
||||
if (_address.setAddress(host) )
|
||||
{
|
||||
Debug( _log, "Successfully parsed %s as an ip address.", deviceConfig["host"].toString().toStdString().c_str());
|
||||
@@ -57,9 +57,9 @@ bool ProviderUdp::init(const QJsonObject &deviceConfig)
|
||||
{
|
||||
throw std::runtime_error("invalid target port");
|
||||
}
|
||||
|
||||
|
||||
Debug( _log, "UDP using %s:%d", _address.toString().toStdString().c_str() , _port );
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -1,11 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <QUdpSocket>
|
||||
|
||||
// Hyperion includes
|
||||
#include <leddevice/LedDevice.h>
|
||||
#include <utils/Logger.h>
|
||||
|
||||
// qt
|
||||
#include <QHostAddress>
|
||||
|
||||
class QUdpSocket;
|
||||
|
||||
///
|
||||
/// The ProviderUdp implements an abstract base-class for LedDevices using UDP packets.
|
||||
///
|
||||
|
Reference in New Issue
Block a user