LED control - General Discussion and Assistance - CHDK Forum

LED control

  • 32 Replies
  • 8236 Views
*

Offline ewavr

  • ****
  • 1057
  • A710IS
LED control
« on: 07 / April / 2008, 16:53:43 »
Advertisements
Hi developers,
I discovered PostLEDMessage() function, which give us flexible LED contol for all cams (or course, OS must be running).

int PostLEDMessage(struct led_control *);
struct led_control {int led_num; int action; int brightness; int blink_count;}

where:
led_num: LED number (example for A710 see below)
action: 0 - LED on, 1- LED off, 2 or more - blinking with different speed
brightness: 0..255 for PWM controlled LEDs, any value - for others
blink_count -   :)
return value: unknown.

No 0xC022.... addresses or UniqueLedOn(Off) required.

led_num for A710:
0: green (near viewfinder, at top)
1: orange (near viewfinder, at top)
2: yellow (near viewfinder, at bottom)
3: power
8: blue
9,10,11: AF (wow, now I can control it!)

edit: parameters updated.
« Last Edit: 07 / April / 2008, 17:12:22 by ewavr »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: LED control
« Reply #1 on: 07 / April / 2008, 16:57:36 »
yay, chdk disco finally possible.
if one day this can be included in scripting, this would be a neat thing for intervalometers (group shots) where you can optically "warn" the crowd of the next shots. so many possibilities.

Re: LED control
« Reply #2 on: 07 / April / 2008, 16:59:41 »
I discovered PostLEDMessage() function, which give us flexible LED contol for all cams


Hmmm ...........

After I see if addresses DataGhost gave for TX1 _UniqueLedOn and _UniqueLedOff crashes the camera  ... I will try this   :)

How do you work-out what parameters these firmware functions require and return ?


David

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: LED control
« Reply #3 on: 07 / April / 2008, 17:36:51 »
How do you work-out what parameters these firmware functions require and return ?

From IDA listing I see that this function requires pointer to structure from four int's.
And next I try different values and see result... About 20-30 starts - all done...
WriteSDCard(x,y,z,t) discovered in the same way.


*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: LED control
« Reply #4 on: 07 / April / 2008, 20:06:33 »
I'd like to be able to turn the AF led on in video as in an orange flashlight (which may not be orange in color accent). how do I do that?
« Last Edit: 07 / April / 2008, 20:15:48 by a710is »

Re: LED control
« Reply #5 on: 08 / April / 2008, 03:41:16 »
Deleted
« Last Edit: 22 / April / 2008, 16:44:33 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: LED control
« Reply #6 on: 08 / April / 2008, 03:56:16 »
the A710 wasn't turning on the AF beam thru the set_led function.
I believe ewavr is stating he has found a new function that allows to use the AF beam on the A710 as well.
this script doesn't do anything.

Re: LED control
« Reply #7 on: 08 / April / 2008, 04:35:06 »
Deleted
« Last Edit: 22 / April / 2008, 16:44:55 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: LED control
« Reply #8 on: 08 / April / 2008, 04:50:18 »
the A710 wasn't turning on the AF beam thru the set_led function.
I believe ewavr is stating he has found a new function that allows to use the AF beam on the A710 as well.
this script doesn't do anything.

Well, I make this, but I need standart LED numbers for set_led command.
In Wiki I see:

Value of "a"        LED Lamp
 4            GREEN (by power switch on S3)
 5            YELLOW (by power switch on S3)
 6            (not used)
 7            ORANGE (red LED on back of S3)
 8            BLUE
 9            Focus Assist / Auto-Focus Lamp / AF Lamp (bright green on S3)
10            Timer / Tally Lamp (bright orange lamp in front on S3)

But A710 do not have green/yellow LED by power switch, Timer and AF are the same. What is standart?

Re: LED control
« Reply #9 on: 08 / April / 2008, 07:06:30 »
Deleted
« Last Edit: 22 / April / 2008, 16:45:16 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

 

Related Topics