diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-08-04 09:38:08 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-08-04 09:39:37 -0400 |
commit | 37bfcab23f55f81e890c9e6ec7f41ef89d17006f (patch) | |
tree | de61c00382c02517f1b9628ead0c3014713e77de | |
parent | 0d0640e57a4a1c30eab6f8467e25ae9e7958c49e (diff) | |
download | rockbox-37bfcab23f55f81e890c9e6ec7f41ef89d17006f.tar.gz rockbox-37bfcab23f55f81e890c9e6ec7f41ef89d17006f.zip |
powermgmt: Clean up some convoluted #ifdefs
Makes it more explicit what code is used under which circumstances.
Change-Id: I0a482dd48e1eb4b119ca6d8dca2b8aa450445fd1
-rw-r--r-- | firmware/powermgmt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 7e1523eb57..aaec959f50 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -197,12 +197,15 @@ int battery_time(void) | |||
197 | 197 | ||
198 | #ifndef CURRENT_NORMAL /* no estimation without current */ | 198 | #ifndef CURRENT_NORMAL /* no estimation without current */ |
199 | return -1; | 199 | return -1; |
200 | #endif | 200 | #else |
201 | if (battery_capacity <= 0) /* nor without capacity */ | 201 | if (battery_capacity <= 0) /* nor without capacity */ |
202 | return -1; | 202 | return -1; |
203 | 203 | return _battery_time(); | |
204 | #endif | 204 | #endif |
205 | |||
206 | #else | ||
205 | return _battery_time(); | 207 | return _battery_time(); |
208 | #endif | ||
206 | } | 209 | } |
207 | 210 | ||
208 | /* Returns battery level in percent */ | 211 | /* Returns battery level in percent */ |