Languages

Menu
Sites
Language
Camera flash brightness control api.

Hi,

I am trying to control the brightness of flash led using the below api

device_flash_set_brightness();

 I am getting the max brightness of the flash led from the api

 

device_flash_get_max_brightness(&max_brightness);

 

When i set brightness level other than max_brightness, it doesn't work. The led is on if i pass max_brightness to the set_brightness api and the led is off if i pass 0. Its like either the led will be on or off and the brightness is not varying between 0 ~ max_brightness. If i pass values between 0 ~ max_brightness nothing happens.

 

Is brightness level supported and is there a different way to do it?

Edited by: Anand Rudrakshi on 24 Feb, 2016

Responses

5 Replies
Alex Dem

Hi,
Do you have appropriate http://tizen.org/privilege/led privilege in your manifest?
Alexey.

Masum Talukder

Hello,

LED Brightness level can be changed and it is supported.

You can find the API related details from this link:

For 2.4:

https://developer.tizen.org/development/api-references/api-reference-2.4.0?redirect=https%3A//developer.tizen.org/dev-guide/latest/org.tizen.gettingstarted/html/cover_page.htm

For 2.3.1:

https://developer.tizen.org/development/api-references/api-reference-2.3.1?redirect=https%3A//developer.tizen.org/dev-guide/2.3.1/org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__LED__MODULE.html

For getting the example code, follow the below tutorial link:

https://developer.tizen.org/development/tutorials/native-application/system/device#led

thanks.

Alex Dem

I have checked on my Z3 and I have got the same:
This code turn off flash LED (if it was turned on previously):

    device_flash_set_brightness(0); 

This code turn on flash LED:
 

    int max;
    device_flash_get_max_brightness(&max);
    device_flash_set_brightness(max); 

Other values  between (0...max value) visually did not affect on brightness level. Only max and min( work as : turn on/turn off).
Alexey.

Alex Dem

Checked on Z1 device. The same behaviour for brightness of a LED.
Alexey.

Anand Rudrakshi

Exactly. Thanks for confirming. :)