summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-12 09:10:19 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-12 11:03:46 +0900
commit73855900ed3804ecc4e755ff08470ecce8ea90c1 (patch)
treed92c57ee53703a69af51337be0d01c0691000ae6 /src/modules
parent14e1583cd038d550d035d6965733f18f5ca9ae0f (diff)
Revert "Temperature module: Don't use e_powersave_sleep. It doesn't work for ticks faster than a second."
This reverts commit 4a92502f81a1006cf5fbc3b3dda70a902e740788.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/temperature/e_mod_main.c4
-rw-r--r--src/modules/temperature/e_mod_main.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c
index c90556f..a4e99a5 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -58,6 +58,7 @@ _temperature_thread_free(Tempthread *tth)
58#if defined(HAVE_EEZE) 58#if defined(HAVE_EEZE)
59 EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s); 59 EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
60#endif 60#endif
61 e_powersave_sleeper_free(tth->sleeper);
61 free(tth->extn); 62 free(tth->extn);
62 free(tth); 63 free(tth);
63} 64}
@@ -329,7 +330,7 @@ _temperature_check_main(void *data, Ecore_Thread *th)
329 temp = temperature_tempget_get(tth); 330 temp = temperature_tempget_get(tth);
330 if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp)); 331 if (ptemp != temp) ecore_thread_feedback(th, (void *)((long)temp));
331 ptemp = temp; 332 ptemp = temp;
332 usleep((1000000.0 / 8.0) * (double)tth->poll_interval); 333 e_powersave_sleeper_sleep(tth->sleeper, tth->poll_interval);
333 if (ecore_thread_check(th)) break; 334 if (ecore_thread_check(th)) break;
334 } 335 }
335} 336}
@@ -362,6 +363,7 @@ temperature_face_update_config(Config_Face *inst)
362 tth->poll_interval = inst->poll_interval; 363 tth->poll_interval = inst->poll_interval;
363 tth->sensor_type = inst->sensor_type; 364 tth->sensor_type = inst->sensor_type;
364 tth->inst = inst; 365 tth->inst = inst;
366 tth->sleeper = e_powersave_sleeper_new();
365 if (inst->sensor_name) 367 if (inst->sensor_name)
366 tth->sensor_name = eina_stringshare_add(inst->sensor_name); 368 tth->sensor_name = eina_stringshare_add(inst->sensor_name);
367 369
diff --git a/src/modules/temperature/e_mod_main.h b/src/modules/temperature/e_mod_main.h
index 5207740..b9cf671 100644
--- a/src/modules/temperature/e_mod_main.h
+++ b/src/modules/temperature/e_mod_main.h
@@ -42,6 +42,7 @@ struct _Tempthread
42 const char *sensor_name; 42 const char *sensor_name;
43 const char *sensor_path; 43 const char *sensor_path;
44 void *extn; 44 void *extn;
45 E_Powersave_Sleeper *sleeper;
45#ifdef HAVE_EEZE 46#ifdef HAVE_EEZE
46 Eina_List *tempdevs; 47 Eina_List *tempdevs;
47#endif 48#endif