diff --git a/ArduPlane/ArduPlane.pde b/ArduPlane/ArduPlane.pde index 2d327462d6..e90440ddaf 100644 --- a/ArduPlane/ArduPlane.pde +++ b/ArduPlane/ArduPlane.pde @@ -761,9 +761,8 @@ void setup() { void loop() { uint32_t timer = millis(); - // We want this to execute at 50Hz, but synchronised with the gyro/accel - uint16_t num_samples = ins.num_samples_available(); - if (num_samples >= 1) { + // We want this to execute at 50Hz, synchronised with the gyro/accel + if (ins.sample_available()) { delta_ms_fast_loop = timer - fast_loopTimer_ms; G_Dt = delta_ms_fast_loop * 0.001f; fast_loopTimer_ms = timer;