Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: source/BleDevicePeripheral.cpp
- Revision:
- 11:d6ed1437c2ee
- Parent:
- 10:d845189d146e
--- a/source/BleDevicePeripheral.cpp Fri Jun 14 10:24:57 2019 +0200
+++ b/source/BleDevicePeripheral.cpp Thu Jun 20 13:20:24 2019 +0200
@@ -1,26 +1,12 @@
#include "BleDevicePeripheral.h"
-void ledStuff(){
-
- MyStripSingleton::getInstance()->connectionFlash();
- MyStripSingleton::getInstance()->resetColor();
-}
void BleDevicePeripheral::onConnectionComplete(const ble::ConnectionCompleteEvent &event) {
-// ble_error_t error;
- /* remember the device that connects to us now so we can connect to it
- * during the next demonstration */
-// memcpy(_peer_address, event.getPeerAddress().data(), sizeof(_peer_address));
- //TODO: Connecting to the device breaks the event queue; it should. BUT there should start some new stuff
printf("[PERIPHERAL]\t Connected to peer: ");
print_address(event.getPeerAddress().data());
_handle = event.getConnectionHandle();
printf("[PERIPHERAL]\t I'm connected to someone, what should i do now?");
+
//Dispatch forever makes sure that we stay in this state until explicitly told otherwise (on disconnect).
-
-
-// MyStripSingleton::getInstance()->connectionFlash();
-// MyStripSingleton::getInstance()->resetColor();
-// _event_queue.call(callback(ledStuff));
_event_queue.dispatch_forever();
}