Set zoom if switching to Rec mode - LUA Scripting - CHDK Forum supplierdeeply

Set zoom if switching to Rec mode

  • 4 Replies
  • 228 Views
Set zoom if switching to Rec mode
« on: 18 / August / 2019, 07:51:07 »
Advertisements
Hi,


after long time of absense I am back again. I want to get may stereo rig (two Powershot S110) into a certain zoom level if I switch into rec mode.
Is this possible using Lua?

Thanks guys...
2 x IXUS 860IS 100c
2 x Powershot S110 103a

*

Offline reyalp

  • ******
  • 12106
Re: Set zoom if switching to Rec mode
« Reply #1 on: 18 / August / 2019, 15:58:43 »
CHDK doesn't offer a way to automatically set a particular zoom level on switching to rec.

You could write a script switch to rec and set zoom, or just set the zoom. If you tell us a bit more about how you are planning to use it, we can probably provide some code.

Alternately, the Canon firmware C mode may allow you to save a zoom setting.
Don't forget what the H stands for.

Re: Set zoom if switching to Rec mode
« Reply #2 on: 19 / August / 2019, 13:10:14 »
Hi reyalp,

thanks for reply.
After switching on my stereo rig I want to get both cameras into 3rd zoom level which is a focal length of around 50mm (in 35mm format cameras).
50mm is comparable to the focal length of the human eye. And this is best for my stereo images since it gives natural impression to the viewer.


If I switch on the rig the zoom level is set to 1 which is around 24mm (in 35mm format cameras). I have to manually activate the zoom lever twice to get from 24mm to 50mm.
This I have to do every time I switch the camera on. I just want to save this manual step to get the rig read to shoot after switching on.
That's the reason why I need a script that moves the zoom to 3rd level. Hope it is more clear now.


BTW: What is Canon firmware C mode please?
« Last Edit: 19 / August / 2019, 13:23:06 by mr.burns »
2 x IXUS 860IS 100c
2 x Powershot S110 103a

*

Offline reyalp

  • ******
  • 12106
Re: Set zoom if switching to Rec mode
« Reply #3 on: 19 / August / 2019, 13:38:32 »
This is the reason why I need a script that moves the zoom to 3rd level. Hope it is more clear now.
Yep, that makes sense.
Quote
BTW: What is Canon firmware C mode please?
It's the C on the mode dial. See the S110 manual around page 212, "Saving shooting settings"
Basically, set the settings you want in P, M, Tv or Av mode, then save settings. According to the manual, zoom is included in the saved settings. Then when you want to use the settings, you can just set the mode to C on both cameras.

An alternative way to do this would a CHDK startup script, but I think this would be less convenient for your use. You would either need need to set the script to run at startup, or have it triggered by the remote. A startup script would mean your camera also switches to rec and sets zoom when you turn it on, and using the remote would mean you'd have to do something else make the remote trigger shooting afterward.

A script to switch to rec and set zoom would be something like
Code: [Select]
if not get_mode() then
 set_record(1)
 repeat sleep(10) until get_mode()
end
set_zoom(50)
The number for set_zoom depends on your camera. You mentioned the 3rd zoom level, but I think this is only zooming with the control ring, S110 has something like 120 zoom steps with set_zoom(). You can use the CHDK OSD to see what zoom step a particular setting is (CHDK settings->OSD settings->Miscellaneous Values, show zoom as X. First number displayed will be the step)
Don't forget what the H stands for.


Re: Set zoom if switching to Rec mode
« Reply #4 on: 22 / August / 2019, 11:52:18 »
Hi reyalp,


thanks for reply - that really helped. The C mode was really new to me.
I will now figure out what is the best solution for me.


Thanks a lot!  :)
2 x IXUS 860IS 100c
2 x Powershot S110 103a

 

Related Topics