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

Putting Canon S110 into MF or AFL

  • 37 Replies
  • 15873 Views
*

Offline reyalp

  • ******
  • 14080
Re: Putting Canon S110 into MF or AFL
« Reply #10 on: 05 / February / 2014, 23:51:04 »
Advertisements
I did and it works!
Do you know how do I set cont to be INFINITY? (is it possible?)
You could set it to some very large number like 100000 if you want. But beware the current cont code breaks if the image counter wraps around from 9999. I'll try to fix that.

Quote
I don't see what you mean by pipeline (I'm familiar with the term but prob not in this context)... can you give me an example?
I assume $captureCommand = $exec." -c -e\"shoot -tv=1/1000 -sv=50 -av=2 -dl\" "; is part of some script you were using to trigger the photos.  I don't know what language it's or what controls it or what platform your system is, but if you could make it print the shoot command periodically, you could do something like

your_script | chdkptp

If it's just running in a loop as fast as it can, you could just write the whole loop in chdkptp lua, something like

Code: [Select]
!i=0 while i < 10 do cli:print_status(cli:execute('remoteshoot')) i = i + 1 end
The above runs 10 times, but you could use while true ... if you wanted it to run forever, or check some control file or something.

Also, the current remote shoot code has a bug that will give you an "ERROR: a script is already running" message sometimes in the example above. A short sys.sleep() after the remoteshoot should take care of that.

Quote
In addition to that, Do you know if it's possible to somehow ignore return values and\or prevent it from being printed to the console (e.g. on "chdkptp -c" i get the message "connected: Canon PowerShot S110, max packet size 512").
set cli_verbose=0
will disable that message. There may still be some other messages.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14080
Re: Putting Canon S110 into MF or AFL
« Reply #11 on: 06 / February / 2014, 00:33:41 »
I fixed the two bugs mentioned in the previous post in chdkptp svn.

You can now call remoteshoot rapidly without getting the "script is already running" error.

I think the fix for exposure count wrap around in -cont will work but I haven't tested it since none of my cameras were close to wrapping. Note that remoteshoot will still get filename collisions if you shoot > 9999 photos in a single session.

I haven't uploaded a new build, but these fixes are only the lua files so you should be able to just replace your existing lua files with the latest from svn.  You can download them from  https://www.assembla.com/code/chdkptp/subversion/nodes/486/trunk/lua
Don't forget what the H stands for.

Re: Putting Canon S110 into MF or AFL
« Reply #12 on: 08 / February / 2014, 11:04:49 »
Quote
I think the fix for exposure count wrap around in -cont will work but I haven't tested it since none of my cameras were close to wrapping. Note that remoteshoot will still get filename collisions if you shoot > 9999 photos in a single session.

That's true unless I copy and remove the photos from the directory where RemoteShoot puts them, right?
I have a server that collects those images from the local directory, it can delete each copied picture and then prevent any kind of wrap-around errors?


I read here: http://chdk.setepontos.com/index.php?topic=3832.msg35985#msg35985
that it is impossible to initiate a restart of the "image file counter" parameter.
Is this still true?

How do I turn off LCD using a lua script?

In the upcoming week I'm going to experiment the script & camera on the air.

Hope to get good results :)

Nadav

*

Offline reyalp

  • ******
  • 14080
Re: Putting Canon S110 into MF or AFL
« Reply #13 on: 08 / February / 2014, 18:10:52 »
That's true unless I copy and remove the photos from the directory where RemoteShoot puts them, right?
Yes, that should be fine. Just saying if you shoot > 9999 images in the same directory, they will start to overwrite.

Of course, I haven't actually tested that ;)
Quote
I read here: http://chdk.setepontos.com/index.php?topic=3832.msg35985#msg35985
that it is impossible to initiate a restart of the "image file counter" parameter.
The camera should reset the image number based on what is on the card on restart. So if you put an IMG_0001.JPG in the image directory, it will probably reset to one. This behavior should be documented in the canon manual.

Additionally, if you use CHDK Lua reboot() without images on the card, changes to the image counter since the last reboot will not probably not be saved.

Quote
How do I turn off LCD using a lua script?
See http://chdk.wikia.com/wiki/Script_commands#set_lcd_display.28.29

Note http://chdk.wikia.com/wiki/CHDK_Scripting_Cross_Reference_Page is a good way to find script functions.

Quote
In the upcoming week I'm going to experiment the script & camera on the air.
Good luck, and let us know how it turns out :)
Don't forget what the H stands for.


Re: Putting Canon S110 into MF or AFL
« Reply #14 on: 17 / February / 2014, 13:36:18 »
Hey, the flight was postponed therefor still no results to showoff :)
But, I have another two ques:

1. Is it possible to turn on the camera using a lua command or any other chdkptp command? (I mean when the camera is totally off)

2. As I assume the answer to the latter is "NO", how do I prevent the camera from shutting itself off after long standby?

3. While running a very long remoteshoot inst, is it possible to kill the instruction but still be asble to send the camera another one?
If I just kill the process (chdkptp process) then the camera gets crazy - get stuck for a while and then start capturing very fast by itself (perhaps trying to finish the remoteshooting on its own)

I want to be able to re-initiate a remoteshoot inst using another set of flags while one is being generated...

Nadav.

*

Offline reyalp

  • ******
  • 14080
Re: Putting Canon S110 into MF or AFL
« Reply #15 on: 17 / February / 2014, 16:35:58 »
1. Is it possible to turn on the camera using a lua command or any other chdkptp command? (I mean when the camera is totally off)
No. Camera off,  nothing is running. Some very old powershots would turn on if there was power applied to the USB, but AFAIK this doesn't apply to any cameras released after 2007? or so.
Quote
2. As I assume the answer to the latter is "NO", how do I prevent the camera from shutting itself off after long standby?
CHDK settings -> disable LCD off -> always.

Quote
3. While running a very long remoteshoot inst, is it possible to kill the instruction but still be asble to send the camera another one?
If I just kill the process (chdkptp process) then the camera gets crazy - get stuck for a while and then start capturing very fast by itself (perhaps trying to finish the remoteshooting on its own)
If you are using a trunk build, you should be able to use the killscript command.

I'll see if I can make the camera side script behave better if the PC goes away, but this may be difficult because the chdk code isn't really aware if there is anything connected or not.

A better way to do this might be using the experimental rsint command. In this case, your controller would have to trigger each shot, but it would be possible to stop shooting cleanly. See discussion starting at http://chdk.setepontos.com/index.php?topic=6231.490
With minor modifications, you could also adjust exposure settings without leaving rsint.
Don't forget what the H stands for.

Re: Putting Canon S110 into MF or AFL
« Reply #16 on: 21 / February / 2014, 09:47:05 »
Quote
CHDK settings -> disable LCD off -> always
It didn't change anything. If I use the set_lcd_display(0) alone it does what it should.
When I use it before running a remoteshoot instruction it goes OFF and then back ON (to show me the capture previews). Maybe I'm using it all wrong.
this is my remote shoot instruction (wrapped inside a perl string):
Code: [Select]
my $captureCommand = $exec." -c -e\"remoteshoot -tv=1/1000 -sv=200 -av=2 -cont=".$contValue."\" ";when $exec equals executable path and $contValue is an integer.

If I generate the set_lcd_display() before or after that line is generated then it doesn't cover the shooting process, and if I use inside the string above, it doesn't do anything at all.

any ideas?


Quote
If you are using a trunk build, you should be able to use the killscript command.

Works well - thanks!


Quote
Good luck, and let us know how it turns out :)

I added a photo from our first experiment with the S110

« Last Edit: 21 / February / 2014, 09:49:02 by nadavofi »

*

Offline reyalp

  • ******
  • 14080
Re: Putting Canon S110 into MF or AFL
« Reply #17 on: 21 / February / 2014, 16:25:11 »
Quote
CHDK settings -> disable LCD off -> always
It didn't change anything. If I use the set_lcd_display(0) alone it does what it should.
These are two totally different things.

The "disable LCD off" setting should control the cameras auto power saving behavior.

set_lcd_display should turn the LCD on and off.

Since your original question was
Quote
how do I prevent the camera from shutting itself off after long standby?
I assumed you wanted the first thing. If setting it to always doesn't prevent the camera from powering off, after some time, then something is broken. I don't think it should interact with set_lcd_display, but I suppose it's possible.

I don't understand what you are trying to do with set_lcd_display.
Don't forget what the H stands for.


Re: Putting Canon S110 into MF or AFL
« Reply #18 on: 21 / February / 2014, 16:42:25 »
Oh I'm sorry I should quit drinking\smoking\doing what ever I was doing...  :-X
I accidentally mixed two things  :blink:

Preventing the camera from shutting itself off - successfully done.


My current challenge is to prevent it (the camera) from turning the LCD on when it starts shooting (with remoteshoot).
From what I read in the forum - it's not possible.
I mean every time I set the LCD off it does it, but when I initiate the remoteshoot instruction it sets the LCD on for preview.

I'm gonna need my camera to sequentially shoot every other second for 30-45 minutes.

every drop of power I can save could help us a lot...

Any ideas on how to take care of that issue? 

*

Offline reyalp

  • ******
  • 14080
Re: Putting Canon S110 into MF or AFL
« Reply #19 on: 22 / February / 2014, 00:10:45 »
I mean every time I set the LCD off it does it, but when I initiate the remoteshoot instruction it sets the LCD on for preview.
Hmm, on my d10, it only gets turned back on if I have review enabled in the canon settings.

set_backlight() normally does get reset for every shot. set_lcd_display doesn't usually, but it may vary by camera.

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
Don't forget what the H stands for.

 

Related Topics