QC Control software

Dependencies:   mbed

Fork of dgps by Colin Stearns

Committer:
krobertson
Date:
Tue Apr 22 04:26:31 2014 +0000
Revision:
20:81d5655fecc2
Parent:
15:e3e03a9df89e
send and receive commands.; waypoint processing; get locationions; send images

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dylanembed123 7:c75d5e5e6bfc 1 #ifndef _TAKEIMAGE_H_
dylanembed123 7:c75d5e5e6bfc 2 #define _TAKEIMAGE_H_
dylanembed123 7:c75d5e5e6bfc 3
dylanembed123 7:c75d5e5e6bfc 4 #include "adapt/usb.h"
dylanembed123 13:a6d3cf2b018e 5 #include "adapt/xbee.h"
dylanembed123 7:c75d5e5e6bfc 6 #include "adapt/camera.h"
dylanembed123 12:e42985e3ea64 7 #include "packet.h"
dylanembed123 9:da906eeac51e 8 #include <algorithm>
dylanembed123 15:e3e03a9df89e 9 #include "dataLocation.h"
dylanembed123 7:c75d5e5e6bfc 10 class ImageHandle{
dylanembed123 7:c75d5e5e6bfc 11 private:
dylanembed123 7:c75d5e5e6bfc 12 Camera cam;
dylanembed123 7:c75d5e5e6bfc 13 bool initialized;
dylanembed123 12:e42985e3ea64 14 Serial& outputDevice;
dylanembed123 7:c75d5e5e6bfc 15
dylanembed123 7:c75d5e5e6bfc 16 /// \brief Setup the camera.
dylanembed123 7:c75d5e5e6bfc 17 void setup();
dylanembed123 7:c75d5e5e6bfc 18 /// \brief Take an image and send it over USB
dylanembed123 7:c75d5e5e6bfc 19 void take();
dylanembed123 7:c75d5e5e6bfc 20 /// \brief Check if an image must be taken
dylanembed123 7:c75d5e5e6bfc 21 bool check();
dylanembed123 12:e42985e3ea64 22
dylanembed123 7:c75d5e5e6bfc 23 public:
dylanembed123 12:e42985e3ea64 24
dylanembed123 7:c75d5e5e6bfc 25 /// \brief Constructor
dylanembed123 12:e42985e3ea64 26 ImageHandle():initialized(false),outputDevice(USB::getSerial()){}
dylanembed123 7:c75d5e5e6bfc 27 /// \brief Run an instance of this
dylanembed123 7:c75d5e5e6bfc 28 void run();
krobertson 20:81d5655fecc2 29
krobertson 20:81d5655fecc2 30 static ImageHandle* hand;
krobertson 20:81d5655fecc2 31 static ImageHandle& getImageHand(){
krobertson 20:81d5655fecc2 32 if(hand == NULL){
krobertson 20:81d5655fecc2 33 hand = new ImageHandle();
krobertson 20:81d5655fecc2 34 }
krobertson 20:81d5655fecc2 35 return *hand;
krobertson 20:81d5655fecc2 36 }
dylanembed123 7:c75d5e5e6bfc 37 };
dylanembed123 7:c75d5e5e6bfc 38
dylanembed123 7:c75d5e5e6bfc 39 #endif