Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58d7c9bd authored by Pontus Lidman's avatar Pontus Lidman Committed by Android (Google) Code Review
Browse files

Merge "SensorFusion: don't use wake sensors for fusion" into main

parents d3208d8f 24f862dd
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ SensorFusion::SensorFusion()

    if (count > 0) {
        for (size_t i=0 ; i<size_t(count) ; i++) {
            // Only use non-wakeup sensors
            if ((list[i].flags & SENSOR_FLAG_WAKE_UP) == 0) {
                if (list[i].type == SENSOR_TYPE_ACCELEROMETER) {
                    mAcc = Sensor(list + i);
                }
@@ -55,6 +57,7 @@ SensorFusion::SensorFusion()
                    uncalibratedGyro = Sensor(list + i);
                }
            }
        }

        // Use the uncalibrated gyroscope for sensor fusion when available
        if (uncalibratedGyro.getType() == SENSOR_TYPE_GYROSCOPE_UNCALIBRATED) {