/*-- ----------------- Alex scriptless remote additions start --------------------*/static int remoteHalfShutter=0, remoteFullShutter=0, remoteShooting=0, remoteClickTimer=0;#define REMOTE_MAX_CLICK_LENGTH 50/*-------------------- Alex scriptless remote additions end ---------------------*/long kbd_process(){/* Alternative keyboard mode stated/exited by pressing print key. * While running Alt. mode shoot key will start a script execution. */ if (kbd_blocked){/*------------------- Alex scriptless remote additions start --------------------*/ if (remoteShooting) { if (remoteHalfShutter) { if (get_usb_power(1)) { if (remoteClickTimer < REMOTE_MAX_CLICK_LENGTH) { remoteHalfShutter=0; remoteFullShutter=1; kbd_key_press(KEY_SHOOT_FULL); } return 1; } else { --remoteClickTimer; if ( remoteClickTimer == 0 ) { kbd_key_release_all(); remoteHalfShutter=0; remoteShooting=0; kbd_blocked=0; return 0; } } } if (remoteFullShutter) { if (get_usb_power(1)) { return 1; } else { kbd_key_release_all(); remoteFullShutter=0; remoteShooting=0; kbd_blocked=0; return 0; } } }/*-------------------- Alex scriptless remote additions end ---------------------*/ if (key_pressed){ if (kbd_is_key_pressed(conf.alt_mode_button)) { ++key_pressed; if (key_pressed==CAM_EMUL_KEYPRESS_DELAY) { kbd_key_press(conf.alt_mode_button); } if (key_pressed==(CAM_EMUL_KEYPRESS_DELAY+CAM_EMUL_KEYPRESS_DURATION)) { kbd_key_release_all(); key_pressed = 2; kbd_blocked = 0;// gui_kbd_leave(); } } else if (kbd_get_pressed_key() == 0) { gui_kbd_enter(); key_pressed = 0; } return 1; } if (kbd_is_key_pressed(conf.alt_mode_button)){ key_pressed = 2; kbd_blocked = 0; gui_kbd_leave(); return 1; } if (kbd_is_key_pressed(KEY_SHOOT_FULL)){ if (!state_kbd_script_run){ script_console_clear(); script_console_add_line(lang_str(LANG_CONSOLE_TEXT_STARTED)); script_start(); } else { script_console_add_line(lang_str(LANG_CONSOLE_TEXT_INTERRUPTED)); script_end(); } } if (state_kbd_script_run) process_script(); else { gui_kbd_process(); } } else { //if (kbd_is_key_pressed(KEY_SHOOT_HALF) && kbd_is_key_pressed(conf.alt_mode_button)) return 0; if (!key_pressed && kbd_is_key_pressed(conf.alt_mode_button)){ kbd_blocked = 1; key_pressed = 1; kbd_key_release_all();// gui_kbd_enter(); return 1; } /*------------------- Alex scriptless remote additions start --------------------*/ if (conf.remote_enable && key_pressed != 2 && get_usb_power(1)) { remoteShooting = 1; remoteHalfShutter = 1; remoteClickTimer = REMOTE_MAX_CLICK_LENGTH; kbd_blocked = 1; kbd_key_release_all(); kbd_key_press(KEY_SHOOT_HALF); return 1; }/*-------------------- Alex scriptless remote additions end ---------------------*/ if (key_pressed == 2) { if (kbd_is_key_pressed(conf.alt_mode_button)) return 1; // wait until released before unblocking kbd else key_pressed = 0; } if (conf.use_zoom_mf && kbd_use_zoom_as_mf()) { return 1; } other_kbd_process(); // processed other keys in not <alt> mode } return kbd_blocked;}
1. Checking wether camera is in manual focus mode might be usefull because you don't have to press twice the remote button. Could speed up things. Anyway the camera does not attempt to focus if it is already set to Manual , so this is not a big problem
2. By default Remote USB option is disabled, the purpose of the code is to enable use of remote USB, so it might be better to set it on from the begining.
4. I tried the following build , CHDK/MoreBest - CHDK Wiki , but it is utterly slow : every time after I shoot with the remote, it seems to go into ALT mode , and if I want to zoom in or out , it takes about 0.5 sec until zooming starts. The little blue LED blinks. So your enhacement is great, hope you can get it onto a standard build !
Glad that it works for you.Quote from: cighir.victor on 06 / August / 2008, 05:18:581. Checking wether camera is in manual focus mode might be usefull because you don't have to press twice the remote button. Could speed up things. Anyway the camera does not attempt to focus if it is already set to Manual , so this is not a big problemTry the attached build, it should work as you wish, i.e. shoots on first press if the focusing is in the manual mode. The corresponding code is also there.
Quote from: cighir.victor on 06 / August / 2008, 05:18:582. By default Remote USB option is disabled, the purpose of the code is to enable use of remote USB, so it might be better to set it on from the begining. That won't work so far as i can see, since if the remote is automatically enabled by the USB signal, then how can it be disabled to allow for file transfer?
Quote from: cighir.victor on 06 / August / 2008, 05:18:584. I tried the following build , CHDK/MoreBest - CHDK Wiki , but it is utterly slow : every time after I shoot with the remote, it seems to go into ALT mode , and if I want to zoom in or out , it takes about 0.5 sec until zooming starts. The little blue LED blinks. So your enhacement is great, hope you can get it onto a standard build ! It's highly specialized code for stereophotography freaks. Don't know if it's only my personal trouble, but it hangs my cam if used in burst mode... If the blue LED is blinking after a shot, you are probably saving RAW.
but it hangs my cam if used in burst mode...
Started by GrAnd Forum related topics (including issues)
Started by jordoex General Discussion and Assistance
Started by emklap « 1 2 » DSLR Hack development
Started by Lofty68 Script Writing
Started by pablox Creative Uses of CHDK