mirror of
https://github.com/Evolution-X-Devices/device_google_redfin
synced 2026-02-01 11:26:33 +00:00
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
This commit is contained in:
@@ -363,11 +363,16 @@ Vibrator::Vibrator(std::unique_ptr<HwApi> hwapi, std::unique_ptr<HwCal> hwcal)
|
||||
} else {
|
||||
if (hasExternalSteadyG) {
|
||||
STEADY_TARGET_G[0] = externalSteadyTargetG[0];
|
||||
STEADY_TARGET_G[2] = externalSteadyTargetG[2];
|
||||
}
|
||||
mSteadyTargetOdClamp[0] =
|
||||
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({
|
||||
|
||||
Reference in New Issue
Block a user