Revert "Scaling filter is changed to stop filtering small fingers"
This reverts commit 816c832c449c506e73761af5d9b807b80eb26954.
BUG=chrome-os-partner:39158
TEST=None
Change-Id: I25e210b0aea461b857b873dbafd3b17cee0d6e16
Reviewed-on: https://chromium-review.googlesource.com/265894
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
diff --git a/include/scaling_filter_interpreter.h b/include/scaling_filter_interpreter.h
index 28d1346..2d78749 100644
--- a/include/scaling_filter_interpreter.h
+++ b/include/scaling_filter_interpreter.h
@@ -100,10 +100,6 @@
DoubleProperty pressure_scale_;
DoubleProperty pressure_translate_;
DoubleProperty pressure_threshold_;
- // if true, the low pressure touch will be ignored.
- // if false, or doesn't exist, the low pressure touch will be converted
- // to touch with pressure 1.0
- BoolProperty filter_low_pressure_;
// If true, adjust touch count to match finger count when scaling
// input state. This can help avoid being considered a T5R2 pad.
diff --git a/src/scaling_filter_interpreter.cc b/src/scaling_filter_interpreter.cc
index 9f9219c..0578d6c 100644
--- a/src/scaling_filter_interpreter.cc
+++ b/src/scaling_filter_interpreter.cc
@@ -33,7 +33,6 @@
pressure_scale_(prop_reg, "Pressure Calibration Slope", 1.0),
pressure_translate_(prop_reg, "Pressure Calibration Offset", 0.0),
pressure_threshold_(prop_reg, "Pressure Minimum Threshold", 0.0),
- filter_low_pressure_(prop_reg, "Filter Low Pressure", 0),
force_touch_count_to_match_finger_count_(
prop_reg,
"Force Touch Count To Match Finger Count",
@@ -130,8 +129,7 @@
if (surface_area_from_pressure_.val_) {
// Drop the small fingers, i.e. low pressures.
- if (filter_low_pressure_.val_ || pressure_threshold_.val_ > 0.0)
- FilterLowPressure(hwstate);
+ FilterLowPressure(hwstate);
}
for (short i = 0; i < hwstate->finger_cnt; i++) {
@@ -193,9 +191,6 @@
else
hwstate->fingers[i].pressure = 0;
}
-
- hwstate->fingers[i].pressure = std::max(1.0f,
- hwstate->fingers[i].pressure);
}
if (!surface_area_from_pressure_.val_) {
diff --git a/src/scaling_filter_interpreter_unittest.cc b/src/scaling_filter_interpreter_unittest.cc
index 7d3ba5a..b43b4b1 100644
--- a/src/scaling_filter_interpreter_unittest.cc
+++ b/src/scaling_filter_interpreter_unittest.cc
@@ -323,8 +323,6 @@
has_zero_area[i] = pressure == 0.0;
- pressure = std::max(pressure , 1.0f);
-
if (has_zero_area[i]) {
base_interpreter->expected_orientation_.push_back(
std::vector<float>(0));
@@ -376,10 +374,7 @@
const float e_x = 17;
const float e_y = 71;
- const bool kFilterLowPressure = 1;
-
interpreter.surface_area_from_pressure_.val_ = false;
- interpreter.filter_low_pressure_.val_ = kFilterLowPressure;
interpreter.tp_x_bias_.val_ = e_x;
interpreter.tp_y_bias_.val_ = e_y;