Can md_detect_motion do shoot_full_only? - LUA Scripting - CHDK Forum

Can md_detect_motion do shoot_full_only?

  • 2 Replies
  • 3120 Views
Can md_detect_motion do shoot_full_only?
« on: 13 / May / 2014, 05:23:29 »
Advertisements
It seems that md_detect_motion always does a "shoot_full". Is there a way to make it "shoot_full_only" instead?

I'm trying to create a Lua script that would return to the "detecting motion" state as quickly as possible after md_detect_motion has triggered a shot. The camera is a SX220 and I'm setting exposure and focus manually before the script is started to minimise any delay.

The excellent MDFB2013 script was my starting point but because I'm using full manual, I don't need the script to spend time resetting the exposure and focus after each trigger. I was hoping to:
- press("shoot_half") once at the start of a script
- let md_detect_motion do a press("shoot_full_only")
- release("shoot_full_only") and return to md_detect_motion as quickly as possible
- release("shoot_half") during the cleanup if the script is interrupted

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Can md_detect_motion do shoot_full_only?
« Reply #1 on: 13 / May / 2014, 05:56:02 »
The complete CHDK package includes a simple Lua script for motion detection. Use in line 26 click("shoot_full_only") instead shoot().

msl
CHDK-DE:  CHDK-DE links

Re: Can md_detect_motion do shoot_full_only?
« Reply #2 on: 13 / May / 2014, 06:12:30 »
Thanks very much msl !

That makes sense now ... so basically that script sets all the miscellaneous flag bits (parameter n) to zero. In particular, the first bit which prevents md_detect_motion from doing press("shoot_full") itself. This way, I can do something else instead. Nice!!

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal