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 <chasewu@google.com>
This commit is contained in:
chasewu
2020-01-15 16:41:41 +08:00
committed by Chase Wu
parent 4da5318086
commit cdbaeccc09
4 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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<float, 5> EFFECT_TARGET_G = {0.175, 0.325, 0.37, 0.475, 0.6};
static constexpr std::array<float, 3> STEADY_TARGET_G = {1.38, 1.145, 0.905};
static constexpr std::array<float, 5> EFFECT_TARGET_G = {0.13, 0.13, 0.25, 0.4, 0.57};
static constexpr std::array<float, 3> STEADY_TARGET_G = {1.2, 1.145, 0.905};
static std::uint32_t freqPeriodFormula(std::uint32_t in) {
return 1000000000 / (24615 * in);

Binary file not shown.