Code Example changed for new settings struct
This commit is contained in:
parent
fe3412b289
commit
f31f8db254
|
|
@ -28,21 +28,22 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <BLEMIDI_Transport.h>
|
#include <BLEMIDI_Transport.h>
|
||||||
|
|
||||||
struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettings {
|
|
||||||
static const size_t MaxBufferSize = 16;
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <hardware/BLEMIDI_Client_ESP32.h>
|
#include <hardware/BLEMIDI_Client_ESP32.h>
|
||||||
|
|
||||||
//#include <hardware/BLEMIDI_ESP32_NimBLE.h>
|
//#include <hardware/BLEMIDI_ESP32_NimBLE.h>
|
||||||
//#include <hardware/BLEMIDI_ESP32.h>
|
//#include <hardware/BLEMIDI_ESP32.h>
|
||||||
//#include <hardware/BLEMIDI_ArduinoBLE.h>
|
//#include <hardware/BLEMIDI_ArduinoBLE.h>
|
||||||
|
|
||||||
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_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("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_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
|
#ifndef LED_BUILTIN
|
||||||
#define LED_BUILTIN 2 //modify for match with yout board
|
#define LED_BUILTIN 2 //modify for match with yout board
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue