Changeset 739


Ignore:
Timestamp:
08/08/11 09:48:00 (23 months ago)
Author:
msl
Message:

Aktualisierung auf Rev. 1285 offizieller Trunk

  • Betrifft SX220

+ Modus "Best Shoot Select" bei Belichtungsreihen ausgeschlossen.
+ Neue Tastendefinitionen in keyboard.h
+ Alternative ALT-Tasten: Playback-Taste hinzugefügt.
+ platform_camera.h unnötige Einträge entfernt.
+ Korrektur LED-Tabelle in lib.c

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/gui.c

    r722 r739  
    13911391        static const int keys[] = {KEY_PRINT, KEY_DISPLAY}; 
    13921392    #elif defined(CAMERA_sx220hs) 
    1393     static const char* names[]={ "Disp+Set", "Display", "Video"}; 
    1394     static const int keys[] = {KEY_PRINT, KEY_DISPLAY, KEY_VIDEO}; 
     1393    static const char* names[]={ "Disp+Set", "Display", "Playback", "Video"}; 
     1394    static const int keys[] = {KEY_PRINT, KEY_DISPLAY, KEY_PLAYBACK, KEY_VIDEO}; 
    13951395    #else 
    13961396        #error camera alt-buttons not defined 
  • trunk/include/keyboard.h

    r711 r739  
    3939#define KEY_METERING    32      // G12 metering mode button 
    4040 
    41 #define KEY_SHOOT_FULL_ONLY 33  // As KEY_SHOOT_FULL but press/release KEY_SHOOT_HALF is not included 
     41//SX220  
     42#define KEY_PLAYBACK    33  
     43#define KEY_LEFT_SOFT   34    // jogdial keys have two steps  
     44#define KEY_RIGHT_SOFT  35  
     45#define KEY_UP_SOFT     36  
     46#define KEY_DOWN_SOFT   37   
     47 
     48#define KEY_SHOOT_FULL_ONLY 38  // As KEY_SHOOT_FULL but press/release KEY_SHOOT_HALF is not included 
    4249 
    4350#define JOGDIAL_LEFT    100 
  • trunk/platform/generic/shooting.c

    r715 r739  
    13031303  if (shooting_get_drive_mode()!=0)  { 
    13041304     int m=mode_get()&MODE_SHOOTING_MASK; 
    1305      if (m!=MODE_STITCH) { 
     1305     if (m!=MODE_STITCH&& m!=MODE_SCN_BEST_IMAGE) { 
    13061306       if (state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) {  
    13071307           bracketing.shoot_counter=0; 
  • trunk/platform/sx220hs/kbd.c

    r711 r739  
    2626 
    2727// override key and feather bits to avoid feather osd messing up chdk display in ALT mode 
    28 #define KEYS_MASK0 (0x0007FC0F)     // sx220 physw_status[0] 7FC05 
     28#define KEYS_MASK0 (0x000FFC0F)     // sx220 physw_status[0] 
    2929#define KEYS_MASK1 (0x00200000) 
    30 #define KEYS_MASK2 (0x00002182)         // sx220 physw_status[2] 
     30#define KEYS_MASK2 (0x00002182)     // sx220 physw_status[2] 
    3131 
    3232#define NEW_SS (0x2000) 
     
    3434#define USB_MASK (0x4000000) 
    3535#define USB_REG 2 
    36 #define SD_READONLY_IDX     2          
    37 #define USB_IDX             2  
     36#define SD_READONLY_IDX     2 
     37#define USB_IDX             2 
    3838 
    3939#ifndef MALLOCD_STACK 
     
    4141#endif 
    4242 
    43 #define KEY_SOFT_LEFT 987       //added just to disable soft_left in alt mode 
    44  
    4543static KeyMap keymap[] = { 
    4644 
    47         /* tiny bug: key order matters. see kbd_get_pressed_key() 
    48         * for example*/ 
     45    /* tiny bug: key order matters. see kbd_get_pressed_key() 
     46    * for example*/ 
    4947  
    5048 
    51         { 0, KEY_ZOOM_OUT        , 0x00000001 }, 
    52         { 0, KEY_ZOOM_OUT1       , 0x00000001 }, 
    53         { 0, KEY_ZOOM_OUT        , 0x00000002 },         
    54         { 0, KEY_ZOOM_OUT3       , 0x00000002 },         
    55         { 0, KEY_ZOOM_OUT                , 0x00000003 }, 
    56         { 0, KEY_ZOOM_OUT2               , 0x00000003 }, 
    57         { 0, KEY_ZOOM_IN         , 0x00000004 }, 
    58         { 0, KEY_ZOOM_IN1        , 0x00000004 },         
    59         { 0, KEY_ZOOM_IN                 , 0x00000008 }, 
    60         { 0, KEY_ZOOM_IN3                , 0x00000008 }, 
    61         { 0, KEY_ZOOM_IN                 , 0x0000000C }, 
    62         { 0, KEY_ZOOM_IN2                , 0x0000000C }, 
    63         { 0, KEY_DISPLAY         , 0x00000800 }, 
    64         { 0, KEY_UP                      , 0x00001400 },  
    65         { 0, KEY_RIGHT               , 0x00006000 }, 
    66         { 0, KEY_SET                 , 0x00010000 }, 
    67         { 0, KEY_PRINT               , 0x00010800 },  //DISP+SET for ALT menu 
    68         { 0, KEY_DOWN                , 0x00028000 }, 
    69         { 0, KEY_MENU                , 0x00040000 },     
    70  
    71         { 2, KEY_SHOOT_FULL              , 0x00002002 }, 
    72         { 2, KEY_SHOOT_FULL_ONLY         , 0x00000002 }, 
    73         { 2, KEY_SOFT_LEFT               , 0x00000080 }, 
    74         { 2, KEY_LEFT                    , 0x00000100 }, 
    75         { 2, KEY_SHOOT_HALF              , 0x00002000 }, 
    76  
    77         { 1, KEY_VIDEO               , 0x00200000 },     
    78  
    79         { 0, 0, 0 } 
     49    { 0, KEY_ZOOM_OUT        , 0x00000001 }, 
     50    { 0, KEY_ZOOM_OUT1       , 0x00000001 }, 
     51    { 0, KEY_ZOOM_OUT        , 0x00000002 }, 
     52    { 0, KEY_ZOOM_OUT3       , 0x00000002 }, 
     53    { 0, KEY_ZOOM_OUT        , 0x00000003 }, 
     54    { 0, KEY_ZOOM_OUT2       , 0x00000003 }, 
     55    { 0, KEY_ZOOM_IN         , 0x00000004 }, 
     56    { 0, KEY_ZOOM_IN1        , 0x00000004 }, 
     57    { 0, KEY_ZOOM_IN         , 0x00000008 }, 
     58    { 0, KEY_ZOOM_IN3        , 0x00000008 }, 
     59    { 0, KEY_ZOOM_IN         , 0x0000000C }, 
     60    { 0, KEY_ZOOM_IN2        , 0x0000000C }, 
     61    { 0, KEY_DISPLAY         , 0x00000800 }, 
     62    { 0, KEY_UP              , 0x00001000 },  
     63    { 0, KEY_RIGHT           , 0x00006000 }, 
     64    { 0, KEY_SET             , 0x00010000 }, 
     65    { 0, KEY_PRINT           , 0x00010800 },  //DISP+SET for ALT menu 
     66    { 0, KEY_DOWN            , 0x00020000 }, 
     67    { 0, KEY_MENU            , 0x00040000 }, 
     68    { 0, KEY_VIDEO           , 0x00080000 }, 
     69    { 0, KEY_RIGHT_SOFT      , 0x00002000 }, 
     70    { 0, KEY_UP_SOFT         , 0x00000400 }, 
     71    { 0, KEY_DOWN_SOFT       , 0x00008000 }, 
     72     
     73    { 2, KEY_LEFT_SOFT       , 0x00000080 }, 
     74    { 2, KEY_LEFT            , 0x00000100 }, 
     75    { 2, KEY_SHOOT_FULL      , 0x00002002 }, 
     76    { 2, KEY_SHOOT_FULL_ONLY , 0x00000002 }, 
     77    { 2, KEY_SHOOT_HALF      , 0x00002000 }, 
     78 
     79    { 1, KEY_PLAYBACK        , 0x00200000 }, 
     80 
     81    { 0, 0, 0 } 
    8082}; 
    8183 
  • trunk/platform/sx220hs/lib.c

    r702 r739  
    4040 
    4141void camera_set_led(int led, int state, int bright) { 
    42  static char led_table[5]={4,5,7,8,9}; 
     42 static char led_table[2]={0,9}; 
    4343 _LEDDrive(led_table[led%sizeof(led_table)], state<=1 ? !state : state); 
    4444} 
  • trunk/platform/sx220hs/platform_camera.h

    r732 r739  
    4040    #undef  CAM_CAN_SD_OVER_NOT_IN_MF 
    4141    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 
    42      
    43     #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 0 
     42 
    4443    #define CAM_HAS_VIDEO_BUTTON            1 
    4544    #define CAM_VIDEO_QUALITY_ONLY          1 
    4645  
    4746    #undef  CAM_VIDEO_CONTROL 
    48     
    49     //#define CAM_MULTIPART                   1 
     47 
    5048    #define CAM_HAS_JOGDIAL                 1 
    5149    #undef  CAM_USE_ZOOM_FOR_MF 
    52      
    53     //#define CAM_BRACKETING                  1 
    54  
    5550 
    5651    #undef  CAM_UNCACHED_BIT  // shut up compiler 
     
    5853    #define DNG_SUPPORT                     1 
    5954 
    60   
    6155    #define cam_CFAPattern                  0x02010100 
    6256   
     
    6761    -1336, 1000000,  2334, 1000000,  4387, 1000000 
    6862  
    69     #define cam_CalibrationIlluminant1      17 // Standard Light A was 17 
     63    #define cam_CalibrationIlluminant1      17 
    7064    
    7165    #define CAM_JPEG_WIDTH                  4000 
    7266    #define CAM_JPEG_HEIGHT                 3000 
    73                                                  
    7467    #define CAM_ACTIVE_AREA_X1              96 
    7568    #define CAM_ACTIVE_AREA_Y1              24 
     
    7972    #define PARAM_CAMERA_NAME               4 // parameter number for GetParameterData 
    8073    #undef  CAM_SENSOR_BITS_PER_PIXEL 
    81     #undef  CAM_WHITE_LEVEL 
    82     #undef  CAM_BLACK_LEVEL 
    8374    #define CAM_SENSOR_BITS_PER_PIXEL       12 
    84     #define CAM_WHITE_LEVEL                 ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1) 
    85     #define CAM_BLACK_LEVEL                 127 
    8675 
    8776    #define CAM_EXT_TV_RANGE                1 
     
    10291 
    10392    #undef  ASPECT_GRID_XCORRECTION 
    104     #define ASPECT_GRID_XCORRECTION(x)      ( (x)+60  )  //+ shift the grid 60 pixels right for 16:9 displays //grids are designed on a 360x240 basis and screen is 320x240, we need x*320/360=x*8/9  ,  8 is the right value for sx210 
     93    #define ASPECT_GRID_XCORRECTION(x)      ( (x)+60  )  //+ shift the grid 60 pixels right for 16:9 displays 
    10594    #undef  ASPECT_GRID_YCORRECTION 
    106     #define ASPECT_GRID_YCORRECTION(y)      ( (y) )       //y correction for grids  made on a 360x240 As the buffer is 720x240 we have no correction here. 
     95    #define ASPECT_GRID_YCORRECTION(y)      ( (y) ) 
    10796 
    10897    #undef  ASPECT_VIEWPORT_XCORRECTION 
    109     #define ASPECT_VIEWPORT_XCORRECTION(x)  ( (x)  )//ASPECT_GRID_XCORRECTION(x) //viewport is 360x240 and screen 320x240, we need x*320/360=x*8/9, equal than grids, used by edgeoverlay 
     98    #define ASPECT_VIEWPORT_XCORRECTION(x)  ( (x)  ) 
    11099    #undef  ASPECT_VIEWPORT_YCORRECTION 
    111100    #define ASPECT_VIEWPORT_YCORRECTION(y)  ( (y) ) 
     
    114103    #define EDGE_HMARGIN                    10 
    115104 
    116     //games mappings 
    117105    #undef  GAMES_SCREEN_WIDTH 
    118106    #undef  GAMES_SCREEN_HEIGHT 
     
    120108    #define GAMES_SCREEN_HEIGHT             240 
    121109    #undef  ASPECT_GAMES_XCORRECTION 
    122     // 720/360=2 same aspect than grids and viewport but another approach: there is a lot of corrections to do in game's code, and we decide to paint directly on display buffer wirh another resolution 
    123     // used by gui.c that configures the draw environment (trhough new draw_gui function) depending on gui_mode: we have then 360x240 for games (but deformed output:circles are not circles) and 320x240 for 
    124     // other modes in perfect aspect ratio 4/3: slightly better visualization: file menus more readable, ... 
    125110    #define ASPECT_GAMES_XCORRECTION(x)     ( ((x)<<1) ) 
    126111    #undef  ASPECT_GAMES_YCORRECTION 
    127     #define ASPECT_GAMES_YCORRECTION(y)     ( (y) )  //none 
     112    #define ASPECT_GAMES_YCORRECTION(y)     ( (y) ) 
    128113 
    129     //zebra letterbox for saving memory 
    130114    #undef  ZEBRA_HMARGIN0 
    131     #define ZEBRA_HMARGIN0                  30 //this 30 rows are not used by the display buffer is 720x240 effective, no 960x270, i.e. (270-240) reduction in widht possible but not done (more difficult to manage it and slower). 
     115    #define ZEBRA_HMARGIN0                  30 
    132116 
    133     //Testing Zebra stuff asmp1989 Dec2010 
    134117    #define CAM_ZEBRA_ASPECT_ADJUST         1 
    135118    #define CAM_ZEBRA_NOBUF                 1 
    136119 
    137120    #define CAM_QUALITY_OVERRIDE            1 
    138     #define CAM_AF_SCAN_DURING_VIDEO_RECORD 0 
    139121     
    140122    #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 
Note: See TracChangeset for help on using the changeset viewer.