1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-23 09:16:11 +00:00

Update keywork count

This commit is contained in:
MatMoul 2016-08-09 21:01:21 +02:00
parent 23d5243ee4
commit e3cebb2912
2 changed files with 6 additions and 6 deletions

View File

@ -592,17 +592,17 @@ bool Keyboard::setKeys(KeyValue keyValue[], int keyValueCount) {
}
bool Keyboard::setAllKeys(KeyColors colors) {
KeyValue keyValues[118];
for (int i = 0; i < 118; i++) {
KeyValue keyValues[119];
for (int i = 0; i < 119; i++) {
getKeyAddress((Key)i, keyValues[i].key);
keyValues[i].colors = colors;
}
setKeys(keyValues, 118);
setKeys(keyValues, 119);
return true;
}
bool Keyboard::setGroupKeys(KeyGroup keyGroup, KeyColors colors) {
KeyValue keyValues[118];
KeyValue keyValues[119];
int keyValuesCount = 0;
switch (keyGroup) {
case KeyGroup::logo:
@ -665,7 +665,7 @@ bool Keyboard::setGroupKeys(KeyGroup keyGroup, KeyColors colors) {
setKeys(keyValues, keyValuesCount);
break;
case KeyGroup::keys:
for (int i = 63; i < 118; i++) {
for (int i = 63; i < 119; i++) {
getKeyAddress((Key)i, keyValues[i - 63].key);
keyValues[i - 63].colors = colors;
keyValuesCount++;

View File

@ -10,7 +10,7 @@ class Keyboard {
enum class PowerOnEffect { rainbow, color };
enum class KeyAddressGroup { logo, indicators, multimedia, keys };
enum class Key { // 118 items
enum class Key { // 119 items
logo,
caps, num, scroll, game, backlight,
mute, play, stop, prev, next,