ecore_list_append(cfdata->sensors, strdup("temp1"));
ecore_list_append(cfdata->sensors, strdup("temp2"));
ecore_list_append(cfdata->sensors, strdup("temp3"));
+ ecore_list_append(cfdata->sensors, strdup("temp4"));
ecore_list_goto_first(cfdata->sensors);
while ((name = ecore_list_next(cfdata->sensors)))
{
}
else
{
- /* TODO: Is there I2C devices with more than 3 temperature sensors? */
+ /* TODO: Is there I2C devices with more than 3 temperature sensors? Yes, mine has 4. */
/* TODO: What to do when there is more than one tempX? */
therms = ecore_file_ls("/sys/bus/i2c/devices");
if (therms)
while ((name = ecore_list_next(therms)))
{
- char *sensors[] = { "temp1", "temp2", "temp3" };
+ char *sensors[] = { "temp1", "temp2", "temp3", "temp4" };
int i;
- for (i = 0; i < 3; i++)
+ for (i = 0; i < 4; i++)
{
sprintf(path, "/sys/bus/i2c/devices/%s/%s_input",
name, sensors[i]);
if (inst->units == FAHRENHEIT)
snprintf(buf, sizeof(buf), "%i°F", temp);
else
- snprintf(buf, sizeof(buf), "%i°C", temp);
+ snprintf(buf, sizeof(buf), "%i°C", temp);
utf8 = ecore_txt_convert("iso-8859-1", "utf-8", buf);
_temperature_face_level_set(inst,