summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-05-07 04:45:28 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-07 04:45:28 +0000
commitf2e89d1e52bfb43bba65b228ed1d21c01298ca13 (patch)
treeed4e4ddc9363cb12c27825b5cf9e60547a71c791
parent5c9115361fc694e632afcdb39bec38abe556518c (diff)
parent539592699a0c88452c474d95f1fa4724e3f1edc2 (diff)
downloadpixel-f2e89d1e52bfb43bba65b228ed1d21c01298ca13.tar.gz
Merge "vibrator: cs40l25: Revert TICK Implementation" into rvc-dev am: d7e9a36063 am: 539592699a
Change-Id: I12037820cb6577a54c608fe4ff12c533458e638d
-rw-r--r--vibrator/cs40l25/Vibrator.cpp4
-rw-r--r--vibrator/cs40l25/tests/test-vibrator.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/vibrator/cs40l25/Vibrator.cpp b/vibrator/cs40l25/Vibrator.cpp
index e53a8221..df8cbf09 100644
--- a/vibrator/cs40l25/Vibrator.cpp
+++ b/vibrator/cs40l25/Vibrator.cpp
@@ -437,8 +437,8 @@ ndk::ScopedAStatus Vibrator::getSimpleDetails(Effect effect, EffectStrength stre
intensity *= 0.5f;
break;
case Effect::TICK:
- effectIndex = WAVEFORM_LIGHT_TICK_INDEX;
- intensity *= 0.7f;
+ effectIndex = WAVEFORM_CLICK_INDEX;
+ intensity *= 0.5f;
break;
case Effect::CLICK:
effectIndex = WAVEFORM_CLICK_INDEX;
diff --git a/vibrator/cs40l25/tests/test-vibrator.cpp b/vibrator/cs40l25/tests/test-vibrator.cpp
index 2f77ecc8..1217cc2c 100644
--- a/vibrator/cs40l25/tests/test-vibrator.cpp
+++ b/vibrator/cs40l25/tests/test-vibrator.cpp
@@ -74,7 +74,7 @@ static constexpr std::array<EffectDuration, 10> EFFECT_DURATIONS{0, 0, 15,
static const std::map<Effect, EffectIndex> EFFECT_INDEX{
{Effect::CLICK, 2},
- {Effect::TICK, 9},
+ {Effect::TICK, 2},
{Effect::HEAVY_CLICK, 2},
{Effect::TEXTURE_TICK, 9},
};
@@ -88,9 +88,9 @@ static const std::map<EffectTuple, EffectScale> EFFECT_SCALE{
{{Effect::CLICK, EffectStrength::LIGHT}, Scale(0.7f * 0.5f)},
{{Effect::CLICK, EffectStrength::MEDIUM}, Scale(0.7f * 0.7f)},
{{Effect::CLICK, EffectStrength::STRONG}, Scale(0.7f * 1.0f)},
- {{Effect::TICK, EffectStrength::LIGHT}, Scale(0.7f * 0.5f)},
- {{Effect::TICK, EffectStrength::MEDIUM}, Scale(0.7f * 0.7f)},
- {{Effect::TICK, EffectStrength::STRONG}, Scale(0.7f * 1.0f)},
+ {{Effect::TICK, EffectStrength::LIGHT}, Scale(0.5f * 0.5f)},
+ {{Effect::TICK, EffectStrength::MEDIUM}, Scale(0.5f * 0.7f)},
+ {{Effect::TICK, EffectStrength::STRONG}, Scale(0.5f * 1.0f)},
{{Effect::HEAVY_CLICK, EffectStrength::LIGHT}, Scale(1.0f * 0.5f)},
{{Effect::HEAVY_CLICK, EffectStrength::MEDIUM}, Scale(1.0f * 0.7f)},
{{Effect::HEAVY_CLICK, EffectStrength::STRONG}, Scale(1.0f * 1.0f)},