if(get_focus_mode()~=1)then set_aflock(1)endIn my experiments with the G1X and sx270, set_aflock(1) ALWAYS autofocuses before it locks. But it may not autofocus successfully, so you can end up with a blurry time lapse. I've tried set_focus(mm) but set_aflock(1) still focuses again. The G1X has a manual focus mode. I always set manual focus before entering <alt> mode and starting the script. If you set_aflock when in manual focus mode it crashes the sx260 and doesn't work, so I put the test for manual focus before the set_aflock.To enter manual focus mode, press the left cursor button twice, then set button, and then use the dials to change the focus. If you half press the shutter button and hold it, then press the left cursor, it enters manual focus mode at that focus position, although you can still use the focus dial.You want to set the manaul focus a little in front of infinity. I usually try to focus on a tree at least 10 meters away if I'm using wide angle. Google "hyperfocal distance" for more info.If you want to do the time lapse with the screen off, the down cursor button changes the display. It cycles through normal display, extra stuff display (like the tilt indicator), and totally off. If you turn it totally off, then press the <alt> button, then the shutter button, it should start the script with the display off.
press("shoot_half") repeat sleep(50) until get_shooting() == true set_aflock(1) release("shoot_half")
set_aflock(1) works best when used like this:Code: [Select] press("shoot_half") repeat sleep(50) until get_shooting() == true set_aflock(1) release("shoot_half")It's similar to pressing the AFL button so if you haven't already got focus it tries to get focus first - even if you are in MF mode.
However it's not possible to completely turn off the display and still keep MF on the G1X (plus many other cameras).As soon as you turn off the display, either with the DISP button or by closing the screen, the camera switches back to autofocus. So far I don't think anyone has found a way around this.
function restore() hfile:close() set_backlight(1) set_aflock(0)end
Quote from: philmoz on 13 / November / 2012, 20:25:10set_aflock(1) works best when used like this:Code: [Select] press("shoot_half") repeat sleep(50) until get_shooting() == true set_aflock(1) release("shoot_half")It's similar to pressing the AFL button so if you haven't already got focus it tries to get focus first - even if you are in MF mode.I found that just set_aflock(1) worked if you're not in manual focus mode, without the "shoot_half". However, I always start a time lapse in manual focus mode so I'm sure of the focus being correct.
I also added this in the restore() function, which is called when a script exits:Code: (lua) [Select]function restore() hfile:close() set_backlight(1) set_aflock(0)end"hfile" is my log file instead of using print_screen. I like to run a time lapse until the battery dies, usually around 2 hours. But on the G1X, hfile never closed and was lost, unfortunately. When I used print_screen, it closes the file with low battery shut down.Do you know if restore() is called during low battery shut down? I may need to go back to print_screen.
QuoteI also added this in the restore() function, which is called when a script exits:Code: (lua) [Select]function restore() hfile:close() set_backlight(1) set_aflock(0)end"hfile" is my log file instead of using print_screen. I like to run a time lapse until the battery dies, usually around 2 hours. But on the G1X, hfile never closed and was lost, unfortunately. When I used print_screen, it closes the file with low battery shut down.Do you know if restore() is called during low battery shut down? I may need to go back to print_screen.I don't know if CHDK gets any notification of a shutdown so I'm not sure it's possible to close any open files or call the 'restore' function.Phil.
You sound very convincing - I guess I'll have to take your word for it and stop searching for solutions if even the geniuses here couldn't figure it out. That's REALLY discouraging. As far as I can tell the screen is currently limiting the number of shots I can get in a single run, not anything else (time/number of photos)... and due to the poor placement of the tripod screw, you can't even change the battery mid-session without mounting the camera off the tripod.
function sleeper(t) set_backlight(0) sleep(t)end
Started by CanonBlue « 1 2 3 » Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)
Started by spe672 « 1 2 3 4 » General Help and Assistance on using CHDK stable releases
Started by Artem Katena General Discussion and Assistance
Started by handleking General Discussion and Assistance
Started by parstonda General Help and Assistance on using CHDK stable releases