diff --git a/quad/Makefile b/quad/Makefile index 0a92c686ac1fd60dc693dbc0a8f0c86f0768331a..8f71d2be8b8812670837040173bfdd7d823271e2 100644 --- a/quad/Makefile +++ b/quad/Makefile @@ -38,8 +38,8 @@ test: all $(MAKE) -C src/queue test $(MAKE) -C src/computation_graph test $(MAKE) -C src/quad_app test - ruby scripts/tests/test_safety_checks.rb ruby scripts/tests/test_memory_integrity.rb + ruby scripts/tests/test_safety_checks.rb ruby scripts/tests/test_communication.rb clean: diff --git a/quad/scripts/tests/test_memory_integrity.rb b/quad/scripts/tests/test_memory_integrity.rb index adb8f9190b6adb3fff8a6e6f8de2eb143854cfe3..87cbc83b8795758275fdc63d682857f7bdd4f97d 100644 --- a/quad/scripts/tests/test_memory_integrity.rb +++ b/quad/scripts/tests/test_memory_integrity.rb @@ -14,7 +14,7 @@ Dir.chdir(bin_dir) puts("Firing up the quad...") # Start virtual quad -quad = Process.spawn("valgrind --leak-check=full --log-file=./valgrind.out ./virt-quad start") +quad = Process.spawn("valgrind -v --leak-check=full --log-file=./valgrind.out ./virt-quad start") sleep 1.5 diff --git a/quad/src/virt_quad/hw_impl_unix.c b/quad/src/virt_quad/hw_impl_unix.c index d3607f17e16deffee36a4cefe64a6b0a55f15943..ab1704ca719e1358a46bc099d5cc7c2e06b7e495 100644 --- a/quad/src/virt_quad/hw_impl_unix.c +++ b/quad/src/virt_quad/hw_impl_unix.c @@ -9,6 +9,12 @@ struct UARTDriver create_unix_uart() { return uart; } +struct CommDriver create_unix_comm(struct UARTDriver *uart) { + struct CommDriver comm; + comm.uart = uart; + return comm; +} + struct MotorDriver create_unix_motors() { struct MotorDriver motors; motors.state = NULL; diff --git a/quad/src/virt_quad/hw_impl_unix.h b/quad/src/virt_quad/hw_impl_unix.h index b368f3fb50630324524ec9f50b1bb8daceb1287d..3ec22683d223584cb4865bc8f58051c733d7e4b5 100644 --- a/quad/src/virt_quad/hw_impl_unix.h +++ b/quad/src/virt_quad/hw_impl_unix.h @@ -78,6 +78,7 @@ int unix_optical_flow_reset(struct OpticalFlowDriver *self, struct px4flow *of); int unix_optical_flow_read(struct OpticalFlowDriver *self, struct px4flow *of); struct UARTDriver create_unix_uart(); +struct CommDriver create_unix_comm(struct UARTDriver *uart); struct MotorDriver create_unix_motors(); struct RCReceiverDriver create_unix_rc_receiver(); struct I2CDriver create_unix_i2c(); diff --git a/quad/src/virt_quad/main.c b/quad/src/virt_quad/main.c index 413c708fb51bb26c9ab6dc3be1ca6bc4ef2748dd..0d9620db899f86192d978200677f16ad89978025 100644 --- a/quad/src/virt_quad/main.c +++ b/quad/src/virt_quad/main.c @@ -36,6 +36,7 @@ int setup_hardware(hardware_t *hardware) { hardware->rc_receiver = create_unix_rc_receiver(); hardware->motors = create_unix_motors(); hardware->uart_0 = create_unix_uart(); + hardware->comm = create_unix_comm(&hardware->uart_0); hardware->global_timer = create_unix_global_timer(); hardware->axi_timer = create_unix_axi_timer(); hardware->mio7_led = create_unix_mio7_led();