Kris Scholte Lubberink
/
SSS_Ble
Ble for smart sOlutions
Diff: source/BleDevice.h
- Revision:
- 7:9cda1b0f25ae
- Parent:
- 6:ee9c86f06eae
- Child:
- 8:369b80cef5ae
diff -r ee9c86f06eae -r 9cda1b0f25ae source/BleDevice.h --- a/source/BleDevice.h Mon May 20 09:55:38 2019 +0200 +++ b/source/BleDevice.h Mon May 20 13:20:35 2019 +0200 @@ -108,11 +108,13 @@ virtual ~BleDevice() { + printf("[DEVICE]\t Destructing the device\r\n"); if (_ble.hasInitialized()) { _ble.shutdown(); } }; + /** Start BLE interface initialisation */ void run(int time) { @@ -173,7 +175,7 @@ Gap::Address_t addr; _ble.gap().getAddress(&addr_type, addr); print_address(addr); - printf(".... Initialized the device!"); + printf("\r\n.... Initialized the device! \r\n"); _event_queue.call_in(500, this, &BleDevice::start); }; @@ -197,8 +199,10 @@ * in our case it ends the demonstration. */ virtual void onDisconnectionComplete(const ble::DisconnectionCompleteEvent &) { - printf("Diconnected\r\n"); + printf("Disconnected\r\n"); _event_queue.break_dispatch(); + //And/or resume advertising? + }; virtual void onAdvertisingEnd(const ble::AdvertisingEndEvent &)