Nope, any name should be fine
All that is local Lua code, so you could also put the calls in a lua file (without the !), and execute it with something like -e"exec dofile('myfile.lua')"("exec" is the same as !, but some unix-ish shells might do funny things to it, so "exec" is safer on the command line). You'd need to remove or replace the "return" statements.This would give you give you more flexibility if you need any actual logic in your script, or want to display the return output in a more user friendly manner. If the quoted code is all you need, then a chdkptp -r file should be fine.
Note that the way you are doing things now, each camera will just execute the shoot command as soon as it arrives. multicam sends the commands sequentially, so there will be a gap between the first and last. If you want better sync, you should use init_sync and then shoot with a sync time, likeCode: [Select]!mc:cmdwait('shoot',{syncat=100})Off the top of my head, I'd expect you can get 8 cameras within 500ms without using init_sync. The "minimum sync delay" will give you an approximation of the amount of time it takes to send to all cameras.Another note:You may find you need some delay between things like rec and preshoot or shoot and play. You can insert a delay on the chdkptp side using sys.sleep(milliseconds)
!mc:cmdwait('shoot',{syncat=100})
Ahh and it is it possible somehow to start all cameras up with chdkptp?Because turning on/off all 48 cameras could get annoying by the time... Or is it not possible?
function cmds.shutdown()--e.g to run: !return mc:cmdwait('shutdown') write_status(true, 'when (if) all cameras have shutdown turn mains power off, but keep the rubber band on') shut_down() end
I'm embarassed but still haven't studied the sync code in detail (i'll try and get back at some stage if a higher authority doesn't first).
I have put the init_sync right after the start command right now. Is that correct?
When using your shoot code with the sync time a number is written after every "shoot". How do I need to understand this value? Is it milliseconds?
--[[get camera tick matching tstart + syncat<camera base time> + <tstart - local base time> + syncat ]]
function mc:init_sync_single_send(i,lcon,lt0,rt0,ticks,sends) local tsend = ustime.new() lcon:write_msg('tick') sends[i] = ustime.diffms(tsend)
rtadj = rt0 - send_stats.mean/2
rtadj = rt0 - tick_stats.mean - send_stats.mean/2
And my 3rd question: what time currency is minimum sync delay in?
All that said, I think ~30 ms max deviation is about the as good as the current code can do:The 10ms tick counter means that the "same" time on two cameras could be ~20ms apart, and the handoff from kbd_task to capt_seq that uses a 10ms sleep loop.
local s= "true, " .. util.serialize(results)local path = "C:\\CHDKPTP\\results\\results.txt" --file must preexist to be overwritten, otherwise errorlocal fh,err=io.open(path,'wb')if not fh then error(err)end fh:write(s) fh:close()
true, { [1]={ failed=false, done=true, status={ cmd="preshoot", status=true, }, }, [2]={ failed=false, done=true, status={ cmd="preshoot", status=true, }, },}
{ ["9A952438E0A647E9AC0179DDC30582D5"]={ id=2, }, ["449A58C8297A4CCDAD05327C6BDD6FC2"]={ id=4, }, ["689D5005104943C09E988E4EA8301E22"]={ id=1, }, E21B7D737E5D4291B5DD048230963CF6={ id=3, },}
$sData = FileRead("listfile"); Read file$aArray = StringRegExp($sData, '((?<=").*(?=")|id=\d+)', 3) ; Split into array
I haven't looked at the multicam.lua code for a while but assume my issue is due to the final serial key starting with a non numeric character. Is the missing speech mark created by (rather, not created by) multicam.lua to be expected?
Will also look forward to the option sometime too...
Started by Alarik « 1 2 3 4 5 » General Discussion and Assistance
Started by gauravparalikar91 General Help and Assistance on using CHDK stable releases
Started by goriskil « 1 2 » General Help and Assistance on using CHDK stable releases
Started by lipefrs « 1 2 » Script Writing
Started by mrred Script Writing