Pages: [1] 2 Next   Go Down
  Print  
Author Topic: new feature in ubasic - get_max_zoom, need users help :)  (Read 1859 times)
0 Members and 1 Guest are viewing this topic.
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« on: 07 / May / 2008, 21:20:19 »

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, 21:22:46 by PhyrePhoX » Logged

zeno
Full Member
***

Karma: +19/-1
Offline Offline

Posts: 137


« Reply #1 on: 08 / May / 2008, 10: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
Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #2 on: 08 / May / 2008, 10: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".
Logged

Psychokitty
Full Member
***

Karma: +39/-24
Offline Offline

Posts: 121



« Reply #3 on: 08 / May / 2008, 12:16:21 »

The TX-1 has 125 steps.
Logged

Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking
fe50
Hero Member
*****

Karma: +65/-1
Offline Offline

Posts: 734


IXUS50 & 860, SX10


« Reply #4 on: 08 / May / 2008, 12: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
Logged

gango
Newbie
*

Karma: +2/-1
Offline Offline

Posts: 6


« Reply #5 on: 08 / May / 2008, 13: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
Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #6 on: 08 / May / 2008, 15: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? Big Grin Wink
maybe i was so fixated on camera.h as i expected such a value there.
alright, you can call me an idiot, officially Big Grin
anyways, now that we have found such value for each camera, it is a piece of cake integrating that into the ubasic code.
Logged

fudgey
Global Moderator
Hero Member
*****

Karma: +74/-1
Offline Offline

Posts: 842

a570is


« Reply #7 on: 08 / May / 2008, 19: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.
Logged
Psychokitty
Full Member
***

Karma: +39/-24
Offline Offline

Posts: 121



« Reply #8 on: 08 / May / 2008, 19:25:57 »

So this would eventually lead to "Set Zoom Priority" being in CHDK? Smiley
Logged

Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #9 on: 08 / May / 2008, 20: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? Smiley
what do you mean by that?
Logged

PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #10 on: 08 / May / 2008, 23:00:04 »

alright, in my build i added following ubasic code:


get_zoom_steps - returns the possible zoomsteps (9 on a620, 129 on s3is for example)
get_nd_present - returns 0 if no ND present, 1 if ND present and real diaphragm NOT present, 2 if both ND & diaphragm present.
get_propset - returns 1 if propset 1,2 if propset is 2. propset 1 = digic II propsets, propset 2 = digic III propsets (see PropertyCase - CHDK Wiki )

please read the whole message here: http://chdk.setepontos.com/index.php/topic,978.msg11875.html#msg11875. i will provide binaries & diff there as well.
Logged

Psychokitty
Full Member
***

Karma: +39/-24
Offline Offline

Posts: 121



« Reply #11 on: 09 / May / 2008, 12:03:17 »

So this would eventually lead to "Set Zoom Priority" being in CHDK? Smiley
what do you mean by that?
I'm asking if we might have the option built into CHDK to command our cameras to specific zoom, along with zoom bracketing at infinity, things like that...
Logged

Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #12 on: 09 / May / 2008, 12:23:14 »

good idea. it is definitly possible via the use of scripts.
maybe it can be added to the override menu, why not.
Logged

Psychokitty
Full Member
***

Karma: +39/-24
Offline Offline

Posts: 121



« Reply #13 on: 09 / May / 2008, 18:31:16 »

That would be great!
Logged

Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #14 on: 10 / May / 2008, 01:51:54 »

just so that i understand it better: what could be a possible purpose of such thing, what use do you expect? do you have some kind of examples?
Logged

Pages: [1] 2 Next   Go Up
  Print  
 
Jump to: