This repository was archived by the owner on May 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,16 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
63
63
64
64
device = deviceLpd8806;
65
65
}
66
+ else if (type == " p9813" )
67
+ {
68
+ const std::string output = deviceConfig[" output" ].asString ();
69
+ const unsigned rate = deviceConfig[" rate" ].asInt ();
70
+
71
+ LedDeviceP9813* deviceP9813 = new LedDeviceP9813 (output, rate);
72
+ deviceP9813->open ();
73
+
74
+ device = deviceP9813;
75
+ }
66
76
else if (type == " ws2801" || type == " lightberry" )
67
77
{
68
78
const std::string output = deviceConfig[" output" ].asString ();
@@ -146,16 +156,6 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
146
156
147
157
device = deviceWs2812b;
148
158
}
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
- }
159
159
else
160
160
{
161
161
std::cout << " Unable to create device " << type << std::endl;
You can’t perform that action at this time.
0 commit comments