Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add controller "splash" on connection #92

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

poconbhui
Copy link
Contributor

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.

@Ape
Copy link
Collaborator

Ape commented Jul 8, 2016

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
Copy link
Collaborator

Ape commented Jul 8, 2016

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.

@poconbhui
Copy link
Contributor Author

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

@poconbhui
Copy link
Contributor Author

That should fix splashing only on device connection.

@poconbhui
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@CorneliaXaos
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants