summaryrefslogtreecommitdiffstats
path: root/unsupported
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-09-07 11:52:42 +0200
committercgzones <cgzones@googlemail.com>2020-09-24 18:06:36 +0200
commit47e2cefe02dffe00369e5630eb1e3f54174f20af (patch)
treef517c3f21b226cda4520ed27686af7130f2d0531 /unsupported
parentf80509358954a39234b136466c4c6a77187744e9 (diff)
Update battery API to use NAN on error
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Battery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/unsupported/Battery.c b/unsupported/Battery.c
index 080cf540..121d2e49 100644
--- a/unsupported/Battery.c
+++ b/unsupported/Battery.c
@@ -1,7 +1,8 @@
+#include <math.h>
#include "BatteryMeter.h"
void Battery_getData(double* level, ACPresence* isOnAC) {
- *level = -1;
+ *level = NAN;
*isOnAC = AC_ERROR;
}

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