From 58a3433c85e396ed4b7541a9d9c270295b0dee84 Mon Sep 17 00:00:00 2001 From: richardclli Date: Fri, 5 Jun 2026 14:22:48 +0800 Subject: [PATCH] fix(pl18u): rotary encoder emulation acceleration not fully implemented (#7403) --- radio/src/targets/pl18/pl18u_key_driver.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/radio/src/targets/pl18/pl18u_key_driver.cpp b/radio/src/targets/pl18/pl18u_key_driver.cpp index 44a856b52..67b71fd31 100644 --- a/radio/src/targets/pl18/pl18u_key_driver.cpp +++ b/radio/src/targets/pl18/pl18u_key_driver.cpp @@ -27,6 +27,7 @@ #include "hal.h" #include "delays_driver.h" #include "keys.h" +#include "timers_driver.h" #define REPEAT_DELAY 20 @@ -72,7 +73,7 @@ enum PhysicalTrims }; volatile uint32_t rotencDt = 0; -static rotenc_t rotencValue = 0; +volatile static rotenc_t rotencValue = 0; static uint8_t lastRotState = 0; static uint8_t stateCount = 0; @@ -215,6 +216,9 @@ uint32_t readKeys() } else { stateCount++; if (stateCount == 3) { +#if !defined(BOOT) + rotencDt = get_tmr10ms(); +#endif if (rotState == 1) rotencValue++; else if (rotState == 2)