-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from Legion2/dev
Version 0.6.0
- Loading branch information
Showing
16 changed files
with
271 additions
and
102 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
.github/ISSUE_TEMPLATE/tech-support.md → .github/ISSUE_TEMPLATE/support.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 40 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- bug | ||
- enhancement | ||
# Label to use when marking an issue as stale | ||
staleLabel: wontfix | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
on: [push, pull_request] | ||
name: Test | ||
jobs: | ||
test: | ||
name: Test ${{ matrix.sketch }} for ${{ matrix.board }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
sketch: [LightingNodePRO, SingleStripLightingNodePRO, CommanderPRO, DeviceIDTool] | ||
board: ["arduino:avr:leonardo", "arduino:avr:micro", "SparkFun:avr:promicro:cpu=16MHzatmega32U4"] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install FastLED | ||
uses: Legion2/download-release-action@master | ||
with: | ||
repository: FastLED/FastLED | ||
tag: '3.2.0' | ||
path: libraries | ||
- name: Install SparkFun boards | ||
if: contains(matrix.board, 'SparkFun') | ||
run: | | ||
mkdir -p hardware/SparkFun | ||
cd hardware/SparkFun | ||
wget https://github.com/sparkfun/Arduino_Boards/raw/master/IDE_Board_Manager/sparkfunboards.1.1.5.tar.bz2 | ||
tar -xvjf sparkfunboards.1.1.5.tar.bz2 | ||
rm sparkfunboards.1.1.5.tar.bz2 | ||
mv avr-1.1.5 avr | ||
- name: Build ${{ matrix.sketch }} for ${{ matrix.board }} | ||
uses: Legion2/arduino-builder-action@v2.0.0 | ||
with: | ||
board: ${{ matrix.board }} | ||
sketch: ./examples/${{ matrix.sketch }}/${{ matrix.sketch }}.ino | ||
testUnoMega: | ||
name: Test UnoMega ${{ matrix.sketch }} for ${{ matrix.board }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
sketch: [HoodLoader2UnoMegaController] | ||
board: ["arduino:avr:uno", "arduino:avr:mega:cpu=atmega2560"] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install FastLED | ||
uses: Legion2/download-release-action@master | ||
with: | ||
repository: FastLED/FastLED | ||
tag: '3.2.0' | ||
path: libraries | ||
- name: Build ${{ matrix.sketch }} for ${{ matrix.board }} | ||
uses: Legion2/arduino-builder-action@v2.0.0 | ||
with: | ||
board: ${{ matrix.board }} | ||
sketch: ./examples/${{ matrix.sketch }}/${{ matrix.sketch }}.ino | ||
test16u2: | ||
name: Test 16u2 ${{ matrix.sketch }} for ${{ matrix.board }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
sketch: [HoodLoader2CLPBridge] | ||
board: ["HoodLoader2:avr:HoodLoader2atmega16u2:board=uno", "HoodLoader2:avr:HoodLoader2atmega16u2:board=mega2560"] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install FastLED | ||
uses: Legion2/download-release-action@master | ||
with: | ||
repository: FastLED/FastLED | ||
tag: '3.2.0' | ||
path: libraries | ||
- name: Download HoodLoader2 | ||
uses: Legion2/download-release-action@master | ||
with: | ||
repository: NicoHood/HoodLoader2 | ||
tag: '2.0.5' | ||
path: hardware/HoodLoader2 | ||
file: '2.0.5-boards_manager.zip' | ||
- name: Install HoodLoader2 | ||
run: | | ||
cd hardware/HoodLoader2 | ||
sudo mv 2.0.5-boards_manager.zip some.zip | ||
sudo unzip some.zip | ||
sudo rm some.zip | ||
sudo mv * avr | ||
- name: Build ${{ matrix.sketch }} for ${{ matrix.board }} | ||
uses: Legion2/arduino-builder-action@v2.0.0 | ||
with: | ||
board: ${{ matrix.board }} | ||
sketch: ./examples/${{ matrix.sketch }}/${{ matrix.sketch }}.ino |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
Copyright 2019 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 <CorsairLightingNodePRO.h> | ||
#include <FastLED.h> | ||
|
||
#define CHANNEL_LED_COUNT 60 | ||
|
||
#define DATA_PIN_CHANNEL_1 2 | ||
#define DATA_PIN_CHANNEL_2 3 | ||
|
||
FastLEDController<CHANNEL_LED_COUNT> ledController(true); | ||
CorsairLightingProtocol cLP(&ledController, firmware_version); | ||
CorsairLightingProtocolHID cLPS(&cLP); | ||
|
||
CRGB ledsChannel1[CHANNEL_LED_COUNT]; | ||
CRGB ledsChannel2[CHANNEL_LED_COUNT]; | ||
|
||
bool printLoop = PRINT_LOOP; | ||
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); | ||
ledController.addLeds(0, ledsChannel1); | ||
ledController.addLeds(1, ledsChannel2); | ||
} | ||
|
||
void loop() { | ||
if (printLoop) Serial.println(F("loop")); | ||
cLPS.update(); | ||
|
||
if (ledController.updateLEDs()) { | ||
if (printUpdate) Serial.println(F("updateLEDs")); | ||
FastLED.show(); | ||
} | ||
|
||
if (Serial.available()) { | ||
static String cmd = ""; | ||
cmd = Serial.readStringUntil('\n'); | ||
processCommand(cmd); | ||
} | ||
} | ||
|
||
void processCommand(String& cmd) { | ||
if (cmd == F("print DeviceID")) { | ||
byte DeviceId[4]; | ||
EEPROM.get(EEPROM_ADDRESS_DEVICE_ID, DeviceId); | ||
printDeviceID(DeviceId); | ||
Serial.println(); | ||
} | ||
#ifdef VERBOSE | ||
else if (cmd == F("toggle command")) { | ||
printCommand = !printCommand; | ||
} | ||
else if (cmd == F("toggle response")) { | ||
printResponse = !printResponse; | ||
} | ||
#endif // VERBOSE | ||
else if (cmd == F("toggle loop")) { | ||
printLoop = !printLoop; | ||
} | ||
else if (cmd == F("toggle update")) { | ||
printUpdate = !printUpdate; | ||
} | ||
else { | ||
Serial.println(F("Unknown command")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# CorsairLightingProtocol build property overrides | ||
# | ||
|
||
############################################################## | ||
|
||
build.vid=0x1b1c | ||
build.pid=0x0c0b | ||
build.usb_product="Lighting Node PRO" | ||
build.usb_manufacturer="Corsair" | ||
|
||
build.extra_flags={build.usb_flags} '-DSERIAL_NUMBER="FB66DF55421900F5"' -DDEBUG -DVERBOSE -DPRINT_COMMAND=true -DPRINT_RESPONSE=true -DPRINT_LOOP=true -DPRINT_UPDATE=true |
Oops, something went wrong.