reduced message bytes for BLE

Dependencies:   BLE_API mbed nRF51822

Fork of Inp_Fiber_Logo_FOTA by inupathy

Revision:
2:221df6d014f5
Parent:
1:f28bdfaf3005
Child:
3:ab649240543c
--- a/main.cpp	Thu Apr 13 06:44:10 2017 +0000
+++ b/main.cpp	Wed Apr 26 05:41:40 2017 +0000
@@ -9,6 +9,8 @@
 #include "UARTService.h"
 #include "ble_gap.h"
 
+#include "ble/services/DFUService.h" // ★OTA用
+
 #define RAINBOW_RATIO 1
 #define RCFILTER  0.9
 #define RCFILTER2  0.9
@@ -51,6 +53,7 @@
 int displayFlag = 0;
 
 BLE  ble;
+DFUService *dfuService; // ★OTA用
 
 AnalogIn HRSigIn(P0_4);
 //AnalogIn HRSigIn(P0_4);
@@ -509,6 +512,9 @@
     UARTService uartService(ble);
     uartServicePtr = &uartService;
 
+    // ★OTA用
+    dfuService = new DFUService(ble, NULL);
+
     /* Setup primary service. */
     HeartRateService hrServiceBPM(ble, BPM, HeartRateService::LOCATION_CHEST);
 //    HeartRateService hrServiceIBI(ble, IBI, HeartRateService::LOCATION_FINGER);
@@ -516,7 +522,9 @@
 //    BatteryService batteryService(ble, 100);
     
     /* Setup auxiliary service. */
-    DeviceInformationService deviceInfo(ble, "ARM", "Model1", "SN1", "hw-rev1", "fw-rev1", "soft-rev1");
+    //DeviceInformationService deviceInfo(ble, "ARM", "Model1", "SN1", "hw-rev1", "fw-rev1", "soft-rev1");
+    // ★
+    DeviceInformationService deviceInfo(ble, "INUPATHY01", "0.0.1", "SN1", "0.0.1", "0.0.1", "0.0.1");
 
     // MACアドレスをDEVICE_NAMEに組み込む   
     setBleDeviceName(DEVICE_NAME);