[-]
[+]
|
Changed |
_service:tar_git:ngfd.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:ngfd.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -10,4 +10,5 @@
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
-</service></services>
+</service>
+</services>
|
|
Changed |
_service:tar_git:ngfd-1.2.5+master.20210621182950.5.g759132e.tar.gz/src/ngf/.dirstamp
^
|
[-]
[+]
|
Changed |
_service:tar_git:ngfd-1.3.0.tar.gz/configure.ac
^
|
@@ -1,5 +1,5 @@
AC_PREREQ(2.61)
-AC_INIT(ngfd, 1.2.5)
+AC_INIT(ngfd, 1.3.0)
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_MACRO_DIR([m4])
|
[-]
[+]
|
Changed |
_service:tar_git:ngfd-1.3.0.tar.gz/data/plugins.d/50-ffmemless.ini
^
|
@@ -20,7 +20,7 @@
# All effect names must be listed here, otherwise they don't get created
-supported_effects = touch;short;strong;long;notice;message;attention;alarm;ringtone
+supported_effects = touch;touch_weak;touch_strong;release;release_weak;release_strong;drag_start;drag_fail;drag_boundary_drag_end;short;strong;long;notice;message;attention;alarm;ringtone
# Setting up the effect parameters.
# - The only mandatory parameter is _TYPE, if it's missing effect is not created
@@ -59,6 +59,51 @@
touch_DELAY = 0
touch_MAGNITUDE = 24000
+touch_weak_TYPE = rumble
+touch_weak_DURATION = 40
+touch_weak_DELAY = 0
+touch_weak_MAGNITUDE = 20000
+
+touch_strong_TYPE = rumble
+touch_strong_DURATION = 40
+touch_strong_DELAY = 0
+touch_strong_MAGNITUDE = 30000
+
+release_TYPE = rumble
+release_DURATION = 20
+release_DELAY = 0
+release_MAGNITUDE = 24000
+
+release_weak_TYPE = rumble
+release_weak_DURATION = 20
+release_weak_DELAY = 0
+release_weak_MAGNITUDE = 20000
+
+release_strong_TYPE = rumble
+release_strong_DURATION = 20
+release_strong_DELAY = 0
+release_strong_MAGNITUDE = 30000
+
+drag_start_TYPE = rumble
+drag_start_DURATION = 20
+drag_start_DELAY = 0
+drag_start_MAGNITUDE = 25000
+
+drag_fail_TYPE = rumble
+drag_fail_DURATION = 25
+drag_fail_DELAY = 0
+drag_fail_MAGNITUDE = 25000
+
+drag_boundary_TYPE = rumble
+drag_boundary_DURATION = 30
+drag_boundary_DELAY = 0
+drag_boundary_MAGNITUDE = 25000
+
+drag_end_TYPE = rumble
+drag_end_DURATION = 40
+drag_end_DELAY = 0
+drag_end_MAGNITUDE = 25000
+
short_TYPE = rumble
short_DURATION = 80
short_DELAY = 0
|
[-]
[+]
|
Changed |
_service:tar_git:ngfd-1.3.0.tar.gz/src/include/ngf/haptic.h
^
|
@@ -62,15 +62,24 @@
*
* alarm and ringtone effects should repeat indefinitely.
*/
-#define N_HAPTIC_EFFECT_TOUCH "touch"
-#define N_HAPTIC_EFFECT_SHORT "short"
-#define N_HAPTIC_EFFECT_STRONG "strong"
-#define N_HAPTIC_EFFECT_LONG "long"
-#define N_HAPTIC_EFFECT_NOTICE "notice"
-#define N_HAPTIC_EFFECT_MESSAGE "message"
-#define N_HAPTIC_EFFECT_ATTENTION "attention"
-#define N_HAPTIC_EFFECT_ALARM "alarm"
-#define N_HAPTIC_EFFECT_RINGTONE "ringtone"
+#define N_HAPTIC_EFFECT_DRAG_START "drag_start"
+#define N_HAPTIC_EFFECT_RELEASE_WEAK "release_weak"
+#define N_HAPTIC_EFFECT_DRAG_FAIL "drag_fail"
+#define N_HAPTIC_EFFECT_DRAG_BOUNDARY "drag_boundary"
+#define N_HAPTIC_EFFECT_TOUCH_WEAK "touch_weak"
+#define N_HAPTIC_EFFECT_DRAG_END "drag_end"
+#define N_HAPTIC_EFFECT_RELEASE "release"
+#define N_HAPTIC_EFFECT_TOUCH "touch"
+#define N_HAPTIC_EFFECT_RELEASE_STRONG "release_strong"
+#define N_HAPTIC_EFFECT_TOUCH_STRONG "touch_strong"
+#define N_HAPTIC_EFFECT_SHORT "short"
+#define N_HAPTIC_EFFECT_STRONG "strong"
+#define N_HAPTIC_EFFECT_LONG "long"
+#define N_HAPTIC_EFFECT_NOTICE "notice"
+#define N_HAPTIC_EFFECT_MESSAGE "message"
+#define N_HAPTIC_EFFECT_ATTENTION "attention"
+#define N_HAPTIC_EFFECT_ALARM "alarm"
+#define N_HAPTIC_EFFECT_RINGTONE "ringtone"
/* Supported haptic classes */
#define N_HAPTIC_CLASS_UNDEFINED (0)
|
[-]
[+]
|
Changed |
_service:tar_git:ngfd-1.3.0.tar.gz/src/plugins/devicelock/plugin.c
^
|
@@ -22,7 +22,6 @@
#include <ngf/plugin.h>
#include <ngf/core-dbus.h>
#include <dbus/dbus.h>
-#include <mce/dbus-names.h>
#define LOG_CAT "devicelock: "
#define DEVICE_LOCK_KEY "device_lock.state"
|
[-]
[+]
|
Changed |
_service:tar_git:ngfd-1.3.0.tar.gz/src/plugins/ffmemless/ffmemless.c
^
|
@@ -127,4 +127,4 @@
int ffmemless_has_feature(__u16 type, unsigned long features[4]) {
return test_bit(type, features);
-}
\ No newline at end of file
+}
|
[-]
[+]
|
Changed |
_service:tar_git:ngfd-1.3.0.tar.gz/src/plugins/ffmemless/plugin.c
^
|
@@ -38,6 +38,7 @@
#define FFM_DEVFILE_KEY "device_file_path"
#define FFM_EFFECTLIST_KEY "supported_effects"
#define FFM_SOUND_REPEAT_KEY "sound.repeat"
+#define FFM_HAPTIC_DURATION_KEY "haptic.duration"
#define FFM_MAX_PARAM_LEN 80
#define NGF_DEFAULT_DURATION 240
@@ -55,15 +56,15 @@
N_PLUGIN_VERSION("0.10")
struct ffm_effect_data {
-#ifdef CACHE_EFFECTS
- struct ff_effect cached_effect;
-#endif
NRequest *request;
NSinkInterface *iface;
int id;
int repeat;
guint playback_time;
int poll_id;
+#ifdef CACHE_EFFECTS
+ struct ff_effect cached_effect;
+#endif
};
static struct ffm_data {
@@ -241,11 +242,7 @@
/* Load the default fall-back effect and insert it to effects table */
static int ffm_setup_default_effect(GHashTable *effects, int dev_fd)
{
-// #ifdef CACHE_EFFECTS
-// #define ff data->cached_effect
-// #else
struct ff_effect ff;
-// #endif
struct ffm_effect_data *data;
memset(&ff, 0, sizeof(struct ff_effect));
@@ -291,7 +288,6 @@
data->id = ff.id;
N_DEBUG (LOG_CAT "Added effect %s, id %d", N_HAPTIC_EFFECT_DEFAULT, ff.id);
-#undef ff
return 0;
}
@@ -303,11 +299,7 @@
{
const char *value;
char *key;
-// #ifdef CACHE_EFFECTS
-// #define ff data->cached_effect
-// #else
struct ff_effect ff;
-// #endif
struct ffm_effect_data *data;
// We're using just an int to map to the array below.
__s16 custom_data[sizeof(int)/sizeof(__s16)] = { 0 };
@@ -540,7 +532,6 @@
}
return 0;
-#undef ff
ffm_eff_error1:
g_hash_table_destroy(ffm.effects);
return -1;
@@ -660,6 +651,7 @@
const struct ffm_effect_data *data;
struct ffm_effect_data *copy;
gboolean repeat;
+ guint playback_time;
const gchar *key;
N_DEBUG (LOG_CAT "prepare");
@@ -677,12 +669,19 @@
memcpy(copy, data, sizeof(struct ffm_effect_data));
repeat = n_proplist_get_bool (props, FFM_SOUND_REPEAT_KEY);
- if (repeat) {
+ playback_time = n_proplist_get_uint (props, FFM_HAPTIC_DURATION_KEY);
+ if (repeat || playback_time) {
+ /*
+ * If duration was not defined, it's zero and we don't report playback
+ * done. Otherwise, as effects are already stored by the kernel we just
+ * keep repeating them until timer runs out and effect ends.
+ */
copy->repeat = INT32_MAX; /* repeat to "infinity" */
- copy->playback_time = 0; /* don't report playback done */
+ copy->playback_time = playback_time;
}
- N_DEBUG (LOG_CAT "prep effect %s, repeat %d times", key, copy->repeat);
+ N_DEBUG (LOG_CAT "prep effect %s, repeat %d times, duration of %d ms",
+ key, copy->repeat, copy->playback_time);
n_request_store_data(request, FFM_KEY, copy);
n_sink_interface_synchronize(iface, request);
|