only vbus mod check on pinecil

If a TS80P has it connected, other things blow up first at 20V
This commit is contained in:
Ben V. Brown
2022-02-12 10:34:22 +11:00
parent 3869003cf4
commit 16882fee61
2 changed files with 9 additions and 4 deletions

View File

@@ -142,6 +142,7 @@
#define ACCEL_BMA
#define ACCEL_SC7
#define HALL_SENSOR
#define VBUS_MOD_TEST
#define HALL_SI7210
#define DEBUG_UART_OUTPUT

View File

@@ -734,20 +734,24 @@ void showDebugMenu(void) {
} else {
// We are not powered via DC, so want to display the appropriate state for PD or QC
bool poweredbyPD = false;
bool pdHasVBUSConnected = true;
bool pdHasVBUSConnected = false;
#if POW_PD
if (USBPowerDelivery::fusbPresent()) {
// We are PD capable
if (USBPowerDelivery::negotiationComplete()) {
// We are powered via PD
poweredbyPD = true;
poweredbyPD = true;
#ifdef VBUS_MOD_TEST
pdHasVBUSConnected = USBPowerDelivery::isVBUSConnected();
#endif
}
}
#endif
if (poweredbyPD) {
sourceNumber = 2;
if (!pdHasVBUSConnected) {
if (pdHasVBUSConnected) {
sourceNumber = 2;
} else {
sourceNumber = 3;
}
} else {