chdkptp - alternative ptp client - page 64 - General Discussion and Assistance - CHDK Forum supplierdeeply

chdkptp - alternative ptp client

  • 1106 Replies
  • 517695 Views
*

Offline tpont

  • **
  • 81
Re: alternative ptp client
« Reply #630 on: 24 / April / 2014, 16:51:25 »
Advertisements
Nice, thank you! But I discovered that the path command must drop the equal sign: this works "path C:\test" and this doesn't "path=C:\test"

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #631 on: 24 / April / 2014, 21:47:41 »
Nice, thank you! But I discovered that the path command must drop the equal sign: this works "path C:\test" and this doesn't "path=C:\test"
Oops you are right, my mistake. I ran that example and didn't even notice it was saving them with = in the name.
Don't forget what the H stands for.

*

Online blackhole

  • *****
  • 940
  • A590IS 101b
    • Planetary astrophotography
Re: alternative ptp client
« Reply #632 on: 25 / April / 2014, 11:10:03 »
I noticed strange behavior with focusing in macro mode.
Focus does not work well if I press 'shoot half' button in the GUI.
If I physically press a button on the camera focusing is flawless.
I have the same behavior in the 1.2 and 1.3 versions, used cameras are A530 and A590. Older versions of CHDK works well. The last five focusing in the video are made with physical press on the shutter button.
Is there anyone an explanation for this?
https://www.youtube.com/watch?v=cgXliLbnx2E&feature=youtu.be

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #633 on: 25 / April / 2014, 15:53:36 »
I noticed strange behavior with focusing in macro mode.
Focus does not work well if I press 'shoot half' button in the GUI.
If I physically press a button on the camera focusing is flawless.
As far as the Canon firmware is concerned, the only difference between pressing the physical button and using the GUI should be the duration of the the press. The half shoot button waits until get_shooting() becomes true, or 1 second (unless you are in movie mode, then it just uses 1 second)

I suppose it's possible that releasing shoot_half the instant that get_shooting() goes true may behave differently. You could try a hardcoded duration, like
=press'shoot_half' sleep(1000)

I very much doubt this behavior varies depending on CHDK version. All CHDK does is fiddle the bit that tells the Canon firmware the button is pushed, and that hasn't changed. Far more likely it just varies on it's own.
Don't forget what the H stands for.


*

Online blackhole

  • *****
  • 940
  • A590IS 101b
    • Planetary astrophotography
Re: alternative ptp client
« Reply #634 on: 25 / April / 2014, 17:50:00 »
Quote
You could try a hardcoded duration, like =press'shoot_half' sleep(1000)
Yes, it seems that the problem is in the duration of the press.
=press'shoot_half' sleep(1000) doesn't work
=press'shoot_half' sleep(3000) works well
Quote
I very much doubt this behavior varies depending on CHDK version
Old tsvstar-uitest branch,1.2.0-r2198 works without problems,I don't know why. :D

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #635 on: 25 / April / 2014, 21:54:01 »
Old tsvstar-uitest branch,1.2.0-r2198 works without problems,I don't know why. :D
Time required varies depending on conditions, nothing to do with the CHDK build. I really doubt the CHDK build actually matters, there is no plausible mechanism. As I said before CHDK isn't involved in the actual focusing process at all, it just holds the key down.

The fact that it takes 3 seconds to do it means your camera is really struggling to focus, so large variations aren't a surprise.

I'll could make the half press timeout longer, or adjustable. 1 second was just something that seemed reasonable.

If you want to adjust it, you can change 100 in the following code in gui.lua (near line 400 in the current trunk)
Code: [Select]
repeat
sleep(10)
n = n + 1
until get_shooting() == true or n > 100
release("shoot_half")
The number is 100ths of second, since the sleeps are 10ms.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: alternative ptp client
« Reply #636 on: 25 / April / 2014, 22:07:37 »
Old tsvstar-uitest branch,1.2.0-r2198 works without problems,I don't know why. :D
Time required varies depending on conditions, nothing to do with the CHDK build. I really doubt the CHDK build actually matters, there is no plausible mechanism. As I said before CHDK isn't involved in the actual focusing process at all, it just holds the key down.

The fact that it takes 3 seconds to do it means your camera is really struggling to focus, so large variations aren't a surprise.

I'll could make the half press timeout longer, or adjustable. 1 second was just something that seemed reasonable.

If you want to adjust it, you can change 100 in the following code in gui.lua (near line 400 in the current trunk)
Code: [Select]
repeat
sleep(10)
n = n + 1
until get_shooting() == true or n > 100
release("shoot_half")
The number is 100ths of second, since the sleeps are 10ms.

I can reproduce the behaviour blackhole demonstrates in his video, on my G12 (although not 100%).

These steps will reproduce the effect:
- connect with chdkptp, change to REC mode
- set camera to Macro focus mode
- press 'shutter half press' button in chdkptp and focus on an object ~30cm away
- place an object close to the lens (<5cm)
- press 'shutter half press' button in chdkptp

The camera will try and focus on the close object. It appears to set the focus distance; but then suddenly jump back to the previous focus distance that was further away from the camera.

Have not tried old CHDK builds yet.

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)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #637 on: 26 / April / 2014, 01:31:18 »
The camera will try and focus on the close object. It appears to set the focus distance; but then suddenly jump back to the previous focus distance that was further away from the camera.
I see something similar on my D10 manually pressing the button without PTP connected at all. I don't see any evidence it happens more often with chdkptp connected.

edit:
I added setting for the halfshoot wait, gui_shoot_half_timeout. Default is no 3000.
« Last Edit: 26 / April / 2014, 01:37:22 by reyalp »
Don't forget what the H stands for.


*

Online blackhole

  • *****
  • 940
  • A590IS 101b
    • Planetary astrophotography
Re: alternative ptp client
« Reply #638 on: 26 / April / 2014, 03:50:36 »
The secret is in the distance of the object from the lens. If the SD is lower than the recommended values for the minimum distance in Macro mode comes to this kind of behavior. By the sounds that I hear from the camera looks like the camera in such difficult conditions, twice repeating the process of focusing. I just tried the same conditions with ptpCamGui 2.0.131 and can not reproduce this behavior, focusing carry out normal no matter what the SD is only 25mm.

@Philmoz
Quote
Old tsvstar-uitest branch,1.2.0-r2198 works without problems,I don't know why.
Can you please try the mentioned version of CHDK.
« Last Edit: 26 / April / 2014, 03:56:43 by blackhole »

*

Offline reyalp

  • ******
  • 14082
Re: alternative ptp client
« Reply #639 on: 26 / April / 2014, 04:13:39 »
I just tried the same conditions with ptpCamGui 2.0.131 and can not reproduce this behavior, focusing carry out normal no matter what the SD is only 25mm.
As I've already told you several times, CHDK isn't involved in the AF process at all, it's just pressing the buttons. ptpCamGUI does exactly the same thing.

The only vaguely plausible mechanism I can think of is that the live view is hogging so much CPU it interferes with AF somehow. You should be able to test that by turning off the live view, but IMO it's far more likely the behavior is just unpredictable.

There is really no chance that the CHDK build matters. The key press code has worked the same way since the very early days of CHDK.

... but what do I know  :-[
Don't forget what the H stands for.

 

Related Topics