root/include/camera.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 // camera.h
   2 
   3 #ifdef CHDK_MODULE_CODE
   4 #error camera.h cannot be #included in module code (did you mean camera_info.h).
   5 #endif
   6 
   7 // This file contains the default values for various settings that may change across camera models.
   8 // Setting values specific to each camera model can be found in the platform/XXX/platform_camera.h file for camera.
   9 
  10 // If adding a new settings value put a suitable default value in here, along with documentation on
  11 // what the setting does and how to determine the correct value.
  12 // If the setting should not have a default value then add it here using the '#undef' directive
  13 // along with appropriate documentation.
  14 
  15 #ifndef CAMERA_H
  16 #define CAMERA_H
  17 
  18 //==========================================================
  19 // Camera-dependent settings
  20 //==========================================================
  21 
  22 //----------------------------------------------------------
  23 // Default values
  24 //----------------------------------------------------------
  25 
  26     #undef  CAM_DRYOS                           // Camera is DryOS-based
  27     #undef  CAM_PROPSET                         // Camera's properties group (the generation)
  28     #define CAM_FLASHPARAMS_VERSION         3   // flash parameters structure version (every camera from 2005 on is version 3)
  29     #undef  CAM_DRYOS_2_3_R39                   // Define for cameras with DryOS release R39 or greater
  30     #undef  CAM_DRYOS_2_3_R47                   // Define for cameras with DryOS release R47 or greater -> Cameras can boot from FAT32
  31 
  32     #define CAM_CIRCLE_OF_CONFUSION         5   // CoC value for camera/sensor (see http://www.dofmaster.com/digital_coc.html)
  33 
  34     #undef  CAM_HAS_CMOS                        // Camera has CMOS sensor
  35     #undef  CAM_SWIVEL_SCREEN                   // Camera has rotated LCD screen
  36     #define CAM_USE_ZOOM_FOR_MF             1   // Zoom lever can be used for manual focus adjustments
  37     #define CAM_DEFAULT_ALT_BUTTON  KEY_PRINT   // alt button for cameras without adjustable alt
  38                                                 // redefine if not print to avoid need for KEY_PRINT alias in keymap
  39     #undef  CAM_ADJUSTABLE_ALT_BUTTON           // ALT-button can be set from menu, must set next two values as well
  40     #undef  CAM_ALT_BUTTON_NAMES                // Define the list of names for the ALT button   - e.g. { "Print", "Display" }
  41     #undef  CAM_ALT_BUTTON_OPTIONS              // Define the list of options for the ALT button - e.g. { KEY_PRINT, KEY_DISPLAY }
  42     #define CAM_REMOTE                      1   // Camera supports a remote
  43     #undef  CAM_REMOTE_AtoD_CHANNEL             // Camera supports using 3rd battery terminal as well as USB for remote - value = A/D channel to poll (normally 5)
  44     #define CAM_REMOTE_AtoD_THRESHOLD       200 // 3rd battery terminal A/D reading threshold ( lower = 1, higher = 0 )
  45     #undef  CAM_REMOTE_HDMI_HPD                 // Camera supports using HDMI hotplug detect for remote signal
  46     #undef  CAM_REMOTE_HDMI_POWER_OVERRIDE      // Camera requires HDMI power to be forced on in rec mode
  47     #undef  CAM_REMOTE_ANALOG_AV                // Camera supports analog AV detect for remote signal
  48     #undef  CAM_REMOTE_USES_PRECISION_SYNC      // Disable experimental remote  precision sync patch
  49     #define CAM_ALLOWS_USB_PORT_FORCING     1   // USB remote state can be forced to be present (supported on all cameras that use common kbd code, others may undef)
  50     #define CAM_REMOTE_USB_HIGHSPEED        1   // Enable highspeed measurements of pulse width & counts on USB port 
  51     #define CAM_REMOTE_HIGHSPEED_LIMIT 1000     // Set lowest timer value settable by user
  52     #undef  GPIO_VSYNC_CURRENT                  // USB remote precision sync : might be 0xC0F070C8 or 0xC0F07008 (http://chdk.setepontos.com/index.php?topic=8312.msg104027#msg104027)
  53     #undef  CAM_MULTIPART                       // Camera supports SD-card multipartitioning
  54     #define CAM_HAS_ZOOM_LEVER              1   // Camera has dedicated zoom buttons
  55     #undef  CAM_DRAW_EXPOSITION                 // Output expo-pair on screen (for cameras which (sometimes) don't do that)
  56     #define CAM_HAS_ERASE_BUTTON            1   // Camera has dedicated erase button
  57     #define CAM_HAS_DISP_BUTTON             1   // Camera has dedicated DISP button
  58     #define CAM_HAS_IRIS_DIAPHRAGM          1   // Camera has real diaphragm mechanism (http://en.wikipedia.org/wiki/Diaphragm_%28optics%29)
  59     #undef  CAM_HAS_ND_FILTER                   // Camera has build-in ND filter
  60     #undef  CAM_HAS_NATIVE_ND_FILTER            // Camera has built-in ND filter with Canon menu support for enable/disable
  61     #undef  CAM_ND_SET_AV_VALUE                 // Camera needs AV propcase set to override ND. Only valid for cameras without iris. 1 if needed, undef if not
  62 
  63     #define CAM_HAS_MANUAL_FOCUS            1   // Camera has native manual focus mode (disables MF shortcut feature)
  64     #undef  CAM_SD_OVER_IN_AF                   // Camera allows SD override if MF & AFL not set
  65     #undef  CAM_SD_OVER_IN_AFL                  // Camera allows SD override when AFL is set
  66     #undef  CAM_SD_OVER_IN_MF                   // Camera allows SD override when MF is set
  67 
  68     #define CAM_HAS_USER_TV_MODES           1   // Camera has tv-priority or manual modes with ability to set tv value
  69     #undef  CAM_SHOW_OSD_IN_SHOOT_MENU          // On some cameras Canon shoot menu has additional functionality and useful in this case to see CHDK OSD in this mode
  70     #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1 // Camera can unlock optical zoom in video (if it is locked)
  71     #undef  CAM_FEATURE_FEATHER                 // Cameras with "feather" or touch wheel.
  72     #define CAM_HAS_IS                      1   // Camera has image stabilizer
  73     #undef  CAM_HAS_JOGDIAL                     // Camera has a "jog dial"
  74 
  75     #undef  CAM_CONSOLE_LOG_ENABLED             // Development: internal camera stdout -> A/stdout.txt
  76     #define CAM_CHDK_HAS_EXT_VIDEO_MENU     1   // In CHDK for this camera realized adjustable video compression
  77     #undef  CAM_CAN_MUTE_MICROPHONE             // Camera has function to mute microphone
  78 
  79     #define CAM_EMUL_KEYPRESS_DELAY         40  // Delay to interpret <alt>-button press as longpress
  80     #define CAM_EMUL_KEYPRESS_DURATION      5   // Length of keypress emulation
  81 
  82     #define CAM_MENU_BORDERWIDTH            10  // Defines the width of the border on each side of the CHDK menu. The CHDK menu will have this
  83                                                 // many pixels left blank to the on each side. Should not be less than 10 to allow room for the
  84                                                 // scroll bar on the right.
  85 
  86     #undef  CAM_TOUCHSCREEN_UI                  // Define to enable touch screen U/I (e.g. IXUS 310 HS)
  87     #define CAM_TS_BUTTON_BORDER            0   // Define this to leave a border on each side of the OSD display for touch screen buttons.
  88                                                 // Used on the IXUS 310 to stop the OSD from overlapping the on screen buttons on each side
  89     #define CAM_TS_MENU_BORDER              0   // Define this to leave a border at top and bottom of menu to avoid areas where touch sensor does not work
  90                                                 // Used on the IXUS 310 to allow touch selection of menu entries
  91     #define CAM_DISP_ALT_TEXT               1   // Display the '<ALT>' message at the bottom of the screen in ALT mode (IXUS 310 changes button color instead)
  92 
  93     #undef  CAM_AF_SCAN_DURING_VIDEO_RECORD     // CHDK can make single AF scan during video record
  94     #undef  CAM_RESET_AEL_AFTER_VIDEO_AF        // Cam needs AE Lock state reset after AF in video recording
  95     #undef  CAM_HAS_VIDEO_BUTTON                // Camera can take stills in video mode, and vice versa
  96     #define CAM_MASK_VID_REC_ACTIVE    0x0400   // mask so that Canon mode does not change when cam's with video button enter video recording mode
  97     #undef  CAM_EV_IN_VIDEO                     // CHDK can change exposure in video mode
  98     #define CAM_VIDEO_CONTROL               1   // pause / unpause video recordings
  99     #undef  CAM_VIDEO_QUALITY_ONLY              // Override Video Bitrate is not supported
 100     #undef  CAM_CHDK_HAS_EXT_VIDEO_TIME         // Camera can override time limit of video record -> sx220/230
 101     #undef  CAM_SIMPLE_MOVIE_STATUS             // Firmware movie_status nonzero when recording, zero when not - makes CAM_VIDEO_CONTROL ineffective
 102     #undef  CAM_MOVIEREC_NEWSTYLE               // Define for new style video recording code in fw (DIGIC 6)
 103     #undef  CAM_HAS_MOVIE_DIGEST_MODE           // The values in the 'movie_status' variable change if the camera has this mode (see is_video_recording())
 104     #undef  CAM_HAS_SPORTS_MODE                 // Define to enable the RAW exception override control for SPORTS mode (s3is, sx30, sx40, etc)
 105 
 106     #undef  CAM_REAR_CURTAIN                    // Camera do not have front/rear curtain flash sync in menu
 107     #undef  CAM_BRACKETING                      // Cameras that have bracketing (focus & ev) in original firmware already, most likely s- & g-series (propcase for digic III not found yet!)
 108     #define CAM_EXT_TV_RANGE                1   // CHDK can make exposure time longer than 64s
 109     #define CAM_EXT_AV_RANGE                6   // Number of 1/3 stop increments to extend the Av range beyond the Canon default smallest aperture
 110                                                 //  override in platform_camera.h for cameras with different range (e.g. G1X can't go below F/16 so set this to 0)
 111     #define CAM_CHDK_PTP                    1   // include CHDK PTP support
 112 
 113     #undef  CAM_HAS_FILEWRITETASK_HOOK          // FileWriteTask hook is available (local file write can be prevented)
 114     #undef  CAM_FILEWRITETASK_SEEKS             // Camera's FileWriteTask can do Lseek() - DryOS r50 or higher, implicitly enables CAM_FILEWRITETASK_MULTIPASS when defined
 115     #undef  CAM_FILEWRITETASK_MULTIPASS         // Camera may use multiple FileWriteTask invocations to write larger JPEGs (approx. DryOS r39..49)
 116 
 117     #define CAM_UNCACHED_BIT                0x10000000 // bit indicating the uncached memory
 118 
 119     #define CAM_SENSOR_BITS_PER_PIXEL       10  // Bits per pixel. 10 is standard, 12 is supported except for curves
 120     #define CAM_WHITE_LEVEL                 ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)      // 10bpp = 1023 ((1<<10)-1), 12bpp = 4095 ((1<<12)-1)
 121     #define CAM_BLACK_LEVEL                 ((1<<(CAM_SENSOR_BITS_PER_PIXEL-5))-1)  // 10bpp = 31 ((1<<5)-1),    12bpp = 127 ((1<<7)-1)
 122 
 123     #define CAM_DEFAULT_MENU_CURSOR_BG      IDX_COLOR_BLUE      // Default menu cursor colors
 124     #define CAM_DEFAULT_MENU_CURSOR_FG      IDX_COLOR_YELLOW    // Default menu cursor colors
 125 
 126     // Older cameras had a screen/bitmap buffer that was 360 pixels wide (or 480 for wide screen models)
 127     // CHDK was built around this 360 pixel wide display model
 128     // Newer cameras have a 720 pixel wide bitmap (960 for wide screen cameras)
 129     // To accomadate this the CHDK co-ordinate system assumes a 360/480 wide buffer and the
 130     // pixel drawing routines draw every pixel twice to scale the image up to the actual buffer size
 131     // Define CAM_USES_ASPECT_CORRECTION with a value of 1 to enable this scaled display
 132     #define CAM_USES_ASPECT_CORRECTION      0
 133     #define CAM_SCREEN_WIDTH                360 // Width of bitmap screen in CHDK co-ordinates (360 or 480)
 134     #define CAM_SCREEN_HEIGHT               240 // Height of bitmap screen in CHDK co-ordinates (always 240 on all cameras so far)
 135     #define CAM_BITMAP_WIDTH                360 // Actual width of bitmap screen in bytes (may be larger than displayed area)
 136     #define CAM_BITMAP_HEIGHT               240 // Actual height of bitmap screen in rows (240 or 270)
 137 
 138     #define EDGE_HMARGIN                    0   // define sup and inf screen margins on edge overlay without overlay.  Necessary to save memory buffer space. sx200is needs values other than 0
 139 
 140     #undef CAM_QUALITY_OVERRIDE                 // define this in platform_camera.h to enable 'Super Fine' JPEG compression mode
 141                                                 // used to allow super fine JPEG option on cameras where this has been removed
 142                                                 // from the Canon menu. Note: may not actually work on all cameras.
 143 
 144     #undef  CAM_ZEBRA_NOBUF                     // zebra draws directly on bitmap buffer.
 145     #undef  CAM_HAS_VARIABLE_ASPECT             // can switch between 16:9 and 4:3 (used by zebra code)
 146     
 147     #undef  CAM_DATE_FOLDER_NAMING              // set if camera uses date based folder naming (Option "Create Folder" in Canon Menu) and get_target_dir_name is implemented
 148     
 149     #define CAM_KEY_PRESS_DELAY             30  // delay after a press - TODO can we combine this with above ?
 150     #define CAM_KEY_RELEASE_DELAY           30  // delay after a release - TODO do we really need to wait after release ?
 151     
 152     // RAW & DNG related values
 153     #define DEFAULT_RAW_EXT                 1   // extension to use for raw (see raw_exts in conf.c)
 154     #define DNG_BADPIXEL_VALUE_LIMIT        0   // Max value of 'bad' pixel - this value or lower is considered a defective pixel on the sensor
 155     #undef  CAM_RAW_ROWPIX                      // Number of pixels in RAW row (physical size of the sensor Note : as of July 2011, this value can be found in stub_entry.S for dryos cameras)
 156     #undef  CAM_RAW_ROWS                        // Number of rows in RAW (physical size of the sensor       Note : as of July 2011, this value can be found in stub_entry.S for dryos cameras)
 157     #undef  CAM_JPEG_WIDTH                      // Default crop size (width) stored in DNG (to match camera JPEG size. From dimensions of the largest size jpeg your camera produces)
 158     #undef  CAM_JPEG_HEIGHT                     // Default crop size (height) stored in DNG (to match camera JPEG size. From dimensions of the largest size jpeg your camera produces)
 159     #undef  CAM_ACTIVE_AREA_X1                  // Define usable area of the sensor - needs to be divisible by 4 - calibrate using a CHDK RAW image converted with rawconvert.exe (eg :rawconvert -12to8 -pgm -w=4480 -h=3348 photo.crw photo.pgm)
 160     #undef  CAM_ACTIVE_AREA_Y1                  // Define usable area of the sensor - needs to be divisible by 2 - "
 161     #undef  CAM_ACTIVE_AREA_X2                  // Define usable area of the sensor - needs to be divisible by 4 - "
 162     #undef  CAM_ACTIVE_AREA_Y2                  // Define usable area of the sensor - needs to be divisible by 2 = "
 163     #undef  cam_CFAPattern                      // Camera Bayer sensor data layout (DNG colors are messed up if not correct)
 164                                                 //   should be 0x01000201 = [Green Blue Red Green], 0x02010100 = [Red Green Green Blue] or 0x01020001 = [Green Red Blue Green]
 165     #undef  CAM_COLORMATRIX1                    // DNG color profile matrix
 166     #undef  cam_CalibrationIlluminant1          // DNG color profile illuminant - set it to 17 for standard light A
 167     #undef  CAM_COLORMATRIX2                    // DNG color profile matrix 2
 168     #undef  cam_CalibrationIlluminant2          // DNG color profile illuminant 2 - set it to 21 for D65
 169     #undef  CAM_CAMERACALIBRATION1              // DNG camera calibration matrix 1
 170     #undef  CAM_CAMERACALIBRATION2              // DNG camera calibration matrix 2
 171     #undef  CAM_FORWARDMATRIX1                  // DNG camera forward matrix 1
 172     #undef  CAM_FORWARDMATRIX2                  // DNG camera forward matrix 2
 173     #undef  CAM_DNG_EXPOSURE_BIAS               // Specify DNG exposure bias value (to override default of -0.5 in the dng.c code)
 174     #undef  CAM_CALC_BLACK_LEVEL                // Set this to enable dynamic Black Level calculation from RAW sensor data
 175                                                 // E.G. G1X may use black = 2048 for long exposures at high ISO
 176                                                 // TODO: Raw Merge code does not use this - merging files with different black points may give strange results
 177     #undef  DNG_EXT_FROM                        // Extension in the cameras known extensions to replace with .DNG to allow DNG
 178                                                 // files to be transfered over standard PTP. Only applicable to older cameras
 179 
 180     #undef  CAM_DNG_LENS_INFO                   // Define this to include camera lens information in DNG files
 181                                                 // Value should be an array of 4 DNG 'RATIONAL' values specifying
 182                                                 //   - min focal length in mm
 183                                                 //   - max focal length in mm
 184                                                 //   - max aperture at min focal length
 185                                                 //   - max aperture at max focal length
 186                                                 // E.G - SX30 = { 43,10, 1505,10, 27,10, 58,10 }
 187                                                 //            = 4.3 - 150.5mm, f/2.7 - f.5.8
 188                                                 // Each pair of integers is one 'RATIONAL' value (numerator,denominator)
 189 
 190     #undef  PARAM_CAMERA_NAME                   // parameter number for GetParameterData to get camera name
 191     #undef  PARAM_OWNER_NAME                    // parameter number for GetParameterData to get owner name
 192     #undef  PARAM_ARTIST_NAME                   // parameter number for GetParameterData to get artist name
 193     #undef  PARAM_COPYRIGHT                     // parameter number for GetParameterData to get copyright
 194     #undef  PARAM_DISPLAY_MODE1                 // param number for LCD display mode when camera in playback
 195     #undef  PARAM_DISPLAY_MODE2                 // param number for LCD display mode when camera in record view hold mode
 196     #define PARAMETER_DATA_FLAG     0x4000      // Added to 'id' value in calls to _GetParameterData & _SetParameterData
 197                                                 // Override if not needed or different value needed
 198 
 199     #undef  CAM_NO_MEMPARTINFO                  // VXWORKS camera does not have memPartInfoGet, fall back to memPartFindMax
 200 
 201     #undef  CAM_DRIVE_MODE_FROM_TIMER_MODE      // use PROPCASE_TIMER_MODE to check for multiple shot custom timer.
 202                                                 // Used to enabled bracketing in custom timer, required on many recent cameras
 203                                                 // see http://chdk.setepontos.com/index.php/topic,3994.405.html
 204 
 205     #undef  CAM_AV_OVERRIDE_IRIS_FIX            // for cameras that require _MoveIrisWithAv function to override Av (for bracketing).
 206 
 207     #undef  CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE   // For cameras with 'low light' mode that does not work with raw define this
 208     #undef  CAM_DISABLE_RAW_IN_ISO_3200         // For cameras that don't have valid raw in ISO3200 mode (different from low light)
 209     #undef  CAM_DISABLE_RAW_IN_AUTO             // For cameras that don't have valid raw in AUTO mode
 210     #undef  CAM_DISABLE_RAW_IN_HQ_BURST         // For cameras with 'HQ Burst' mode that does not work with raw define this
 211     #undef  CAM_DISABLE_RAW_IN_HANDHELD_NIGHT_SCN // For cameras with 'HandHeld Night Scene' mode that does not work with raw define this
 212     #undef  CAM_DISABLE_RAW_IN_HYBRID_AUTO      // For cameras that lock up while saving raw in "Hybrid Auto" mode
 213     #undef  CAM_DISABLE_RAW_IN_MOVIE_DIGEST     // For cameras that lock up while saving raw in "Movie Digest" mode
 214     #undef  CAM_DISABLE_RAW_IN_DIGITAL_IS       // For cameras with 'Digital IS' mode that does not work with raw define this    
 215     #undef  CAM_DISABLE_RAW_IN_SPORTS           // For cameras that corrupt DNG/JPEG in Sports mode
 216     #undef  CAM_DISABLE_RAW_IN_HDR              // For cameras with multi-exposure HDR mode
 217     #undef  CAM_ISO_LIMIT_IN_HQ_BURST           // Defines max 'market' ISO override value for HQ Burst mode (higher values crash camera)
 218     #undef  CAM_MAX_ISO_OVERRIDE                // Defines max 'market' (non-zero) ISO override value - higher value may crash
 219     #undef  CAM_MIN_ISO_OVERRIDE                // Defines min 'market' (non-zero) ISO override value - lower value may crash if flash used [0 = AUTO, so always allowed]
 220     
 221     #undef  CAM_HAS_GPS                         // for cameras with GPS reseiver: includes the GPS coordinates in in DNG file
 222 
 223     #undef  CHDK_COLOR_BASE                     // Start color index for CHDK colors loaded into camera palette.
 224 
 225     #undef  CAM_LOAD_CUSTOM_COLORS              // Define to enable loading CHDK custom colors into the camera color palette
 226                                                 // requires load_chdk_palette() and vid_get_bitmap_active_palette() to be defined
 227                                                 // correctly for the camera along with
 228 
 229     #undef  CAM_CLEAN_OVERLAY                   // define when port supports making Canon overlay invisible (DIGIC 6)
 230 
 231     #define CAM_USB_EVENTID         0x902       // event ID for USB control. Changed to 0x202 in DryOS R49 so needs to be overridable.
 232                                                 // For DryOS only. These are "control events", and don't have the same IDs as "logical events"
 233 
 234     #undef CAM_USB_EVENTID_VXWORKS              // For vxworks cameras that need additional code to unlock mode switching
 235                                                 // this is the logical event "ConnectUSBCable", usually 0x1085
 236                                                 // different from CAM_USB_EVENTID since it should be undefined on most cameras
 237 
 238     #undef  CAM_NEED_SET_ZOOM_DELAY             // Define to add a delay after setting the zoom position before resetting the focus position in shooting_set_zoom 
 239 
 240     #undef  CAM_USE_ALT_SET_ZOOM_POINT          // Define to use the alternate code in lens_set_zoom_point()
 241     #undef  CAM_USE_ALT_PT_MoveOpticalZoomAt    // Define to use the PT_MoveOpticalZoomAt() function in lens_set_zoom_point()
 242     #undef  CAM_USE_OPTICAL_MAX_ZOOM_STATUS     // Use ZOOM_OPTICAL_MAX to reset zoom_status when switching from digital to optical zoom in gui_std_kbd_process()
 243 
 244     #undef  CAM_HAS_HI_ISO_AUTO_MODE            // Define if camera has 'HI ISO Auto' mode (as well as Auto ISO mode), needed for adjustment in user auto ISO menu 
 245 
 246     #define CAMERA_MIN_DIST         0           // Define min distance that can be set in _MoveFocusLensToDistance (allow override - e.g. G12 min dist = 1)
 247     #undef  CAMERA_MAX_DIST                     // Define max distance that can be set in _MoveFocusLensToDistance (allow override for superzooms - SX30/SX40, default defined below depending on OS)
 248 
 249     #undef  DRAW_ON_ACTIVE_BITMAP_BUFFER_ONLY   // Draw pixels on active bitmap buffer only.
 250                                                 // Requires bitmap_buffer & active_bitmap_buffer location in stubs_min.S or stubs_entry.S.
 251 
 252     #undef  CAM_SUPPORT_BITMAP_RES_CHANGE       // port can adapt to resolution change of the bitmap buffer (when composite or hdmi output is used)
 253 
 254     #undef  CAM_ZOOM_ASSIST_BUTTON_CONTROL      // Activate menu option to enable/disable the zoom assist button on the SX30/SX40
 255                                                 // For other cameras, requires additional support code in kbd.c (see the SX30 or SX40 version)
 256 
 257     #undef  CAM_MISSING_RAND                    // Define this if srand()/rand() functions not found in firmware (a810/a2300)
 258     #undef  MKDIR_RETURN_ONE_ON_SUCCESS         // Define this if mkdir() return 1 on success, 0 on fail (a810/a1300)
 259 
 260     #undef  CAM_OPTIONAL_EXTRA_BUTTON           // extra button (remapped, for use in ALT mode) can be set from menu, must set next two values as well
 261     #undef  CAM_EXTRA_BUTTON_NAMES              // Define the list of names for the extra button   - e.g. { "Off", "Display" }
 262     #undef  CAM_EXTRA_BUTTON_OPTIONS            // Define the list of button constants for the extra button, starting with 0 - e.g. { 0, KEY_DISPLAY }
 263 
 264     #undef  CAM_HOTSHOE_OVERRIDE                // the sense switch of the hot shoe can be overridden
 265 
 266     #define CAM_AF_LED                      -1  // ***** NOTE ***** Need to override this in platform_camera.h with correct value
 267                                                 // Defines 'led' Index value for camera_set_led function to control the AutoFocus assist LED
 268                                                 // Used for the Motion Detect & Live View buffer testing
 269 
 270     #undef CAM_FILE_COUNTER_IS_VAR              // file counter is variable file_counter_var in stubs, not a param
 271     
 272     #define CAM_GUI_FSELECT_SIZE  20, 6, 14     // filename, filesize, filedate camera file select window column widths
 273 
 274     #undef  CAM_IS_VID_REC_WORKS                // Define if the 'is_video_recording()' function works
 275 
 276     #undef  CAM_HAS_CANON_RAW                   // Define if the camera has native raw in the canon firmware
 277 
 278     // Keyboard repeat and initial delays (override in platform_camera.h if needed)
 279     #define KBD_REPEAT_DELAY                175
 280     #define KBD_INITIAL_DELAY               500
 281 
 282 // Base 'market' ISO value. Most (all?) DryOS R49 and later use 200, use tests/isobase.lua to check
 283 #if defined(CAM_DRYOS_REL) && CAM_DRYOS_REL >= 49 // CAM_DRYOS_REL defined on command line, not from platform_camera.h
 284     #define CAM_MARKET_ISO_BASE             200
 285 #else
 286     #define CAM_MARKET_ISO_BASE             100
 287 #endif
 288 
 289     // Below limits are for the CHDK LFN support routines (DryOS only)
 290     // defaults can be overridden in camera_platform.h
 291     // file name limits used here based on what the OS functions can create/write without errors
 292     // in many cases, firmware can list, open and read longer paths
 293 #if defined(CAM_DRYOS_REL) // CAM_DRYOS_REL defined on command line, not from platform_camera.h
 294     // #if CAM_DRYOS_REL == 20 // unknown
 295     #if CAM_DRYOS_REL == 23
 296         #define CAM_MAX_FNAME_LENGTH        18 
 297         #define CAM_MAX_PATH_LENGTH         255
 298     #elif CAM_DRYOS_REL == 31
 299         #define CAM_MAX_FNAME_LENGTH        18 
 300         #define CAM_MAX_PATH_LENGTH         59
 301     #elif CAM_DRYOS_REL == 39
 302         #define CAM_MAX_FNAME_LENGTH        30 
 303         #define CAM_MAX_PATH_LENGTH         32
 304 //    #elif CAM_DRYOS_REL == 43 // unknown
 305     #elif CAM_DRYOS_REL == 45
 306         #define CAM_MAX_FNAME_LENGTH        57 
 307         #define CAM_MAX_PATH_LENGTH         59
 308     #elif CAM_DRYOS_REL == 47
 309         #define CAM_MAX_FNAME_LENGTH        31 // note sx220hs seems to allow longer
 310         #define CAM_MAX_PATH_LENGTH         59
 311     #else // >= r49, and those unknown above
 312         #define CAM_MAX_FNAME_LENGTH        99 // camera can safely use filenames not longer than this (99 is a CHDK limit actually)
 313         #define CAM_MAX_PATH_LENGTH         255 // maximum path+filename length. Some actually allow much longer
 314     #endif 
 315 #endif
 316 
 317 //----------------------------------------------------------
 318 // Overridden values for each camera
 319 //----------------------------------------------------------
 320 
 321 // Include the settings file for the camera model currently being compiled.
 322 #include "platform_camera.h"
 323 
 324 // DryOS r31 and later cameras use 32bit subject distance values
 325 // set a default limit that's high enough
 326 // earlier cameras need 65535 as default
 327 #if defined(CAM_DRYOS) && CAM_DRYOS_REL >= 31
 328     #ifndef CAMERA_MAX_DIST
 329         #define CAMERA_MAX_DIST 2000000
 330     #endif
 331 #else
 332     #ifndef CAMERA_MAX_DIST
 333         #define CAMERA_MAX_DIST 65535
 334     #endif
 335 #endif
 336 
 337 #if !defined(CAM_IS_VID_REC_WORKS)
 338 #if !defined(CAM_FILEIO_SEM_TIMEOUT)
 339     #define CAM_FILEIO_SEM_TIMEOUT          3000    // TakeSemaphore timeout
 340 #endif
 341 #else
 342 #if !defined(CAM_FILEIO_SEM_TIMEOUT)
 343     #define CAM_FILEIO_SEM_TIMEOUT          0       // TakeSemaphore timeout - is_video_recording() == false
 344 #endif
 345 #if !defined(CAM_FILEIO_SEM_TIMEOUT_VID)
 346     #define CAM_FILEIO_SEM_TIMEOUT_VID      200     // TakeSemaphore timeout - is_video_recording() == true
 347 #endif
 348 #endif
 349 
 350 #if defined(CAM_VIDEO_CONTROL) && defined(CAM_SIMPLE_MOVIE_STATUS)
 351     #error "CAM_VIDEO_CONTROL and CAM_SIMPLE_MOVIE_STATUS are mutually exclusive"
 352 #endif
 353 
 354 // video quality/bitrate defaults, moved here from conf.h
 355 #ifdef CAM_MOVIEREC_NEWSTYLE
 356     // video defaults.for D6
 357     #define VIDEO_DEFAULT_QUALITY   9   // VBR relative min bitrate, 9 = CBR
 358     #define VIDEO_MAX_QUALITY       9   // 0..9
 359     #define VIDEO_DEFAULT_BITRATE   3   // 3 = fw default
 360 
 361     #undef  CAM_VIDEO_QUALITY_ONLY
 362 #else
 363     // video quality defaults. Ideally, these should match the camera default settings
 364     #define VIDEO_DEFAULT_QUALITY   84  // ? where does 84 come from
 365     #define VIDEO_MAX_QUALITY       99
 366     #define VIDEO_DEFAULT_BITRATE   3   // should be 1 for all cams
 367 #endif
 368 
 369 // sanity check platform_camera.h defined values for some common errors
 370 #if (CAM_ACTIVE_AREA_X1&1) || (CAM_ACTIVE_AREA_Y1&1) || (CAM_ACTIVE_AREA_X2&1) || (CAM_ACTIVE_AREA_Y2&1)
 371     #error "CAM_ACTIVE_AREA values must be even"
 372 #endif
 373 
 374 #if (CAM_ACTIVE_AREA_X2 - CAM_ACTIVE_AREA_X1) < CAM_JPEG_WIDTH
 375     #error "CAM_JPEG_WIDTH larger than active area"
 376 #endif
 377 
 378 #if (CAM_ACTIVE_AREA_Y2 - CAM_ACTIVE_AREA_Y1) < CAM_JPEG_HEIGHT
 379     #error "CAM_JPEG_HEIGHT larger than active area"
 380 #endif
 381 
 382 //==========================================================
 383 // END of Camera-dependent settings
 384 //==========================================================
 385 
 386 // For newer cameras where the screen bitmap is double the width we need to scale
 387 // the CHDK horizontal (X) co-ordinates
 388 #if CAM_USES_ASPECT_CORRECTION
 389     #define ASPECT_XCORRECTION(x)   ((x)<<1)    // See comments for CAM_USES_ASPECT_CORRECTION above
 390 #else
 391     #define ASPECT_XCORRECTION(x)   (x)         // See comments for CAM_USES_ASPECT_CORRECTION above
 392 #endif
 393 
 394 // curves only work in 10bpp for now
 395 #if CAM_SENSOR_BITS_PER_PIXEL != 10
 396     #undef OPT_CURVES
 397 #endif
 398 
 399 #ifndef OPT_PTP
 400     #undef CAM_CHDK_PTP
 401 #endif
 402 
 403 #ifdef CAM_FILEWRITETASK_SEEKS
 404     #define CAM_FILEWRITETASK_MULTIPASS 1
 405 #endif
 406 
 407 // Define default video AF scan buttons if not already defined in platform_camera.h
 408 #if CAM_AF_SCAN_DURING_VIDEO_RECORD
 409     #ifndef CAM_VIDEO_AF_BUTTON_NAMES
 410         #define CAM_VIDEO_AF_BUTTON_NAMES   { "", "Shutter", "Set" }
 411         #define CAM_VIDEO_AF_BUTTON_OPTIONS { 0, KEY_SHOOT_HALF, KEY_SET }
 412     #endif
 413 #endif
 414 
 415 // Define default value for DISP button name in shortcut text unless aready set in platform_camera.h
 416 // e.g. G1X uses Meter button as DISP in CHDK
 417 #ifndef CAM_DISP_BUTTON_NAME
 418     #define CAM_DISP_BUTTON_NAME            "DISP"
 419 #endif
 420 
 421 // used for conditional LANG strings and convenience - defined if any non-USB remote input supported
 422 #if (defined(CAM_REMOTE_AtoD_CHANNEL) || defined(CAM_REMOTE_HDMI_HPD) || defined(CAM_REMOTE_ANALOG_AV))
 423 #define CAM_REMOTE_MULTICHANNEL 1
 424 #endif
 425 //------------------------------------------------------------------- 
 426 // Keyboard / Button shortcuts - define in platform_camera.h
 427 // if the default values are not suitable
 428 // Default values are set below if not overridden
 429 //------------------------------------------------------------------
 430 
 431 // For models without ZOOM_LEVER  (#if !CAM_HAS_ZOOM_LEVER)
 432 // SHORTCUT_SET_INFINITY is not used
 433 // KEY_DISPLAY is used for gui_subj_dist_override_koef_enum;
 434 // KEY_LEFT/KEY_RIGHT is used for gui_subj_dist_override_value_enum (because of no separate ZOOM_IN/OUT)
 435 
 436 // Define keyboard / button shortcut values not already set above
 437 
 438 //Alt mode
 439 #if !defined(SHORTCUT_TOGGLE_RAW)
 440     #if CAM_HAS_ERASE_BUTTON
 441         #define SHORTCUT_TOGGLE_RAW         KEY_ERASE
 442     #else
 443         #define SHORTCUT_TOGGLE_RAW         KEY_DISPLAY
 444     #endif
 445 #endif
 446 #if !defined(CAM_HAS_MANUAL_FOCUS) && !defined(SHORTCUT_MF_TOGGLE)
 447     #if CAM_HAS_ERASE_BUTTON
 448         #define SHORTCUT_MF_TOGGLE          KEY_DISPLAY
 449     #else
 450         #define SHORTCUT_MF_TOGGLE          KEY_UP
 451     #endif
 452 #endif
 453 
 454 //Half press shoot button    
 455 #if !defined(SHORTCUT_TOGGLE_HISTO)
 456     #if CAM_HAS_ERASE_BUTTON
 457         #define SHORTCUT_TOGGLE_HISTO       KEY_UP
 458     #else
 459         #define SHORTCUT_TOGGLE_HISTO       KEY_MENU
 460     #endif
 461 #endif
 462 #if !defined(SHORTCUT_TOGGLE_ZEBRA)
 463     #define SHORTCUT_TOGGLE_ZEBRA       KEY_LEFT
 464 #endif
 465 #if !defined(SHORTCUT_TOGGLE_OSD)
 466     #define SHORTCUT_TOGGLE_OSD         KEY_RIGHT
 467 #endif
 468 #if !defined(SHORTCUT_DISABLE_OVERRIDES)
 469     #define SHORTCUT_DISABLE_OVERRIDES  KEY_DOWN
 470 #endif
 471 
 472 //Alt mode & Manual mode  
 473 #if !defined(SHORTCUT_SET_INFINITY)
 474     #if CAM_HAS_ERASE_BUTTON
 475         #define SHORTCUT_SET_INFINITY       KEY_UP
 476     #else
 477         #define SHORTCUT_SET_INFINITY       KEY_DISPLAY
 478     #endif
 479 #endif
 480 #if !defined(SHORTCUT_SET_HYPERFOCAL)
 481     #define SHORTCUT_SET_HYPERFOCAL     KEY_DOWN
 482 #endif
 483 
 484 #if CAM_HAS_ZOOM_LEVER
 485     #define SHORTCUT_SD_SUB KEY_ZOOM_OUT
 486     #define SHORTCUT_SD_ADD KEY_ZOOM_IN
 487 #endif
 488 
 489 //==========================================================
 490 
 491 // DebugAssert
 492 #ifndef CAM_3ARG_DebugAssert
 493     #ifdef THUMB_FW
 494         #define CAM_3ARG_DebugAssert        1   // Digic6 - default is 3 arg version of DebugAssert
 495     #else
 496         #define CAM_3ARG_DebugAssert        0   // All others default is 2 arg version
 497     #endif
 498 #endif
 499 
 500 //==========================================================
 501 #include "camera_info.h"
 502 //==========================================================
 503 
 504 #endif /* CAMERA_H */

/* [<][>][^][v][top][bottom][index][help] */