From 4e24d87e4b53bc05759a3859d20758df8fc02f67 Mon Sep 17 00:00:00 2001 From: Rune Harlyk Date: Thu, 25 Dec 2025 13:38:50 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Make=20read=20imu=20and=20mag=20be?= =?UTF-8?q?=20timing=20based?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esp32/src/peripherals/peripherals.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp32/src/peripherals/peripherals.cpp b/esp32/src/peripherals/peripherals.cpp index 756fcf8..237a91f 100644 --- a/esp32/src/peripherals/peripherals.cpp +++ b/esp32/src/peripherals/peripherals.cpp @@ -34,8 +34,8 @@ void Peripherals::begin() { }; void Peripherals::update() { - readImu(); - readMag(); + EXECUTE_EVERY_N_MS(20, { readImu(); }); + EXECUTE_EVERY_N_MS(100, { readMag(); }); EXECUTE_EVERY_N_MS(100, { readGesture(); }); EXECUTE_EVERY_N_MS(500, { readBMP(); }); EXECUTE_EVERY_N_MS(500, { readSonar(); });