mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
every input sources trackes now its priority and ID to hyperion core
ATM all input sources except inputs via proto are tracked
This commit is contained in:
@@ -22,15 +22,15 @@
|
||||
// project includes
|
||||
#include "BoblightClientConnection.h"
|
||||
|
||||
BoblightClientConnection::BoblightClientConnection(QTcpSocket *socket, const int priority, Hyperion * hyperion)
|
||||
BoblightClientConnection::BoblightClientConnection(QTcpSocket *socket, const int priority)
|
||||
: QObject()
|
||||
, _locale(QLocale::C)
|
||||
, _socket(socket)
|
||||
, _imageProcessor(ImageProcessorFactory::getInstance().newImageProcessor())
|
||||
, _hyperion(hyperion)
|
||||
, _hyperion(Hyperion::getInstance())
|
||||
, _receiveBuffer()
|
||||
, _priority(priority)
|
||||
, _ledColors(hyperion->getLedCount(), ColorRgb::BLACK)
|
||||
, _ledColors(Hyperion::getInstance()->getLedCount(), ColorRgb::BLACK)
|
||||
, _log(Logger::getInstance("BOBLIGHT"))
|
||||
{
|
||||
// initalize the locale. Start with the default C-locale
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
/// @param socket The Socket object for this connection
|
||||
/// @param hyperion The Hyperion server
|
||||
///
|
||||
BoblightClientConnection(QTcpSocket * socket, const int priority, Hyperion * hyperion);
|
||||
BoblightClientConnection(QTcpSocket * socket, const int priority);
|
||||
|
||||
///
|
||||
/// Destructor
|
||||
|
@@ -37,6 +37,9 @@ void BoblightServer::start()
|
||||
|
||||
_isActive = true;
|
||||
emit statusChanged(_isActive);
|
||||
|
||||
_hyperion->registerPriority("Boblight", _priority);
|
||||
|
||||
}
|
||||
|
||||
void BoblightServer::stop()
|
||||
@@ -49,6 +52,9 @@ void BoblightServer::stop()
|
||||
}
|
||||
_isActive = false;
|
||||
emit statusChanged(_isActive);
|
||||
|
||||
_hyperion->unRegisterPriority("Boblight");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +70,7 @@ void BoblightServer::newConnection()
|
||||
if (socket != nullptr)
|
||||
{
|
||||
Info(_log, "new connection");
|
||||
BoblightClientConnection * connection = new BoblightClientConnection(socket, _priority, _hyperion);
|
||||
BoblightClientConnection * connection = new BoblightClientConnection(socket, _priority);
|
||||
_openConnections.insert(connection);
|
||||
|
||||
// register slot for cleaning up after the connection closed
|
||||
|
Reference in New Issue
Block a user