The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.2.19 (Linux)
File Line Function
/showthread.php 864 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
keypad 8bit Library
01-03-2013, 12:21 PM,
#1
keypad 8bit Library
The current keypad library in Pinguino 8 works aparently fine, but if you press two keys in the same column it repeats one of the keys .

A workaround is to check in the keypad.c if the variable 'state' is already being pressed. If so no more duplicate or more key's will repeat.

keypad.c :

Code:
...
EVALUATE_KEY:
//if (key != NO_KEY && key != currentKey ){

//Correction for simultaneous pressed keys on the same row
if (key != NO_KEY && key != currentKey && state!=PRESSED){     

        
        // if(state ==HOLD && key != currentKey) //try to disable several keys pressed at the same time
        //     return NO_KEY;
        

    
        currentKey = key;
        Keypad_transitionTo(PRESSED);
        
        
        
        return currentKey;
    }

...

I'll soon patch this issue on the svn,
Reply


Messages In This Thread
keypad 8bit Library - by malagas - 01-03-2013, 12:21 PM
RE: keypad 8bit Library - by regis - 01-03-2013, 02:29 PM
RE: keypad 8bit Library - by Cristobal - 16-06-2018, 04:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)