summaryrefslogtreecommitdiffstats
path: root/unsupported
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-11-17 18:12:38 +1100
committerNathan Scott <nathans@redhat.com>2020-11-18 10:17:33 +1100
commitea9622b8c9444d92007f24fc54597f83c498f11d (patch)
tree13cb45909d2c873b7b09ec59580d6a8db4676b0b /unsupported
parente3af8d0d0851dd6ce25446a7f9a99e2127795a78 (diff)
Merge individual Battery.[ch] files into Platform.[ch]
Consistent with everything else involving platform-specific calls from core htop code.
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Battery.c8
-rw-r--r--unsupported/Battery.h8
-rw-r--r--unsupported/Platform.c5
-rw-r--r--unsupported/Platform.h2
4 files changed, 7 insertions, 16 deletions
diff --git a/unsupported/Battery.c b/unsupported/Battery.c
deleted file mode 100644
index c824df24..00000000
--- a/unsupported/Battery.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "Battery.h"
-
-#include <math.h>
-
-void Battery_getData(double* level, ACPresence* isOnAC) {
- *level = NAN;
- *isOnAC = AC_ERROR;
-}
diff --git a/unsupported/Battery.h b/unsupported/Battery.h
deleted file mode 100644
index 74a27fc5..00000000
--- a/unsupported/Battery.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef HEADER_Battery
-#define HEADER_Battery
-
-#include "BatteryMeter.h"
-
-void Battery_getData(double* level, ACPresence* isOnAC);
-
-#endif
diff --git a/unsupported/Platform.c b/unsupported/Platform.c
index 2492aa2f..6646398d 100644
--- a/unsupported/Platform.c
+++ b/unsupported/Platform.c
@@ -168,3 +168,8 @@ bool Platform_getNetworkIO(unsigned long int* bytesReceived,
*packetsTransmitted = 0;
return false;
}
+
+void Platform_getBattery(double* level, ACPresence* isOnAC) {
+ *level = NAN;
+ *isOnAC = AC_ERROR;
+}
diff --git a/unsupported/Platform.h b/unsupported/Platform.h
index a00f644e..c75a283a 100644
--- a/unsupported/Platform.h
+++ b/unsupported/Platform.h
@@ -60,4 +60,6 @@ bool Platform_getNetworkIO(unsigned long int* bytesReceived,
unsigned long int* bytesTransmitted,
unsigned long int* packetsTransmitted);
+void Platform_getBattery(double *percent, ACPresence *isOnAC);
+
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy