mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-10-31 21:32:31 +01:00 
			
		
		
		
	Debounce bug fixed
This commit is contained in:
		
							parent
							
								
									d1117dca32
								
							
						
					
					
						commit
						caed32df80
					
				| @ -44,7 +44,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
| /* define if matrix has ghost */ | ||||
| #define MATRIX_HAS_GHOST | ||||
| /* Set 0 if need no debouncing */ | ||||
| #define DEBOUNCE    0 | ||||
| #define DEBOUNCE    5 | ||||
| 
 | ||||
| 
 | ||||
| /* key combination for command */ | ||||
|  | ||||
| @ -130,18 +130,24 @@ uint8_t matrix_scan(void) | ||||
| 					matrix[i] = ~read_col(i) | 0b00010000;						// send fake caps lock down
 | ||||
| 				} | ||||
| 			} else {													// CAPS LOCK is OFF on HOST
 | ||||
| 				matrix[i] = ~read_col(i);								 | ||||
| 			} | ||||
| 		} else { | ||||
|         		if (matrix[i] != (uint8_t)~read_col(i)) { | ||||
|            			matrix[i] = (uint8_t)~read_col(i); | ||||
| 			} | ||||
| 		} | ||||
|         			if (debouncing) { | ||||
|         				debug("bounce!: "); debug_hex(debouncing); print("\n"); | ||||
| 					} | ||||
|        				debouncing = DEBOUNCE; | ||||
| 				} | ||||
| 			} | ||||
| 		} else { | ||||
|         	if (matrix[i] != (uint8_t)~read_col(i)) { | ||||
|            		matrix[i] = (uint8_t)~read_col(i); | ||||
|         		if (debouncing) { | ||||
|         			debug("bounce!: "); debug_hex(debouncing); print("\n"); | ||||
| 				} | ||||
|        			debouncing = DEBOUNCE; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|     unselect_rows(); | ||||
| 
 | ||||
|     if (debouncing) { | ||||
| @ -264,7 +270,6 @@ static uint8_t read_col(uint8_t row) | ||||
| 		tmp |= (PINF >> 1 ) & 0b00001000;	// LEFT GUI   is 3bit in modifier (HID Spec)
 | ||||
| 		tmp |= (PINA << 4 ) & 0b00010000;	// CAPSLOCK
 | ||||
| 		tmp |= (PINB << 3 ) & 0b00100000;	// POWER 	 
 | ||||
| 		//tmp |= (PINE << 1 ) & 0b00010000;	// Caps Lock(Should not be in modifier
 | ||||
| 	} else { | ||||
| 		tmp = 0x00; | ||||
| 		tmp = (PINE >> 1)&0b00000001;  | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jeffrey Sung
						Jeffrey Sung