A590IS porting...

  • 968 Replies
  • 198162 Views
*

Offline reyalp

  • ******
  • 10863
Re: A590IS porting...
« Reply #960 on: 25 / March / 2017, 18:09:03 »
Advertisements
Thanks, that's useful information.

When you start the camera, is the play/rec switch in the playback or record position? In general, you should always start in playback if you intend to use USB mode switching.

Do you have some delay between the set_record and starting the zoom? If not, I'd try putting something like 1 second between them as a test.

The last entry I see in the romlog is


00014730: SSAPI::DoAFLock

Does you script try to engage AF Lock?
Don't forget what the H stands for.

Re: A590IS porting...
« Reply #961 on: 26 / March / 2017, 13:31:08 »
Yes, the play/rec switch is in playback position.

I read somewhere a suggestion that autofocus should be locked before zooming.

In the attached l have removed the AF lock and unlock commands.

*

Offline reyalp

  • ******
  • 10863
Re: A590IS porting...
« Reply #962 on: 26 / March / 2017, 15:22:23 »
I read somewhere a suggestion that autofocus should be locked before zooming.
FWIW, this definitely isn't recommended as a general rule, although may avoid problems on certain ports.

I assume when you tried without AF Lock, the camera was in regular AF Mode?

When you zoom, are you using key presses, or using set_zoom? The "PressTeleButton" in the log suggests it's key presses, but normally zoom related crashes only affect CHDK set zoom. Scripted key clicks should really be no different than pressing the physical key.

What shooting mode is the camera in?

Have you tried reducing your script to a minimal test case? Just turn on the camera, switch to rec, zoom, without anything else?
Don't forget what the H stands for.

Re: A590IS porting...
« Reply #963 on: 26 / March / 2017, 18:19:40 »
My original application read the zoom position, and if it has changed, it broadcasts it to a number of cameras via USB. Currently I only have one camera, so I effectively do a loopback. And even if I set the zoom to the value it has already, the camera crashes.

I tried, a minimalist case, where I enable USB, switch to record and then zoom, without any manual zooming or messagen. That worked without problems. So the problem must be interference with either the manual zoom, or the messaging.

I will investigate further.


*

Offline reyalp

  • ******
  • 10863
Re: A590IS porting...
« Reply #964 on: 26 / March / 2017, 19:50:44 »
What canon firmware version does your camera have?

Quote
I tried, a minimalist case, where I enable USB, switch to record and then zoom, without any manual zooming or messagen. That worked without problems. So the problem must be interference with either the manual zoom, or the messaging.
In the log, it looks like the canon firmware is seeing the key press. If both the manual zoom using keys and the set_zoom happen at the same time, it wouldn't be surprising to have problems.
Don't forget what the H stands for.

Re: A590IS porting...
« Reply #965 on: 26 / March / 2017, 20:01:24 »
In the log, it looks like the canon firmware is seeing the key press. If both the manual zoom using keys and the set_zoom happen at the same time, it wouldn't be surprising to have problems.
So,  a copy of the script being used might be appropriate here before usefull further debugging help can happen?
Ported : A1200  SD940  G10  Powershot N  G16*

Re: A590IS porting...
« Reply #966 on: 29 / March / 2017, 16:25:20 »
I figured it out. It is interference between press("zoom_in") and set_zoom().

Code: [Select]
press("zoom_in")
p=get_zoom()
set_zoom(p+1)

If I  add release("zoom_in") and sleep(1000) for before set_zoom(), it works

*

Offline reyalp

  • ******
  • 10863
Re: A590IS porting...
« Reply #967 on: 29 / March / 2017, 16:47:05 »
I figured it out. It is interference between press("zoom_in") and set_zoom().
Thanks for reporting. I wouldn't expect them to work simultaneously.

We could maybe make set_zoom() check zoom_busy before starting, but it really only makes sense to use one method at a time.
Don't forget what the H stands for.


Re: A590IS porting...
« Reply #968 on: 31 / March / 2017, 07:02:56 »
I agree that it only makes sense to use either. On the other hand, I don't think it should crash the camera, if it in any way can be avoided.


Thanks for your assistance.

 

Related Topics