From cdbaeccc091aa9eb0efbd2c8e4f42ba892c6ee20 Mon Sep 17 00:00:00 2001 From: chasewu Date: Wed, 15 Jan 2020 16:41:41 +0800 Subject: [PATCH] vibrator: Add first haptics tuning pattern This is the initial version for dogfood rom. TEXTURE_TICK 6ms TICK 6ms CLICK 6ms DOUBLE_CLICKS 8 + 125 + 11 ms HEAVY_CLICK 6ms Bug: 146316176 Test: UT pals checked the haptics Change-Id: I9b7a8dbbe0a710248872ab23cc11866ec757e2f4 Signed-off-by: chasewu --- device.mk | 6 +++--- vibrator/drv2624/Hardware.h | 2 +- vibrator/drv2624/Vibrator.cpp | 4 ++-- vibrator/drv2624/drv2624.bin | Bin 45 -> 45 bytes 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/device.mk b/device.mk index ed277d5f..5f1378c0 100644 --- a/device.mk +++ b/device.mk @@ -477,9 +477,9 @@ PRODUCT_COPY_FILES += \ # Vibrator HAL PRODUCT_PRODUCT_PROPERTIES +=\ ro.vibrator.hal.config.dynamic=1 \ - ro.vibrator.hal.click.duration=8 \ - ro.vibrator.hal.tick.duration=8 \ - ro.vibrator.hal.heavyclick.duration=8 \ + ro.vibrator.hal.click.duration=6 \ + ro.vibrator.hal.tick.duration=6 \ + ro.vibrator.hal.heavyclick.duration=6 \ ro.vibrator.hal.long.voltage=161 \ ro.vibrator.hal.long.frequency.shift=0 \ ro.vibrator.hal.steady.shape=1 diff --git a/vibrator/drv2624/Hardware.h b/vibrator/drv2624/Hardware.h index 707ea88a..d43fa6d6 100644 --- a/vibrator/drv2624/Hardware.h +++ b/vibrator/drv2624/Hardware.h @@ -98,7 +98,7 @@ class HwCal : public Vibrator::HwCal, private HwCalBase { static constexpr uint32_t WAVEFORM_CLICK_EFFECT_MS = 6; static constexpr uint32_t WAVEFORM_TICK_EFFECT_MS = 2; - static constexpr uint32_t WAVEFORM_DOUBLE_CLICK_EFFECT_MS = 135; + static constexpr uint32_t WAVEFORM_DOUBLE_CLICK_EFFECT_MS = 144; static constexpr uint32_t WAVEFORM_HEAVY_CLICK_EFFECT_MS = 8; static constexpr uint32_t DEFAULT_LRA_PERIOD = 262; diff --git a/vibrator/drv2624/Vibrator.cpp b/vibrator/drv2624/Vibrator.cpp index 7067b5ca..7fd26f6c 100644 --- a/vibrator/drv2624/Vibrator.cpp +++ b/vibrator/drv2624/Vibrator.cpp @@ -54,8 +54,8 @@ static constexpr char WAVEFORM_DOUBLE_CLICK_EFFECT_SEQ[] = "3 0"; static constexpr char WAVEFORM_HEAVY_CLICK_EFFECT_SEQ[] = "4 0"; // UT team design those target G values -static constexpr std::array EFFECT_TARGET_G = {0.175, 0.325, 0.37, 0.475, 0.6}; -static constexpr std::array STEADY_TARGET_G = {1.38, 1.145, 0.905}; +static constexpr std::array EFFECT_TARGET_G = {0.13, 0.13, 0.25, 0.4, 0.57}; +static constexpr std::array STEADY_TARGET_G = {1.2, 1.145, 0.905}; static std::uint32_t freqPeriodFormula(std::uint32_t in) { return 1000000000 / (24615 * in); diff --git a/vibrator/drv2624/drv2624.bin b/vibrator/drv2624/drv2624.bin index d70f6cb71c2823330be8544e3281d00d0735b814..54f1ecb1c4cc9767dfd1f023c15ebc7f29f4300d 100644 GIT binary patch literal 45 xcmY#UV_?u_U|{;!(7#7&`*z*7YJLm&&