diff options
Diffstat (limited to 'robot/hypervisor.c')
-rw-r--r-- | robot/hypervisor.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/robot/hypervisor.c b/robot/hypervisor.c index dbdc62a..c558de8 100644 --- a/robot/hypervisor.c +++ b/robot/hypervisor.c @@ -1,5 +1,4 @@ #include "hypervisor.h" -#include "consts.h" #include "errcatch.h" #include "io.h" #include "modes.h" @@ -7,6 +6,10 @@ #include "sercomm.h" void w2_hypervisor_main() { +#ifdef W2_SIM + siminfo("cycle start\n"); +#endif + time_reset(); w2_sercomm_main(); @@ -18,14 +21,10 @@ void w2_hypervisor_main() { w2_modes_main(); unsigned long mode_time = get_ms() - io_time; -#ifdef W2_SIM - siminfo("sercomm: %lums\n", sercomm_time); - siminfo("errcatch: %lums\n", errcatch_time); - siminfo("io: %lums\n", io_time); - siminfo("mode: %lums\n", mode_time); + if (mode_time > W2_MAX_MODULE_CYCLE_MS) w2_errcatch_throw(W2_E_WARN_CYCLE_EXPIRED); +#ifdef W2_SIM + siminfo("cycle end\n"); usleep(100e3); #endif - - if (mode_time > W2_MAX_MODULE_CYCLE_MS) w2_errcatch_throw(W2_E_WARN_CYCLE_EXPIRED); } |