summaryrefslogtreecommitdiff
path: root/libs/input/VirtualInputDevice.cpp
diff options
context:
space:
mode:
author Lais Andrade <lsandrade@google.com> 2024-07-24 15:35:07 +0100
committer Lais Andrade <lsandrade@google.com> 2024-08-07 12:59:49 +0100
commit045376e48288059240eb81404d20b3a28a31e2ba (patch)
tree9c875c0bda5163a5d245326af05bfa769733e699 /libs/input/VirtualInputDevice.cpp
parent0335b3600a3182352be50e2adf1d160369327696 (diff)
Add scale factor field to HapticScale
Add extra field scale factor to the ExtenalVibratorService result to support continuous scaling haptic channels based on a float scale. The new updated scale function still converges to 1.0 when it's scaling up the haptic data, but it no longer applies distortion of the vibration waveform when it scales down the amplitude. The new scaling is defined as: (scale_factor * amplitude) when scale_factor <= 1 (scale_factor * amplitude) / (1 + (scale_factor - 1) * amplitude^2) when scale_factor > 1 Bug: 356407385 Flag: android.os.vibrator.haptics_scale_v2_enabled Test: libvibrator_tests Change-Id: Ibde6699bf23614e27b50e1ff79e364d942499187
Diffstat (limited to 'libs/input/VirtualInputDevice.cpp')
0 files changed, 0 insertions, 0 deletions