set_zoom problems in uBASIC & Lua scripts - page 6 - General Discussion and Assistance - CHDK Forum
supplierdeeply

set_zoom problems in uBASIC & Lua scripts

  • 79 Replies
  • 14378 Views
*

Offline titbb

  • *
  • 38
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #50 on: 21 / November / 2011, 14:27:01 »
Advertisements
Thank titbb.   I've attached the log.  This is an interesting bug - it crashes my SD940 all the time,  it only crashes your SD980 when zoom requests are made too fast (apparently).   One SD780 user reports no crashes - the other gets lots of them.   

Update :    The SD940 reports 11 zoom steps but crashes when set_zoom(10) is called.  If I change the autozoom.lua code to only go from 0 to 9,  and set the step interval to 1 second,  its seems to be willing to run all day.  If I set the step interval to 5 seconds,  it never makes it through even one complete cycle.  Can you try 5 seconds with yours ?

Also,  I just notice that the script set zoom speed to the step size too.  Not sure I really want to do that -slows down the zoom speed when you slow down how fast zoom steps happen.  Might be part of the problem with the script.


Same with mine, it reports 11, but it only goes upto 10 and then back again on the automatic script.

Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #51 on: 21 / November / 2011, 14:31:13 »
Same with mine, it reports 11, but it only goes upto 10 and then back again on the automatic script.
Yours is working correctly - 11 steps means set_zoom(0) to set_zoom(10) so seeing 10 as the last step is correct.  On my camera, the 10th step causes the camera to shut down - I can only go 0-9.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1263
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #52 on: 21 / November / 2011, 14:37:52 »
Hi waterwingz,

I don't know if this is related with your issue. Are you sure that set_zoom_speed() is realy supported for your camera. If so, this command accepts only values ​​5-100.  set_zoom_speed() was designed for S2, S3 and S5 with variable zoom speed.

msl
CHDK-DE:  CHDK-DE links

Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #53 on: 21 / November / 2011, 14:47:39 »
I don't know if this is related with your issue. Are you sure that set_zoom_speed() is realy supported for your camera. If so, this command accepts only values ​​5-100.  set_zoom_speed() was designed for S2, S3 and S5 with variable zoom speed.
I was noticing that changing the value did not seem to change the speed.  So your suggestion makes sense.  I'll delete the call and see if it changes anything.  I guess I was responding to this caution in the wiki :

Note 3: CAUTION! (found on S3 IS) If set_zoom_speed is not written into the script when set_zoom x is used, the camera will refocus some of your optics to make it where the camera is unable to focus on anything in any mode. The camera (when zooming without a set-zoom speed) appears to move an internal lens element that puts the lens into a Super-Macro mode where it focuses on internal lens elements at widest-angle. If this command is left out of a script using the set_zoom x command, you will have to shut down your camera and restart it to reset the zoom-lens' optics back to defaults.

UBASIC/TutorialScratchpad#The_set_zoom.2C_set_zoom_rel_&_get_zoom+&_set_zoom_speed_commands

UPDATE : set_zoom_speed() basically ends up calling a  nullsub() in via SetZoomActuatorSpeedPercent in  stub_entry_2.S.   So calling it causes no harm beyond the wasted cycles.

« Last Edit: 21 / November / 2011, 18:16:55 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #54 on: 21 / November / 2011, 18:43:08 »
Update : its starting to look like the code in platform/ixus120_sd940/main.c is suspect - although that might not be the only problem.  The value of zoom_points is set to 11 there, but the camera only has 10 discrete zoom positions.  It does an ASSERT if we try to zoom that far.  I wonder what else is wrong ?

Meanwhile,  here's a couple of ROMLOG's from user voodoolady,  using an SD780,  firmware 1.00b and the autozoom.lua script posted a few entries back :
« Last Edit: 21 / November / 2011, 19:16:59 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3124
    • Photos
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #55 on: 23 / November / 2011, 04:58:33 »
I did some more testing on the G12 and the hack to block the focus setting when "Continuous AF" is enabled is not needed if the camera is in Manual Focus mode.

The attached patch relaxes the restriction so that the focus set is allowed if 'Continuous AF' is off or the camera is in Manual Focus mode (this may help avoid confusion with subject distance bracketing not appearing to work).

The set_zoom still works on the G12 with this change.

This change also affects the G10 as well - can you test to make sure it doesn't break the set_zoom on the G10.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #56 on: 23 / November / 2011, 08:53:21 »
This change also affects the G10 as well - can you test to make sure it doesn't break the set_zoom on the G10.
The change has no effect if Manual Focus is not enabled and I run my autozoom.lua test for a couple of minutes. Everything works as before.

It also has no effect it I simply enable Manual Focus and rerun the autozoom.lua test.

However,  if I adjust the manual focus (via the jog wheel) while the test is running (forcing a refocus) then the camera will reset after a random number of focus changes.

I think I can live with that.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3124
    • Photos
Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Reply #57 on: 23 / November / 2011, 16:27:46 »

However,  if I adjust the manual focus (via the jog wheel) while the test is running (forcing a refocus) then the camera will reset after a random number of focus changes.


That would probably have happened with the previous version if you did not have 'Continuous AF' enabled and were in manual focus mode. Two tasks trying to change the same thing would result in a debug assert.

Phil.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)


Re: set_zoom problems in uBASIC & Lua scripts
« Reply #58 on: 22 / March / 2014, 17:40:13 »
Is anymore known about the zoom problem?  I encounter it with my ELPH 300HS (IXUS220HS), firmware 100C.  When running Waterwingz autozoom.lua script, the camera freezes and shuts down after several zoom steps.  The number of successful steps seems random.  The romlog always shows “ASSERT!! FocusLensController.c Line 708" 
Thanks,
Bob

Re: set_zoom problems in uBASIC & Lua scripts
« Reply #59 on: 22 / March / 2014, 18:07:40 »
I'm afraid this did not go any farther towards gettting fixed.

Did you make sure that you have servo autofocus and continuous autofocus disabled in the Canon menus?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics