On setting focus on Canon A4000is - page 2 - Script Writing - CHDK Forum

On setting focus on Canon A4000is

  • 13 Replies
  • 7658 Views
Re: On setting focus on Canon A4000is
« Reply #10 on: 17 / July / 2015, 03:57:30 »
Advertisements
Normally you would get this from the CHDK menu, but if your cameras physical controls aren't accessible, you should be able to use the romlog.lua script like

Unfortunately it seems I might need a different version of the CHDK compared the one I have downloaded and installed:

Code: [Select]
# ./chdkptp.sh
___> connect
connected: Canon PowerShot A4000 IS, max packet size 512
con> =loadfile('A/CHDK/SCRIPTS/TEST/romlog.lua')()
no match A/CHDK/SCRIPTS/TEST/romlog.lua:19: native calls disabled
ERROR: A/CHDK/SCRIPTS/TEST/romlog.lua:19: native calls disabled

I had one of those automated tools download the correct image for my camera, but it should be a4000-102a-1.3.0-4169-full_ALPHA.zip

Re: On setting focus on Canon A4000is
« Reply #11 on: 17 / July / 2015, 08:12:04 »
Unfortunately it seems I might need a different version of the CHDK compared the one I have downloaded and installed:
Your version is correct.  Go to the CHDK Miscellaneous Stuff menu and select  Enable Lua Native Calls [ * ]


Ported :   A1200    SD940   G10    Powershot N    G16

Re: On setting focus on Canon A4000is
« Reply #12 on: 17 / July / 2015, 14:02:49 »
It seems to me the case of a cat that tries to bite its own tail. I need to access the controls through the GUI of chdkptp because the camera is in an expensive to open box; but it crashes, so I need to retrieve the debug log; but to do so I have to issue some commands on the controls.

Unless there is a way to enable native commands (why are they disabled in the first place?) form the chdkptp command line?

Thank you!

*

Offline reyalp

  • ******
  • 14125
Re: On setting focus on Canon A4000is
« Reply #13 on: 17 / July / 2015, 16:08:14 »
It seems to me the case of a cat that tries to bite its own tail. I need to access the controls through the GUI of chdkptp because the camera is in an expensive to open box; but it crashes, so I need to retrieve the debug log; but to do so I have to issue some commands on the controls.

Unless there is a way to enable native commands (why are they disabled in the first place?) form the chdkptp command line?
Sorry, I forgot about this :(

There currently isn't a way to enable them over PTP.

If you have another camera that isn't in the box, you could enable them and then copy the CFG file.  Zeno's CFG editor http://zenoshrdlu.com/cfgedit/chdkcfgedit.html might also let you do this.

Another option is to build your own CHDK with native calls permanently enabled, using OPT_FORCE_LUA_CALL_NATIVE=1 in your localbuildconf.inc. I think the chdkde builds (see http://forum.chdk-treff.de/download.php) are set this way by default, so you could use one of those.

Native calls are disabled by default because it makes it trivial to write a script that would permanently brick the camera.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal