Andriy Makukha
/
football_project_wo_output
football_project_wo_output
Fork of football_project by
Diff: main.cpp
- Revision:
- 91:0fc897cccc06
- Parent:
- 90:b4d53a870147
- Child:
- 92:a9ebe6d0a0fa
--- a/main.cpp Sun Jun 12 05:10:34 2016 +0000 +++ b/main.cpp Sun Jun 12 09:03:16 2016 +0000 @@ -13,14 +13,13 @@ #ifdef BLE_ENABLE BLEDevice ble; -DFUService dfu(ble); + +// Optional: Device Name, add for human read-ability +const static char DEVICE_NAME[] = "PassiveCoach"; -/* Optional: Device Name, add for human read-ability */ -//const static char DEVICE_NAME[] = "PassiveCoach"; - -/* You have up to 26 bytes of advertising data to use. */ +// You have up to 26 bytes of advertising data to use. //const static uint8_t AdvData[] = {0x01,0x02,0x03,0x04,0x05}; /* Example of hex data */ -//const static uint8_t AdvData[] = {"Keep the Space!"}; /* Example of character data */ +const static uint8_t AdvData[] = {"Keep the Space!"}; /* Example of character data */ #endif // BLE_ENABLE /////////////////////////////////// PINS /////////////////////////////////// @@ -141,7 +140,6 @@ } #ifdef BLE_ENABLE -/* // Optional: Restart advertising when peer disconnects void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params) { @@ -197,7 +195,6 @@ // Start advertising ble.gap().startAdvertising(); } -*/ #endif // BLE_ENABLE /////////////////////////////////// CLASSES /////////////////////////////////// @@ -337,10 +334,9 @@ #ifdef BLE_ENABLE // BLE initialization - /* BLE& ble = BLE::Instance(BLE::DEFAULT_INSTANCE); ble.init(bleInitComplete); // Initialize BLE baselayer - */ + DFUService dfu( ble ); #endif // BLE_ENABLE // Pick node number @@ -478,7 +474,7 @@ } #ifdef BLE_ENABLE -// ble.waitForEvent(); -#endif + ble.waitForEvent(); +#endif // BLE_ENABLE } } \ No newline at end of file