set_aflock(1) works well (does in fact lock the focus); however, set_focus thereafter does nothing at all. I've tried enabling manual focus with set_prop(6, 4), and the camera does recognize that it is in manual focus mode, but still does not take the set_focus parameterAny suggestions?
set_prop(6, 4)
A get_focus() before and after reveal the same focus value. I have now also tried using the above lua after switching the camera to P mode, as well as with multiple half-shoots in between.
set_aflock(1) sleep(2000) props=require('propcase') set_prop(props.AF_LOCK, 1) set_focus(1000) sleep(2000) shoot() sleep(2000) set_focus(10000) sleep(2000) shoot()
call_event_proc("SS.Create") call_event_proc("SS.MFOn") sleep(1000) set_focus(1000) sleep(2000) shoot() sleep(2000) set_focus(10000) sleep(2000) shoot()
I still can't get it to work using this code either; however, the focus test script seems to function with the following option (all other methods fail or are unreliable): -- test using SS.Create event_proc to enter MF modeI rearranged the lua to make a "set and snap" script, but it seemingly doesn't work outside of the test script.
I need to send you a thank you card (or something else that is more awesome than a card).
EDIT: Just figured out that by running the above, somehow, the camera sets the subject distance/focus to infinity (shows as -1 when calling get_focus() after running that code). I can't seem to get it to set to anything else though, quite strange.
call_event_proc("SS.Create") call_event_proc("SS.MFOn") set_focus(1000) f1=get_focus() print("pre-shoot half") print(f1) sleep(1000) press('shoot_half') sleep(200) f2=get_focus() print("push-shoot half") print(f2) release('shoot_half') sleep(1000) f3=get_focus() print("release-shoot half") print(f3) press('shoot_full') sleep(200) f4=get_focus() print("post-full shoot") print(f4) release('shoot_full') sleep(2000) f5=get_focus() print("post-full shoot release") print(f5) set_focus(2000) f1=get_focus() print("pre-shoot half") print(f1) sleep(1000) press('shoot_half') sleep(2000) f2=get_focus() print("push-shoot half") print(f2) release('shoot_half') sleep(1000) f3=get_focus() print("release-shoot half") print(f3) press('shoot_full') sleep(200) f4=get_focus() print("post-full shoot") print(f4) release('shoot_full') sleep(2000) f5=get_focus() print("post-full shoot release") print(f5)
EDIT: This is the latest lua I'm running (have the prints in there so I get a running update on the cam screen):
Started by coruele Feature Requests
Started by philgib CHDK Releases
Started by philgib General Discussion and Assistance
Started by gcgc General Help and Assistance on using CHDK stable releases
Started by novsela CHDK Releases