Changed the press duration for the rotary encoder in hopes games detect it btr

This commit is contained in:
2025-10-21 23:56:16 +01:00
parent 74b3d26791
commit 86f27d4170
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -184,9 +184,13 @@ uint8_t joystickREPos(int8_t dir, size_t encPos) {
return btn;
}
// TODO
// Make this non blocking:
// - Set it has high, and on the following loops check if the required duration
// has elapsed to release it
void rotateRE(int8_t pos) {
Joystick.setButton(pos, HIGH);
delayMicroseconds(1000);
delayMicroseconds(RE_PULSE_DURATION);
Joystick.setButton(pos, LOW);
}
+1
View File
@@ -4,6 +4,7 @@
const int RE_NOCHANGE = 0;
const int RE_CCW = -1;
const int RE_CW = 1;
const int RE_PULSE_DURATION = 20000; // microsseconds
typedef struct {
int clkPin;