Commit cac72c91 authored by Florent Revest's avatar Florent Revest

ngfd: Bump SRCREV and use a new type of events, modified for the needs of ngfd 1.0 and of asteroid

parent 1b774ae1
From e4b515f61f80c85c1142d9b406fee919408ffb7f Mon Sep 17 00:00:00 2001
From: Florent Revest <revestflo@gmail.com>
Date: Sun, 14 May 2017 17:40:11 +0200
Subject: [PATCH] haptics: Always vibrate on calendar and clock events
---
src/ngf/haptic.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/ngf/haptic.c b/src/ngf/haptic.c
index 795adae..e3c4dde 100644
--- a/src/ngf/haptic.c
+++ b/src/ngf/haptic.c
@@ -57,6 +57,12 @@ n_haptic_can_handle (NSinkInterface *iface, NRequest *request)
call_state = (NValue*) n_context_get_value (context,
"call_state.mode");
+ /* Always vibrate on Alarms regardless of enabled
+ * https://github.com/AsteroidOS/asteroid-launcher/issues/17 */
+ if (strcmp (event_name, "clock") == 0 || strcmp (event_name, "calendar") == 0) {
+ return TRUE;
+ }
+
if (touch_level == NULL) {
N_WARNING (LOG_CAT "No value for touchscreen.vibration.level!");
}
--
2.11.0
[ffmemless]
# System wide effect settings file evironment variable.
# The if there are parameters for any effects in the system settings file
# pointed by the given environment variable, they will override the effect
# settings for those effects. Other effects remain unchanged.
system_effects_env = NGF_FFMEMLESS_SETTINGS
# EXAMPLE: re-define short in system settings file
# export NGF_FFMEMLESS_SETTINGS=/path/to/my/feedback.ini
# contents of "feedback.ini" would look like this
#[ffmemless]
#short_TYPE = rumble
#short_DURATION = 110
#short_DELAY = 1
#short_MAGNITUDE = 56000
#
# Please note that the [ffmemless] tag is needed for glib to find the effects.
# Now this will change the short settings to what they are above.
# All effect names must be listed here, otherwise they don't get created
supported_effects = short;long;strong;batterylow;ringtone;clock;sms
# Setting up the effect parameters.
# - The only mandatory parameter is _TYPE, if it's missing effect is not created
# - Full list of valid parameter value ranges below
#
# - Generic parameters for all effect types
#
# _TYPE = [rumble|periodic], no default, mandatory parameter
# _DIRECTION = [forward|reverse], defaults to forward
# _DURATION = [0,65535], milliseconds, defaults to NGF_DEFAULT_DURATION
# _DELAY = [0,65535], milliseconds before starting playback, defaults to 0
#
# _REPEAT = [1,4294967295], how many times to repeat effect, defaults to 1
# Please note that if the event has "sound.repeat" enabled,
# the effect is repeated until stop signal regardless of _REPEAT
# value.
#
# - Type specific parameters for rumble effects:
#
# _MAGNITUDE = [0,65535], defaults to NGF_DEFAULT_RMAGNITUDE
#
# -Type specific parameters for periodic effects
#
# _WAVEFORM = [sine|triangle|square], defaults to sine
# _PERIOD = [0,65535], defaults to 0
# _MAGNITUDE = [0,32767], defaults to NGF_DEFAULT_PMAGNITUDE
# _OFFSET = [0,32767], defaults to 0
# _PHASE = [0,65535], in milliseconds, defaults to 0
# _ATTACK = [0,65535], in milliseconds, defaults to 0
# _ALEVEL = [0,32767], defaults to 0
# _FADE = [0,65535], in milliseconds, defaults to 0
# _FLEVEL = [0,32767], defaults to 0
short_TYPE = rumble
short_DURATION = 240
short_DELAY = 0
short_MAGNITUDE = 27000
long_TYPE = periodic
long_WAVEFORM = sine
long_DURATION = 850
long_PERIOD = 150
long_MAGNITUDE = 15383
long_ATTACK = 0
long_ALEVEL = 0
long_FADE = 180
long_FLEVEL = 0
strong_TYPE = rumble
strong_DURATION = 320
strong_DELAY = 0
strong_MAGNITUDE = 65535
batterylow_TYPE = periodic
batterylow_WAVEFORM = sine
batterylow_DURATION = 120
batterylow_REPEAT = 2
batterylow_DELAY = 40
batterylow_PERIOD = 150
batterylow_MAGNITUDE = 19383
batterylow_OFFSET = 0
batterylow_PHASE = 0
batterylow_DIRECTION = forward
batterylow_ATTACK = 0
batterylow_ALEVEL = 0
batterylow_FADE = 180
batterylow_FLEVEL = 0
sms_TYPE = periodic
sms_WAVEFORM = sine
sms_DURATION = 240
sms_REPEAT = 2
sms_DELAY = 140
sms_PERIOD = 50
sms_MAGNITUDE = 27000
sms_OFFSET = 0
sms_PHASE = 0
sms_DIRECTION = forward
sms_ATTACK = 0
sms_ALEVEL = 0
sms_FADE = 80
sms_FLEVEL = 0
ringtone_TYPE = periodic
ringtone_WAVEFORM = sine
ringtone_DURATION = 2400
ringtone_DELAY = 400
ringtone_PERIOD = 100
ringtone_MAGNITUDE = 16383
ringtone_OFFSET = 0
ringtone_PHASE = 0
ringtone_DIRECTION = forward
ringtone_ATTACK = 500
ringtone_ALEVEL = 2560
ringtone_FADE = 300
ringtone_FLEVEL = 4096
clock_TYPE = periodic
clock_WAVEFORM = sine
clock_DURATION = 4000
clock_DELAY = 500
clock_PERIOD = 100
clock_MAGNITUDE = 8000
clock_OFFSET = 0
clock_PHASE = 0
clock_DIRECTION = forward
clock_ATTACK = 1000
clock_ALEVEL = 0
clock_FADE = 400
clock_FLEVEL = 0
[chat => play.mode=*,context@profile.current_profile=meeting]
ffmemless.effect = NGF_SHORT
haptic.type = alarm
[chat => play.mode=short]
immvibe.filename = /usr/share/sounds/vibra/tct_small_alert.ivt
ffmemless.effect = NGF_SHORT
haptic.type = alarm
[chat]
immvibe.profile = im.alert.pattern@general => immvibe.filename
immvibe.profile.fallback = im.alert.pattern@fallback => immvibe.filename
immvibe.lookup = true
ffmemless.effect = NGF_SHORT
haptic.type = alarm
[alarm]
ffmemless.effect = clock
haptic.type = event
[notif_normal]
haptic.effect = short
haptic.type = event
[notif_silent]
mce.led_pattern = PatternCommunication
[notif_strong]
haptic.effect = strong
haptic.type = event
[press]
haptic.effect = short
haptic.type = event
[information_strong]
immvibe.filename = /usr/share/sounds/vibra/tct_information_strong.ivt
ffmemless.effect = NGF_STRONG
haptic.type = alarm
\ No newline at end of file
[general]
plugins = dbus;transform;resource;profile;streamrestore;mce;gst
plugins = dbus;transform;resource;profile;mce;gst
plugins-optional = droid-vibrator;ffmemless;callstate
sink-order = gst
[keytypes]
sound.repeat = BOOLEAN
mce.backlight_on = BOOLEAN
tonegen.pattern = STRING
tonegen.volume = INTEGER
core.max_timeout = INTEGER
transform.allow_custom = BOOLEAN
......@@ -6,11 +6,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
SRC_URI = "git://git.merproject.org/mer-core/ngfd.git;protocol=https \
file://ngfd.ini \
file://ngfd.service \
file://chat.ini \
file://information_strong.ini \
file://0001-haptics-Always-vibrate-on-calendar-and-clock-events.patch \
file://events.d/ \
file://50-ffmemless.ini \
file://0002-ffmemless-Reserve-enough-space-for-sprintf.patch"
SRCREV = "fbeea2a48bebd3faaac1ee84a144f797ac9006fc"
SRCREV = "f400b0ade5ca13af7d7cca8d360117ca0b60f112"
PR = "r1"
PV = "+git${SRCPV}"
S = "${WORKDIR}/git"
......@@ -32,8 +31,10 @@ do_install_append() {
ln -s /usr/lib/systemd/user/ngfd.service ${D}/home/ceres/.config/systemd/user/default.target.wants/ngfd.service
fi
cp ../information_strong.ini ${D}/usr/share/ngfd/events.d/information_strong.ini
cp ../chat.ini ${D}/usr/share/ngfd/events.d/chat.ini
rm -r ${D}/usr/share/ngfd/events.d/
cp -r ../events.d/ ${D}/usr/share/ngfd/events.d/
cp ../50-ffmemless.ini ${D}/usr/share/ngfd/plugins.d/
install -d ${D}/usr/share/sounds/
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment