     // wait for MPU interrupt or extra packet(s) available
     while (!mpuInterrupt && fifoCount < packetSize) {
       
-        // read raw heading measurements from device
-        mag.getHeading(&mx16, &my16, &mz16);
+
         // other program behavior stuff here
         // .
         // .

        // .
        // .
        // .
        if (millis() > last_time + UPDATE_RATE)
         { 
               Now = micros();
               deltat = ((Now - lastUpdate)/1000000.0f); // set integration time by time elapsed since last filter update
               lastUpdate = Now;
               MadgwickQuaternionUpdate(ax, ay, az, gx*PI/180*250.0f/32768.0, gy*PI/180.0*250.0f/32768.0, gz*PI/180.0*250.0f/32768.0,  mx,  my,  mz);
               sendData();
               last_time = millis();
         }

    mpu.setI2CMasterModeEnabled(0);
    mpu.setI2CBypassEnabled(1);
}
// ================================================================
// ===                    MAIN PROGRAM LOOP                     ===
// ================================================================
