mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Threading and more
- webui remove restarts - threading for LedDevice
This commit is contained in:
@@ -7,10 +7,11 @@
|
||||
|
||||
// Leddevice includes
|
||||
#include <leddevice/LedDeviceFactory.h>
|
||||
#include <leddevice/LedDeviceWrapper.h>
|
||||
#include <utils/Logger.h>
|
||||
#include <leddevice/LedDevice.h>
|
||||
|
||||
// following file is auto generated by cmake! it contains all available leddevice headers
|
||||
// autogen
|
||||
#include "LedDevice_headers.h"
|
||||
|
||||
LedDevice * LedDeviceFactory::construct(const QJsonObject & deviceConfig)
|
||||
@@ -21,14 +22,7 @@ LedDevice * LedDeviceFactory::construct(const QJsonObject & deviceConfig)
|
||||
|
||||
QString type = deviceConfig["type"].toString("UNSPECIFIED").toLower();
|
||||
|
||||
#define REGISTER(className) LedDevice::addToDeviceMap(QString(#className).toLower(), LedDevice##className::construct);
|
||||
|
||||
// the REGISTER() calls are autogenerated by cmake.
|
||||
#include "LedDevice_register.cpp"
|
||||
|
||||
#undef REGISTER
|
||||
|
||||
const LedDeviceRegistry& devList = LedDevice::getDeviceMap();
|
||||
const LedDeviceRegistry& devList = LedDeviceWrapper::getDeviceMap();
|
||||
LedDevice* device = nullptr;
|
||||
try
|
||||
{
|
||||
@@ -56,7 +50,5 @@ LedDevice * LedDeviceFactory::construct(const QJsonObject & deviceConfig)
|
||||
device = LedDeviceFile::construct(QJsonObject());
|
||||
}
|
||||
|
||||
device->open();
|
||||
|
||||
return device;
|
||||
}
|
||||
|
Reference in New Issue
Block a user