supplierdeeply

get_shooting

  • 6 Replies
  • 443 Views
get_shooting
« on: 06 / August / 2018, 13:39:52 »
Advertisements
I am trying to determine when the camera is ready to shoot after having completed a (longer) shot. For most of the shooting get_shooting returns 1, but it starts to return 0 before the camera is ready to shoot again. Is there another method?
Best, Lee

*

Offline reyalp

  • ******
  • 11541
Re: get_shooting
« Reply #1 on: 06 / August / 2018, 17:42:47 »
I am trying to determine when the camera is ready to shoot after having completed a (longer) shot. For most of the shooting get_shooting returns 1, but it starts to return 0 before the camera is ready to shoot again. Is there another method?
Unfortunately, there isn't a good way to know exactly when the camera is ready to shoot again.

If you describe a little more what you are trying to do, we might be able go give additional advice.
Don't forget what the H stands for.

Re: get_shooting
« Reply #2 on: 07 / August / 2018, 11:46:08 »
Hi,
I was trying to count shots in the attached interval script.
As it stands the script can be useful for counting a series of continuous bursts, because it sleeps for the period of the burst, and then counts the number of bursts. So the sequence works well: focus, adjust exposure, continuous burst for y seconds, repeat c times.
However when taking longer, single shots it will continue to enter the subroutines "active" and "lightright", pressing and releasing shoot_full and incrementing the counter C all the time.
I suppose I could increase the shooting interval to track with the exposure time (60 seconds!), but there appears to be a "dead zone" after each shot where the camera is saving to the card, and this can vary depending on whether the raw shots are being saved.
Cheers, Lee

Re: get_shooting
« Reply #3 on: 08 / August / 2018, 00:28:51 »
I was trying to count shots in the attached interval script.
Sorry, no time to study your script.

But reading your description I can't help wondering if you are aware that there is a propcase value you can use to monitor what shot number the camera thinks it has just saved?
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 11541
Re: get_shooting
« Reply #4 on: 10 / August / 2018, 02:01:39 »
But reading your description I can't help wondering if you are aware that there is a propcase value you can use to monitor what shot number the camera thinks it has just saved?
Yeah, if what SkepticaLee is looking for is just to know how many shots have been taken,  get_exp_count should do.

If the aim is to know when the camera is ready to shoot again, that would be more difficult. get_exp_count generally increments around the time the raw would start saving.
Don't forget what the H stands for.

Re: get_shooting
« Reply #5 on: 16 / August / 2018, 14:27:15 »
Hi all, The only problem I see is that get_exp_count returns the index of the last picture taken. So if you took 10 pictures yesterday and are using a new folder daily, then get_exp_count would be 10. After today's first shot get_exp_count returns 1. So my intervalometer would run correctly with the following code:

rem initialise values
x=get_exp_count
rem counter c
c=0
rem loop until c reaches the value C, the maximum number of shots
rem update value?
if (x<>get_exp_count) then
  x=get_exp_count
  c=c+1
endif

This will not, however work as intended if only one shot was taken in the previous folder, because x will start as 1 and after the first shot it will be updated to 1, i.e. the first shot will be taken twice. So you would always end up with one more shot than the value C allows.

Don't suppose much can be done about it, except to take one fresh shot at the beginning of each day.

Cheers, Lee
« Last Edit: 16 / August / 2018, 14:43:10 by SkepticaLee »

*

Offline reyalp

  • ******
  • 11541
Re: get_shooting
« Reply #6 on: 16 / August / 2018, 16:46:50 »
This will not, however work as intended if only one shot was taken in the previous folder, because x will start as 1 and after the first shot it will be updated to 1, i.e. the first shot will be taken twice. So you would always end up with one more shot than the value C allows.
Yeah, I was going to suggest that approach, but hadn't thought of the daily folder thing. The image counter behavior is also somewhat camera and setting specific.

Quote
Don't suppose much can be done about it, except to take one fresh shot at the beginning of each day.
If you use lua, you can can use one of the shooting hook counters (https://chdk.wikia.com/wiki/Script_Shooting_Hooks) to take the actual number of shots taken taken by a script. You don't have to use the rest of the functionality, you can just check hook_shoot.count() or hook_raw.count(). These are guaranteed to start at 0 when your script starts, and (barring bugs in the port) increment once each the the corresponding stage of shooting is reached.

I suppose the counters could be made available in ubasic.

The image counter flash param includes both the folder and shot number, but is also only available in lua.

I realize switching to lua might be more than you want to get into, but it does give you a lot more options.
Don't forget what the H stands for.