waits are updated for threads

Fork of JPEGCamera by Hiroshi Yamaguchi

Revision:
2:61dbb80ea1c1
Parent:
1:27417b6a951d
--- 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;