FUNNY Behaviour: IMU Calibration (APM)

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.

Thanks.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    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..

This reply was deleted.

Activity