From 93022221cbf9b2394813a0b4544c9f26157c81b0 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Wed, 22 Oct 2025 00:08:29 +0100 Subject: [PATCH] Much better --- src/main.cpp | 2 +- src/rotaryEncoder.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1ef1aa9..fd45db6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -190,7 +190,7 @@ uint8_t joystickREPos(int8_t dir, size_t encPos) { // has elapsed to release it void rotateRE(int8_t pos) { Joystick.setButton(pos, HIGH); - delayMicroseconds(RE_PULSE_DURATION); + delay(RE_PULSE_DURATION); Joystick.setButton(pos, LOW); } diff --git a/src/rotaryEncoder.h b/src/rotaryEncoder.h index b736d07..deb6767 100644 --- a/src/rotaryEncoder.h +++ b/src/rotaryEncoder.h @@ -4,7 +4,7 @@ const int RE_NOCHANGE = 0; const int RE_CCW = -1; const int RE_CW = 1; -const int RE_PULSE_DURATION = 20000; // microsseconds +const int RE_PULSE_DURATION = 100; // microsseconds typedef struct { int clkPin;