コード例 #1
0
ファイル: motion_detector.c プロジェクト: arne182/chdk-eyefi
static void md_kbd_sched_immediate_shoot(int no_release)
{
    action_pop();// REMOVE MD ITEM
  
    // stack operations are reversed!
    if (!no_release)  // only release shutter if allowed
    {
      action_push_release(KEY_SHOOT_FULL);
      action_push_delay(20);
    }
    action_push(AS_MOTION_DETECTOR); // it will removed right after exit from this function
    kbd_key_press(KEY_SHOOT_FULL); // not a stack operation... pressing right now
}
コード例 #2
0
ファイル: motion_detector.c プロジェクト: cigor/CHDK
static void md_kbd_sched_immediate_shoot(int no_release)
{
    action_pop_func(0);// REMOVE MD ITEM

    // stack operations are reversed!
    if (!no_release)  // only release shutter if allowed
    {
        action_push_release(KEY_SHOOT_FULL);
    }
    if (camera_info.cam_key_press_delay > 0)
        action_push_delay(camera_info.cam_key_press_delay);
    action_push_func(action_stack_AS_MOTION_DETECTOR); // it will removed right after exit from this function
    kbd_key_press(KEY_SHOOT_FULL); // not a stack operation... pressing right now

    // MD testing with AF LED
    if (camera_info.perf.md_af_tuning)
    {
        camera_info.perf.md_af_on_flag = 1;
    }
}
コード例 #3
0
ファイル: action_stack.c プロジェクト: DIYBookScanner/chdk
// Push a button click action onto the stack (press, optional delay, release)
// Can only be called from an action stack
void action_push_click(long key)
{
    // WARNING stack program flow is reversed
    action_push_release(key);
    action_push_press(key);
}