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

Commit 93a8c86d authored by Yeabkal Wubshit's avatar Yeabkal Wubshit Committed by Android (Google) Code Review
Browse files

Merge "Add Rotary Encoder Slop Logs" into main

parents 331ca281 734f92fe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -54,11 +54,13 @@ float SlopController::consumeEvent(nsecs_t eventTimeNanos, float value) {
    mCumulativeValue += value;

    if (abs(mCumulativeValue) >= mSlopThreshold) {
        ALOGD("SlopController: did not drop event with value .%3f", value);
        mHasSlopBeenMet = true;
        // Return the amount of value that exceeds the slop.
        return signOf(value) * (abs(mCumulativeValue) - mSlopThreshold);
    }

    ALOGD("SlopController: dropping event with value .%3f", value);
    return 0;
}