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.
Fork of JPEGCamera by
Revision 2:61dbb80ea1c1, committed 2016-04-28
- Comitter:
- mmalikyar3
- Date:
- Thu Apr 28 08:20:40 2016 +0000
- Parent:
- 1:27417b6a951d
- Commit message:
- camera works, so does most other stuff. Imu's are iffy
Changed in this revision
JPEGCamera.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 27417b6a951d -r 61dbb80ea1c1 JPEGCamera.cpp --- a/JPEGCamera.cpp Thu Nov 17 13:59:40 2011 +0000 +++ b/JPEGCamera.cpp Thu Apr 28 08:20:40 2016 +0000 @@ -4,7 +4,7 @@ * Modified by arms22 * Ported to mbed by yamaguch */ - +#include "rtos.h" #include "JPEGCamera.h" #define min(x, y) ((x) < (y)) ? (x) : (y) @@ -47,11 +47,11 @@ state = PROCESSING; } else { fclose(fp); - printf("takePicture(%s) failed", filename); + //printf("takePicture(%s) failed", filename); state = ERROR; } } else { - printf("fopen() failed"); + //printf("fopen() failed"); state = ERROR; } } @@ -69,7 +69,7 @@ if (ret == 0 || address >= imageSize) { stopPictures(); fclose(fp); - wait(0.1); // ???? + Thread::wait(100); // ???? state = ret > 0 ? READY : ERROR; } } @@ -82,7 +82,7 @@ char buf[4] = {0x56, 0x00, 0x26, 0x00}; int ret = sendReceive(buf, sizeof buf, 4); if (ret == 4 && buf[0] == 0x76) { - wait(4.0); + Thread::wait(4000); state = READY; } else { state = ERROR;