Better gui for showing pd specs

This commit is contained in:
Ben V. Brown
2022-06-24 18:03:03 +10:00
parent 92eaadcaa1
commit be02d60f75

View File

@@ -868,6 +868,10 @@ static void showPDDebug(void) {
min_voltage = PD_PAV2MV(PD_APDO_PPS_MIN_VOLTAGE_GET(lastCaps[screen - 1])); min_voltage = PD_PAV2MV(PD_APDO_PPS_MIN_VOLTAGE_GET(lastCaps[screen - 1]));
current_a_x100 = PD_PAI2CA(PD_APDO_PPS_CURRENT_GET(lastCaps[screen - 1])); // max current in 10mA units current_a_x100 = PD_PAI2CA(PD_APDO_PPS_CURRENT_GET(lastCaps[screen - 1])); // max current in 10mA units
} }
// Skip not used entries
if (voltage_mv == 0) {
screen++;
} else {
// print out this entry of the proposal // print out this entry of the proposal
OLED::printNumber(screen, 2, FontStyle::SMALL, true); // print the entry number OLED::printNumber(screen, 2, FontStyle::SMALL, true); // print the entry number
OLED::print(SymbolSpace, FontStyle::SMALL); OLED::print(SymbolSpace, FontStyle::SMALL);
@@ -887,6 +891,7 @@ static void showPDDebug(void) {
OLED::printNumber(current_a_x100 % 100, 2, FontStyle::SMALL, true); // print the current in 0.1A res OLED::printNumber(current_a_x100 % 100, 2, FontStyle::SMALL, true); // print the current in 0.1A res
OLED::print(SymbolAmps, FontStyle::SMALL); OLED::print(SymbolAmps, FontStyle::SMALL);
} }
}
} else { } else {
screen = 0; screen = 0;
} }