Skip to content

Commit 0eef10b

Browse files
authored
Merge pull request #132 from Legion2/remove-CorsairLightingNodePRO
Remove class CorsairLightingNodePRO
2 parents ae284f2 + 9bc6d91 commit 0eef10b

File tree

5 files changed

+17
-90
lines changed

5 files changed

+17
-90
lines changed

examples/LightingNodePRO/LightingNodePRO.ino

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,31 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
#include <CorsairLightingNodePRO.h>
16+
#include <CorsairLightingProtocol.h>
1717
#include <FastLED.h>
1818

1919
#define DATA_PIN_CHANNEL_1 2
2020
#define DATA_PIN_CHANNEL_2 3
2121

22-
CorsairLightingNodePRO cLNP;
22+
CRGB ledsChannel1[96];
23+
CRGB ledsChannel2[96];
24+
25+
CorsairLightingFirmware firmware = corsairLightingNodePROFirmware();
26+
FastLEDController ledController(true);
27+
CorsairLightingProtocolController cLP(&ledController, &firmware);
28+
CorsairLightingProtocolHID cHID(&cLP);
2329

2430
void setup() {
25-
CLP::disableBuildInLEDs();
26-
auto ledController = cLNP.getFastLEDController();
27-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledController->getLEDs(0), ledController->getLEDCount(0));
28-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledController->getLEDs(1), ledController->getLEDCount(1));
31+
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 96);
32+
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 96);
33+
ledController.addLEDs(0, ledsChannel1, 96);
34+
ledController.addLEDs(1, ledsChannel2, 96);
2935
}
3036

3137
void loop() {
32-
cLNP.update();
38+
cHID.update();
39+
40+
if (ledController.updateLEDs()) {
41+
FastLED.show();
42+
}
3343
}

keywords.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Datatypes (KEYWORD1)
77
#######################################
88

9-
CorsairLightingNodePRO KEYWORD1
109
ILEDController KEYWORD1
1110
LEDController KEYWORD1
1211
FastLEDController KEYWORD1

src/CorsairLightingNodePRO.cpp

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/CorsairLightingNodePRO.h

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/CorsairLightingProtocol.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "CLPAdditionalFeatures.h"
2323
#include "CLPUtils.h"
2424
#include "CorsairLightingFirmware.h"
25-
#include "CorsairLightingNodePRO.h"
2625
#include "CorsairLightingProtocolConstants.h"
2726
#include "CorsairLightingProtocolController.h"
2827
#include "CorsairLightingProtocolHID.h"

0 commit comments

Comments
 (0)