AF Assist Lamp: Script for switching it on permanently

  • 4 Replies
  • 281 Views
AF Assist Lamp: Script for switching it on permanently
« on: 17 / November / 2017, 22:00:58 »
Advertisements
Hello,

I'm looking for a script that would keep the AF assist lamp permanently on
so you can take pictures or record video while the lamp is shining.

My camera is SX60HS / 100b-1.5.0-4927

Thanks in advance

EDIT:
"SET_LED 9 1" seems not working anymore (results in "Unk stmt" error)
« Last Edit: 17 / November / 2017, 22:25:34 by Rastislav Kišš »

*

Offline reyalp

  • ******
  • 11339
Re: AF Assist Lamp: Script for switching it on permanently
« Reply #1 on: 18 / November / 2017, 00:59:03 »
EDIT:
"SET_LED 9 1" seems not working anymore (results in "Unk stmt" error)
It should be lowercase set_led

I believe AF lamp is 1 on sx60, though there's only 2 so any odd number should work.

edit:
Note CHDK can't really set an LED "permanently on", if the Canon firmware (or other parts of CHDK) change the state of the LED (for example, by using AF assist in shooting), it will override whatever CHDK set.
« Last Edit: 18 / November / 2017, 01:01:59 by reyalp »
Don't forget what the H stands for.

Re: AF Assist Lamp: Script for switching it on permanently
« Reply #2 on: 18 / November / 2017, 07:05:55 »
ledtest.bas file:

@title LED test

sleep 2000

set_led 1,1
sleep 2000
set_led 1,0

set_led 3,1
sleep 2000
set_led 3,0

set_led 5,1
sleep 2000
set_led 5,0

set_led 7,1
sleep 2000
set_led 7,0

set_led 8,1
sleep 2000
set_led 8,0

set_led 9,1
sleep 2000
set_led 9,0

set_led 10,1
sleep 2000
set_led 10,0

end

———
RESULT:

*** STARTED ***
uBasic:1 Unk stmt
*** TERMINATED ***

———

Any ideas?

———

Btw: In normal mode (independently on CHDK), when you pull up the flash, the AF lamp is steadily on til you keep the shutter half-pressed. But once you start shooting/videorecording, it goes off. SAD.

EDIT:
It was the encoding. UTF-8 is not working in CHDK. ANSI is.

--[[
@title LED Test
@param m LED #
@default m 1
--]]
set_led(m,1)

worked. However, shooting while the AF lamp is on is still not possible.
« Last Edit: 18 / November / 2017, 08:03:37 by Rastislav Kišš »

*

Offline reyalp

  • ******
  • 11339
Re: AF Assist Lamp: Script for switching it on permanently
« Reply #3 on: 18 / November / 2017, 14:50:54 »
worked. However, shooting while the AF lamp is on is still not possible.
If you have AF assist disabled in the Canon firmware options, it might not get turned off in shooting.

In a script, you could you might be able to turn the AF lamp on after half press is done, like (Lua)
Code: [Select]
...
press('shoot_half')
repeat
 sleep(10)
until get_shooting()
set_led(1,1)
...
Don't forget what the H stands for.


Re: AF Assist Lamp: Script for switching it on permanently
« Reply #4 on: 18 / November / 2017, 16:22:30 »
>worked. However, shooting while the AF lamp is on is still not possible.

Sometimes I write faster than I prove. Actually, it IS possible to take pictures/videos with AF light on.

All it needed was indeed disabling the AF assist lamp, as you too suggested.

Thx for the script :⁠)

 

Related Topics