Bluetooth Low Energy enabled device with "Switch" feature, compatible with BlueST Protocol.

Bluetooth Low Energy enabled device with "Switch" feature, compatible with BlueST Protocol.

Revision:
5:1651815d2a74
Parent:
4:67ff1ddd11e2
Child:
6:d00b2e9a016e
--- a/source/main.cpp	Thu May 31 18:30:29 2018 +0000
+++ b/source/main.cpp	Thu May 31 19:02:30 2018 +0000
@@ -88,17 +88,18 @@
  * @param[in] params
  *     Information about the characterisitc being updated.
  */
+/*
 void on_data_read_callback(const GattReadCallbackParams *params) {
     static uint16_t time_stamp = 0;
 
     if (params->handle == custom_service->getValueHandle()) {
         // Reading led state and sending it via bluetooth.
         if (BLE::Instance().getGapState().connected) {
-            switch_state = led_state.read() ? CustomService::SWITCH_ON : CustomService::SWITCH_OFF;
-            event_queue.call(Callback<void(uint16_t, uint8_t)>(custom_service, &CustomService::send_state), time_stamp++, switch_state);
+            event_queue.call(Callback<void(uint16_t, uint8_t)>(custom_service, &CustomService::send_state), time_stamp++, led_state.read() ? CustomService::SWITCH_ON : CustomService::SWITCH_OFF);
         }
     }
 }
+*/
 
 /**
  * This callback allows the custom service to write updates to the