From 44b4d88b075024057fb2dcf28bf50bd346bc41e8 Mon Sep 17 00:00:00 2001 From: r-ma <33133218+r-ma@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:23:28 +0200 Subject: [PATCH] Avoid double increment --- components/encoder/encoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/encoder/encoder.c b/components/encoder/encoder.c index ad173387..aa85661a 100644 --- a/components/encoder/encoder.c +++ b/components/encoder/encoder.c @@ -154,6 +154,7 @@ inline static void read_encoder(rotary_encoder_t *re) } } + re->store = 0; ev.type = RE_ET_CHANGED; xQueueSendToBack(_queue, &ev, 0); }