From f24fa571a129d424327f8645d1d696316f9de55c Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sat, 28 Aug 2021 18:24:09 +0200 Subject: [PATCH] Silence motion::Isr() unused variable warning Move motion.Step() directly inside the __AVR__ code, silencing an unused variable warning. Calling motion.Step() without getting or setting the timer is not useful anyway. --- src/modules/motion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/motion.cpp b/src/modules/motion.cpp index 2ee45fa..3a10ffd 100644 --- a/src/modules/motion.cpp +++ b/src/modules/motion.cpp @@ -97,8 +97,8 @@ st_timer_t Motion::Step() { } static inline void Isr() { - st_timer_t next = motion.Step(); #ifdef __AVR__ + st_timer_t next = motion.Step(); // TODO: use proper timer abstraction if (next) OCR1A = next;