rem Author: barberofcivilrem Tested on S2rem Requires AllBest build@title Shutter Speed - AllBest@param a EV fraction (1/x EV)@default a 3@param b Start Tv (1EV)@default b -11@param c Start Tv (1/xEV)@default c 0@param d No.Shots@default d 1@param e Step Size (y/x EV)@default e 1@param f Start Delay (s)@default f 0@param g Delay between shots (s)@default g 0clsif f<0 then f=0if g<0 then g=0if d<1 then d=1if a<1 then a=1if c>=a then c=a-1if c<0 then c=0if b<0 then c=-cif d=1 then print "One shot to be taken" else print d,"shots to be taken"if d=1 or e=0 then gosub "Single" else gosub "Multiple"print "Click <set> to proceed"print "Any button to cancel"wait_clickis_key z "set"if z=1 then print "Proceeding..." else gosub "Cancel"while f>0 print "Starting in",f,"s..." sleep 1000 f=f-1wendprint "Starting shots now..."for i=1 to d cls print "Shot",i,"of",d gosub "ShutterCalc" if k>=6 then print "Shutter ~1/"o,"s" else print "Shutter ~"r"."st,"s" print "Shutter value:",p set_tv96_direct p shoot sleep 1000*gnext iend:ShutterCalc k=(1-i)*e-b*a-c l=(k/a/4)*4*a if k<0 then l=l-4*a m=1 for j = 1 to (l/a/4+2) m=m*16 next j h=(k-l) j=(((((((((30*h*h*h)/(4*a))*h)/(4*a))*h)/(4*a))*243)/(4*a))*7) j=j-(((((((30*h*h*h)/(4*a))*h)/(4*a))*254)/(4*a))*4) j=j+(((((30*h*h*h)/(4*a))*227)/(4*a))*9) j=j+(((30*h*h*307)/(4*a))*3) j=j+(30*h*850) o=(((((((j/(18000)+1)/2)+a)*m)/(128*a)+1))/2) p=(k*96)/a q=(((51200*a)/(((((j/18000)+1)/2)+a)*m)+1)/2) r=q/100 s=(q-r*100)/10 t=q-r*100-s*10return:Cancel print "Shots cancelled" end:Single if e=0 and d>1 then print "Tv locked (step=0)" i=1 gosub "ShutterCalc" if k>=6 then print "Tv: ~1/"o,"s" else print "Tv: ~"r"."st,"s"return:Multiple i=1 gosub "ShutterCalc" if k>=6 then print "Tv Start: ~1/"o,"s" else print "Tv Start: ~"r"."st,"s" i=d gosub "ShutterCalc" if k>=6 then print "Tv End: ~1/"o,"s" else print "Tv End: ~"r"."st,"s"return
What a nice and well-written script! Will you be adding this to the Wikia User-Written Scripts archive? (if you have trouble doing that and would rather someone else add it, it could eventually be done, when someone has time)Thanks for the work involved, and sharing it. I'm sure this will come in handy for many.
rem Author: barberofcivilrem Tested on S2/A570@title Shutter Speed@param a EV fraction (1/x EV)@default a 3@param b Start Tv (1EV)@default b -11@param c Start Tv (1/xEV)@default c 0@param d No.Shots@default d 1@param e Step Size (y/x EV)@default e 1@param f Start Delay (s)@default f 0@param g Delay between shots (s)@default g 0clsif f<0 then f=0if g<0 then g=0if d<1 then d=1if a<1 then a=1if c>=a then c=a-1if c<0 then c=0if b<0 then c=-cif d=1 then print "One shot to be taken" else print d,"shots to be taken"if d=1 or e=0 then gosub "Single" else gosub "Multiple"print "Click <set> to proceed"print "Any button to cancel"wait_clickis_key z "set"if z=1 then print "Proceeding..." else gosub "Cancel"while f>0 print "Starting in",f,"s..." sleep 1000 f=f-1wendprint "Starting shots now..."for i=1 to d cls print "Shot",i,"of",d gosub "ShutterCalc" if k>=(2*a) then print "Shutter ~1/"o,"s" else print "Shutter ~"r"."st,"s" print "Shutter value:",p set_tv96_direct p shoot sleep 1000*gnext iend:ShutterCalc k=(1-i)*e-b*a-c l=(k/a/4)*4*a if k<0 then l=l-4*a m=1 for j = 1 to (l/a/4+3) m=m*16 next j m=m/16 h=(k-l) j=(((((((((30*h*h*h)/(4*a))*h)/(4*a))*h)/(4*a))*243)/(4*a))*7) j=j-(((((((30*h*h*h)/(4*a))*h)/(4*a))*254)/(4*a))*4) j=j+(((((30*h*h*h)/(4*a))*227)/(4*a))*9) j=j+(((30*h*h*307)/(4*a))*3) j=j+(30*h*850) o=(((((((j/(18000)+1)/2)+a)*m)/(128*a)+1))/2) p=(k*96)/a q=(((51200*a)/(((((j/18000)+1)/2)+a)*m)+1)/2) r=q/100 s=(q-r*100)/10 t=q-r*100-s*10return:Cancel print "Shots cancelled" end:Single if e=0 and d>1 then print "Tv locked (step=0)" i=1 gosub "ShutterCalc" if k>=(2*a) then print "Tv: ~1/"o,"s" else print "Tv: ~"r"."st,"s"return:Multiple i=1 gosub "ShutterCalc" if k>=(2*a) then print "Tv Start: ~1/"o,"s" else print "Tv Start: ~"r"."st,"s" i=d gosub "ShutterCalc" if k>=(2*a) then print "Tv End: ~1/"o,"s" else print "Tv End: ~"r"."st,"s"return
The error happens when the tv96 is set to 0.
void shooting_set_tv96_direct(short v, short is_now){if ((mode_get()&MODE_MASK) != MODE_PLAY){ if(is_now) { _SetPropertyCase(PROPCASE_TV, &v, sizeof(v)); } else photo_param_put_off.tv96=v; }}
void __attribute__((naked,noinline)) shooting_expo_param_override(void){<skip> if ((state_kbd_script_run) && (photo_param_put_off.tv96)) { shooting_set_tv96_direct(photo_param_put_off.tv96, SET_NOW); photo_param_put_off.tv96=0; }etc
I seem to have no problem with my A570 or S2 models.Revised to avoid this(when tv96=0, it is reset to 1 which equals ~0.993 seconds, hopefully noone can tell the difference...)
rem Author: barberofcivilrem Tested on S2/A570@title Shutter Speed@param a EV fraction (1/x EV)@default a 3@param b Start Tv (1EV)@default b -11@param c Start Tv (1/xEV)@default c 0@param d No.Shots@default d 1@param e Step Size (y/x EV)@default e 1@param f Start Delay (s)@default f 0@param g Delay between shots (s)@default g 0clsif f<0 then f=0if g<0 then g=0if d<1 then d=1if a<1 then a=1if c>=a then c=a-1if c<0 then c=0if b<0 then c=-cif d=1 then print "One shot to be taken" else print d,"shots to be taken"if d=1 or e=0 then gosub "Single" else gosub "Multiple"print "Click <set> to proceed"print "Any button to cancel"wait_clickis_key z "set"if z=1 then print "Proceeding..." else gosub "Cancel"while f>0 print "Starting in",f,"s..." sleep 1000 f=f-1wendprint "Starting shots now..."for i=1 to d cls print "Shot",i,"of",d gosub "ShutterCalc" if k>=(2*a) then print "Shutter ~1/"o,"s" else print "Shutter ~"r"."st,"s" print "Shutter value:",p if p=0 then p=1 set_tv96_direct p shoot sleep 1000*gnext iend:ShutterCalc k=(1-i)*e-b*a-c l=(k/a/4)*4*a if k<0 then l=l-4*a m=1 for j = 1 to (l/a/4+3) m=m*16 next j m=m/16 h=(k-l) j=(((((((((30*h*h*h)/(4*a))*h)/(4*a))*h)/(4*a))*243)/(4*a))*7) j=j-(((((((30*h*h*h)/(4*a))*h)/(4*a))*254)/(4*a))*4) j=j+(((((30*h*h*h)/(4*a))*227)/(4*a))*9) j=j+(((30*h*h*307)/(4*a))*3) j=j+(30*h*850) o=(((((((j/(18000)+1)/2)+a)*m)/(128*a)+1))/2) p=(k*96)/a q=(((51200*a)/(((((j/18000)+1)/2)+a)*m)+1)/2) r=q/100 s=(q-r*100)/10 t=q-r*100-s*10return:Cancel print "Shots cancelled" end:Single if e=0 and d>1 then print "Tv locked (step=0)" i=1 gosub "ShutterCalc" if k>=(2*a) then print "Tv: ~1/"o,"s" else print "Tv: ~"r"."st,"s"return:Multiple i=1 gosub "ShutterCalc" if k>=(2*a) then print "Tv Start: ~1/"o,"s" else print "Tv Start: ~"r"."st,"s" i=d gosub "ShutterCalc" if k>=(2*a) then print "Tv End: ~1/"o,"s" else print "Tv End: ~"r"."st,"s"return
Started by Woodsman « 1 2 ... 11 12 » Creative Uses of CHDK
Started by barberofcivil Script Writing
Started by HighLife Script Writing
Started by spectator Script Writing
Started by pavlick Script Writing