diff --git a/connect_switch.ino b/connect_switch.ino index 6732c8f..01a8e51 100644 --- a/connect_switch.ino +++ b/connect_switch.ino @@ -1,11 +1,11 @@ #include #include -#define tableSize 40 +#define RapidFireTableSize 40 int loopCount = 0; int state = 0; -int table[tableSize]; +int rapidFireTable[RapidFireTableSize]; int index = 0; int val = 1; @@ -30,14 +30,14 @@ struct ButtonInfo buttonInfoTable[ButtonInfoTableSize]; void perms() { if(val == 0){ - if (table[index] == 1){ + if (rapidFireTable[index] == 1){ SwitchControlLibrary().PressButtonA(); } - if (table[index] == 2){ + if (rapidFireTable[index] == 2){ SwitchControlLibrary().ReleaseButtonA(); } } - index = (index + 1) % 40; + index = (index + 1) % RapidFireTableSize; } @@ -51,8 +51,8 @@ void setupButton(ButtonInfo *but, int pinNumber, Button buttonSymbol) { void setup() { - table[0] = 1; - table[tableSize/2] = 2; + rapidFireTable[0] = 1; + rapidFireTable[RapidFireTableSize/2] = 2; SwitchControlLibrary(); MsTimer2::set(1, perms);