rem Flashlight runtime measuring script by Jirik
rem based on Divalent's "accurate intervalometer" script
rem Cameras: all Digic II camera's, Digic III not tested
rem CHDK version: (must have get/set prop)
rem
@title Flashlight 1,2 min Runtime logger
@param a Pocet mereni po 1 minute na zacatku
@default a 10
@param c Prumerovani z x mereni.
@default c 3
rem Seznam promennych:
rem a,c,f,g,h,n,m,p,q,t,v
rem zapneme logovani do souboru
print_screen 1
rem nophoto sleep
g=1500
rem Prumerovani z x mereni
if c<1 then c=1
rem f - offset kvuli spozdeni fotaku pri mereni
f=500+g*c
sleep 500
rem Prvni snimek ulozime vzdy
shoot
print "Runtime logger start"
get_bv96 h
q=get_tick_count
v=get_vbatt
print q, h, v
if a<1 then goto "loop2"
rem po minute
t=60*1000-f
for n=1 to a
sleep t
p=0
for m=1 to c
press "shoot_half"
rem musime fotaku dat cas na zmereni expozice
rem je mozne, ze pro nektere fotaky bude nutne hodnotu zvysit
sleep g
get_bv96 h
release "shoot_half"
p=p+h
next m
p=p/c
q=get_tick_count
v=get_vbatt
print q, p, v
next n
:loop2
rem po 2 minutach
t=2*60*1000-f
:twominloop
sleep t
p=0
for m=1 to c
press "shoot_half"
rem musime fotaku dat cas na zmereni expozice
rem je mozne, ze pro nektere fotaky bude nutne hodnotu zvysit
sleep g
get_bv96 h
release "shoot_half"
p=p+h
next m
p=p/c
q=get_tick_count
v=get_vbatt
print q, p, v
goto "twominloop"