]> Devoid-pointer.net GitWeb - KLGD_FF_plugin.git/commitdiff
HIGHLY EXPERIMENTAL: Update effect timing only when it makes sense master
authorMichal Malý <madcatxster@devoid-pointer.net>
Mon, 12 Oct 2015 14:57:23 +0000 (16:57 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Mon, 12 Oct 2015 14:57:23 +0000 (16:57 +0200)
plugin/klgd_ff_plugin.c
testmod/klgdff.c

index dcccdce1aec3c755be3b2eedba2c68ec3410bca8..12d5c9d80cb4dad3f77ae27e8890b4d346742a61 100644 (file)
@@ -804,7 +804,8 @@ static void ffpl_upload_handler(struct klgd_plugin_private *priv, const struct f
                        eff->trigger = FFPL_TRIG_NOW;
                } else {
                        eff->replace = false;
-                       ffpl_update_trip_times(eff, now);
+                       if (ffpl_handle_timing(priv, ueff))
+                               ffpl_update_trip_times(eff, now);
 
                        /* The effect is yet to be started, do not try to update it */
                        if (eff->change == FFPL_TO_START)
index edd43aa3eb49e65225dbd05fa868a12f86d8df05..6f36f060e53decf3815e94421a303de5dc1af556 100644 (file)
@@ -381,12 +381,12 @@ static int __init klgdff_init(void)
 
        input_set_capability(dev, EV_FF, FF_CONSTANT);
        input_set_capability(dev, EV_FF, FF_RUMBLE);
-       /*input_set_capability(dev, EV_FF, FF_PERIODIC);
+       input_set_capability(dev, EV_FF, FF_PERIODIC);
                input_set_capability(dev, EV_FF, FF_SINE);
                input_set_capability(dev, EV_FF, FF_SQUARE);
                input_set_capability(dev, EV_FF, FF_SAW_UP);
                input_set_capability(dev, EV_FF, FF_SAW_DOWN);
-               input_set_capability(dev, EV_FF, FF_TRIANGLE);*/
+               input_set_capability(dev, EV_FF, FF_TRIANGLE);
        input_set_capability(dev, EV_FF, FF_RAMP);
        input_set_capability(dev, EV_FF, FF_SPRING);
 
@@ -400,9 +400,9 @@ static int __init klgdff_init(void)
 
        ret = ffpl_init_plugin(&ff_plugin, dev, EFFECT_COUNT,
                               FFPL_HAS_EMP_TO_SRT | FFPL_REPLACE_STARTED |
-                              //FFPL_MEMLESS_CONSTANT |
-                              //FFPL_MEMLESS_PERIODIC |
-                              //FFPL_MEMLESS_RUMBLE |
+                              FFPL_MEMLESS_CONSTANT |
+                              FFPL_MEMLESS_PERIODIC |
+                              FFPL_MEMLESS_RUMBLE |
                               FFPL_TIMING_CONDITION,
                               klgdff_control, &test_user);
        if (ret) {