CSE477 / swimate_v2

Dependencies:   Adafruit_GFX_128x64 DS3231 PinDetect SDFileSystem USBDevice mbed RealtimeMath MODSERIAL

Revision:
22:9350752f5414
Parent:
21:2fa676f214fe
Parent:
18:06b718f8e6fd
--- a/comms.cpp	Sat Jun 07 07:12:25 2014 +0000
+++ b/comms.cpp	Sat Jun 07 07:46:38 2014 +0000
@@ -3,6 +3,7 @@
 
 const int Packet::HEADER_SIZE = 5;
 
+
 /*  If successful, loads p with a new packet.  User is responsible for deleting.
  *  Returns > 0 on success
               0 on timeout
@@ -21,17 +22,19 @@
     PC_PRINTLNF("receivePacket: cmd = %d", cmd);
     PC_PRINTLNF("receivePacket: packetNumber = %d", packetNumber);
     PC_PRINTLNF("receivePacket: dataLength = %d", dataLength);
-    
+
     uint8_t data[dataLength];
     if (!getBytes(data, dataLength, timeout))
         return 0;
     
     PC_PRINTLN("receivePacket: getting checksum");
+
     uint16_t checkSum;
     if (!getBytes((uint8_t *) &checkSum, sizeof(checkSum), timeout))
         return 0;
     
     PC_PRINTLN("receivePacket: verifying checksum");
+
     *p = Packet::createAndVerify(cmd, packetNumber, dataLength, data, checkSum);
     if (*p == NULL)
         return -1;