From f31f8db2542715c410366e7de9614c68d6963f92 Mon Sep 17 00:00:00 2001 From: RobertoHE Date: Mon, 27 Jun 2022 13:43:20 +0200 Subject: [PATCH] Code Example changed for new settings struct --- examples/MidiBle_Client/MidiBle_Client.ino | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/MidiBle_Client/MidiBle_Client.ino b/examples/MidiBle_Client/MidiBle_Client.ino index 5109890..120adf9 100644 --- a/examples/MidiBle_Client/MidiBle_Client.ino +++ b/examples/MidiBle_Client/MidiBle_Client.ino @@ -28,21 +28,22 @@ #include #include - struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettings { - static const size_t MaxBufferSize = 16; -}; - #include - //#include //#include //#include -BLEMIDI_CREATE_CUSTOM_INSTANCE("Esp32-BLE-MIDI", MIDI, CustomBufferSizeSettings); // Connect to first server found +//See DefaultSettingsClient in hardware/BLEMIDI_Client_ESP32.h for more configurable settings +// If you do not redefine a parameter, it will use the default value for these parameter +struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettingsClient { + static const size_t MaxBufferSize = 16; +}; -//BLEMIDI_CREATE_INSTANCE("",MIDI) //Connect to the first server found -//BLEMIDI_CREATE_INSTANCE("f2:c1:d9:36:e7:6b",MIDI) //Connect to a specific BLE address server -//BLEMIDI_CREATE_INSTANCE("MyBLEserver",MIDI) //Connect to a specific name server +BLEMIDI_CREATE_CUSTOM_INSTANCE("Esp32-BLE-MIDI", MIDI, CustomBufferSizeSettings); // Connect to a server named "Esp32-BLE-MIDI" and use CustomBufferSizeSettings as settings of client + +//BLEMIDI_CREATE_INSTANCE("",MIDI) //Connect to the first server found, using default settings +//BLEMIDI_CREATE_INSTANCE("f2:c1:d9:36:e7:6b",MIDI) //Connect to a specific BLE address server, using default settings +//BLEMIDI_CREATE_INSTANCE("MyBLEserver",MIDI) //Connect to a specific name server, using default settings #ifndef LED_BUILTIN #define LED_BUILTIN 2 //modify for match with yout board