From e3cebb2912e2c2b8eabc26c22cc6103b04cb386b Mon Sep 17 00:00:00 2001 From: MatMoul Date: Tue, 9 Aug 2016 21:01:21 +0200 Subject: [PATCH] Update keywork count --- src/classes/Keyboard.cpp | 10 +++++----- src/classes/Keyboard.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index d6d87c1..a840489 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -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++; diff --git a/src/classes/Keyboard.h b/src/classes/Keyboard.h index 45ffb64..aa8cd8f 100644 --- a/src/classes/Keyboard.h +++ b/src/classes/Keyboard.h @@ -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,