サイコン用プログラム BLE通信送信確認

Dependencies:   mbed BLE_API nRF51822

Files at this revision

API Documentation at this revision

Comitter:
mbed_tw_hoehoe
Date:
Wed Mar 18 15:29:26 2015 +0000
Parent:
11:5a3dcafaffbb
Child:
13:7b4edf8b8c1b
Commit message:
bug fix.

Changed in this revision

BLE_API.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
nRF51822.lib Show annotated file Show diff for this revision Revisions of this file
--- a/BLE_API.lib	Sun Mar 15 12:13:13 2015 +0000
+++ b/BLE_API.lib	Wed Mar 18 15:29:26 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#ecbc3405c66e
+http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#d87182a62c1b
--- a/main.cpp	Sun Mar 15 12:13:13 2015 +0000
+++ b/main.cpp	Wed Mar 18 15:29:26 2015 +0000
@@ -15,10 +15,10 @@
 #endif // #if NEED_CONSOLE_OUTPUT //
 */
 
-//#define MIN_CONN_INTERVAL 250  /**< Minimum connection interval (250 ms) */
-//#define MAX_CONN_INTERVAL 350  /**< Maximum connection interval (350 ms). */
-#define CONN_INTERVAL 250  /**< Minimum connection interval (250 ms) */
-#define CONN_SUP_TIMEOUT  6000 /**< Connection supervisory timeout (6 seconds). */
+//#define MIN_CONN_INTERVAL 250  /**< Minimum connection interval */
+//#define MAX_CONN_INTERVAL 350  /**< Maximum connection interval */
+#define CONN_INTERVAL 313  /**< connection interval 250ms; in multiples of 0.125ms. (durationInMillis * 1000) / UNIT_0_625_MS; */
+#define CONN_SUP_TIMEOUT  8000 /**< Connection supervisory timeout (6 seconds); in multiples of 0.125ms. */
 #define SLAVE_LATENCY     4
 
 
@@ -126,7 +126,7 @@
     memcpy(accelPayload+sizeof(float)*7, &t, sizeof(t));
     timer.reset();
 
-    interval = (float)CONN_INTERVAL;
+    interval = (float)Gap::MSEC_TO_GAP_DURATION_UNITS(CONN_INTERVAL);
     memcpy(accelPayload+sizeof(float)*8, &interval, sizeof(interval));
 
     ble.updateCharacteristicValue(accelChar.getValueAttribute().getHandle(), accelPayload, sizeof(accelPayload));    //Mod
--- a/mbed.bld	Sun Mar 15 12:13:13 2015 +0000
+++ b/mbed.bld	Wed Mar 18 15:29:26 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file
--- a/nRF51822.lib	Sun Mar 15 12:13:13 2015 +0000
+++ b/nRF51822.lib	Wed Mar 18 15:29:26 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#e95e35845e1c
+http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#f96993b65e90