mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
add the new driver to the build factory and Cmake
Former-commit-id: 4d52569525137e3aa029ffa271fea076155c5a66
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "LedDeviceLpd6803.h"
|
||||
#include "LedDeviceLpd8806.h"
|
||||
#include "LedDeviceWs2801.h"
|
||||
#include "LedDeviceP9813.h"
|
||||
#endif
|
||||
|
||||
#include "LedDeviceAdalight.h"
|
||||
@@ -145,6 +146,16 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
|
||||
device = deviceWs2812b;
|
||||
}
|
||||
else if (type == "p9813")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
|
||||
LedDeviceP9813* deviceP9813 = new LedDeviceP9813(output, rate);
|
||||
deviceP9813->open();
|
||||
|
||||
device = deviceP9813;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Unable to create device " << type << std::endl;
|
||||
|
Reference in New Issue
Block a user