mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Second pass
This commit is contained in:
@@ -16,7 +16,7 @@ void power_check() {
|
||||
if (FUSB302_present) {
|
||||
PolicyEngine::PPSTimerCallback();
|
||||
// Cant start QC until either PD works or fails
|
||||
if (PolicyEngine::setupCompleteOrTimedOut(systemSettings.PDNegTimeout) == false) {
|
||||
if (PolicyEngine::setupCompleteOrTimedOut(getSettingValue(SettingsOptions::PDNegTimeout)) == false) {
|
||||
return;
|
||||
}
|
||||
if (PolicyEngine::pdHasNegotiated()) {
|
||||
@@ -43,7 +43,7 @@ uint8_t usb_pd_detect() {
|
||||
|
||||
bool getIsPoweredByDCIN() {
|
||||
// We return false until we are sure we are not using PD
|
||||
if (PolicyEngine::setupCompleteOrTimedOut(systemSettings.PDNegTimeout) == false) {
|
||||
if (PolicyEngine::setupCompleteOrTimedOut(getSettingValue(SettingsOptions::PDNegTimeout)) == false) {
|
||||
return false;
|
||||
}
|
||||
if (PolicyEngine::pdHasNegotiated()) {
|
||||
|
||||
@@ -47,12 +47,12 @@ uint8_t QC_DM_PulledDown() { return gpio_input_bit_get(USB_DM_LOW_GPIO_Port, USB
|
||||
void QC_resync() {
|
||||
#ifdef POW_QC
|
||||
uint8_t targetvoltage = 90;
|
||||
if (systemSettings.QCIdealVoltage == 1) {
|
||||
if (getSettingValue(SettingsOptions::QCIdealVoltage) == 1) {
|
||||
targetvoltage = 120;
|
||||
} else if (systemSettings.QCIdealVoltage == 2) {
|
||||
} else if (getSettingValue(SettingsOptions::QCIdealVoltage) == 2) {
|
||||
targetvoltage = 200;
|
||||
}
|
||||
|
||||
seekQC(targetvoltage, systemSettings.voltageDiv); // Run the QC seek again if we have drifted too much
|
||||
seekQC(targetvoltage, getSettingValue(SettingsOptions::VoltageDiv)); // Run the QC seek again if we have drifted too much
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user