Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Data-Management-Honka
Diff: BluetoothComm.cpp
- Revision:
- 15:a492356f5485
- Parent:
- 14:ac9949a0aff5
- Child:
- 16:b6b2c7b0f1c9
diff -r ac9949a0aff5 -r a492356f5485 BluetoothComm.cpp --- a/BluetoothComm.cpp Sat Mar 14 00:09:22 2015 +0000 +++ b/BluetoothComm.cpp Fri Mar 20 20:27:39 2015 +0000 @@ -223,9 +223,7 @@ msg[0] = START; msg[1] = 0; for (int i=0; i < _numVars; i++) { - if (i == 21) { - //printf("On final loop \r\n"); - } + if (paramList[i] != 0xff) { short s = (short)((i << 8) | paramList[i]); //printf("In send_values, calculating parity of %x\r\n", s); @@ -250,22 +248,25 @@ msg[len+2] = checksum[2]; len += 3; for (int j = 0; j < len; j++) { - // printf("Sending char %x \r\n", msg[j]); + printf("Sending char %x \r\n", msg[j]); _rn42.putc(msg[j]); } if (dataOut != NULL) { - int ind = 1; + int ind = 0; int j; for (j = 0; j < len-1; j+=2) { dataOut[ind] = (message[j+1]<<8)|message[j]; - printf("Index %d is %x\r\n", ind, dataOut[ind]); + //printf("Index %d is %x\r\n", ind, dataOut[ind]); ind += 1; } if (j < len) { dataOut[ind] = message[j]; - printf("Index %d is %x\r\n", ind, dataOut[ind]); + //printf("Index %d is %x\r\n", ind, dataOut[ind]); } + for (int k=0; k<len;k++) { + printf("Index %d: %x\r\n", k, dataOut[k]); + } } // printf("Placed in dataOut\r\n");