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
+6 -6
View File
@@ -131,12 +131,12 @@ void IRAM_ATTR SpotControlLoopEntry(void *) {
#if FT_ENABLED(USE_WS2812)
ledService.loop();
#endif
CALLS_PER_SECOND_TIMED(SpotControlLoopEntry,
CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, peripherals_update)
CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, motionService_update)
CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, servoController_setAngles)
CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, servoController_update)
);
// CALLS_PER_SECOND_TIMED(SpotControlLoopEntry,
// CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, peripherals_update)
// CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, motionService_update)
// CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, servoController_setAngles)
// CALLS_PER_SECOND_TIMED_FUNC_PRINT(SpotControlLoopEntry, servoController_update)
// );
// vTaskDelayUntil(&xLastWakeTime, xFrequency);
}
}
+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() {