From 530849e47cd085e2111fb3f70bd9f475dfde3474 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" <5425387+Ralim@users.noreply.github.com> Date: Sat, 12 Aug 2023 14:54:11 +1000 Subject: [PATCH] Revert "Remove 0.5 ohm increase to resistance" --- source/Core/Drivers/USBPD.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Core/Drivers/USBPD.cpp b/source/Core/Drivers/USBPD.cpp index 6613bb9d87..7bdd4113dc 100644 --- a/source/Core/Drivers/USBPD.cpp +++ b/source/Core/Drivers/USBPD.cpp @@ -123,7 +123,8 @@ bool parseCapabilitiesArray(const uint8_t numCaps, uint8_t *bestIndex, uint16_t *bestIndex = 0xFF; // Mark unselected *bestVoltage = 5000; // Default 5V - uint8_t tipResistance = getTipResistanceX10(); + // Fudge of 0.5 ohms to round up a little to account for us always having off periods in PWM + uint8_t tipResistance = getTipResistanceX10() + 5; #ifdef MODEL_HAS_DCDC // If this device has step down DC/DC inductor to smooth out current spikes // We can instead ignore resistance and go for max voltage we can accept; and rely on the DC/DC regulation to keep under current limit