trackball center = button
This commit is contained in:
parent
4121ae2b9d
commit
87967c8a66
|
|
@ -158,6 +158,7 @@
|
|||
#define RADIO_DIO1_PIN 45
|
||||
#define RADIO_BUSY_PIN 13
|
||||
#define TrackBallCenter 0
|
||||
#define BUTTON_PIN TrackBallCenter
|
||||
#define TrackBallUp 3 // G S1
|
||||
#define TrackBallDown 15 // G S3
|
||||
#define TrackBallLeft 1 // G S4
|
||||
|
|
|
|||
|
|
@ -725,9 +725,7 @@ namespace KEYBOARD_Utils {
|
|||
int ballLeft = digitalRead(TrackBallLeft);
|
||||
int ballRight = digitalRead(TrackBallRight);
|
||||
|
||||
if (!digitalRead(TrackBallCenter)) {
|
||||
processPressedKey(13);
|
||||
} else if (ballUp != mouseUpState && ballDown == mouseDownState && ballLeft == mouseLeftState && ballRight == mouseRightState) {
|
||||
if (ballUp != mouseUpState && ballDown == mouseDownState && ballLeft == mouseLeftState && ballRight == mouseRightState) {
|
||||
if (millis() - lastDebounceTime > debounceInterval) {
|
||||
lastDebounceTime = millis();
|
||||
mouseUpState = ballUp;
|
||||
|
|
|
|||
Loading…
Reference in New Issue