removed wait with timer

Dependents:   Gaurd_Server2 Gaurd_Server

Fork of JPEGCamera by Hiroshi Yamaguchi

Files at this revision

API Documentation at this revision

Comitter:
SRINATHMADHU
Date:
Sat Dec 27 23:48:39 2014 +0000
Parent:
1:27417b6a951d
Commit message:
added new fxn and edited reset()

Changed in this revision

JPEGCamera.cpp Show annotated file Show diff for this revision Revisions of this file
JPEGCamera.h Show annotated file Show diff for this revision Revisions of this file
diff -r 27417b6a951d -r f41e57318b6b JPEGCamera.cpp
--- a/JPEGCamera.cpp	Thu Nov 17 13:59:40 2011 +0000
+++ b/JPEGCamera.cpp	Sat Dec 27 23:48:39 2014 +0000
@@ -82,7 +82,10 @@
     char buf[4] = {0x56, 0x00, 0x26, 0x00};
     int ret = sendReceive(buf, sizeof buf, 4);
     if (ret == 4 && buf[0] == 0x76) {
-        wait(4.0);
+        //wait(4.0);
+        timer.start();
+        timer.reset();
+        while(timer.read()<=4);
         state = READY;
     } else {
         state = ERROR;
diff -r 27417b6a951d -r f41e57318b6b JPEGCamera.h
--- a/JPEGCamera.h	Thu Nov 17 13:59:40 2011 +0000
+++ b/JPEGCamera.h	Sat Dec 27 23:48:39 2014 +0000
@@ -29,6 +29,7 @@
      * @param rx rx pin
      */
     JPEGCamera(PinName tx, PinName rx);
+    
 
     /**
      * Set picture size