mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Implemented compile capability for MacOS.
Former-commit-id: 86e560e0d4f03251ee08a648ffa6fd9a0e01ae78
This commit is contained in:
@@ -3,12 +3,15 @@
|
||||
#include <leddevice/LedDeviceFactory.h>
|
||||
|
||||
// Local Leddevice includes
|
||||
#include "LedDeviceLpd6803.h"
|
||||
#include "LedDeviceLpd8806.h"
|
||||
#ifdef ENABLE_SPIDEV
|
||||
#include "LedDeviceLpd6803.h"
|
||||
#include "LedDeviceLpd8806.h"
|
||||
#include "LedDeviceWs2801.h"
|
||||
#include "LedDeviceWs2811.h"
|
||||
#endif
|
||||
|
||||
#include "LedDeviceSedu.h"
|
||||
#include "LedDeviceTest.h"
|
||||
#include "LedDeviceWs2801.h"
|
||||
#include "LedDeviceWs2811.h"
|
||||
#include "LedDeviceAdalight.h"
|
||||
#include "LedDevicePaintpack.h"
|
||||
#include "LedDeviceLightpack.h"
|
||||
@@ -22,7 +25,9 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
std::transform(type.begin(), type.end(), type.begin(), ::tolower);
|
||||
|
||||
LedDevice* device = nullptr;
|
||||
if (type == "ws2801" || type == "lightberry")
|
||||
if (false) {}
|
||||
#ifdef ENABLE_SPIDEV
|
||||
else if (type == "ws2801" || type == "lightberry")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
@@ -69,16 +74,6 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
|
||||
device = deviceLpd8806;
|
||||
}
|
||||
else if (type == "sedu")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
|
||||
LedDeviceSedu* deviceSedu = new LedDeviceSedu(output, rate);
|
||||
deviceSedu->open();
|
||||
|
||||
device = deviceSedu;
|
||||
}
|
||||
else if (type == "adalight")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
@@ -89,6 +84,17 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
|
||||
device = deviceAdalight;
|
||||
}
|
||||
#endif
|
||||
else if (type == "sedu")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
|
||||
LedDeviceSedu* deviceSedu = new LedDeviceSedu(output, rate);
|
||||
deviceSedu->open();
|
||||
|
||||
device = deviceSedu;
|
||||
}
|
||||
else if (type == "lightpack")
|
||||
{
|
||||
const std::string output = deviceConfig.get("output", "").asString();
|
||||
|
Reference in New Issue
Block a user