GDP group 24 node core

Dependencies:   EthernetInterface SDFileSystem mbed-rtos mbed snail MbedJSONValue

Revision:
18:e68c8551d12c
Parent:
14:bc0e2fa25f94
Child:
20:fb2a9f4d2de7
--- a/sensorinterface.cpp	Tue Jan 13 22:48:25 2015 +0000
+++ b/sensorinterface.cpp	Tue Jan 13 23:38:55 2015 +0000
@@ -148,7 +148,7 @@
  
 int sensorinterface::sendRequest(char address)
 {
-    char cmd[1] = {'R'};
+    char cmd[1] = {I2C_REQUEST_HEADER};
  
     this->i2c.write(address, cmd, 1);
     
@@ -161,7 +161,7 @@
         printf("[SIF] Reading data from current device (0x%.2X)\r\n", currentSensor->first);
     #endif
     char address = currentSensor->first;
-    char cmd[1] = {'D'};
+    char cmd[1] = {I2C_DATA_HEADER};
     char bufSize = currentSensor->second.packetSize + 2;
     char buffer[bufSize];
     this->i2c.write(address, cmd, 1);
@@ -177,7 +177,7 @@
         reply.readings.push_back(buffer[i]);
     }
  
-    if (buffer[0] != 'D')
+    if (buffer[0] != I2C_DATA_HEADER)
     {
         //if it doesn't send the correct header bit, something has gone wrong
         #ifdef DEBUG