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

Added variable timer for play pos notification, RN_TRACK_CHANGE setter #560

Merged
merged 7 commits into from
May 28, 2024

Conversation

martinroger
Copy link
Contributor

@martinroger martinroger commented May 28, 2024

Hi @pschatzmann !

The set_avrc_rn_play_pos_callback was hardcoded to output notifications every 10s. Some may want faster playing position notifications (for example, one project I am working one requires notifications closer to 1s) so I introduced a new property to BluetoothA2DPSink call notif_interval_s and an overload of the set_avrc_rn_play_pos_callback method.

Then I got carried away and also added a wrapper for RN_TRACK_CHANGE and an example. I'm not sure if there is anything else than elm_id = 0b0000001 as a possible outcome, but at least it's there, including with an example.

@pschatzmann
Copy link
Owner

pschatzmann commented May 28, 2024

Thanks a lot for your contribution.

I would actually prefer to keep only one version of the set_avrc_rn_play_pos_callback setter method instead of 2. Can you delete the old one and add a default value for the time on your version ?

@martinroger
Copy link
Contributor Author

Thanks a lot for your contribution.

I would actually prefer to keep only one setter method instead of 2. Can you delete the old one and add a default value for the time on your version ?

Much welcome ! I actually updated the Pull request with another wrapper as you were probably writing your comment, for the TRACK_CHANGE notification.

Will delete the old setter and update the examples.

- README small update for the new wrapper for TRACK_CHANGE
- Moved all the examples together in the playing_status_callbacks.ino
- Removed the overloaded setter for avrc_rn_play_pos_callback and defaulted the notif_interval_s to 10s. Examples udpated accordingly, and put a prevention measure on setting the notif interval to 0.
@martinroger martinroger changed the title Added variable timer for play pos notification Added variable timer for play pos notification, RN_TRACK_CHANGE setter May 28, 2024
@martinroger
Copy link
Contributor Author

Thanks a lot for your contribution.

I would actually prefer to keep only one version of the set_avrc_rn_play_pos_callback setter method instead of 2. Can you delete the old one and add a default value for the time on your version ?

Should be done now ! Let me know.

@pschatzmann pschatzmann merged commit 2f9b1a1 into pschatzmann:main May 28, 2024
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.

2 participants