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 dgps by
handle/handleCamera.h@13:a6d3cf2b018e, 2014-04-07 (annotated)
- Committer:
- dylanembed123
- Date:
- Mon Apr 07 01:30:04 2014 +0000
- Revision:
- 13:a6d3cf2b018e
- Parent:
- 12:e42985e3ea64
- Child:
- 15:e3e03a9df89e
Send Image over Xbee
Who changed what in which revision?
User | Revision | Line number | New 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 | 12:e42985e3ea64 | 9 | |
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(); |
dylanembed123 | 7:c75d5e5e6bfc | 29 | }; |
dylanembed123 | 7:c75d5e5e6bfc | 30 | |
dylanembed123 | 7:c75d5e5e6bfc | 31 | #endif |