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:
- 4:7e3bbf896e78
- Parent:
- 3:14050370593a
- Child:
- 5:92659a4c2f89
diff -r 14050370593a -r 7e3bbf896e78 BluetoothComm.cpp --- a/BluetoothComm.cpp Fri Feb 06 20:45:47 2015 +0000 +++ b/BluetoothComm.cpp Fri Feb 06 21:16:31 2015 +0000 @@ -37,17 +37,17 @@ write_params_to_sd_card(); printf("Initialized PARAM \r\n"); - //int temp4[] = {0x01fe, 0x02ac, 0x02ff, 0x0180, 0x0012, 0x0010, 0x0020, 0x00bf, 0x023f, 0x0123, 0x03a2, 0x10}; - //readData.write(temp4, _numReadOnlyParams); - //for (int k = 0; k < _numReadOnlyParams; k += 1) { - // _paramMap[_indexMap[_numVars + k]] = temp4[k]; - //} + int temp4[] = {0x01fe, 0x02ac, 0x02ff, 0x0180, 0x0012, 0x0010, 0x0020, 0x00bf, 0x023f, 0x0123, 0x03a2, 0x10}; + readData.write(_numReadOnlyParams, temp4); + for (int k = 0; k < _numReadOnlyParams; k += 1) { + _paramMap[_indexMap[_numVars + k]] = temp4[k]; + } //printf("Test: %x\r\n", _paramMap["TorsoAng"]); write_data_to_sd_card(); //printf("Initialized data\r\n"); //Fill the parameter map with data from SD card read_data_from_sd(); - //printf("Test: %x\r\n", _paramMap["TorsoAng"]); + printf("Test: %x\r\n", _paramMap["TorsoAng"]); read_params_from_sd(); @@ -64,9 +64,9 @@ int *arr = readData.read(_numReadOnlyParams, arr); for (int i = 0; i < _numReadOnlyParams; i += 1) { _paramMap[_indexMap[i + _numVars]] = arr[i]; - //printf("Read: %x\r\n", arr[i]); + printf("Read: %x\r\n", arr[i]); } - //printf("Finished reading data\r\n"); + printf("Finished reading data\r\n"); } /** @@ -522,9 +522,9 @@ void BluetoothComm::process (char* message, int len) { char c = message[2]; - //for (int i =0; i < len; i++) { - // printf("Message character: %x \r\n", message[i]); - //} + for (int i =0; i < len; i++) { + printf("Message character: %x \r\n", message[i]); + } if (c == READONLY_IND) { process_read_only(message, len); return;