So I did some hunting and found a few things. I got the Shoot command to work.
It eventually called kbd_sched_shoot() in core\kdb.c
Three functions in the stack program caused infinite loops.
void kbd_sched_shoot()
{
// WARNING stack program flow is reversed
kbd_sched_delay(conf.script_shoot_delay*100);// XXX FIXME find out how to wait to jpeg save finished
//KBD_STACK_PUSH(SCRIPT_WAIT_SAVE); //causes capture to fail.
KBD_STACK_PUSH(KEY_SHOOT_HALF);
KBD_STACK_PUSH(SCRIPT_RELEASE);
KBD_STACK_PUSH(KEY_SHOOT_FULL);
KBD_STACK_PUSH(SCRIPT_RELEASE);
kbd_sched_delay(30);
KBD_STACK_PUSH(KEY_SHOOT_FULL);
KBD_STACK_PUSH(SCRIPT_PRESS);
KBD_STACK_PUSH(SCRIPT_WAIT_FLASH);
//KBD_STACK_PUSH(SCRIPT_WAIT_EXPHIST); //causes capture to fail.
//KBD_STACK_PUSH(SCRIPT_PR_WAIT_EXPHIST); //causes capture to fail.
kbd_sched_delay(30);
KBD_STACK_PUSH(KEY_SHOOT_HALF);
KBD_STACK_PUSH(SCRIPT_PRESS);
KBD_STACK_PUSH(SCRIPT_PR_WAIT_SAVE);
}
SCRIPT_WAIT_SAVE
SCRIPT_WAIT_EXPHIST
SCRIPT_PR_WAIT_EXPHIST
All three fail. The stack just hangs at those spots if they are enabled.
I did some debug output for SCRIPT_WAIT_SAVE.
case SCRIPT_WAIT_SAVE:{
if (state_shooting_progress == SHOOTING_PROGRESS_DONE)
{
script_console_add_line("first one");
script_console_add_line((unsigned char *)state_shooting_progress);
script_console_add_line("second one");
script_console_add_line((unsigned char *)SHOOTING_PROGRESS_DONE);
kbd_int_stack_ptr-=1; // pop op.
} else {
script_console_add_line("third one");
script_console_add_line((unsigned char *)state_shooting_progress);
script_console_add_line("fourth one");
script_console_add_line((unsigned char *)SHOOTING_PROGRESS_DONE);
}
return;
}
Essentially the function operates as it was originally written. I just threw in an else to find out the values for the boolean operation. In this example, state_shooting_progress and SHOOTING_PROGRESS_DONE never become equal. Therefore, the console outputs for the "third one" and "fourth one" only display.
I'm wondering if SHOOTING_PROGRESS_DONE is set wrong, or if state_shooting_progress never gets updated. It looks like state_shooting_progress never gets updated.
...
After some further investigation, it could be that int shooting_in_progress()
{
int t = 0;
_GetPropertyCase(205, &t, 4);
return t != 0;
}
in generic\shooting.c doesn't call the right propertycase. Anybody have any thoughts on that possibility?