Script Newbie - page 3 - General Help and Assistance on using CHDK stable releases - CHDK Forum

Script Newbie

  • 21 Replies
  • 3664 Views
*

Offline reyalp

  • ******
  • 13290
Re: Script Newbie, Card Full file delete handling.
« Reply #20 on: 11 / December / 2017, 13:40:51 »
Advertisements
I know Canons have a shot buffer, but relying on this with larger fine high quality shot saves whilst the camera software is working hard and Ultimate is deleting a file seems too chancy?
FWIW, all these cameras write the file pretty much immediately, I don't think buffering is a factor. As long as the script uses a reasonable threshold to start deleting, I wouldn't expect any problems deleting files between shots in an intervalometer. Deleting, by itself, takes negligible time.

The only problem I'm aware of with deleting is some cameras (newer than your A560) crash if you delete images in record mode and then try to switch to playback or shutdown. For a script like ultimate, one way to work around this is to overwrite the existing files with 0 byte placeholders and delete them after switching to play.
Don't forget what the H stands for.

Re: Script Newbie, Card Full file delete handling.
« Reply #21 on: 11 / December / 2017, 15:43:19 »
FWIW, all these cameras write the file pretty much immediately, I don't think buffering is a factor. As long as the script uses a reasonable threshold to start deleting, I wouldn't expect any problems deleting files between shots in an intervalometer. Deleting, by itself, takes negligible time.

The only problem I'm aware of with deleting is some cameras (newer than your A560) crash if you delete images in record mode and then try to switch to playback or shutdown. For a script like ultimate, one way to work around this is to overwrite the existing files with 0 byte placeholders and delete them after switching to play.
It's been a while since I looked at the code but for ultimate.lua, IIRC I was pretty cautious with how I implemented the oldest image delete scheme.  The script may need to do a fair amount of directory scanning to find the oldest image in some cases. But more important,  it switches to Playback mode before deleting anything (to avoid the crash you noted).  This of course slows things down a lot.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics