Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits. Anti-spam check. Do not fill this in!==Revised version 1.2a with Display off function (for battery use) (Dec 22, 2013)== This is a revised version by [[User:Torben s|Torben s]] ([[User talk:Torben s|talk]]) 18:26, December 22, 2013 (UTC). It adds a parameter for disabling the display when running in battery mode. Changes are marked. Copy and paste the code below into a file named '''Drivelapse.bas''': <pre> rem Drivelapse v1.2a w/Display Off (ts) rem If you find this script useful, please consider making a donation to rem Action Medical Research: http://www.action.org.uk/sponsor/TeamGraysonRally @title Drivelapse @param i = Target interval (sec) @default i 10 @param f = Focus (mm) @default f 65535 @param t = Target Tv96 @default t 576 @param n = Minimum Sv96 @default n 371 @param x = Maximum Sv96 @default x 795 @param d = Display off after x photos (0 = disable) @default d 3 gosub "record_mode" gosub "focus" C = 0 :loop Z = get_tick_count gosub "meter" gosub "exposure" gosub "capture" gosub "status" sleep i * 1000 - (get_tick_count - Z) rem vvvvvvv ADDED vvvvvvv if d>0 then if C>d then set_lcd_display 0 endif rem ^^^^^^^ ADDED ^^^^^^^ goto "loop" :record_mode while get_mode <> 0 set_record 1 sleep 100 wend return :focus set_focus f set_aflock 1 return :meter press "shoot_half" while get_shooting = false sleep 10 wend A = get_av96 B = get_bv96 return :exposure S = A+t-B rem Limit minimum Sv if S<n then let S=n rem Limit maximum Sv if S>x then let S=x rem Adjust Tv to compensate for Sv limits if S<>A+t-B then let T=B+S-A else let T=t set_tv96_direct T set_sv96 S return :capture if get_jpg_count < 1 then goto "full" click "shoot_full" C = C+1 return :status cls if get_jpg_count >= 9999 then print "Time left:", "Over", get_jpg_count*i/3600, "hours" else print "Time left:", get_jpg_count*i/3600; ":"; get_jpg_count*i%3600/60; ":"; get_jpg_count*i%60 endif print "Av96:", A print "Tv96:", T, "("; t, "target)" print "Sv96:", S, "("; n; "-"; x, "range)" return :full cls rem vvvvvvv ADDED vvvvvvv set_lcd_display 1 rem ^^^^^^^ ADDED ^^^^^^^ print "MEMORY CARD FULL" end rem vvvvvvv ADDED vvvvvvv :restore set_lcd_display 1 rem ^^^^^^^ ADDED ^^^^^^^ </pre> [[Category:Scripts]] [[Category:UBASIC]] Summary: Please note that all contributions to the CHDK Wiki are considered to be released under the CC-BY-SA Cancel Editing help (opens in new window) Retrieved from "https://chdk.fandom.com/wiki/Drivelapse"