summaryrefslogtreecommitdiffstats
path: root/linux/Battery.c
diff options
context:
space:
mode:
authorDaniel Flanagan <daniel@lytedev.io>2019-10-31 11:39:12 -0500
committerDaniel Flanagan <daniel@lytedev.io>2019-10-31 11:39:12 -0500
commitdd33444f7eace81115308eadb568020470c48b2b (patch)
treeb13c2a7f17cc64458016d396829e95ef5cea9294 /linux/Battery.c
parent28840683cfc5d48307b9b0f382f55f8c84d6a0c4 (diff)
Clean up existing whitespace
Diffstat (limited to 'linux/Battery.c')
-rw-r--r--linux/Battery.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/Battery.c b/linux/Battery.c
index aedacabc..7b9e79a1 100644
--- a/linux/Battery.c
+++ b/linux/Battery.c
@@ -78,7 +78,7 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short
const unsigned long int foundNum = atoi(foundNumStr);
free(foundNumStr);
free(line);
-
+
total += foundNum;
}
@@ -175,7 +175,7 @@ static inline ssize_t xread(int fd, void *buf, size_t count) {
}
static void Battery_getSysData(double* level, ACPresence* isOnAC) {
-
+
*level = 0;
*isOnAC = AC_ERROR;
@@ -194,7 +194,7 @@ static void Battery_getSysData(double* level, ACPresence* isOnAC) {
const char filePath[50];
if (entryName[0] == 'B' && entryName[1] == 'A' && entryName[2] == 'T') {
-
+
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/uevent", entryName);
int fd = open(filePath, O_RDONLY);
if (fd == -1) {
@@ -247,7 +247,7 @@ static void Battery_getSysData(double* level, ACPresence* isOnAC) {
if (*isOnAC != AC_ERROR) {
continue;
}
-
+
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/online", entryName);
int fd = open(filePath, O_RDONLY);
if (fd == -1) {