From bcf818b8fd927d396aee609a96d64ef3663d9ee2 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 77649fa..c603116 100644 --- a/src/modules/motion.cpp +++ b/src/modules/motion.cpp @@ -101,8 +101,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;