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.