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

Commit 9d8f84ab authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Stop requantizing complex derived sensors" into rvc-dev am: ab63fa0e...

Merge "Stop requantizing complex derived sensors" into rvc-dev am: ab63fa0e am: 750cef94 am: ec6c77c9 am: b64ee9b3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/11707400

Change-Id: I7e27bf758423df20262a75009610fd9d73a35707
parents 2476e76c b64ee9b3
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -40,22 +40,12 @@ void quantizeSensorEventValues(sensors_event_t *event, float resolution) {
    switch ((SensorTypeV2_1)event->type) {
        case SensorTypeV2_1::ACCELEROMETER:
        case SensorTypeV2_1::MAGNETIC_FIELD:
        case SensorTypeV2_1::ORIENTATION:
        case SensorTypeV2_1::GYROSCOPE:
        case SensorTypeV2_1::GRAVITY:
        case SensorTypeV2_1::LINEAR_ACCELERATION:
        case SensorTypeV2_1::MAGNETIC_FIELD_UNCALIBRATED:
        case SensorTypeV2_1::GYROSCOPE_UNCALIBRATED:
        case SensorTypeV2_1::ACCELEROMETER_UNCALIBRATED:
            axes = 3;
            break;
        case SensorTypeV2_1::GAME_ROTATION_VECTOR:
            axes = 4;
            break;
        case SensorTypeV2_1::ROTATION_VECTOR:
        case SensorTypeV2_1::GEOMAGNETIC_ROTATION_VECTOR:
            axes = 5;
            break;
        case SensorTypeV2_1::DEVICE_ORIENTATION:
        case SensorTypeV2_1::LIGHT:
        case SensorTypeV2_1::PRESSURE:
@@ -77,11 +67,8 @@ void quantizeSensorEventValues(sensors_event_t *event, float resolution) {
        case SensorTypeV2_1::HINGE_ANGLE:
            axes = 1;
            break;
        case SensorTypeV2_1::POSE_6DOF:
            axes = 15;
            break;
        default:
            // No other sensors have data that needs to be rounded.
            // No other sensors have data that needs to be quantized.
            break;
    }