Skip to content

Commit

Permalink
Update readme, minor clean up of setIndividualKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
illixion committed Jul 20, 2020
1 parent 3626fbb commit 0a79d23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ Example matrix:
...
```

#### Annemone.LEDController.setIndividualKeys(matrixState)

Alternative way to set individual key colors. Takes an object with each key and its corresponding color like this: { f: [255,0,0], esc: [0,255,255]}

Note that this function is not aware of the current keyboard state and will turn off all LEDs not specified in the input object.

#### Annemone.LEDController.setSingleColorLed(rgb)

Set all keys to one color.
Expand Down Expand Up @@ -131,7 +137,8 @@ const LEDController = new Annemone.LEDController();
* Added some docs, some static vars, improved setMultiColorLed, general code refactor
* v0.1.7
* Added new productId and switched to HEX for VID and PID

* v0.1.8
* Added a function to set keys individually

## Meta

Expand Down
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ class LEDController {

/**
* Sets keys from object
* @param {Object} matrixState { esc: [rgv], 4: [rgb], f: [rgb] ... }
*
* @param {Object} matrixState { esc: [rgb], 4: [rgb], f: [rgb] ... }
* @returns {number} number of bytes actually written
*/

setIndividualKeys(matrixState) {

const arrayOfRgbValues = LEDController.AnnePro2_layout.map((key) => {
Expand Down

0 comments on commit 0a79d23

Please sign in to comment.