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
GadgetBridge music commands not always working #268
Comments
I don't think so - that all looks fine to me. Maybe you could plug your phone in via USB and run |
I did not yet connect with USB, but some more information. That makes me think that the command are sent from Bangle.js, which I can see when connected to IDE. But somewhere on the way they get lost.
|
I'd need to know what you see on the phone. It's possible that somehow a lot of data gets sent to the phone (a stack trace from something broken?) and that delays the phone getting the command |
I extended the Gadgebridge widget.
Full code here:
https://github.com/Purple-Tentacle/BangleAppsDev/blob/master/apps/gbridge/widget.js
This is what I added to the end of the file:
setWatch(function() { //BTN1 if (state.music == "pause" || state.music == "stop") Bluetooth.println(JSON.stringify({t:"music", n:"play"})); else Bluetooth.println(JSON.stringify({t:"music", n:"pause"})); }, BTN1, {edge:"rising", debounce:50, repeat:true});
Connected to the IDE I can see that the play JSON is sent.
Connected to my phone, it seems that play is not always arriving on the phone.
Sometimes it needs 3 or 4 button presses to play the music.
After that it is almost always possible to toggle between play and pause with one click.
Is there something I am missing?
The text was updated successfully, but these errors were encountered: