install scripts. reorganization. soon to be deployable
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* gettemperature("/sys/class/hwmon/hwmon0/device", "temp1_input");
|
||||
*/
|
||||
|
||||
char *
|
||||
gettemperature(char *base, char *sensor)
|
||||
{
|
||||
char *co;
|
||||
|
||||
co = readfile(base, sensor);
|
||||
if (co == NULL)
|
||||
return smprintf("");
|
||||
return smprintf("%02.0f°C", atof(co) / 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user