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

chdkptp - alternative ptp client

  • 1106 Replies
  • 434484 Views
*

Offline reyalp

  • ******
  • 13717
Re: alternative ptp client
« Reply #720 on: 01 / September / 2014, 17:01:24 »
Advertisements
if there is no device, chdkptp exits with the following error message:

Code: [Select]
ERROR: no matching devices found
ERROR: not connected

and error code / return code 0. I would like to have different return codes for every error type. What do you think about that?
Changing the return status if -c fails is a good idea. I'm not sure about making unique return codes for every error, that could be quite difficult to maintain.

Quote
With my Canon A2500 using rs -cont=6 takes 9,6 seconds while rs -quick=6 takes about 11 seconds. Is there any difference, beside the fact that the camera has to be in continuous mode for -cont?
Some cameras have problem with remote shoot in continuous mode. Other than that, there shouldn't be much difference.

Quote
Now it's a little later and darker, so the camera needs 16.2 vs. 14.3 seconds.
If you want an apples to apples comparison, you should set shutter speed and ISO (ISO affects processing time in some cases). The pictures don't need to be well exposed to benchmark.

Quote
Would it make a difference regarding to the speed if -cont=n/-quick=n would be available to the "shoot" operation with and i download all pictures afterwards?
Maybe, depending on the camera and SD card speed, and whether you are interested in the total time (including download) or just the time between shots. I do plan to add similar functionality to shoot at some point.

Quote
After executing -ereboot, the A2500 doesnt respond to chdkptp nor any key presses, not even switching off works, i have to remove the battery and after re-inserting the battery, the camera works again.
This sounds like a bug in the port, so you should bring it up in the a2500 porting thread if it's not already discussed there. Just to make sure it's not PTP related you can make a lua script with just reboot() in it.

Quote
I always execute chdkptp -c -e"rec" -e"shoot ... or chdkptp -c -e"rec" -e"lvdumpimg ..." because the camera is set to play mode on initial startup. Is there any way to suppress the error message "ERROR: already in rec" ?
You could change the code. In cli.lua (around line 2365 in the current trunk), replace
Code: [Select]
return false,'already in rec'
with
Code: [Select]
return true
This should probably be an info or warning message rather than an error, so I may change it.
Quote
Is there a way to check the mode?
Code: [Select]
!return con:execwait("return get_mode()")
But in that case, you might as well just use the code sent by the rec command with the modification above.

Quote
I just find a reference to "list" which states if the camera is connected or not, but nothing about the current mode.
Getting the mode requires running lua script on the camera, so it doesn't belong in list.

Instead of stringing together a bunch of -e commands and so on, you might be better off putting everything a lua module and running it with something like
Code: [Select]
chdkptp  -e'exec require"mymodule"'
You can run cli commands from Lua code using cli:execute. Then you can check the status in code rather than displaying if you want.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4450
Re: alternative ptp client
« Reply #721 on: 13 / September / 2014, 18:32:19 »
While testing for side effects with my a3400 (dryos r50), I noticed that rs -quick gets stuck after the first shot (last console debug line is "get data 2"). I have to press the shutter by hand to complete the series. This anomaly only happens in single shot mode. Am I the only one experiencing this (using current CHDK and chdkptp trunk)?

*

Offline reyalp

  • ******
  • 13717
Re: alternative ptp client
« Reply #722 on: 13 / September / 2014, 19:06:30 »
While testing for side effects with my a3400 (dryos r50), I noticed that rs -quick gets stuck after the first shot (last console debug line is "get data 2"). I have to press the shutter by hand to complete the series. This anomaly only happens in single shot mode. Am I the only one experiencing this (using current CHDK and chdkptp trunk)?
Sounds like the second shot didn't start.

Do you have review enabled?

I think it should time out eventually if the shot doesn't start, probably somewhere form 10-30 seconds.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4450
Re: alternative ptp client
« Reply #723 on: 13 / September / 2014, 19:18:32 »
Do you have review enabled?
No (enabling review made no difference). Nafraf reports that his a810 is working normally. The only obvious difference between these models is that the a3400 has IS and touchscreen...
After some tries, rs -quick worked with a dark scene, got stuck with a relatively bright one  :blink: . Anyway, the issue isn't related to my pending fwt patch.


*

Offline reyalp

  • ******
  • 13717
Re: alternative ptp client
« Reply #724 on: 13 / September / 2014, 19:35:14 »
No (enabling review made no difference). Nafraf reports that his a810 is working normally. The only obvious difference between these models is that the a3400 has IS and touchscreen...
I suspect that for some reason the full press for the second shot isn't being recognized, maybe because it comes too soon after the previous shot. Does it time out eventually?

If you use something like -int=5 does it work?
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4450
Re: alternative ptp client
« Reply #725 on: 13 / September / 2014, 19:54:13 »
I suspect that for some reason the full press for the second shot isn't being recognized, maybe because it comes too soon after the previous shot. Does it time out eventually?
Yes, I get the usual timeout if I wait for it.
When the display comes back after the first shot, the AF-point zoom is no longer visible (as if the shutter was no longer (half)pressed).

Quote
If you use something like -int=5 does it work?
Yes...

*

Offline reyalp

  • ******
  • 13717
Re: alternative ptp client
« Reply #726 on: 13 / September / 2014, 20:04:58 »
Quote
If you use something like -int=5 does it work?
Yes...
So probably some undetermined time is needed between the release (or file counter increment) and the next press.

In rlibs.lua (around line 1299 in the current trunk) you can change
Code: [Select]
local tsleep=t_next - get_tick_count()
if tsleep > 0 then
if read_usb_msg(tsleep) == 'quit' then
break
end
end
to something like
Code: [Select]
local tsleep=t_next - get_tick_count()
if tsleep < 10 then
tsleep=10
end
if read_usb_msg(tsleep) == 'quit' then
break
end
If tsleep=10 isn't enough, you can try increasing it.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4450
Re: alternative ptp client
« Reply #727 on: 14 / September / 2014, 10:54:31 »
If tsleep=10 isn't enough, you can try increasing it.
Doesn't help (even tsleep=1000).
The issue is related to ISO: ISO100 is working normally, ISO400 gets stuck (the cam remains in ALT mode after the first shot, but the ALT indicator isn't always visible).
This is likely some camera specific stuff, and it isn't really needed since -cont is working.


*

Offline reyalp

  • ******
  • 13717
Re: alternative ptp client
« Reply #728 on: 14 / September / 2014, 16:07:24 »
Doesn't help (even tsleep=1000).
Hmm, if -int worked, maybe my code above wasn't correct. 5000 should be roughly the same as -int=5 (plust the actual shooting time)

Quote
The issue is related to ISO: ISO100 is working normally, ISO400 gets stuck (the cam remains in ALT mode after the first shot, but the ALT indicator isn't always visible).
This is likely some camera specific stuff, and it isn't really needed since -cont is working.
I guess this affects other uses of the "hold half press and click shoot" strategy, so it would be good to understand.  I should add some better diagnostics to remoteshoot anyway.

Does the camera show the "busy" message after shooting at iso400?

I'll try with high ISO on my cameras.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4450
Re: alternative ptp client
« Reply #729 on: 14 / September / 2014, 16:10:49 »
Does the camera show the "busy" message after shooting at iso400?
Yes. Extra noise reduction, I guess.

 

Related Topics