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
Loading
Please register or sign in to comment