Hallo und willkommen,
für die Bewegungserkennung muss das Display zwingend an sein, sonst funktioniert diese Erkennung nicht.
Gruß msl
Maddin hat geschrieben:...Und weiss jemand warum das Display an bleiben muss ?
md_detect_motion a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p
if h>0 then
click "shoot_full"
bla bla bla
endif
md_detect_motion a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p
if h>0 then click "shoot_full"
while Q=4
gosub "##foc"
Q=(get_tv96>768)
md_detect_motion 5-Q,5+Q,1,4*Q*t,t,99,3,Q,Q+1,2,2,1,3, Q ,Q,Q
Q=4*(Q=0)
wend
rem get_tv96>768 löst ab s/250 aus, Q=get_tv96<768 bis s/250
rem ? Q= () * (get_focus=-1)
& noch was für die Vitrine:
rem mittelfristig selbsterklärend & DAS gosub Intro für md_abc..p Anwendungen:
:##place
do
T=get_tick_count+20
md_detect_motion a,b,c,200,e,f,random 1 3,h,i,j,k,j+(a%2=0)-(a=2),k+(b%2=0)-(b=2),0,o,9
if h*(z=0)*(f<99) then print get_capture_mode,f,"(";a;"*";b;") ",h,T-get_tick_count
j=(j-is_pressed "left"+is_pressed "right"-(j>a))|(j<2)
k=(k-is_pressed "up"+is_pressed "down"-(k>b))|(k<2)
a=((a+is_pressed "zoom_in")%13)|(a<2)
b=((b+is_pressed "zoom_out")%13)|(b<2)
i=(i+is_pressed "set")%3
if is_pressed "menu" then gosub "##foc"
until is_key "shoot_half"
if i=2 then g=1 else g=3
l=j+(a%2=0)-(a=2)
m=k+(b%2=0)-(b=2)
return
:##foc
set_aflock 0
press "shoot_half"
do
sleep 99
until not get_shooting
set_aflock 1
release "shoot_half"
print get_exp_count,-get_zoom,-get_focus
sleep 999
return
:...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
--- reusable Intro, enjoy, Caefix 2019
--[[
-- standalone too
@param h IntroConfiguratiX Use Keys!
@default h 1
@range h 0 1
--]]--
function look(x)
set_aelock(0); set_aflock(0)
press("shoot_half")
repeat sleep(42) until not get_shooting()
set_aflock(1); set_aelock(1)
release("shoot_half")
if x>0 then -- ubasic:
-- print get_min_stack_dist;"mm",get_near_limit,-get_focus,-get_far_limit
print(get_exp_count(),-get_focus(),"-av",get_av96()/32,"-tv",get_tv96()/32) end
x=get_free_disk_space()
wait_click(999)
return x
end
function place(...)
local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,X=... -- for scripts/calls without settings:
if a==nil then a=3 end
if b==nil then b=3 end
c=(c or 0)%6
if d==nil then d=60000 end
if e==nil then e=20 end
if f==nil then f=3 end
if g==nil then g=2 else g=g-1 end
h=0
if i==nil then i=1 end
if j==nil then j=(a+1)/2 end
if k==nil then k=(b+1)/2 end
if l==nil then l=j end
if m==nil then m=k end
n=n or 0
if o==nil then o=3 end
if p==nil then p=16 end --
X=X or 0
local ab=a+b
repeat
local a2=0; if a==2 then a2=1 end
local b2=0; if b==2 then b2=1 end
if j>a then j=a end
if k>b then k=b end
l=j+1-a%2-a2; m=k+1-b%2-b2; g=g%3+1
local T=get_tick_count()
h=md_detect_motion(a,b,1,200,e,f,g,h,i%3,j,k,l,m,0,o,9)
if (h>0) or (ab~=a+b) and (X<2) and (f<99) then
print(e,-f,"(",a,-b,")",h,T-get_tick_count())
ab=a+b
while is_pressed("shoot_half") do
sleep(42); II=II end
else console_redraw() end
wait_click(9)
if is_key("zoom_in") then a=a%12+1 end
if is_key("zoom_out") then b=b%12+1 end
if is_key("left") and j>1 then j=j-1 end
if is_key("right") and j<a then j=j+1 end
if is_key("up") and k>1 then k=k-1 end
if is_key("down") and k<b then k=k+1 end
if is_key("set") then i=(i+1)%3 end
if is_pressed("menu") then look(1) end -- oder Alt-Modus für Einstellungen verlassen.
if is_key("display") then --<< use Your key!
-- a=(a+1)/2; b=(b+1)/2 end --oder
if a>1 then a=a-1 end
if b>1 then b=b-1 end end
repeat sleep(222) until get_alt_mode()
until (h==0) and (is_key("shoot_half") or (X>0)) --!
g=3; if i==2 then g=1 end
wait_click(999); wait_click(99)
return a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p
end --V-^ keeps setting
if (h==nil) or (h>0) then --<< Use Your condition or none!
a,b,h,d,e,f,h,h,i,j,k,l,m,n,o,p= --<< new global values, use the scripts´s!!
place(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,0) end --<< old global values, use the scripts´s!!
--- :...,....1....,....2....,....3....,....4....,....5....,....6....,....7....,....
Mitglieder in diesem Forum: 0 Mitglieder und 6 Gäste