I used camera_set_led since that's what's called from ubasic and Lua, and seemed to have the highest chance of working across all cameras.
It did occur to me there might be delays using the firmware functions rather than going direct; but I didn't think they would be significant.
I've added the AF LED testing for live view & motion detect to the trunk (revision 2574).
This doesn't need a special build anymore; but the CAM_AF_LED value does need to be set correctly for each camera (only G12, G1X, SX30, SX40 and IXU310 done so far).
The MD_Tune.bas script will enable the extra AF LED test code as needed (controlled with the new 'md_af_on_time' script function).
Quote from: philmoz on 16 / February / 2013, 05:15:51I've added the AF LED testing for live view & motion detect to the trunk (revision 2574).Thanks for doing this.Just curious - are there uses for this for anything beyond porting? Seems a change to build this into the core instead of a build option for use during porting? But I guess with flt modules it really doesn't hurt to do so.
QuoteThe MD_Tune.bas script will enable the extra AF LED test code as needed (controlled with the new 'md_af_on_time' script function).
#define CAM_AF_LED 1
#define CAM_AF_LED 9 or 10
A720 Code: [Select]#define CAM_AF_LED 9 or 10The A720 uses _PostLEDMessage instead _LEDDrive.The test script starts. After a while the screen freezes. No measured results will be displayed. With grid option the camera tries to draw a grid. After a few seconds freezes the LCD. The AF LED will not be activated.
Can you control the AF LED using 'set_led' in a simple script without it crashing?
Quote from: philmoz on 16 / February / 2013, 18:11:39Can you control the AF LED using 'set_led' in a simple script without it crashing?Yes, this is not a problem.msl
Started by Barney Fife « 1 2 » Completed and Working Scripts
Started by knorke Creative Uses of CHDK
Started by mrShrimp LUA Scripting
Started by mellow-yellow Script Writing
Started by Kestrel1978 General Help and Assistance on using CHDK stable releases