This repository was archived by the owner on May 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,15 @@ if(ENABLE_SPIDEV)
55
55
${CURRENT_SOURCE_DIR} /LedDeviceLpd6803.h
56
56
${CURRENT_SOURCE_DIR} /LedDeviceLpd8806.h
57
57
${CURRENT_SOURCE_DIR} /LedDeviceWs2801.h
58
+ ${CURRENT_SOURCE_DIR} /LedDeviceP9813.h
58
59
)
59
60
SET (Leddevice_SOURCES
60
61
${Leddevice_SOURCES}
61
62
${CURRENT_SOURCE_DIR} /LedSpiDevice.cpp
62
63
${CURRENT_SOURCE_DIR} /LedDeviceLpd6803.cpp
63
64
${CURRENT_SOURCE_DIR} /LedDeviceLpd8806.cpp
64
65
${CURRENT_SOURCE_DIR} /LedDeviceWs2801.cpp
66
+ ${CURRENT_SOURCE_DIR} /LedDeviceP9813.cpp
65
67
)
66
68
endif (ENABLE_SPIDEV )
67
69
Original file line number Diff line number Diff line change 10
10
#include " LedDeviceLpd6803.h"
11
11
#include " LedDeviceLpd8806.h"
12
12
#include " LedDeviceWs2801.h"
13
+ #include " LedDeviceP9813.h"
13
14
#endif
14
15
15
16
#include " LedDeviceAdalight.h"
@@ -145,6 +146,16 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
145
146
146
147
device = deviceWs2812b;
147
148
}
149
+ else if (type == " p9813" )
150
+ {
151
+ const std::string output = deviceConfig[" output" ].asString ();
152
+ const unsigned rate = deviceConfig[" rate" ].asInt ();
153
+
154
+ LedDeviceP9813* deviceP9813 = new LedDeviceP9813 (output, rate);
155
+ deviceP9813->open ();
156
+
157
+ device = deviceP9813;
158
+ }
148
159
else
149
160
{
150
161
std::cout << " Unable to create device " << type << std::endl;
You can’t perform that action at this time.
0 commit comments