mirror of
https://github.com/pschatzmann/ESP32-A2DP.git
synced 2024-09-21 10:37:24 +00:00
Created Auto Reconnect (markdown)
parent
a1d50b0d92
commit
9bb0fe7d5f
19
Auto-Reconnect.md
Normal file
19
Auto-Reconnect.md
Normal file
@ -0,0 +1,19 @@
|
||||
It has been requested, that there should be an automatic reconnect when the connection has been lost.
|
||||
This functionality has been implemented both on the A2DP Source and the A2DP Sink.
|
||||
|
||||
I am not convinced that this is a good thing in all the cases, so I suggest that you explicitly specify if you want to have it active or not with the help of the set_auto_reconnect(bool) method.
|
||||
To open a Sink w/o reconnect the code would look as follows:
|
||||
|
||||
```
|
||||
#include "BluetoothA2DPSink.h"
|
||||
|
||||
BluetoothA2DPSink a2dp_sink;
|
||||
|
||||
void setup() {
|
||||
a2dp_sink.set_auto_reconnect(false);
|
||||
a2dp_sink.start("MyMusic");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue
Block a user