--[[ @title Intervall universal @param a Intervall [s] @default a 3 @param b Anzahl [Bilder] @default b 300 @param c Disp.aus ab [Nr.][0=nicht] @default c 5 @param d Startverzögerung [s] @default d 10 @param i Log [0=aus][x=Datei-Nr.] @default i 1 ]] function Tv() tv = get_tv96()/32 tv_output = {"64","50","40","32","25","20","15","13","10","8","6", "5","4","3.2","2.5","2","1.6","1.3","1","0.8","0.6","0.5","0.4", "0.3","1/4","1/5","1/6","1/8","1/10","1/13","1/15","1/20","1/25", "1/30","1/40","1/50","1/60","1/80","1/100","1/125","1/160","1/200", "1/250","1/320","1/400","1/500","1/640","1/800","1/1000","1/1250", "1/1600","1/2000","1/2500","1/3200","1/4000","1/5000","1/6400", "1/8000","1/10000"} print_tv = tv_output[tv + 19] return print_tv end function log(...) io.write(...) io.write("\n") end --start script if a<2 then a=2 end if b<2 then b=2 end if c<0 then c=0 end if d<0 then d=0 end if i<0 or i>1 then i=0 end wait = a num = b disp = c delay = d sd_card_01 = get_free_disk_space() z=0 t1=os.time() + wait + delay print("akt. Zeit:",os.date("%X")) if i > 0 then file_name = "A/CHDK/SCRIPTS/iv_"..i..".txt" logfile=io.open(file_name,"wb") io.output(logfile) log("Aufnahmetag: ", os.date("%x"), "\tAnzahl Bilder: ", num) log(" ") log("Bild-Nr.\tZeit\t\tDauer in ms\tAkku in mV\tFokus in mm\t\tTv in s") end repeat if disp > 0 and z >= disp then set_backlight(0) end wait_click(10) if is_pressed "menu" then if i>=0 then log("\nBenutzer-Abbruch!!!") end z = num end if os.difftime(os.time(),t1)==0 then t1=os.time() + wait cls() z=z+1 print("Bild-Nr:",z,"von",num) print("akt. Zeit: ", os.date("%X")) t1_shoot = get_tick_count() shoot() t2_shoot = get_tick_count() timeout = t2_shoot - t1_shoot print("Auslösedauer:",timeout,"ms") if i > 0 then log(z, "\t\t", os.date("%X"), "\t", timeout, "\t\t", get_vbatt(), "\t\t", get_focus(), "\t\t\t", Tv()) end if z == num - 1 then set_backlight(1) end end until z == num sd_card_02 = get_free_disk_space() set_backlight(1) if i> 0 then log("\nverbrauchter Speicherplatz: ", (sd_card_01 - sd_card_02)/1024, " MB, noch frei: ", sd_card_02/1024, " MB von ", get_disk_size()/1024, " MB") logfile:close() end print("fertig") sleep(1000)