So I just started working on implementing the power sync and I'm having some trouble. When I plug my camera into the switch and the switch into my computer it won't connect to chdk_ptp. Does this mean my switch isn't wired properly or do I have to run a command first?
Edit 2: Nevermind I just had to put the command directly into the action function, but it no longer prints what it's supposed to in the console. Before I would type !return mc:stage(1) and it would print "__ Cameras Detected" by returning that string at the end of the function. Any advice?
I can now change the download folder and delete the images off the cameras afterwards, but is there some way I can delete the DCIM sub directory as well?
local myfiles=t=mc:find_files('A/DCIM',{dmatch='.*',fmatch='.*',dirsfirst=false,ff_func='find_files_all_fn'})mc:delete_files_list(myfiles)
mc:delete_files_list(myfles,{pretend=true})
local myfiles=mc:find_files('A/DCIM',{dmatch='%d%d%d___%d%d',fmatch='%d%d%d___%d%d/.*',dirsfirst=false,ff_func='find_files_all_fn'})
mc:download_images({dst='${id}_${shotseq}${ext}'})
mc:cmdwait('rec')
I've got everything working well but when I executeCode: [Select]mc:cmdwait('rec')How do I get rid of the highlighted bits?
edit: Oh also if there a variable I can grab that tells me how many images I downloaded with download_images,
and how do I tell printf to start a new line in the console?
edit2: Sorry to keep asking questions, but is there a boolean that says whether or not there's a script currently running on the cameras, or a start function that only starts a script if there isn't one already running?
There currently isn't a way to set the default without modifying the code, but I'll add one in a bit.
local total=0for id,imgs in pairs(list) do total=total+#imgsendprintf("total %d\n",total)
self:download_images({dst = 'imgdump/${serial}.JPG'})=>sjh1iu88ass291.JPG (This isn't an actual serial number, I just mashed random keys on my keyboard but you get the point)
self:download_images({dst = 'imgdump/${string.sub(serial,1,3)}.JPG})
update_mode_list failed a script is already running
I'd like to condense the image names down to the first 3 characters of the serial code, but if I try to use something likeCode: [Select]self:download_images({dst = 'imgdump/${string.sub(serial,1,3)}.JPG})I get errors. I assume I'm not allowed to use string.sub inside of download_images but since serial in a property of download images I'm not sure how to avoid this.
edit 2: Just commenting out the warnf line that printed them worked but I'm still getting one error occasionally,Code: [Select]update_mode_list failed a script is already running
I'd use CLI but I'm developing this system for commandlineaphobes (totally a real word).
So if I connect all 60 cameras and save their serial numbers, is there a way I can quickly iterate through all those serial numbers when one camera decides to die out and figure out which one died? So like if I can only connect to 58 the program would download a new list and cross reference the two list to see which serial numbers were missing?
I can probably add an option or a similar function to just report the dead ones and remove them from the current list.
Lately I've been working on my image naming convention. I need the image names from each camera to stay consistent in order to save the camera positions, and naming using the cameras serial numbers seems like the best way.
I assume I'm not allowed to use string.sub inside of download_images but since serial in a property of download images I'm not sure how to avoid this.
Started by jmonty General Help and Assistance on using CHDK stable releases
Started by Mike Lee General Discussion and Assistance
Started by axman General Help and Assistance on using CHDK stable releases
Started by andrew.stephens.754365 General Help and Assistance on using CHDK stable releases
Started by reyalp RAW Shooting and Processing