|
|
@ -21,8 +21,8 @@
|
|
|
|
namespace Akela {
|
|
|
|
namespace Akela {
|
|
|
|
|
|
|
|
|
|
|
|
const MagicCombo::dictionary_t *MagicCombo::dictionary;
|
|
|
|
const MagicCombo::dictionary_t *MagicCombo::dictionary;
|
|
|
|
uint8_t MagicCombo::minInterval = 10;
|
|
|
|
uint16_t MagicCombo::minInterval = 500;
|
|
|
|
uint8_t MagicCombo::timer;
|
|
|
|
uint32_t MagicCombo::startTime;
|
|
|
|
|
|
|
|
|
|
|
|
MagicCombo::MagicCombo (void) {
|
|
|
|
MagicCombo::MagicCombo (void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -42,9 +42,6 @@ namespace Akela {
|
|
|
|
if (!dictionary || postClear)
|
|
|
|
if (!dictionary || postClear)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (timer && timer < minInterval)
|
|
|
|
|
|
|
|
timer++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (byte i = 0;; i++) {
|
|
|
|
for (byte i = 0;; i++) {
|
|
|
|
dictionary_t combo;
|
|
|
|
dictionary_t combo;
|
|
|
|
|
|
|
|
|
|
|
@ -56,9 +53,9 @@ namespace Akela {
|
|
|
|
|
|
|
|
|
|
|
|
if (KeyboardHardware.leftHandState.all == combo.leftHand &&
|
|
|
|
if (KeyboardHardware.leftHandState.all == combo.leftHand &&
|
|
|
|
KeyboardHardware.rightHandState.all == combo.rightHand) {
|
|
|
|
KeyboardHardware.rightHandState.all == combo.rightHand) {
|
|
|
|
if (timer == 0 || timer >= minInterval || minInterval == 0) {
|
|
|
|
if (startTime == 0 || minInterval == 0 || ((millis () - startTime) >= minInterval)) {
|
|
|
|
magicComboActions (i, combo.leftHand, combo.rightHand);
|
|
|
|
magicComboActions (i, combo.leftHand, combo.rightHand);
|
|
|
|
timer = 1;
|
|
|
|
startTime = millis ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|