Remote Writing IoT Data to Influx-DB over HTTP-API.
Fork of AvnetATT_shape_hackathon by
Revision 22:41e6c417ace1, committed 2016-07-13
- Comitter:
- fkellermavnet
- Date:
- Wed Jul 13 19:39:56 2016 +0000
- Parent:
- 21:d0038d14ee7c
- Child:
- 24:bd480d2aade4
- Child:
- 25:e7996d22a7e6
- Commit message:
- Added a 10mS delay to the socket read function. 10mS for the first read and then 10mS in between each retry.
Changed in this revision
wnc_control.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;