cansat

Dependencies:   BMP085 JPEGCamera SDFileSystem mbed

Fork of SaibiCansat2014 by Takashi SASAKI

Files at this revision

API Documentation at this revision

Comitter:
TakashiSasaki
Date:
Thu Jul 17 23:17:45 2014 +0000
Parent:
6:9824d4e2f29b
Child:
8:3230ddd3a3d1
Commit message:
bug fux; stopPictures at the end of shoot()

Changed in this revision

FastJpegCamera.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/FastJpegCamera.h	Thu Jul 17 23:01:41 2014 +0000
+++ b/FastJpegCamera.h	Thu Jul 17 23:17:45 2014 +0000
@@ -51,7 +51,7 @@
         void shoot(int i){
         
             if (!this->isReady()) {
-                printf("show camera is not ready\n");
+                pc.printf("show camera is not ready\n");
                 //myled4 = 1; //show camera is not ready
                 //wait(2.0);
                 //myled4 = 0;
@@ -70,11 +70,12 @@
                 //wait(2.0);
                 //myled1 = 0;
             } else {
-                printf("take picture picture\n");
+                pc.printf("shot %s\n", filename);
                 //myled3 = 1; //show picture take failed
                 //wait(2.0);
                 //myled3 = 0;
             }//if
+            this->stopPictures();
             myled1 = 0;
         };//shoot
 
--- a/main.cpp	Thu Jul 17 23:01:41 2014 +0000
+++ b/main.cpp	Thu Jul 17 23:17:45 2014 +0000
@@ -20,8 +20,6 @@
 
 DigitalOut myled(LED1);
 
-FastJpegCamera fast_jpeg_camera(p9, p10);
-
 int fileio() {
     mkdir("/sd/20014", 0777);
     
@@ -70,6 +68,8 @@
     }
     wait(.001);
 
+    FastJpegCamera fast_jpeg_camera(p9, p10);
+
     //Measurement mode.
     
     if(accelerometer.setPowerControl(MeasurementMode)) {