summaryrefslogtreecommitdiff
path: root/vibrator
diff options
context:
space:
mode:
authorchasewu <chasewu@google.com>2020-05-06 15:47:59 +0800
committerChase Wu <chasewu@google.com>2020-05-06 08:18:57 +0000
commitaca43ec13789699a5aac28d27c360e3255ed0307 (patch)
tree245380155bf392471383f9fe8cea6cfaf0e58823 /vibrator
parentba94b316e2ba896a4dfa4861dcc8a2d4592efb2e (diff)
downloadbramble-aca43ec13789699a5aac28d27c360e3255ed0307.tar.gz
vibrator: Add an initial value for non-motion vibration intensity
Bug: 155709426 Test: remove cal file and trigger vibration Signed-off-by: chasewu <chasewu@google.com> Change-Id: I07e63dc8106a2f5d875b6be665e67e6f8dda9239
Diffstat (limited to 'vibrator')
-rw-r--r--vibrator/drv2624/Vibrator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/vibrator/drv2624/Vibrator.cpp b/vibrator/drv2624/Vibrator.cpp
index 0046113..2e68f9d 100644
--- a/vibrator/drv2624/Vibrator.cpp
+++ b/vibrator/drv2624/Vibrator.cpp
@@ -351,6 +351,10 @@ Vibrator::Vibrator(std::unique_ptr<HwApi> hwapi, std::unique_ptr<HwCal> hwcal)
mHwCal->getSteadyAmpMax(&tempAmpMax)
? round((STEADY_TARGET_G[0] / tempAmpMax) * longVoltageMax)
: longVoltageMax;
+ mSteadyTargetOdClamp[2] =
+ mHwCal->getSteadyAmpMax(&tempAmpMax)
+ ? round((STEADY_TARGET_G[2] / tempAmpMax) * longVoltageMax)
+ : longVoltageMax;
}
mHwCal->getSteadyShape(&shape);
mSteadyConfig.reset(new VibrationConfig({