Correcting debounce issues.
This commit is contained in:
parent
19e55ee62d
commit
d1f1128f6a
12
main.c
12
main.c
@ -118,10 +118,12 @@
|
|||||||
|
|
||||||
|
|
||||||
// Drive Macros (Generally don't need to be changed), except for maybe DRIVE_DETECT
|
// Drive Macros (Generally don't need to be changed), except for maybe DRIVE_DETECT
|
||||||
|
// Sleep is for signal debouncing
|
||||||
#define DRIVE_DETECT(reg,pin,group) \
|
#define DRIVE_DETECT(reg,pin,group) \
|
||||||
reg &= ~(1 << pin); \
|
reg &= ~(1 << pin); \
|
||||||
detection(group); \
|
detection(group); \
|
||||||
reg |= (1 << pin);
|
reg |= (1 << pin); \
|
||||||
|
_delay_us(1);
|
||||||
|
|
||||||
#define DD_CASE(number) \
|
#define DD_CASE(number) \
|
||||||
case number:\
|
case number:\
|
||||||
@ -376,14 +378,6 @@ int main( void )
|
|||||||
if ( !sendKeypresses )
|
if ( !sendKeypresses )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
||||||
// XXX TODO HACK REMOVEME KILL_WITH_FIRE
|
|
||||||
// Too lazy to find (electrical?) issue, so I'm adding a software fix (case is impossible anyways without moar diodes)
|
|
||||||
if ( keyDetectArray[20] & (1 << 7) && keyDetectArray[21] & (1 << 7) && keyDetectArray[38] & (1 << 7) ) {
|
|
||||||
keyDetectArray[20] &= ~(1 << 7);
|
|
||||||
print("HACK!! - Fixme sometime");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Detect Valid Keypresses - TODO
|
// Detect Valid Keypresses - TODO
|
||||||
uint8_t validKeys = 0;
|
uint8_t validKeys = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user