All modules and core of the app was created
This commit is contained in:
@@ -26,22 +26,24 @@ class BluetoothDispatcher {
|
||||
public:
|
||||
BluetoothDispatcher(BluetoothSerial *controller, const char *device_name = "Helicopter");
|
||||
bool initialize(bool loop_on_fail = true, int readTimeoutMS = 2);
|
||||
void tick(NewPackageCallback newPackageReceivedCb = nullptr);
|
||||
void tick();
|
||||
void onNewPackageReceived(NewPackageCallback newPackageReceivedCb);
|
||||
void onNewDeviceConnected(DeviceConnectedCb deviceConnectedCb);
|
||||
void sendPackage(const char *package, size_t size);
|
||||
~BluetoothDispatcher();
|
||||
|
||||
private:
|
||||
void _onConfirmRequest(uint16_t pin);
|
||||
void _onAuthComplete(boolean success);
|
||||
void _onDeviceConnected(BTAddress device);
|
||||
void _onAuthComplete(boolean success) const;
|
||||
void _onDeviceConnected(BTAddress device) const;
|
||||
|
||||
const char *_device_name = nullptr;
|
||||
BluetoothSerial *_controller = nullptr;
|
||||
DeviceConnectedCb _deviceConnectedCallback = nullptr;
|
||||
NewPackageCallback _newPackageReceivedCb = nullptr;
|
||||
constexpr static const char *_tag = "BluetoothDispatcher";
|
||||
|
||||
static constexpr uint16_t _buffer_size = 512;
|
||||
static constexpr uint16_t _available_buffer_size = 500;
|
||||
static constexpr uint16_t _buffer_size = 522;
|
||||
static constexpr uint16_t _available_buffer_size = 512;
|
||||
mString<_buffer_size> _buffer;
|
||||
};
|
||||
Reference in New Issue
Block a user