Here is the patch for the action stack. The action stack is a new architectural feature that decouples the stack commands from scripts. It allows it to be reused for any other code piece, and extends the original stack by the ability to have multiple ones running semi-parallel (=interleaved). It is a pre-requirement for scriptless badpixel.bin and a general framework for other asnychronous jobs/commands/queries/whatever. Note that action stacks always run in the kbd thread, no matter where they were started from.
This patch migrates the original scripting functionality to use the new action stacks. Please somebody test scripting from PTP before submitting to trunk.
return stack->comp_id;
Hi,the function "action_stack_is_finished()" need task-id for lookup, but the return value from "action_stack_create()" is the stack-index. I changed line 76 in action_script.c to Code: [Select]return stack->comp_id; and it works fine.rudi
I'm sorry for the delay, I just need to find some free time for this. I'll try and post a patch in the Christmas break.
Here's the next patch. I already had this ready a week ago, but for reasons outside of my control I couldn't test it. This only contains shifting code so that less #ifdefs will need to be placed. The next patch will then be the #ifdefs themselves. There should be no change in behavior or in functionality, with one small exception: (ubasic_)camera_press and friends previously used to set ubasic_error if the function argument (a string) was not a valid button. I deleted setting this variable, as this same function was/is also used by lua scripts.
Since it cannot be retrieved from lua and no other error for lua was set, behavior across scripting languages was already inconsistent. But worse, it was theoretically possible for a bad lua program to cause an error in another correct ubasic script.
Started by Sasha Creative Uses of CHDK
Started by mattkime « 1 2 » Script Writing
Started by andrewalexander.ca Script Writing
Started by lapser General Discussion and Assistance
Started by reyalp « 1 2 » General Discussion and Assistance