summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]plugins/iot/display/auto-brightness.c4
-rw-r--r--[-rwxr-xr-x]plugins/iot/display/core.c4
-rw-r--r--[-rwxr-xr-x]plugins/mobile/display/auto-brightness.c4
-rw-r--r--[-rwxr-xr-x]plugins/mobile/display/core.c4
-rw-r--r--[-rwxr-xr-x]plugins/tv/display/auto-brightness.c4
-rw-r--r--[-rwxr-xr-x]plugins/tv/display/core.c4
-rw-r--r--[-rwxr-xr-x]plugins/wearable/display/auto-brightness.c4
-rw-r--r--[-rwxr-xr-x]plugins/wearable/display/core.c4
-rw-r--r--src/led/touch-key.c14
9 files changed, 25 insertions, 21 deletions
diff --git a/plugins/iot/display/auto-brightness.c b/plugins/iot/display/auto-brightness.c
index d49c463f..88ff66a5 100755..100644
--- a/plugins/iot/display/auto-brightness.c
+++ b/plugins/iot/display/auto-brightness.c
@@ -47,7 +47,7 @@
#define MAX_FAULT 5
#define DEFAULT_AUTOMATIC_BRT 5
#define AUTOMATIC_DEVIDE_VAL 10
-#define AUTOMATIC_DELAY_TIME 0.5 /* 0.5 sec */
+#define AUTOMATIC_DELAY_TIME 500 /* 0.5 sec */
#define RADIAN_VALUE (57.2957)
#define ROTATION_90 90
@@ -513,7 +513,7 @@ static void update_auto_brightness(bool update)
}
if (update) {
- update_timeout = g_timeout_add_seconds(AUTOMATIC_DELAY_TIME,
+ update_timeout = g_timeout_add(AUTOMATIC_DELAY_TIME,
update_handler, NULL);
}
}
diff --git a/plugins/iot/display/core.c b/plugins/iot/display/core.c
index dcddfc61..6333b084 100755..100644
--- a/plugins/iot/display/core.c
+++ b/plugins/iot/display/core.c
@@ -174,7 +174,7 @@ static const char *lcdoff_sig_lookup[SIGNAL_MAX] = {
#define ACTIVE_ACT "active"
#define INACTIVE_ACT "inactive"
-#define LOCK_SCREEN_WATING_TIME 0.3 /* 0.3 second */
+#define LOCK_SCREEN_WATING_TIME 300 /* 0.3 second */
#define LONG_PRESS_INTERVAL 2 /* 2 seconds */
#define SAMPLING_INTERVAL 1 /* 1 sec */
#define BRIGHTNESS_CHANGE_STEP 10
@@ -1498,7 +1498,7 @@ static void check_lock_screen(void)
}
/* Use time to check lock is done. */
- lock_timeout_id = g_timeout_add_seconds(display_conf.lock_wait_time,
+ lock_timeout_id = g_timeout_add(display_conf.lock_wait_time,
lcd_on_expired, NULL);
return;
diff --git a/plugins/mobile/display/auto-brightness.c b/plugins/mobile/display/auto-brightness.c
index 73597f1a..a9d41004 100755..100644
--- a/plugins/mobile/display/auto-brightness.c
+++ b/plugins/mobile/display/auto-brightness.c
@@ -47,7 +47,7 @@
#define MAX_FAULT 5
#define DEFAULT_AUTOMATIC_BRT 5
#define AUTOMATIC_DEVIDE_VAL 10
-#define AUTOMATIC_DELAY_TIME 0.5 /* 0.5 sec */
+#define AUTOMATIC_DELAY_TIME 500 /* 0.5 sec */
#define RADIAN_VALUE (57.2957)
#define ROTATION_90 90
@@ -513,7 +513,7 @@ static void update_auto_brightness(bool update)
}
if (update) {
- update_timeout = g_timeout_add_seconds(AUTOMATIC_DELAY_TIME,
+ update_timeout = g_timeout_add(AUTOMATIC_DELAY_TIME,
update_handler, NULL);
}
}
diff --git a/plugins/mobile/display/core.c b/plugins/mobile/display/core.c
index dcddfc61..6333b084 100755..100644
--- a/plugins/mobile/display/core.c
+++ b/plugins/mobile/display/core.c
@@ -174,7 +174,7 @@ static const char *lcdoff_sig_lookup[SIGNAL_MAX] = {
#define ACTIVE_ACT "active"
#define INACTIVE_ACT "inactive"
-#define LOCK_SCREEN_WATING_TIME 0.3 /* 0.3 second */
+#define LOCK_SCREEN_WATING_TIME 300 /* 0.3 second */
#define LONG_PRESS_INTERVAL 2 /* 2 seconds */
#define SAMPLING_INTERVAL 1 /* 1 sec */
#define BRIGHTNESS_CHANGE_STEP 10
@@ -1498,7 +1498,7 @@ static void check_lock_screen(void)
}
/* Use time to check lock is done. */
- lock_timeout_id = g_timeout_add_seconds(display_conf.lock_wait_time,
+ lock_timeout_id = g_timeout_add(display_conf.lock_wait_time,
lcd_on_expired, NULL);
return;
diff --git a/plugins/tv/display/auto-brightness.c b/plugins/tv/display/auto-brightness.c
index c32306f0..ed957cd0 100755..100644
--- a/plugins/tv/display/auto-brightness.c
+++ b/plugins/tv/display/auto-brightness.c
@@ -47,7 +47,7 @@
#define MAX_FAULT 5
#define DEFAULT_AUTOMATIC_BRT 5
#define AUTOMATIC_DEVIDE_VAL 10
-#define AUTOMATIC_DELAY_TIME 0.5 /* 0.5 sec */
+#define AUTOMATIC_DELAY_TIME 500 /* 0.5 sec */
#define RADIAN_VALUE (57.2957)
#define ROTATION_90 90
@@ -513,7 +513,7 @@ static void update_auto_brightness(bool update)
}
if (update) {
- update_timeout = g_timeout_add_seconds(AUTOMATIC_DELAY_TIME,
+ update_timeout = g_timeout_add(AUTOMATIC_DELAY_TIME,
update_handler, NULL);
}
}
diff --git a/plugins/tv/display/core.c b/plugins/tv/display/core.c
index 869b3984..4a6d3ce5 100755..100644
--- a/plugins/tv/display/core.c
+++ b/plugins/tv/display/core.c
@@ -176,7 +176,7 @@ static const char *lcdoff_sig_lookup[SIGNAL_MAX] = {
#define ACTIVE_ACT "active"
#define INACTIVE_ACT "inactive"
-#define LOCK_SCREEN_WATING_TIME 0.3 /* 0.3 second */
+#define LOCK_SCREEN_WATING_TIME 300 /* 0.3 second */
#define LONG_PRESS_INTERVAL 2 /* 2 seconds */
#define SAMPLING_INTERVAL 1 /* 1 sec */
#define BRIGHTNESS_CHANGE_STEP 10
@@ -1499,7 +1499,7 @@ static void check_lock_screen(void)
}
/* Use time to check lock is done. */
- lock_timeout_id = g_timeout_add_seconds(display_conf.lock_wait_time,
+ lock_timeout_id = g_timeout_add(display_conf.lock_wait_time,
lcd_on_expired, NULL);
return;
diff --git a/plugins/wearable/display/auto-brightness.c b/plugins/wearable/display/auto-brightness.c
index d85fd8cd..efc415c8 100755..100644
--- a/plugins/wearable/display/auto-brightness.c
+++ b/plugins/wearable/display/auto-brightness.c
@@ -47,7 +47,7 @@
#define MAX_FAULT 5
#define DEFAULT_AUTOMATIC_BRT 5
#define AUTOMATIC_DEVIDE_VAL 10
-#define AUTOMATIC_DELAY_TIME 0.5 /* 0.5 sec */
+#define AUTOMATIC_DELAY_TIME 500 /* 0.5 sec */
#define RADIAN_VALUE (57.2957)
#define ROTATION_90 90
@@ -513,7 +513,7 @@ static void update_auto_brightness(bool update)
}
if (update) {
- update_timeout = g_timeout_add_seconds(AUTOMATIC_DELAY_TIME,
+ update_timeout = g_timeout_add(AUTOMATIC_DELAY_TIME,
update_handler, NULL);
}
}
diff --git a/plugins/wearable/display/core.c b/plugins/wearable/display/core.c
index c446ac8c..211ea08f 100755..100644
--- a/plugins/wearable/display/core.c
+++ b/plugins/wearable/display/core.c
@@ -174,7 +174,7 @@ static const char *lcdoff_sig_lookup[SIGNAL_MAX] = {
#define ACTIVE_ACT "active"
#define INACTIVE_ACT "inactive"
-#define LOCK_SCREEN_WATING_TIME 0.3 /* 0.3 second */
+#define LOCK_SCREEN_WATING_TIME 300 /* 0.3 second */
#define LONG_PRESS_INTERVAL 2 /* 2 seconds */
#define SAMPLING_INTERVAL 1 /* 1 sec */
#define BRIGHTNESS_CHANGE_STEP 10
@@ -1497,7 +1497,7 @@ static void check_lock_screen(void)
}
/* Use time to check lock is done. */
- lock_timeout_id = g_timeout_add_seconds(display_conf.lock_wait_time,
+ lock_timeout_id = g_timeout_add(display_conf.lock_wait_time,
lcd_on_expired, NULL);
return;
diff --git a/src/led/touch-key.c b/src/led/touch-key.c
index 7b18984b..2852ac26 100644
--- a/src/led/touch-key.c
+++ b/src/led/touch-key.c
@@ -102,6 +102,7 @@ static void process_touchkey_press(void)
static void process_touchkey_release(void)
{
float fduration;
+ int duration;
/* release existing timer */
if (hardkey_timeout_id > 0) {
@@ -114,8 +115,9 @@ static void process_touchkey_release(void)
return;
/* start timer */
fduration = (float)hardkey_duration / KEYBACKLIGHT_BASE_TIME;
- hardkey_timeout_id = g_timeout_add_seconds(
- fduration,
+ duration = (int)(fduration * 1000);
+ hardkey_timeout_id = g_timeout_add(
+ duration,
key_backlight_expired, NULL);
}
@@ -156,7 +158,8 @@ static void process_touchkey_enable(bool enable)
static void hardkey_duration_cb(keynode_t *key, void *data)
{
- float duration;
+ float fduration;
+ int duration;
hardkey_duration = vconf_keynode_get_int(key);
@@ -181,8 +184,9 @@ static void hardkey_duration_cb(keynode_t *key, void *data)
return;
/* start timer */
- duration = (float)hardkey_duration / KEYBACKLIGHT_BASE_TIME;
- hardkey_timeout_id = g_timeout_add_seconds(
+ fduration = (float)hardkey_duration / KEYBACKLIGHT_BASE_TIME;
+ duration = (int)(fduration * 1000);
+ hardkey_timeout_id = g_timeout_add(
duration,
key_backlight_expired, NULL);
}