IXUS980/SD990 uBasic set_zoom - General Discussion and Assistance - CHDK Forum

IXUS980/SD990 uBasic set_zoom

  • 5 Replies
  • 5286 Views
IXUS980/SD990 uBasic set_zoom
« on: 26 / June / 2010, 09:30:35 »
Advertisements
The following partial script will probably execute the first set_zoom but randomly crash at other settings :-

set_zoom 7
sleep  3000
set_zoom 6
sleep  3000
set_zoom 5
sleep 3000
set_zoom 4
sleep  3000
set_zoom 3
sleep  3000
set_zoom 2
sleep  3000
set_zoom 1
sleep  3000
set_zoom 0
sleep  3000

Is the firmware address of _MoveZoomLensWithPoint correct ?

(the problem occurs even with lens_set_focus_pos() and lens_get_focus_pos() commented-out)

Is zoom_busy and zoom_status correct ?

Do we know how many values zoom_status has on this camera ?



David
« Last Edit: 26 / June / 2010, 09:32:09 by Microfunguy »

*

Offline reyalp

  • ******
  • 14117
Re: IXUS980/SD990 uBasic set_zoom
« Reply #1 on: 26 / June / 2010, 18:07:07 »
ISTR that when I made a script for this camera, I just used key presses for the zoom lever, so it's quite possible this doesn't work (I'm not sure if I tried the other way, I was in a hurry). I believe that zoom_busy and zoom_status should be OK, you can always double check them with misc debug vals.

With only a handful of zoom steps, the button press method is quite workable. This is what I used
Code: (lua) [Select]
function set_zoom_step(n)
local current=get_prop(props.ZOOM_POS)
if n >= get_zoom_steps() then
n = get_zoom_steps() - 1
end
if n < 0 then
n=0
end
-- we don't test for overshoot
if current < n then
-- TODO won't work well for S
-- can't hold down because propcase doesn't update until after release :X
while get_prop(props.ZOOM_POS) < n do
click("zoom_in")
sleep(650)
end
elseif current > n then
while get_prop(props.ZOOM_POS) > n do
click("zoom_in")
sleep(650)
end
end
end

translating to ubasic is left as an exercise to the reader ;)
Don't forget what the H stands for.

Re: IXUS980/SD990 uBasic set_zoom
« Reply #2 on: 26 / June / 2010, 18:16:57 »
it's quite possible this doesn't work .
the button press method is quite workable.

Yes, but I guess it should be made to work, if possible   ;)

If I have the energy, I could check the firmware tomorrow.

What other camera can I compare it with ?


*

Offline reyalp

  • ******
  • 14117
Re: IXUS980/SD990 uBasic set_zoom
« Reply #3 on: 26 / June / 2010, 18:25:51 »
Yes, but I guess it should be made to work, if possible   ;)
Yes of course :)

Quote
What other camera can I compare it with ?
Other ixus of about the same generation would be my first choice, especially one that this function is known to work on. Looking at stubs_entry.S I notice that quite a few of the zoom functions were poor sig matches. I thought I checked these, but who knows...

edit:
OK, these are all eventprocs, and going by that  MoveZoomLensWithPoint is correct.
« Last Edit: 26 / June / 2010, 18:35:21 by reyalp »
Don't forget what the H stands for.


Re: IXUS980/SD990 uBasic set_zoom
« Reply #4 on: 26 / June / 2010, 19:03:05 »
OK, these are all eventprocs, and going by that  MoveZoomLensWithPoint is correct.

Hmmm ........

Do you agree that it does not seem to work reliably ?


*

Offline reyalp

  • ******
  • 14117
Re: IXUS980/SD990 uBasic set_zoom
« Reply #5 on: 26 / June / 2010, 19:34:11 »
Do you agree that it does not seem to work reliably ?
The camera returned to it's original owner long ago, I can't test it.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal