new feature in ubasic - get_max_zoom, need users help :) - General Discussion and Assistance - CHDK Forum
supplierdeeply

new feature in ubasic - get_max_zoom, need users help :)

  • 18 Replies
  • 9686 Views
*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
new feature in ubasic - get_max_zoom, need users help :)
« on: 07 / May / 2008, 16:20:19 »
Advertisements
Hi,

in order to accomplish my mission to finally have universal scripts (no need to distinguish between digic II and digic III and model this and model that) (see http://chdk.setepontos.com/index.php/topic,978.msg8339.html#msg8339 )
i want to implement a ubasic command like the following:
get_max_zoom_steps
You may ask - what the fudge do you need this for?
well, obviously for scripts that use zoom. My a620 has a total of 8 zoomsteps (or 9, if you include the "no zoom setting"), whereas the s3is has a total of 128 (129) steps. i have to maintain two different scripts for the different cameras, which sucks as i want to only have scripts that can be run on all cameras without having to follow "guidelines and rules".
so with get_max_zoom_steps you can make loops like
Quote
while i<>get_max_zoom_steps
zoom = zoom + 1;
i = i+1;
wend
- this should then run on all cameras without the need of modifying first. my initial tests with my testbuild show no significant change in execution of scripts, so - the more commands the better (for now).

Now here is what i need you for:

I need the zoom steps for each camera model. maybe it is written in the dumped firmwares somewhere, that would be great as it would allow a "bulk reading" of those values. if not, i need each camera owner to supply those values. maybe there even is a generic way of getting these values, like in "s series always has 128 steps, a series always 8 steps, ixus always x steps". don't really know.
if these values have been gathered, they then can be added to the /include/camera.h file and thus be parsed via ubasic (well, lua as well).

also, maybe it is useful to add something like "get_cam_has_nd", which would result in something like
0 - cam has no ND filter, it has normal aperture instead
1 - cam has ND filter
2 - cam has ND filter AND normal aperture (i think the G series have this, right)?

what do you think? need more commands in ubasic?
(opened this new thread as i didnt want to clutter my original thread with more information, as it already is a lot cluttered).

regards, PhoX

edit: maybe we not only need the steps, but also the zoom range itself (like 4x on a620, so when you have 8 steps - each step is half a normal "zoom step").
« Last Edit: 07 / May / 2008, 16:22:46 by PhyrePhoX »

*

Offline zeno

  • *****
  • 891
Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #1 on: 08 / May / 2008, 05:07:49 »
I can't help too much with giving you data (I only have an A570 which has 8 steps), but I applaud what you want to do. I have written scripts for Kite Aerial Photographers which let them control the zoom via radio control of power to the USB port using a GentLED CHDK2 (see below) and really need your get_max_zoomsteps function. Without it users have to set a script parameter to indicate whether their camera has 128 steps or not.

It seems that the 128 step cameras have 10x or 12x zooms, the 8 step ones have 4x zooms and the 15 step ones have 6x zooms.

Refs: The Gentled CHDK2

http://www.zenonic.demon.co.uk/kapstuff/chdk2scripting.pdf and

gentLED Camera Remote Control: Options
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #2 on: 08 / May / 2008, 05:16:37 »
thanks for your input.

Quote
It seems that the 128 step cameras have 10x or 12x zooms, the 8 step ones have 4x zooms and the 15 step ones have 6x zooms.
this might be true and also makes sense to a certain extent, however we need to be sure.
i just noticed something: when on my s3is i zoom to 6x (well, half of 12x) chdk shows that the zoom is at step 80. i would have expected it to be at about 64 (half of 128). this means the zoom factor isnt proportional to the number of zoom steps. this is no big deal, however it needs to be considered when for example i want to complete my "vertigo script".

Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #3 on: 08 / May / 2008, 07:16:21 »
The TX-1 has 125 steps.
Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking


*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #4 on: 08 / May / 2008, 07:28:17 »
The IXUS 860is has 8 steps (Datasheet: 3.8x zoom, wide angel, 28-105mm):

0/1.0x  1/1.3x   2/1.6x   3/1.9x   4/2.3x   5/2.7x   6/3.1x   7/3.7x

Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #5 on: 08 / May / 2008, 08:46:16 »
@PhyrePhoX:
Why not using the source?

platform/cameramodel/main.c:

const int zoom_points = NUM_FL;

for most cameras or

const int zoom_points = 129;

for S3IS.

Cheers

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #6 on: 08 / May / 2008, 10:17:23 »
hm, maybe because i'm dumb?
damn it. zoom_points. that is easy. thanks!
i guess i should have looked at the source a little bit closer, i was sure there wasnt a definition of such a value anywhere, how did you manage to put it in the trunk so fast? :D ;)
maybe i was so fixated on camera.h as i expected such a value there.
alright, you can call me an idiot, officially :D
anyways, now that we have found such value for each camera, it is a piece of cake integrating that into the ubasic code.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #7 on: 08 / May / 2008, 14:01:31 »
Yes, commands like these would indeed be very welcome. Also, many propcases work in similar ways independent of platforms, but their values are different (like propcase 205/206 digic II/III), it would be nice to have common names for those.

For the a570is I believe "0 - cam has no ND filter, it has normal aperture instead" is true, and it's 8 zoom steps 0 to 7 range between 1x and 4x: [ 1.0 1.1 1.3 1.7 2.1 2.7 3.3 4.0 ] according to CHDK OSD.


Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #8 on: 08 / May / 2008, 14:25:57 »
So this would eventually lead to "Set Zoom Priority" being in CHDK? :)
Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: new feature in ubasic - get_max_zoom, need users help :)
« Reply #9 on: 08 / May / 2008, 15:17:35 »
Yes, commands like these would indeed be very welcome. Also, many propcases work in similar ways independent of platforms, but their values are different (like propcase 205/206 digic II/III), it would be nice to have common names for those.


well, exactly these propcases i already adressed in my beta build (see the other thread). the only thing missing is zoom & nd. ofcourse other ideas welcome.
if these are implemented in ubasic, i dont see any reason there couldnt be universal scripts.

So this would eventually lead to "Set Zoom Priority" being in CHDK? :)
what do you mean by that?

 

Related Topics