RN41/42 control lib. RN41/42 is bluetooth module with class 1 or 2.
Dependencies: StrLib myTimer RingBuffer
Diff: RN41.cpp
- Revision:
- 4:8b74db22e4c6
- Parent:
- 3:2a87c102ddd3
- Child:
- 5:63925964cbd5
diff -r 2a87c102ddd3 -r 8b74db22e4c6 RN41.cpp --- a/RN41.cpp Mon Nov 02 07:39:14 2015 +0000 +++ b/RN41.cpp Mon Nov 16 04:11:50 2015 +0000 @@ -263,8 +263,6 @@ RN41::bool2 RN41::chkReply_process_wCR(string cmp1, string cmp2) { - bool2 rtn; - int idx= rxStr.find('\r'); if(rxStr[++idx] == '\n') idx++; @@ -275,13 +273,18 @@ rxStr= rxStr.substr(idx); b2i2 tmpFind= chkReply_find(tmpStr, cmp1, cmp2); - if(tmpFind.b1) - rtn.b1= true; - if(tmpFind.b2) - rtn.b2= true; + if(!(tmpFind.b1 || tmpFind.b2)) // 通常通信 rxStrStored += tmpStr; // cmpと合致していれば、保存しておく必要性がない + +/* if(tmpFind.b1) + rtn.b1= true; + if(tmpFind.b2) + rtn.b2= true;*/ + bool2 rtn; + rtn.b1= tmpFind.b1; + rtn.b2= tmpFind.b2; return rtn; } RN41::bool2 RN41::chkReply_process_woCR(string cmp1, string cmp2, bool wCR)