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:
Solomon Peachy 2021-08-04 09:38:08 -04:00
parent 0d0640e57a
commit 37bfcab23f

View file

@ -197,12 +197,15 @@ int battery_time(void)
#ifndef CURRENT_NORMAL /* no estimation without current */
return -1;
#endif
#else
if (battery_capacity <= 0) /* nor without capacity */
return -1;
#endif
return _battery_time();
#endif
#else
return _battery_time();
#endif
}
/* Returns battery level in percent */