Skip to content

Commit a0e5455

Browse files
authored
Merge pull request #139 from Legion2/dev
Version 0.12.0
2 parents ae284f2 + 10f31fa commit a0e5455

File tree

22 files changed

+411
-343
lines changed

22 files changed

+411
-343
lines changed

.github/workflows/documentation.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
name: Create Documentation
1+
name: Deploy Documentation
22

3-
on:
3+
on:
44
push:
55
branches:
6-
- dev
6+
- dev
77

88
jobs:
99
doxygen:
10-
1110
runs-on: ubuntu-latest
12-
11+
1312
steps:
14-
- uses: actions/checkout@v1
15-
- name: Install doxygen
16-
run: sudo apt install doxygen graphviz
17-
- name: Run doxygen
18-
run: doxygen extra/doxygen.conf
19-
- name: Deploy to gh-pages
20-
uses: peaceiris/[email protected]
21-
env:
22-
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
23-
PUBLISH_BRANCH: gh-pages
24-
PUBLISH_DIR: doxygen/html
13+
- uses: actions/checkout@v1
14+
- name: Install doxygen
15+
run: sudo apt install doxygen graphviz
16+
- name: Fix Readme title
17+
run: sed -i '1s/ \[/\n\[/' README.md
18+
- name: Run doxygen
19+
run: doxygen extra/doxygen.conf
20+
- name: Deploy to gh-pages
21+
uses: peaceiris/actions-gh-pages@v3
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
publish_branch: gh-pages
25+
publish_dir: doxygen/html

.github/workflows/push.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
arduino-board-fqbn: ${{ matrix.board }}
2121
platform-url: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json,https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
2222
arduino-platform: arduino:[email protected],SparkFun:[email protected],Legion2:[email protected]
23-
required-libraries: FastLED@3.2.0
23+
required-libraries: FastLED@3.3.3
2424
sketch-names: LightingNodePRO.ino,
2525
SingleStripLightingNodePRO.ino,
2626
CommanderPRO.ino,
@@ -31,6 +31,7 @@ jobs:
3131
LightingNodeCORE.ino,
3232
NonAddressable.ino,
3333
AmbientBacklight.ino,
34+
MultipleFans.ino,
3435
DebugSketch.ino
3536
examples-build-properties: '{"DebugSketch": "-DDEBUG -DVERBOSE -DPRINT_COMMAND=true -DPRINT_RESPONSE=true -DPRINT_LOOP=true -DPRINT_UPDATE=true"}'
3637
testUnoMega:
@@ -46,7 +47,7 @@ jobs:
4647
with:
4748
arduino-board-fqbn: ${{ matrix.board }}
4849
arduino-platform: arduino:[email protected]
49-
required-libraries: FastLED@3.2.0
50+
required-libraries: FastLED@3.3.3
5051
sketch-names: HoodLoader2UnoMegaController.ino
5152
test16u2:
5253
name: Test 16u2 sketch for ${{ matrix.board }}
@@ -62,5 +63,5 @@ jobs:
6263
arduino-board-fqbn: ${{ matrix.board }}
6364
platform-url: https://raw.githubusercontent.com/NicoHood/HoodLoader2/master/package_NicoHood_HoodLoader2_index.json,https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
6465
arduino-platform: arduino:[email protected],HoodLoader2:[email protected],Legion2:[email protected]
65-
required-libraries: FastLED@3.2.0
66+
required-libraries: FastLED@3.3.3
6667
sketch-names: HoodLoader2CLPBridge.ino

examples/AdditionalFeatures/AdditionalFeatures.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ void setup() {
3535
CLP::reset(&firmware);
3636
ledController.reset();
3737
}
38-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 60);
39-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
38+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 60);
39+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
4040
ledController.addLEDs(0, ledsChannel1, 60);
4141
ledController.addLEDs(1, ledsChannel2, 60);
4242
}

examples/AmbientBacklight/AmbientBacklight.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2929
CorsairLightingProtocolHID cHID(&cLP);
3030

3131
void setup() {
32-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 84);
33-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 105);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 84);
33+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 105);
3434
ledController.addLEDs(0, ledsChannel1, 84);
3535
ledController.addLEDs(1, ledsChannel2, 105);
3636
ledController.onUpdateHook(0, []() {

examples/CommanderPRO/CommanderPRO.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ PWMFan fan4(PWM_FAN_PIN_4, 0, 2000);
5151

5252
void setup() {
5353
CLP::disableBuildInLEDs();
54-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
55-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
54+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
55+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
5656
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
5757
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
5858
temperatureController.addSensor(0, TEMP_SENSOR_PIN_1);

examples/DebugSketch/DebugSketch.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ bool printUpdate = PRINT_UPDATE;
3535
void setup() {
3636
Serial.begin(115200);
3737
Serial.setTimeout(100);
38-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
39-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
38+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
39+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
4040
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
4141
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
4242
}

examples/HoodLoader2UnoMegaController/HoodLoader2UnoMegaController.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ void setup() {
3737
Serial is used by CorsairLightingProtocolSerial!
3838
*/
3939
cLPS.setup();
40-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
41-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
40+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
41+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
4242
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
4343
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
4444
}

examples/LS100/LS100.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
3232
CorsairLightingProtocolHID cHID(&cLP);
3333

3434
void setup() {
35-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 135);
36-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 54);
35+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 135);
36+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 54);
3737
ledController.addLEDs(0, ledsChannel1, 135);
3838
ledController.addLEDs(1, ledsChannel2, 54);
3939
pinMode(BUTTON_PIN, INPUT_PULLUP);

examples/LightingNodeCORE/LightingNodeCORE.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2626
CorsairLightingProtocolHID cHID(&cLP);
2727

2828
void setup() {
29-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 204);
29+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 204);
3030
ledController.addLEDs(0, ledsChannel1, 204);
3131
}
3232

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<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(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
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
Copyright 2020 Leon Kiefer
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
#include <CorsairLightingProtocol.h>
17+
#include <FastLED.h>
18+
19+
#define NUMBER_OF_LEDS_PER_FAN 8
20+
21+
#define DATA_PIN_FAN_1 2
22+
#define DATA_PIN_FAN_2 3
23+
#define DATA_PIN_FAN_3 4
24+
#define DATA_PIN_FAN_4 5
25+
#define DATA_PIN_FAN_5 6
26+
#define DATA_PIN_FAN_6 7
27+
#define DATA_PIN_CHANNEL_2 8
28+
29+
CRGB ledsChannel1[96];
30+
CRGB ledsChannel2[96];
31+
32+
CorsairLightingFirmware firmware = corsairLightingNodePROFirmware();
33+
FastLEDController ledController(true);
34+
CorsairLightingProtocolController cLP(&ledController, &firmware);
35+
CorsairLightingProtocolHID cHID(&cLP);
36+
37+
void setup() {
38+
// 6 fans on channel 1
39+
// FAN_PIN CRGB array offset number of leds per fan
40+
FastLED.addLeds<WS2812B, DATA_PIN_FAN_1, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 0, NUMBER_OF_LEDS_PER_FAN);
41+
FastLED.addLeds<WS2812B, DATA_PIN_FAN_2, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 1, NUMBER_OF_LEDS_PER_FAN);
42+
FastLED.addLeds<WS2812B, DATA_PIN_FAN_3, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 2, NUMBER_OF_LEDS_PER_FAN);
43+
FastLED.addLeds<WS2812B, DATA_PIN_FAN_4, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 3, NUMBER_OF_LEDS_PER_FAN);
44+
FastLED.addLeds<WS2812B, DATA_PIN_FAN_5, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 4, NUMBER_OF_LEDS_PER_FAN);
45+
FastLED.addLeds<WS2812B, DATA_PIN_FAN_6, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 5, NUMBER_OF_LEDS_PER_FAN);
46+
47+
// normal strip on channel 2
48+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 96);
49+
ledController.addLEDs(0, ledsChannel1, 96);
50+
ledController.addLEDs(1, ledsChannel2, 96);
51+
}
52+
53+
void loop() {
54+
cHID.update();
55+
56+
if (ledController.updateLEDs()) {
57+
FastLED.show();
58+
}
59+
}

examples/RepeatAndScale/RepeatAndScale.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2828
CorsairLightingProtocolHID cHID(&cLP);
2929

3030
void setup() {
31-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 100);
32-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 144);
31+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 100);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 144);
3333
ledController.addLEDs(0, ledsChannel1, 50);
3434
ledController.addLEDs(1, ledsChannel2, 60);
3535
ledController.onUpdateHook(0, []() {

examples/SingleStripLightingNodePRO/SingleStripLightingNodePRO.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void setup() {
4040
Serial.begin(115200);
4141
#endif
4242
CLP::disableBuildInLEDs();
43-
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
43+
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
4444
ledController.addLEDs(0, leds, CHANNEL_LED_COUNT);
4545
ledController.addLEDs(1, &(leds[CHANNEL_LED_COUNT]), CHANNEL_LED_COUNT);
4646
}

examples/TransformLLFansFormatToStrip/TransformLLFansFormatToStrip.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2828
CorsairLightingProtocolHID cHID(&cLP);
2929

3030
void setup() {
31-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 96);
32-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
31+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
3333
ledController.addLEDs(0, ledsChannel1, 96);
3434
ledController.addLEDs(1, ledsChannel2, 60);
3535
ledController.onUpdateHook(0, []() {

extra/doxygen.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Corsair Lighting Protocol"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.11.0
41+
PROJECT_NUMBER = 0.12.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

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

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Corsair Lighting Protocol
2-
version=0.11.0
2+
version=0.12.0
33
author=Leon Kiefer
44
maintainer=Leon Kiefer
55
sentence=Control LED strips via USB from a PC.

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)