1
1
#ifdef COMPILE_BT
2
2
3
- #include " src/BluetoothSerial/ BluetoothSerial.h"
3
+ #include " BluetoothSerial.h"
4
4
#include < BleSerial.h> // Click here to get the library: http://librarymanager/All#ESP32_BleSerial by Avinab Malla
5
5
6
6
class BTSerialInterface
7
7
{
8
8
public:
9
- virtual bool begin (String deviceName, bool isMaster, uint16_t rxQueueSize, uint16_t txQueueSize ) = 0;
9
+ virtual bool begin (String deviceName) = 0;
10
10
virtual void disconnect () = 0;
11
11
virtual void end () = 0;
12
12
virtual esp_err_t register_callback (esp_spp_cb_t * callback) = 0;
@@ -15,7 +15,7 @@ class BTSerialInterface
15
15
virtual int available () = 0;
16
16
virtual size_t readBytes (uint8_t *buffer, size_t bufferSize) = 0;
17
17
18
- virtual bool isCongested () = 0;
18
+ // virtual bool isCongested() = 0;
19
19
virtual size_t write (const uint8_t *buffer, size_t size) = 0;
20
20
virtual void flush () = 0;
21
21
};
@@ -26,9 +26,9 @@ class BTClassicSerial : public virtual BTSerialInterface, public BluetoothSerial
26
26
// Everything is already implemented in BluetoothSerial since the code was
27
27
// originally written using that class
28
28
public:
29
- bool begin (String deviceName, bool isMaster, uint16_t rxQueueSize, uint16_t txQueueSize )
29
+ bool begin (String deviceName)
30
30
{
31
- return BluetoothSerial::begin (deviceName, isMaster, rxQueueSize, txQueueSize );
31
+ return BluetoothSerial::begin (deviceName);
32
32
}
33
33
34
34
void disconnect ()
@@ -63,7 +63,10 @@ class BTClassicSerial : public virtual BTSerialInterface, public BluetoothSerial
63
63
64
64
bool isCongested ()
65
65
{
66
- return BluetoothSerial::isCongested ();
66
+ // Removed congestion testing in v2.4
67
+ // TODO Remove settings and checking
68
+ return (false );
69
+ // return BluetoothSerial::isCongested();
67
70
}
68
71
69
72
size_t write (const uint8_t *buffer, size_t size)
@@ -82,10 +85,8 @@ class BTLESerial: public virtual BTSerialInterface, public BleSerial
82
85
{
83
86
public:
84
87
// Missing from BleSerial
85
- bool begin (String deviceName, bool isMaster, uint16_t rxQueueSuze, uint16_t txQueueSize )
88
+ bool begin (String deviceName)
86
89
{
87
- // Curretnly ignoring rxQueueSize
88
- // transmitBufferLength = txQueueSize;
89
90
BleSerial::begin (deviceName.c_str ());
90
91
return true ;
91
92
}
0 commit comments