Cameras dropping out of autostart

  • 9 Replies
  • 1156 Views
Cameras dropping out of autostart
« on: 07 / July / 2016, 15:15:41 »
Advertisements
Hi,


I have two (different models) cameras taking timelapses and for the most part they're running great.


I've got the scripts set to auto start, and the power button held down, so that if the power supply is interrupted they just start again on power restore.


but.... this is not totally reliable - they seem to sometimes "lose" the autostart script" setting, and also sometimes even stop booting in to CHDK.
One is an Ixus 220HS and the other an ixus 70.
a further annoyance on the ixus 70 is that it seems to sometimes default in to taking raw files too.
I think that the normal menu settings are stored in a config file on the card - is there any way to get them right then make this file read only?
I've pretty much achieved that with the script by altering the default values to my preferred ones, but not for the main menus.


Thanks,


James
[size=78%]  [/size]

*

Offline reyalp

  • ******
  • 11090
Re: Cameras dropping out of autostart
« Reply #1 on: 07 / July / 2016, 17:10:38 »
Some additional information might be helpful

What version of CHDK are you using? If you are using something older than 1.4, it might be worth trying the current version. If you do try a different build, keeping a backup of the build and cfg files you are currently using is a good idea.

What scripts are you using? If you are using one you wrote or modified yourself, please attach it.

CHDK shouldn't spontaneously change settings itself, but some scripts might change the autostart setting. Of course, if you set it to "once" it should be cleared after the cameras reboots once.

Quote
a further annoyance on the ixus 70 is that it seems to sometimes default in to taking raw files too.
The most common cause of this is accidentally hitting the raw shortcut key in alt mode. You could modify your script to disable raw at startup using the set_raw function.

You can also set the autostart value from script using http://chdk.wikia.com/wiki/Script_commands#get_autostart_.26_set_autostart but if it's really changing by itself there must be some other problem.

Quote
I think that the normal menu settings are stored in a config file on the card - is there any way to get them right then make this file read only?
The settings are stored in the CFG files. It is possible to set the normal FAT "read only" flag on files, but I don't know offhand whether it actually stops the firmware from writing the files, or what impact it would have on CHDK.
Don't forget what the H stands for.

Re: Cameras dropping out of autostart
« Reply #2 on: 07 / July / 2016, 18:18:04 »
Thanks for the info.
I'm away from the cameras right now.
I'm using the latest build that's relevant for each camera -  I've used STICK to build the cards.
the script I'm using is Ultimate.lua
I kinda fear that CHDK may just ignore the FAT read only flag - but I'll give that a go!

Cheers,

James

Re: Cameras dropping out of autostart
« Reply #3 on: 07 / July / 2016, 21:34:24 »
the script I'm using is Ultimate.lua
Note that Ultimate.lua will turn off "autostart" when the script reaches an "end" condition (total number of shots / MENU key pressed / battery low / SD card full). 

It also sets the autostart flag to "run once" mode so if you abort the script somehow the camera will no longer be in "autostart always" mode.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 11090
Re: Cameras dropping out of autostart
« Reply #4 on: 07 / July / 2016, 21:38:36 »
I kinda fear that CHDK may just ignore the FAT read only flag - but I'll give that a go!
CHDK uses the regular OS files functions. From a quick test, the IO functions used by Lua fail you try to open a read-only file for writing.

The config code uses lower level functions, so it might not behave the same way but I suspect it will. From a quick look it appears the config code should gracefully handle errors opening the file, but I wouldn't bet too much on that.

I suggest testing this manually, e.g. set the files read only, open the menu, change a setting, leave the menu, reboot the camera and check whether the setting was changed.

FWIW can use set_file_attributes in lua to set readonly (and other attributes), and os.stat to see the values. This may be convenient for testing if you have chdkptp set up.
Don't forget what the H stands for.

Re: Cameras dropping out of autostart
« Reply #5 on: 07 / July / 2016, 21:43:38 »
I suggest testing this manually, e.g. set the files read only, open the menu, change a setting, leave the menu, reboot the camera and check whether the setting was changed.

Or you could just comment out / delete this line in the script :
       
Code: [Select]
set_autostart(2)               -- autostart once around line 410 (depending on the script version).

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Cameras dropping out of autostart
« Reply #6 on: 08 / July / 2016, 02:51:10 »
Ah thanks.  I bet that's it for atleast one of the niggles.
I'll comment out the line and give that a go, and if needed I'll play with file attributes.

Cheers

James

Re: Cameras dropping out of autostart
« Reply #7 on: 08 / July / 2016, 12:32:38 »
Ah thanks.  I bet that's it for at least one of the niggles.
If the other niggle is RAW engaging at random,  it's almost certainly the CHDK keyboard shortcut that is catching you.  I've never been able to get much traction reaching consensus that it should be possible to disable that feature - and to have it default as OFF.   Once something gets into CHDK, it's pretty much there forever, no matter how annoying it is.

Having said that, you could add another line at the start of the script to ensure RAW is disabled :

Code: [Select]
    set_raw(false)
Edit : corrected code snippet per reyalp's comment
« Last Edit: 08 / July / 2016, 18:16:52 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 11090
Re: Cameras dropping out of autostart
« Reply #8 on: 08 / July / 2016, 16:21:56 »
Code: [Select]
    set_raw(1)
I think you mean set_raw(0) or set_raw(false)

edit:
And FWIW, I'd love to have these shortcuts be optional, and would be fine with having off be the default. However, from what I remember of the code it's a bit convoluted.
« Last Edit: 08 / July / 2016, 16:35:39 by reyalp »
Don't forget what the H stands for.

Re: Cameras dropping out of autostart
« Reply #9 on: 08 / July / 2016, 18:18:31 »
And FWIW, I'd love to have these shortcuts be optional, and would be fine with having off be the default. However, from what I remember of the code it's a bit convoluted.
Very. 

I've been plugging away at a new UI idea that I hope to share soon for feedback / comments.  While working on that I've been looking at how to disable those shortcuts.  Maybe I'll submit that first as a seperate patch.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics