Skip to content

Commit

Permalink
Merge pull request #139 from Legion2/dev
Browse files Browse the repository at this point in the history
Version 0.12.0
  • Loading branch information
Legion2 authored May 27, 2020
2 parents ae284f2 + 10f31fa commit a0e5455
Show file tree
Hide file tree
Showing 22 changed files with 411 additions and 343 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: Create Documentation
name: Deploy Documentation

on:
on:
push:
branches:
- dev
- dev

jobs:
doxygen:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Install doxygen
run: sudo apt install doxygen graphviz
- name: Run doxygen
run: doxygen extra/doxygen.conf
- name: Deploy to gh-pages
uses: peaceiris/[email protected]
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: doxygen/html
- uses: actions/checkout@v1
- name: Install doxygen
run: sudo apt install doxygen graphviz
- name: Fix Readme title
run: sed -i '1s/ \[/\n\[/' README.md
- name: Run doxygen
run: doxygen extra/doxygen.conf
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: doxygen/html
7 changes: 4 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
arduino-board-fqbn: ${{ matrix.board }}
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
arduino-platform: arduino:[email protected],SparkFun:[email protected],Legion2:[email protected]
required-libraries: FastLED@3.2.0
required-libraries: FastLED@3.3.3
sketch-names: LightingNodePRO.ino,
SingleStripLightingNodePRO.ino,
CommanderPRO.ino,
Expand All @@ -31,6 +31,7 @@ jobs:
LightingNodeCORE.ino,
NonAddressable.ino,
AmbientBacklight.ino,
MultipleFans.ino,
DebugSketch.ino
examples-build-properties: '{"DebugSketch": "-DDEBUG -DVERBOSE -DPRINT_COMMAND=true -DPRINT_RESPONSE=true -DPRINT_LOOP=true -DPRINT_UPDATE=true"}'
testUnoMega:
Expand All @@ -46,7 +47,7 @@ jobs:
with:
arduino-board-fqbn: ${{ matrix.board }}
arduino-platform: arduino:[email protected]
required-libraries: FastLED@3.2.0
required-libraries: FastLED@3.3.3
sketch-names: HoodLoader2UnoMegaController.ino
test16u2:
name: Test 16u2 sketch for ${{ matrix.board }}
Expand All @@ -62,5 +63,5 @@ jobs:
arduino-board-fqbn: ${{ matrix.board }}
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
arduino-platform: arduino:[email protected],HoodLoader2:[email protected],Legion2:[email protected]
required-libraries: FastLED@3.2.0
required-libraries: FastLED@3.3.3
sketch-names: HoodLoader2CLPBridge.ino
4 changes: 2 additions & 2 deletions examples/AdditionalFeatures/AdditionalFeatures.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ void setup() {
CLP::reset(&firmware);
ledController.reset();
}
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 60);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 60);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
ledController.addLEDs(0, ledsChannel1, 60);
ledController.addLEDs(1, ledsChannel2, 60);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/AmbientBacklight/AmbientBacklight.ino
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 84);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 105);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 84);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 105);
ledController.addLEDs(0, ledsChannel1, 84);
ledController.addLEDs(1, ledsChannel2, 105);
ledController.onUpdateHook(0, []() {
Expand Down
4 changes: 2 additions & 2 deletions examples/CommanderPRO/CommanderPRO.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ PWMFan fan4(PWM_FAN_PIN_4, 0, 2000);

void setup() {
CLP::disableBuildInLEDs();
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
temperatureController.addSensor(0, TEMP_SENSOR_PIN_1);
Expand Down
4 changes: 2 additions & 2 deletions examples/DebugSketch/DebugSketch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ bool printUpdate = PRINT_UPDATE;
void setup() {
Serial.begin(115200);
Serial.setTimeout(100);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ void setup() {
Serial is used by CorsairLightingProtocolSerial!
*/
cLPS.setup();
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/LS100/LS100.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 135);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 54);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 135);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 54);
ledController.addLEDs(0, ledsChannel1, 135);
ledController.addLEDs(1, ledsChannel2, 54);
pinMode(BUTTON_PIN, INPUT_PULLUP);
Expand Down
2 changes: 1 addition & 1 deletion examples/LightingNodeCORE/LightingNodeCORE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 204);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 204);
ledController.addLEDs(0, ledsChannel1, 204);
}

Expand Down
24 changes: 17 additions & 7 deletions examples/LightingNodePRO/LightingNodePRO.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,31 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <CorsairLightingNodePRO.h>
#include <CorsairLightingProtocol.h>
#include <FastLED.h>

#define DATA_PIN_CHANNEL_1 2
#define DATA_PIN_CHANNEL_2 3

CorsairLightingNodePRO cLNP;
CRGB ledsChannel1[96];
CRGB ledsChannel2[96];

CorsairLightingFirmware firmware = corsairLightingNodePROFirmware();
FastLEDController ledController(true);
CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
CLP::disableBuildInLEDs();
auto ledController = cLNP.getFastLEDController();
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledController->getLEDs(0), ledController->getLEDCount(0));
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledController->getLEDs(1), ledController->getLEDCount(1));
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 96);
ledController.addLEDs(0, ledsChannel1, 96);
ledController.addLEDs(1, ledsChannel2, 96);
}

void loop() {
cLNP.update();
cHID.update();

if (ledController.updateLEDs()) {
FastLED.show();
}
}
59 changes: 59 additions & 0 deletions examples/MultipleFans/MultipleFans.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
Copyright 2020 Leon Kiefer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <CorsairLightingProtocol.h>
#include <FastLED.h>

#define NUMBER_OF_LEDS_PER_FAN 8

#define DATA_PIN_FAN_1 2
#define DATA_PIN_FAN_2 3
#define DATA_PIN_FAN_3 4
#define DATA_PIN_FAN_4 5
#define DATA_PIN_FAN_5 6
#define DATA_PIN_FAN_6 7
#define DATA_PIN_CHANNEL_2 8

CRGB ledsChannel1[96];
CRGB ledsChannel2[96];

CorsairLightingFirmware firmware = corsairLightingNodePROFirmware();
FastLEDController ledController(true);
CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
// 6 fans on channel 1
// FAN_PIN CRGB array offset number of leds per fan
FastLED.addLeds<WS2812B, DATA_PIN_FAN_1, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 0, NUMBER_OF_LEDS_PER_FAN);
FastLED.addLeds<WS2812B, DATA_PIN_FAN_2, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 1, NUMBER_OF_LEDS_PER_FAN);
FastLED.addLeds<WS2812B, DATA_PIN_FAN_3, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 2, NUMBER_OF_LEDS_PER_FAN);
FastLED.addLeds<WS2812B, DATA_PIN_FAN_4, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 3, NUMBER_OF_LEDS_PER_FAN);
FastLED.addLeds<WS2812B, DATA_PIN_FAN_5, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 4, NUMBER_OF_LEDS_PER_FAN);
FastLED.addLeds<WS2812B, DATA_PIN_FAN_6, GRB>(ledsChannel1, NUMBER_OF_LEDS_PER_FAN * 5, NUMBER_OF_LEDS_PER_FAN);

// normal strip on channel 2
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 96);
ledController.addLEDs(0, ledsChannel1, 96);
ledController.addLEDs(1, ledsChannel2, 96);
}

void loop() {
cHID.update();

if (ledController.updateLEDs()) {
FastLED.show();
}
}
4 changes: 2 additions & 2 deletions examples/RepeatAndScale/RepeatAndScale.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 100);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 144);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 100);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 144);
ledController.addLEDs(0, ledsChannel1, 50);
ledController.addLEDs(1, ledsChannel2, 60);
ledController.onUpdateHook(0, []() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void setup() {
Serial.begin(115200);
#endif
CLP::disableBuildInLEDs();
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
ledController.addLEDs(0, leds, CHANNEL_LED_COUNT);
ledController.addLEDs(1, &(leds[CHANNEL_LED_COUNT]), CHANNEL_LED_COUNT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 96);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
ledController.addLEDs(0, ledsChannel1, 96);
ledController.addLEDs(1, ledsChannel2, 60);
ledController.onUpdateHook(0, []() {
Expand Down
2 changes: 1 addition & 1 deletion extra/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Corsair Lighting Protocol"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.11.0
PROJECT_NUMBER = 0.12.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
1 change: 0 additions & 1 deletion keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Datatypes (KEYWORD1)
#######################################

CorsairLightingNodePRO KEYWORD1
ILEDController KEYWORD1
LEDController KEYWORD1
FastLEDController KEYWORD1
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Corsair Lighting Protocol
version=0.11.0
version=0.12.0
author=Leon Kiefer
maintainer=Leon Kiefer
sentence=Control LED strips via USB from a PC.
Expand Down
36 changes: 0 additions & 36 deletions src/CorsairLightingNodePRO.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions src/CorsairLightingNodePRO.h

This file was deleted.

1 change: 0 additions & 1 deletion src/CorsairLightingProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "CLPAdditionalFeatures.h"
#include "CLPUtils.h"
#include "CorsairLightingFirmware.h"
#include "CorsairLightingNodePRO.h"
#include "CorsairLightingProtocolConstants.h"
#include "CorsairLightingProtocolController.h"
#include "CorsairLightingProtocolHID.h"
Expand Down
Loading

0 comments on commit a0e5455

Please sign in to comment.