...One of the scripts I've tried has an option in it for setting the focus to infinity, but all the reading I've done on here says the way the scripter wrote it, it shouldn't work. This one specifically is yass and it's uses set_prop 6, which about mid way down on this page, http://chdk.wikia.com/wiki/UBASIC/propertyCaseUse says property 6 can't be set. Does this work on other people's cameras?
I've tried turning on the G9 camera, getting out of "ALT" mode, using Av and setting the MF to infinity. Then I get back into "ALT" mode, start the script by pressing the shutter button and immediately it refocuses to something less than infinity.
If you put your camera to MF mode and then start a script that doesn't emulate keypresses to exit MF mode and doesn't call any commands relating to focus (including writing to any propcases relating to focus) and doesn't shut down the LCD or visit PLAY mode, then your focus shouldn't change.
on page 126 of your G9 Users Manual, it mentions that while in Manual Focus, pressing the shutter halfway will cause your camera to Auto Focus.
Wicked...are there more models that do this? Sounds like a feature that makes Canon's MF mode nearly useless (or very annoying) for people who commonly use zebra, histogram, DoF calculator, fast react MD or other CHDK features or scripts that do their magic during half shoot.Also sounds like something that would be rather hard to disable by CHDK but maybe could somehow be worked around by e.g. making CHDK poll for MF mode and setting CHDK focus override to new focus distances unless it changes during half shoot.
++++++++++++++++++++++++++++++++++++++++++intervalometer with day and week++++++++++++++++++++++++++++++++++++++++++rem Author - JoeD, based on original script by Keoeeitrem x-accuracy for delay, j-accuracy for intervalrem Day of week parameters determine what days the camera takes picturesrem Proper values are from 0-6, with 0 being Sunday and 6 being Saturdayrem Script has not been optimizedx=-1j=-1755@title Ultra Intervalometer with Day of Week and Time@param a Delay 1st Shot (Mins)@default a 0@param b Delay 1st Shot (Secs)@default b 0@param c Number of Shots (0 inf)@default c 0@param d Interval (Minutes)@default d 0@param e Interval (Seconds)@default e 10@param p Starting Hour (24 Hr time)@default p 7@param q Starting Minute @default q 0@param r Ending Hour (24 Hr time)@default r 16@param s Ending Minute@default s 0@param u Day of Week to Start (0 is Sunday, 6 is Saturday)@default u 1@param v Day of Week to End (0 is Sunday, 6 is Saturday)@default v 6@param rem sets number of shots already taken to 0n=0rem calculates time in ms between each shott=(d*600+e*10)*100+jif c<1 then let c=0if t<100 then let t=100rem calculates first shot delay in secondsg=(a*60)+b+xif g<=0 then goto "interval"rem displays seconds left before shooting beginsfor m=1 to g print "Intvl Begins:", (g-m)/60; "min", (g-m)%60; "sec" sleep 930 next mgoto "interval":interval l=get_time 3 o=get_time 4 y=get_time 5 rem following lines calculate current day of week in variable w, 0 is sunday if o<3 then gosub "change" k=(l+(2*o)+(6*(o+1)/10)+y+(y/4)-(y/100)+(y/400)+1) w=k%7 if w<u or w>v then goto "weekend" rem calculate time of day, determine if it's in range i=get_day_seconds f=(p*3600)+(q*60) h=(r*3600)+(s*60) if i<f or i>h then gosub "rest" n=n+1 if c=0 then print "Shot", n else print "Shot", n, "of", c shoot if n=c then shut_down sleep t goto "interval" :change o=o+12 y=y-1 return :restdosleep 60000i=get_day_secondsuntil i>=f and i<=hreturn:weekendi=get_day_secondsz=(86400-i)goto "interval"
++++++++++++++++++++++++++++++++++++++++++++++++++++intervalometer.bas++++++++++++++++++++++++++++++++++++++++++++++++++++rem author Divalent, based on my "simple intervalometer" script previously postedrem (which in turn was based on the ONMI intervalometer of Keoeeit)rem Camera: S3, and other Digic II camera'srem CHDK version: Fingalo's versions v106 or laterrem (must have get_tick_count and get/set prop)remrem Note: this intervalometer only shoots in photo mode (not video or burst)rem@title Accurate Intervalometer@param a Number of Shots@default a 180@param e Interval (Mins)@default e 0@param f Interval (Secs)@default f 2@param g Interval (0.1 Secs)@default g 0@param h image size (0,1,2,4,5)@default h 4 if e<0 then e=0 if f<0 then f=0 if g<0 then g=0rem TURN RAW OFF! (this is my preference. You can delete) set_raw 0rem Turn NR off. (I usually have this off, but just in case) set_raw_nr 1rem ensure # of shots more than 1 if a<2 then a=2rem d = user specified cycle time (in 0.1 sec units) d=e*600+f*10+grem now convert d to msecs (same units as get_tick_count uses) d=d*100 if d<1 then d=1rem ======== Digic III cameras, remove this section =========rem, get jpg Image quality (= 0,1,2 from best to worst)rem get_prop 23 irem explicitly set quality to bestrem set_prop 23 0rem, get image size 24 = 0, 1, 2, 4, 8 for L, M1, M2, S, Wrem get_prop 24 jrem, check image size variable, force to a valid numberrem if h<0 then h=0rem if h>4 then h=8rem if h=3 then h=4rem set_prop 24 hrem ======== end of Digic II camera-specific section ========= n=1rem start with initial pause of 1 sec sleep 1000 t=get_tick_count shoot sleep 100 print "Shot", n, "of", arem now we've done the first shot. do the rest for n=2 to a s=t+d:wait_loop t=get_tick_count if t<s then goto "wait_loop" shoot sleep 100 print "Shot", n, "of", a next nrem, restore 23 & 24 Image quality and size set_prop 23 i set_prop 24 j end
...Technically, I have two problems. I have an interval timing issue and a manual focus issue...I'm trying to combine the functionality of two scripts that I've found...Program "Intervalometer.bas" has accurate timing on my G9...Program "intervalometer with day and week" is the functionality I need, but has very erratic intervals on my camera.I found safety MF to be propcase 277 for digicIII cameras...the listing for that propcase doesn't say whether or not it's a RO or RW, it's blank. I'm guessing it's not been confirmed if it works?
After looking at both of the scripts I decided to create my own version - I still need to finish testing, but should have something for you soon. There will be no PropCas statements, so you should be able to use it on your G9.
rem Author SkyWalker9@title Selective Intervalometer@param a Number of Shots@default a 180@param e Interval (mins)@default e 5@param f Interval (secs)@default f 0@param p Starting Hour (24 Hr time)@default p 7@param q Starting Minute @default q 0@param r Ending Hour (24 Hr time)@default r 18@param s Ending Minute@default s 0@param u Start DOW (0=Sun..6=Sat)@default u 1@param v End DOW (0=Sun..6=Sat)@default v 6rem Check input variables for proper values if a<2 then a=2 if e<0 then e=0 if f<0 then f=0 if p<0 then p=0 if p>23 then p=23 if q<0 then q=0 if q>59 then q=59 if r<0 then r=0 if r>23 then r=23 if s<0 then s=0 if s>59 then s=59 if u<0 then u=0 if u>6 then u=6 if v<0 then v=0 if v>6 then v=6rem Calculate user specified cycle/interval time in ms d=(e*600+f*10)*100 if d<1 then d=1rem Calculate number of shots in time period (1 min=60K "ticks") N=((r*60+s)-(p*60+q))*60000+1rem Next two statements combine "hour" and "minutes" (hour:11 minute:30 = 1130)rem This reduces the number of "if" statements required in "check_time" subroutine p=p*100+q r=r*100+srem Print Error message if Start Time is after End Time and exit script if r>=p then goto "ok1" print "START Time after END" end:ok1rem Print message if Start Day of Week is after End Day of Week and exit script if v>=u then goto "ok2" print "START DOW after END" end:ok2rem Print a caution message if Image Sabilization (IS) is enabled x=get_IS_mode if x<>3 then print "Caution: IS enabled" gosub "dayofweek" select w case 0; print "Today is Sun" case 1; print "Today is Mon" case 2; print "Today is Tue" case 3; print "Today is Wed" case 4; print "Today is Thur" case 5; print "Today is Fri" case 6; print "Today is Sat" end_select select u case 0; print "Start on Sun" case 1; print "Start on Mon" case 2; print "Start on Tue" case 3; print "Start on Wed" case 4; print "Start on Thur" case 5; print "Start on Fri" case 6; print "Start on Sat" end_select select v case 0; print "End on Sun" case 1; print "End on Mon" case 2; print "End on Tue" case 3; print "End on Wed" case 4; print "End on Thur" case 5; print "End on Fri" case 6; print "End on Sat" end_selectrem Allows camera vibrations to stop sleep 1000rem Initializes shot counter; script terminaterem when n=a in the "take_shots" subroutine n=1rem -- Do not add comments after this point ---:check_day gosub "dayofweek" if w>=u and w<=v then gosub "check_time" goto "check_day":check_time F=get_time 0 Q=get_time 1 F=F*100+Q if F<p or F>r then return gosub "take_shots" goto "check_time":take_shots for i=1 to N b=get_tick_count shoot sleep 100 print "Shot", n, "of", a if n=a then shut_down n=n+1 s=b+d:wait_loop b=get_tick_count if b<s then goto "wait_loop" next i return:dayofweek D=get_time 3 M=get_time 4 Y=get_time 5 A = (14-M)/12 Y = Y-A M = M+12*A-2 w = (D+Y+(Y/4)-(Y/100)+(Y/400)+(31*M/12))%7 returnend
Started by Jim Script Writing
Started by Co2Castro General Help and Assistance on using CHDK stable releases
Started by abhay Feature Requests
Started by Glenstr General Help and Assistance on using CHDK stable releases
Started by Davo « 1 2 » Script Writing