|
@@ -12,6 +12,10 @@ bool debug = false;
|
|
|
bool debug2 = false;
|
|
|
bool useSerial = false;
|
|
|
|
|
|
+// global conf vars
|
|
|
+unsigned int holdButton_releaseTimeout = 120;
|
|
|
+
|
|
|
+
|
|
|
#define BTN_1 1
|
|
|
#define BTN_2 2
|
|
|
#define BTN_3 3
|
|
@@ -68,9 +72,19 @@ bool useSerial = false;
|
|
|
#define BTN_DUMMY 255
|
|
|
|
|
|
|
|
|
+// Button Modes
|
|
|
+#define BUTTONMODE_ONCE 0
|
|
|
+#define BUTTONMODE_REPEAT 1
|
|
|
+#define BUTTONMODE_HOLD 2
|
|
|
|
|
|
+// Remote Types
|
|
|
+#define REMOTETYPE_RC5 0
|
|
|
+#define REMOTETYPE_RC6 1
|
|
|
+
|
|
|
+// global vars
|
|
|
unsigned long lastNECcode;
|
|
|
unsigned long lastReceivedMillis;
|
|
|
+unsigned long holdButton_lastTriggeredMillis = 0;
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
@@ -138,141 +152,153 @@ void dumpInfo (decode_results *results)
|
|
|
|
|
|
// Hauppauge Remote
|
|
|
if (_currRC5Code == 0xBD) { // POWER
|
|
|
- //handleButton_RCx(BTN_POWER, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_POWER, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
handlePowerButton();
|
|
|
}
|
|
|
else if (_currRC5Code == 0x90) { // VOL+
|
|
|
- handleButton_RCx(BTN_VOL_UP, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_VOL_UP, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_VOL_UP, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x91) { // VOL-
|
|
|
- handleButton_RCx(BTN_VOL_DOWN, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_VOL_DOWN, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_VOL_DOWN, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xB2) { // REWIND
|
|
|
- handleButton_RCx(BTN_REWD, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_REWD, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ //handleButton_RCx(BTN_REWD, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_REWD, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xB4) { // FAST_FORWARD
|
|
|
- handleButton_RCx(BTN_FFWD, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_FFWD, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ //handleButton_RCx(BTN_FFWD, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_FFWD, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xA1) { // CH- used as page down
|
|
|
- handleButton_RCx(BTN_CH_DOWN, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_CH_DOWN, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xA0) { // CH+ used as page up
|
|
|
- handleButton_RCx(BTN_CH_UP, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_CH_UP, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x94) { // ARROW UP
|
|
|
- handleButton_RCx(BTN_UP, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_UP, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_UP, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x95) { // ARROW DOWN
|
|
|
- handleButton_RCx(BTN_DOWN, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_DOWN, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_DOWN, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x96) { // ARROW LEFT
|
|
|
- handleButton_RCx(BTN_LEFT, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_LEFT, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_LEFT, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x97) { // ARROW RIGHT
|
|
|
- handleButton_RCx(BTN_RIGHT, true, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_RIGHT, BUTTONMODE_REPEAT, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_RIGHT, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xA5) { // OK
|
|
|
- handleButton_RCx(BTN_OK_ENTER, false, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_OK_ENTER, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_OK_ENTER, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x9F) { // BACK/EXIT
|
|
|
- handleButton_RCx(BTN_BACK, false, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_BACK, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
+ handleButton_RCx(BTN_BACK, BUTTONMODE_HOLD, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x8D) { // i/MENU
|
|
|
- handleButton_RCx(BTN_MENU, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_MENU, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x92) { // PREV.CH
|
|
|
- handleButton_RCx(BTN_CONTEXT, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_CONTEXT, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x8F) { // MUTE
|
|
|
- handleButton_RCx(BTN_MUTE, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_MUTE, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xBB) { // HOME/GO
|
|
|
- //handleButton_RCx(BTN_HOME, false, _currRC5Pref);
|
|
|
+ //handleButton_RCx(BTN_HOME, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
handleTaskSwitchButton();
|
|
|
}
|
|
|
else if (_currRC5Code == 0x9C) { // TV
|
|
|
- handleButton_RCx(BTN_TV, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_TV, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x98) { // VIDEOS
|
|
|
- handleButton_RCx(BTN_VIDEOS, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_VIDEOS, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x99) { // MUSIC
|
|
|
- handleButton_RCx(BTN_MUSIC, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_MUSIC, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x9A) { // PICTURES
|
|
|
- handleButton_RCx(BTN_PICTURES, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_PICTURES, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x9B) { // GUIDE
|
|
|
- handleButton_RCx(BTN_GUIDE, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_GUIDE, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x8C) { // RADIO
|
|
|
- handleButton_RCx(BTN_RADIO, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_RADIO, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xB7) { // REC
|
|
|
- handleButton_RCx(BTN_REC, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_REC, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xB6) { // STOP
|
|
|
- handleButton_RCx(BTN_STOP, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_STOP, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xB5) { // PLAY
|
|
|
- handleButton_RCx(BTN_PLAY, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_PLAY, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xB0) { // PAUSE
|
|
|
- handleButton_RCx(BTN_PAUSE, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_PAUSE, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xA4) { // PREV
|
|
|
- handleButton_RCx(BTN_PREV, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_PREV, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x9E) { // NEXT
|
|
|
- handleButton_RCx(BTN_NEXT, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_NEXT, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x81) { // 1
|
|
|
- handleButton_RCx(BTN_1, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_1, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x82) { // 2
|
|
|
- handleButton_RCx(BTN_2, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_2, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x83) { // 3
|
|
|
- handleButton_RCx(BTN_3, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_3, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x84) { // 4
|
|
|
- handleButton_RCx(BTN_4, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_4, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x85) { // 5
|
|
|
- handleButton_RCx(BTN_5, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_5, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x86) { // 6
|
|
|
- handleButton_RCx(BTN_6, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_6, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x87) { // 7
|
|
|
- handleButton_RCx(BTN_7, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_7, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x88) { // 8
|
|
|
- handleButton_RCx(BTN_8, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_8, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x89) { // 9
|
|
|
- handleButton_RCx(BTN_9, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_9, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x80) { // 0
|
|
|
- handleButton_RCx(BTN_0, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_0, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x8A) { // *
|
|
|
- handleButton_RCx(BTN_STAR, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_STAR, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x8E) { // #
|
|
|
- handleButton_RCx(BTN_HASH, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_HASH, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0x8B) { // RED
|
|
|
- handleButton_RCx(BTN_RED, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_RED, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xAE) { // GREEN
|
|
|
- handleButton_RCx(BTN_GREEN, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_GREEN, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xB8) { // YELLOW
|
|
|
- handleButton_RCx(BTN_YELLOW, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_YELLOW, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
else if (_currRC5Code == 0xA9) { // BLUE
|
|
|
- handleButton_RCx(BTN_BLUE, false, _currRC5Pref);
|
|
|
+ handleButton_RCx(BTN_BLUE, BUTTONMODE_ONCE, _currRC5Pref, REMOTETYPE_RC5);
|
|
|
}
|
|
|
|
|
|
} // END RC5 CODES
|
|
@@ -327,88 +353,94 @@ void dumpInfo (decode_results *results)
|
|
|
// Missing buttons configured using learning function, which does not work well with RCx format due to the toggle bit,
|
|
|
// so i used an old unused IR remote with NEC code for these, which will be OK for non-repeating buttons.
|
|
|
if (_currRC6Code == 0x270C) { // POWER (of SOURCE)
|
|
|
- //handleButton_RCx(BTN_POWER, true, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_POWER, BUTTONMODE_REPEAT, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
handlePowerButton();
|
|
|
}
|
|
|
else if (_currRC6Code == 0x275C) { // OK/ENTER
|
|
|
- handleButton_RCx(BTN_OK_ENTER, false, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_OK_ENTER, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ handleButton_RCx(BTN_OK_ENTER, BUTTONMODE_HOLD, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ }
|
|
|
+ else if (_currRC6Code == 0x2783) { // RETURN/BACK - bottom right at control pad
|
|
|
+ //handleButton_RCx(BTN_BACK, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ handleButton_RCx(BTN_BACK, BUTTONMODE_HOLD, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x275A) { // LEFT
|
|
|
- handleButton_RCx(BTN_LEFT, true, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_LEFT, BUTTONMODE_REPEAT, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ handleButton_RCx(BTN_LEFT, BUTTONMODE_HOLD, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x275B) { // RIGHT
|
|
|
- handleButton_RCx(BTN_RIGHT, true, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_RIGHT, BUTTONMODE_REPEAT, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ handleButton_RCx(BTN_RIGHT, BUTTONMODE_HOLD, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2758) { // UP
|
|
|
- handleButton_RCx(BTN_UP, true, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_UP, BUTTONMODE_REPEAT, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ handleButton_RCx(BTN_UP, BUTTONMODE_HOLD, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2759) { // DOWN
|
|
|
- handleButton_RCx(BTN_DOWN, true, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_DOWN, BUTTONMODE_REPEAT, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ handleButton_RCx(BTN_DOWN, BUTTONMODE_HOLD, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x27CC) { // HOME MENU - bottom left at control pad
|
|
|
- handleButton_RCx(BTN_MENU, false, _currRC6Pref);
|
|
|
- }
|
|
|
- else if (_currRC6Code == 0x2783) { // RETURN/BACK - bottom right at control pad
|
|
|
- handleButton_RCx(BTN_BACK, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_MENU, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2743) { // X - AUDIO PARAMETER - top left at control pad
|
|
|
- //handleButton_RCx(BTN_HOME, false, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_HOME, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
handleTaskSwitchButton();
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2754) { // VIDEO PARAMETER - top right at control pad
|
|
|
- //handleButton_RCx(BTN_MENU, false, _currRC6Pref);
|
|
|
- handleButton_RCx(BTN_CONTEXT, false, _currRC6Pref);
|
|
|
+ //handleButton_RCx(BTN_MENU, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
+ handleButton_RCx(BTN_CONTEXT, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2771) { // PLAY
|
|
|
- handleButton_RCx(BTN_PLAY, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_PLAY, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x276F) { // PAUSE
|
|
|
- handleButton_RCx(BTN_PAUSE, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_PAUSE, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x276E) { // STOP
|
|
|
- handleButton_RCx(BTN_STOP, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_STOP, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x276D) { // PREVIOUS
|
|
|
- handleButton_RCx(BTN_PREV, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_PREV, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2770) { // NEXT
|
|
|
- handleButton_RCx(BTN_NEXT, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_NEXT, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2701) { // 1
|
|
|
- handleButton_RCx(BTN_1, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_1, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2702) { // 2
|
|
|
- handleButton_RCx(BTN_2, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_2, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2703) { // 3
|
|
|
- handleButton_RCx(BTN_3, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_3, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2704) { // 4
|
|
|
- handleButton_RCx(BTN_4, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_4, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2705) { // 5
|
|
|
- handleButton_RCx(BTN_5, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_5, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2706) { // 6
|
|
|
- handleButton_RCx(BTN_6, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_6, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2707) { // 7
|
|
|
- handleButton_RCx(BTN_7, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_7, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2708) { // 8
|
|
|
- handleButton_RCx(BTN_8, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_8, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2709) { // 9
|
|
|
- handleButton_RCx(BTN_9, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_9, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2700) { // 0
|
|
|
- handleButton_RCx(BTN_0, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_0, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2720) { // CH+
|
|
|
- handleButton_RCx(BTN_CH_UP, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_CH_UP, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
else if (_currRC6Code == 0x2721) { // CH-
|
|
|
- handleButton_RCx(BTN_CH_DOWN, false, _currRC6Pref);
|
|
|
+ handleButton_RCx(BTN_CH_DOWN, BUTTONMODE_ONCE, _currRC6Pref, REMOTETYPE_RC6);
|
|
|
}
|
|
|
|
|
|
// Buttons in NEC CODE due to limitations of this RC:
|
|
@@ -602,5 +634,5 @@ void loop ( )
|
|
|
|
|
|
handlePowerButton_loop();
|
|
|
handleTaskSwitchButton_loop();
|
|
|
-
|
|
|
+ handleHoldButtons_loop(); // release all keys after timeout
|
|
|
}
|