1
0
forked from me/IronOS

Backoff by about 1W from approx limit

This commit is contained in:
Ben V. Brown
2021-05-06 19:46:32 +10:00
parent c6899574f6
commit 7bca0280f9
2 changed files with 3 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ bool PolicyEngine::pdbs_dpm_evaluate_capability(const union pd_msg *capabilities
bestIsPPS = false;
#ifdef MODEL_HAS_DCDC
// set limiter for wattage
powerSupplyWattageLimit = (voltage_mv * current_a_x100) / 100 / 1000;
powerSupplyWattageLimit = ((voltage_mv * current_a_x100) / 100 / 1000)-1;
#endif
}
}
@@ -119,7 +119,7 @@ bool PolicyEngine::pdbs_dpm_evaluate_capability(const union pd_msg *capabilities
bestIsPPS = true;
#ifdef MODEL_HAS_DCDC
// set limiter for wattage
powerSupplyWattageLimit = (ideal_voltage_mv * max_current) / 100 / 1000;
powerSupplyWattageLimit = ((ideal_voltage_mv * max_current) / 100 / 1000)-1;
#endif
}
}

View File

@@ -207,7 +207,7 @@
#define CALIBRATION_OFFSET 0 // the adc offset in uV - MHP compensates automagically
#define POWER_LIMIT 65 // 65 watts default power limit
#define MAX_POWER_LIMIT 65 //
#define POWER_LIMIT_STEPS 2 //
#define POWER_LIMIT_STEPS 1 //
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_MHP30 //
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
#define MODEL_HAS_DCDC // Has inductor to current filter