Code refactoring

This commit is contained in:
2024-01-27 21:35:57 +07:00
parent 2aa9648dd4
commit fa0a664e43
14 changed files with 57 additions and 40 deletions

View File

@@ -25,7 +25,7 @@ typedef std::function<void(char *package)> NewPackageCallback;
class BluetoothDispatcher {
public:
BluetoothDispatcher(BluetoothSerial *controller, const char *device_name = "Helicopter");
bool initialize(bool loop_on_fail = true, int readTimeoutMS = 2);
bool initialize(volatile bool loop_on_fail = true, int readTimeoutMS = 2);
void tick();
void onNewPackageReceived(NewPackageCallback newPackageReceivedCb);
void onNewDeviceConnected(DeviceConnectedCb deviceConnectedCb);