From 2b57f300f25c8cf70511cdc53c9d7df5e998923f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phillip=20K=C3=BChne?= Date: Fri, 14 Feb 2025 21:07:05 +0100 Subject: [PATCH] Fix VUSB_SENS input mode. --- src/power/Power.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/power/Power.cpp b/src/power/Power.cpp index 9a0fb82..3abf170 100644 --- a/src/power/Power.cpp +++ b/src/power/Power.cpp @@ -272,7 +272,7 @@ void Power::initPowerState(void) { PowerParameters::Battery::CELL_CHARGE_FULL_COLOUMB; percentRemaining = initialChargePercentages; // Set up flags and pins for them - pinMode(PowerParameters::PinConfig::VUSB_SENS, INPUT); + pinMode(PowerParameters::PinConfig::VUSB_SENS, INPUT_PULLUP); pinMode(PowerParameters::PinConfig::BAT_CHG_STAT, INPUT_PULLUP); busPowered = digitalRead(PowerParameters::PinConfig::VUSB_SENS); chargingState = digitalRead(PowerParameters::PinConfig::BAT_CHG_STAT);