Changeset 2483


Ignore:
Timestamp:
01/13/13 07:26:35 (16 months ago)
Author:
philmoz
Message:

Some more code and header file cleanup.

Location:
trunk
Files:
1 added
79 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/action_stack.c

    r2462 r2483  
    335335        action_pop_func(); 
    336336        if (libscriptapi) 
    337             libscriptapi->set_as_ret((state_shooting_progress == SHOOTING_PROGRESS_NONE) ? 0 : 1); 
     337            libscriptapi->set_as_ret((camera_info.state.state_shooting_progress == SHOOTING_PROGRESS_NONE) ? 0 : 1); 
    338338    } 
    339339} 
     
    355355    action_pop_func(); 
    356356 
    357     state_shooting_progress = SHOOTING_PROGRESS_NONE; 
     357    camera_info.state.state_shooting_progress = SHOOTING_PROGRESS_NONE; 
    358358 
    359359    // XXX FIXME find out how to wait to jpeg save finished 
  • trunk/core/camera_info.c

    r2453 r2483  
    219219 
    220220//========================================================== 
     221 
     222/* 
     223note, from tools/link-boot.ld 
     224    link_text_start = _start 
     225    link_data_start = link_text_end 
     226    link_bss_start = link_data_end 
     227    link_bss_end = _end 
     228*/ 
     229extern long link_text_start; 
     230extern long link_data_start; 
     231extern long link_bss_start; 
     232extern long link_bss_end; 
     233 
     234// Initialise any camera_info values that need to be set at 
     235// startup 
     236void camera_info_init() 
     237{ 
     238    camera_info.memisosize = MEMISOSIZE; 
     239    camera_info.text_start = (int)&link_text_start; 
     240    camera_info.data_start = (int)&link_data_start; 
     241    camera_info.bss_start = (int)&link_bss_start; 
     242    camera_info.bss_end = (int)&link_bss_end; 
     243} 
     244 
     245//========================================================== 
  • trunk/core/conf.c

    r2462 r2483  
    11#include "platform.h" 
    2 #include "keyboard.h" 
    32#include "conf.h" 
    43#include "histogram.h" 
     
    1312#include "gui_user_menu.h" 
    1413#include "core.h" 
    15 #include "stdlib.h" 
    16 #include "script.h" 
    17  
    1814 
    1915//------------------------------------------------------------------- 
     
    2319//------------------------------------------------------------------- 
    2420Conf conf = { MAKE_API_VERSION(2,2) }; 
    25  
    26 int state_shooting_progress = SHOOTING_PROGRESS_NONE; 
    27 int state_save_raw_nth_only; 
    2821 
    2922// reyalp: putting these in conf, since the conf values are lookups for them 
     
    537530    if(conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALWAYS  
    538531        || (conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALT && gui_get_mode() != GUI_MODE_NONE) 
    539         || (conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALT_SCRIPT && state_kbd_script_run)) { 
     532        || (conf.alt_prevent_shutdown == ALT_PREVENT_SHUTDOWN_ALT_SCRIPT && camera_info.state.state_kbd_script_run)) { 
    540533        disable_shutdown(); 
    541534    } else { 
  • trunk/core/gui.c

    r2462 r2483  
    11#include "platform.h" 
    2 #include "stdlib.h" 
    3 #include "core.h" 
    4 #include "keyboard.h" 
    52#include "touchscreen.h" 
    63#include "conf.h" 
     
    85#include "lang.h" 
    96#include "fileutil.h" 
    10 #include "gui.h" 
    117#include "gui_lang.h" 
    128#include "gui_draw.h" 
     
    1915#include "modules.h" 
    2016#include "levent.h" 
    21 #include "script.h" 
    2217#ifdef CAM_HAS_GPS 
    2318#include "gps.h" 
     
    20962091static void gui_draw_alt_helper() 
    20972092{ 
    2098     if ((state_kbd_script_run != 0) || (console_displayed != 0)) 
     2093    if ((camera_info.state.state_kbd_script_run != 0) || (console_displayed != 0)) 
    20992094    { 
    21002095        if (gui_helper_displayat <= get_tick_count()) 
     
    25522547                extern gui_handler scriptGuiHandler; 
    25532548         
    2554             if (state_kbd_script_run) 
     2549            if (camera_info.state.state_kbd_script_run) 
    25552550                gui_set_mode(&scriptGuiHandler); 
    25562551                else 
     
    25652560        // <ALT> mode when the script was running. 
    25662561            gui_user_menu_flag = 0; 
    2567             if ((conf.user_menu_enable == 2) && !state_kbd_script_run) { 
     2562            if ((conf.user_menu_enable == 2) && !camera_info.state.state_kbd_script_run) { 
    25682563                    gui_menu_init(&user_submenu); 
    25692564                    gui_set_mode(&menuGuiHandler); 
  • trunk/core/gui_osd.c

    r2462 r2483  
    11561156 
    11571157        if (conf.debug_display == DEBUG_DISPLAY_PARAMS){ 
    1158             extern long* FlashParamsTable[];  
    11591158            char s[30]; 
    11601159            int count; 
     
    11661165                    sprintf(osd_buf, "%3d: This parameter does not exists", p); 
    11671166                } else  { 
    1168                     len=FlashParamsTable[p][1]>>16; 
     1167                    len = get_parameter_size(p); 
    11691168                    if ((len==1)||(len==2)||(len==4)){ 
    11701169                        get_parameter_data(p, &r, len);  
     
    12401239                libgrids->gui_grid_draw_osd(1); 
    12411240 
    1242         if ((((camera_info.state.is_shutter_half_press || state_kbd_script_run || shooting_get_common_focus_mode()) && 
     1241        if ((((camera_info.state.is_shutter_half_press || camera_info.state.state_kbd_script_run || shooting_get_common_focus_mode()) && 
    12431242              (mode_photo || (m&MODE_SHOOTING_MASK)==MODE_STITCH)) || 
    12441243             ((mode_video || is_video_recording()) && conf.show_values_in_video))) 
     
    13451344    if (camera_info.state.is_shutter_half_press && ((m&MODE_MASK)==MODE_REC) && ((m&MODE_SHOOTING_MASK))!=MODE_VIDEO_STD && (m&MODE_SHOOTING_MASK)!=MODE_VIDEO_COMPACT) 
    13461345    { 
     1346        extern char* shooting_get_tv_str(); 
     1347        extern char* shooting_get_av_str(); 
     1348 
    13471349        strcpy(osd_buf,shooting_get_tv_str()); 
    13481350        strcat(osd_buf,"\"  F"); 
  • trunk/core/live_view.c

    r2453 r2483  
    33#include "conf.h" 
    44#include "viewport.h" 
    5 #include "ptp.h" 
     5#include "ptp_chdk.h" 
    66#include "live_view.h" 
    77 
  • trunk/core/live_view.h

    r2480 r2483  
    9797} lv_data_header; 
    9898 
    99 #ifndef CHDK_PTP_PROTOCOL_ONLY 
    100 extern int live_view_get_data(ptp_data *data, int flags); 
    101 #endif 
    102  
    10399#endif // __LIVE_VIEW_H 
  • trunk/core/main.c

    r2462 r2483  
    88#include "raw.h" 
    99#include "console.h" 
    10 #include "ptp.h" 
    1110#include "modules.h" 
    12  
    1311#include "module_load.h" 
    1412 
     
    7674} 
    7775 
    78 /* 
    79 note, from tools/link-boot.ld 
    80     link_text_start = _start 
    81     link_data_start = link_text_end 
    82     link_bss_start = link_data_end 
    83     link_bss_end = _end 
    84 */ 
    85 extern long link_text_start; 
    86 extern long link_data_start; 
    87 extern long link_bss_start; 
    88 extern long link_bss_end; 
    89  
    9076// remote autostart 
    9177void script_autostart() 
     
    10793 
    10894    // Init camera_info bits that can't be done statically 
    109     camera_info.memisosize = MEMISOSIZE; 
    110     camera_info.text_start = (int)&link_text_start; 
    111     camera_info.data_start = (int)&link_data_start; 
    112     camera_info.bss_start = (int)&link_bss_start; 
    113     camera_info.bss_end = (int)&link_bss_end; 
     95    camera_info_init(); 
    11496 
    11597    raw_need_postprocess = 0; 
     
    123105 
    124106#ifdef CAM_CHDK_PTP 
     107    extern void init_chdk_ptp_task(); 
    125108    init_chdk_ptp_task(); 
    126109#endif 
     
    193176 
    194177#ifdef  CAM_LOAD_CUSTOM_COLORS 
     178        // Color palette function 
     179        extern void load_chdk_palette(); 
    195180        load_chdk_palette(); 
    196181#endif 
     
    208193        } 
    209194 
    210         if ((state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) || recreview_hold) 
     195        if ((camera_info.state.state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) || recreview_hold) 
    211196        { 
    212197            if (((cnt++) & 3) == 0) 
     
    214199        } 
    215200 
    216         if (state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) 
     201        if (camera_info.state.state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) 
    217202        { 
    218203            if (conf.show_histo) 
     
    237222        } 
    238223 
    239         if ((state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) && (!shooting_in_progress())) 
    240         { 
    241             state_shooting_progress = SHOOTING_PROGRESS_DONE; 
     224        if ((camera_info.state.state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) && (!shooting_in_progress())) 
     225        { 
     226            camera_info.state.state_shooting_progress = SHOOTING_PROGRESS_DONE; 
    242227            if (raw_need_postprocess) raw_postprocess(); 
    243228        } 
  • trunk/core/ptp.c

    r2453 r2483  
    33#include "stdlib.h" 
    44#include "keyboard.h" 
    5 #include "ptp.h" 
     5#include "ptp_chdk.h" 
    66#include "core.h" 
    77#include "task.h" 
     
    99#include "action_stack.h" 
    1010#include "live_view.h" 
     11#include "meminfo.h" 
    1112#include "modules.h" 
    1213 
     
    630631 
    631632    case PTP_CHDK_GetDisplayData: 
    632         ptp.num_param = 1; 
    633         ptp.param1 = live_view_get_data(data,param2); 
    634         if(!ptp.param1) { 
    635             ptp.code = PTP_RC_GeneralError; 
    636             // send dummy data, otherwise error hoses connection 
    637             send_ptp_data(data,"\0",1); 
     633        { 
     634            extern int live_view_get_data(ptp_data *data, int flags); 
     635 
     636            ptp.num_param = 1; 
     637            ptp.param1 = live_view_get_data(data,param2); 
     638            if(!ptp.param1) 
     639            { 
     640                ptp.code = PTP_RC_GeneralError; 
     641                // send dummy data, otherwise error hoses connection 
     642                send_ptp_data(data,"\0",1); 
     643            } 
    638644        } 
    639645        break; 
  • trunk/core/ptp.h

    r2480 r2483  
    22#define __CHDK_PTP_H 
    33 
    4 // CHDK PTP interface 
     4// CHDK PTP protocol interface (can also be used in client PTP progams) 
    55 
    66// Note: used in modules and platform independent code.  
     
    2323 
    2424#define PTP_OC_CHDK 0x9999 
    25  
    26 // PTP constants - only need to be defined in CHDK, not PC side 
    27 #ifndef PTP_RC_OK 
    28 #define PTP_RC_OK 0x2001 
    29 #define PTP_RC_GeneralError 0x2002 
    30 #define PTP_RC_ParameterNotSupported 0x2006 
    31 #define PTP_RC_InvalidParameter 0x201D 
    32 #endif 
    3325 
    3426// N.B.: unused parameters should be set to 0 
     
    138130}; 
    139131 
    140 #ifndef CHDK_PTP_PROTOCOL_ONLY 
    141 typedef struct { 
    142     int code; 
    143     int sess_id; 
    144     int trans_id; 
    145     int num_param; 
    146     int param1; 
    147     int param2; 
    148     int param3; 
    149     int param4; 
    150     int param5; 
    151 } PTPContainer; 
    152  
    153 typedef struct { 
    154     int handle; 
    155     int (*send_data)(int handle, const char *buf, int part_size, int total_size, int, int, int); // (0xFF9F525C), total_size should be 0 except for the first call 
    156     int (*recv_data)(int handle, char *buf, int size, int, int); // (0xFF9F5500) 
    157     int (*send_resp)(int handle, PTPContainer *resp); // (0xFF9F5688) 
    158     int (*get_data_size)(int handle); // (0xFF9F5830) 
    159     int (*send_err_resp)(int handle, PTPContainer *resp); // (0xFF9F5784) 
    160     int unknown1; // ??? 
    161     int (*f2)(); // ??? (0xFF8D5B24) 
    162     int (*f3)(); // ??? (0xFF8D5B5C) 
    163     // more?? 
    164 } ptp_data; 
    165  
    166 typedef int (*ptp_handler)(int, ptp_data*, int, int, int, int, int, int, int, int); 
    167  
    168 int add_ptp_handler(int opcode, ptp_handler handler, int unknown); 
    169  
    170 void init_chdk_ptp_task(); 
    171  
    172 typedef struct { 
    173     unsigned size; 
    174     unsigned script_id; // id of script message is to/from  
    175     unsigned type; 
    176     unsigned subtype; 
    177     char data[]; 
    178 } ptp_script_msg; 
    179 int ptp_script_write_msg(ptp_script_msg *msg); 
    180 ptp_script_msg* ptp_script_read_msg(void); 
    181 ptp_script_msg* ptp_script_create_msg(unsigned type, unsigned subtype, unsigned datasize, const void *data); 
    182 int ptp_script_write_error_msg(unsigned errtype, const char *err); 
    183 #endif // CHDK_PTP_PROTOCOL_ONLY 
    184132#endif // __CHDK_PTP_H 
  • trunk/core/raw.c

    r2453 r2483  
    5656        } 
    5757#endif     
    58     if (state_kbd_script_run && shot_histogram_isenabled()) build_shot_histogram(); 
     58    if (camera_info.state.state_kbd_script_run && shot_histogram_isenabled()) build_shot_histogram(); 
    5959 
    6060    // Get pointers to RAW buffers (will be the same on cameras that don't have two or more buffers) 
     
    9393    shooting_bracketing(); 
    9494 
    95     if(conf.tv_bracket_value || conf.av_bracket_value || conf.iso_bracket_value || conf.subj_dist_bracket_value) { 
    96         if(state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) 
     95    if (conf.tv_bracket_value || conf.av_bracket_value || conf.iso_bracket_value || conf.subj_dist_bracket_value) 
     96    { 
     97        if (camera_info.state.state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) 
    9798            br_counter = 1; 
    9899        else 
     
    103104 
    104105    // got here second time in a row. Skip second RAW saving. 
    105     if (conf.raw_save_first_only && state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) { 
     106    if (conf.raw_save_first_only && camera_info.state.state_shooting_progress == SHOOTING_PROGRESS_PROCESSING) 
     107    { 
    106108        return 0; 
    107109    } 
    108110 
    109     state_shooting_progress = SHOOTING_PROGRESS_PROCESSING; 
     111    camera_info.state.state_shooting_progress = SHOOTING_PROGRESS_PROCESSING; 
    110112 
    111113    if (conf.save_raw && is_raw_enabled()) 
  • trunk/core/script.c

    r2453 r2483  
    1616//------------------------------------------------------------------- 
    1717 
    18 int state_kbd_script_run; 
    19  
    2018static long running_script_stack_name = -1;                 // ID of action_stack, which used to control script processing 
    2119 
     
    9795static void action_stack_AS_SCRIPT_RUN() 
    9896{ 
    99     if (state_kbd_script_run && libscriptapi) 
     97    if (camera_info.state.state_kbd_script_run && libscriptapi) 
    10098    { 
    10199        int rv = libscriptapi->script_run(); 
     
    115113long script_stack_start() 
    116114{ 
    117     state_kbd_script_run = SCRIPT_STATE_RAN; 
     115    camera_info.state.state_kbd_script_run = SCRIPT_STATE_RAN; 
    118116    running_script_stack_name = action_stack_create(&action_stack_AS_SCRIPT_RUN); 
    119117    return running_script_stack_name; 
     
    134132    { 
    135133        script_console_add_line(LANG_CONSOLE_TEXT_INTERRUPTED); 
    136         if (state_kbd_script_run == SCRIPT_STATE_INTERRUPTED) 
     134        if (camera_info.state.state_kbd_script_run == SCRIPT_STATE_INTERRUPTED) 
    137135            script_end(); 
    138136        else if (libscriptapi) 
    139137        { 
    140             state_kbd_script_run = SCRIPT_STATE_INTERRUPTED; 
     138            camera_info.state.state_kbd_script_run = SCRIPT_STATE_INTERRUPTED; 
    141139            if (libscriptapi->run_restore() == 0) 
    142140                script_end(); 
     
    156154    { 
    157155        static int show_md_grid=0; 
    158         if (state_kbd_script_run) show_md_grid=5; 
     156        if (camera_info.state.state_kbd_script_run) show_md_grid=5; 
    159157        if (show_md_grid) 
    160158        { 
     
    205203        shot_histogram_set(0); 
    206204    kbd_key_release_all(); 
    207     state_kbd_script_run = SCRIPT_STATE_INACTIVE; 
     205    camera_info.state.state_kbd_script_run = SCRIPT_STATE_INACTIVE; 
    208206 
    209207    conf_update_prevent_shutdown(); 
  • trunk/core/shooting.c

    r2473 r2483  
    12751275{ 
    12761276#if CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 
    1277     if (conf.unlock_optical_zoom_for_video) UnsetZoomForMovie(); 
     1277    extern void UnsetZoomForMovie(); 
     1278    if (conf.unlock_optical_zoom_for_video) 
     1279        UnsetZoomForMovie(); 
    12781280#endif 
    12791281 
     
    13741376        shooting_set_av96_direct(value, when); 
    13751377#ifdef CAM_AV_OVERRIDE_IRIS_FIX 
     1378        extern int MoveIrisWithAv(short*); 
    13761379        MoveIrisWithAv(&value); 
    13771380#endif 
     
    14461449        if (m!=MODE_STITCH && m!=MODE_SCN_BEST_IMAGE)  
    14471450        { 
    1448             if (state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) 
     1451            if (camera_info.state.state_shooting_progress != SHOOTING_PROGRESS_PROCESSING) 
    14491452                bracketing_reset() ; 
    14501453            bracketing_step(SET_NOW) ; 
     
    14621465int captseq_hack_override_active() 
    14631466{ 
    1464     if (state_kbd_script_run) 
     1467    if (camera_info.state.state_kbd_script_run) 
    14651468        if ( photo_param_put_off.tv96 != PHOTO_PARAM_TV_NONE || photo_param_put_off.sv96 ) 
    14661469            return 1; 
     
    15381541 
    15391542#ifdef CAM_SWIVEL_SCREEN 
     1543    extern int screen_opened(void);     // 0 not open, non-zero open 
     1544    extern int screen_rotated(void);    // 0 not rotated, non-zero rotated 
     1545 
    15401546    mode |= (screen_opened())?MODE_SCREEN_OPENED:0; 
    15411547    mode |= (screen_rotated())?MODE_SCREEN_ROTATED:0; 
     
    15701576void set_ev_video_avail(int x) 
    15711577{ 
     1578    extern void ExpCtrlTool_StartContiAE(int, int); 
     1579    extern void ExpCtrlTool_StopContiAE(int, int); 
     1580 
    15721581    if (ev_video_avail==x) return; 
    15731582    ev_video_avail=x; 
     
    15971606    { 
    15981607        ev_video=x; 
     1608        extern short SetAE_ShutterSpeed(short* tv); 
    15991609        SetAE_ShutterSpeed(&tv); 
    16001610    } 
     
    16081618void shooting_expo_param_override_thumb(void) 
    16091619{ 
    1610     if (((state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.tv96 != PHOTO_PARAM_TV_NONE)) 
     1620    if (((camera_info.state.state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.tv96 != PHOTO_PARAM_TV_NONE)) 
    16111621    { 
    16121622        shooting_set_tv96_direct(photo_param_put_off.tv96, SET_NOW); 
     
    16181628    } 
    16191629 
    1620     if (((state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.sv96)) 
     1630    if (((camera_info.state.state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.sv96)) 
    16211631    { 
    16221632        shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
     
    16281638        shooting_set_autoiso(shooting_get_iso_mode()); 
    16291639 
    1630     if (((state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.av96)) 
     1640    if (((camera_info.state.state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.av96)) 
    16311641    { 
    16321642        shooting_set_av96_direct(photo_param_put_off.av96, SET_NOW); 
     
    16361646        shooting_set_av96_direct(shooting_get_av96_override_value(), SET_NOW); 
    16371647 
    1638     if (((state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.subj_dist)) 
     1648    if (((camera_info.state.state_kbd_script_run) || (usb_remote_active)) && (photo_param_put_off.subj_dist)) 
    16391649    { 
    16401650        shooting_set_focus(photo_param_put_off.subj_dist, SET_NOW); 
     
    16451655 
    16461656#if CAM_HAS_ND_FILTER 
    1647     if ((state_kbd_script_run) && (photo_param_put_off.nd_filter)) 
     1657    if ((camera_info.state.state_kbd_script_run) && (photo_param_put_off.nd_filter)) 
    16481658    { 
    16491659        shooting_set_nd_filter_state(photo_param_put_off.nd_filter, SET_NOW); 
     
    16701680void shooting_expo_iso_override_thumb(void) 
    16711681{ 
    1672     if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
     1682    if ((camera_info.state.state_kbd_script_run) && (photo_param_put_off.sv96)) 
    16731683    { 
    16741684        shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
     
    16811691 
    16821692#if defined(CAM_HAS_ND_FILTER) && defined(CAM_HAS_NATIVE_ND_FILTER) 
    1683     if ((state_kbd_script_run) && (photo_param_put_off.nd_filter)) 
     1693    if ((camera_info.state.state_kbd_script_run) && (photo_param_put_off.nd_filter)) 
    16841694    { 
    16851695        shooting_set_nd_filter_state(photo_param_put_off.nd_filter, SET_NOW); 
  • trunk/include/camera_info.h

    r2453 r2483  
    130130    struct 
    131131    { 
    132         int edge_state_draw;        // Current state of overlay (Live/Frozen/Pano) 
    133         int is_shutter_half_press;  // State of Shutter Half Press button 
    134         int auto_started;           // Set to 1 if script auto-started 
    135         int user_menu_has_changed;  // not saved to config file, used to tell code that file needs to be saved 
    136         int kbd_last_clicked;       // For scripts 
     132        int     edge_state_draw;            // Current state of overlay (Live/Frozen/Pano) 
     133        int     is_shutter_half_press;      // State of Shutter Half Press button 
     134        int     auto_started;               // Set to 1 if script auto-started 
     135        int     user_menu_has_changed;      // not saved to config file, used to tell code that file needs to be saved 
     136        int     kbd_last_clicked;           // For scripts 
     137        long    shutter_open_time;          // For DNG EXIF creation 
     138        long    shutter_open_tick_count;    // For DNG EXIF creation 
     139        int     state_shooting_progress;    // Holds current state when still image being processed 
     140        int     state_kbd_script_run;       // Script execution state 
    137141    } state; 
    138142} _cam_info; 
     
    140144extern _cam_info camera_info; 
    141145 
     146extern void camera_info_init(); 
     147 
    142148//========================================================== 
    143149 
  • trunk/include/conf.h

    r2462 r2483  
    463463extern void user_menu_restore(); 
    464464 
    465  
    466 extern int state_shooting_progress; 
    467 extern int state_save_raw_nth_only; 
    468  
    469465extern void conf_save(); 
    470466extern void conf_restore(); 
  • trunk/include/core.h

    r2462 r2483  
    11#ifndef CORE_H 
    22#define CORE_H 
    3  
    4 void core_spytask(); 
    53 
    64// In core/kbd.c 
    75long kbd_process(); 
    86 
     7void core_spytask(); 
     8void core_spytask_can_start(); 
    99void core_rawdata_available(); 
    10 void core_spytask_can_start(); 
    1110 
    1211#define NOISE_REDUCTION_AUTO_CANON      (0) 
     
    1413#define NOISE_REDUCTION_ON              (2) 
    1514 
    16 int core_get_free_memory(); 
    17  
    1815#endif 
    1916 
  • trunk/include/meminfo.h

    r2453 r2483  
    2424extern int GetExMemInfo(cam_meminfo*); 
    2525 
     26extern int core_get_free_memory(); 
     27 
    2628// reyalp used to calculate size of loaded CHDK 
    2729// these are linker symbols, with no actual data attached! 
  • trunk/include/platform.h

    r2462 r2483  
    3434/******************************************************************/ 
    3535 
    36 #ifdef CAM_LOAD_CUSTOM_COLORS 
    37 // Color palette function 
    38 extern void load_chdk_palette(); 
    39 #endif 
    40 /******************************************************************/ 
    41  
    42 #if defined(CAM_DRAW_EXPOSITION) 
    43     char* shooting_get_tv_str(); 
    44     char* shooting_get_av_str(); 
    45 #endif 
    46 /******************************************************************/ 
    47  
    48 // not used. Right now this is just to preserve code from earlier version of mode_get() 
    49 // in case we want to check play/rec switch state in the future. 
    50 // WARNING: it isn't known if all variants of this check the switch state or some other bit. 
    51 // should return 0 is switch is in play position, non-zero otherwise 
    52 //int rec_switch_state(void); 
    53  
    54 // swivel screen state. 
    55 #ifdef CAM_SWIVEL_SCREEN 
    56 // 0 not open, non-zero open 
    57 int screen_opened(void); 
    58 // 0 not rotated, non-zero rotated 
    59 int screen_rotated(void); 
    60 #endif 
    61  
    62 /******************************************************************/ 
    63  
    64 #if CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 
    65 extern void UnsetZoomForMovie(); 
    66 #endif 
    67 #ifdef CAM_AV_OVERRIDE_IRIS_FIX 
    68 extern int MoveIrisWithAv(short*); 
    69 #endif 
    70 #if CAM_EV_IN_VIDEO 
    71 extern void ExpCtrlTool_StartContiAE(int, int); 
    72 extern void ExpCtrlTool_StopContiAE(int, int); 
    73 extern short SetAE_ShutterSpeed(short* tv); 
    74 #endif 
    75  
    7636// debug logging function - see generic wrappers.c to adjust destination 
    7737// WARNING fixed length buffer 
     
    8646#endif 
    8747 
     48/******************************************************************/ 
     49 
    8850#endif 
    8951 
  • trunk/include/properties.h

    r2453 r2483  
    3535extern int shooting_get_prop(int id); 
    3636 
     37extern short get_parameter_size(long id); 
    3738extern long get_parameter_data(long id, void *buf, long bufsize); 
    3839extern long set_parameter_data(long id, void *buf, long bufsize); 
  • trunk/include/script.h

    r2453 r2483  
    99//------------------------------------------------------------------- 
    1010// Current stage of script processing 
    11 extern int state_kbd_script_run; 
    1211 
    1312enum {  SCRIPT_STATE_INACTIVE=0,  // 0 - script is inactive now 
  • trunk/lib/ubasic/ubasic.c

    r2462 r2483  
    789789  } 
    790790  if (tokenizer_token() == TOKENIZER_ENDOFINPUT) { 
    791     if (state_kbd_script_run == 1) {   
     791    if (camera_info.state.state_kbd_script_run == 1) {   
    792792      DEBUG_PRINTF("Label %s not found", label); 
    793793      ubasic_error = UBASIC_E_UNK_LABEL; 
  • trunk/modules/dng.c

    r2409 r2483  
    579579    long subsectime; 
    580580    struct tm *ttm; 
    581     extern volatile long shutter_open_time;         // defined in platform/generic/capt_seq.c 
    582     extern volatile long shutter_open_tick_count;   // defined in platform/generic/capt_seq.c 
    583581    int wb[3]; 
    584582 
     
    591589 
    592590    // Date & time tag (note - uses shutter speed from 'short_prop_val' code above) 
    593     if (shutter_open_time) 
     591    if (camera_info.state.shutter_open_time) 
    594592    { 
    595593        // milliseconds component of shutter_open_time 
    596         subsectime = (shutter_open_tick_count - camera_info.tick_count_offset) % 1000; 
     594        subsectime = (camera_info.state.shutter_open_tick_count - camera_info.tick_count_offset) % 1000; 
    597595        // shutter closing time 
    598         datetime = shutter_open_time + ((cam_shutter[0] + (subsectime * 1000)) / 1000000); 
    599         shutter_open_time=0; 
     596        datetime = camera_info.state.shutter_open_time + ((cam_shutter[0] + (subsectime * 1000)) / 1000000); 
     597        camera_info.state.shutter_open_time = 0; 
    600598    } 
    601599    else 
     
    778776    if (f) fclose(f); 
    779777    init_badpixel_bin_flag = count; 
    780     state_shooting_progress = SHOOTING_PROGRESS_PROCESSING; 
     778    camera_info.state.state_shooting_progress = SHOOTING_PROGRESS_PROCESSING; 
    781779    return 1; 
    782780} 
  • trunk/modules/luascript.c

    r2462 r2483  
    1414#include "console.h" 
    1515#include "action_stack.h" 
    16 #include "ptp.h" 
     16#include "ptp_chdk.h" 
    1717#include "lang.h" 
    1818#include "gui_lang.h" 
     
    614614static int luaCB_get_parameter_data( lua_State* L ) 
    615615{ 
    616   extern long* FlashParamsTable[];  
    617  
    618616  unsigned size; 
    619617  unsigned id = luaL_checknumber( L, 1 ); 
    620618  unsigned val; 
    621619 
    622   if (id >= get_flash_params_count()) { 
    623     // return nil 
    624     return 0; 
    625   } 
    626  
    627   size = FlashParamsTable[id][1]>>16; 
     620  size = get_parameter_size(id); 
    628621  if (size == 0) { 
    629622    // return nil 
     
    921914    // that file browser / textbox is finished and return last selected file 
    922915    // to script caller 
    923     state_kbd_script_run = SCRIPT_STATE_RAN; 
     916    camera_info.state.state_kbd_script_run = SCRIPT_STATE_RAN; 
    924917    // Clear the Func/Set key so that when the script exits, pressing 
    925918    // the Func/Set key again will enter the Script menu, not the File Browser / Textbox 
     
    935928    // it is reset back to 1 when the file browser exits and control is returned back to 
    936929    // the script 
    937     if (state_kbd_script_run) 
     930    if (camera_info.state.state_kbd_script_run) 
    938931        action_pop_func(); 
    939932} 
     
    941934static int luaCB_file_browser( lua_State* L ) { 
    942935    // Disconnect button input from script so buttons will work in file browser 
    943     state_kbd_script_run = SCRIPT_STATE_INACTIVE; 
     936    camera_info.state.state_kbd_script_run = SCRIPT_STATE_INACTIVE; 
    944937    // Push file browser action onto stack - will loop doing nothing until file browser exits 
    945938    action_push_func(action_stack_AS_WAIT_MODULE); 
     
    952945static int luaCB_textbox( lua_State* L ) { 
    953946    // Disconnect button input from script so buttons will work in the textbox 
    954     state_kbd_script_run = SCRIPT_STATE_INACTIVE; 
     947    camera_info.state.state_kbd_script_run = SCRIPT_STATE_INACTIVE; 
    955948    if (module_tbox_load()) 
    956949    { 
  • trunk/modules/module_exportlist.c

    r2462 r2483  
    2323#include "shot_histogram.h" 
    2424#include "levent.h" 
    25 #include "ptp.h" 
     25#include "ptp_chdk.h" 
    2626#include "shooting.h" 
    2727#include "clock.h" 
     
    4646#include "module_exportlist.h" 
    4747 
    48 extern long* FlashParamsTable[];  
    4948extern unsigned _ExecuteEventProcedure(const char *name,...); 
    50  
    51 extern long shutter_open_time; // defined in platform/generic/capt_seq.c 
    52 extern long shutter_open_tick_count; // defined in platform/generic/capt_seq.c 
    5349 
    5450// ATTENTION: DO NOT USE BRACES OR OWN /**/-STYLE COMMENTS ANYWHERE IN THIS FILE TO AVOID AUTO PARSING MISTAKES 
     
    8682                        module_convert_dng_to_chdk_raw, 
    8783            module_grids_load, 
    88             module_find_symbol_address, 
    8984            module_restore_edge, 
    9085            module_save_edge, 
     
    262257            get_focal_length, 
    263258                        get_effective_focal_length, 
     259            get_parameter_size, 
    264260                        get_parameter_data, 
    265261                        get_property_case, 
    266262 
    267             &shutter_open_time, 
    268             &shutter_open_tick_count, 
    269                         &state_shooting_progress, 
    270263                        get_raw_pixel, 
    271264                        patch_bad_pixel, 
     
    370363    shot_histogram_set, 
    371364    stat_get_vbatt, 
    372     &state_kbd_script_run, 
    373365    strcat, 
    374366    swap_partitions, 
     
    378370    &zoom_points, 
    379371 
    380     &FlashParamsTable, 
    381372    PostLogicalEventForNotPowerType, 
    382373    PostLogicalEventToUI, 
  • trunk/platform/a2000/kbd.c

    r2021 r2483  
    156156                physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); // Currently overrides nothing 
    157157 
    158         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    159         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     158        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     159        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    160160 
    161161        } 
  • trunk/platform/a2100/kbd.c

    r2021 r2483  
    276276                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    277277 
    278                 // if ((jogdial_stopped==0) && !state_kbd_script_run) 
     278                // if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    279279                // { 
    280280                        // jogdial_stopped=1; 
    281281                        // get_jogdial_direction(); 
    282282                // } 
    283                 // else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0; 
     283                // else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0; 
    284284        } 
    285285         
  • trunk/platform/a2200/shooting.c

    r2181 r2483  
    112112//      asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    113113//       
    114 //      if ((state_kbd_script_run) && (photo_param_put_off.sv96)) { 
     114//      if ((camera_info.state.state_kbd_script_run) && (photo_param_put_off.sv96)) { 
    115115//              shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
    116116//              // photo_param_put_off.sv96 is not reset here, it will be reset in next call to shooting_expo_param_override 
  • trunk/platform/a490/kbd.c

    r2021 r2483  
    117117{ 
    118118        // If script are running, replace PRINT button with DISPLAY 
    119         if (state_kbd_script_run) { 
     119        if (camera_info.state.state_kbd_script_run) { 
    120120                int i; 
    121121                for (i=0; keymap[i].hackkey; i++) { 
  • trunk/platform/a495/kbd.c

    r2021 r2483  
    117117{ 
    118118        // If script are running, replace PRINT button with DISPLAY 
    119         if (state_kbd_script_run) { 
     119        if (camera_info.state.state_kbd_script_run) { 
    120120                int i; 
    121121                for (i=0; keymap[i].hackkey; i++) { 
  • trunk/platform/a800/kbd.c

    r2021 r2483  
    119119{ 
    120120        // If script are running, replace PRINT button with DISPLAY 
    121         if (state_kbd_script_run) { 
     121        if (camera_info.state.state_kbd_script_run) { 
    122122                int i; 
    123123                for (i=0; keymap[i].hackkey; i++) { 
  • trunk/platform/g10/kbd.c

    r2021 r2483  
    145145                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    146146 
    147                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     147                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    148148                { 
    149149                        jogdial_stopped=1; 
    150150                        get_jogdial_direction(); 
    151151                } 
    152                 else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0; 
     152                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0; 
    153153        } 
    154154         
  • trunk/platform/g11/kbd.c

    r2021 r2483  
    143143                                  (kbd_mod_state[2] & KEYS_MASK2); 
    144144 
    145                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     145                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    146146                        { jogdial_stopped=1; get_jogdial_direction(); } 
    147                 else if (jogdial_stopped && state_kbd_script_run) 
     147                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    148148                         jogdial_stopped=0;  
    149149 
  • trunk/platform/g12/kbd.c

    r2090 r2483  
    156156                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    157157 
    158                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     158                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    159159                { 
    160160                        jogdial_control(1); 
    161161                        get_jogdial_direction(); 
    162162                } 
    163                 else if (jogdial_stopped && state_kbd_script_run) jogdial_control(0); 
     163                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_control(0); 
    164164        } 
    165165 
  • trunk/platform/g1x/kbd.c

    r2246 r2483  
    143143                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    144144 
    145                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     145                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    146146                { 
    147147                        jogdial_control(1); 
    148148                        get_jogdial_direction(); 
    149149                } 
    150                 else if (jogdial_stopped && state_kbd_script_run) jogdial_control(0); 
     150                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_control(0); 
    151151        } 
    152152 
  • trunk/platform/g7/kbd.c

    r2021 r2483  
    142142                          (kbd_mod_state[2] & KEYS_MASK2); 
    143143 
    144         if (isRunning_taskTouchW && !state_kbd_script_run) 
     144        if (isRunning_taskTouchW && !camera_info.state.state_kbd_script_run) 
    145145                { _taskSuspend(handle_taskTouchW); isRunning_taskTouchW = 0; get_jogdial_direction(); } 
    146         else if (!isRunning_taskTouchW && state_kbd_script_run) 
     146        else if (!isRunning_taskTouchW && camera_info.state.state_kbd_script_run) 
    147147                { _taskResume(handle_taskTouchW); isRunning_taskTouchW = 1; } 
    148148 
  • trunk/platform/generic/capt_seq.c

    r2462 r2483  
    1616 
    1717static long raw_save_stage; 
    18 volatile long shutter_open_time=0;      // for DNG EXIF creation 
    19 volatile long shutter_open_tick_count;  // for DNG EXIF creation 
    2018 
    2119void __attribute__((naked,noinline)) capt_seq_hook_raw_here() 
     
    8179    }; 
    8280 
    83  shutter_open_time=_time((void*)0); 
    84  shutter_open_tick_count = get_tick_count(); 
     81 camera_info.state.shutter_open_time = _time((void*)0); 
     82 camera_info.state.shutter_open_tick_count = get_tick_count(); 
    8583 
    8684 asm volatile("LDMFD   SP!, {R0-R12,PC}\n"); 
  • trunk/platform/generic/wrappers.c

    r2462 r2483  
    77#include "levent.h" 
    88#include "stdlib.h" 
    9 #include "ptp.h" 
     9#include "ptp_chdk.h" 
    1010 
    1111//---------------------------------------------------------------------------- 
     
    9595{ 
    9696    return _SetPropertyCase(id, buf, bufsize); 
     97} 
     98 
     99// FlashParamsTable entries point to this 16 byte structure 
     100typedef struct 
     101{ 
     102    void*   data;   // Pointer to param data 
     103    short   unk1; 
     104    short   size;   // param size 
     105    short   unk2; 
     106    short   unk3; 
     107    short   unk4; 
     108    char    unk5; 
     109    char    unk6; 
     110} flashParam; 
     111 
     112short get_parameter_size(long id) 
     113{ 
     114    extern flashParam* FlashParamsTable[]; 
     115 
     116    if ((id >= 0) && (id < get_flash_params_count())) 
     117        return FlashParamsTable[id]->size; 
     118 
     119    return 0; 
    97120} 
    98121 
  • trunk/platform/ixus1000_sd4500/kbd.c

    r2021 r2483  
    133133        physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); 
    134134        //physw_status[2] = physw_status[2] & 0x0fff7ffff; 
    135         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     135        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    136136            jogdial_stopped=1; 
    137137            get_jogdial_direction(); 
    138138        } 
    139         else if (jogdial_stopped && state_kbd_script_run) 
     139        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    140140            jogdial_stopped=0; 
    141141    } 
  • trunk/platform/ixus110_sd960/kbd.c

    r2425 r2483  
    110110        physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) | (kbd_mod_state[1] & KEYS_MASK1); 
    111111        physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    112         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     112        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    113113            jogdial_stopped=1; 
    114114            get_jogdial_direction(); 
    115115        } 
    116         else if (jogdial_stopped && state_kbd_script_run) 
     116        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    117117            jogdial_stopped=0;  
    118118    } 
  • trunk/platform/ixus115_elph100hs/shooting.c

    r1977 r2483  
    127127// asm volatile("STMFD   SP!, {R0-R12,LR}\n"); 
    128128// 
    129 //    if ((state_kbd_script_run) && (photo_param_put_off.sv96)) 
     129//    if ((camera_info.state.state_kbd_script_run) && (photo_param_put_off.sv96)) 
    130130//    { 
    131131//        shooting_set_sv96(photo_param_put_off.sv96, SET_NOW); 
  • trunk/platform/ixus200_sd980/kbd.c

    r2021 r2483  
    167167                          (kbd_mod_state[2] & KEYS_MASK2); 
    168168 
    169         if ((jogdial_stopped==0) && !state_kbd_script_run) 
     169        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    170170                { 
    171171                        jogdial_stopped=1; 
    172172                        get_jogdial_direction(); 
    173173                } 
    174         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0; 
     174        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0; 
    175175 
    176176        } 
  • trunk/platform/ixus300_sd4000/kbd.c

    r2073 r2483  
    9191        //physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); 
    9292 
    93         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     93        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    9494            jogdial_stopped=1; 
    9595            get_jogdial_direction(); 
    96         } else if (jogdial_stopped && state_kbd_script_run) 
     96        } else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    9797            jogdial_stopped=0; 
    9898    } 
  • trunk/platform/ixus40_sd300/sub/100j/capt_seq.c

    r2462 r2483  
    2323 
    2424static long raw_save_stage; 
    25 volatile long shutter_open_time=0; // for DNG EXIF creation, dummy for this camera 
    26 volatile long shutter_open_tick_count;  // for DNG EXIF creation 
    2725 
    2826void __attribute__((naked,noinline)) capt_seq_hook_raw_here() 
  • trunk/platform/ixus40_sd300/sub/100k/capt_seq.c

    r2462 r2483  
    1313 
    1414static long raw_save_stage; 
    15 volatile long shutter_open_time=0; // for DNG EXIF creation, dummy for this camera 
    16 volatile long shutter_open_tick_count;  // for DNG EXIF creation 
    1715 
    1816void __attribute__((naked,noinline)) capt_seq_hook_raw_here() 
  • trunk/platform/ixus40_sd300/wrappers.c

    r842 r2483  
    77{ 
    88    static long v=65535; 
    9     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run|| shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
     9    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run|| shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
    1010//  return _GetFocusLensSubjectDistance(); 
    1111} 
     
    1414{ 
    1515    static long v=MAX_DIST; 
    16     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
     16    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
    1717} 
    1818 
     
    2121{ 
    2222    static long v=65535; 
    23     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run|| shooting_get_common_focus_mode())?v=_GetCurrentTargetDistance():v; 
     23    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run|| shooting_get_common_focus_mode())?v=_GetCurrentTargetDistance():v; 
    2424// return _GetCurrentTargetDistance(); 
    2525} 
  • trunk/platform/ixus50_sd400/wrappers.c

    r842 r2483  
    77{ 
    88    static long v=MAX_DIST; 
    9     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
     9    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
    1010//  return _GetFocusLensSubjectDistance(); 
    1111} 
     
    1414{ 
    1515    static long v=MAX_DIST; 
    16     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
     16    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
    1717} 
    1818 
     
    2020{ 
    2121    static long v=MAX_DIST; 
    22     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetCurrentTargetDistance():v; 
     22    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetCurrentTargetDistance():v; 
    2323// return _GetCurrentTargetDistance(); 
    2424} 
  • trunk/platform/ixus700_sd500/wrappers.c

    r842 r2483  
    77{ 
    88    static long v=MAX_DIST; 
    9     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
     9    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
    1010//  return _GetFocusLensSubjectDistance(); 
    1111} 
     
    1414{ 
    1515    static long v=MAX_DIST; 
    16     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
     16    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
    1717} 
    1818 
     
    2020{ 
    2121    static long v=MAX_DIST; 
    22     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetCurrentTargetDistance():v; 
     22    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_common_focus_mode())?v=_GetCurrentTargetDistance():v; 
    2323// return _GetCurrentTargetDistance(); 
    2424} 
  • trunk/platform/ixus870_sd880/kbd.c

    r2021 r2483  
    182182                          (kbd_mod_state[2] & KEYS_MASK2); 
    183183 
    184         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    185         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     184        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     185        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    186186 
    187187        } 
  • trunk/platform/ixus90_sd790/kbd.c

    r2021 r2483  
    154154                                  (kbd_mod_state[2] & KEYS_MASK2); 
    155155 
    156                 if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     156                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    157157                        jogdial_stopped=1; get_jogdial_direction(); 
    158                 } else if (jogdial_stopped && state_kbd_script_run) { 
     158                } else if (jogdial_stopped && camera_info.state.state_kbd_script_run) { 
    159159                        jogdial_stopped=0; 
    160160                } 
  • trunk/platform/ixus950_sd850/kbd.c

    r2021 r2483  
    137137        physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | 
    138138              (kbd_mod_state[2] & KEYS_MASK2); 
    139         if (isRunning_taskTouchW && !state_kbd_script_run) 
     139        if (isRunning_taskTouchW && !camera_info.state.state_kbd_script_run) 
    140140                { _taskSuspend(handle_taskTouchW); isRunning_taskTouchW = 0; } 
    141         else if (!isRunning_taskTouchW && state_kbd_script_run) 
     141        else if (!isRunning_taskTouchW && camera_info.state.state_kbd_script_run) 
    142142                { _taskResume(handle_taskTouchW); isRunning_taskTouchW = 1; } 
    143143 
  • trunk/platform/ixus95_sd1200/kbd.c

    r2021 r2483  
    105105        physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | 
    106106                          (kbd_mod_state[2] & KEYS_MASK2); 
    107         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     107        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    108108                jogdial_stopped=1; 
    109109                get_jogdial_direction(); 
    110110        } 
    111         else if (jogdial_stopped && state_kbd_script_run) 
     111        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    112112                jogdial_stopped=0; 
    113113 
  • trunk/platform/ixus970_sd890/kbd.c

    r2021 r2483  
    156156                        (kbd_mod_state[2] & KEYS_MASK2); 
    157157 
    158                 if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     158                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    159159                        jogdial_stopped=1; get_jogdial_direction(); 
    160                 } else if (jogdial_stopped && state_kbd_script_run) { 
     160                } else if (jogdial_stopped && camera_info.state.state_kbd_script_run) { 
    161161                        jogdial_stopped=0; 
    162162                } 
  • trunk/platform/ixus980_sd990/kbd.c

    r2021 r2483  
    106106        physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | 
    107107                          (kbd_mod_state[2] & KEYS_MASK2); 
    108         if ((jogdial_stopped==0) && !state_kbd_script_run){  
     108        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){  
    109109                jogdial_stopped=1; 
    110110                get_jogdial_direction(); 
    111111        } 
    112         else if (jogdial_stopped && state_kbd_script_run) 
     112        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    113113                jogdial_stopped=0;  
    114114 
  • trunk/platform/s100/kbd.c

    r2155 r2483  
    131131                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    132132 
    133                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     133                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    134134                { 
    135135                        jogdial_control(1); 
    136136                        get_jogdial_direction(); 
    137137                } 
    138                 else if (jogdial_stopped && state_kbd_script_run) jogdial_control(0); 
     138                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_control(0); 
    139139        } 
    140140 
  • trunk/platform/s2is/wrappers.c

    r842 r2483  
    77{ 
    88    static long v=MAX_DIST; 
    9     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
     9    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
    1010} 
    1111 
     
    1313{ 
    1414   static long v=MAX_DIST; 
    15    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
     15   return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
    1616} 
    1717 
     
    1919{ 
    2020    static long v=MAX_DIST; 
    21     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_focus_mode())?v=_GetCurrentTargetDistance():v; 
     21    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_focus_mode())?v=_GetCurrentTargetDistance():v; 
    2222} 
  • trunk/platform/s3is/wrappers.c

    r842 r2483  
    77{ 
    88    static long v=MAX_DIST; 
    9     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
     9    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistance():v; 
    1010} 
    1111 
     
    1313{ 
    1414    static long v=MAX_DIST; 
    15     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
     15    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_focus_mode())?v=_GetFocusLensSubjectDistanceFromLens():v; 
    1616} 
    1717 
     
    1919{ 
    2020    static long v=MAX_DIST; 
    21     return (kbd_is_key_pressed(KEY_SHOOT_HALF) || state_kbd_script_run  || shooting_get_focus_mode())?v=_GetCurrentTargetDistance():v; 
     21    return (kbd_is_key_pressed(KEY_SHOOT_HALF) || camera_info.state.state_kbd_script_run  || shooting_get_focus_mode())?v=_GetCurrentTargetDistance():v; 
    2222} 
  • trunk/platform/s90/kbd.c

    r2021 r2483  
    131131                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | 
    132132                                  (kbd_mod_state[2] & KEYS_MASK2); 
    133                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     133                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    134134                        { jogdial_stopped=1; get_jogdial_direction(); } 
    135                 else if (jogdial_stopped && state_kbd_script_run) 
     135                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    136136                         jogdial_stopped=0;  
    137137 
  • trunk/platform/s95/kbd.c

    r2021 r2483  
    135135                physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) | (kbd_mod_state[1] & KEYS_MASK1); 
    136136                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    137                 if (!jogdial_stopped && !state_kbd_script_run) { 
     137                if (!jogdial_stopped && !camera_info.state.state_kbd_script_run) { 
    138138                        jogdial_stopped=1; 
    139139                        get_jogdial_direction(); 
    140140                } 
    141                 else if (jogdial_stopped && state_kbd_script_run) 
     141                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    142142                        jogdial_stopped=0; 
    143143        } 
  • trunk/platform/sx1/kbd.c

    r2021 r2483  
    167167                          (kbd_mod_state[2] & KEYS_MASK2); 
    168168 
    169         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    170         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     169        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     170        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    171171 
    172172        } 
  • trunk/platform/sx10/kbd.c

    r2021 r2483  
    167167                          (kbd_mod_state[2] & KEYS_MASK2); 
    168168 
    169         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    170         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     169        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     170        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    171171 
    172172        } 
  • trunk/platform/sx100is/kbd.c

    r2021 r2483  
    159159                physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); // Currently overrides nothing 
    160160 
    161         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    162         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     161        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     162        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    163163 
    164164        } 
  • trunk/platform/sx110is/kbd.c

    r2021 r2483  
    163163                physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); // Currently overrides nothing 
    164164 
    165         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    166         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     165        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     166        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    167167 
    168168        } 
  • trunk/platform/sx120is/kbd.c

    r2021 r2483  
    158158                physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); // Currently overrides nothing 
    159159 
    160         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    161         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     160        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     161        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    162162 
    163163        } 
  • trunk/platform/sx130is/kbd.c

    r2021 r2483  
    135135                physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) | (kbd_mod_state[1] & KEYS_MASK1); 
    136136                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    137                 if (!jogdial_stopped && !state_kbd_script_run) { 
     137                if (!jogdial_stopped && !camera_info.state.state_kbd_script_run) { 
    138138                        jogdial_stopped=1; 
    139139                        get_jogdial_direction(); 
    140140                } 
    141                 else if (jogdial_stopped && state_kbd_script_run) 
     141                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    142142                        jogdial_stopped=0; 
    143143        } 
  • trunk/platform/sx130is/sub/101c/capt_seq.c

    r2462 r2483  
    1414{ 
    1515  
    16         shutter_open_time=_time((void*)0);  
    17     shutter_open_tick_count = get_tick_count(); 
     16        camera_info.state.shutter_open_time = _time((void*)0);  
     17    camera_info.state.shutter_open_tick_count = get_tick_count(); 
    1818 
    1919        // Firmware also tests for 3 and 7, meaning unknown, so we don't touch them 
  • trunk/platform/sx130is/sub/101d/capt_seq.c

    r2462 r2483  
    1414{ 
    1515  
    16         shutter_open_time=_time((void*)0);  
    17     shutter_open_tick_count = get_tick_count(); 
     16        camera_info.state.shutter_open_time = _time((void*)0);  
     17    camera_info.state.shutter_open_tick_count = get_tick_count(); 
    1818 
    1919        // Firmware also tests for 3 and 7, meaning unknown, so we don't touch them 
  • trunk/platform/sx130is/sub/101f/capt_seq.c

    r2462 r2483  
    1414{ 
    1515  
    16         shutter_open_time=_time((void*)0);  
    17     shutter_open_tick_count = get_tick_count(); 
     16        camera_info.state.shutter_open_time = _time((void*)0);  
     17    camera_info.state.shutter_open_tick_count = get_tick_count(); 
    1818 
    1919        // Firmware also tests for 3 and 7, meaning unknown, so we don't touch them 
  • trunk/platform/sx150is/kbd.c

    r2021 r2483  
    139139                physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) | (kbd_mod_state[1] & KEYS_MASK1); 
    140140                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    141                 if (!jogdial_stopped && !state_kbd_script_run) { 
     141                if (!jogdial_stopped && !camera_info.state.state_kbd_script_run) { 
    142142                        jogdial_stopped=1; 
    143143                        get_jogdial_direction(); 
    144144                } 
    145                 else if (jogdial_stopped && state_kbd_script_run) 
     145                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    146146                        jogdial_stopped=0; 
    147147        } 
  • trunk/platform/sx150is/sub/100a/capt_seq.c

    r2462 r2483  
    1616{ 
    1717  
    18         shutter_open_time=_time((void*)0);  
    19     shutter_open_tick_count = get_tick_count(); 
     18        camera_info.state.shutter_open_time = _time((void*)0);  
     19    camera_info.state.shutter_open_tick_count = get_tick_count(); 
    2020 
    2121        // Firmware also tests for 3 and 7, meaning unknown, so we don't touch them 
  • trunk/platform/sx20/kbd.c

    r2021 r2483  
    187187                          (kbd_mod_state[2] & KEYS_MASK2); 
    188188 
    189         if ((jogdial_stopped==0) && !state_kbd_script_run) 
     189        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    190190                { 
    191191                        jogdial_stopped=1; 
    192192                        get_jogdial_direction(); 
    193193                } 
    194         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0; 
     194        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0; 
    195195 
    196196        } 
  • trunk/platform/sx200is/kbd.c

    r2315 r2483  
    172172                          (kbd_mod_state[2] & KEYS_MASK2); 
    173173 
    174         if ((jogdial_stopped==0) && !state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
    175         else if (jogdial_stopped && state_kbd_script_run) jogdial_stopped=0;  
     174        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run){ jogdial_stopped=1; get_jogdial_direction(); } 
     175        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_stopped=0;  
    176176 
    177177        } 
  • trunk/platform/sx210is/kbd.c

    r2100 r2483  
    138138        //physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); 
    139139 
    140         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     140        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    141141            jogdial_stopped=1; 
    142142            get_jogdial_direction(); 
    143143        } 
    144         else if (jogdial_stopped && state_kbd_script_run) 
     144        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    145145            jogdial_stopped=0; 
    146146    } 
  • trunk/platform/sx220hs/kbd.c

    r2315 r2483  
    178178        physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); 
    179179         
    180         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     180        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    181181            jogdial_control(1); 
    182182            get_jogdial_direction(); 
    183183        } 
    184         else if (jogdial_stopped && state_kbd_script_run) 
     184        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    185185            jogdial_control(0); 
    186186    } 
  • trunk/platform/sx230hs/kbd.c

    r2315 r2483  
    191191        physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); 
    192192 
    193         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     193        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    194194            jogdial_control(1); 
    195195            get_jogdial_direction(); 
    196196        } 
    197         else if (jogdial_stopped && state_kbd_script_run) 
     197        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    198198            jogdial_control(0); 
    199199    } 
  • trunk/platform/sx240hs/kbd.c

    r2315 r2483  
    174174        physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); 
    175175 
    176         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     176        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    177177            jogdial_control(1); 
    178178            get_jogdial_direction(); 
    179179        } 
    180         else if (jogdial_stopped && state_kbd_script_run) 
     180        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    181181            jogdial_control(0); 
    182182    } 
  • trunk/platform/sx260hs/kbd.c

    r2315 r2483  
    173173        physw_status[2] = (kbd_new_state[2] | KEYS_MASK2) & (~KEYS_MASK2 | kbd_mod_state[2]); 
    174174 
    175         if ((jogdial_stopped==0) && !state_kbd_script_run) { 
     175        if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) { 
    176176            jogdial_control(1); 
    177177            get_jogdial_direction(); 
    178178        } 
    179         else if (jogdial_stopped && state_kbd_script_run) 
     179        else if (jogdial_stopped && camera_info.state.state_kbd_script_run) 
    180180            jogdial_control(0); 
    181181    } 
  • trunk/platform/sx30/kbd.c

    r2315 r2483  
    161161                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    162162 
    163                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     163                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    164164                { 
    165165                        jogdial_control(1); 
    166166                        get_jogdial_direction(); 
    167167                } 
    168                 else if (jogdial_stopped && state_kbd_script_run) jogdial_control(0); 
     168                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_control(0); 
    169169        } 
    170170 
  • trunk/platform/sx40hs/kbd.c

    r2315 r2483  
    162162                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    163163 
    164                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     164                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    165165                { 
    166166                        jogdial_control(1); 
    167167                        get_jogdial_direction(); 
    168168                } 
    169                 else if (jogdial_stopped && state_kbd_script_run) jogdial_control(0); 
     169                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_control(0); 
    170170        } 
    171171 
  • trunk/platform/sx50hs/kbd.c

    r2315 r2483  
    141141                physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) | (kbd_mod_state[2] & KEYS_MASK2); 
    142142 
    143                 if ((jogdial_stopped==0) && !state_kbd_script_run) 
     143                if ((jogdial_stopped==0) && !camera_info.state.state_kbd_script_run) 
    144144                { 
    145145                        jogdial_control(1); 
    146146                        get_jogdial_direction(); 
    147147                } 
    148                 else if (jogdial_stopped && state_kbd_script_run) jogdial_control(0); 
     148                else if (jogdial_stopped && camera_info.state.state_kbd_script_run) jogdial_control(0); 
    149149        } 
    150150 
Note: See TracChangeset for help on using the changeset viewer.