Loading data/etc/input/motion_predictor_config.xml +3 −5 Original line number Diff line number Diff line Loading @@ -33,11 +33,9 @@ <distance-noise-floor>0.2</distance-noise-floor> <!-- The low and high jerk thresholds for prediction pruning. The jerk thresholds are based on normalized dt = 1 calculations, and are taken from Jetpacks MotionEventPredictor's KalmanPredictor implementation (using its ACCURATE_LOW_JANK and ACCURATE_HIGH_JANK). The jerk thresholds are based on normalized dt = 1 calculations. --> <low-jerk>0.1</low-jerk> <high-jerk>0.2</high-jerk> <low-jerk>1.0</low-jerk> <high-jerk>1.1</high-jerk> </motion-predictor> libs/input/tests/MotionPredictor_test.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -291,12 +291,12 @@ TEST_WITH_FLAGS( MotionPredictor predictor(/*predictionTimestampOffsetNanos=*/0, []() { return true /*enable prediction*/; }); // Jerk is medium (1.5 normalized, which is halfway between LOW_JANK and HIGH_JANK) predictor.record(getMotionEvent(DOWN, 0, 4, 20ms)); predictor.record(getMotionEvent(MOVE, 0, 6.25, 30ms)); predictor.record(getMotionEvent(MOVE, 0, 9.4, 40ms)); predictor.record(getMotionEvent(MOVE, 0, 13.6, 50ms)); predictor.record(getMotionEvent(MOVE, 0, 19, 60ms)); // Jerk is medium (1.05 normalized, which is halfway between LOW_JANK and HIGH_JANK) predictor.record(getMotionEvent(DOWN, 0, 5.2, 20ms)); predictor.record(getMotionEvent(MOVE, 0, 11.5, 30ms)); predictor.record(getMotionEvent(MOVE, 0, 22, 40ms)); predictor.record(getMotionEvent(MOVE, 0, 37.75, 50ms)); predictor.record(getMotionEvent(MOVE, 0, 59.8, 60ms)); std::unique_ptr<MotionEvent> predicted = predictor.predict(82 * NSEC_PER_MSEC); EXPECT_NE(nullptr, predicted); // Halfway between LOW_JANK and HIGH_JANK means that half of the predictions Loading Loading
data/etc/input/motion_predictor_config.xml +3 −5 Original line number Diff line number Diff line Loading @@ -33,11 +33,9 @@ <distance-noise-floor>0.2</distance-noise-floor> <!-- The low and high jerk thresholds for prediction pruning. The jerk thresholds are based on normalized dt = 1 calculations, and are taken from Jetpacks MotionEventPredictor's KalmanPredictor implementation (using its ACCURATE_LOW_JANK and ACCURATE_HIGH_JANK). The jerk thresholds are based on normalized dt = 1 calculations. --> <low-jerk>0.1</low-jerk> <high-jerk>0.2</high-jerk> <low-jerk>1.0</low-jerk> <high-jerk>1.1</high-jerk> </motion-predictor>
libs/input/tests/MotionPredictor_test.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -291,12 +291,12 @@ TEST_WITH_FLAGS( MotionPredictor predictor(/*predictionTimestampOffsetNanos=*/0, []() { return true /*enable prediction*/; }); // Jerk is medium (1.5 normalized, which is halfway between LOW_JANK and HIGH_JANK) predictor.record(getMotionEvent(DOWN, 0, 4, 20ms)); predictor.record(getMotionEvent(MOVE, 0, 6.25, 30ms)); predictor.record(getMotionEvent(MOVE, 0, 9.4, 40ms)); predictor.record(getMotionEvent(MOVE, 0, 13.6, 50ms)); predictor.record(getMotionEvent(MOVE, 0, 19, 60ms)); // Jerk is medium (1.05 normalized, which is halfway between LOW_JANK and HIGH_JANK) predictor.record(getMotionEvent(DOWN, 0, 5.2, 20ms)); predictor.record(getMotionEvent(MOVE, 0, 11.5, 30ms)); predictor.record(getMotionEvent(MOVE, 0, 22, 40ms)); predictor.record(getMotionEvent(MOVE, 0, 37.75, 50ms)); predictor.record(getMotionEvent(MOVE, 0, 59.8, 60ms)); std::unique_ptr<MotionEvent> predicted = predictor.predict(82 * NSEC_PER_MSEC); EXPECT_NE(nullptr, predicted); // Halfway between LOW_JANK and HIGH_JANK means that half of the predictions Loading