Remove is_always_pwoered (#1525)

This commit is contained in:
Ben Meadors
2022-06-17 13:35:12 -05:00
committed by GitHub
parent 9285316c78
commit 52f299ec49
6 changed files with 8 additions and 14 deletions

View File

@@ -11,10 +11,10 @@
/// Should we behave as if we have AC power now?
static bool isPowered()
{
// Completely circumvents the battery / power sensing logic and assumes constant power source
if (config.power.is_always_powered) {
// Circumvent the battery sensing logic and assumes constant power if no battery pin or power mgmt IC
#if !defined(BATTERY_PIN) && !defined(AXP192_SLAVE_ADDRESS)
return true;
}
#endif
bool isRouter = (config.device.role == Config_DeviceConfig_Role_Router ? 1 : 0);