Bugfix keypad

This commit is contained in:
KlausMu 2024-01-13 12:30:21 +01:00
parent e1ff6459a9
commit 4d413ec8bd

View file

@ -97,7 +97,7 @@ const byte ROWS = 5; //four rows
const byte COLS = 5; //four columns
//define the symbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'s','^','-','m','r'}, // source, channel+, Volume-, mute, record
{'s','^','-','m','e'}, // source, channel+, Volume-, mute, record
{'i','r','+','k','d'}, // info, right, Volume+, OK, down
{'4','v','1','3','2'}, // blue, channel-, red, yellow, green
{'>','o','b','u','l'}, // forward, off, back, up, left
@ -1016,7 +1016,7 @@ void loop() {
}
// Keypad Handling
customKeypad.getKey(); // Populate key list
if (customKeypad.getKeys()) { // Populate key list
for(int i=0; i<LIST_MAX; i++){ // Handle multiple keys (Not really necessary in this case)
if(customKeypad.key[i].kstate == PRESSED || customKeypad.key[i].kstate == HOLD){
standbyTimer = SLEEP_TIMEOUT; // Reset the sleep timer when a button is pressed
@ -1027,6 +1027,7 @@ void loop() {
else if(currentDevice == 2) IrSender.sendSony((keyCode/ROWS)*(keyCode%ROWS), 15);
}
}
}
// IR Test
//tft.drawString("IR Command: ", 10, 90, 1);