summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/temperature/e_mod_config.c1
-rw-r--r--src/modules/temperature/e_mod_main.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/temperature/e_mod_config.c b/src/modules/temperature/e_mod_config.c
index 73c3054eb..34054ae1c 100644
--- a/src/modules/temperature/e_mod_config.c
+++ b/src/modules/temperature/e_mod_config.c
@@ -127,6 +127,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
127 ecore_list_append(cfdata->sensors, strdup("temp1")); 127 ecore_list_append(cfdata->sensors, strdup("temp1"));
128 ecore_list_append(cfdata->sensors, strdup("temp2")); 128 ecore_list_append(cfdata->sensors, strdup("temp2"));
129 ecore_list_append(cfdata->sensors, strdup("temp3")); 129 ecore_list_append(cfdata->sensors, strdup("temp3"));
130 ecore_list_append(cfdata->sensors, strdup("temp4"));
130 ecore_list_goto_first(cfdata->sensors); 131 ecore_list_goto_first(cfdata->sensors);
131 while ((name = ecore_list_next(cfdata->sensors))) 132 while ((name = ecore_list_next(cfdata->sensors)))
132 { 133 {
diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c
index 1f07814a1..dec0727b4 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -238,7 +238,7 @@ _temperature_sensor_init(Config_Face *inst)
238 } 238 }
239 else 239 else
240 { 240 {
241 /* TODO: Is there I2C devices with more than 3 temperature sensors? */ 241 /* TODO: Is there I2C devices with more than 3 temperature sensors? Yes, mine has 4. */
242 /* TODO: What to do when there is more than one tempX? */ 242 /* TODO: What to do when there is more than one tempX? */
243 therms = ecore_file_ls("/sys/bus/i2c/devices"); 243 therms = ecore_file_ls("/sys/bus/i2c/devices");
244 if (therms) 244 if (therms)
@@ -247,10 +247,10 @@ _temperature_sensor_init(Config_Face *inst)
247 247
248 while ((name = ecore_list_next(therms))) 248 while ((name = ecore_list_next(therms)))
249 { 249 {
250 char *sensors[] = { "temp1", "temp2", "temp3" }; 250 char *sensors[] = { "temp1", "temp2", "temp3", "temp4" };
251 int i; 251 int i;
252 252
253 for (i = 0; i < 3; i++) 253 for (i = 0; i < 4; i++)
254 { 254 {
255 sprintf(path, "/sys/bus/i2c/devices/%s/%s_input", 255 sprintf(path, "/sys/bus/i2c/devices/%s/%s_input",
256 name, sensors[i]); 256 name, sensors[i]);
@@ -447,7 +447,7 @@ _temperature_cb_check(void *data)
447 if (inst->units == FAHRENHEIT) 447 if (inst->units == FAHRENHEIT)
448 snprintf(buf, sizeof(buf), "%iF", temp); 448 snprintf(buf, sizeof(buf), "%iF", temp);
449 else 449 else
450 snprintf(buf, sizeof(buf), "%iC", temp); 450 snprintf(buf, sizeof(buf), "%iC", temp);
451 utf8 = ecore_txt_convert("iso-8859-1", "utf-8", buf); 451 utf8 = ecore_txt_convert("iso-8859-1", "utf-8", buf);
452 452
453 _temperature_face_level_set(inst, 453 _temperature_face_level_set(inst,