diff options
author | Ben V. Brown <[email protected]> | 2022-02-06 13:15:01 +1100 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2022-02-06 13:15:01 +1100 |
commit | 265e152c182b0eb90213f8fa5dee56b54d35df36 (patch) | |
tree | 6f9024155fadc2bf89cc39cfb6f353b02e5fbaf4 /source | |
parent | 3c83b59b53bf783a626c4185f61ea6f70706e330 (diff) | |
download | IronOS-265e152c182b0eb90213f8fa5dee56b54d35df36.tar.gz IronOS-265e152c182b0eb90213f8fa5dee56b54d35df36.zip |
Add to debug menu
Diffstat (limited to 'source')
-rw-r--r-- | source/Core/Threads/GUIThread.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 940cde55..60570b7b 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -731,18 +731,23 @@ void showDebugMenu(void) { sourceNumber = 0; } else { // We are not powered via DC, so want to display the appropriate state for PD or QC - bool poweredbyPD = false; + bool poweredbyPD = false; + 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; + pdHasVBUSConnected = USBPowerDelivery::isVBUSConnected(); } } #endif if (poweredbyPD) { sourceNumber = 2; + if (!pdHasVBUSConnected) { + sourceNumber = 3; + } } else { sourceNumber = 1; } |