IM920のライブラリ

Files at this revision

API Documentation at this revision

Comitter:
Gaku0606
Date:
Thu Feb 22 08:52:51 2018 +0000
Parent:
0:ccdeb3bea793
Commit message:
???

Changed in this revision

IM920.cpp Show annotated file Show diff for this revision Revisions of this file
IM920.h Show annotated file Show diff for this revision Revisions of this file
diff -r ccdeb3bea793 -r 11ae0d702ecc IM920.cpp
--- a/IM920.cpp	Thu Aug 10 19:34:50 2017 +0000
+++ b/IM920.cpp	Thu Feb 22 08:52:51 2018 +0000
@@ -106,7 +106,7 @@
     //|  |    +----------------------- 受信強度、RSSI値
     //|  +---------------------------- 送信モジュールの固有ID
     //+------------------------------- ノード番号
-    char tempStr[160];
+    char tempStr[IM920_BUFF_SIZE];
     strcpy(tempStr, readBuffAddr);
     char *tok = strtok(tempStr, ",");//ノード番号
     node = ((asciiToNumber(tok[0]) << 4)) | asciiToNumber(tok[1]);
@@ -144,6 +144,7 @@
     }
 
     if(c == '\r'){//文字列終了
+        printf("\r\n");
         writeBuffAddr[current] = '\0';
         if(AB == BUFF_A){//現在バッファAに書き込み中
             readBuffAddr = buff_A;
@@ -164,11 +165,11 @@
             if(current > 9){
                 //データの取り出し、配列化
                 data_analyze();
-                for(int i = 0;i < 64;i++){
+                /*for(int i = 0;i < 64;i++){
                     printf("%d ",data[i]);   
                 }
                 printf("\r\n");
-                //printf("header: %0X\r\n",(uint8_t)data[0]);
+                printf("header: %0X\r\n",(uint8_t)data[0]);*/
                 //header0xFF();
                 // 関数の呼び出し
                 (*p_callFunc[(uint8_t)data[0]])();
diff -r ccdeb3bea793 -r 11ae0d702ecc IM920.h
--- a/IM920.h	Thu Aug 10 19:34:50 2017 +0000
+++ b/IM920.h	Thu Feb 22 08:52:51 2018 +0000
@@ -2,7 +2,7 @@
 #define _IM920_H_
 #include "mbed.h"
 
-#define IM920_BUFF_SIZE 160
+#define IM920_BUFF_SIZE 216
 
 const int FUNC_NUMBER = 256;