Hi All,
First post here. To start, thanks to all those who've put the work into the chdkptp. Pretty amazing the functionality that is unlocked on Point and Shoot's with this software.
I'm using CHDK PTP gui and am looking to get some advice on a means to write some LUA that will allow me to execute a shoot and download command at a user defined interval (basic intervalometer functionality) and will then yield functionality back to the GUI's live view functions in between shots. The camera will be mounted in a pressure housing deployed on a ROV, down to 1000 ft and thus I'd like the ability to see what is being shot in real time through the live view. Essentially, I'm trying to run:
"shoot -dl="..dest_dir.."\\"..dive_number.."${ldate}${ext}"
Where the variables
dest_dir and
dive_number are pulled from iup.text{} functions I've add to the GUI. This all works fine, and the camera (a G5X) shoots and download the expected files when I run this command.
I've then configured a new button in gui.lua to run the attached code snippet, which starts shooting and downloading files at the user defined interval. As I gather is expected, when I try to run this code as a LUA function for interval shooting and call sleep() between shots, the live view functionality of the GUI is unavailable since it is blocked by the LUA code I am running in the repeat loop used for interval shooting.
I've also tried running a Camera side script, which does allow me to have the live view active while doing interval shots, but as far I can tell, there is no camera-side function to allow me effect a photo download operation (or have I missed it?).
I've thought about running some Python to just send messages through cli to chdkptp at the shooting interval that I desire, but I feel like a solution doesn't require a second, external script to run is a better bet an ultimately would be simpler for other users who may be using the system I'm putting together.
Any tips would be greatly appreciated. I've read this post
https://chdk.setepontos.com/index.php?topic=12773.0 , which seems similar to what I'm trying to do, but I'm new to LUA (just trying to pick it up for this project) and couldn't work out which variables I'd need to access if I were try to piggy back off the timer functions being used for the live view.
Thanks