PropertyCase Backup / Restore - page 2 - Script Writing - CHDK Forum

PropertyCase Backup / Restore

  • 12 Replies
  • 6830 Views
Re: PropertyCase Backup / Restore
« Reply #10 on: 23 / August / 2011, 04:02:35 »
Advertisements
Quote
edit:
reading the OP more carefully... writing back selected propcases would be fine. However, to do the custom WB, you will need to modify the C code or use eventproc calls, because the lua set_prop only accepts ints. Really, get_prop and set_prop should be modified to accept an optional length argument.

yes i did get the inclination reading the propcase wiki and doing a thorough search on the forum that the custom white balance values are not an int but spans a few bytes and setting them thru lua ( and therefore ptp ) would be impossible without patching the ptp (or lua) interface.

which is what prompted the original question.

however...
the situation is like this. i have no access to the camera once deployed as it is completely enclosed and therefore i open up the camera and short the power button (in fact there are test points which i can short)
now applying power to the camera starts it and no button press is required (im sure everyone knows that) howeve the side effect of this is that to turn off the camera i just remove the power. sometimes it doesnt even matter if the lens is in the extended postition as the camera is protected.

due to this i was not able to save the custom white balance values as there is no shutdown. however doing a lua shut_down() does indeed graciously shuts down the camera and saves the settings. so in a sense i have proviede a method of saving the (evaluated) custom white balance to the computer interface, the only side effect being that when ever the save sttings is invoked the camera shuts down and the power has to be removed and reapplied to restart it

so my immediate worry is over, however it would really be nice to backup certain propsets and restore it. kind of like a camera profile.

*

Offline reyalp

  • ******
  • 14082
Re: PropertyCase Backup / Restore
« Reply #11 on: 29 / August / 2011, 02:01:20 »
I added the ability to read and right any size propcase in lua, see http://chdk.setepontos.com/index.php?topic=2509.msg72440#msg72440

However, it appears that the WB values are read only :(
Don't forget what the H stands for.

Re: PropertyCase Backup / Restore
« Reply #12 on: 14 / September / 2011, 08:19:03 »
I added the ability to read and right any size propcase in lua, see http://chdk.setepontos.com/index.php?topic=2509.msg72440#msg72440

However, it appears that the WB values are read only :(

still the ability to read and write other than ints in the propcase is a significant step, thank you

alas !! the ability to programmatically change the wb would have been fantastic.

 

Related Topics