From 30d09cc098aa893dcbae30af3d8e31ba86f24c16 Mon Sep 17 00:00:00 2001 From: Bartek Date: Fri, 19 Jul 2024 17:24:51 +0200 Subject: [PATCH] Single wrapper tested --- .../src/{ => tests/hardware}/simple_test.cpp | 6 +++--- .../hardware/single_wrapper_test.cpp} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/meldog_hardware/pi3hat_hardware_interface/src/{ => tests/hardware}/simple_test.cpp (95%) rename src/meldog_hardware/pi3hat_hardware_interface/src/{main_test.cpp => tests/hardware/single_wrapper_test.cpp} (99%) diff --git a/src/meldog_hardware/pi3hat_hardware_interface/src/simple_test.cpp b/src/meldog_hardware/pi3hat_hardware_interface/src/tests/hardware/simple_test.cpp similarity index 95% rename from src/meldog_hardware/pi3hat_hardware_interface/src/simple_test.cpp rename to src/meldog_hardware/pi3hat_hardware_interface/src/tests/hardware/simple_test.cpp index 47a945e2..b787fcbf 100644 --- a/src/meldog_hardware/pi3hat_hardware_interface/src/simple_test.cpp +++ b/src/meldog_hardware/pi3hat_hardware_interface/src/tests/hardware/simple_test.cpp @@ -1,6 +1,6 @@ -#include "../include/pi3hat/pi3hat.h" -#include "../include/pi3hat/realtime.h" -#include "../include/moteus/moteus.h" +#include "../../../include/pi3hat/pi3hat.h" +#include "../../../include/pi3hat/realtime.h" +#include "../../../include/moteus/moteus.h" static double GetNow() diff --git a/src/meldog_hardware/pi3hat_hardware_interface/src/main_test.cpp b/src/meldog_hardware/pi3hat_hardware_interface/src/tests/hardware/single_wrapper_test.cpp similarity index 99% rename from src/meldog_hardware/pi3hat_hardware_interface/src/main_test.cpp rename to src/meldog_hardware/pi3hat_hardware_interface/src/tests/hardware/single_wrapper_test.cpp index 9b75c478..824cf43a 100644 --- a/src/meldog_hardware/pi3hat_hardware_interface/src/main_test.cpp +++ b/src/meldog_hardware/pi3hat_hardware_interface/src/tests/hardware/single_wrapper_test.cpp @@ -106,7 +106,7 @@ int main(int argc, char** argv) actuator_command.position_ = 5 * sin(now - prev); command(moteus_wrapper, tx_frame, actuator_command); pi3hat_output = pi3hat.Cycle(input); - ::usleep(100); + ::usleep(1000); auto mesaure_time = GetNow() - now; frequency = (int) 1/mesaure_time; state(moteus_wrapper, rx_frame, actuator_state);