Example #1
0
static MENU_UPDATE_FUNC(script_display)
{
    int script_displayed = (int) entry->priv;
    
    if (entry->selected && script_state == SCRIPT_IDLE) 
        script_selected = script_displayed; // change selected script as we scroll thru menu (if not running, of course)

    int displayed_script_is_idle = (script_state == SCRIPT_IDLE) || (script_selected != script_displayed);

    
    if (displayed_script_is_idle)
    {
        MENU_SET_RINFO(
            script_titles[script_displayed]
        );
        MENU_SET_ICON(MNI_SUBMENU, entry->selected && script_displayed == script_selected);
        MENU_SET_ENABLED(0);
        MENU_SET_VALUE("");
    }
    else
    {
        MENU_SET_ICON(MNI_ON, 0);
        MENU_SET_ENABLED(1);
        MENU_SET_VALUE("(%s)", get_script_status_msg());
    }
}
Example #2
0
static MENU_UPDATE_FUNC(ime_base_method_update)
{
    if(ime_base_method < ime_base_method_count)
    {
        MENU_SET_VALUE(ime_base_methods[ime_base_method].name);
    }
    else
    {
        MENU_SET_VALUE("None");
    }
}
Example #3
0
static MENU_UPDATE_FUNC(lv_rec_menu_update)
{
    /* get resolutions and stuff */
    lv_rec_save_data_t temp_data;
    memset(&temp_data, 0x00, sizeof(lv_rec_save_data_t));
    
    /* menu options */
    temp_data.options.frameSkip = lv_rec_frame_skip;
    temp_data.options.rawMode = lv_rec_raw_mode;
    temp_data.options.singleFile = lv_rec_single_file;
    temp_data.options.linesToSkip = lv_rec_line_skip;
    
    lv_rec_update_preset(&temp_data);
    
    MENU_SET_VALUE(
        "%dx%d",
        temp_data.width, temp_data.finalHeight
    );

    if(lv_rec_raw_mode)
    {
        MENU_SET_HELP(
            "RAW MODE: Saving %d bytes per frame",
            temp_data.bytesPerLine * temp_data.finalHeight
        );
    }
    else
    {
        MENU_SET_HELP(
            "YUV422 MODE: Saving %d bytes per frame",
            temp_data.bytesPerLine * temp_data.finalHeight
        );
    }
}
Example #4
0
static MENU_UPDATE_FUNC(script_print)
{
    if (!script_preview_flag || !entry->selected)
    {
        MENU_SET_NAME("Show script");
        MENU_SET_VALUE("");
        script_preview_flag = 0;
        return;
    }
    
    static int prev_script = -1;

    if (prev_script != script_selected)
    {
        int size;
        char* p = get_script_path(script_selected);
        char* f = (char*)read_entire_file(p, &size);
        if (f)
        {
            script_copy_window(script_preview, sizeof(script_preview), f, 0, 0, 20, 60);
            fio_free(f);
        }
        else
        {
            snprintf(script_preview, sizeof(script_preview), "Could not read '%s'", p);
        }
    }
    prev_script = script_selected;

    bmp_fill(40, 0, 0, 720, 430);
    int fnt = FONT(FONT_MED, COLOR_WHITE, 40);
    big_bmp_printf(fnt, 10, 10, "%s", script_preview);

    info->custom_drawing = CUSTOM_DRAW_THIS_MENU;
}
Example #5
0
static MENU_UPDATE_FUNC(lens_av_upd) {
    if(!lens_av) {
        MENU_SET_VALUE("OFF");
        MENU_SET_ENABLED(0);
        MENU_SET_ICON(IT_DICE_OFF, 0);
    }
    else if (lens_av == LENS_AV_THIS) {
        int ap = AV2STR(RAW2AV(lens_info.raw_aperture_min));
        MENU_SET_VALUE("this lens f/%d.%d", ap / 10, ap % 10);
        MENU_SET_ENABLED(1);
        MENU_SET_ICON(IT_DICE, 0);
    }
    else {
        int ap = AV2STR(lens_av);
        MENU_SET_VALUE("f/%d.%d", ap / 10, ap % 10);
        MENU_SET_ENABLED(1);
        MENU_SET_ICON(IT_DICE, 0);
    }
    MENU_CUSTOM_DRAW(av);
}
Example #6
0
static MENU_UPDATE_FUNC(focus_stack_update)
{
    if (FOCUS_BRACKET_COUNT <= 1)
    {
        MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "Focus stacking not configured.");
    }
    else
    {
        MENU_SET_VALUE(
            "(%d pics)",
            FOCUS_BRACKET_COUNT
        );
    }
}
Example #7
0
static MENU_UPDATE_FUNC(focus_show_a)
{
    if (entry->selected) override_zoom_buttons = 1;
    
    MENU_SET_VALUE(
        "%s%d%s",
        focus_task_delta > 0 ? "+" : 
        focus_task_delta < 0 ? "-" : "",
        ABS(focus_task_delta),
        focus_task_delta ? "steps from here" : " (here)"
    );
    MENU_SET_ICON(MNI_BOOL(focus_task_delta), 0);
    MENU_SET_ENABLED(focus_task_delta);
}
Example #8
0
static MENU_UPDATE_FUNC(last_bv_upd) {
    if(last_bv != INT_MIN) {
        exposure expo = get_exposure(last_bv, 1);
        expo.av = AV2STR(expo.av);
        
        MENU_SET_VALUE("%s%d.%d BV", FMT_FIXEDPOINT1(last_bv));
        MENU_SET_HELP("%s f/%d.%d   %d ISO   %s%d.%d EC",
            lens_format_shutter(TV2RAW(expo.tv)),
            expo.av / 10, expo.av % 10,
            raw2iso(SV2RAW(expo.sv)),
            FMT_FIXEDPOINT1S(expo.ec)
        );
    }
    MENU_CUSTOM_DRAW(browse);
}
Example #9
0
static MENU_UPDATE_FUNC(post_deflicker_update)
{
    if (!can_use_raw_overlays_photo())
        MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "Photo RAW data not available.");

    if (is_hdr_bracketing_enabled())
        MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "Not compatible with HDR bracketing.");

    if (image_review_time == 0)
        MENU_SET_WARNING(MENU_WARN_NOT_WORKING, "Enable image review from Canon menu.");
    
    if (is_continuous_drive())
        MENU_SET_WARNING(MENU_WARN_ADVICE, "Not fully compatible with continuous drive.");

    if (post_deflicker)
    {
        MENU_SET_VALUE(post_deflicker_sidecar_type ? "UFRaw" : "XMP");
        MENU_SET_RINFO("%dEV/%d%%", post_deflicker_target_level, post_deflicker_percentile);
    }
    
    if (post_deflicker && post_deflicker_sidecar_type==1)
        MENU_SET_WARNING(MENU_WARN_INFO, "You must rename *.UFR to *.ufraw: rename 's/UFR$/ufraw/' *");
}
Example #10
0
static MENU_UPDATE_FUNC(mem_chk_persist_update)
{
    MENU_SET_VALUE(mem_chk_persist_state);
}
Example #11
0
static MENU_UPDATE_FUNC(ec_range_upd) {
    MENU_SET_VALUE("%s%d.%d EV - %s%d.%d EV", FMT_FIXEDPOINT1S(ec_min), FMT_FIXEDPOINT1S(ec_max));
    MENU_CUSTOM_DRAW(ec);
}
Example #12
0
static MENU_UPDATE_FUNC(tv_min_upd) {
    MENU_SET_VALUE("%s", lens_format_shutter(TV2RAW(tv_min)));
    MENU_CUSTOM_DRAW(tv);
}
Example #13
0
static MENU_UPDATE_FUNC(iso_range_upd) {
    MENU_SET_VALUE("%d - %d", raw2iso(SV2RAW(iso_min)), raw2iso(SV2RAW(iso_max)));
    MENU_CUSTOM_DRAW(sv);
}
Example #14
0
static MENU_UPDATE_FUNC(mem_chk_abort_update)
{
    MENU_SET_VALUE("%d err, %d thr, %s alloc", mem_chk_errors, mem_chk_threads, format_memory_size(mem_chk_allocated));
    MENU_SET_HELP("%d errors, %d threads, %s total memory allocated", mem_chk_errors, mem_chk_threads, format_memory_size(mem_chk_allocated));
}
Example #15
0
//others
static MENU_UPDATE_FUNC(aperture_range_upd) {
    int apmin = AV2STR(av_min);
    int apmax = AV2STR(av_max);
    MENU_SET_VALUE("f/%d.%d - f/%d.%d", apmin / 10, apmin % 10, apmax / 10, apmax % 10);
    MENU_CUSTOM_DRAW(av);
}
Example #16
0
static MENU_UPDATE_FUNC(ec_curve_upd) {
    MENU_SET_VALUE("at %s%d.%d %s%d.%d EVpBV", FMT_FIXEDPOINT1(ec_off), FMT_FIXEDPOINT1S(ec_step));
    MENU_CUSTOM_DRAW(ec);
}
Example #17
0
static MENU_UPDATE_FUNC(iso_curve_upd) {
    MENU_SET_VALUE("at %s%d.%d +%d.%d EVpBV", FMT_FIXEDPOINT1(iso_off), iso_step / 10, iso_step % 10);
    MENU_CUSTOM_DRAW(sv);
}
Example #18
0
static MENU_UPDATE_FUNC(aperture_curve_upd) {
    MENU_SET_VALUE("at %s%d.%d -%d.%d EVpBV", FMT_FIXEDPOINT1(av_off), av_step /10, av_step % 10);
    MENU_CUSTOM_DRAW(av);
}
Example #19
0
static MENU_UPDATE_FUNC(mem_chk_flood_update)
{
    MENU_SET_VALUE(mem_chk_flood_state);
}