Changeset 933


Ignore:
Timestamp:
01/29/12 13:48:57 (2 years ago)
Author:
rudi_de
Message:

Aktualisierung auf Rev. 1561 internationaler Branch: Release-1.0
http://trac.assembla.com/chdk/changeset/1561/branches/release-1_0

Betrifft alle
+ Override-Entfernungen über 65m sind möglich (gültige MIN_DIST-, MAX_DIST-Werte in platform_camera.h sind erforderlich)
+ Unendlich-Information wird von der Kamera mit shooting_is_infinity_distance() abgefragt
+ MIN_DIST-, MAX_DIST-Werte für a590, a610, a720, ixus310, sx220, sx30, sx40, g12 hinzugefügt

  • Fehler beim Lesen der Override-Entfernung behoben
  • DOF-Rechner und Wertedarstellung überarbeitet
Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/gui.c

    r932 r933  
    263263static const char* gui_tv_override_value_enum(int change, int arg); 
    264264static const char* gui_tv_enum_type_enum(int change, int arg); 
    265 static const char* gui_subj_dist_override_value_enum(int change, int arg); 
    266 static const char* gui_subj_dist_override_koef_enum(int change, int arg); 
    267        const char* gui_user_menu_show_enum(int change, int arg); 
     265const char* gui_subj_dist_override_value_enum(int change, int arg); 
     266const char* gui_subj_dist_override_koef_enum(int change, int arg); 
     267const char* gui_user_menu_show_enum(int change, int arg); 
    268268static const char* gui_bad_pixel_enum(int change, int arg); 
    269269static const char* gui_video_af_key_enum(int change, int arg); 
     
    16091609 
    16101610const char* gui_subj_dist_override_value_enum(int change, int arg) { 
    1611     static const int koef[] = {0, 1,10,100,1000}; 
    1612     conf.subj_dist_override_value+=(change*koef[conf.subj_dist_override_koef]); 
    1613     if (conf.subj_dist_override_value<0) 
    1614         conf.subj_dist_override_value=MAX_DIST; 
    1615     else if (conf.subj_dist_override_value>MAX_DIST) 
    1616         conf.subj_dist_override_value=0; 
    1617     sprintf(buf, "%d", (int)conf.subj_dist_override_value); 
     1611        int koef = shooting_get_subject_distance_override_koef(); 
     1612    static char buf[9]; 
     1613    if (koef == -1) 
     1614    { 
     1615        // If 'Infinity' selected in the 'koef' setting then set SD to the infinity value 
     1616        // technically the same as MAX_DIST when it's sent to the firmware function  
     1617        // in the camera; but used here to alter the CHDK OSD display. 
     1618        conf.subj_dist_override_value = INFINITY_DIST; 
     1619    } 
     1620    else 
     1621    { 
     1622        // Increment / decrement the SD value, wrapping around from MIN_DIST to MAX_DIST 
     1623        conf.subj_dist_override_value += (change*koef); 
     1624        if (conf.subj_dist_override_value < MIN_DIST) 
     1625            conf.subj_dist_override_value = MAX_DIST; 
     1626        else if (conf.subj_dist_override_value > MAX_DIST) 
     1627            conf.subj_dist_override_value = MIN_DIST; 
     1628    } 
     1629    if (conf.subj_dist_override_value == INFINITY_DIST) 
     1630        strcpy(buf,"Inf."); 
     1631    else 
     1632        sprintf(buf, "%d", shooting_get_subject_distance_override_value()); 
    16181633    return buf;  
    16191634} 
    16201635 
    16211636const char* gui_subj_dist_override_koef_enum(int change, int arg) { 
    1622     return gui_change_simple_enum(&conf.subj_dist_override_koef,change,gui_override_koef_modes,sizeof(gui_override_koef_modes)/sizeof(gui_override_koef_modes[0])); 
     1637    // Define the adjustment factor values for the subject distance override 
     1638#if MAX_DIST > 1000000      // Superzoom - e.g. SX30, SX40 
     1639    static const char* modes[] = { "Off", "1", "10", "100", "1000", "10K", "100K", "1M", "Inf." }; 
     1640#elif MAX_DIST > 100000     // G12, IXUS310 
     1641    static const char* modes[] = { "Off", "1", "10", "100", "1000", "10K", "100K", "Inf." }; 
     1642#else                       // Original values (MAX_DIST = 65535) 
     1643    static const char* modes[] = { "Off", "1", "10", "100", "1000" }; 
     1644#endif 
     1645        const char *rv = gui_change_simple_enum(&conf.subj_dist_override_koef,change,modes,sizeof(modes)/sizeof(modes[0])); 
     1646    // If we've selected 'Infinity' focus then set the SD override value 
     1647    // Otherwise if we had previously selected 'Infinity' then reset back to MAX_DIST 
     1648    if (shooting_get_subject_distance_override_koef() == -1) 
     1649        conf.subj_dist_override_value = INFINITY_DIST; 
     1650    else if (conf.subj_dist_override_value == INFINITY_DIST) 
     1651        conf.subj_dist_override_value = MAX_DIST; 
     1652    return rv; 
    16231653} 
    16241654 
     
    20052035    gui_subj_dist_override_koef_enum(direction,0); 
    20062036#if !CAM_HAS_MANUAL_FOCUS 
    2007     if (conf.subj_dist_override_koef==0) conf.subj_dist_override_koef=1; 
     2037    if (conf.subj_dist_override_koef==0) gui_subj_dist_override_koef_enum(direction,0); 
    20082038#endif 
    20092039    shooting_set_focus(shooting_get_subject_distance_override_value(), SET_NOW); 
     
    20452075            shooting_set_focus(shooting_get_subject_distance_override_value(), SET_NOW); 
    20462076#else 
    2047             if (conf.subj_dist_override_koef==4) 
    2048                 gui_subj_dist_override_koef_enum(-3,0); 
    2049             else 
    2050                 gui_subj_dist_override_koef_enum(1,0); 
     2077            gui_subj_dist_override_koef_enum(1,0); 
    20512078#endif 
    20522079        } 
  • trunk/core/gui_osd.c

    r904 r933  
    864864 
    865865//------------------------------------------------------------------- 
    866 static void sprintf_dist(char *buf, float dist, int hyp_val) { 
     866static void print_dist(char *buf, float dist, short is_hyp) { 
    867867// length of printed string is always 4 
    868     int max=(hyp_val==1)?MAX_DIST_HYPER_FOCAL:MAX_DIST; 
    869     if (dist<=0 || dist>max) { 
     868    if (dist<=0 || (!(is_hyp) && shooting_is_infinity_distance())) { 
    870869        sprintf(buf, " inf"); 
    871870    } else if (dist<1000) { 
     
    878877        sprintf(buf, "%4d", (int)(dist/1000)); 
    879878    } 
     879} 
     880 
     881static void sprintf_dist(char *buf, float dist) 
     882{ 
     883    print_dist(buf, dist, 0); 
     884} 
     885 
     886static void sprintf_dist_hyp(char *buf, float dist) 
     887{ 
     888    print_dist(buf, dist, 1); 
    880889} 
    881890 
     
    917926    short f_ex = (conf.show_dof==DOF_SHOW_IN_DOF_EX); 
    918927    draw_string(conf.dof_pos.x, conf.dof_pos.y, "S/NL/FL:", conf.osd_color); 
    919     sprintf_dist(osd_buf, (float)dof_values.subject_distance, 0); 
     928    sprintf_dist(osd_buf, (float)dof_values.subject_distance); 
    920929    int j=strlen(osd_buf); 
    921930    draw_string(conf.dof_pos.x+i*FONT_WIDTH, conf.dof_pos.y, osd_buf, 
     
    923932    i=i+j; 
    924933    draw_string(conf.dof_pos.x+i*FONT_WIDTH, conf.dof_pos.y, "/", conf.osd_color); 
    925     sprintf_dist(osd_buf, (float)dof_values.near_limit, 0); 
     934    sprintf_dist(osd_buf, (float)dof_values.near_limit); 
    926935    j=strlen(osd_buf); 
    927936    draw_string(conf.dof_pos.x+(++i)*FONT_WIDTH, conf.dof_pos.y, osd_buf, 
     
    929938    i=i+j; 
    930939    draw_string(conf.dof_pos.x+i*FONT_WIDTH, conf.dof_pos.y, "/", conf.osd_color); 
    931     sprintf_dist(osd_buf, (float)dof_values.far_limit, 0); 
     940    sprintf_dist(osd_buf, (float)dof_values.far_limit); 
    932941    draw_string(conf.dof_pos.x+(++i)*FONT_WIDTH, conf.dof_pos.y, osd_buf, 
    933942      (f_ex && dof_values.distance_valid)?valid_col:conf.osd_color); 
    934943    i=8; 
    935944      draw_string(conf.dof_pos.x, conf.dof_pos.y+FONT_HEIGHT, "DOF/HYP:", conf.osd_color); 
    936     sprintf_dist(osd_buf, (float)dof_values.depth_of_field, 0); 
     945    sprintf_dist(osd_buf, (float)dof_values.depth_of_field); 
    937946    j=strlen(osd_buf); 
    938947    draw_string(conf.dof_pos.x+i*FONT_WIDTH, conf.dof_pos.y+FONT_HEIGHT, osd_buf, 
     
    940949    i=i+j; 
    941950    draw_string(conf.dof_pos.x+i*FONT_WIDTH, conf.dof_pos.y+FONT_HEIGHT, "/", conf.osd_color); 
    942     sprintf_dist(osd_buf, (float)dof_values.hyperfocal_distance, 1); 
     951    sprintf_dist_hyp(osd_buf, (float)dof_values.hyperfocal_distance); 
    943952    draw_string(conf.dof_pos.x+(++i)*FONT_WIDTH, conf.dof_pos.y+FONT_HEIGHT, osd_buf, 
    944953      (f_ex && dof_values.hyperfocal_valid)?valid_col:conf.osd_color); 
     
    10151024*/ 
    10161025 
    1017 void gui_print_osd_dof_string_dist(const char * title, int value, short use_good_color, int hyp_val) { 
     1026void gui_print_osd_dof_string_dist(const char * title, int value, short use_good_color, short is_hyp) { 
    10181027  strcpy(osd_buf, title); 
    10191028  int i=strlen(osd_buf); 
    10201029  if (i<8) { 
    10211030    draw_string(conf.values_pos.x, conf.values_pos.y+m, osd_buf, conf.osd_color); 
    1022     sprintf_dist(osd_buf, (float)value, hyp_val); 
     1031    if (is_hyp) { 
     1032        sprintf_dist_hyp(osd_buf, (float)value); 
     1033    } else { 
     1034        sprintf_dist(osd_buf, (float)value); 
     1035    } 
    10231036    sprintf(osd_buf+strlen(osd_buf), "%9s", ""); 
    10241037    osd_buf[9-i]=0; 
     
    11151128    if ((conf.autoiso_enable && shooting_get_iso_mode()<=0 && !(m==MODE_M || m==MODE_TV) && shooting_get_flash_mode() && (!(conf.override_disable==1 && conf.override_disable_all))) || gui_mode==GUI_MODE_OSD) 
    11161129        gui_print_osd_state_string_chr("AUTOISO:", ((conf.autoiso_enable==1)?"ON":"OFF")); 
    1117     if ((conf.subj_dist_override_value && conf.subj_dist_override_koef && shooting_can_focus() && !(conf.override_disable==1)) || ((gui_mode==GUI_MODE_ALT) && shooting_get_common_focus_mode())    || gui_mode==GUI_MODE_OSD)   { 
    1118         gui_print_osd_state_string_int("SD:",shooting_get_subject_distance_override_value()); 
     1130    if ((conf.subj_dist_override_value && conf.subj_dist_override_koef && shooting_can_focus() && !(conf.override_disable==1)) || ((gui_get_mode()==GUI_MODE_ALT) && shooting_get_common_focus_mode())  || gui_mode==GUI_MODE_OSD)   { 
     1131        extern const char* gui_subj_dist_override_value_enum(int change, int arg); 
     1132        extern const char* gui_subj_dist_override_koef_enum(int change, int arg); 
     1133        gui_print_osd_state_string_chr("SD:",gui_subj_dist_override_value_enum(0,0)); 
    11191134        if (gui_mode==GUI_MODE_ALT) 
    1120           gui_print_osd_state_string_int("FACTOR:",shooting_get_subject_distance_override_koef()); 
     1135                  gui_print_osd_state_string_chr("FACTOR:",gui_subj_dist_override_koef_enum(0,0)); 
    11211136      } 
    11221137    if ((conf.iso_override_value && conf.iso_override_koef && !(conf.override_disable==1))   || gui_mode==GUI_MODE_OSD) 
  • trunk/core/luascript.c

    r899 r933  
    623623    else shooting_set_focus(to, SET_LATER); 
    624624#else 
    625     if (mode_video) shooting_set_focus(to, SET_NOW); 
     625    if (shooting_get_common_focus_mode() || mode_video) shooting_set_focus(to, SET_NOW); 
    626626    else shooting_set_focus(to, SET_LATER);     
    627627#endif     
  • trunk/include/camera.h

    r932 r933  
    187187    #undef OVEREXP_COMPENSATE_OVERALL           // Define this to make overexposure_compensation work for all scenes, instead of day-light only 
    188188 
     189    #define CAMERA_MIN_DIST         0           // Define min distance that can be set in _MoveFocusLensToDistance (allow override - e.g. G12 min dist = 1) 
     190    #define CAMERA_MAX_DIST         65535       // Define max distance that can be set in _MoveFocusLensToDistance (allow override for superzooms - SX30/SX40) 
     191 
    189192//---------------------------------------------------------- 
    190193// Overridden values for each camera 
  • trunk/include/platform.h

    r932 r933  
    3333#endif 
    3434 
    35  
    36 #define MAX_DIST 65535 
    37 #define MAX_DIST_HYPER_FOCAL 999999 
     35#define MIN_DIST                    CAMERA_MIN_DIST     // Defined in camera.h (can be overridden in platform_camera.h) 
     36#define MAX_DIST                    CAMERA_MAX_DIST     // Defined in camera.h (can be overridden in platform_camera.h) 
     37#define INFINITY_DIST               0xFFFFFFFF          // Value to send to firmware to select 'infinity' focus 
    3838 
    3939//******************** 
     
    360360short shooting_can_focus(); 
    361361short shooting_get_common_focus_mode(); 
     362short shooting_is_infinity_distance(); 
    362363/******************************************************************/ 
    363364int shooting_get_iso_mode(); 
  • trunk/platform/a590/platform_camera.h

    r920 r933  
    5757    #define CAM_MULTIPART                   1 
    5858    #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1       // enable fix for camera crash at startup when opening the conf / font files see http://chdk.setepontos.com/index.php?topic=6179.0 
     59    #undef  CAMERA_MIN_DIST 
     60    #define CAMERA_MIN_DIST                 100     // Override min subject distance 
     61    #undef  CAMERA_MAX_DIST 
     62    #define CAMERA_MAX_DIST                 52855   // Override max subject distance 
    5963//---------------------------------------------------------- 
    6064 
  • trunk/platform/a610/platform_camera.h

    r859 r933  
    5555 
    5656    #define DNG_EXT_FROM                    ".DPS" 
     57    #undef  CAMERA_MIN_DIST 
     58    #define CAMERA_MIN_DIST                 62      // Override min subject distance 
     59    #undef  CAMERA_MAX_DIST 
     60    #define CAMERA_MAX_DIST                 43517   // Override max subject distance 
    5761//---------------------------------------------------------- 
    5862 
  • trunk/platform/a720/platform_camera.h

    r859 r933  
    5656 
    5757    #define DNG_EXT_FROM                    ".CR2" 
     58     
     59    #undef  CAMERA_MIN_DIST 
     60    #define CAMERA_MIN_DIST                 59      // Override min subject distance 
     61    #undef  CAMERA_MAX_DIST 
     62    #define CAMERA_MAX_DIST                 58686   // Override max subject distance 
    5863//---------------------------------------------------------- 
    5964 
  • trunk/platform/g12/platform_camera.h

    r920 r933  
    115115    #define CHDK_COLOR_BASE                 0xB3// Start color index for CHDK colors loaded into camera palette. 
    116116 
     117    #undef  CAMERA_MIN_DIST 
     118    #define CAMERA_MIN_DIST                 68      // Override min subject distance 
     119    #undef  CAMERA_MAX_DIST 
     120    #define CAMERA_MAX_DIST                 258065  // Override max subject distance 
    117121//---------------------------------------------------------- 
  • trunk/platform/generic/shooting.c

    r932 r933  
    449449int shooting_get_near_limit_f(int s, int av, int fl) 
    450450{ 
     451  if (shooting_is_infinity_distance()) return (-1); 
    451452  int h_1e3 = shooting_get_hyperfocal_distance_1e3_f(av, fl); 
    452   int m = ((h_1e3 - fl)+500)/1000*s; 
    453   int v = ((h_1e3 + 1000*s - 2*fl)+500)/1000; 
    454   if ((m>0) && (v>0)) return ((2*m/v+1)/2); 
     453  double m = ((double)(h_1e3 - fl)+500)/1000*s; 
     454  int v = ((h_1e3 - 2*fl + 1000*s)+500)/1000; 
     455  if ((m>0) && (v>0)) return (int)((2*m/v+1)/2); 
    455456  else return (-1); 
    456457} 
     
    458459int shooting_get_far_limit_f(int s, int av, int fl) 
    459460{ 
    460   if (s>MAX_DIST) return (-1); 
     461  if (shooting_is_infinity_distance()) return (-1); 
    461462  int h_1e3 = shooting_get_hyperfocal_distance_1e3_f(av, fl); 
    462   int m = ((h_1e3 - fl)+500)/1000*s; 
     463  double m = ((double)(h_1e3 - fl)+500)/1000*s; 
    463464  int v = ((h_1e3 - 1000*s)+500)/1000; 
    464   if ((m>0) && (v>0)) return ((2*m/v+1)/2); 
     465  if ((m>0) && (v>0)) return (int)((2*m/v+1)/2); 
    465466  else return (-1);  
     467} 
     468 
     469short shooting_is_infinity_distance() 
     470{ 
     471  return (shooting_get_lens_to_focal_plane_width() == 0)?1:0; 
    466472} 
    467473 
     
    511517  m = mode_get()&MODE_SHOOTING_MASK; 
    512518  if ((m==MODE_M || m==MODE_AV) && (av96>0) && !f_focus_ok) {  
    513     if (av96<min_av96_zoom_point) { av96 = min_av96_zoom_point; } 
    514   } else av96 = (abs(curr_av96-prop_av96)<2)?prop_av96:curr_av96; 
     519    if (av96 < min_av96_zoom_point) av96 = min_av96_zoom_point; 
     520  } 
     521  else av96 = (abs(curr_av96-prop_av96)<2)?prop_av96:curr_av96; 
    515522 
    516523  av_1e3 = shooting_get_aperture_from_av96_1e3(av96); 
     
    532539      if (v>0) { 
    533540        int m = ((fl*((fl - hyp_1e3)/1000 - 1)/500)/v + 1)/2; 
    534         int m2 = ((hyp*((2*fl - hyp_1e3)/500))/v + 1)/2; 
     541        int m2 = (int)((((double)hyp*(2*fl - hyp_1e3)/1000))/v + 0.5); 
    535542        dof_values.min_stack_distance = sqrt(m*m - m2) - m; 
    536543      }   
     
    545552    dof_values.far_limit = -1; 
    546553    dof_values.depth_of_field = -1; 
    547     if ((av_1e3>0) && (fl>0) && (dist>0) && (dist<MAX_DIST) && (hyp_1e3>0)) { 
    548       double m = (((double)hyp_1e3 - fl)/1000*dist)+0.5; 
    549         if (conf.dof_subj_dist_as_near_limit) {  
    550           dof_values.near_limit = dist; 
    551         } else { 
    552         double v = (((double)hyp_1e3 + 1000*dist - 2*fl)/1000)+0.5; 
    553             if (v>0) { dof_values.near_limit = (int)m/v; } 
     554    if ((av_1e3>0) && (fl>0) && (dist>0) && (shooting_is_infinity_distance()==0) && (hyp_1e3>0)) { 
     555      double m = ((double)(hyp_1e3 - fl)/1000 * dist) + 0.5; 
     556      if (conf.dof_subj_dist_as_near_limit) {  
     557         dof_values.near_limit = dist; 
     558      } else { 
     559        int v = ((((hyp_1e3 - 2*fl + 1000*dist)/500) + 1)/2); 
     560            if (v>0) dof_values.near_limit = (int)(m/v); 
    554561          } 
    555           if (dof_values.near_limit>=MAX_DIST) { dof_values.near_limit = -1;} 
    556       double v = (((double)hyp_1e3 - 1000*dist)/1000)+0.5; 
    557       if (v>0) { dof_values.far_limit = (int)m/v; } 
    558           if (dof_values.far_limit>=MAX_DIST) { dof_values.far_limit = -1;} 
     562      int v = ((((hyp_1e3 - 1000*dist)/500) + 1)/2); 
     563      if (v>0) dof_values.far_limit = (int)(m/v); 
    559564      if ((dof_values.near_limit>0) && (dof_values.far_limit>0)) { 
    560         dof_values.depth_of_field = dof_values.far_limit - dof_values.near_limit; } 
     565        dof_values.depth_of_field = dof_values.far_limit - dof_values.near_limit; 
     566      } 
    561567    } 
    562568  } 
     
    835841    return 1; 
    836842 #endif 
    837   return (shooting_get_focus_mode() || MODE_IS_VIDEO(m)); 
     843  return (shooting_get_common_focus_mode() || MODE_IS_VIDEO(m)); 
    838844#elif !CAM_CAN_SD_OVERRIDE 
    839845  return MODE_IS_VIDEO(m); 
     
    10551061 
    10561062void shooting_set_focus(int v, short is_now) { 
    1057         int s=v; 
    1058   if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
    1059           if ((is_now) && shooting_can_focus()) { 
    1060           if (conf.dof_subj_dist_as_near_limit) { 
    1061         s=shooting_get_near_limit_f(v,shooting_get_min_real_aperture(),get_focal_length(lens_get_zoom_point())); 
    1062             }      
    1063             if (!conf.dof_use_exif_subj_dist) s+=shooting_get_lens_to_focal_plane_width(); 
    1064       if (s>0) lens_set_focus_pos((s<MAX_DIST)?s:MAX_DIST);  
    1065           } 
    1066           else photo_param_put_off.subj_dist=v; 
    1067   } 
     1063    int s=v; 
     1064    if ((mode_get()&MODE_MASK) != MODE_PLAY){ 
     1065        if ((is_now) && shooting_can_focus()) { 
     1066            if (conf.dof_subj_dist_as_near_limit) { 
     1067                s=shooting_get_near_limit_f(v,shooting_get_min_real_aperture(),get_focal_length(lens_get_zoom_point())); 
     1068            } 
     1069            if (!conf.dof_use_exif_subj_dist) s+=shooting_get_lens_to_focal_plane_width(); 
     1070            lens_set_focus_pos(s);  
     1071        } 
     1072        else photo_param_put_off.subj_dist=v; 
     1073    } 
    10681074} 
    10691075 
     
    12651271int shooting_get_subject_distance_override_value() 
    12661272{ 
    1267   return conf.subj_dist_override_value; 
     1273  return (conf.subj_dist_override_value < shooting_get_lens_to_focal_plane_width()?0:(conf.subj_dist_override_value - shooting_get_lens_to_focal_plane_width())); 
    12681274} 
    12691275 
     
    12751281int shooting_get_subject_distance_override_koef() 
    12761282{ 
    1277   static const short koef[] = {0, 1,10,100,1000}; 
     1283    // Define the adjustment factor values for the subject distance override 
     1284#if MAX_DIST > 1000000      // Superzoom - e.g. SX30, SX40 
     1285  static const int koef[] = {0,1,10,100,1000,10000,100000,1000000,-1}; 
     1286#elif MAX_DIST > 100000     // G12, IXUS310 
     1287  static const int koef[] = {0,1,10,100,1000,10000,100000,-1}; 
     1288#else                       // Original values (MAX_DIST = 65535) 
     1289  static const int koef[] = {0,1,10,100,1000}; 
     1290#endif 
    12781291  return koef[(conf.subj_dist_override_koef)]; 
    1279  
    12801292} 
    12811293 
  • trunk/platform/generic/wrappers.c

    r930 r933  
    224224void lens_set_focus_pos(long newpos) 
    225225{ 
     226    if (newpos >= MAX_DIST) newpos = INFINITY_DIST; // Set to infinity value that will work on all cameras 
    226227    _MoveFocusLensToDistance((short*)&newpos); 
    227     //while (focus_busy); 
    228     while ((shooting_is_flash_ready()!=1) || (focus_busy)); 
     228    while ((shooting_is_flash_ready()!=1) || (focus_busy)) msleep(10); 
    229229    newpos = _GetFocusLensSubjectDistance(); 
    230230    _SetPropertyCase(PROPCASE_SUBJECT_DIST1, &newpos, sizeof(newpos)); 
  • trunk/platform/ixus310_elph500hs/kbd.c

    r898 r933  
    345345#endif 
    346346    { 3, KEY_DISPLAY        , 0x00000008, LB(0,4), 0, "Back",  0,    GUI_MODE_MENU,      GUI_MODE_MENU, MODE_REC|MODE_PLAY }, 
    347         { 3, KEY_DISPLAY            , 0x00000008, LB(0,4), 0, "Disp",  0,    GUI_MODE_PALETTE,   100,           MODE_REC|MODE_PLAY }, 
    348     { 3, KEY_UP                     , 0x00000010, RB(0,1), 0, "Up",    0,    GUI_MODE_ALT,       100,           MODE_REC|MODE_PLAY }, 
    349         { 3, KEY_LEFT               , 0x00000020, RB(0,2), 0, "Left",  0,    GUI_MODE_ALT,       100,           MODE_REC|MODE_PLAY }, 
    350     { 3, KEY_RIGHT                  , 0x00000040, RB(0,3), 0, "Right", 0,    GUI_MODE_ALT,       100,           MODE_REC|MODE_PLAY }, 
    351         { 3, KEY_DOWN               , 0x00000080, RB(0,4), 0, "Down",  0,    GUI_MODE_ALT,       100,           MODE_REC|MODE_PLAY }, 
     347    { 3, KEY_DISPLAY        , 0x00000008, LB(0,4), 0, "Disp",  0,    GUI_MODE_MENU+1,    100,           MODE_REC|MODE_PLAY }, 
     348    { 3, KEY_UP             , 0x00000010, RB(0,1), 0, "Up",    0,    GUI_MODE_MENU,      100,           MODE_REC|MODE_PLAY }, 
     349    { 3, KEY_LEFT           , 0x00000020, RB(0,2), 0, "Left",  0,    GUI_MODE_MENU,      100,           MODE_REC|MODE_PLAY }, 
     350    { 3, KEY_RIGHT          , 0x00000040, RB(0,3), 0, "Right", 0,    GUI_MODE_MENU,      100,           MODE_REC|MODE_PLAY }, 
     351    { 3, KEY_DOWN           , 0x00000080, RB(0,4), 0, "Down",  0,    GUI_MODE_MENU,      100,           MODE_REC|MODE_PLAY }, 
    352352 
    353353    { 3, KEY_UP                     , 0x00000010, RB(0,0), 0, "Man",   "Focus",  GUI_MODE_ALT, GUI_MODE_ALT, MODE_REC, &conf.subj_dist_override_koef, 0, &conf.touchscreen_disable_shortcut_controls }, 
    354         { 3, KEY_DISPLAY            , 0x00000008, RB(0,1), 0, "Inf.",  "Focus",  GUI_MODE_ALT, GUI_MODE_ALT, MODE_REC, 0, 0, &conf.touchscreen_disable_shortcut_controls }, 
    355         { 3, KEY_DOWN               , 0x00000080, RB(0,2), 0, "Hyper", "Focus",  GUI_MODE_ALT, GUI_MODE_ALT, MODE_REC, 0, 0, &conf.touchscreen_disable_shortcut_controls }, 
     354    { 3, KEY_DISPLAY        , 0x00000008, RB(0,1), 0, "Max",   "Dist",   GUI_MODE_ALT, GUI_MODE_ALT, MODE_REC, 0, 0, &conf.touchscreen_disable_shortcut_controls }, 
     355    { 3, KEY_DOWN           , 0x00000080, RB(0,2), 0, "Hyper", "Dist",   GUI_MODE_ALT, GUI_MODE_ALT, MODE_REC, 0, 0, &conf.touchscreen_disable_shortcut_controls }, 
    356356        { 3, KEY_LEFT               , 0x00000020, RB(0,3), 0, "- Foc.","Factor", GUI_MODE_ALT, GUI_MODE_ALT, MODE_REC, 0, 0, &conf.touchscreen_disable_shortcut_controls }, 
    357357    { 3, KEY_RIGHT                  , 0x00000040, RB(0,4), 0, "+ Foc.","Factor", GUI_MODE_ALT, GUI_MODE_ALT, MODE_REC, 0, 0, &conf.touchscreen_disable_shortcut_controls }, 
  • trunk/platform/ixus310_elph500hs/platform_camera.h

    r920 r933  
    132132    #define CHDK_COLOR_BASE                 0xA2  // Start color index for CHDK colors loaded into camera palette. 
    133133 
     134    #undef  CAMERA_MIN_DIST 
     135    #define CAMERA_MIN_DIST                 71      // Override min subject distance 
     136    #undef  CAMERA_MAX_DIST 
     137    #define CAMERA_MAX_DIST                 125392  // Override max subject distance 
    134138//---------------------------------------------------------- 
    135139 
  • trunk/platform/sx220hs/platform_camera.h

    r859 r933  
    9999     
    100100    #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 
     101 
     102    #undef  CAMERA_MIN_DIST 
     103    #define CAMERA_MIN_DIST                 99      // Override min subject distance 
     104    #undef  CAMERA_MAX_DIST 
     105    #define CAMERA_MAX_DIST                 2000000 // Override max subject distance 1739131 //testscript=1098902 
    101106//---------------------------------------------------------- 
  • trunk/platform/sx230hs/platform_camera.h

    r932 r933  
    9898     
    9999    #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 
     100 
     101    #undef  CAMERA_MIN_DIST 
     102    #define CAMERA_MIN_DIST                 99     // Override min subject distance 
    100103     
    101104    #define CAM_HAS_GPS                     1 
  • trunk/platform/sx30/platform_camera.h

    r920 r933  
    117117    #define CAM_NEED_SET_ZOOM_DELAY         300 // SX30 needs a short delay after setting the zoom before resetting focus in shooting_set_zoom() 
    118118 
     119    #undef  CAMERA_MIN_DIST 
     120    #define CAMERA_MIN_DIST                 95      // Override min subject distance 
     121    #undef  CAMERA_MAX_DIST 
     122    #define CAMERA_MAX_DIST                 9090910 // Override max subject distance 
     123 
    119124//---------------------------------------------------------- 
    120125 
  • trunk/platform/sx40hs/platform_camera.h

    r920 r933  
    124124 
    125125    #define CAM_HAS_CMOS                        1 
     126 
     127    #undef  CAMERA_MIN_DIST 
     128    #define CAMERA_MIN_DIST                     95      // Override min subject distance 
     129    #undef  CAMERA_MAX_DIST 
     130    #define CAMERA_MAX_DIST                     9523810 // Override max subject distance 
    126131//---------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.