intervalometer for daylight hours - page 3 - Feature Requests - CHDK Forum supplierdeeply

intervalometer for daylight hours

  • 31 Replies
  • 16528 Views
*

Offline lapser

  • *****
  • 1093
Re: intervalometer for daylight hours
« Reply #20 on: 25 / March / 2013, 21:21:35 »
Advertisements
I think you missed philmoz's point.   As I read it,  if any files are deleted at any time after the camera powers up,  then the camera actually needs a full powerfail reset - not just a software restart from a script - or the image numbers will be messed up.
I was assuming that he would get the images off the card by powering down for real, removing the card, transferring with a card reader, and re-inserting the card.

But he probably wouldn't need a software reboot anyway. The SD card would easily hold 24 shots a day for a week, and if he's only gone a week, the tick count wouldn't be a problem.

But if you DID need to transfer and delete files off the card and then software reboot, it sounds like it would work as long as you didn't delete the last picture taken?
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: intervalometer for daylight hours
« Reply #21 on: 25 / March / 2013, 21:26:35 »
I was assuming that he would get the images off the card by powering down for real, removing the card, transferring with a card reader, and re-inserting the card.
I think you are tackling the wrong problem here.

I was concerned about what happens when the tic timer "goes negative"  or "wraps" if you just leave the camera running unattended.    Reyalp has suggested that Canon (and the various CHDK devs) never intended or tested their code to run for months - never mind days.

So an occasional reset via script seemed like a good idea to get things reset.   But not if it messes up image numbering.

Having said that ... as long as the OP periodically resets the camera while copying over saved images and deleting them,  this does not seem like such a big problem.

Update : So,  to make my question simple,  ignore what has been posted in this thread so far. Here is what I want to do :

1) Setup my CHDK camera to run an intervalometer script for a year unattended (external power supply on a UPS).
2) To avoid tic timer wrapping,  buffer overruns,  mallocs without free, stack creep,  counter overruns and any other software bug that fouls up code that needs to run for a long time,  I want the camera to automatically reset every day at 2 AM and then autostart the intervalometer script (that has been written knowing this will happen).
3) If I make sure the lens is parked ( playback mode plus a 2 minute delay ) then can I safely use the reboot() command without fear of image number corruption  (assuming nobody has touched the camera since this process started) ??
« Last Edit: 25 / March / 2013, 21:53:28 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: intervalometer for daylight hours
« Reply #22 on: 25 / March / 2013, 22:09:24 »
can I safely use the reboot() command without fear of image number corruption  (assuming nobody has touched the camera since this process started) ??
24 pictures a day for a year is only 8760 total, so there's no need to take any pictures off the card. I just put almost 12,000 pictures on my SD card yesterday!

My point is that any time he wants to, he can power down manually, transfer the pictures with a card reader, and power up manually with no exposure counter problem. The software reboots would still happen once a day, but the files would only be transferred after a manual power down.

[EDIT] Why do you have to stop taking pictures at night? Just throw them away if you don't want to use them. It's not that many extra pictures.
« Last Edit: 25 / March / 2013, 22:11:47 by lapser »
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: intervalometer for daylight hours
« Reply #23 on: 25 / March / 2013, 22:15:10 »
My point is that any time he wants to, he can power down manually, transfer the pictures with a card reader, and power up manually with no exposure counter problem. The software reboots would still happen once a day, but the files would only be transferred after a manual power down.
I'll try this again.

If the camera take 10 pictures a day and runs for a year unattended, with software reboots every morning, is there any petential issue with the exposure counter being corrupted? 

Nobody touches the camera,  removes files,  comes within 10 feet of the camera, or even notices it is there.

Will the exposure counter be okay at the end of the year even though the camera has been restarted (many times) without a complete power down as philmoz suggested was needed.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: intervalometer for daylight hours
« Reply #24 on: 25 / March / 2013, 22:17:24 »
Why do you have to stop taking pictures at night? Just throw them away if you don't want to use them. It's not that many extra pictures.
I suppose because its less wear & tear on the camera and it saves you an hour or two sorting, finding and deleting the dark shots when your year of shooting is up.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14121
Re: intervalometer for daylight hours
« Reply #25 on: 25 / March / 2013, 22:22:53 »
Is this correct, or am I not getting something?
In CHDK, like most 32 bit platforms (and many 64 bit ones) long and int are the same. The usage of "long" in various parts of CHDK is silly, but harmless. If the Canon firmware used a 64 bit value, it would be a long long or something like that.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14121
Re: intervalometer for daylight hours
« Reply #26 on: 25 / March / 2013, 22:26:00 »
My point is that any time he wants to, he can power down manually, transfer the pictures with a card reader, and power up manually with no exposure counter problem. The software reboots would still happen once a day, but the files would only be transferred after a manual power down.
I'll try this again.

If the camera take 10 pictures a day and runs for a year unattended, with software reboots every morning, is there any petential issue with the exposure counter being corrupted? 
As I said before, the camera should reset the counter based on the images present on the card, as described in the Canon manual. In my experience this works correctly, but if you wanted to be really sure it worked in a particular scenario, testing is a good idea. Corruption isn't the issue, it should either work or not.
Don't forget what the H stands for.

*

Offline lapser

  • *****
  • 1093
Re: intervalometer for daylight hours
« Reply #27 on: 25 / March / 2013, 22:32:06 »
If the camera take 10 pictures a day and runs for a year unattended, with software reboots every morning, is there any petential issue with the exposure counter being corrupted? 

Nobody touches the camera,  removes files,  comes within 10 feet of the camera, or even notices it is there.

Will the exposure counter be okay at the end of the year even though the camera has been restarted (many times) without a complete power down as philmoz suggested was needed.
If what reyalp says is true, it shouldn't be a problem.
That could be a deal killer if the exposure count doesn't get updated. The picture file names could be duplicated.
This isn't usually a problem because the camera normally scans the card to figure out the next non-conflicting number (this behavior is explained in the Canon manuals.)  It should only bite you if you are deleting images but want to keep the sequence intact.
Why do you have to stop taking pictures at night? Just throw them away if you don't want to use them. It's not that many extra pictures.
I suppose because its less wear & tear on the camera and it saves you an hour or two sorting, finding and deleting the dark shots when your year of shooting is up.
It complicates the script to try to figure when night and day starts. The pictures will be in separate folders each day, so it should be easy to find and throw away the ones that look "dark" from the thumbnails.

And one more thing. Maybe you don't even need to retract the lens before rebooting? Has anyone tried it? After a camera crash, the lens seems to retract with the next power on.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


Re: intervalometer for daylight hours
« Reply #28 on: 25 / March / 2013, 22:32:16 »
If the Canon firmware used a 64 bit value, it would be a long long or something like that.
Apparently, the C99 standard says that it will have at least 64 bits
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14121
Re: intervalometer for daylight hours
« Reply #29 on: 25 / March / 2013, 22:35:26 »
It's a problem, unless the images are still on the card.
Yes, I was responding to lapsers question about clobbering files on the card, and specifically added the caveat It should only bite you if you are deleting images but want to keep the sequence intact.
Quote
Requires a power cycle after deleting the images to properly update the image counter.
Technically, it probably only requires one file with a recognized prefix and/or extension and the correct number. So you could probably make a wrapper for reboot that uses get_exp_count() and creates a dummy file.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal