von Eisenberg188 » 15.02.2013, 11:18
Foto / Video / Zoom
@title Col.at script for video and foto ausloeser - Version 1
@param v Foto = 0 Video = 1
@default v 0
@param s Zommstufen
@default s 8
@param z Zoom
@default z 0
@param x Zommen
@default x 1
@param y Zoomin=0 Zoomount=1
@default y 0
if v<0 then v=0
if v>1 then v=1
s=get_zoom_steps
print "Zoom steps=", s
z=get_zoom
if s<9 then x=1
if s>8 and s<15 then x=2
if s>14 then x=s/4
print "Zoom step=", x
if z<2 then y=0
while 1
do
a = get_usb_power
until a>0
if a < 100 then gosub "ausl"
if a > 99 and a < 400 then gosub "videofoto"
if a > 399 and a < 1000 then gosub "zoom"
if a > 999 then print "error"
wend
end
:ausl
if v = 0 then gosub "takephoto" else if v = 1 then gosub "startstopvideo" else gosub "zoomen"
return
:takephoto
print "Foto!"
shoot
return
:startstopvideo
print "Start/Stop Video"
click "video"
return
:zoomen
if y=0 then gosub "zoomin" else gosub "zoomout"
return
:videofoto
if v=0 then gosub "video" else gosub "foto"
return
:video
print "Video active"
v=1
return
:foto
print "Foto active"
v=0
return
:zoom
print "Zoomen active"
v=3
return
:zoomin
z=z+x
print "Zoom ",z
set_zoom z
if (z+x)>=s then y=1
return
:zoomout
z=z-x
print "Zoom ",z
set_zoom z
if (z-x)<0 then y=0
return
-- 15.02.2013, 12:18 --
Größer 1 sec: Umschalten auf Video bzw. retour auf Foto
Größer 4 sec: Umschalten auf Zoomen
Kleiner 1 sec:
Foto
Video ein und aus
Zoomen in 5 Stufen: 0 30 60 90 120 und wieder runter
Entspricht praktisch bei 5 fach zoom S100: 24mm, 48mm, 72mm, 96mm, 120mm
LG Herbert