Entire Solution. Final version
Dependencies: Hepta9axis HeptaBattery HeptaCamera_GPS HeptaTemp HeptaXbee SDFileSystem mbed
Fork of Team by
Diff: 3daf572bcae1/main.cpp
- Revision:
- 2:25c54b82c4e8
- Parent:
- 1:20db10adb732
--- a/3daf572bcae1/main.cpp Sat Oct 28 09:25:50 2017 +0000 +++ b/3daf572bcae1/main.cpp Sun Oct 29 15:50:53 2017 +0000 @@ -127,14 +127,14 @@ int nread = 0; if (fp1) { pc.printf("Sending data file %s\r\n", "/sd/Data/Data.txt"); - //xbee.printf("#SAT6");//%d%s",strlen("/sd/Data/Data.txt"),"/sd/Data/Data.txt"); + //xbee.printf("#SAT6");//%d%s",strlen("/sd/Data/Data.txt"),"/sd/Data/Data.txt"); //Put some tags for GS software while ((nread = fread(buf, 1, sizeof buf, fp1)) > 0){ for (int i =0; i<nread; i++) { xbee.putc(buf[i]); } } - // xbee.printf("#SAT7"); + // xbee.printf("#SAT7"); //Put some tags for GS software } else error("Could not open file for write\n\r"); fclose(fp1); wait(15.0); @@ -142,20 +142,20 @@ { char fname[64]; snprintf(fname, sizeof(fname), "%s/Picture%d.jpg", dir_name, i); - //snprintf(fname, sizeof(fname), "/sd/test.jpg"); + //snprintf(fname, sizeof(fname), "/sd/test.jpg"); FILE *fp_jpeg = fopen(fname, "r"); char buf[100]; int nread = 0; if (fp_jpeg) { pc.printf("Sending image file %s\r\n", fname); - // xbee.printf("#SAT8");//%d%s",strlen(fname),fname); + // xbee.printf("#SAT8");//%d%s",strlen(fname),fname); //Put some tags for GS software while ((nread = fread(buf, 1, sizeof buf, fp_jpeg)) > 0){ for (int i =0; i<nread; i++) { xbee.putc(buf[i]); } } - // xbee.printf("#SAT9"); + // xbee.printf("#SAT9"); //Put some tags for GS software } else error("Could not open file for write\n\r"); fclose(fp_jpeg); }