From a0841cf000c07b8bbf7a83fb3f74e0a2e417519d Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Thu, 25 Apr 2019 18:27:30 -0700 Subject: [PATCH] change initialization order --- main/ugv_main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/ugv_main.cc b/main/ugv_main.cc index 031f956..b69bb9a 100644 --- a/main/ugv_main.cc +++ b/main/ugv_main.cc @@ -111,9 +111,9 @@ struct State { ahrs_.begin(1000000.f / static_cast(LOOP_PERIOD_US)); // rough sample frequency + io->Init(); comms->Init(); display->Init(); - io->Init(); esp_timer_create_args_t timer_args; timer_args.callback = OnTimeout; @@ -135,7 +135,7 @@ struct State { &m = inputs.mpu.mag; ahrs_.update(g.x, g.y, g.z, a.x, a.y, a.z, m.x, m.y, m.z); } - if (time_us >= last_print + 50 * 1000) { // 1s + if (time_us >= last_print + 500 * 1000) { // 1s ESP_LOGD(TAG, "inputs: acc=(%f, %f, %f) gyro=(%f, %f, %f) mag=(%f, %f, %f)", inputs.mpu.accel.x, inputs.mpu.accel.y, inputs.mpu.accel.z,