@title 50LoSFok rem 18.03.2019 SX50 Focus Bracketing im Custom Mode C1 oder C2 (c) FotoOpa rem Firmware SX50 : 100c @chdk_version 1.4.1 @param c Nahfokus @range c 50 1350000 @default c 50 @param D StepDivisor @range D 1 3 @default D 2 @param y Bildzahl @default y 75 @range y 2 999 @param l Nahlinse+Linsenkombinationen @default l 3 @values l keine DHG-330 DCR-150 DCR-250 MSN-202 7,8dpt 11dpt 12,8dpt 28dpt @param z Zoom @range z 0 200 @default z 101 set_zoom z set_console_layout 0 13 45 14 b=0 e=0 q=0 A=0 F=0 N=0 R=0 j=y select l case 1; v=330 case 2; v=208 case 3; v=125 case 4; v=40 case 5; v=128 case 6; v=91 case 7; v=78 case 8; v=36 end_select if l>0 then d=10000/v while (get_prop 133)<>1 click "left" sleep 80 click "right" sleep 80 click "set" sleep 400 click "set" sleep 500 wend set_focus c sleep 100 get_focus n press "shoot_half" do until (get_focus_ok)=1 sleep 100 set_focus n sleep 100 release "shoot_half" do until (get_shooting)=0 f=n if get_capture_mode<>4 then print "LowSpeedModus C einschalten !!!" sleep 4000 goto "ende" endif if get_disk_size<550000 then print "SD-Karte fast voll ! Noch ca. "get_jpg_count" Fotos !" sleep 4000 endif if (get_dof)<0 then print "DOF ist Unendlich !!!" sleep 1000 set_focus 50 sleep 100 gosub "DOFreset" endif set_draw_title_line 0 while get_display_mode<>1 click "display" sleep 80 wend click "display" sleep 80 R=get_av :neu if get_vbatt<7220 then print "Batterie bald wechseln !!!" sleep 4000 endif if get_disk_size<550000 then print "SD-Karte fast voll ! Noch ca. "get_jpg_count" Fotos !" sleep 4000 endif G=get_exp_count do if get_av<>R then gosub "DOFresAV" if l>0 then N=999999/((999999/n)+(100*d)) A=(((get_focus-v)/((get_focus+(get_focal_length/1000))/10))*(get_focal_length/v))/100 if A<0 then A=0 if ((A>0) and (A<10)) then A=10 print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" d:"N"+"e else A=((get_focal_length)/((get_focus)-(get_focal_length/1000)))/10 N=n if A<0 then A=0 if ((A>0) and (A<10)) then A=10 print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" f:"get_focus"+"f-n endif m=is_pressed "erase" u=get_usb_power s=is_pressed "shoot_half" p=is_pressed "video" if p=1 then goto "ende" while (is_pressed "up")=1 y=y+5 if y>2000 then y=5 if l>0 then print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" d:"N"+"e else print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" f:"get_focus"+"f-n sleep 180 wend while (is_pressed "down")=1 y=y-5 if y<2 then y=1000 if l>0 then print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" d:"N"+"e else print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" f:"get_focus"+"f-n sleep 180 wend while (is_pressed "menu")=1 h=get_hyp_dist if (get_dof)>0 then g=get_dof/D if g=0 then g=get_dof n=n+g set_focus n sleep 35 get_focus n set_focus n else set_focus 50 sleep 35 get_focus n set_focus n endif if n<0 then n=0 f=n e=0 if l>0 then print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" d:"N"+"e else print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" f:"get_focus"+"f-n wend while (is_pressed "display")=1 h=get_hyp_dist if (get_dof)>0 then get_focus f g=get_dof/D if g=0 then g=get_dof if n>50 then n=n-g set_focus n sleep 35 get_focus n set_focus n if (f-(get_focus))<=0 then set_focus (get_hyp_dist/3) sleep 35 get_focus n set_focus n endif else set_focus 50 sleep 35 get_focus n set_focus n endif if n<0 then n=0 f=n e=0 if l>0 then print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" d:"N"+"e else print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" f:"get_focus"+"f-n wend while (is_pressed "right")=1 while (is_pressed "right")=1 press "zoom_in" wend release "zoom_in" sleep 850 set_focus c sleep 80 gosub "DOFreset" f=n e=0 wend while (is_pressed "left")=1 while (is_pressed "left")=1 press "zoom_out" wend release "zoom_out" sleep 850 set_focus c sleep 80 gosub "DOFreset" f=n e=0 wend while (is_pressed "set")=1 sleep 800 if (is_pressed "set")=1 then set_focus c sleep 100 gosub "DOFreset" else y=j if l>0 then print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" d:"N"+"e else print l")D"D"#"y"*"b/10","b%10" m:"A/100","(A%100)/10" f:"get_focus"+"f-n endif f=n e=0 wend while (is_pressed "flash")=1 get_focus n g=get_dof h=get_hyp_dist cls I=1 i=n e=0 sleep 1000 if (get_dof<0) or (get_focus<0) then print "DOF ist Unendlich !!!" sleep 2000 else if (is_pressed "flash")=0 then do o=g/D if o=0 then o=g i=i+o set_focus i I=I+1 f=i if l>0 then F=999999/((999999/f)+(100*d)) e=F-N else e=f-n endif g=get_dof set_focus i if (g<0) and (get_focus0 then F=999999/((999999/f)+(100*d)) e=F-N else e=f-n endif g=get_dof set_focus i if (g<0) and (get_focus0) if (get_dof)<0 then print "DOF ist Unendlich !!!" sleep 2000 set_focus 50 sleep 100 gosub "DOFreset" goto "neu" endif set_prop 63 0 U=get_time 5 V=get_time 4 W=get_time 3 X=get_time 2 k=0 x=n q=q+1 w=y-1 press "shoot_half" do until (get_focus_ok)=1 set_focus n r=get_ev P=get_av96 h=get_hyp_dist t=get_iso_market a=(get_tick_count) press "shoot_full_only" sleep 50 Z=get_time 0 Y=get_time 1 do if (get_prop 63)>k then g=get_dof/D if g>0 then x=x+g else x=x+get_dof set_focus x k=k+1 endif sleep 260 until k=w or (get_dof)<0 while (get_prop 63)<(k+1) wend release "shoot_full_only" z=(get_tick_count)-a release "shoot_half" y=get_prop 63 if y<99 then b=(y*10000)/z else b=(y*1000)/(z/10) T=100000/((tv96_to_usec(get_tv96))/10) set_ev (r-384) set_prop 214 0 sleep 1800 do until (get_prop 115)=1 shoot set_ev r f=x if l>0 then F=999999/((999999/f)+(100*d)) e=F-N else e=f-n endif K=av96_to_aperture(P) S=((get_focal_length)*559)/100000 E=(r*100)/96 H=G+y if H>9999 then H=G+y-9999 print_screen (G+1) print "Stapel : SX50 LowSpeedFocusBracketing" print "_____________________________________________" print "Anfang IMG . "G+1" # "y" Fotos" print "__Ende IMG . "H print "*********************************************" select l case 0; print y" Fotos ohne Nahlinse" case 1; print y" Fotos mit Marumi DHG 330 =3 dpt" case 2; print y" Fotos mit Raynox DCR-150 =4,8 dpt" case 3; print y" Fotos mit Raynox DCR-250 =8 dpt" case 4; print y" Fotos mit Raynox MSN-202 =25 dpt" case 5; print y" Fotos Kombi DHG-330 + DCR-150 =7,8 dpt" case 6; print y" Fotos Kombi DHG-330 + DCR-250 =11 dpt" case 7; print y" Fotos Kombi DCR-150 + DCR-250 =12,8 dpt" case 8; print y" Fotos Kombi DHG-330 + MSN-202 =28 dpt" end_select print "Abbildungsmaßstab grob : "A/100","(A%100)/10 print "* "b/10","b%10" Fotos/sec ISO "t print "Aufnahmedistanz ca. "N" mm" print "Nahfokus Einstellung: "n" mm" print "Schärfentiefe der Serie ca. "e" mm" print "Blende: ca. "(K/1000)","(K%1000)/100" Zeit: ca. 1/"T" sec" print "Zoom : ca. "S" mm EV: "E"/100" print "Step Divisor: "D print "Helicon_Name: IMG_"G+1"+"y"(*).jpg" print "Datum: "U"."V"."W" "X"-"Y"-"Z" "q".Serie" print "_____________________________________________" print_screen 0 sleep 300 set_prop 214 1 sleep 300 set_focus n sleep 100 gosub "DOFreset" goto "neu" :DOFreset get_focus n press "shoot_half" do until (get_focus_ok)=1 sleep 100 set_focus n sleep 100 release "shoot_half" do until (get_shooting)=0 return :DOFresAV sleep 300 gosub "DOFreset" R=get_av f=n e=0 sleep 300 return :restore print "Skript wird beendet !!!" sleep 4000 :ende click "left" sleep 200 click "left" sleep 500 click "set" sleep 500 set_draw_title_line 1 do click "display" sleep 100 until get_display_mode=1 end