From 13986112766765e3e5d853cf01aa646803a6d99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sun, 2 Apr 2023 10:34:31 +0200 Subject: [PATCH] trunk fmt --- src/Power.cpp | 10 +++++----- src/PowerFSM.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Power.cpp b/src/Power.cpp index 179e4533a..6c4851c11 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -165,11 +165,11 @@ class AnalogBatteryLevel : public HasBatteryLevel virtual bool isVbusIn() override { #ifdef EXT_PWR_DETECT - // if external powered that pin will be pulled up - if (digitalRead(EXT_PWR_DETECT) == HIGH) { - return true; - } - // if it's not HIGH - check the battery + // if external powered that pin will be pulled up + if (digitalRead(EXT_PWR_DETECT) == HIGH) { + return true; + } + // if it's not HIGH - check the battery #endif return getBattVoltage() > chargingVolt; diff --git a/src/PowerFSM.cpp b/src/PowerFSM.cpp index 8d9304e8c..518c94d92 100644 --- a/src/PowerFSM.cpp +++ b/src/PowerFSM.cpp @@ -27,8 +27,8 @@ static bool isPowered() 2) If we detect USB power from the power management chip, we must be getting power externally. - 3) On some boards we don't have the power management chip (like AXPxxxx) so we use EXT_PWR_DETECT GPIO pin to detect external power source - (see `isVbusIn()` in `Power.cpp`) + 3) On some boards we don't have the power management chip (like AXPxxxx) so we use EXT_PWR_DETECT GPIO pin to detect + external power source (see `isVbusIn()` in `Power.cpp`) */ return !isPowerSavingMode && powerStatus && (!powerStatus->getHasBattery() || powerStatus->getHasUSB()); }