Pretty print Tv - page 4 - General Discussion and Assistance - CHDK Forum supplierdeeply

Pretty print Tv

  • 31 Replies
  • 5908 Views
Re: Pretty print Tv
« Reply #30 on: 07 / August / 2021, 13:15:22 »
Advertisements
@reyalp

Thanks for the insight and, of course, I get what you are saying and I understand.

The bottom line for me is that the @philmoz M3 build works for me.

BTW

Quote
set_user_tv_by_id_rel(1) from 1/4000 would try to set user_tv to bulb, instead of staying on the shortest supported value.

Understood, but all I need to do is detect a bulb setting from the Canon side and I can do this via checking user_tv.

I think we can put this one to bed now  ;) :)

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: Pretty print Tv
« Reply #31 on: 26 / August / 2021, 16:18:59 »
 ::) Quick & dirty approach, probably nice to optimice...
Code: [Select]
// include/camera_info.h

    const char* av_str;
    const char* tv_str;
} DOF_TYPE;


// core/shooting.c

void shooting_update_dof_values()
...
  camera_info.dof_values.av_str=(char*)aperture_sizes_table[find_nearest_aperture_entry(av96)].name;
  camera_info.dof_values.tv_str=(char*)shutter_speeds_table[find_nearest_shutter_speed_entry(shooting_get_tv96())].name;
return;
}

// modules/luascript.c

static int luaCB_get_dofinfo( lua_State* L )
...
  SET_STR_FIELD("av_str", camera_info.dof_values.av_str );
  SET_STR_FIELD("tv_str", camera_info.dof_values.tv_str );
  return 1;
}

 
Quote
-->>
    dof=get_dofinfo();   print(get_exp_count(),-get_focus(),dof.av_str,dof.tv_str)
Tested ++ on Sx280,
-- CanĀ“t compile with Ix170,190, ...

Edit:
static int find_nearest_aperture_entry(short av96)  ??? depends on
#if (CAM_HAS_IRIS_DIAPHRAGM || CAM_DRAW_EXPOSITION)

Edit2: Seems fine without that #if ... line.  :)
« Last Edit: 27 / August / 2021, 14:48:08 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal