shut_down working on second run only?!? - Script Writing - CHDK Forum

shut_down working on second run only?!?

  • 6 Replies
  • 4841 Views
*

Offline JB

  • *
  • 10
shut_down working on second run only?!?
« on: 30 / July / 2008, 08:25:21 »
Advertisements
Hi there!

I seem to be having a problem getting what should be a fairly simple script to work. All I need to do is have the camera take ONE photo, then shut down. Simple, right? Going REALLY basic, I used the following script:

@title One Shot Shutdown

print "shooting..."
shoot

shut_down
end


(not sure if the 'end' statement is redundant, but I've tried the script with & without it.)

The screen output is:

*** STARTED ***
Shooting...
*** FINISHED ***


...and no shutdown. The strange thing is that, if I press the shutter & run the script again, it happily takes one photo then shuts down as required!?!?! And if I power it up again, it autostarts, takes one photo, then... nothing again.

One last thing to note, is that on the second run, the output doesn't reach the *** FINISHED *** statement.

Any ideas?

Thanks...

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: shut_down working on second run only?!?
« Reply #1 on: 30 / July / 2008, 09:02:45 »
I have never actually tested shut_down (my a570is doesn't wake up on usb, so there's not much point), but

1) try adding sleep 500 before and after shut_down
2) try adding more than one shut_down command
3) try adding sleeps in between those shut_down commands

And which camera+firmware version are you using?

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: shut_down working on second run only?!?
« Reply #2 on: 30 / July / 2008, 10:32:25 »
JB, fudgey,

i can confirm this - tested with my SD870 1.00C, latest Allbest #51 Autobuild (#459), there it is the same, the shut_down doesn't work on the first run.

Additionally sleeps at any position and/or multiple shut_down commands doesn't change anything...

*

Offline JB

  • *
  • 10
Re: shut_down working on second run only?!?
« Reply #3 on: 30 / July / 2008, 18:32:11 »
Hi guys,

Sorry for the lack of details - I'm using an A720 with allbest-a720-100c-50 firmware.

*

Offline JB

  • *
  • 10
Re: shut_down working on second run only?!?
« Reply #4 on: 31 / July / 2008, 08:48:10 »
Hi again!

Looks like I've found a solution to this problem... I've taken the 'Ultra Intervalometer' script and modified the "interval" section as follows:

:interval
  if p>0 then gosub "pause"
  for n=1 to c
  print "Shot", n, "of", c
  shoot
  sleep t
  next n
  if g=1 then goto "interval" else shut_down


This way I get the one shot - shut_down functionality that I need, plus the Intervalometer side of things still works perfectly as well in case I want to use it.  :D

Thanks for your help, guys - when I get my camera powered correctly off of a 12V battery with converter, I'll post some pics & details of what I'm doing...

JB

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: shut_down working on second run only?!?
« Reply #5 on: 31 / July / 2008, 09:04:16 »
Note that the shut_down behavior may/will depend on the "Disable LCD off" state in Misc... menu

Re: shut_down working on second run only?!?
« Reply #6 on: 09 / August / 2008, 19:21:23 »
(sorry)
« Last Edit: 12 / August / 2008, 16:11:16 by maka45 »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal