Canon G9 - Disable FLash - Script Writing - CHDK Forum

Canon G9 - Disable FLash

  • 4 Replies
  • 3211 Views
Canon G9 - Disable FLash
« on: 26 / January / 2015, 16:26:56 »
Advertisements
I am wanting to write a simple time lapse script (intervalometer)

I am trying to disable the flash and from what I can see on the http://chdk.wikia.com/wiki/PropertyCase page I should be using the following (for Digic III - http://en.wikipedia.org/wiki/DIGIC)

143 
RW 
Flash Mode (0,1,2 = flash auto, flash on, flash off) 

I am using this command but the flash is still firing.

set_prop 143 2

Am I doing something wrong?

Re: Canon G9 - Disable FLash
« Reply #1 on: 26 / January / 2015, 17:29:30 »
It would help if you posted your complete script.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Canon G9 - Disable FLash
« Reply #2 on: 26 / January / 2015, 17:35:25 »
It would help if you posted your complete script.

Code: [Select]
@title Just A test
rem set JPG Quality
set_prop 57 0
rem stop flash
set_prop 143 2
do
shoot
sleep 60000
until(0)
end

I just tried it again and it seems to be working now.


Re: Canon G9 - Disable FLash
« Reply #3 on: 26 / January / 2015, 17:36:50 »
I just tried it again and it seems to be working now.
Funny how that happens sometimes.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Canon G9 - Disable FLash
« Reply #4 on: 26 / January / 2015, 18:00:54 »
I just tried it again and it seems to be working now.
Funny how that happens sometimes.

Spoke to soon...

Seems to be flashing again....

New Script (LUA)

Code: [Select]
--[[
@title Timelapse for Chris
@param s Sleep Duration
@default s 60000
@param e EyeFi Delay
@default e 15000
]]
counter = 0

-- set JPG Quality
set_prop (57,0)
-- stop flash
set_prop(143,2)

-- Wait so flash does gets configured
sleep(1000)

function TakePicture()
press("shoot_half")
    repeat sleep(50) until get_shooting() == true
press("shoot_full")
release("shoot_full")
repeat sleep(50) until get_shooting() == false
    release "shoot_half"
end

repeat
    if (counter > 3) then set_lcd_display(0) end
    counter = counter + 1
StartTick = get_tick_count()
TakePicture()
EndTick = get_tick_count()
-- sleep for a period of time so EYEFI can upload image
sleep(e)
-- Delete the image file
    for fname in os.idir("A/DCIM/100CANON", false) do
    os.remove("A/DCIM/100CANON/"..fname)
end
-- sleep for 60 seconds - the amount of time waiting + camera time
delay = s - (e + (EndTick - StartTick))
-- Minimum sleep of 1 second
if (delay < 1000) then
delay = 1000
end
print ("Capture #",counter," Duration=",EndTick-StartTick)
sleep(delay)
until false

I have just had a thought... It did not seem to flash on the 2nd and subsequent shots so maybe I just need a delay before the first capture.

Seems like the delay helps it... Well I think it is working now

Thanks for your offer to help.

 

Related Topics