GDP group 24 node core
Dependencies: EthernetInterface SDFileSystem mbed-rtos mbed snail MbedJSONValue
Revision 21:a32666afce7a, committed 2015-01-13
- Comitter:
- Trumple
- Date:
- Tue Jan 13 23:51:35 2015 +0000
- Parent:
- 17:215899ba8b8e
- Child:
- 22:835a6c6dcfbb
- Commit message:
- Fix payload size parameter used when sending sensordata messages
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jan 13 23:38:44 2015 +0000
+++ b/main.cpp Tue Jan 13 23:51:35 2015 +0000
@@ -306,7 +306,7 @@
#ifdef DEBUG
pc.printf("[MAIN] Got data: ");
for (int i = 0; i < data.readings.size(); i++)
- pc.printf("0x%.2X|", data.readings[i]);
+ pc.printf("0x%.4X|", data.readings[i]);
pc.printf("\r\n");
#endif
@@ -315,7 +315,7 @@
memcpy(readings, readings_str.c_str(), sizeof(readings));
//TODO: Get real I2C address
- snail::sensordata message(baseNodeAddress, data.type, data.type, time(NULL), readings, data.readings.size());
+ snail::sensordata message(baseNodeAddress, data.type, data.type, time(NULL), readings, readings_str.size());
messageQueue.push(message);
