Hi All,

Why does this happen in APM code in this important function (ArduPlane/ArduCopter)?

imu.init(IMU::COLD_START, delay, flash_leds, &scheduler);

If we use the 'arduino' delay.. the IMU calibrates infinitely (esp. Accelerometer calibration). Using MaVLink_delay helps to calibrate it properly. The default library examples in APM are not able to be run with just 'delay' as the parameter, although it compiles.

Why is this weird behaviour?? It also mentions it as a comment in 'GCS:

// use this to prevent recursion during sensor init
static bool in_mavlink_delay;

A good reasoning will be helpful with a suitable workaround. For my application, I do not want GCS control.


Views: 438

Reply to This

Replies to This Discussion

hmm..that is a bit weird.  I would have thought that the regular arduino delay function would have worked fine.

maybe the arduino delay locks up the cpu and doesn't allow interrupts to fire?  seems a bit unlikely though..

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service