mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update policy_engine_user.cpp
This commit is contained in:
@@ -99,7 +99,7 @@ bool PolicyEngine::pdbs_dpm_evaluate_capability(const union pd_msg *capabilities
|
|||||||
if (ideal_voltage_mv > (USB_PD_VMAX * 1000)) {
|
if (ideal_voltage_mv > (USB_PD_VMAX * 1000)) {
|
||||||
ideal_voltage_mv = (USB_PD_VMAX * 1000); // constrain to model max
|
ideal_voltage_mv = (USB_PD_VMAX * 1000); // constrain to model max
|
||||||
}
|
}
|
||||||
if (ideal_voltage_mv > bestIndexVoltage) {
|
if (ideal_voltage_mv > bestIndexVoltage || bestIndex == 0xFF) {
|
||||||
bestIndex = i;
|
bestIndex = i;
|
||||||
bestIndexVoltage = ideal_voltage_mv;
|
bestIndexVoltage = ideal_voltage_mv;
|
||||||
bestIndexCurrent = max_current;
|
bestIndexCurrent = max_current;
|
||||||
|
|||||||
Reference in New Issue
Block a user