vibra-periodic: Use better defaults for fade-in-*

Lets start at zero when not specified otherwise and also set an
arbitrary fade-in-time as setting it to the duration isn't very helpful.

While at that move the defaults to the feedback rather than the device
so we ensure consistency over different device implementations.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
Guido Günther
2025-03-21 12:14:55 +01:00
parent 89b33dcbab
commit 91c34f4099
2 changed files with 8 additions and 14 deletions
-9
View File
@@ -283,15 +283,6 @@ fbd_dev_vibra_periodic (FbdDevVibra *self,
g_return_val_if_fail (FBD_IS_DEV_VIBRA (self), FALSE);
if (!magnitude)
magnitude = 0.5;
if (!fade_in_level)
fade_in_level = magnitude;
if (!fade_in_time)
fade_in_time = duration;
effect.type = FF_PERIODIC;
effect.id = -1;
effect.u.periodic.waveform = FF_SINE;