Browse Source

change initialization order

master
Alex Mikhalev 6 years ago
parent
commit
a0841cf000
  1. 4
      main/ugv_main.cc

4
main/ugv_main.cc

@ -111,9 +111,9 @@ struct State {
ahrs_.begin(1000000.f / ahrs_.begin(1000000.f /
static_cast<float>(LOOP_PERIOD_US)); // rough sample frequency static_cast<float>(LOOP_PERIOD_US)); // rough sample frequency
io->Init();
comms->Init(); comms->Init();
display->Init(); display->Init();
io->Init();
esp_timer_create_args_t timer_args; esp_timer_create_args_t timer_args;
timer_args.callback = OnTimeout; timer_args.callback = OnTimeout;
@ -135,7 +135,7 @@ struct State {
&m = inputs.mpu.mag; &m = inputs.mpu.mag;
ahrs_.update(g.x, g.y, g.z, a.x, a.y, a.z, m.x, m.y, m.z); 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, ESP_LOGD(TAG,
"inputs: acc=(%f, %f, %f) gyro=(%f, %f, %f) mag=(%f, %f, %f)", "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, inputs.mpu.accel.x, inputs.mpu.accel.y, inputs.mpu.accel.z,

Loading…
Cancel
Save