set_record(true) on G15 does not work from autostarted script - Script Writing - CHDK Forum

set_record(true) on G15 does not work from autostarted script

  • 5 Replies
  • 4023 Views
Advertisements
Hi experts,

still amazed of CHDK even after 2 years using it. Respect!

I have just a small issue:
By powering on my G15 with the play back button or the power button the lua command
set_record(true) from an autostarted script does not switch the camera in record mode.
On my SX260 and my IXUS 85S it works fine.

The following script never prints something:
set_record(1)
while not get_mode() do
  sleep(100)
end
print (get_mode())

Any idea?

It would help speeding up my startup sequence at the field with my copter...

Greetings,
Harald

*

Offline srsa_4c

  • ******
  • 4451
Re: set_record(true) on G15 does not work from autostarted script
« Reply #1 on: 20 / April / 2015, 18:12:53 »
Is the camera's USB port connected to something when you're trying to run your script?
If not, try using click("shoot_half") instead of set_record(1). This is supposed to simulate half-pressing the shutter button for a moment. I'm not sure why the original method doesn't work on the g15.
Can you tell us the CHDK version you're using (exact filename of the .zip file)?

Re: set_record(true) on G15 does not work from autostarted script
« Reply #2 on: 20 / April / 2015, 18:25:40 »
Try adding a short sleep( ) at the start of the script.

Something like :
Code: [Select]
sleep(1000)
set_record(1)
while not get_mode() do
  sleep(100)
end
print (get_mode())
Ported :   A1200    SD940   G10    Powershot N    G16

set_record(true) on G15 does not work from autostarted script
« Reply #3 on: 21 / April / 2015, 00:51:22 »
Thank you so much srsa_4c and waterwingz for the fast answer.
The behaviour is the same with:
g15-100e-1.3.0-4029-full.zip
g15-100e-1.4.0-3963-full.zip
g15-100e-1.4.0-4153-full.zip

But both press("shoot_half") and the wait(1000) did the trick!
With and without 11 pin USB+A/V combo cable from VP Systems.

Have a nice day,
Harald
« Last Edit: 21 / April / 2015, 01:11:21 by Harald.Becherer »

Re: set_record(true) on G15 does not work from autostarted script
« Reply #4 on: 21 / April / 2015, 08:20:15 »
But both press("shoot_half") and the wait(1000) did the trick!
Did you mean to say "Either press("shoot_half") or the wait(1000) did the trick!" ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: set_record(true) on G15 does not work from autostarted script
« Reply #5 on: 21 / April / 2015, 12:23:44 »
So sorry, it is indeed misleading.
I meant not both together but I can take either one of the solutions...

Greetings,

Harald

 

Related Topics


SimplePortal © 2008-2014, SimplePortal