Added peripheral logging - Removed main logging

This commit is contained in:
Niklas Jensen
2025-12-26 22:10:01 +01:00
parent cfc686e984
commit c70e43126f
2 changed files with 19 additions and 11 deletions
+13 -5
View File
@@ -56,11 +56,19 @@ void Peripherals::begin() {
};
void Peripherals::update() {
readImu();
readMag();
EXECUTE_EVERY_N_MS(100, { readGesture(); });
EXECUTE_EVERY_N_MS(500, { readBMP(); });
EXECUTE_EVERY_N_MS(500, { readSonar(); });
CALLS_PER_SECOND_TIMED_CALL(Peripherals_update, read_imu, readImu());
CALLS_PER_SECOND_TIMED_CALL(Peripherals_update, read_mag, readMag());
CALLS_PER_SECOND_TIMED_CALL(Peripherals_update, read_gesture, EXECUTE_EVERY_N_MS(100, { readGesture(); }) );
CALLS_PER_SECOND_TIMED_CALL(Peripherals_update, read_bmp, EXECUTE_EVERY_N_MS(500, { readBMP(); }) );
CALLS_PER_SECOND_TIMED_CALL(Peripherals_update, read_sonar, EXECUTE_EVERY_N_MS(500, { readSonar(); }) );
CALLS_PER_SECOND_TIMED(Peripherals_update,
CALLS_PER_SECOND_TIMED_FUNC_PRINT(Peripherals_update, read_imu)
CALLS_PER_SECOND_TIMED_FUNC_PRINT(Peripherals_update, read_mag)
CALLS_PER_SECOND_TIMED_FUNC_PRINT(Peripherals_update, read_gesture)
CALLS_PER_SECOND_TIMED_FUNC_PRINT(Peripherals_update, read_bmp)
CALLS_PER_SECOND_TIMED_FUNC_PRINT(Peripherals_update, read_sonar)
);
}
void Peripherals::updatePins() {