IMU 9250, yaw problem, Madgwick

Hallo,
i use this projekt GitHub - kriswiner/MPU9250: Arduino sketches for MPU9250 9DoF with AHRS sensor fusion to read out the IMU. i change some lines and this is my code.

pitch and roll works well, but the yaw value "drift", and is not good orientated. When i only pitch the yaw value change, the same when i roll. When the Sensor is flat yaw works...

Same with the MahonyQuaternionUpdate().

Malte

ok it runs now :)...

 //MadgwickQuaternionUpdate(ax, ay, az, gx*PI/180.0f, gy*PI/180.0f, gz*PI/180.0f,  mx,  my, mz);
    MadgwickQuaternionUpdate(ax, ay, -az, gx*PI/180.0f, gy*PI/180.0f, gz*PI/180.0f,  my,  mx, mz); // change mx & my, and negate az to have all axes in one direction!!!

i must bring all axes in one direction!

OK, now i checked all and use the https://github.com/richards-tech/RTIMULib-Arduino.
Everything works...