Raghav Ganesh
/
AvnetATT_shape_hackathon
This program simply connects to a HTS221 I2C device to read Temperature
Diff: wnc_control.cpp
- Revision:
- 22:41e6c417ace1
- Parent:
- 19:f89baed3bd6f
- Child:
- 29:83d9bf7b52a4
--- a/wnc_control.cpp Wed Jul 13 18:34:56 2016 +0000 +++ b/wnc_control.cpp Wed Jul 13 19:39:56 2016 +0000 @@ -325,11 +325,17 @@ if (n <= 1500) { char num2str[6]; + itoa(n, num2str, 10); cmd_str += num2str; retries += 1; while (retries--) { + // Assuming someone is sending then calling this to receive response, invoke + // a pause to give the response some time to come back and then also + // between each retry. + wait_ms(10); + send_wnc_cmd(cmd_str.data(), &pRespStr, WNC_TIMEOUT_MS); size_t pos_start = pRespStr->find("\"") + 1; size_t pos_end = pRespStr->rfind("\"") - 1;