Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

ocamera.h

00001 /*
00002 Object Oriented Mobile Robot Model (OOMRM) C++  Library Copyright (C) 2007  Derek Jones
00003 
00004 This library is free software; you can redistribute it  and/or
00005 modify it under the terms of the GNU Lesser General Public
00006 License  as published by the Free Software Foundation; either
00007 version 2.1 of the  License, or (at your option) any later version.
00008 
00009 This library is  distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY;  without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU
00012 Lesser General Public License for more  details.
00013 
00014 You should have received a copy of the GNU Lesser General  Public
00015 License along with this library; if not, write to the Free  Software
00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   02111-1307  USA
00017 
00018 $Id: ocamera.h,v 1.4 2007/09/26 05:12:58 derek Exp $ 
00019 */
00020 
00021 #ifndef CAMERA_H
00022 #define CAMERA_H
00023 
00024 #ifdef DOS
00025 #define MAXIMUM_IMAGE_WIDTH  160
00026 #define MAXIMUM_IMAGE_HEIGHT 128
00027 #else
00028 #define MAXIMUM_IMAGE_WIDTH  160
00029 #define MAXIMUM_IMAGE_HEIGHT 128
00030 #endif
00031 #define M3_CAMERA_BAUD_RATE 115200
00032 //#define M3_CAMERA_BAUD_RATE 57600
00033 
00034 // C328 Camera RX BUFFERSIZE
00035 // about the size of a 60x80 image.
00036 #define C328_BUFFSIZE 1448
00037 //#define C328_BUFFSIZE 10448
00038 //#define C328_BUFFSIZE 100
00039 
00040 enum OOMRM_IMAGE_TYPE { ERROR_TYPE, OOMRM_COMPRESSED_IMAGE, OOMRM_UNCOMPRESSED_IMAGE };
00042 #define GAMEBOY_CAMERA_SUBTYPE 1
00043 #define C328_CAMERA_SUBTYPE 2
00044 
00045 #define MAXIMUM_IMAGE_SIZE (MAXIMUM_IMAGE_WIDTH * MAXIMUM_IMAGE_HEIGHT)
00046 
00047 #include <types.h>
00048 extern uint8 common_imageBuffer[];
00049 
00050 
00051 
00052 #ifdef __cplusplus
00053 
00054 class oCamera 
00055 {
00056 public:
00057   static bool download_in_progress(void) { return _download_in_progress; }
00058   static void download_in_progress(bool b) { _download_in_progress = b; }
00059 protected:
00060   static bool _download_in_progress;
00061   oCamera(void);
00062 };
00063 #endif
00064 
00065 
00066 #endif

Generated on Mon Oct 8 19:32:43 2007 for OOMRM Hardware API by doxygen1.3