Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit_GFX_128x64 DS3231 PinDetect SDFileSystem USBDevice mbed RealtimeMath MODSERIAL
Diff: sync.cpp
- Revision:
- 23:80083138d609
- Parent:
- 22:9350752f5414
--- a/sync.cpp Sat Jun 07 07:46:38 2014 +0000
+++ b/sync.cpp Sun Jun 08 04:08:41 2014 +0000
@@ -115,8 +115,6 @@
}
delete res;
-
- uint8_t *d = new uint8_t[PACKET_MAX_DATA];
PC_PRINTLN("sendFile: created buffer");
int len;
@@ -268,7 +266,7 @@
PC_PRINTLN("Received bad packet :(");
continue;
}
-
+#ifdef DEBUG
PC_PRINTLNF("cmd: %x", p->cmd);
PC_PRINTLNF("pnum: %x", p->packetNumber);
PC_PRINTLNF("len: %x", p->dataLength);
@@ -277,6 +275,7 @@
PC_PRINTLNF("%x", p->data[i]);
}
PC_PRINTLNF("check: %x", p->checkSum);
+#endif
switch(p->cmd) {
case CMD_SYNCOLDEST:
@@ -299,11 +298,11 @@
// case CMD_DELETESESSION:
// deleteSession();
// break;
-// case CMD_DONE:
-// bt.putc(CMD_DONE);
-// //sendResponse(CMD_DONE, ACK);
-// State = IDLE;
-// break;
+ case CMD_DONE:
+ Packet *p = Packet::create(ACK, 0, 0, NULL);
+ btComm.sendPacket(p);
+ State = IDLE;
+ break;
// default: break;
}