summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean O'Brien <seobrien@google.com>2022-09-02 12:53:28 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-18 13:45:23 +0000
commita63e75354f6c8cba8c1db3eca66ebb31863be857 (patch)
tree24ba8ab16e9cc9cd137a52f50fa9be109ce5453b /src
parentb63e05d2589b341b912a4998fd39119266300beb (diff)
downloadlibchrome-gestures-a63e75354f6c8cba8c1db3eca66ebb31863be857.tar.gz
Disable force hysteresis compensation by default
Appropriate force hysteresis was added in the firmware for existing haptic touchpad devices. This CL disables force hysteresis compensation in the gesture library, which may conflict with the firmware's compensation. BUG=b:241629080 TEST=manual test and added regression test Change-Id: I471db32378f5fc3dc53858e266a0a348f192ee13 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/3877539 Commit-Queue: Sean O'Brien <seobrien@chromium.org> Tested-by: Sean O'Brien <seobrien@chromium.org> Reviewed-by: Kenneth Albanowski <kenalba@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/haptic_button_generator_filter_interpreter.cc2
-rw-r--r--src/haptic_button_generator_filter_interpreter_unittest.cc1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/haptic_button_generator_filter_interpreter.cc b/src/haptic_button_generator_filter_interpreter.cc
index ce198b4..6e79c63 100644
--- a/src/haptic_button_generator_filter_interpreter.cc
+++ b/src/haptic_button_generator_filter_interpreter.cc
@@ -31,7 +31,7 @@ HapticButtonGeneratorFilterInterpreter::HapticButtonGeneratorFilterInterpreter(
force_translate_(prop_reg, "Force Calibration Offset", 0.0),
complete_release_suppress_speed_(
prop_reg, "Haptic Complete Release Suppression Speed", 200.0),
- use_dynamic_thresholds_(prop_reg, "Use Dynamic Haptic Thresholds", true),
+ use_dynamic_thresholds_(prop_reg, "Use Dynamic Haptic Thresholds", false),
dynamic_down_ratio_(prop_reg, "Dynamic Haptic Down Ratio", 1.2),
dynamic_up_ratio_(prop_reg, "Dynamic Haptic Up Ratio", 0.5),
max_dynamic_up_force_(prop_reg, "Max Dynamic Haptic Up Force", 350.0),
diff --git a/src/haptic_button_generator_filter_interpreter_unittest.cc b/src/haptic_button_generator_filter_interpreter_unittest.cc
index e639960..04076a2 100644
--- a/src/haptic_button_generator_filter_interpreter_unittest.cc
+++ b/src/haptic_button_generator_filter_interpreter_unittest.cc
@@ -279,6 +279,7 @@ TEST(HapticButtonGeneratorFilterInterpreterTest, DynamicThresholdTest) {
TestInterpreterWrapper wrapper(&interpreter, &hwprops);
interpreter.enabled_.val_ = true;
+ interpreter.use_dynamic_thresholds_.val_ = true;
FingerState fs[] = {
// TM, Tm, WM, Wm, pr, orient, x, y, id, flag