mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
powermgmt: Clean up some convoluted #ifdefs
Makes it more explicit what code is used under which circumstances. Change-Id: I0a482dd48e1eb4b119ca6d8dca2b8aa450445fd1
This commit is contained in:
parent
0d0640e57a
commit
37bfcab23f
1 changed files with 6 additions and 3 deletions
|
@ -197,12 +197,15 @@ int battery_time(void)
|
||||||
|
|
||||||
#ifndef CURRENT_NORMAL /* no estimation without current */
|
#ifndef CURRENT_NORMAL /* no estimation without current */
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#else
|
||||||
if (battery_capacity <= 0) /* nor without capacity */
|
if (battery_capacity <= 0) /* nor without capacity */
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#endif
|
|
||||||
return _battery_time();
|
return _battery_time();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
return _battery_time();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns battery level in percent */
|
/* Returns battery level in percent */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue