Restart camera, AF lamp control, remote off using script? - Script Writing - CHDK Forum supplierdeeply

Restart camera, AF lamp control, remote off using script?

  • 7 Replies
  • 3738 Views
Restart camera, AF lamp control, remote off using script?
« on: 20 / December / 2008, 20:22:46 »
Advertisements
Hello,

1) Is there any script command which could restart camera? shut_down command probably turns camera off but not restart?
2) Is it possible to turn USB remote function on and off by script?
3) Any script command to control AF lamp on/off?

Thanks in advance!

*

Offline fe50

  • ******
  • 3117
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Restart camera, AF lamp control, remote off using script?
« Reply #1 on: 21 / December / 2008, 20:16:52 »
1) Is there any script command which could restart camera? shut_down command probably turns camera off but not restart?
No, there's no command for restarting the cam; shutdown powers the camera off.

Quote
2) Is it possible to turn USB remote function on and off by script?
There's no script command for this.

Quote
3) Any script command to control AF lamp on/off?
Yes, the SET_LED command (use the search function in the wikia / forum)

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Restart camera, AF lamp control, remote off using script?
« Reply #2 on: 22 / December / 2008, 16:34:47 »
may i ask why would you want to restart the cam?

Re: Restart camera, AF lamp control, remote off using script?
« Reply #3 on: 22 / December / 2008, 17:42:05 »
Thanks for answers!

Restart gives possibility to go into PTP mode (PC mode) but if script could turn off USB remote detection then it is possible to go to PTP mode without restarting.

Any idea how complex could be implementing such script command which turn off USB remote mode? I like if I don't need to turn it off manually when needed. Any way to implement browsing/selecting in CHDK menus using script?

Thank you!


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Restart camera, AF lamp control, remote off using script?
« Reply #4 on: 22 / December / 2008, 18:09:29 »
Any idea how complex could be implementing such script command which turn off USB remote mode? I like if I don't need to turn it off manually when needed. Any way to implement browsing/selecting in CHDK menus using script?

If it's just a matter of changing a CHDK config value, it's very simple for Lua: add a new function (or two if you need a get_ function for it too and you probably should to play nice with the script) in core/luascript.c and add the command names to the list in register_lua_funcs() in the same file.

Take a look at luaCB_get_autostart() and luaCB_set_autostart for examples and core/conf.c for the config values to change (you're looking for conf.remote_enable if I'm not mistaken).

Ubasic needs more modifications but it's easy too, see http://chdk.wikia.com/wiki/Adding_Firmware_Features#Adding_a_command_to_uBASIC for instructions.

Re: Restart camera, AF lamp control, remote off using script?
« Reply #5 on: 25 / December / 2008, 15:43:41 »
Thanks folks!

Re: Restart camera, AF lamp control, remote off using script?
« Reply #6 on: 14 / January / 2009, 03:06:13 »
Is it possible to detect  somehow in which mode camera have when script is running: normal photography mode or PC connected (PTP mode)?

My wish is to create such a script which could turn USB remote sense mode on and off and when script switch remote mode off then it monitor does camera goes to PTP mode (PC connection) and waits until PC will be disconnected and then go back to USB remote mode.

Is it possible to do?

Thanks!

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Restart camera, AF lamp control, remote off using script?
« Reply #7 on: 14 / January / 2009, 11:35:16 »
Is it possible to detect  somehow in which mode camera have when script is running: normal photography mode or PC connected (PTP mode)?

My wish is to create such a script which could turn USB remote sense mode on and off and when script switch remote mode off then it monitor does camera goes to PTP mode (PC connection) and waits until PC will be disconnected and then go back to USB remote mode.

Is it possible to do?

No / yes / possibly / sort of, but not without modifying CHDK unless your camera is way different from mine...see this thread: http://chdk.setepontos.com/index.php/topic,2696.0.html.


 

Related Topics