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.
Revision 16:96879e1c99f2, committed 2014-11-24
- Comitter:
- manumaet
- Date:
- Mon Nov 24 12:48:40 2014 +0000
- Parent:
- 15:e1fea7e2aff1
- Child:
- 17:8afa5f9122da
- Commit message:
- string of length 1021 works now (was timing problem), now adapt it to API so it always works
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Nov 23 20:45:14 2014 +0000
+++ b/main.cpp Mon Nov 24 12:48:40 2014 +0000
@@ -24,9 +24,12 @@
framelength &= 0x03FF;
framelength -= 2;
- char* receive = dw.receiveString(); // receive a string
- pc.printf("Received: \"%s\" %d ", receive, framelength);
- delete[] receive;
+ if(framelength<200) {
+ char* receive = dw.receiveString(); // receive a string
+ pc.printf("Received: \"%s\" %d ", receive, framelength);
+ delete[] receive;
+ } else
+ pc.printf("Received! %d ", framelength);
# ifdef PINGPONG
uint64_t status;
@@ -85,13 +88,14 @@
message[i+1] = '\0';
pc.printf("%d Message: \"%s\" %d\r\n", i, message, strlen(message)+1);
- wait(0.1);
+
+ //wait(0.1);
char messagecheck[1024];
dw.sendString(message);
wait(0.1);
dw.readRegister(DW1000_TX_BUFFER, 0, (uint8_t*)messagecheck, strlen(message)+1);
pc.printf("%d nBuffer: \"%s\" %d\r\n\r\n", i, messagecheck, strlen(messagecheck)+1);
- wait(0.2);
+ //wait(0.1);
//return 0;
/*for(int i=0; i<10; i++) { // to control Voltage