Can you programmatically enable/disable the "Enable Remote" parameter? - Script Writing - CHDK Forum supplierdeeply

Can you programmatically enable/disable the "Enable Remote" parameter?

  • 18 Replies
  • 10332 Views
Advertisements
I need to permanently connect a PictBridge photo printer via USB directly to a camera, and can't disconnect/reconnect it. Nor will I be able to get at the camera.

Yet I want to use the USB remote function to trigger as well. The printer outputs 5v already over the USB cable, so the best way to do this would be to put a pushbutton in line with this usb cable and use it as the trigger. However, since the camera uses the same 5+ to detect if the printer is connected, I'll need to disable the "Enable Remote" parameter in CHDK first, after I'm done using it as the trigger, otherwise it will ignore the printer.

Is there anyway to turn on/off the CHDK remote parameter PROGRAMMATICALLY, without having to go through the CHDK menu?

Thanks
-Mike
« Last Edit: 02 / June / 2011, 16:00:50 by mcaramb »

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Maybe CHDK-DE is a solution for you. There is a script function get/set_config_value(). With this function you can get/set most configuration values, also on/off remote control -> set_config_value(121, <1|0>).

Here you can find a German description and an example script for saving/writing the complete CHDK configuration. The script automatically detects the used language (German or English).

Download CHDK-DE autobuild

msl
CHDK-DE:  CHDK-DE links

Awesome! Will look into

Thank you MSL!!! It worked perfectly and saved the day!!!

Final code and details on this project at:

http://chdk.setepontos.com/index.php?topic=6430.0


Re: Can you programmatically enable/disable the "Enable Remote" parameter?
« Reply #4 on: 30 / September / 2011, 16:31:39 »
Are there any chances this will be incorporated into AllBest build?

Re: Can you programmatically enable/disable the "Enable Remote" parameter?
« Reply #5 on: 30 / September / 2011, 19:42:57 »
Are there any chances this will be incorporated into AllBest build?

AllBest build has not been updated in over 4 year so it seems unlikely that anyone will be working on it.

I borrowed the code from CHDK-DE and submitted a patch for the main CHDK build.  Not sure if it will be accepted or not - there might be some history that I do not know about.  It lets you do something like this :

Code: [Select]
--[[
@title Remote Toggle
--]]

if (get_config_value(121) == 0 ) then
set_config_value(121, 1)
print("turning remote on")
else
set_config_value(121, 0)
print("turning remote off")
end

I suppose you could turn RAW on & off the same way.




« Last Edit: 30 / September / 2011, 21:09:49 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Can you programmatically enable/disable the "Enable Remote" parameter?
« Reply #6 on: 01 / October / 2011, 03:04:37 »
« Last Edit: 01 / October / 2011, 03:41:55 by trismarck »

Re: Can you programmatically enable/disable the "Enable Remote" parameter?
« Reply #7 on: 01 / October / 2011, 03:56:39 »
Is set_config_value available to LUA?  I tried to use it:

set_config_value(121, 1)

and it just returns an error:

attempt to call global 'set_config_value' (a nil value)

Any thoughts?
SD1100IS / SD1200IS / SX130IS / SX30IS


*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Can you programmatically enable/disable the "Enable Remote" parameter?
« Reply #8 on: 01 / October / 2011, 06:34:36 »
Is set_config_value available to LUA? ... and it just returns an error: ... Any thoughts?
You're using CHDKDE ? ;)

Re: Can you programmatically enable/disable the "Enable Remote" parameter?
« Reply #9 on: 01 / October / 2011, 06:39:19 »
No, just the normal one from the US site - so I take it this is only available in the German version?
SD1100IS / SD1200IS / SX130IS / SX30IS

 

Related Topics