🎨 Updates and simplifies command handling

This commit is contained in:
Rune Harlyk
2025-09-01 18:41:59 +02:00
parent de3912ff10
commit e5bf10cdb0
14 changed files with 111 additions and 77 deletions
+3 -2
View File
@@ -7,7 +7,7 @@ void test_gaitPlanner_calculateStep_time() {
BezierState gaitPlanner;
body_state_t body_state = {
128, 0, 0, 0, 0, 0, {{1, -1, 0.7, 1}, {1, -1, -0.7, 1}, {-1, -1, 0.7, 1}, {-1, -1, -0.7, 1}}};
ControllerCommand command = {0, 0, 0, 0, 0, 0, 0, 0};
CommandMsg command = {0, 0, 0, 0, 0, 0, 0};
const int num_steps = 1000;
unsigned long start = millis();
@@ -20,7 +20,8 @@ void test_gaitPlanner_calculateStep_time() {
unsigned long max_duration = num_steps / 2; // Minimum 0.5 ms per step
char message[50];
snprintf(message, sizeof(message), "The step calculation took: %lu ms (%lu ms per iter)", duration, duration / num_steps);
snprintf(message, sizeof(message), "The step calculation took: %lu ms (%lu ms per iter)", duration,
duration / num_steps);
ESP_LOGI("Test planner", message);
TEST_ASSERT_MESSAGE(duration <= max_duration, message);
}