Changeset 1632


Ignore:
Timestamp:
02/02/12 08:21:50 (2 years ago)
Author:
philmoz
Message:

Move code from platform/generic/shooting.c to core/shooting.c (new file). This means that all the shooting code, which was not platform specific, is now compiled as 'thumb' rather than 'arm' code. This saves approx 4.5K off the core CHDK size. Also includes a re-org of the functions into groups, and cleanup of other code to call functions in shooting.c.

Location:
trunk
Files:
1 added
95 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/Makefile

    r1621 r1632  
    6565     histogram.o gui_batt.o gui_space.o gui_osd.o raw.o \ 
    6666     gui_usb.o gui_lang.o modules.o module_load.o \ 
    67      levent.o shot_histogram.o console.o \ 
     67     levent.o shot_histogram.o console.o shooting.o \ 
    6868     usb_input.o usb_module.o usb_remote.o $(OPT_OBJS) 
    6969 
  • trunk/core/conf.c

    r1621 r1632  
    763763        ((movie_status > 1) && conf.save_raw_in_video) ||                                   // True is movie mode and save_raw_in_video is disabled 
    764764#ifdef CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 
    765         (shooting_get_prop(PROPCASE_RESOLUTION)==7) ||                                      // True if shooting resolution is 'low light' 
     765        (shooting_get_resolution()==7) ||                                                   // True if shooting resolution is 'low light' 
    766766#endif 
    767767#if defined(CAM_DISABLE_RAW_IN_HQ_BURST) 
     
    771771        (m == MODE_NIGHT_SCENE) ||                                                          // True if HandHeld Night Scene (SX40HS corrupts JPEG images if RAW enabled in this mode) 
    772772#endif 
    773         (shooting_get_prop(PROPCASE_RESOLUTION)==5) ||                                      // True if shooting resolution is ??? (what is mode 5) 
     773        (shooting_get_resolution()==5) ||                                                   // True if shooting resolution is ??? (what is mode 5) 
    774774        ((m==MODE_SPORTS) && conf.save_raw_in_sports) ||                                    // True if sports mode and save_raw_in_sports is disabled 
    775775        ((m==MODE_AUTO) && conf.save_raw_in_auto) ||                                        // True if auto mode and save_raw_in_auto is disabled 
  • trunk/core/curves.c

    r1594 r1632  
    2626        (using Zebra) 
    2727         
    28         External function added:  shooting_get_ev_correction1 (added in generic/shooting) 
     28        External function added:  shooting_get_ev_correction1 (added in core/shooting) 
    2929        Modified gui.c for curve enable 
    3030         
  • trunk/core/gui.c

    r1621 r1632  
    16991699                int m=mode_get()&MODE_SHOOTING_MASK; 
    17001700                if ((m==MODE_M) || (m==MODE_AV)) 
    1701                      conf.subj_dist_override_value=(int)shooting_get_hyperfocal_distance_f(shooting_get_aperture_from_av96(shooting_get_user_av96()),get_focal_length(lens_get_zoom_point())); 
     1701                     conf.subj_dist_override_value=(int)shooting_get_hyperfocal_distance_f(shooting_get_aperture_from_av96(shooting_get_user_av96()),get_focal_length(shooting_get_zoom())); 
    17021702                else conf.subj_dist_override_value=(int)shooting_get_hyperfocal_distance(); 
    17031703                shooting_set_focus(shooting_get_subject_distance_override_value(), SET_NOW); 
     
    21162116                        if (recreview_hold==0) 
    21172117                        {        
    2118                                 if ( shooting_get_prop(PROPCASE_DISPLAY_MODE) == 0) return( 1 );                         
     2118                                if ( shooting_get_display_mode() == 0) return( 1 );                      
    21192119                        } 
    21202120                        else 
     
    21392139        } 
    21402140#else 
    2141                         if ( shooting_get_prop(PROPCASE_DISPLAY_MODE) == 0) return( 1 ); 
     2141                        if ( shooting_get_display_mode() == 0) return( 1 ); 
    21422142                } 
    21432143        } 
  • trunk/core/gui_osd.c

    r1621 r1632  
    6262    av=shooting_get_min_real_aperture(); 
    6363#endif 
    64     fl=get_focal_length(lens_get_zoom_point());  
     64    fl=get_focal_length(shooting_get_zoom());    
    6565    dof.far_limit=-1.0; 
    6666    dof.near_limit=-1.0; 
     
    317317    if (conf.values_show_zoom) 
    318318    { 
    319         int fl, zp=lens_get_zoom_point(), fl1=get_focal_length(zp);      
     319        int fl, zp=shooting_get_zoom(), fl1=get_focal_length(zp);      
    320320        switch (conf.zoom_value) 
    321321        { 
     
    529529{ 
    530530    static char *s[6]={"   ", "1/6", "1/3", "1/2", "2/3", "5/6"}; 
    531     short ev=shooting_get_prop(PROPCASE_EV_CORRECTION_1); 
     531    short ev=shooting_get_ev_correction1(); 
    532532    if (ev/96 || (ev==0)) sprintf(osd_buf, "EV:  %d %s", abs(ev/96), s[abs(ev/16%6)]); 
    533533    else sprintf(osd_buf, "EV:  %s   ", s[abs(ev/16%6)]); 
  • trunk/core/kbd.c

    r1621 r1632  
    187187    if (kbd_is_key_pressed(KEY_UP) && ((m&MODE_SHOOTING_MASK) != MODE_M) && !mode_video) { 
    188188        if (conf.fast_ev && key_pressed == 0) { 
    189             shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_prop(PROPCASE_EV_CORRECTION_1)+(conf.fast_ev_step+1)*16); 
    190             shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_prop(PROPCASE_EV_CORRECTION_2)+(conf.fast_ev_step+1)*16); 
     189            shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_ev_correction1()+(conf.fast_ev_step+1)*16); 
     190            shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_ev_correction2()+(conf.fast_ev_step+1)*16); 
    191191            EnterToCompensationEVF(); 
    192192            key_pressed = KEY_UP; 
     
    200200        if (conf.fast_ev && key_pressed == 0) { 
    201201            kbd_key_release_all(); 
    202             shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_prop(PROPCASE_EV_CORRECTION_1)-(conf.fast_ev_step+1)*16); 
    203             shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_prop(PROPCASE_EV_CORRECTION_2)-(conf.fast_ev_step+1)*16); 
     202            shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_ev_correction1()-(conf.fast_ev_step+1)*16); 
     203            shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_ev_correction2()-(conf.fast_ev_step+1)*16); 
    204204            key_pressed = KEY_DOWN; 
    205205            EnterToCompensationEVF(); 
     
    212212 
    213213    if (conf.fast_ev &&kbd_is_key_pressed(KEY_SHOOT_HALF) && (jogdial==JOGDIAL_RIGHT) && ((m&MODE_SHOOTING_MASK) != MODE_M) && !mode_video) { 
    214             shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_prop(PROPCASE_EV_CORRECTION_1)+(conf.fast_ev_step+1)*16); 
    215             shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_prop(PROPCASE_EV_CORRECTION_2)+(conf.fast_ev_step+1)*16); 
     214            shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_ev_correction1()+(conf.fast_ev_step+1)*16); 
     215            shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_ev_correction2()+(conf.fast_ev_step+1)*16); 
    216216            EnterToCompensationEVF(); 
    217217        } 
    218218 
    219219    if (conf.fast_ev &&kbd_is_key_pressed(KEY_SHOOT_HALF) && (jogdial==JOGDIAL_LEFT) && ((m&MODE_SHOOTING_MASK) != MODE_M) && !mode_video) { 
    220             shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_prop(PROPCASE_EV_CORRECTION_1)-(conf.fast_ev_step+1)*16); 
    221             shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_prop(PROPCASE_EV_CORRECTION_2)-(conf.fast_ev_step+1)*16); 
     220            shooting_set_prop(PROPCASE_EV_CORRECTION_1,shooting_get_ev_correction1()-(conf.fast_ev_step+1)*16); 
     221            shooting_set_prop(PROPCASE_EV_CORRECTION_2,shooting_get_ev_correction2()-(conf.fast_ev_step+1)*16); 
    222222            EnterToCompensationEVF(); 
    223223        } 
  • trunk/core/luascript.c

    r1621 r1632  
    10971097static int luaCB_get_focus_mode( lua_State* L ) 
    10981098{ 
    1099   lua_pushnumber( L, shooting_get_prop(PROPCASE_FOCUS_MODE) ); 
     1099  lua_pushnumber( L, shooting_get_focus_mode() ); 
    11001100  return 1; 
    11011101} 
     
    11031103static int luaCB_get_flash_mode( lua_State* L ) 
    11041104{ 
    1105   lua_pushnumber( L, shooting_get_prop(PROPCASE_FLASH_MODE) ); 
     1105  lua_pushnumber( L, shooting_get_flash_mode() ); 
    11061106  return 1; 
    11071107} 
     
    11091109static int luaCB_get_shooting( lua_State* L ) 
    11101110{ 
    1111   lua_pushboolean( L, shooting_get_prop(PROPCASE_SHOOTING) ); 
     1111  lua_pushboolean( L, shooting_in_progress() ); 
    11121112  return 1; 
    11131113} 
     
    11151115static int luaCB_get_flash_ready( lua_State* L ) 
    11161116{ 
    1117   lua_pushboolean( L, shooting_get_prop(PROPCASE_IS_FLASH_READY) ); 
     1117  lua_pushboolean( L, shooting_is_flash() ); 
    11181118  return 1; 
    11191119} 
     
    11211121static int luaCB_get_IS_mode( lua_State* L ) 
    11221122{ 
    1123   lua_pushnumber( L, shooting_get_prop(PROPCASE_IS_MODE) ); 
     1123  lua_pushnumber( L, shooting_get_is_mode() ); 
    11241124  return 1; 
    11251125} 
     
    11611161static int luaCB_get_ev( lua_State* L ) 
    11621162{ 
    1163   lua_pushnumber( L, shooting_get_prop(PROPCASE_EV_CORRECTION_1) ); 
     1163  lua_pushnumber( L, shooting_get_ev_correction1() ); 
    11641164  return 1; 
    11651165} 
  • trunk/include/lolevel.h

    r1621 r1632  
    2121extern long _GetFocusLensSubjectDistanceFromLens(); 
    2222extern void _MoveFocusLensToDistance(short *dist); 
     23#ifdef CAM_AV_OVERRIDE_IRIS_FIX 
     24extern int _MoveIrisWithAv(short*); 
     25#endif 
    2326extern void _PutInNdFilter(); 
    2427extern void _PutOutNdFilter(); 
  • trunk/include/platform.h

    r1621 r1632  
    304304/******************************************************************/ 
    305305short shooting_get_aperture_sizes_table_size(); 
    306 short shooting_get_aperture_sizes_table_prop_id(short i); 
    307306short shooting_get_max_aperture_sizes_table_prop_id(); 
    308307short shooting_get_aperture_from_av96(short av96); 
     
    332331extern int circle_of_confusion; 
    333332/******************************************************************/ 
     333extern short shooting_get_is_mode(); 
     334extern short shooting_get_resolution(); 
     335extern short shooting_get_display_mode(); 
     336/******************************************************************/ 
    334337extern const int zoom_points; 
    335338int shooting_get_zoom(); 
     
    338341void shooting_set_zoom_speed(int v); 
    339342/******************************************************************/ 
    340 int shooting_get_focus(); 
    341343void shooting_set_focus(int v, short is_now); 
    342344short shooting_get_focus_mode(); 
     
    471473void ExitFromCompensationEVF(void); 
    472474 
     475extern void PutInNdFilter(); 
     476extern void PutOutNdFilter(); 
     477extern long GetCurrentAvValue(); 
     478extern long IsStrobeChargeCompleted(); 
     479extern void SetCurrentCaptureModeType(); 
     480#if CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 
     481extern void UnsetZoomForMovie(); 
     482#endif 
     483#ifdef CAM_AV_OVERRIDE_IRIS_FIX 
     484extern int MoveIrisWithAv(short*); 
     485#endif 
     486#if CAM_EV_IN_VIDEO 
     487extern void ExpCtrlTool_StartContiAE(int, int); 
     488extern void ExpCtrlTool_StopContiAE(int, int); 
     489extern short SetAE_ShutterSpeed(short* tv); 
     490#endif 
     491 
    473492void TurnOnBackLight(void); 
    474493void TurnOffBackLight(void); 
     
    476495void wait_until_remote_button_is_released(void); 
    477496short shooting_get_ev_correction1(); 
     497short shooting_get_ev_correction2(); 
    478498 
    479499//image_quality_override 
  • trunk/lib/ubasic/ubasic.c

    r1612 r1632  
    338338  case TOKENIZER_GET_FOCUS_MODE: 
    339339    accept(TOKENIZER_GET_FOCUS_MODE); 
    340     r = shooting_get_prop(PROPCASE_FOCUS_MODE); 
     340    r = shooting_get_focus_mode(); 
    341341   break; 
    342342        case TOKENIZER_GET_DISPLAY_MODE: 
    343343    accept(TOKENIZER_GET_DISPLAY_MODE); 
    344     r = shooting_get_prop(PROPCASE_DISPLAY_MODE); 
     344    r = shooting_get_display_mode(); 
    345345   break; 
    346346  case TOKENIZER_GET_FLASH_MODE: 
    347347    accept(TOKENIZER_GET_FLASH_MODE); 
    348     r = shooting_get_prop(PROPCASE_FLASH_MODE); 
     348    r = shooting_get_flash_mode(); 
    349349   break; 
    350350  case TOKENIZER_GET_SHOOTING: 
    351351    accept(TOKENIZER_GET_SHOOTING); 
    352     r = shooting_get_prop(PROPCASE_SHOOTING); 
     352    r = shooting_in_progress(); 
    353353   break; 
    354354  case TOKENIZER_GET_FLASH_READY: 
    355355    accept(TOKENIZER_GET_FLASH_READY); 
    356     r = shooting_get_prop(PROPCASE_IS_FLASH_READY); 
     356    r = shooting_is_flash(); 
    357357   break; 
    358358  case TOKENIZER_GET_IS_MODE: 
    359359    accept(TOKENIZER_GET_IS_MODE); 
    360     r = shooting_get_prop(PROPCASE_IS_MODE); 
     360    r = shooting_get_is_mode(); 
    361361   break; 
    362362  case TOKENIZER_GET_EV: 
    363363    accept(TOKENIZER_GET_EV); 
    364     r = shooting_get_prop(PROPCASE_EV_CORRECTION_1); 
     364    r = shooting_get_ev_correction1(); 
    365365   break; 
    366366  case TOKENIZER_GET_RESOLUTION: 
    367367    accept(TOKENIZER_GET_RESOLUTION); 
    368     r = shooting_get_prop(PROPCASE_RESOLUTION); 
     368    r = shooting_get_resolution(); 
    369369   break; 
    370370  case TOKENIZER_GET_QUALITY: 
  • trunk/platform/a1100/shooting.c

    r1233 r1632  
    8181};           
    8282 
    83 static const CapturemodeMap modemap[] = { 
     83const CapturemodeMap modemap[] = { 
    8484    { MODE_AUTO,               32768 }, 
    8585    { MODE_P,                  32772 }, 
  • trunk/platform/a2000/shooting.c

    r860 r1632  
    115115canon mode list FFEB9B10 in 100c 
    116116*/ 
    117 static const CapturemodeMap modemap[] = { 
     117const CapturemodeMap modemap[] = { 
    118118  { MODE_LONG_SHUTTER,       32774 },  // not verified 
    119119  { MODE_VIDEO_STD,          2600  }, 
  • trunk/platform/a3000/shooting.c

    r1372 r1632  
    8383};         
    8484 
    85 static const CapturemodeMap modemap[] = { // prop 49 
     85const CapturemodeMap modemap[] = { // prop 49 
    8686        { MODE_AUTO,               32768  }, 
    8787        { MODE_P,                  32772  }, 
  • trunk/platform/a3300/shooting.c

    r1620 r1632  
    7474}; 
    7575 
    76 static struct { 
     76struct { 
    7777        int hackmode; 
    7878        int canonmode; 
  • trunk/platform/a410/shooting.c

    r1287 r1632  
    8080canon mode list ffd39b10 in a410 100f 
    8181*/           
    82 static const CapturemodeMap modemap[] = { 
     82const CapturemodeMap modemap[] = { 
    8383    { MODE_P,                   0 }, 
    8484    { MODE_AUTO,                4 }, 
  • trunk/platform/a430/shooting.c

    r1628 r1632  
    8484canon mode list FFD588D4 in 100b 
    8585*/           
    86 static const CapturemodeMap modemap[] = { 
     86const CapturemodeMap modemap[] = { 
    8787//    { MODE_M,                  32769 }, 
    8888    { MODE_P,                  32772 }, 
  • trunk/platform/a450/shooting.c

    r1276 r1632  
    9090canon mode list FFEAB878 in 100d 
    9191*/ 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    { MODE_LONG_SHUTTER,       32774 }, // confirmed on a460 
    9494    { MODE_AUTO,               32768 }, 
  • trunk/platform/a460/shooting.c

    r1276 r1632  
    9292canon mode list FFEAB860 in 100d 
    9393*/ 
    94 static const CapturemodeMap modemap[] = { 
     94const CapturemodeMap modemap[] = { 
    9595    { MODE_LONG_SHUTTER,       32774 }, 
    9696    { MODE_SUPER_MACRO,        33289 }, 
  • trunk/platform/a470/shooting.c

    r860 r1632  
    9898canon mode list FFE8FAB4 in 100e 
    9999*/ 
    100 static const CapturemodeMap modemap[] = { 
     100const CapturemodeMap modemap[] = { 
    101101    { MODE_LONG_SHUTTER,       32774 }, // guessed 
    102102    { MODE_AUTO,               32768 }, 
  • trunk/platform/a480/shooting.c

    r884 r1632  
    7878};           
    7979 
    80 static const CapturemodeMap modemap[] = { 
     80const CapturemodeMap modemap[] = { 
    8181        { MODE_AUTO,               32768  }, 
    8282        { MODE_P,                  32772  }, 
  • trunk/platform/a490/shooting.c

    r1482 r1632  
    7878};           
    7979 
    80 static const CapturemodeMap modemap[] = { 
     80const CapturemodeMap modemap[] = { 
    8181    { MODE_AUTO,               32768  }, 
    8282    { MODE_P,                  32772  }, 
  • trunk/platform/a495/shooting.c

    r1376 r1632  
    7878};           
    7979 
    80 static const CapturemodeMap modemap[] = { 
     80const CapturemodeMap modemap[] = { 
    8181    { MODE_AUTO,               32768  }, 
    8282    { MODE_P,                  32772  }, 
  • trunk/platform/a530/shooting.c

    r1276 r1632  
    9595canon mode list FFD47FC4 in 100a 
    9696*/ 
    97 static const CapturemodeMap modemap[] = { 
     97const CapturemodeMap modemap[] = { 
    9898    { MODE_AUTO,               32768 }, 
    9999    { MODE_P,                  32772 }, 
  • trunk/platform/a540/shooting.c

    r1276 r1632  
    8888canon mode list FFD588D4 in 100b 
    8989*/ 
    90 static const CapturemodeMap modemap[] = { 
     90const CapturemodeMap modemap[] = { 
    9191    { MODE_M,                  32769 }, 
    9292    { MODE_AV,                 32770 }, 
  • trunk/platform/a550/shooting.c

    r860 r1632  
    9191canon mode list FFEA9F04 in 100c 
    9292*/ 
    93 static const CapturemodeMap modemap[] = { 
     93const CapturemodeMap modemap[] = { 
    9494    { MODE_LONG_SHUTTER,        32774 }, // guessed 
    9595    { MODE_AUTO,                32768 }, 
  • trunk/platform/a560/shooting.c

    r860 r1632  
    8989canon mode list FFED1124 in 100a 
    9090*/ 
    91 static const CapturemodeMap modemap[] = { 
     91const CapturemodeMap modemap[] = { 
    9292    { MODE_LONG_SHUTTER,       32774 }, // guessed 
    9393    { MODE_AUTO,               32768 }, 
  • trunk/platform/a570/shooting.c

    r860 r1632  
    9292*/ 
    9393 
    94 static const CapturemodeMap modemap[] = { 
     94const CapturemodeMap modemap[] = { 
    9595    { MODE_AUTO,               32768 }, 
    9696    { MODE_P,                  32772 }, 
  • trunk/platform/a580/shooting.c

    r1308 r1632  
    9898canon mode list in @FFE7CFFC in 100c 
    9999*/ 
    100 static const CapturemodeMap modemap[] = { 
     100const CapturemodeMap modemap[] = { 
    101101    { MODE_P,                  32772 }, // OK! 
    102102    { MODE_LONG_SHUTTER,       32774 }, // OK! 
  • trunk/platform/a590/shooting.c

    r860 r1632  
    9494*/ 
    9595// PROPCASE 49, verified by whim in http://chdk.setepontos.com/index.php/topic,3228.msg44199.html#msg44199 
    96 static const CapturemodeMap modemap[] = { 
     96const CapturemodeMap modemap[] = { 
    9797// common modes 
    9898        { MODE_M,                  32769 }, 
  • trunk/platform/a610/shooting.c

    r860 r1632  
    9090canon mode list FFD49168 in 100e 
    9191*/ 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    { MODE_AUTO,               6  }, 
    9494    { MODE_P,                  1  }, 
  • trunk/platform/a620/shooting.c

    r860 r1632  
    9191canon mode list @FFD4A024 in 100f 
    9292*/ 
    93 static const CapturemodeMap modemap[] = { 
     93const CapturemodeMap modemap[] = { 
    9494    { MODE_AUTO,               6  }, 
    9595    { MODE_P,                  1  }, 
  • trunk/platform/a630/shooting.c

    r860 r1632  
    9090    160 x 120 (3 min. at 15 fps) 
    9191*/ 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    // these are common on most cameras except very old vxworks that use 0-n, should be OK 
    9494    { MODE_M,                  32769 }, 
  • trunk/platform/a640/shooting.c

    r860 r1632  
    9393and canon mode lists are identical 
    9494*/  
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696    // these are common on most cameras except very old vxworks that use 0-n, should be OK 
    9797    { MODE_M,                  32769 }, 
  • trunk/platform/a650/shooting.c

    r880 r1632  
    9090*/ 
    9191 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    { MODE_AUTO,               32768 }, 
    9494    { MODE_P,                  32772 }, 
  • trunk/platform/a700/shooting.c

    r860 r1632  
    9090Canon implies there should be a My Colors mode, but all the modes in the list are accounted for. 
    9191*/ 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    // common modes, probably OK 
    9494    { MODE_M,                  32769 }, 
  • trunk/platform/a710/shooting.c

    r860 r1632  
    9090160 x 120 (3 min. at 15 fps) 
    9191*/ 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    { MODE_M,                  32769 }, 
    9494    { MODE_P,                  32772 }, 
  • trunk/platform/a720/shooting.c

    r860 r1632  
    9292canon mode list in FFE7CFFC 100c 
    9393*/ 
    94 static const CapturemodeMap modemap[] = { 
     94const CapturemodeMap modemap[] = { 
    9595    { MODE_AUTO,               32768 }, 
    9696    { MODE_P,                  32772 }, 
  • trunk/platform/d10/shooting.c

    r1276 r1632  
    107107 
    108108*/ 
    109 static const CapturemodeMap modemap[] = { 
     109const CapturemodeMap modemap[] = { 
    110110    { MODE_SCN_LONG_SHUTTER,   16390 }, 
    111111    { MODE_P,                  32772 }, 
  • trunk/platform/g10/shooting.c

    r1329 r1632  
    8383 
    8484// G10 values inserted  
    85 static const CapturemodeMap modemap[] = { 
     85const CapturemodeMap modemap[] = { 
    8686        { MODE_AUTO,               32768  }, 
    8787        { MODE_P,                  32772  },     
  • trunk/platform/g11/shooting.c

    r1376 r1632  
    8585};         
    8686 
    87 static const CapturemodeMap modemap[] = { 
     87const CapturemodeMap modemap[] = { 
    8888        { MODE_AUTO,               32768  }, 
    8989        { MODE_P,                  32772  }, // also C1,C2 
  • trunk/platform/g12/shooting.c

    r1273 r1632  
    9999*/ 
    100100// G12 modelist table found @0xFFC89550 (firmware 1.00c) 
    101 static const CapturemodeMap modemap[] = { 
     101const CapturemodeMap modemap[] = { 
    102102        { MODE_QUICK,                      33315  }, 
    103103        { MODE_TV,                 32771  }, 
     
    138138#include "../generic/shooting.c" 
    139139 
    140 // Override ISO settings (need to do this before exposure calc for ISO, as well as after) 
    141 void __attribute__((naked,noinline)) shooting_expo_iso_override(void){ 
    142  asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    143  
    144     if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
    145     { 
    146         shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    147         // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override 
    148     } 
    149     else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1)) 
    150         shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW); 
    151     else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all)) 
    152         shooting_set_autoiso(shooting_get_iso_mode()); 
    153  
    154  asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    155 } 
    156  
    157140long get_file_next_counter() { 
    158141        return get_file_counter(); 
  • trunk/platform/g7/shooting.c

    r860 r1632  
    9292canon mode list FF9B62B0 in 100e 
    9393*/ 
    94 static const CapturemodeMap modemap[] = { 
     94const CapturemodeMap modemap[] = { 
    9595    { MODE_AUTO,               32768 }, 
    9696    { MODE_P,                  32772 }, 
  • trunk/platform/g9/shooting.c

    r880 r1632  
    9595canon modelist in 100d  
    9696*/ 
    97 static const CapturemodeMap modemap[] = { 
     97const CapturemodeMap modemap[] = { 
    9898    { MODE_AUTO,               32768 }, 
    9999    { MODE_P,                  32772 }, 
  • trunk/platform/generic/shooting.c

    r1612 r1632  
    77#include "conf.h" 
    88 
    9 #define USE_FILE_COUNTER_FOR_EXP_COUNTING 
    10  
    11 #define SS_SIZE (sizeof(shutter_speeds_table)/sizeof(shutter_speeds_table[0])) 
    12 #define SSID_MIN (shutter_speeds_table[0].id) 
    13 #define SSID_MAX (shutter_speeds_table[SS_SIZE-1].id) 
    14  
    15 #define AS_SIZE (sizeof(aperture_sizes_table)/sizeof(aperture_sizes_table[0])) 
    16 #define ASID_MIN (aperture_sizes_table[0].id) 
    17 #define ASID_MAX (aperture_sizes_table[AS_SIZE-1].id) 
     9#ifndef PARAM_FILE_COUNTER 
     10#       error Please define PARAM_FILE_COUNTER in platform/CAMERA/shooting.c! 
     11#endif 
    1812 
    1913#define AV96_MIN (aperture_sizes_table[0].prop_id) 
    20 #define AV96_MAX (aperture_sizes_table[AS_SIZE-1].prop_id) 
    2114 
    22 #define ISO_SIZE (sizeof(iso_table)/sizeof(iso_table[0])) 
    23 #define ISO_MIN (iso_table[0].id) 
    24 #define ISO_MAX (iso_table[ISO_SIZE-1].id) 
    25 #define ISO_MIN_VALUE (iso_table[1-iso_table[0].id].prop_id) 
     15const unsigned int SS_SIZE  = sizeof(shutter_speeds_table)/sizeof(shutter_speeds_table[0]); 
     16const unsigned int AS_SIZE  = sizeof(aperture_sizes_table)/sizeof(aperture_sizes_table[0]); 
     17const unsigned int ISO_SIZE = sizeof(iso_table)/sizeof(iso_table[0]); 
     18const unsigned int MODESCNT = sizeof(modemap)/sizeof(modemap[0]); 
    2619 
    27 static const unsigned MODESCNT=(sizeof(modemap)/sizeof(modemap[0])); 
     20const unsigned int param_file_counter = PARAM_FILE_COUNTER; 
    2821 
    29 /*define PROPCASE_CONT_MODE_SHOOT_COUNT                 218*/ 
    30 static short iso_market_base=0; 
    31 //static short iso_base=0; 
    32 static short sv96_base=0; 
    33 static short svm96_base=0; 
    34 static short sv96_base_tmp=0; 
    35 //static short override_iso=0; 
    36 static const double sqrt2=1.4142135623731;//square root from 2 
    37 static const double log_2=0.6931471805599;//natural logarithm of 2 
    38 static const double k=12.5;//K is the reflected-light meter calibration constant 
    39 static const short koef[] = {0, 1,10,100,1000}; 
    40 static const float shutter_koef[] = {0, 0.00001, 0.0001,0.001,0.01,0.1,1,10,100,1000}; 
    41 static const char * expo_shift[] = { "Off", "1/3Ev","2/3Ev", "1Ev", "1 1/3Ev", "1 2/3Ev", "2Ev", "2 1/3Ev", "2 2/3Ev", "3Ev", "3 1/3Ev", "3 2/3Ev", "4Ev"}; 
    42 const char* tv_override[]={ 
    43 #ifdef CAM_EXT_TV_RANGE 
    44     // add very long time exposures as approximately powers of 2, adding 15 exposures 
    45     "2048","1625","1290","1024","812","645","512","406","322","256","203","161","128","101","80", 
    46 #endif 
    47     "64","50.8", "40.3", "32", "25.4","20","16", "12.7", "10","8", "6.3","5","4","3.2", "2.5","2", "1.6", "1.3", "1", "0.8", "0.6", "0.5", "0.4", "0.3", "1/4", "1/5", "1/6", "1/8", "1/10", "1/13", "1/15", "1/20", "1/25", "1/30", "1/40", "1/50", "1/60", "1/80", "1/100", "1/125", "1/160", "1/200", "1/250", "1/320", "1/400", "1/500", "1/640","1/800", "1/1000", "1/1250", "1/1600","1/2000","1/2500","1/3200","1/4000", "1/5000", "1/6400", "1/8000", "1/10000", "1/12500", "1/16000", "1/20000", "1/25000", "1/32000", "1/40000", "1/50000", "1/64000","1/80000", "1/100k"}; 
    48 const int tv_override_amount = sizeof(tv_override)/sizeof(tv_override[0]); 
     22//------------------------------------------------------------------- 
    4923 
    50 // offset index into tv_override to translate into 1/3 stops in APEX 
    51 #if CAM_EXT_TV_RANGE 
    52 const int tv_override_zero_shift = 18+15; 
    53 #else 
    54 const int tv_override_zero_shift = 18; 
    55 #endif 
    56 static const char * expo_type[] = { "+/-", "-","+"}; 
     24// Note: shooting functions moved to core/shooting.c 
     25//       this compiles them as THUMB code to save space 
    5726 
    58 static PHOTO_PARAM photo_param_put_off; 
    59  
    60 EXPO_BRACKETING_VALUES bracketing; 
     27//------------------------------------------------------------------- 
    6128 
    6229//*********************** 
     
    10168//*********************** 
    10269 
    103 int shooting_get_user_tv_id() 
     70// Core override function 
     71void __attribute__((naked,noinline)) shooting_expo_param_override(void) 
    10472{ 
    105 #if CAM_HAS_USER_TV_MODES 
    106     short tvv; 
    107     long i; 
    108     _GetPropertyCase(PROPCASE_USER_TV, &tvv, sizeof(tvv)); 
    109     for (i=0;i<SS_SIZE;i++){ 
    110         if (shutter_speeds_table[i].prop_id == tvv) 
    111             return shutter_speeds_table[i].id; 
    112     } 
    113 #endif 
    114     return 0; 
     73    // Save registers 
     74    asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
     75 
     76    // Call thumb code version in core/shooting.c 
     77    extern void shooting_expo_param_override_thumb(); 
     78    shooting_expo_param_override_thumb(); 
     79 
     80    // Restore registers 
     81    asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    11582} 
    11683 
    117 short shooting_get_is_mode() 
     84// Override ISO settings only 
     85// need to do this before exposure calc for ISO, as well as after on some cameras 
     86void __attribute__((naked,noinline)) shooting_expo_iso_override(void) 
    11887{ 
    119     short ism = 0; 
    120     _GetPropertyCase(PROPCASE_IS_MODE, &ism, sizeof(ism)); 
    121     return ism; 
     88    // Save registers 
     89    asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
     90 
     91    // Call thumb code version in core/shooting.c 
     92    extern void shooting_expo_iso_override_thumb(void); 
     93    shooting_expo_iso_override_thumb(); 
     94 
     95    // Restore registers 
     96    asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    12297} 
    123  
    124  
    125 const ShutterSpeed *shooting_get_tv_line() 
    126 { 
    127     short tvv; 
    128     long i; 
    129     _GetPropertyCase(PROPCASE_USER_TV, &tvv, sizeof(tvv)); 
    130     for (i=0;i<SS_SIZE;i++){ 
    131            if (shutter_speeds_table[i].prop_id == tvv) 
    132             return &shutter_speeds_table[i]; 
    133     } 
    134     return 0; 
    135 } 
    136  
    137 void shooting_set_user_tv_by_id(int v) 
    138 { 
    139 #if CAM_HAS_USER_TV_MODES 
    140 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    141     long i; 
    142 //    if ((v<SSID_MIN) || (v>SSID_MAX)) 
    143 //      return; 
    144  for (i=0;i<SS_SIZE;i++){ 
    145         if (shutter_speeds_table[i].id == v){ 
    146             short vv = shutter_speeds_table[i].prop_id; 
    147             _SetPropertyCase(PROPCASE_USER_TV, &vv, sizeof(vv)); 
    148             //_SetPropertyCase(PROPCASE_TV, &vv, sizeof(vv)); 
    149             return; 
    150          } 
    151  } 
    152 } 
    153 #endif 
    154 } 
    155 void shooting_set_prop(int id, int v) 
    156 { 
    157    short vv = v; 
    158    _SetPropertyCase(id, &vv, sizeof(vv)); 
    159    return; 
    160 } 
    161  
    162 int shooting_get_prop(int id) 
    163 { 
    164     short vv; 
    165     _GetPropertyCase(id, &vv, sizeof(vv)); 
    166     return vv; 
    167 } 
    168  
    169 short shooting_get_canon_iso_mode() 
    170 { 
    171     short isom; 
    172     _GetPropertyCase(PROPCASE_ISO_MODE, &isom, sizeof(isom)); 
    173      return isom; 
    174 } 
    175  
    176  
    177 int shooting_get_iso_mode() 
    178 { 
    179     short isov; 
    180     long i; 
    181     _GetPropertyCase(PROPCASE_ISO_MODE, &isov, sizeof(isov)); 
    182     for (i=0;i<ISO_SIZE;i++){ 
    183                         if (iso_table[i].prop_id == isov) 
    184                          return iso_table[i].id; 
    185     } 
    186     return 0; 
    187 } 
    188  
    189 void shooting_set_user_tv_by_id_rel(int v) 
    190 { 
    191 #if CAM_HAS_USER_TV_MODES 
    192 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    193     int cv = shooting_get_user_tv_id(); 
    194     shooting_set_user_tv_by_id(cv+v); 
    195 } 
    196 #endif 
    197 } 
    198  
    199 int shooting_get_user_av_id() 
    200 { 
    201 #if CAM_HAS_IRIS_DIAPHRAGM 
    202     short avv; 
    203     long i; 
    204     _GetPropertyCase(PROPCASE_USER_AV, &avv, sizeof(avv)); 
    205     for (i=0;i<AS_SIZE;i++){ 
    206                         if (aperture_sizes_table[i].prop_id == avv) 
    207                          return aperture_sizes_table[i].id; 
    208     } 
    209 #endif 
    210     return 0; 
    211 } 
    212  
    213 short shooting_get_real_aperture() { 
    214 //#if !CAM_HAS_IRIS_DIAPHRAGM 
    215 //    return shooting_get_min_real_aperture(); 
    216 //#else 
    217 //I hope that GetCurrentAvValue is correct for ixus70_sd1000 ixus700_sd500 now 
    218     return shooting_get_aperture_from_av96(_GetCurrentAvValue()); 
    219 //#endif 
    220 } 
    221  
    222 short shooting_get_aperture_from_av96(short av96) { 
    223         if (av96) return (short)((pow(sqrt2, ((double)av96)/96.0))*100.0); 
    224         else return -1; 
    225 } 
    226  
    227 short shooting_get_min_real_aperture() { 
    228          short av96; 
    229         _GetPropertyCase(PROPCASE_MIN_AV, &av96, sizeof(av96)); 
    230         if (av96) return shooting_get_aperture_from_av96(av96); 
    231         else return shooting_get_real_aperture(); 
    232 } 
    233  
    234 short shooting_get_iso_from_sv96(short sv96) 
    235 { 
    236     return (short)(pow(2, (((double) sv96+168.0)/96.0))); 
    237 } 
    238  
    239 short shooting_get_iso_real() 
    240 { 
    241     short sv; 
    242     _GetPropertyCase(PROPCASE_SV, &sv, sizeof(sv)); 
    243     if (sv == 0) { 
    244      return 0; 
    245     } 
    246     return shooting_get_iso_from_sv96(sv); 
    247 } 
    248  
    249 short shooting_get_svm96() 
    250 { 
    251     short  sv; 
    252      _GetPropertyCase(PROPCASE_SV_MARKET, &sv, sizeof(sv)); 
    253      return sv; 
    254 } 
    255  
    256 short shooting_get_sv96() 
    257 { 
    258     short  sv; 
    259      _GetPropertyCase(PROPCASE_SV, &sv, sizeof(sv)); 
    260      return sv; 
    261 } 
    262  
    263 short shooting_get_base_sv96() 
    264 { 
    265    short dsv,sv; 
    266    if (shooting_get_canon_iso_mode()<50) { 
    267        _GetPropertyCase(PROPCASE_DELTA_SV, &dsv, sizeof(dsv)); 
    268        _GetPropertyCase(PROPCASE_SV, &sv, sizeof(sv)); 
    269        sv96_base=(sv-dsv); 
    270    } 
    271    return sv96_base; 
    272 } 
    273  
    274 short shooting_get_sv96_from_iso(short iso) 
    275 { 
    276   if  (iso>0) 
    277     return (short)(log(pow(2.0,(-7.0/4.0))*(double)(iso))*96.0/(log_2)); 
    278   return 0; 
    279 } 
    280  
    281 short shooting_get_svm96_from_iso(short iso) 
    282 { 
    283    if  (iso>0) return (short)(log((double)(iso)*32.0/100.0)*96.0/(log_2)); 
    284    return 0; 
    285 } 
    286  
    287 short shooting_get_iso_market_from_svm96(short svm96) 
    288 { 
    289         if (svm96>0 ) 
    290                 return (short)((double)pow(2, (((double)svm96)/96.0))*100.0/32.0); 
    291         return 0; 
    292 } 
    293  
    294 short shooting_get_iso_market_base() 
    295 { 
    296 //if ((iso_market_base==0) && (shooting_get_iso_mode() <= 0)) { 
    297 //       iso_market_base=(short)shooting_get_iso_market_from_svm96(shooting_get_svm96()); 
    298 // } 
    299  //return iso_market_base; 
    300   if (iso_market_base==0) { 
    301       if (ISO_MIN_VALUE==50) iso_market_base=50; 
    302 #if defined(CAMERA_sx40hs) 
    303       else iso_market_base=200; 
    304 #else 
    305       else iso_market_base=100; 
    306 #endif 
    307      } 
    308   return iso_market_base; 
    309 } 
    310  
    311 short shooting_get_svm96_base() 
    312 { 
    313         if (svm96_base==0) svm96_base=shooting_get_svm96_from_iso(shooting_get_iso_market_base()); 
    314         return svm96_base; 
    315 } 
    316  
    317 short shooting_get_iso_base() 
    318 { 
    319         sv96_base=shooting_get_base_sv96(); 
    320         if (sv96_base!=0) return shooting_get_iso_from_sv96(sv96_base); 
    321         else return 0; 
    322 } 
    323  
    324 // AUTOISO:EXIF 
    325 short shooting_get_iso_market() 
    326 { 
    327     //double koef; 
    328     short iso_mode=shooting_get_canon_iso_mode(); 
    329     if ((iso_mode < 50) || (conf.iso_override_koef && conf.iso_override_value) || (conf.iso_bracket_koef && conf.iso_bracket_value)) 
    330      { 
    331       short iso_b=shooting_get_iso_base(); 
    332       if (iso_b) return (short)((shooting_get_iso_market_base()*shooting_get_iso_real())/iso_b); 
    333      } 
    334     return iso_mode; 
    335 } 
    336  
    337 void shooting_set_sv96(short sv96, short is_now){ 
    338   short dsv96=0, iso_mode=shooting_get_canon_iso_mode(); 
    339 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    340   if (is_now)  { 
    341     if (iso_mode<50) dsv96 =sv96-shooting_get_base_sv96(); 
    342     else if (sv96_base) dsv96=sv96-sv96_base; 
    343         else if (sv96_base_tmp) dsv96=sv96-sv96_base_tmp; 
    344         else 
    345          { 
    346          sv96_base_tmp= (short)((shooting_get_svm96_base()*shooting_get_sv96())/shooting_get_svm96()); 
    347          dsv96=sv96-sv96_base_tmp; 
    348          } 
    349     while ((shooting_is_flash_ready()!=1) || (focus_busy)); 
    350     short svm96_base =shooting_get_svm96_base(); 
    351     if (iso_mode>=50) shooting_set_iso_mode(0); 
    352     _SetPropertyCase(PROPCASE_SV_MARKET, &svm96_base, sizeof(svm96_base)); 
    353     _SetPropertyCase(PROPCASE_SV, &sv96, sizeof(sv96)); 
    354     _SetPropertyCase(PROPCASE_DELTA_SV, &dsv96, sizeof(dsv96)); 
    355   } 
    356   else   photo_param_put_off.sv96=sv96; 
    357 } 
    358 } 
    359  
    360 /*void shooting_set_iso_real_delta_from_base(int diso) 
    361 { 
    362  return; 
    363  int iso=(int)((short)shooting_get_iso_base()+diso); 
    364  
    365  if (iso>0) { 
    366     shooting_set_sv96((short)(shooting_get_sv96_from_iso(iso))); 
    367   } 
    368 }*/ 
    369  
    370 void shooting_set_iso_real(short iso, short is_now) 
    371 { 
    372 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    373         if (iso>0) shooting_set_sv96(shooting_get_sv96_from_iso(iso), is_now); 
    374 } 
    375 } 
    376  
    377 short shooting_get_bv96() 
    378 { 
    379     short bv = 0; 
    380     _GetPropertyCase(PROPCASE_BV, &bv, sizeof(bv)); 
    381     return bv; 
    382 } 
    383  
    384 short shooting_get_canon_overexposure_value() 
    385 { 
    386     short bv = 0; 
    387     _GetPropertyCase(PROPCASE_OVEREXPOSURE, &bv, sizeof(bv)); 
    388     return bv; 
    389 } 
    390  
    391  
    392 short shooting_get_flash_mode() 
    393 { 
    394     short fm = 0; 
    395     _GetPropertyCase(PROPCASE_FLASH_MODE, &fm, sizeof(fm)); 
    396     return fm; 
    397 } 
    398  
    399 int shooting_get_luminance()// http://en.wikipedia.org/wiki/APEX_system 
    400 { 
    401     short bv = shooting_get_bv96(); 
    402     int b=(int)(100*k*pow(2.0,((double)(bv-168)/96.0))); 
    403     return b; 
    404 } 
    405  
    406 /*void shooting_set_iso_market(int isom) 
    407 { 
    408         if (isom>0) { 
    409    shooting_set_sv96(shooting_get_sv96_from_iso((int)(((double)isom*(double)shooting_get_iso_base())/(double)shooting_get_iso_market_base()))); 
    410   } 
    411 }*/ 
    412  
    413 int shooting_get_exif_subject_dist() 
    414 { 
    415     int sd = 0; 
    416     _GetPropertyCase(PROPCASE_SUBJECT_DIST1, &sd, sizeof(sd)); 
    417     return sd; 
    418 } 
    419  
    420 int shooting_get_lens_to_focal_plane_width() 
    421 { 
    422         return (int)(lens_get_focus_pos()-lens_get_focus_pos_from_lens()); 
    423 } 
    424  
    425 int shooting_get_hyperfocal_distance_() 
    426 { 
    427   int av=shooting_get_real_aperture(); 
    428   float fl=get_focal_length(lens_get_zoom_point()); 
    429   if ((av>0) && (fl>0)) return (fl*fl)/(float)(10*circle_of_confusion*av); 
    430   else return (-1); 
    431 } 
    432  
    433 int shooting_get_hyperfocal_distance() 
    434 { 
    435  int h=shooting_get_hyperfocal_distance_(); 
    436  if ((h>0) && (conf.dof_dist_from_lens)) 
    437    return (h-shooting_get_lens_to_focal_plane_width()); 
    438  else return h; 
    439 } 
    440  
    441 int shooting_get_hyperfocal_distance_f(int av, int fl) 
    442 { 
    443   if ((av>0) && (fl>0) && (circle_of_confusion>0)) return ((float)fl*(float)fl)/(float)(10*circle_of_confusion*av); 
    444   else return (-1); 
    445 } 
    446  
    447 int shooting_get_canon_subject_distance() 
    448 { 
    449         if (conf.dof_use_exif_subj_dist) return shooting_get_exif_subject_dist(); 
    450         else return lens_get_focus_pos(); 
    451 } 
    452  
    453 int shooting_get_subject_distance_() 
    454 { 
    455    if (!conf.dof_subj_dist_as_near_limit) return shooting_get_canon_subject_distance(); 
    456    else { 
    457         float h, v, m; 
    458                 int fl=get_focal_length(lens_get_zoom_point()); 
    459         int near=shooting_get_canon_subject_distance(); 
    460         float v1=(fl*fl); 
    461         int av_min=shooting_get_min_real_aperture(); 
    462         int c_of_c=circle_of_confusion*10; 
    463         if ((av_min!=0) && (c_of_c!=0) && (v1)) { 
    464                     h=v1/(float)(c_of_c*av_min); 
    465             if ((near>0) && (near<MAX_DIST)) { 
    466                   v=(h-near); 
    467                   m=h*(float)near; 
    468                   if ((v>0) && (m>0)) return m/v; 
    469              } 
    470         } 
    471         return (-1); 
    472     } 
    473 } 
    474  
    475 int shooting_get_subject_distance() 
    476 { 
    477  int h=shooting_get_subject_distance_(); 
    478  if ((h>0) && (conf.dof_dist_from_lens)) 
    479    return (h-shooting_get_lens_to_focal_plane_width()); 
    480  else return h; 
    481 } 
    482  
    483 int shooting_get_near_limit_of_acceptable_sharpness_() 
    484 { 
    485         int s=shooting_get_canon_subject_distance(); 
    486         if (conf.dof_subj_dist_as_near_limit) return s; 
    487     else { 
    488       int h = shooting_get_hyperfocal_distance_(); 
    489       float m = (float)h*(float)s; 
    490       int v = h+s; 
    491       if ((m>0) && (v>0)) return (m/v); 
    492       else return (-1); 
    493     } 
    494 } 
    495  
    496 int shooting_get_near_limit_of_acceptable_sharpness() 
    497 { 
    498  int h=shooting_get_near_limit_of_acceptable_sharpness_(); 
    499  if ((h>0) && (conf.dof_dist_from_lens)) 
    500    return (h-shooting_get_lens_to_focal_plane_width()); 
    501  else return h; 
    502 } 
    503  
    504 int shooting_get_near_limit_f(int s, int a, int fl) 
    505 { 
    506       int h = shooting_get_hyperfocal_distance_f(a, fl); 
    507       float m = (float)h*(float)s; 
    508       int v = h+s; 
    509       if ((m>0) && (v>0)) return (m/v); 
    510       else return (-1); 
    511 } 
    512  
    513 int shooting_get_far_limit_of_acceptable_sharpness_() 
    514 { 
    515         int s=shooting_get_subject_distance_(), h=shooting_get_hyperfocal_distance_(); 
    516     int v = h-s; 
    517     float m = (float)h*(float)s; 
    518     if ((m>0) && (v>0)) return (m/v); 
    519     else return (-1); 
    520 } 
    521  
    522 int shooting_get_far_limit_of_acceptable_sharpness() 
    523 { 
    524  int h=shooting_get_far_limit_of_acceptable_sharpness_(); 
    525  if ((h>0) && (conf.dof_dist_from_lens)) 
    526    return (h-shooting_get_lens_to_focal_plane_width()); 
    527  else return h; 
    528 } 
    529  
    530 int shooting_get_depth_of_field() 
    531 { 
    532   int far=shooting_get_far_limit_of_acceptable_sharpness_(), near=shooting_get_near_limit_of_acceptable_sharpness_(); 
    533   if ((far>0) && (near>0)) return far-near; 
    534   else return (-1); 
    535 } 
    536  
    537 short shooting_get_tv96_from_shutter_speed(float t) 
    538 { 
    539   if (t>0) return (short) (96.0*log(1.0/t)/log_2); 
    540   else return (-10000); 
    541 } 
    542  
    543 float shooting_get_shutter_speed_from_tv96(short tv) 
    544 { 
    545   return  pow(2,(float)((-1)*tv)/96.0 ); 
    546 } 
    547  
    548 short shooting_get_tv96() 
    549 { 
    550     short tv96; 
    551     _GetPropertyCase(PROPCASE_TV, &tv96, sizeof(tv96)); 
    552     return tv96; 
    553 } 
    554  
    555 short shooting_get_user_tv96() 
    556 { 
    557 #if CAM_HAS_USER_TV_MODES 
    558     short tv; 
    559     _GetPropertyCase(PROPCASE_USER_TV, &tv, sizeof(tv)); 
    560     return tv; 
    561 #else 
    562     return 0; 
    563 #endif 
    564 } 
    565  
    566 void shooting_set_user_tv96(short v) 
    567 { 
    568 #if CAM_HAS_USER_TV_MODES 
    569 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    570 long i; 
    571 //    if ((v<SSID_MIN) || (v>SSID_MAX)) 
    572 //      return; 
    573  for (i=0;i<SS_SIZE;i++){ 
    574         if (shutter_speeds_table[i].prop_id == v){ 
    575                 _SetPropertyCase(PROPCASE_USER_TV, &v, sizeof(v)); 
    576                 //_SetPropertyCase(PROPCASE_TV, &v, sizeof(v)); 
    577             return; 
    578           } 
    579   } 
    580 } 
    581 #endif 
    582 } 
    583  
    584 void shooting_set_tv96(short v, short is_now) 
    585 { 
    586  long i; 
    587 //    if ((v<SSID_MIN) || (v>SSID_MAX)) 
    588 //      return; 
    589 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    590  for (i=0;i<SS_SIZE;i++){ 
    591         if (shutter_speeds_table[i].prop_id == v){ 
    592        shooting_set_tv96_direct(v, is_now); 
    593        return; 
    594      } 
    595   } 
    596 } 
    597 } 
    598  
    599 void shooting_set_tv96_direct(short v, short is_now) 
    600 { 
    601 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    602         if(is_now) { 
    603            _SetPropertyCase(PROPCASE_TV, &v, sizeof(v)); 
    604 #ifdef PROPCASE_TV2 
    605        _SetPropertyCase(PROPCASE_TV2, &v, sizeof(v));   // Save override to property that will update JPEG header & Canon OSD 
    606 #endif 
    607         } 
    608         else photo_param_put_off.tv96=v; 
    609 } 
    610 } 
    611  
    612  
    613 void shooting_set_shutter_speed(float t, short is_now) 
    614 { 
    615         if (t>0) shooting_set_tv96_direct((short) 96.0*log(1/t)/log_2, is_now); 
    616 } 
    617  
    618 void shooting_set_shutter_speed_ubasic(int t, short is_now) 
    619 { 
    620 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    621         if (t>0) shooting_set_tv96_direct((short) (96.0*log(100000.0/(double)t)/log_2), is_now); 
    622 } 
    623 } 
    624  
    625 short shooting_get_av96() 
    626 { 
    627     short av; 
    628     _GetPropertyCase(PROPCASE_AV, &av, sizeof(av)); 
    629     return av; 
    630 } 
    631  
    632 short shooting_get_aperture_sizes_table_size() 
    633 { 
    634     return AS_SIZE; 
    635 } 
    636  
    637  
    638 short shooting_get_aperture_sizes_table_prop_id(short i) 
    639 { 
    640     return aperture_sizes_table[i].prop_id; 
    641 } 
    642  
    643 short shooting_get_max_aperture_sizes_table_prop_id() 
    644 { 
    645     return AV96_MAX; 
    646 } 
    647  
    648  
    649  
    650 short shooting_get_av_prop_id() 
    651 { 
    652     short av; 
    653     _GetPropertyCase(PROPCASE_AV, &av, sizeof(av)); 
    654     return av; 
    655 } 
    656  
    657  
    658  
    659 short shooting_get_user_av96() 
    660 { 
    661 #if CAM_HAS_IRIS_DIAPHRAGM 
    662     short av; 
    663     _GetPropertyCase(PROPCASE_USER_AV, &av, sizeof(av)); 
    664     return av; 
    665 #else 
    666     return 0; 
    667 #endif 
    668 } 
    669  
    670  
    671 void shooting_set_av96(short v, short is_now) 
    672 { 
    673 #if CAM_HAS_IRIS_DIAPHRAGM 
    674 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    675  long i; 
    676 //    if ((v<ASID_MIN) || (v>ASID_MAX)) 
    677 //      return; 
    678  for (i=0;i<AS_SIZE;i++){ 
    679         if (aperture_sizes_table[i].prop_id == v){ 
    680            shooting_set_av96_direct(v, is_now); 
    681            return; 
    682         } 
    683   } 
    684 } 
    685 #endif 
    686 } 
    687  
    688 void shooting_set_nd_filter_state(short v, short is_now) 
    689 { 
    690 #if CAM_HAS_ND_FILTER 
    691 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    692         if (is_now) { 
    693          if (v==1) _PutInNdFilter(); 
    694          else if (v==2) _PutOutNdFilter(); 
    695         } 
    696         else photo_param_put_off.nd_filter=v; 
    697 } 
    698 #endif 
    699 } 
    700  
    701  
    702  
    703 void shooting_set_av96_direct(short v, short is_now) 
    704 { 
    705 #if CAM_HAS_IRIS_DIAPHRAGM 
    706 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    707  if(is_now) { 
    708    _SetPropertyCase(PROPCASE_AV, &v, sizeof(v)); 
    709 #ifdef PROPCASE_AV2 
    710    _SetPropertyCase(PROPCASE_AV2, &v, sizeof(v));   // Save override to property that will update JPEG header & Canon OSD 
    711 #endif 
    712  } 
    713  else photo_param_put_off.av96=v; 
    714 } 
    715 #endif 
    716 } 
    717  
    718  
    719 void shooting_set_user_av96(short v) 
    720 { 
    721 #if CAM_HAS_IRIS_DIAPHRAGM 
    722     long i; 
    723 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    724 //    if ((v<ASID_MIN) || (v>ASID_MAX)) 
    725 //      return; 
    726  
    727  for (i=0;i<AS_SIZE;i++){ 
    728         if (aperture_sizes_table[i].prop_id == v){ 
    729                   _SetPropertyCase(PROPCASE_USER_AV, &v, sizeof(v)); 
    730                   //_SetPropertyCase(PROPCASE_AV, &v, sizeof(v)); 
    731             return; 
    732         } 
    733  } 
    734 } 
    735 #endif 
    736 } 
    737  
    738 short shooting_get_drive_mode() 
    739 { 
    740     short m; 
    741 // these cameras do not set PROPCASE_DRIVE_MODE when in custom timer mode 
    742 // SX 200 IS 0,1,2,3,4=Off, 2 Second, Custom, Face Detection 
    743 #if defined (CAM_DRIVE_MODE_FROM_TIMER_MODE) 
    744    short n; 
    745    _GetPropertyCase(PROPCASE_TIMER_MODE, &n, sizeof(n)); 
    746    // note we return this only in custom mode. 
    747    // Other cameras would return 3 if any timer mode is set (?) even if it doesn't do multiple exposures 
    748    // note that face detect does multiple exposure 
    749    if(n==3){ 
    750       return n; 
    751    } 
    752 #endif 
    753  
    754     _GetPropertyCase(PROPCASE_DRIVE_MODE, &m, sizeof(m)); 
    755     return m; 
    756 } 
    757  
    758 short shooting_can_focus() 
    759 { 
    760  int m=mode_get()&MODE_SHOOTING_MASK; 
    761 #if !CAM_CAN_SD_OVER_NOT_IN_MF && CAM_CAN_SD_OVERRIDE 
    762  #if CAM_CAN_SD_OVER_IN_AF_LOCK 
    763   if (shooting_get_prop(PROPCASE_AF_LOCK)) 
    764     return 1; 
    765  #endif 
    766   return (shooting_get_common_focus_mode() || MODE_IS_VIDEO(m)); 
    767 #elif !CAM_CAN_SD_OVERRIDE 
    768   return MODE_IS_VIDEO(m); 
    769 #elif defined (CAMERA_ixus800_sd700) 
    770 // TODO whats the reason for this ?!? 
    771   return (shooting_get_zoom()<8) && (m!=MODE_AUTO) && (m!=MODE_SCN_UNDERWATER); 
    772 #else 
    773   return 1; 
    774 #endif 
    775 } 
    776  
    777 short shooting_get_common_focus_mode() 
    778 { 
    779 #if !CAM_HAS_MANUAL_FOCUS && CAM_CAN_SD_OVERRIDE 
    780   return shooting_get_subject_distance_override_koef(); 
    781 #elif !CAM_CAN_SD_OVERRIDE 
    782   return 0; 
    783 #else 
    784   return shooting_get_focus_mode(); 
    785 #endif 
    786 } 
    787  
    788 short shooting_get_focus_mode() 
    789 { 
    790   short m; 
    791   _GetPropertyCase(PROPCASE_FOCUS_MODE, &m, sizeof(m)); 
    792   return m; 
    793 } 
    794  
    795  
    796 /* 
    797 short shooting_get_continuous_mode_shoot_count() 
    798 { 
    799     short c; 
    800     _GetPropertyCase(PROPCASE_CONT_MODE_SHOOT_COUNT, &c, sizeof(c)); 
    801     return c; 
    802 } 
    803 */ 
    804  
    805  
    806 void shooting_set_user_av_by_id(int v) 
    807 { 
    808 #if CAM_HAS_IRIS_DIAPHRAGM 
    809 long i; 
    810 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    811 //    if ((v<ASID_MIN) || (v>ASID_MAX)) 
    812 //      return; 
    813   for (i=0;i<AS_SIZE;i++){ 
    814                 if (aperture_sizes_table[i].id == v){ 
    815             short vv = aperture_sizes_table[i].prop_id; 
    816             _SetPropertyCase(PROPCASE_USER_AV, &vv, sizeof(vv)); 
    817             //_SetPropertyCase(PROPCASE_AV, &vv, sizeof(vv)); 
    818             return; 
    819                 } 
    820   } 
    821 } 
    822 #endif 
    823 } 
    824  
    825 void shooting_set_user_av_by_id_rel(int v) 
    826 { 
    827 #if CAM_HAS_IRIS_DIAPHRAGM 
    828 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    829     int cv = shooting_get_user_av_id(); 
    830     shooting_set_user_av_by_id(cv+v); 
    831 } 
    832 #endif 
    833 } 
    834  
    835  
    836 int shooting_get_day_seconds() 
    837 { 
    838     struct tm *ttm; 
    839     ttm = get_localtime(); 
    840     return ttm->tm_hour * 3600 + ttm->tm_min * 60 + ttm->tm_sec; 
    841 } 
    842  
    843 int shooting_get_tick_count() 
    844 { 
    845     return (int)get_tick_count(); 
    846 } 
    847  
    848 void shooting_set_iso_mode(int v) 
    849 { 
    850  long i; 
    851  for (i=0;i<ISO_SIZE;i++){ 
    852         if (iso_table[i].id == v){ 
    853             short vv = iso_table[i].prop_id; 
    854             _SetPropertyCase(PROPCASE_ISO_MODE, &vv, sizeof(vv)); 
    855             return; 
    856         } 
    857   } 
    858 } 
    859  
    860 int shooting_in_progress() 
    861 { 
    862     int t = 0; 
    863     _GetPropertyCase(PROPCASE_SHOOTING, &t, sizeof(&t)); 
    864     return t != 0; 
    865 } 
    866  
    867 int shooting_is_flash() 
    868 { 
    869  int t = 0; 
    870  _GetPropertyCase(PROPCASE_IS_FLASH_READY, &t,sizeof(&t)); 
    871  return t; 
    872 } 
    873  
    874 int shooting_is_flash_ready() 
    875 { 
    876    int t = 0; 
    877 /* well, I'm not sure what's exactly is happening here 
    878  * but it works for a610-100e 
    879  */ 
    880    // _GetPropertyCase(204, &t, 4); 
    881    // if (t == 3){ 
    882    _GetPropertyCase(PROPCASE_FLASH_MODE, &t, sizeof(&t)); 
    883    if ((t != 2) && (shooting_in_progress())) 
    884      if (shooting_is_flash()) return _IsStrobeChargeCompleted(); 
    885    return 1; 
    886 } 
    887  
    888 long get_file_counter() 
    889 { 
    890 #ifndef PARAM_FILE_COUNTER 
    891 #       error Please define PARAM_FILE_COUNTER in platform`s shooting.c! 
    892 #endif 
    893     long v = 0; 
    894     get_parameter_data(PARAM_FILE_COUNTER, &v, 4); 
    895     return v; 
    896 } 
    897  
    898 long get_exposure_counter() 
    899 { 
    900 #if defined(USE_FILE_COUNTER_FOR_EXP_COUNTING) || !defined(PARAM_EXPOSURE_COUNTER) 
    901     long v = 0; 
    902     get_parameter_data(PARAM_FILE_COUNTER, &v, 4); 
    903     v = ((v>>4)&0x3FFF); 
    904     return v; 
    905 #else 
    906     long v = 0; 
    907     get_parameter_data(PARAM_EXPOSURE_COUNTER, &v, 4); 
    908     return v; 
    909 #endif 
    910 } 
    911  
    912 short shooting_get_ev_correction1() 
    913 { 
    914     short evc1 = 0; 
    915     _GetPropertyCase(PROPCASE_EV_CORRECTION_1, &evc1, sizeof(evc1)); 
    916     return evc1; 
    917 } 
    918  
    919 #if CAM_QUALITY_OVERRIDE 
    920 void shooting_set_image_quality(int imq) 
    921 { 
    922   if (imq != 3){ 
    923     _SetPropertyCase(PROPCASE_QUALITY, &imq, sizeof(imq)); 
    924   } 
    925 } 
    926 #endif 
    927  
    928 int shooting_get_zoom() { 
    929     return lens_get_zoom_point(); 
    930 } 
    931  
    932 void shooting_set_zoom(int v) { 
    933     int dist; 
    934 if ((mode_get()&MODE_MASK) != MODE_PLAY) 
    935         { 
    936     dist = shooting_get_focus(); 
    937     lens_set_zoom_point(v); 
    938 #if defined(CAM_NEED_SET_ZOOM_DELAY) 
    939     msleep(CAM_NEED_SET_ZOOM_DELAY); 
    940 #endif 
    941     shooting_set_focus(dist, SET_NOW); 
    942   } 
    943 } 
    944  
    945 void shooting_set_zoom_rel(int v) { 
    946     int cv = shooting_get_zoom(); 
    947 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    948     shooting_set_zoom(cv+v); 
    949 } 
    950 } 
    951  
    952 void shooting_set_zoom_speed(int v) { 
    953 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    954     lens_set_zoom_speed(v); 
    955 } 
    956 } 
    957  
    958 int shooting_get_focus() { 
    959         return shooting_get_subject_distance(); 
    960 } 
    961  
    962 void shooting_set_focus(int v, short is_now) { 
    963         int s=v; 
    964 if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    965         if ((is_now) && shooting_can_focus()) { 
    966           if (conf.dof_dist_from_lens) s+=shooting_get_lens_to_focal_plane_width(); 
    967           if (!conf.dof_subj_dist_as_near_limit) lens_set_focus_pos(s); 
    968           else { 
    969         int near=shooting_get_near_limit_f(s,shooting_get_min_real_aperture(),get_focal_length(lens_get_zoom_point())); 
    970         if (near>0) lens_set_focus_pos(near); 
    971           } 
    972         } 
    973         else photo_param_put_off.subj_dist=v; 
    974 } 
    975 } 
    976  
    977 void shooting_set_autoiso(int iso_mode) { 
    978         short max_iso; 
    979         switch (iso_mode) { 
    980                 case -1: // ISO HI 
    981                         max_iso = conf.autoiso_max_iso_hi*10; 
    982                         break; 
    983                 case 0: // ISO AUTO 
    984                         max_iso = conf.autoiso_max_iso_auto*10; 
    985                         break; 
    986                 default: 
    987                         return; 
    988         } 
    989         int m=mode_get()&MODE_SHOOTING_MASK; 
    990         // TODO also long shutter ? 
    991         if (m==MODE_M || m==MODE_TV || m==MODE_STITCH) return; //Only operate outside of M and Tv 
    992         static const short shutter[]={0, 8, 15, 30, 60, 125, 250, 500, 1000}; 
    993         float current_shutter = shooting_get_shutter_speed_from_tv96(shooting_get_tv96()); 
    994  
    995         short current_iso=shooting_get_iso_real(); 
    996  
    997         short min_shutter = shutter[conf.autoiso_shutter]; 
    998         if (min_shutter == 0) 
    999                 { 
    1000                         short IS_factor = (shooting_get_is_mode()<=1)?conf.autoiso_is_factor:1; 
    1001                         min_shutter = get_focal_length(lens_get_zoom_point())*conf.autoiso_user_factor / (IS_factor*1000); 
    1002                 //min_shutter is NOT 1/Xs but optimized for the calculation. 
    1003                 } 
    1004  
    1005         short target_iso = current_iso * min_shutter * current_shutter; 
    1006         short min_iso = conf.autoiso_min_iso*10; 
    1007  
    1008         if (target_iso > max_iso) 
    1009                 { target_iso = max_iso; } 
    1010         else if (target_iso < min_iso) 
    1011                 { target_iso = min_iso; } 
    1012  
    1013         float target_shutter = current_shutter *  current_iso / target_iso; 
    1014  
    1015         shooting_set_shutter_speed(target_shutter, SET_NOW); 
    1016  
    1017     shooting_set_iso_real(target_iso, SET_NOW); 
    1018  
    1019 } 
    1020  
    1021 void shooting_video_bitrate_change(int v){ 
    1022  int m[]={1,2,3,4,5,6,7,8,10,12};  // m[v]/4 = bitrate*1x 
    1023  if (v>=(sizeof(m)/sizeof(m[0]))) v=(sizeof(m)/sizeof(m[0]))-1; 
    1024 #if CAM_CHDK_HAS_EXT_VIDEO_MENU 
    1025  change_video_tables(m[v],4); 
    1026 #endif 
    1027 } 
    1028  
    1029 float shooting_get_shutter_speed_override_value() 
    1030 { 
    1031   return (float)conf.tv_override_value*shutter_koef[conf.tv_override_koef]; 
    1032 } 
    1033  
    1034 const char * shooting_get_tv_bracket_value() 
    1035 { 
    1036   return expo_shift[conf.tv_bracket_value]; 
    1037 } 
    1038  
    1039 const char * shooting_get_tv_override_value() 
    1040 { 
    1041   return tv_override[conf.tv_override_value]; 
    1042 } 
    1043  
    1044  
    1045 const char * shooting_get_bracket_type() 
    1046 { 
    1047   return expo_type[conf.bracket_type]; 
    1048 } 
    1049  
    1050  
    1051 short shooting_get_iso_override_value() 
    1052 { 
    1053   return conf.iso_override_value*koef[conf.iso_override_koef]; 
    1054 } 
    1055  
    1056 short shooting_get_iso_bracket_value() 
    1057 { 
    1058   return conf.iso_bracket_value*koef[conf.iso_bracket_koef]; 
    1059 } 
    1060  
    1061  
    1062  
    1063 short shooting_get_av96_override_value() 
    1064 { 
    1065   if (conf.av_override_value<=AS_SIZE)  return (short) aperture_sizes_table[conf.av_override_value-1].prop_id; 
    1066   else return (short) (AV96_MAX+32*(conf.av_override_value-AS_SIZE)); 
    1067 } 
    1068  
    1069 const char * shooting_get_av_bracket_value() 
    1070 { 
    1071   return expo_shift[conf.av_bracket_value]; 
    1072 } 
    1073  
    1074  
    1075 int shooting_get_subject_distance_override_value() 
    1076 { 
    1077   return conf.subj_dist_override_value; 
    1078 } 
    1079  
    1080 int shooting_get_subject_distance_bracket_value() 
    1081 { 
    1082   return conf.subj_dist_bracket_value*koef[conf.subj_dist_bracket_koef]; 
    1083 } 
    1084  
    1085 int shooting_get_subject_distance_override_koef() 
    1086 { 
    1087     // Define the adjustment factor values for the subject distance override 
    1088 #if MAX_DIST > 1000000      // Superzoom - e.g. SX30, SX40 
    1089   static const int koef[] = {0,1,10,100,1000,10000,100000,1000000,-1}; 
    1090 #elif MAX_DIST > 100000     // G12, IXUS310 
    1091   static const int koef[] = {0,1,10,100,1000,10000,100000,-1}; 
    1092 #else                       // Original values (MAX_DIST = 65535) 
    1093   static const int koef[] = {0,1,10,100,1000}; 
    1094 #endif 
    1095   return koef[(conf.subj_dist_override_koef)]; 
    1096 } 
    1097  
    1098 void shooting_tv_bracketing(int when){ 
    1099   short value, is_odd; 
    1100   int m=mode_get()&MODE_SHOOTING_MASK; 
    1101   if (bracketing.shoot_counter==0) { // first shoot 
    1102     bracketing.shoot_counter=1; 
    1103     // if Tv override is enabled... (this was adapted from function shooting_expo_param_override() ) 
    1104     if ( ((conf.tv_enum_type) || (conf.tv_override_value)) && (conf.tv_override_koef) && !(conf.override_disable==1) ) { 
    1105       // ...use Tv override value as seed for bracketing: 
    1106       if (conf.tv_enum_type) 
    1107         bracketing.tv96 = 32*(conf.tv_override_value-tv_override_zero_shift); 
    1108       else 
    1109         bracketing.tv96 = shooting_get_tv96_from_shutter_speed(shooting_get_shutter_speed_override_value()); 
    1110     } 
    1111     // Tv override is disabled, use camera's opinion of Tv for bracketing seed value. 
    1112     else { 
    1113       if (!(m==MODE_M || m==MODE_TV || m==MODE_LONG_SHUTTER)) bracketing.tv96=shooting_get_tv96(); 
    1114       else bracketing.tv96=shooting_get_user_tv96(); 
    1115     } 
    1116     bracketing.tv96_step=32*conf.tv_bracket_value; 
    1117   } 
    1118   // other shoots 
    1119    bracketing.shoot_counter++; 
    1120    is_odd=(bracketing.shoot_counter&1); 
    1121    if ((!is_odd) || (conf.bracket_type>0)) bracketing.dtv96+=bracketing.tv96_step; 
    1122    if (((!is_odd) && (conf.bracket_type==0)) || (conf.bracket_type==1))  value=bracketing.tv96-bracketing.dtv96; 
    1123    else value=bracketing.tv96+bracketing.dtv96; 
    1124     
    1125    shooting_set_tv96_direct(value, when); 
    1126  
    1127 } 
    1128  
    1129 void shooting_av_bracketing(int when){ 
    1130     short value,is_odd; 
    1131  
    1132     int m = mode_get()&MODE_SHOOTING_MASK; 
    1133  
    1134     if (bracketing.shoot_counter == 0) { // first shoot 
    1135         bracketing.shoot_counter = 1; 
    1136         //short av_override_value=shooting_get_av96_override_value; 
    1137         //if (av_override_value) bracketing.av96=av_override_value; 
    1138         if (!(m==MODE_M || m==MODE_AV)) 
    1139             bracketing.av96 = shooting_get_av96(); 
    1140         else 
    1141             bracketing.av96 = shooting_get_user_av96(); 
    1142         bracketing.av96_step = 32*conf.av_bracket_value; 
    1143     } 
    1144     // other shoots 
    1145     bracketing.shoot_counter++; 
    1146     is_odd = (bracketing.shoot_counter&1); 
    1147     value = bracketing.av96; 
    1148  
    1149     if ( !is_odd || (conf.bracket_type > 0) || 
    1150          ( is_odd && (conf.bracket_type == 0) && ((bracketing.av96 - bracketing.dav96) < AV96_MIN) )) 
    1151     { 
    1152        bracketing.dav96 += bracketing.av96_step; 
    1153     } 
    1154  
    1155     if (((!is_odd && (conf.bracket_type == 0)) || (conf.bracket_type == 1)) && ((bracketing.av96 - bracketing.dav96) >= AV96_MIN)) 
    1156     { 
    1157         value -= bracketing.dav96; 
    1158     } 
    1159     else if ((is_odd && (conf.bracket_type == 0))  
    1160                 || (conf.bracket_type == 2)  
    1161                 || ((!is_odd && (conf.bracket_type == 0)) && ((bracketing.av96 - bracketing.dav96) < AV96_MIN))) 
    1162     { 
    1163         value += bracketing.dav96; 
    1164     } 
    1165  
    1166     if (value != bracketing.av96) 
    1167     { 
    1168         shooting_set_av96_direct(value, when); 
    1169 #ifdef CAM_AV_OVERRIDE_IRIS_FIX 
    1170         extern int _MoveIrisWithAv(short*); 
    1171         _MoveIrisWithAv(&value); 
    1172 #endif 
    1173     } 
    1174 } 
    1175  
    1176  
    1177 void shooting_iso_bracketing(int when){ 
    1178  short value=0, is_odd; 
    1179  if (bracketing.shoot_counter==0) { // first shoot 
    1180     bracketing.shoot_counter=1; 
    1181     bracketing.iso=shooting_get_iso_real(); 
    1182     bracketing.iso_step=shooting_get_iso_bracket_value(); 
    1183     } 
    1184   // other shoots 
    1185    bracketing.shoot_counter++; 
    1186    is_odd=(bracketing.shoot_counter&1); 
    1187  
    1188    if (((!is_odd) || (conf.bracket_type>0)) || (((is_odd) && (conf.bracket_type==0)) && (bracketing.iso<=bracketing.diso))) 
    1189     { 
    1190            bracketing.diso+=bracketing.iso_step; 
    1191     } 
    1192    if ((((!is_odd) && (conf.bracket_type==0)) || (conf.bracket_type==1)) && (bracketing.iso>bracketing.diso)) 
    1193      { 
    1194      value=bracketing.iso-bracketing.diso; 
    1195      shooting_set_iso_real(value, when); 
    1196      } 
    1197    else if ((((is_odd) && (conf.bracket_type==0)) || (conf.bracket_type==2)) || (((!is_odd) && (conf.bracket_type==0)) && (bracketing.iso<=bracketing.diso))) 
    1198      { 
    1199      value=bracketing.iso+bracketing.diso; 
    1200      shooting_set_iso_real(value, when); 
    1201      } 
    1202 } 
    1203  
    1204 void shooting_subject_distance_bracketing(int when){ 
    1205  short value=0, is_odd; 
    1206  if (bracketing.shoot_counter==0) { // first shoot 
    1207     bracketing.shoot_counter=1; 
    1208     bracketing.subj_dist=shooting_get_focus(); 
    1209     bracketing.subj_dist_step=shooting_get_subject_distance_bracket_value(); 
    1210  } 
    1211   // other shoots 
    1212    bracketing.shoot_counter++; 
    1213    is_odd=(bracketing.shoot_counter&1); 
    1214    if (((!is_odd) || (conf.bracket_type>0)) || (((is_odd) && (conf.bracket_type==0)) && (bracketing.subj_dist<=bracketing.dsubj_dist))) 
    1215    { 
    1216            bracketing.dsubj_dist+=bracketing.subj_dist_step; 
    1217    } 
    1218    if ((((!is_odd) && (conf.bracket_type==0)) || (conf.bracket_type==1)) && (bracketing.subj_dist>bracketing.dsubj_dist)) 
    1219      { 
    1220      value=bracketing.subj_dist-bracketing.dsubj_dist; 
    1221      shooting_set_focus(value, when); 
    1222      } 
    1223    else if ((((is_odd) && (conf.bracket_type==0)) || (conf.bracket_type==2)) || (((!is_odd) && (conf.bracket_type==0)) && (bracketing.subj_dist<=bracketing.dsubj_dist))) 
    1224      { 
    1225      value=bracketing.subj_dist+bracketing.dsubj_dist; 
    1226      shooting_set_focus(value, when); 
    1227     } 
    1228 } 
    1229  
    1230 void bracketing_reset() 
    1231 { 
    1232            bracketing.shoot_counter=0; 
    1233            bracketing.av96=0; 
    1234            bracketing.dav96=0; 
    1235            bracketing.tv96=0; 
    1236            bracketing.dtv96=0; 
    1237            bracketing.sv96=0; 
    1238            bracketing.dsv96=0; 
    1239            bracketing.iso=0; 
    1240            bracketing.diso=0; 
    1241            bracketing.subj_dist=0; 
    1242            bracketing.dsubj_dist=0; 
    1243            bracketing.type=0; 
    1244 } 
    1245  
    1246 void bracketing_step(int when) 
    1247 { 
    1248    if (conf.tv_bracket_value && !(conf.override_disable==1 && conf.override_disable_all)) shooting_tv_bracketing(when); 
    1249    else if (conf.av_bracket_value && !(conf.override_disable==1 && conf.override_disable_all)) shooting_av_bracketing(when); 
    1250                 else if ((conf.iso_bracket_value && !(conf.override_disable==1 && conf.override_disable_all)) && (conf.iso_bracket_koef)) shooting_iso_bracketing(when); 
    1251                          else if ((conf.subj_dist_bracket_value && !(conf.override_disable==1 && conf.override_disable_all)) && (conf.subj_dist_bracket_koef)) shooting_subject_distance_bracketing(when);             
    1252                                   else if ((conf.subj_dist_bracket_value) && (conf.subj_dist_bracket_koef)) shooting_subject_distance_bracketing(when) ; 
    1253 } 
    1254  
    1255 void shooting_bracketing(void) 
    1256  
    1257         short drive_mode=shooting_get_drive_mode(); 
    1258         if (shooting_get_drive_mode()!=0)   
    1259         { 
    1260                 int m=mode_get()&MODE_SHOOTING_MASK; 
    1261                 if (m!=MODE_STITCH && m!=MODE_SCN_BEST_IMAGE)  
    1262                 { 
    1263                    if (state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) bracketing_reset() ; 
    1264                    bracketing_step(SET_NOW) ; 
    1265                 } 
    1266         } 
    1267  
    1268 } 
    1269  
    1270  
    1271 #if CAM_REAR_CURTAIN 
    1272   void shooting_set_flash_sync_curtain(int curtain){ 
    1273    _SetPropertyCase(PROPCASE_FLASH_SYNC_CURTAIN, &curtain, sizeof(curtain)); 
    1274   } 
    1275 #endif 
    1276  
    1277 // forces manual flash. if set, flash will ALWAYS be triggered (manual) 
    1278         void shooting_set_flash_video_override(int flash, int power){ 
    1279                 int mode = 1; 
    1280                 if ((conf.flash_manual_override && conf.flash_video_override && (movie_status > 1)) || (conf.flash_manual_override && !conf.flash_video_override)) { 
    1281                                                 _SetPropertyCase(PROPCASE_FLASH_ADJUST_MODE, &mode, sizeof(mode)); 
    1282                                                 _SetPropertyCase(PROPCASE_FLASH_FIRE, &flash, sizeof(flash)); 
    1283                                                 _SetPropertyCase(PROPCASE_FLASH_MANUAL_OUTPUT, &power, sizeof(power)); 
    1284                                         } 
    1285   } 
    1286  
    1287 // TODO sd990 hack for overrides 
    1288 // caller must save regs 
    1289 int captseq_hack_override_active() { 
    1290  if (state_kbd_script_run) 
    1291         if ( photo_param_put_off.tv96 || photo_param_put_off.sv96 ) 
    1292                 return 1; 
    1293  if(conf.override_disable==1) 
    1294         return 0; 
    1295  if(conf.iso_override_value && conf.iso_override_koef) 
    1296         return 1; 
    1297  if((conf.tv_enum_type || conf.tv_override_value) && conf.tv_override_koef) 
    1298         return 1; 
    1299  return 0; 
    1300 } 
    1301  
    1302 extern int usb_remote_active ; 
    1303  
    1304 void __attribute__((naked,noinline)) shooting_expo_param_override(void){ 
    1305  asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    1306  
    1307  //if (conf.tv_override) shooting_set_tv96_direct(-384-32*conf.tv_override); 
    1308  //short drive_mode=shooting_get_drive_mode(); 
    1309 /*if(drive_mode!=last_drive_mode) 
    1310  { 
    1311   if (last_drive_mode==0) shoot_counter=0; 
    1312   last_drive_mode=drive_mode; 
    1313  }*/ 
    1314  //int m=mode_get()&MODE_SHOOTING_MASK; 
    1315    
    1316  if ( ((state_kbd_script_run) || (usb_remote_active)) && photo_param_put_off.tv96 ) { 
    1317   shooting_set_tv96_direct(photo_param_put_off.tv96, SET_NOW); 
    1318   photo_param_put_off.tv96=0; 
    1319  } 
    1320    else if (((conf.tv_enum_type) || (conf.tv_override_value)) && (conf.tv_override_koef) && !(conf.override_disable==1)) 
    1321    { 
    1322            if (conf.tv_enum_type) 
    1323                         shooting_set_tv96_direct(32*(conf.tv_override_value-(tv_override_zero_shift)),SET_NOW); 
    1324            else 
    1325                         shooting_set_tv96_direct(shooting_get_tv96_from_shutter_speed(shooting_get_shutter_speed_override_value()), SET_NOW); 
    1326    } 
    1327     
    1328  if (((state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.sv96)) { 
    1329   shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    1330   photo_param_put_off.sv96=0; 
    1331   } 
    1332         else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1)) 
    1333                 shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW); 
    1334                 else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all)) 
    1335                 shooting_set_autoiso(shooting_get_iso_mode()); 
    1336                  
    1337  if (((state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.av96)) { 
    1338   shooting_set_av96_direct(photo_param_put_off.av96, SET_NOW); 
    1339   photo_param_put_off.av96=0; 
    1340   } 
    1341  else if (conf.av_override_value && !(conf.override_disable==1)) 
    1342  shooting_set_av96_direct(shooting_get_av96_override_value(), SET_NOW); 
    1343   
    1344  if (((state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.subj_dist)) { 
    1345   shooting_set_focus(photo_param_put_off.subj_dist, SET_NOW); 
    1346   photo_param_put_off.subj_dist=0; 
    1347   } 
    1348   else if ((conf.subj_dist_override_value) && (conf.subj_dist_override_koef) && !(conf.override_disable==1)) 
    1349    shooting_set_focus(shooting_get_subject_distance_override_value(), SET_NOW); 
    1350     
    1351 #if CAM_HAS_ND_FILTER 
    1352  if ((state_kbd_script_run) && (photo_param_put_off.nd_filter)) { 
    1353    shooting_set_nd_filter_state(photo_param_put_off.nd_filter, SET_NOW); 
    1354    photo_param_put_off.nd_filter=0; 
    1355   } 
    1356  else if (conf.nd_filter_state && !(conf.override_disable==1)) 
    1357    shooting_set_nd_filter_state(conf.nd_filter_state, SET_NOW); 
    1358 #endif 
    1359  
    1360 #if CAM_REAR_CURTAIN 
    1361   shooting_set_flash_sync_curtain(conf.flash_sync_curtain); 
    1362 #endif 
    1363  
    1364  
    1365   shooting_set_flash_video_override(conf.flash_manual_override,conf.flash_video_override_power); 
    1366 #if CAM_QUALITY_OVERRIDE 
    1367  // this doesn't really need to be set in the override hook. 
    1368  // should only need to be set once if the users doesn't change back, but doing it here ensures it is set 
    1369  shooting_set_image_quality(conf.fast_image_quality); 
    1370 #endif 
    1371  
    1372  asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    1373 } 
    1374 void unlock_optical_zoom(void){ 
    1375  
    1376 #if CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 
    1377  if (conf.unlock_optical_zoom_for_video) _UnsetZoomForMovie(); 
    1378 #endif 
    1379  
    1380 #if CAM_EV_IN_VIDEO 
    1381  set_ev_video_avail(0); 
    1382 #endif 
    1383  
    1384 } 
    1385  
    1386  
    1387 #if CAM_EV_IN_VIDEO 
    1388  
    1389 int ev_video_avail; 
    1390 int ev_video; 
    1391 int save_tv_video; 
    1392 int tv_min_video; 
    1393  
    1394 int get_ev_video_avail(void){ 
    1395  return ev_video_avail; 
    1396 } 
    1397  
    1398 void set_ev_video_avail(int x){ 
    1399  if (ev_video_avail==x) return; 
    1400  ev_video_avail=x; 
    1401  if (x) { 
    1402   ev_video=0; 
    1403   _ExpCtrlTool_StopContiAE(0,0); 
    1404   _GetPropertyCase(PROPCASE_TV,&save_tv_video,2); 
    1405   if ((mode_get()&MODE_SHOOTING_MASK)==MODE_VIDEO_SPEED) tv_min_video=577;  // 1/60 
    1406    else tv_min_video=480; //1/30 
    1407  } 
    1408  else _ExpCtrlTool_StartContiAE(0,0); 
    1409 } 
    1410  
    1411 int get_ev_video(void){ 
    1412  return ev_video; 
    1413 } 
    1414  
    1415 void set_ev_video(int x){ 
    1416  short ev, tv; 
    1417  if ((x<-4)||(x>4)) return; 
    1418  ev=48*x; 
    1419  tv=save_tv_video-ev; 
    1420  if (tv>=tv_min_video) { 
    1421   ev_video=x; 
    1422   _SetAE_ShutterSpeed(&tv); 
    1423  } 
    1424 } 
    1425  
    1426 #endif 
    1427  
    1428 int shooting_mode_canon2chdk(int canonmode) { 
    1429         int i; 
    1430         for (i=0; i < MODESCNT; i++) { 
    1431                 if (modemap[i].canonmode == canonmode) 
    1432                         return modemap[i].hackmode; 
    1433         } 
    1434         return 0; 
    1435 } 
    1436  
    1437 int shooting_mode_chdk2canon(int hackmode) { 
    1438         int i; 
    1439         for (i=0; i < MODESCNT; i++) { 
    1440                 if (modemap[i].hackmode == hackmode) 
    1441                         return modemap[i].canonmode; 
    1442         } 
    1443         return -1; // 0 is a valid mode on old cameras! 
    1444 } 
    1445  
    1446 int shooting_set_mode_chdk(int mode) { 
    1447         int canonmode = shooting_mode_chdk2canon(mode); 
    1448         if (canonmode == -1 || !rec_mode_active()) 
    1449                 return 0; 
    1450         _SetCurrentCaptureModeType(canonmode); 
    1451         // TODO since mode seems to be fully set when this returns, 
    1452         // we could check if it worked 
    1453         return 1; 
    1454 } 
    1455  
    1456 int shooting_set_mode_canon(int canonmode) { 
    1457         if(canonmode == -1 || !rec_mode_active()) 
    1458                 return 0; 
    1459         _SetCurrentCaptureModeType(canonmode); 
    1460         return 1; 
    1461 } 
    1462  
    1463 // override in platform/<cam>/main.c if playrec_mode is not found or different 
    1464 int __attribute__((weak)) rec_mode_active(void) { 
    1465     return (playrec_mode==2 || playrec_mode==4 || playrec_mode==5); 
    1466 } 
    1467  
    1468 // Converted from MODE_IS_VIDEO macro (philmoz July 2011) 
    1469 int mode_is_video(int m) 
    1470 { 
    1471     m = m & MODE_SHOOTING_MASK; 
    1472     return (m==MODE_VIDEO_STD || 
    1473             m==MODE_VIDEO_SPEED || 
    1474             m==MODE_VIDEO_COMPACT || 
    1475             m==MODE_VIDEO_MY_COLORS || 
    1476             m==MODE_VIDEO_COLOR_ACCENT || 
    1477             m==MODE_VIDEO_COLOR_SWAP || 
    1478             m==MODE_VIDEO_MINIATURE || 
    1479             m==MODE_VIDEO_TIME_LAPSE || 
    1480             m==MODE_VIDEO_PORTRAIT || 
    1481             m==MODE_VIDEO_NIGHT || 
    1482             m==MODE_VIDEO_INDOOR || 
    1483             m==MODE_VIDEO_FOLIAGE || 
    1484             m==MODE_VIDEO_SNOW  || 
    1485             m==MODE_VIDEO_BEACH || 
    1486             m==MODE_VIDEO_AQUARIUM || 
    1487             m==MODE_VIDEO_SUPER_MACRO || 
    1488             m==MODE_VIDEO_STITCH || 
    1489             m==MODE_VIDEO_MANUAL || 
    1490             m==MODE_VIDEO_MINIATURE || 
    1491             m==MODE_VIDEO_IFRAME_MOVIE 
    1492 // not clear if this should be considered a video mode ? 
    1493 /*            m==MODE_VIDEO_MOVIE_DIGEST*/  
    1494             ); 
    1495 } 
    1496  
    1497 // currently nothing needs to override this, so not weak 
    1498 int /*__attribute__((weak))*/ mode_get(void) { 
    1499     int mode, t=0xFF; 
    1500  
    1501     mode = (rec_mode_active())?MODE_REC:MODE_PLAY; 
    1502  
    1503 #ifdef CAM_SWIVEL_SCREEN 
    1504     mode |= (screen_opened())?MODE_SCREEN_OPENED:0; 
    1505     mode |= (screen_rotated())?MODE_SCREEN_ROTATED:0; 
    1506 #endif 
    1507  
    1508     _GetPropertyCase(PROPCASE_SHOOTING_MODE, &t, 4); 
    1509         mode |= shooting_mode_canon2chdk(t); 
    1510  
    1511     return (mode); 
    1512 } 
    1513  
    1514 // Only needed on VxWorks 
    1515 #if CAM_DRAW_EXPOSITION 
    1516  
    1517 // compare PROPCASE_TV with shutter_speeds_table 
    1518 char* shooting_get_tv_str() { 
    1519     short int tvv; 
    1520     long i; 
    1521     _GetPropertyCase(PROPCASE_TV, &tvv, sizeof(tvv)); 
    1522     for(i=0; i<SS_SIZE; i++) { 
    1523         if(shutter_speeds_table[i].prop_id >= tvv) 
    1524             return (char*)shutter_speeds_table[i].name; 
    1525     } 
    1526     return (void*)"?"; 
    1527 } 
    1528  
    1529 // compare PROPCASE_AV with aperture_sizes_table 
    1530 char* shooting_get_av_str() { 
    1531     short int avv; 
    1532     long i; 
    1533     _GetPropertyCase(PROPCASE_AV, &avv, sizeof(avv)); 
    1534     for(i=0; i<AS_SIZE; i++) { 
    1535         if(aperture_sizes_table[i].prop_id == avv) 
    1536             return (char*)aperture_sizes_table[i].name; 
    1537     } 
    1538     return (char*) "?"; 
    1539 } 
    1540  
    1541 #endif 
    1542  
    1543 /* 
    1544 char* shooting_get_iso_str() { 
    1545     short int isov; 
    1546     long i; 
    1547     _GetPropertyCase(PROPCASE_ISO_MODE, &isov, sizeof(isov)); 
    1548     for(i=0; i<ISO_SIZE; i++) { 
    1549         if(iso_table[i].prop_id == isov) 
    1550             return (char*)iso_table[i].name; 
    1551     } 
    1552     return (char*) "?"; 
    1553 } 
    1554 */ 
  • trunk/platform/generic/wrappers.c

    r1623 r1632  
    267267#endif 
    268268} 
     269 
     270#if CAM_HAS_ND_FILTER 
     271void PutInNdFilter()                { _PutInNdFilter(); } 
     272void PutOutNdFilter()               { _PutOutNdFilter(); } 
     273#endif 
     274 
     275long GetCurrentAvValue()            { return _GetCurrentAvValue(); } 
     276long IsStrobeChargeCompleted()      { return _IsStrobeChargeCompleted(); } 
     277void SetCurrentCaptureModeType()    { _SetCurrentCaptureModeType(); } 
     278 
     279#if CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 
     280void UnsetZoomForMovie()            { _UnsetZoomForMovie(); } 
     281#endif 
     282 
     283#ifdef CAM_AV_OVERRIDE_IRIS_FIX 
     284int MoveIrisWithAv(short *v)        { return _MoveIrisWithAv(v); } 
     285#endif 
     286 
     287#if CAM_EV_IN_VIDEO 
     288void ExpCtrlTool_StartContiAE(int v1, int v2)   { _ExpCtrlTool_StartContiAE(v1,v2); } 
     289void ExpCtrlTool_StopContiAE(int v1, int v2)    { _ExpCtrlTool_StopContiAE(v1, v2); } 
     290short SetAE_ShutterSpeed(short *tv)             { _SetAE_ShutterSpeed(tv); } 
     291#endif 
    269292 
    270293//---------------------------------------------------------------------------- 
  • trunk/platform/ixus1000_sd4500/shooting.c

    r1590 r1632  
    9999 
    100100*/ 
    101 static const CapturemodeMap modemap[] = { 
     101const CapturemodeMap modemap[] = { 
    102102        { MODE_AUTO,                32768  }, 
    103103        { MODE_P,                   32772  }, 
  • trunk/platform/ixus100_sd780/shooting.c

    r1328 r1632  
    110110canon mode list FFB2D2EC in 100e 
    111111*/ 
    112 static const CapturemodeMap modemap[] = { 
     112const CapturemodeMap modemap[] = { 
    113113                { MODE_AUTO, 32768 }, 
    114114                { MODE_P, 32772 }, 
  • trunk/platform/ixus120_sd940/shooting.c

    r1216 r1632  
    8282}; 
    8383 
    84 static struct { 
     84struct { 
    8585        int hackmode; 
    8686        int canonmode; 
  • trunk/platform/ixus200_sd980/shooting.c

    r1212 r1632  
    8282}; 
    8383 
    84 static struct { 
     84struct { 
    8585        int hackmode; 
    8686        int canonmode; 
  • trunk/platform/ixus220_elph300hs/shooting.c

    r1448 r1632  
    9090// modemap, values have been verified for IXUS220HS on 1.00c/1.01a/1.01c 
    9191// http://chdk.setepontos.com/index.php?topic=6341.msg76892#msg76892 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    { MODE_AUTO,                32768 }, 
    9494    { MODE_P,                   32772 }, 
     
    128128#include "../generic/shooting.c" 
    129129 
    130 // Override ISO settings (need to do this before exposure calc for ISO as well as after) 
    131 void __attribute__((naked,noinline)) shooting_expo_iso_override(void){ 
    132  asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    133  
    134     if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
    135     { 
    136         shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    137         // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override 
    138     } 
    139     else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1)) 
    140         shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW); 
    141     else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all)) 
    142         shooting_set_autoiso(shooting_get_iso_mode()); 
    143  
    144  asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    145 } 
    146  
    147130long get_file_next_counter() { 
    148131        return get_file_counter(); 
  • trunk/platform/ixus230_elph310hs/shooting.c

    r1567 r1632  
    8282}; 
    8383 
    84 static const CapturemodeMap modemap[] = { 
     84const CapturemodeMap modemap[] = { 
    8585    { MODE_AUTO,                32768 }, 
    8686    { MODE_P,                   32772 }, 
  • trunk/platform/ixus300_sd4000/shooting.c

    r1377 r1632  
    103103// finsig2 found 33324, 33323, 33320, 33322, 33321, 33288, 33289 in firmware but not in modemap 
    104104// ROM:FFC0041C Table with Data Words 
    105 static const CapturemodeMap modemap[] = { 
     105const CapturemodeMap modemap[] = { 
    106106    { MODE_AUTO,               32768 }, 
    107107    { MODE_P,                  32772 }, 
  • trunk/platform/ixus310_elph500hs/shooting.c

    r1440 r1632  
    104104*/ 
    105105// IXUS 310 HS modelist table found @0xff4ce6f0 (firmware 1.00a) 
    106 static const CapturemodeMap modemap[] = { 
     106const CapturemodeMap modemap[] = { 
    107107        { MODE_TV,                  32771 }, 
    108108        { MODE_AV,                  32770 }, 
     
    140140#include "../generic/shooting.c" 
    141141 
    142 // Override ISO settings (need to do this before exposure calc for ISO as well as after) 
    143 void __attribute__((naked,noinline)) shooting_expo_iso_override(void){ 
    144  asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    145  
    146     if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
    147     { 
    148         shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    149         // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override 
    150     } 
    151     else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1)) 
    152         shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW); 
    153     else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all)) 
    154         shooting_set_autoiso(shooting_get_iso_mode()); 
    155  
    156  asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    157 } 
    158  
    159142long get_file_next_counter() { 
    160143        return get_file_counter(); 
  • trunk/platform/ixus40_sd300/shooting.c

    r880 r1632  
    9494NOTE: mode override is not implemented on this camera 
    9595*/ 
    96 static const CapturemodeMap modemap[] = { 
     96const CapturemodeMap modemap[] = { 
    9797    { MODE_P,                   1 }, 
    9898    { MODE_LONG_SHUTTER,        2 }, // guessed 
  • trunk/platform/ixus50_sd400/shooting.c

    r1276 r1632  
    9393*/ 
    9494 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696    { MODE_SCN_DIGITAL_MACRO,   0 }, 
    9797    { MODE_P,                   1 }, 
  • trunk/platform/ixus55_sd450/shooting.c

    r1276 r1632  
    9292canon mode list FF95FC68 in 100b 
    9393*/ 
    94 static const CapturemodeMap modemap[] = { 
     94const CapturemodeMap modemap[] = { 
    9595    { MODE_P,                   0 }, 
    9696    { MODE_LONG_SHUTTER,        1 }, // guessed long shutter  
  • trunk/platform/ixus60_sd600/shooting.c

    r1276 r1632  
    9292    320 x 240 (1 min. at 60 fps), 160 x 120 (3 min. at 15 fps 
    9393*/ 
    94 static const CapturemodeMap modemap[] = { 
     94const CapturemodeMap modemap[] = { 
    9595    { MODE_P,                  32772 }, // note, this is called Manual, but eqivalent to P on cameras with real manual 
    9696    { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus65_sd630/shooting.c

    r1276 r1632  
    8989*/ 
    9090/* names below mostly guessed from a540 and ixus60_sd600 */ 
    91 static const CapturemodeMap modemap[] = { 
     91const CapturemodeMap modemap[] = { 
    9292    // common, should be OK 
    9393    { MODE_P,                  32772 }, // may be called manual, but effectively P 
  • trunk/platform/ixus700_sd500/shooting.c

    r1276 r1632  
    9595Movie: 640x480, 320x240, 160x120 
    9696*/ 
    97 static const CapturemodeMap modemap[] = { 
     97const CapturemodeMap modemap[] = { 
    9898    { MODE_SCN_DIGITAL_MACRO,   0 }, 
    9999    { MODE_P,                   1 }, 
  • trunk/platform/ixus70_sd1000/shooting.c

    r1276 r1632  
    9595*/ 
    9696// PROPCACE 49 
    97 static const CapturemodeMap modemap[] = { 
     97const CapturemodeMap modemap[] = { 
    9898    { MODE_LONG_SHUTTER,       32774 }, // guessed 
    9999    { MODE_AUTO,               32768 },  
  • trunk/platform/ixus750_sd550/shooting.c

    r1276 r1632  
    9393canon mode list FF960434 in 100f 
    9494*/ 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696    { MODE_P,                   0 }, // guessed! 
    9797    { MODE_LONG_SHUTTER,        1 }, // guessed! 
  • trunk/platform/ixus75_sd750/shooting.c

    r1276 r1632  
    9595*/ 
    9696// PROPCACE 49 
    97 static const CapturemodeMap modemap[] = { 
     97const CapturemodeMap modemap[] = { 
    9898    { MODE_LONG_SHUTTER,       32774 }, // guessed! 
    9999    { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus800_sd700/shooting.c

    r1276 r1632  
    9797canon mode list FF972360 in 100b 
    9898*/ 
    99 static const CapturemodeMap modemap[] = { 
     99const CapturemodeMap modemap[] = { 
    100100    { MODE_LONG_SHUTTER,       32774 }, // guessed! 
    101101    { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus80_sd1100/shooting.c

    r860 r1632  
    101101*/ 
    102102// PROPCACE 49 
    103 static const CapturemodeMap modemap[] = { 
     103const CapturemodeMap modemap[] = { 
    104104    { MODE_LONG_SHUTTER,       32774 }, // guessed 
    105105    { MODE_AUTO,               32768 },  
  • trunk/platform/ixus850_sd800/shooting.c

    r1276 r1632  
    9494*/ 
    9595// PROPCACE 49 
    96 static const CapturemodeMap modemap[] = { 
     96const CapturemodeMap modemap[] = { 
    9797    { MODE_LONG_SHUTTER,       32774 }, // guessed 
    9898    { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus85_sd770/shooting.c

    r1376 r1632  
    129129}; 
    130130 
    131 static const CapturemodeMap modemap[] = { 
     131const CapturemodeMap modemap[] = { 
    132132 
    133133        { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus860_sd870/shooting.c

    r860 r1632  
    9696*/ 
    9797// PROPCACE 49 
    98 static const CapturemodeMap modemap[] = { 
     98const CapturemodeMap modemap[] = { 
    9999    { MODE_LONG_SHUTTER,       32774 }, 
    100100    { MODE_AUTO,               32768 },  
  • trunk/platform/ixus870_sd880/shooting.c

    r860 r1632  
    124124canon mode list FFB2D2EC in 100e 
    125125*/ 
    126 static const CapturemodeMap modemap[] = { 
     126const CapturemodeMap modemap[] = { 
    127127        { MODE_VIDEO_STD,          2600   }, 
    128128        { MODE_VIDEO_COLOR_ACCENT, 2598   }, 
  • trunk/platform/ixus900_sd900/shooting.c

    r1276 r1632  
    105105// PROPCASE 49 
    106106// Mapping between camera mode and PROPCASE_SHOOTING_MODE 
    107 static const CapturemodeMap modemap[] = {   // PROPCASE 0, check with CHDK debug menu option "Show Parameter Data 0" 
     107const CapturemodeMap modemap[] = {   // PROPCASE 0, check with CHDK debug menu option "Show Parameter Data 0" 
    108108    {MODE_AUTO,               32768}, 
    109109    {MODE_M,                  33772}, 
  • trunk/platform/ixus90_sd790/shooting.c

    r1376 r1632  
    8383};           
    8484 
    85 static struct { 
     85struct { 
    8686   int hackmode; 
    8787   int canonmode; 
  • trunk/platform/ixus950_sd850/shooting.c

    r1276 r1632  
    103103canon mode list FFB4B564 in 100c 
    104104*/ 
    105 static const CapturemodeMap modemap[] = { 
     105const CapturemodeMap modemap[] = { 
    106106    { MODE_LONG_SHUTTER,       32774 }, // guessed 
    107107    { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus95_sd1200/shooting.c

    r1376 r1632  
    9191 
    9292// PROPCACE 49 
    93 static const CapturemodeMap modemap[] = { 
     93const CapturemodeMap modemap[] = { 
    9494    { MODE_AUTO,               32768 }, 
    9595    { MODE_M,                  32769 }, 
  • trunk/platform/ixus960_sd950/shooting.c

    r880 r1632  
    8787*/ 
    8888 
    89 static const CapturemodeMap modemap[] = { 
     89const CapturemodeMap modemap[] = { 
    9090        { MODE_LONG_SHUTTER,       32774 }, // guessed 
    9191        { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus970_sd890/shooting.c

    r1377 r1632  
    143143canon mode list FFAF9460 in 100b 
    144144*/ 
    145 static const CapturemodeMap modemap[] = { 
     145const CapturemodeMap modemap[] = { 
    146146        { MODE_LONG_SHUTTER,       32774 }, // guessed 
    147147        { MODE_AUTO,               32768 }, 
  • trunk/platform/ixus980_sd990/shooting.c

    r1276 r1632  
    105105canon mode list FFB49820 in 100e 
    106106*/ 
    107 static const CapturemodeMap modemap[] = { 
     107const CapturemodeMap modemap[] = { 
    108108    { MODE_AUTO,               32768 },  
    109109    { MODE_M,                  32769 }, // unlike most other ixus/sd, this has a real M mode 
  • trunk/platform/ixusizoom_sd30/shooting.c

    r1276 r1632  
    8787// TODO this is completely wrong, camera has no M, Tv, Av. Should have "long shutter" 
    8888// valid mode 0-15, 0x10010-0x1012 
    89 static const CapturemodeMap modemap[] = { 
     89const CapturemodeMap modemap[] = { 
    9090    { MODE_AUTO,               6  }, 
    9191    { MODE_P,                  1  }, 
  • trunk/platform/s2is/shooting.c

    r860 r1632  
    8686canon mode list FF983777 in 100e 
    8787*/ 
    88 static const CapturemodeMap modemap[] = { 
     88const CapturemodeMap modemap[] = { 
    8989    { MODE_AUTO,                5 }, 
    9090    { MODE_P,                   1 }, 
  • trunk/platform/s3is/shooting.c

    r860 r1632  
    8888canon mode list @FF98F378 in 100a 
    8989*/ 
    90 static const CapturemodeMap modemap[] = { 
     90const CapturemodeMap modemap[] = { 
    9191    { MODE_AUTO,                32768 }, 
    9292    { MODE_P,                   32772 }, 
  • trunk/platform/s5is/shooting.c

    r860 r1632  
    9494canon mode list  in 101a 
    9595*/ 
    96 static const CapturemodeMap modemap[] = { 
     96const CapturemodeMap modemap[] = { 
    9797        { MODE_AUTO,               32768  }, 
    9898        { MODE_P,                  32772  }, 
  • trunk/platform/s90/shooting.c

    r888 r1632  
    9393};         
    9494 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696        { MODE_AUTO,               32768  }, 
    9797        { MODE_P,                  32772  }, // also C1,C2 
  • trunk/platform/s95/shooting.c

    r1244 r1632  
    9191}; 
    9292 
    93 static const CapturemodeMap modemap[] = { 
     93const CapturemodeMap modemap[] = { 
    9494        { MODE_P,                  32772  }, 
    9595        { MODE_TV,                 32771  }, 
  • trunk/platform/sx1/shooting.c

    r860 r1632  
    9393canon mode list FFBBB0CC in 200h 
    9494*/ 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696        { MODE_AUTO,               32768  }, 
    9797        { MODE_P,                  32772  }, 
  • trunk/platform/sx10/shooting.c

    r860 r1632  
    9393canon mode list FFB74378 in 100c 
    9494*/ 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696        { MODE_AUTO,               32768  }, 
    9797        { MODE_P,                  32772  }, 
  • trunk/platform/sx100is/shooting.c

    r1345 r1632  
    9393canon mode list FFE9E7EC in 100b, ffe9e824 in 100c 
    9494*/ 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696        { MODE_AUTO,               32768 }, 
    9797    { MODE_P,                  32772 }, 
  • trunk/platform/sx110is/shooting.c

    r860 r1632  
    9393canon mode list FFEDD5F4 in 100b 
    9494*/ 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696  { MODE_VIDEO_STD,          2600  },  //Verified 
    9797  { MODE_VIDEO_COMPACT,      2602  },  //Verified 
  • trunk/platform/sx120is/shooting.c

    r1527 r1632  
    8080 
    8181 
    82 static const CapturemodeMap modemap[] = { 
     82const CapturemodeMap modemap[] = { 
    8383  { MODE_VIDEO_STD,          2600  }, 
    8484  { MODE_VIDEO_COMPACT,      2602  }, 
  • trunk/platform/sx130is/shooting.c

    r1258 r1632  
    100100*/ 
    101101// Corrected for SX130 
    102 static const CapturemodeMap modemap[] = { 
     102const CapturemodeMap modemap[] = { 
    103103        { MODE_AUTO,               32768  }, 
    104104        { MODE_P,                  32772  },  
  • trunk/platform/sx150is/shooting.c

    r1598 r1632  
    100100*/ 
    101101// Corrected for SX150 
    102 static const CapturemodeMap modemap[] = { 
     102const CapturemodeMap modemap[] = { 
    103103        { MODE_AUTO,               32768  }, 
    104104        { MODE_P,                  32772  }, 
  • trunk/platform/sx20/shooting.c

    r1303 r1632  
    9393canon mode list FFB74378 in 100c 
    9494*/ 
    95 static const CapturemodeMap modemap[] = { 
     95const CapturemodeMap modemap[] = { 
    9696        { MODE_AUTO,               32768  }, 
    9797        { MODE_P,                  32772  }, 
  • trunk/platform/sx200is/shooting.c

    r880 r1632  
    9191canon mode list FFB6D0A4 in 100c 
    9292*/ 
    93 static const CapturemodeMap modemap[] = { 
     93const CapturemodeMap modemap[] = { 
    9494        { MODE_AUTO,               32768  }, 
    9595        { MODE_P,                  32772  }, 
  • trunk/platform/sx220hs/shooting.c

    r1305 r1632  
    8686}; 
    8787 
    88 static const CapturemodeMap modemap[] = { 
     88const CapturemodeMap modemap[] = { 
    8989        { MODE_AUTO,                    32768  }, 
    9090        { MODE_P,                           32772  }, 
     
    125125#include "../generic/shooting.c" 
    126126 
    127 // Override ISO settings (need to do this before exposure calc for ISO as well as after) 
    128 void __attribute__((naked,noinline)) shooting_expo_iso_override(void){ 
    129  asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    130  
    131     if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
    132     { 
    133         shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    134         // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override 
    135     } 
    136     else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1)) 
    137         shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW); 
    138     else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all)) 
    139         shooting_set_autoiso(shooting_get_iso_mode()); 
    140  
    141  asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    142 } 
    143  
    144127long get_file_next_counter() { 
    145128        return get_file_counter(); 
  • trunk/platform/sx230hs/shooting.c

    r1331 r1632  
    9494    Standard Definition: 640 x 480 (30 fps), 320 x 240 (30 fps) 
    9595*/ 
    96 static const CapturemodeMap modemap[] = { 
     96const CapturemodeMap modemap[] = { 
    9797    { MODE_AUTO                                 , 0x8000        }, 
    9898    { MODE_P                                    , 0x8004        }, // Called "camera manual" on many cameras without a true manual mode, only allows +/- Ev adjustment 
     
    132132#include "../generic/shooting.c" 
    133133 
    134         // Override ISO settings (need to do this before exposure calc for ISO, as well as after)  
    135          
    136         void __attribute__((naked,noinline)) shooting_expo_iso_override(void){  
    137          
    138                 asm volatile("STMFD   SP!, {R0-R12,LR}\n");  
    139                   
    140                 if ((state_kbd_script_run) && (photo_param_put_off.sv96))  
    141                         {  
    142                                 shooting_set_sv96(photo_param_put_off.sv96, SET_NOW);  
    143                                 // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override  
    144                         }  
    145                 else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1))  
    146                                 shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW);  
    147                 else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all))  
    148                                 shooting_set_autoiso(shooting_get_iso_mode());  
    149                   
    150                 asm volatile("LDMFD   SP!, {R0-R12,PC}\n");  
    151         }  
    152          
    153  
    154134long get_file_next_counter() { 
    155135        return get_file_counter(); 
  • trunk/platform/sx30/shooting.c

    r1273 r1632  
    9797*/ 
    9898// SX30 modelist table found @0xFFC67954 (firmware 1.00h) 
    99 static const CapturemodeMap modemap[] = { 
     99const CapturemodeMap modemap[] = { 
    100100        { MODE_M,                  32769  }, 
    101101        { MODE_TV,                 32771  }, 
     
    131131#include "../generic/shooting.c" 
    132132 
    133 // Override ISO settings (need to do this before exposure calc for ISO as well as after) 
    134 void __attribute__((naked,noinline)) shooting_expo_iso_override(void){ 
    135  asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    136  
    137     if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
    138     { 
    139         shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    140         // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override 
    141     } 
    142     else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1)) 
    143         shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW); 
    144     else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all)) 
    145         shooting_set_autoiso(shooting_get_iso_mode()); 
    146  
    147  asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    148 } 
    149  
    150133long get_file_next_counter() { 
    151134        return get_file_counter(); 
  • trunk/platform/sx40hs/shooting.c

    r1414 r1632  
    9696*/ 
    9797// SX40 modelist table found @0xff607d14 (firmware 1.00g) 
    98 static const CapturemodeMap modemap[] = { 
     98const CapturemodeMap modemap[] = { 
    9999        { MODE_M,                  32769  }, 
    100100        { MODE_TV,                 32771  }, 
     
    136136#include "../generic/shooting.c" 
    137137 
    138 // Override ISO settings (need to do this before exposure calc for ISO as well as after) 
    139 void __attribute__((naked,noinline)) shooting_expo_iso_override(void){ 
    140  asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    141  
    142     if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
    143     { 
    144         shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    145         // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override 
    146     } 
    147     else if ((conf.iso_override_value) && (conf.iso_override_koef) && !(conf.override_disable==1)) 
    148         shooting_set_iso_real(shooting_get_iso_override_value(), SET_NOW); 
    149     else if (conf.autoiso_enable && shooting_get_flash_mode()/*NOT FOR FLASH AUTO MODE*/ && !(conf.override_disable==1 && conf.override_disable_all)) 
    150         shooting_set_autoiso(shooting_get_iso_mode()); 
    151  
    152  asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
    153 } 
    154  
    155138long get_file_next_counter() { 
    156139        return get_file_counter(); 
  • trunk/platform/tx1/shooting.c

    r1276 r1632  
    9090canon mode list FFB68D28 in 100g 
    9191*/ 
    92 static const CapturemodeMap modemap[] = { 
     92const CapturemodeMap modemap[] = { 
    9393    { MODE_LONG_SHUTTER,       32774 }, // guessed 
    9494    { MODE_AUTO,               32768 }, 
Note: See TracChangeset for help on using the changeset viewer.