Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sago35 committed Oct 30, 2023
1 parent 0d0dc55 commit 733d5d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kbgpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ func (d *GpioKeyboard) Get() []State {
if d.cycleCounter[c] >= gpioCyclesToPreventChattering {
d.State[c] = PressToRelease
d.callback(0, c, PressToRelease)
d.cycleCounter[c]++
} else {
d.cycleCounter[c] = 0
} else {
d.cycleCounter[c]++
}
}
case PressToRelease:
Expand Down
4 changes: 2 additions & 2 deletions kbmatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ func (d *MatrixKeyboard) Get() []State {
if d.cycleCounter[idx] >= matrixCyclesToPreventChattering {
d.State[idx] = PressToRelease
d.callback(0, idx, PressToRelease)
d.cycleCounter[idx]++
} else {
d.cycleCounter[idx] = 0
} else {
d.cycleCounter[idx]++
}
}
case PressToRelease:
Expand Down

0 comments on commit 733d5d9

Please sign in to comment.