ds4drv icon indicating copy to clipboard operation
ds4drv copied to clipboard

Add controller "splash" on connection

Open poconbhui opened this issue 8 years ago • 7 comments

This implements #89.

It's synchronous, so it freezes the controller for the 2 seconds it runs. This is to make sure the splash action and LED actions don't cancel each other out. This sort of makes the LED action obsolete, since it calls device.set_led(*(options.led)) at the end.

poconbhui avatar Jul 08 '16 07:07 poconbhui

I would prefer this happening only when a controller is connected, not when changing the profile. Or, maybe there could also be a quick rumble when you change the profile, but it should be different, probably a lot shorter.

Ape avatar Jul 08 '16 18:07 Ape

I played with the effect for a bit. I think it could be a lot quicker. In addition, full power big_rumble seems to be a bit annoying, especially if the controller is laying on a hard surface.

I think I like something like this:

splash_time = 0.5
splash_frame_counts = [4, 6, 8, 4]
# ...
big_rumble = 63
small_rumble = 255

I would also somehow use a bit less colors on the led.

We could repeat this every now and then for low battery notification (#90):

splash_time = 0.3
splash_frame_counts = [1, 2, 1, 1]
# ...
big_rumble = 31
small_rumble = 255

After finishing the audio support we could also use notification sounds for these.

Ape avatar Jul 08 '16 18:07 Ape

Oh, I didn't check it with changing profile. Sticking it in the setup section will probably fix that.

poconbhui avatar Jul 09 '16 10:07 poconbhui

That should fix splashing only on device connection.

poconbhui avatar Jul 09 '16 14:07 poconbhui

That should be the code a little cleaner and your suggestions on splash time and rumbles included. It should be a little easier to see the key frames for the LEDs. Play around with it and see if you can find a less obnoxious combination.

poconbhui avatar Jul 09 '16 15:07 poconbhui

Hey, is there anything keeping this from being merged, other than the commits needing a squash?

poconbhui avatar Jan 01 '17 17:01 poconbhui

Huh.. I actually implemented something similar to this using custom scripts that ran when bindings were executed. The script does a notify-send to display a message linked to the binding in regards to profile changing or controller disconnection (using PS+Triangle). I wonder if we could do something like that with the notify2 package. Then I wouldn't need my custom scripts. :P

CorneliaXaos avatar Apr 20 '18 03:04 CorneliaXaos