wip: naming.

master
Alastair Poole 1 year ago
parent 805c95a9cc
commit f39f25c4fa
  1. 6
      src/bin/evisum_watcher.c
  2. 6
      src/bin/next/machine.h
  3. 6
      src/bin/next/machine/sensors.x

@ -39,12 +39,12 @@ test(void)
batteries = batteries_find();
EINA_LIST_FREE(batteries, bat)
{
battery_check(bat);
battery_update(bat);
printf("battery %s (%s) => %1.2f\n", bat->model, bat->vendor, bat->percent);
battery_free(bat);
}
printf("POWER: %i\n", power_ac_check());
printf("POWER: %i\n", power_ac_present());
puts("SENSORS:");
Sensor *sensor;
@ -52,7 +52,7 @@ test(void)
sensors = sensors_find();
EINA_LIST_FREE(sensors, sensor)
{
if (sensor_check(sensor))
if (sensor_update(sensor))
printf("sensor %s (%s) = %1.1f", sensor->name, sensor->child_name, sensor->value);
if (sensor->type == FANRPM)
printf("RPM\n");

@ -91,7 +91,7 @@ typedef struct
} Network_Interface;
Eina_Bool
power_ac_check(void);
power_ac_present(void);
Eina_List *
batteries_find(void);
@ -100,7 +100,7 @@ void
battery_free(Battery *bat);
void
battery_check(Battery *bat);
battery_update(Battery *bat);
Eina_List *
sensors_find(void);
@ -112,7 +112,7 @@ void
sensor_free(Sensor *sensor);
Eina_Bool
sensor_check(Sensor *sensor);
sensor_update(Sensor *sensor);
Eina_List *
network_interfaces_find(void);

@ -13,7 +13,7 @@ sensor_free(Sensor *sensor)
}
Eina_Bool
sensor_check(Sensor *sensor)
sensor_update(Sensor *sensor)
{
#if defined(__linux__)
char *d = file_contents(sensor->path);
@ -376,7 +376,7 @@ battery_free(Battery *bat)
}
void
battery_check(Battery *bat)
battery_update(Battery *bat)
{
double charge_full = 0, charge_current = 0;
#if defined(__OpenBSD__)
@ -518,7 +518,7 @@ done:
}
Eina_Bool
power_ac_check(void)
power_ac_present(void)
{
Eina_Bool have_ac = 0;
#if defined(__OpenBSD__)

Loading…
Cancel
Save