diff --git a/quad/Makefile b/quad/Makefile index b5432b33c55f9346d33d19490023ced286b775dc..f67155208f9f817476423cf8744f8764f37c37b4 100644 --- a/quad/Makefile +++ b/quad/Makefile @@ -38,9 +38,9 @@ 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_unix_uart.rb - # ruby scripts/tests/run_virtual_test_flight.rb + ruby scripts/tests/test_safety_checks.rb + ruby scripts/tests/test_unix_uart.rb + ruby scripts/tests/run_virtual_test_flight.rb clean: rm -rf $(INCDIR) $(LIBDIR) $(OUTDIR) $(EXEDIR) diff --git a/quad/src/virt_quad/hw_impl_unix_i2c.c b/quad/src/virt_quad/hw_impl_unix_i2c.c index c32e0c4ea56546a7699ee32e0cfc1170566f167f..b77e635a54b66eed2e16cd1d6eeb06fef2cb859e 100644 --- a/quad/src/virt_quad/hw_impl_unix_i2c.c +++ b/quad/src/virt_quad/hw_impl_unix_i2c.c @@ -112,6 +112,7 @@ void * update_i2c_input_cache(void *arg) { cache[i].s = val; printf("%s: %ld\n", input_names[i], val); } + pthread_yield(); } return NULL; } diff --git a/quad/src/virt_quad/hw_impl_unix_mio7_led.c b/quad/src/virt_quad/hw_impl_unix_mio7_led.c index 6aef66752f9859faf55ec15c200e68440e6b4f7f..b9b66dd09d0725936a97fc86563fb709693b2416 100644 --- a/quad/src/virt_quad/hw_impl_unix_mio7_led.c +++ b/quad/src/virt_quad/hw_impl_unix_mio7_led.c @@ -52,6 +52,6 @@ void * output_cached_led() { sprintf(buff, "%d\n", on); write(fifo, buff, strlen(buff)); close(fifo); - usleep(500); // don't spam the reader + pthread_yield(); } } diff --git a/quad/src/virt_quad/hw_impl_unix_pwm_input.c b/quad/src/virt_quad/hw_impl_unix_pwm_input.c index e81e88254b81021d78d9332c93f9e8b9007d27fb..df1aaf5f9b43811a4af9b5ed73aebe5e0ca24a86 100644 --- a/quad/src/virt_quad/hw_impl_unix_pwm_input.c +++ b/quad/src/virt_quad/hw_impl_unix_pwm_input.c @@ -78,6 +78,7 @@ void * update_input_cache(void *arg) { printf("%s: Bad value - input not received\n", input_names[i]); } } + pthread_yield(); } return NULL; } diff --git a/quad/src/virt_quad/hw_impl_unix_pwm_output.c b/quad/src/virt_quad/hw_impl_unix_pwm_output.c index 71b89c4f4b0d8465780f39a77267301aaafc39cc..e58d5cf5ae496a5fb6d6d4d76332d78097f98a9f 100644 --- a/quad/src/virt_quad/hw_impl_unix_pwm_output.c +++ b/quad/src/virt_quad/hw_impl_unix_pwm_output.c @@ -59,7 +59,7 @@ void * output_cache(void *arg) { sprintf(buff, "%ld\n", cache[i]); write(fifo, buff, strlen(buff)); close(fifo); - usleep(500); // don't spam the reader + pthread_yield(); } return NULL; }