vibra-pattern: Don't overwrite magnitudes
When determining the value for the rumble we assigned the result to the value in the array thus potentially overwriting the value from the theme.
This goes unnoticed as long as we don't lower the global max_strength
below the magnitude. But when we e.g. set the max_strength
to
zero the device will fail to rumble when we increase max_strength
later on again.
Steps to reproduce:
- Use an event that used
VibraRumble
, e.g.button-press
in the oneplus,fajita device theme -
fbcli -E button-pressed
-> works - set haptic feedback to 0%:
gsettings set org.sigxcpu.feedbackd max-haptic-strength 0.0
- set it back to 100%:
gsettings set org.sigxcpu.feedbackd max-haptic-strength 1.0
-
fbcli -E button-pressed
-> no feedback