Update BLEMIDI_Client_ESP32.h
Callback method added that returns the name of the connected BLE-MIDI device
This commit is contained in:
parent
fe1a17dfb7
commit
db8a00a9f1
|
|
@ -228,6 +228,7 @@ private:
|
|||
BLERemoteCharacteristic *_characteristic = nullptr;
|
||||
BLERemoteService *pSvc = nullptr;
|
||||
bool firstTimeSend = true; //First writeValue get sends like Write with reponse for clean security flags. After first time, all messages are send like WriteNoResponse for increase transmision speed.
|
||||
char connectedDeviceName[24];
|
||||
|
||||
BLEMIDI_Transport<class BLEMIDI_Client_ESP32> *_bleMidiTransport = nullptr;
|
||||
|
||||
|
|
@ -303,6 +304,12 @@ protected:
|
|||
_bleMidiTransport->_connectedCallback();
|
||||
}
|
||||
firstTimeSend = true;
|
||||
|
||||
if (_bleMidiTransport->_connectedCallbackDeviceName)
|
||||
{
|
||||
sprintf(connectedDeviceName, "%s", myAdvCB.advDevice.getName().c_str());
|
||||
_bleMidiTransport->_connectedCallbackDeviceName(connectedDeviceName);
|
||||
}
|
||||
}
|
||||
|
||||
void disconnected()
|
||||
|
|
|
|||
Loading…
Reference in New Issue