FanLibに対応したMSC

Dependencies:   BLE_API mbed nRF51822

Fork of nRF51822_SimpleChat_LED_kai by EQUUS_KUBOTA

Revision:
9:f30f8ff02866
Parent:
8:0d98c9aca74c
--- a/main.cpp	Wed Jan 18 05:33:13 2017 +0000
+++ b/main.cpp	Sun Feb 12 10:37:16 2017 +0000
@@ -31,16 +31,14 @@
 #include "TxPower.h"
 //#include "DFUService.h"
 
-LocalFileSystem local("local");  // マウントポイントを定義(ディレクトリパスになる)
-
 
 #define BLE_UUID_TXRX_SERVICE            0x0000 /**< The UUID of the Nordic UART Service. */
 #define BLE_UUID_TX_CHARACTERISTIC       0x0003 /**< The UUID of the TX Characteristic. */
 #define BLE_UUIDS_RX_CHARACTERISTIC      0x0002 /**< The UUID of the RX Characteristic. */
 
 #define TXRX_BUF_LEN                     20
-//#define DIGITAL_OUT_PIN                  P0_17  //nRF51, 51822
-#define DIGITAL_OUT_PIN                  P0_5  //Nano
+#define DIGITAL_OUT_PIN                  P0_17  //nRF51, 51822
+//#define DIGITAL_OUT_PIN                  P0_5  //Nano
 // TX POWER用
 #include "ble_gap.h"
 #define TX_POWER                         0
@@ -49,12 +47,16 @@
 //#define TX_POWER_CALI                    -10
 //const static char     DEVICE_NAME[]        = "nRF51DK"; // change this
 
-#define TX_POWER_CALI                      -7
-const static char     DEVICE_NAME[]        = "51822"; // change this
+//#define TX_POWER_CALI                      -7
+//const static char     DEVICE_NAME[]        = "51822"; // change this
 
 //#define TX_POWER_CALI                    -15
 //const static char     DEVICE_NAME[]        = "Nano"; // change this
 
+#define TX_POWER_CALI                      -7
+const static char     DEVICE_NAME[]        = "MN3"; // change this
+
+
 //反映してない 二箇所設定変更する場所ある
 //static int tx_power = TX_POWER + TX_POWER_CALI;
 
@@ -165,6 +167,7 @@
 //            if(led1 == 0) {
                 led1 = 1;
                 ledori1 = 0;
+                
 //            } else {
 //                led1 = 0;
 //            }
@@ -204,7 +207,7 @@
     //ここから-------------
     char bufbuf_c[20];
     uint8_t bufbuf[40];
-    sprintf(bufbuf_c, "%s", "00000001");
+    sprintf(bufbuf_c, "%s", "00000009");
     //sprintf(bufbuf_c, "%d", "02f3f538-8d11-4802-b6fc-fb6616d4cd70");
     int a;
     for(a=0; bufbuf_c[a] != '\0'; a++) {
@@ -221,7 +224,7 @@
     //ここから-------------
     char bufbuf_c[20];
     uint8_t bufbuf[40];
-    sprintf(bufbuf_c, "%s", "Mn.Out.Led");
+    sprintf(bufbuf_c, "%s", "Out.Fan");
     int a;
     for(a=0; bufbuf_c[a] != '\0'; a++) {
         bufbuf[a] = bufbuf_c[a];
@@ -287,20 +290,6 @@
     
     pc.attach( uartCB , pc.RxIrq);
     
-    
-    FILE *fp;
-    FILE *fpr;
-    char ch[40];
- 
-    fp = fopen("/local/out.txt", "w");  // ファイルを書き込みモードで開く
-    fprintf(fp, "Hello World!");
-    fclose(fp);
-    
-    fpr = fopen("/local/out.txt", "r");
-    fscanf(fp, "%s", ch);
-    pc.printf("%s\r\n",ch);
-    
-    
    //txPowerService = new TxPowerService(ble, -40);
    //txPowerService->updateTxPower(TX_POWER);