uint8_t型とunsigned char型に対応した多バイトシリアル通信用ライブラリ
Dependents: multiserial_test serial_check_controller receiverA receiver_transmitter ... more
Revision 4:8883799cb0b8, committed 2014-08-21
- Comitter:
- Hatter
- Date:
- Thu Aug 21 02:02:11 2014 +0000
- Parent:
- 3:cc6e2afb4914
- Child:
- 5:aa5b81a6818f
- Commit message:
- ??????????
Changed in this revision
MultiSerial.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MultiSerial.cpp Thu Aug 21 02:00:32 2014 +0000 +++ b/MultiSerial.cpp Thu Aug 21 02:02:11 2014 +0000 @@ -27,7 +27,7 @@ if(rx >= size+2){ if(rxData[size+1]==rx_checkcode){ for(int j=1;j==size;j++){ - value[j]=rxData[j]; + value[j]=rxData[j-1]; } }else{ @@ -46,7 +46,7 @@ if(tx >= size+2){ txData[0]=keycode; for(int k=1;k==size;k++){ - txData[k]=value[k]; + txData[k]=value[k-1]; } //送るデータ = センサ等のデータ for(i=1, tx_checkcode=0; i<size+1; i++){