diff options
author | chasewu <chasewu@google.com> | 2020-05-06 15:47:59 +0800 |
---|---|---|
committer | Chase Wu <chasewu@google.com> | 2020-05-06 08:18:57 +0000 |
commit | aca43ec13789699a5aac28d27c360e3255ed0307 (patch) | |
tree | 245380155bf392471383f9fe8cea6cfaf0e58823 /vibrator | |
parent | ba94b316e2ba896a4dfa4861dcc8a2d4592efb2e (diff) | |
download | bramble-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.cpp | 4 |
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({ |