Merge "felix/vibrator: Update durations to match other projects" into main
This commit is contained in:
commit
33e33783af
1 changed files with 3 additions and 8 deletions
|
@ -55,11 +55,6 @@ static constexpr uint8_t VOLTAGE_SCALE_MAX = 100;
|
||||||
static constexpr int8_t MAX_COLD_START_LATENCY_MS = 6; // I2C Transaction + DSP Return-From-Standby
|
static constexpr int8_t MAX_COLD_START_LATENCY_MS = 6; // I2C Transaction + DSP Return-From-Standby
|
||||||
static constexpr int8_t MAX_PAUSE_TIMING_ERROR_MS = 1; // ALERT Irq Handling
|
static constexpr int8_t MAX_PAUSE_TIMING_ERROR_MS = 1; // ALERT Irq Handling
|
||||||
static constexpr uint32_t MAX_TIME_MS = UINT16_MAX;
|
static constexpr uint32_t MAX_TIME_MS = UINT16_MAX;
|
||||||
static constexpr float SETTING_TIME_OVERHEAD = 26; // This time was combined by
|
|
||||||
// HAL set the effect to
|
|
||||||
// driver and the kernel
|
|
||||||
// executes the effect before
|
|
||||||
// chip play the effect
|
|
||||||
|
|
||||||
static constexpr auto ASYNC_COMPLETION_TIMEOUT = std::chrono::milliseconds(100);
|
static constexpr auto ASYNC_COMPLETION_TIMEOUT = std::chrono::milliseconds(100);
|
||||||
static constexpr auto POLLING_TIMEOUT = 20;
|
static constexpr auto POLLING_TIMEOUT = 20;
|
||||||
|
@ -358,7 +353,7 @@ Vibrator::Vibrator(std::unique_ptr<HwApi> hwApiDefault, std::unique_ptr<HwCal> h
|
||||||
mFfEffects.resize(WAVEFORM_MAX_INDEX);
|
mFfEffects.resize(WAVEFORM_MAX_INDEX);
|
||||||
mEffectDurations.resize(WAVEFORM_MAX_INDEX);
|
mEffectDurations.resize(WAVEFORM_MAX_INDEX);
|
||||||
mEffectDurations = {
|
mEffectDurations = {
|
||||||
1000, 100, 32, 1000, 300, 130, 150, 500, 100, 10, 12, 1000, 1000, 1000,
|
1000, 100, 12, 1000, 300, 130, 150, 500, 100, 5, 12, 1000, 1000, 1000,
|
||||||
}; /* 11+3 waveforms. The duration must < UINT16_MAX */
|
}; /* 11+3 waveforms. The duration must < UINT16_MAX */
|
||||||
|
|
||||||
uint8_t effectIndex;
|
uint8_t effectIndex;
|
||||||
|
@ -701,8 +696,8 @@ ndk::ScopedAStatus Vibrator::getPrimitiveDuration(CompositePrimitive primitive,
|
||||||
if (!status.isOk()) {
|
if (!status.isOk()) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
// Please check the overhead time detail in b/261841035
|
|
||||||
*durationMs = mEffectDurations[effectIndex] + SETTING_TIME_OVERHEAD;
|
*durationMs = mEffectDurations[effectIndex];
|
||||||
} else {
|
} else {
|
||||||
*durationMs = 0;
|
*durationMs = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue