rem Author ~SuperManu~rem For A610rem May work on others digicII@title MD Universal@param a Columns@default a 6@param b Rows@default b 4rem Threshold: 10=Lightning, 12=Sunshine, 24=Cloudy, 36=Dawn/Dusk@param c Threshold (0-255)@default c 10@param d Comparison Interval (mSec)@default d 1rem Delay: 0=Ultrafast(Lightning), 16=Normal, 32=Slow@param e Trigger Delay (0.1 secs)@default e 1@param f Pixel block size@default f 6rem 1=luminance (Y), 0=blue – luminance (U), 2=red – luminance (V) or individual 3=Red, 4=Green or 5=Blue values@param h Measure Mode(0-U,1-Y,2-V)@default h 1@param i Masking (0=No 1=Incl 2=Excl)@default i 0@param j Incl/Excl Cols & Rows@default j 0rem on A610, the camera sleeps after 3 minutes, time-out (k) of 170 seconds ovoid thisrem in the case of pre-focusing (param u), it is nice to not have to long time-out, because exposure condition may change on timerem feel free to set up k much higher if your camera stay awake a longer time@param k Time-out period (s)@default k 170rem n is the number of shoots taken in continuous mode (continuous mode has to be selected before)@param n Continuous shoot (s)@default n 5rem s value: f=direct shoot, nf=shoot without refocusing, c=continuous shoot without refocus@param s Shoot (0=f/1=nf/2=c)@default s 1rem u value: Pre-focus before detection 0:No, normal shoot, 1:Yes, faster (e.g. lightning storm)@param u Pre-focus (0=No)@default u 1if j>a/2 then j=a/2if j>b/2 then j=b/2if j<0 then j=0if s<0 then let s=0if s>2 then let s=2get_prop 0 xif x=18 then let s=3get_prop 6 yif s<>2 and y=1 then let s=2else if s=2 and y<>1 then let s=0endifif s=0 then let g=1 else let g=0e=e*100k=k*1000print "press Shutter Button to Stop"while 1 if x<>18 and u<>0 then gosub "make_focus" md_detect_motion a, b, h, k, d, c, 1, t, i, j+1, j+1, a-j, b-j, g, f, e if t>0 then print t, " cells detected" if t=0 then gosub "awake" if t>0 and u=0 and s=2 then gosub "make_focus" if t>0 and s=1 then click "shoot_full" if t>0 and s=2 then gosub "shoot_continuously" if t>0 and s=3 then gosub "record_video" if t>0 and x<>18 then do get_prop 205 p until p<>1 let t=0 endifwend:make_focus press "shoot_half" do get_prop 205 p until p=1return:shoot_continuously press "shoot_full" sleep n*1000 release "shoot_full"return:record_video click "shoot_full" sleep n*1000 click "shoot_full"return:awake release "shoot_half" if x<>18 and u=0 then click "set" click "set" endifreturnend
@title sx30 md@param a Columns@default a 6@param b Rows@default b 4@param c Threshold (0-255)@default c 15@param d Comparison Interval (mSec)@default d 1@param e Trigger Delay (0.1 secs)@default e 0@param f Pixel block size@default f 6@param h Measure Mode(0-U,1-Y,2-V)@default h 1@param i Masking (0=No 1=Incl 2=Excl)@default i 0@param j Incl/Excl Cols & Rows@default j 0@param k Time-out period (s)@default k 60@param n Continuous shoot (s)@default n 7@param s Shoot (0=f/1=nf/2=c)@default s 2@param u Pre-focus (0=No)@default u 1if j>a/2 then j=a/2if j>b/2 then j=b/2if j<0 then j=0if s<0 then let s=0if s>2 then let s=2CHANGES MADE BELOW...******get_prop 102 yif s<>2 and y=1 then let s=2endif******CHANGES MADE ABOVEif s=0 then let g=1 else let g=0e=e*100k=k*1000print "press Shutter Button to Stop"while 1 if x<>18 and u<>0 then gosub "make_focus" md_detect_motion a, b, h, k, d, c, 1, t, i, j+1, j+1, a-j, b-j, g, f, e if t>0 then print t, " cells detected" if t=0 then gosub "awake" if t>0 and u=0 and s=2 then gosub "make_focus" if t>0 and s=1 then click "shoot_full" if t>0 and s=2 then gosub "shoot_continuously" if t>0 and s=3 then gosub "record_video" if t>0 and x<>18 then do get_prop 205 p until p<>1 let t=0 endifwend:make_focus press "shoot_half" do get_prop 205 p until p=1return:shoot_continuously press "shoot_full" sleep n*1000 release "shoot_full"return:record_video click "shoot_full" sleep n*1000 click "shoot_full"return:awake release "shoot_half" if x<>18 and u=0 then click "set" click "set" endifreturnend
I had to make some changes to the script using:http://chdk.wikia.com/wiki/PropertyCaseWhen I run get_prop 102 y => it returns a state of 1, which indicates continuous shooting with no autofocus.I had to change the prop id from 6 to 102 to get the proper drive mode read (if it is actually necessary)....Any suggestions?
:make_focus press "shoot_half" do get_prop 205 p until p=1return
Started by SuperSized « 1 2 » General Help and Assistance on using CHDK stable releases
Started by RaduP Script Writing
Started by Dr.Pat « 1 2 3 » Feature Requests
Started by Fotoni Script Writing
Started by green_squirrel Completed and Working Scripts