rem HYPer-Blitz by gehtnix 18.07.2010 rem erweitertes MD-Fast von chiptune rem Näheres im PDF-File @title HYPer-Blitz @param w 0=Aufnahme,1=Autoschwellwert @default w 1 @param t Session ja=1 nein=0 @default t 1 @param v Sessiondauer Minuten @default v 30 @param s Starte mit Zoom @default s 2 @param f Schwellwert 0-255 @default f 4 @param e Vergleichsintervall ms @default e 3 @param o Pixel Step @default o 3 @param a Anzahl Spalten @default a 2 @param b Anzahl Zeilen @default b 3 @param i Maske 0=ohne 1=inkl 2=exkl @default i 1 @param j Maske linke Spalte @default j 1 @param l Maske rechte Spalte @default l 2 @param k Maske obere Zeile @default k 1 @param m Maske untere Zeile @default m 2 @param r Reviewzeit Sek. @default r 3 @param x Zoom Sleep 1/100 @default x 50 @param z Tasten Sleep 1/100 @default z 10 @param y Zoomschritte fein @default y 3 @param d Sleep f. Backlight 1/100 @default d 35 @param c Backlight aus n. x Zykl. @default c 5 @param n Fokus Down=0/Left=1/S5=2 @default n 0 if a<1 then a=1 if b<1 then b=1 if e<1 then e=1 if f<1 then f=0 if f>255 then f=255 if i<0 then i=0 if i>2 then i=2 if j<0 then j=0 if j>a then j=a if k<0 then k=0 if k>b then k=b if la then l=a if mb then m=b if o<1 then o=1 if r<0 then r=0 V=0 L=get_zoom_steps e=0 g=0 q=2 u=0 x=x*10 z=z*10 if get_propset=1 then Q=2 R=226 else Q=-32766 R=50 endif while get_flash_mode<>2 click "up" wend rem Einzelbild Ein if get_drive_mode<>0 then cls print "" print "Einzelbild einstellen" print "und Sript neu starten" print "" click "set" sleep 3000 cls exit_alt endif rem saftyMF aus if get_propset=2 then D=get_prop 277 set_prop 277 0 endif set_zoom s sleep x gosub "hyperfocal" :start cls print "*** Zoom ist bereit ***" print "Blitz-MD = Halber Druck" print "Exit Alt = Set" wait_click is_key k "shoot_half" if k=1 then gosub "MDtool" is_key k "zoom_in" if k=1 then click "zoom_in" if k=1 then sleep x if k=1 then gosub "hyperfocal" is_key k "zoom_out" if k=1 then click "zoom_out" if k=1 then sleep x if k=1 then gosub "hyperfocal" is_key k "left" is_key k "right" is_key k "up" is_key k "down" if k=1 then gosub "raw" is_key k "set" if k=1 then goto "restore" is_key k "erase" if k=1 then gosub "nullen" is_key k "display" if k=1 then gosub "grob" is_key k "menu" if k=1 then gosub "fein" goto "start" end :MDtool cls if w=1 then gosub "treshold_adj" N=0 rem SessionEnde M=get_time 1 S=get_time 2 M=M+v while M>=60 M=M-60 S=S+1 wend if S>=24 then S=S-24 :fast_md_loop h=0 do cls print "*** HYPer-Blitz MD ***" if M<10 then if t=1 then print "Sessionende: "S;":";"0";M else if t=1 then print "Sessionende: "S;":";M endif print "Anzahl Aufnahmen: "N O=get_time 1 U=get_time 2 if t=1 and S=U and M<=O then K=1 goto "restore" endif if V>=c then sleep d*10 set_backlight 0 else print "LCD aus nach ";c-V;" Bildern" endif md_detect_motion a, b, 1, 120000, e, f, 1, h, i, j, k, l, m, 9, o, 25 V=V+1 until h>0 if V>c then shoot else press "shoot_full" cls sleep r*1000 release "shoot_full" endif N=N+1 goto "fast_md_loop" rem ++++++++++++++ :treshold_adj cls print "Schwellwerteinstellung" P=0 N=0 f=0 :treshold_loop h=0 release "shoot_half" press "shoot_half" sleep 1000 md_detect_motion a, b, 1, 1000, e, f, 1, h, i, j, k, l, m, 0, o, 50 if h>0 then N=N+1 T=0 print "Schwellw./Trigger", f, "/", N f=f+1 else T=T+1 endif if T>5 then goto "AdjComplete" goto "treshold_loop" :AdjComplete f=f+1 :again cls print "Schwellwert =", f print "hoch => wiederholen" print "rechts => +1; links => -1" print "runter => weiter" wait_click 0 if is_key "up" then goto "treshold_adj" if is_key "down" then return if is_key "right" then f=f+1 if is_key "left" then f=f-1 goto "again" :restore set_backlight 1 set_zoom 0 sleep x h=0 gosub "schalten" sleep z if get_propset=2 then set_prop 277 D if q=1 then gosub "raw" cls if K=1 then shut_down sleep 3000 endif exit_alt end :nullen if p=0 then set_zoom L-1 p=1 else set_zoom L-L p=0 endif gosub "hyperfocal" return :grob if g=1 then goto "sprung2" if g=2 then goto "sprung3" rem g=0 set_zoom L*25/100 sleep x g=1 goto "sprung" :sprung2 set_zoom L*50/100 sleep x g=2 goto "sprung" :sprung3 set_zoom L*75/100 sleep x g=0 :sprung gosub "hyperfocal" return :fein set_zoom_rel y gosub "hyperfocal" return :raw cls print "" if q=2 then set_raw 1 print "*** RAW - EIN ***" q=1 else set_raw 0 print "*** RAW - AUS ***" q=2 endif print "" sleep 750 return :schalten if get_nd_present<>0 then goto "sprung7" if n=2 and b=1 then click "mf" sleep 300 else if n=2 and b=5 then press "macro" sleep 1000 release "macro" endif else while get_focus_mode<>h select n case 0; click "down" case 1; click "left" case 2; click "macro" end_select sleep z*3 wend endif :sprung7 return :hyperfocal if get_nd_present=0 then set_aflock 0 press "shoot_half" do until get_shooting=1 u=get_hyp_dist release "shoot_half" do until get_shooting=0 cls print "" print "HYP bei ",u/1000","(u%1000)/10"m" print "" sleep 2000 if get_nd_present=0 then goto "sprung4" set_focus u set_aflock 1 goto "sprung6" :sprung4 h=1 gosub "schalten" set_focus u :sprung6 return