mirror of
https://github.com/SlimeVR/SlimeVR-Tracker-ESP.git
synced 2026-04-06 02:01:57 +02:00
Fix MPU9250 compilation with Mahony / Madgwick enabled (#151)
This commit is contained in:
@@ -171,9 +171,9 @@ void MPU9250Sensor::motionLoop() {
|
||||
last = now;
|
||||
getMPUScaled();
|
||||
|
||||
#if defined(_MAHONY_H_))
|
||||
#if defined(_MAHONY_H_)
|
||||
mahonyQuaternionUpdate(q, Axyz[0], Axyz[1], Axyz[2], Gxyz[0], Gxyz[1], Gxyz[2], Mxyz[0], Mxyz[1], Mxyz[2], deltat * 1.0e-6);
|
||||
#elif defined(_MADGWICK_H_))
|
||||
#elif defined(_MADGWICK_H_)
|
||||
madgwickQuaternionUpdate(q, Axyz[0], Axyz[1], Axyz[2], Gxyz[0], Gxyz[1], Gxyz[2], Mxyz[0], Mxyz[1], Mxyz[2], deltat * 1.0e-6);
|
||||
#endif
|
||||
quaternion.set(-q[2], q[1], q[3], q[0]);
|
||||
|
||||
Reference in New Issue
Block a user