Putting Canon S110 into MF or AFL - page 3 - Script Writing - CHDK Forum

Putting Canon S110 into MF or AFL

  • 37 Replies
  • 10938 Views
Re: Putting Canon S110 into MF or AFL
« Reply #20 on: 03 / March / 2014, 02:33:59 »
Advertisements
Quote
It would be fairly easy to modify the camera side script used by remoteshoot to turn off the display periodically. You can find the code in chdkptp lua/rlibs.lua rs_shoot

I'll postpone it, as it's not that critical right now  ;)

Do you mind getting back to the reboot thing?

I haven't succeed rebooting the camera neither by using
Code: [Select]
chdkptp -rnor
Code: [Select]
chdkptp -e"lua reboot()"
also I noticed that the camera (Reminder: Canon S110) doesn't fully support 'killscript' command and so it crashes and start shooting like crazy...

I will remind you that what I'm trying to do is to stop a running 'remoteshoot' in order to initiate another one without touching the camera.

Thanks, Nadav.

*

Offline reyalp

  • ******
  • 13143
Re: Putting Canon S110 into MF or AFL
« Reply #21 on: 03 / March / 2014, 23:50:44 »
I haven't succeed rebooting the camera neither by using
Code: [Select]
chdkptp -r
-r reads a rc file (chdkptp commands), it doesn't reboot.
Quote
nor
Code: [Select]
chdkptp -e"lua reboot()"
You would need a -c to connect. If you are doing that, then I need more details

Quote
also I noticed that the camera (Reminder: Canon S110) doesn't fully support 'killscript' command and so it crashes and start shooting like crazy...
This does not depend on the camera, it depends on the chdk version. killscript is supported in the CHDK 1.3 development version,  available from http://mighty-hoernsche.de/trunk/
Don't forget what the H stands for.

Re: Putting Canon S110 into MF or AFL
« Reply #22 on: 25 / April / 2014, 20:29:36 »
Hi nadavofi, hi all,

I am facing a similar "problem" and before I reinvent the wheel and invest hours of time, I would like to ask you if you could post you script?

Thanks a lot in advance!
Kind regards,
Solino

Re: Putting Canon S110 into MF or AFL
« Reply #23 on: 26 / April / 2014, 02:23:19 »
Solino,
What exactly do you need the script to perform?
What kind of camera do you use?

Nadav


Re: Putting Canon S110 into MF or AFL
« Reply #24 on: 26 / April / 2014, 08:36:44 »
Nadav,

thanks a lot for your fast response!

I am triggering the camera via USB using the following code:
a = -1
repeat
   a = get_usb_power(0)
   if (a>0) then
      press("shoot_full")
      sleep(50)
      release("shoot_full")
   end
   sleep(100)
until ( false )

Not sure if this is the best way but it worked for me with my older Ixus.
What I need is to set focus to infinity (or some value, e.g. 20m) and lock the focus.
I would also like to set the ISO and shutter speed settings to predetermined ranges/values. This should (if I understood correctly) be possible with CHDK without using a script. But it doesn't seem to work properly.

I tried:
set_focus( 131535 ) // 65535
set_aflock( 1 )

but unfortunately it is not working for me no matter what mode I put the camera in.

Any help is greatly appreciated!
TIA,
Solino
 

Re: Putting Canon S110 into MF or AFL
« Reply #25 on: 26 / April / 2014, 08:52:59 »
I'm not sure it will be exactly the same since I run the LUA commands using chdkptp protocol instead of LUA script from within the camera, but this is the sequence I'm using:

this is all lua commands:
Code: [Select]
enter_alt();
call_event_proc('SS.Create'); call_event_proc('SS.MFOn'); - necessary for working with manual focus
set_prop(222,0); - set IMAGE resolution
set_focus(65000); - set FOCUS (65000 is inf)
set_prop(272,0); - set WB
set_prop(102,1); - set Drive Mode

Hope this will be helpful

Nadav

Re: Putting Canon S110 into MF or AFL
« Reply #26 on: 26 / April / 2014, 09:35:26 »
Great! Thanks!

I'll try to set it up within the next days...
Since I have no external client I am not sure if it will work. I first need some closer look at ptp. This discussion is the first time I came across it.

Thanks again,
Solino

Re: Putting Canon S110 into MF or AFL
« Reply #27 on: 26 / April / 2014, 11:29:37 »
Code: [Select]
call_event_proc('SS.Create'); call_event_proc('SS.MFOn'); - necessary for working with manual focus

This code will only work on some cameras and may actually crash on others.   Better to use CHDK 1.3.0 and

Code: [Select]
set_mf(1)which will work for almost all cameras and should not crash for the few where it does not work.  There is a version for 1.2.0 here :  http://chdk.setepontos.com/index.php?topic=11142.msg111229#msg111229

There is also a new function in 1.3.0 that lets you know which focus modes work on your camera - get_sd_over_modes().  I'll get some documentation added to the wiki in the next day or so.

Quote
Code: [Select]
set_prop(272,0); - set WB
Note that 272 does not work for all cameras.  Some use 268, 270, or 271 for the same function. Use
Code: [Select]
set_prop(PROPCASE_WB_MODE,0); - set WB
to be camera model independent.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Putting Canon S110 into MF or AFL
« Reply #28 on: 26 / April / 2014, 12:04:17 »
Also you can use the following link to look for and try out some other Prop Cases:
http://chdk.wikia.com/wiki/PropertyCase

Nadav

*

Offline reyalp

  • ******
  • 13143
Re: Putting Canon S110 into MF or AFL
« Reply #29 on: 26 / April / 2014, 17:23:36 »
Code: [Select]
set_prop(PROPCASE_WB_MODE,0); - set WB
to be camera model independent.
From lua this would be
Code: [Select]
props=require'propcase'
set_prop(props.WB_MODE,0)
...
If you are just setting one prop from chdkptp, it can be more convenient to do it like
Code: [Select]
=set_prop(require'propcase'.WB_MODE,0)
The propcase names can be found in the propsetN.h files https://tools.assembla.com/svn/chdk/trunk/include/ or in the CHDK/LUALIB/GEN/propsetN.lua files
Don't forget what the H stands for.

 

Related Topics