Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
debs
pkg-feedbackd
Commits
551030b4
Commit
551030b4
authored
Feb 25, 2020
by
Guido Gunther
Committed by
Sebastian Krzyszkowiak
Jul 09, 2020
Browse files
rumble: Use a default pause
Without that multiple counts sound odd so let's have good defaults.
parent
200ec773
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/fbd-feedback-vibra-rumble.c
View file @
551030b4
...
...
@@ -122,7 +122,7 @@ fbd_feedback_vibra_rumble_start_vibra (FbdFeedbackVibra *vibra)
self
->
rumble
=
(
duration
/
self
->
count
)
-
self
->
pause
;
if
(
self
->
rumble
<=
0
)
{
self
->
rumble
=
FBD_FEEDBACK_VIBRA_DEFAULT_DURATION
;
self
->
pause
=
0
;
self
->
pause
=
FBD_FEEDBACK_VIBRA_RUMBLE_DEFAULT_PAUSE
;
self
->
count
=
1
;
}
period
=
self
->
rumble
+
self
->
pause
;
...
...
@@ -162,7 +162,7 @@ fbd_feedback_vibra_rumble_class_init (FbdFeedbackVibraRumbleClass *klass)
"pause"
,
"Pause"
,
"The pause in msecs between rumbles"
,
0
,
G_MAXINT
,
0
,
0
,
G_MAXINT
,
FBD_FEEDBACK_VIBRA_RUMBLE_DEFAULT_PAUSE
,
G_PARAM_CONSTRUCT_ONLY
|
G_PARAM_READWRITE
|
G_PARAM_STATIC_STRINGS
);
g_object_class_install_properties
(
object_class
,
PROP_LAST_PROP
,
props
);
...
...
@@ -172,4 +172,5 @@ static void
fbd_feedback_vibra_rumble_init
(
FbdFeedbackVibraRumble
*
self
)
{
self
->
count
=
1
;
self
->
pause
=
FBD_FEEDBACK_VIBRA_RUMBLE_DEFAULT_PAUSE
;
}
src/fbd-feedback-vibra-rumble.h
View file @
551030b4
...
...
@@ -9,6 +9,8 @@
G_BEGIN_DECLS
#define FBD_FEEDBACK_VIBRA_RUMBLE_DEFAULT_PAUSE 100
#define FBD_TYPE_FEEDBACK_VIBRA_RUMBLE (fbd_feedback_vibra_rumble_get_type())
G_DECLARE_FINAL_TYPE
(
FbdFeedbackVibraRumble
,
fbd_feedback_vibra_rumble
,
FBD
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment