A590IS porting... - page 96 - DryOS Development - CHDK Forum  

A590IS porting...

  • 968 Replies
  • 395951 Views
Re: A590IS porting...
« Reply #950 on: 08 / March / 2017, 19:04:25 »
Advertisements
I experience that whenever I use set_zoom(), The camera locks up once it has completed the zoom.  Has anyone experienced something similar?
Unfortunately, this is an old story.  More information here : set_zoom problems in uBASIC & Lua scripts

There are a couple of build option that can help.  I'll take a look if you are willing to do some testing.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A590IS porting...
« Reply #951 on: 16 / March / 2017, 16:16:36 »
I'd be glad to do some testing, if you have any ideas on how to fix it.

*

Offline reyalp

  • ******
  • 14082
Re: A590IS porting...
« Reply #952 on: 16 / March / 2017, 17:36:15 »
I'd be glad to do some testing, if you have any ideas on how to fix it.
One cause can be the CHDK trying to re-focus after zooming. If your are currently using AF, you could try using MF instead. If you have some kind of continuous autofocus enabled, turning it off might help. Even if it isn't a solution for your situation, it might help narrow down the problem

Posting a romlog from the crash might also be useful: http://chdk.wikia.com/wiki/Debugging#Camera_crash_logs_.28romlog.29

In the thread that waterwingz linked, A590 is reported as working, so there may be another factor https://chdk.setepontos.com/index.php?topic=7071.msg75642#msg75642
Don't forget what the H stands for.

Re: A590IS porting...
« Reply #953 on: 16 / March / 2017, 22:31:33 »
I'd be glad to do some testing, if you have any ideas on how to fix it.
One cause can be the CHDK trying to re-focus after zooming. If your are currently using AF, you could try using MF instead. If you have some kind of continuous autofocus enabled, turning it off might help. Even if it isn't a solution for your situation, it might help narrow down the problem

Posting a romlog from the crash might also be useful: http://chdk.wikia.com/wiki/Debugging#Camera_crash_logs_.28romlog.29

In the thread that waterwingz linked, A590 is reported as working, so there may be another factor https://chdk.setepontos.com/index.php?topic=7071.msg75642#msg75642
@reyalp : the A590 is an old port.  Is it worth trying the newer options ?

Code: [Select]
    #undef  CAM_NEED_SET_ZOOM_DELAY             // Define to add a delay after setting the zoom position before resetting the focus position in shooting_set_zoom                                 
    #undef  CAM_USE_ALT_SET_ZOOM_POINT          // Define to use the alternate code in lens_set_zoom_point()
    #undef  CAM_USE_ALT_PT_MoveOpticalZoomAt    // Define to use the PT_MoveOpticalZoomAt() function in lens_set_zoom_point()

@HrClausen : did you try testing with the script posted here :
 Re: set_zoom problems in uBASIC & Lua scripts - help wanted with testing
« Last Edit: 16 / March / 2017, 22:51:36 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 14082
Re: A590IS porting...
« Reply #954 on: 17 / March / 2017, 00:07:29 »
@reyalp : the A590 is an old port.  Is it worth trying the newer options ?
Since it was previously reported as working by blackhole, I kind of suspect it's a different problem.
Don't forget what the H stands for.

Re: A590IS porting...
« Reply #955 on: 24 / March / 2017, 10:24:50 »
Code: [Select]
I tried waterwings' test script. It worked well until i added 'switch_mode_usb(1)' at the start of the script.

Then the screen vent black (but still on). I could stop the script, using the shoot button, but the power button was not responsive. The only way to get the camera back to normal was to take out the batteries.

*

Offline reyalp

  • ******
  • 14082
Re: A590IS porting...
« Reply #956 on: 24 / March / 2017, 13:01:14 »
I tried waterwings' test script. It worked well until i added 'switch_mode_usb(1)' at the start of the script.
Was the camera not in record mode (picture taking, not playback) when it "worked"?

The camera needs to be in record mode for any of the zoom functions to have effect. However, unless you have the camera connected to USB at the time, you should use the normal control on the camera or the set_record function
Don't forget what the H stands for.

Re: A590IS porting...
« Reply #957 on: 24 / March / 2017, 14:59:30 »
If I have the camera in record mode and use switch_mode_usb(1) it crashes. If it is in preview mode and I use switch_mode_usb(1), it works.


*

Offline reyalp

  • ******
  • 14082
Re: A590IS porting...
« Reply #958 on: 24 / March / 2017, 17:30:04 »
If I have the camera in record mode and use switch_mode_usb(1) it crashes. If it is in preview mode and I use switch_mode_usb(1), it works.
Thanks for the clarification. Was your original problem with set_zoom crashing also caused by this, or is it still unresolved?

FWIW, you should not use switch_mode_usb(1) if the camera is already in record mode, or if you do not have the camera connected to USB. If your script calls switch_mode_usb(1) it should use get_mode() first to check if a switch is needed.

Actually, in all normal cases you should use set_record instead of switch_mode_usb, since it detects whether USB is connected and works like switch_mode_usb() if needed.
Don't forget what the H stands for.

Re: A590IS porting...
« Reply #959 on: 25 / March / 2017, 16:57:30 »
Thanks, unfortunately it did not solve my original problem.

My application not starts up with the following

Code: [Select]
set_remote_timing(1000)
usb_force_active(true)
set_record(true)
while not get_mode() do
  sleep(10)
end
set_exit_key("no_key")

Then it receives commands via USB. However when it receives zoom commands, it crashes. I have attached a ROM log.

 

Related Topics