ina220 fix max current param name (#23886)

This commit is contained in:
benjinne 2024-11-04 20:00:06 -05:00 committed by GitHub
parent a41a8e8924
commit 5001aab292
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,7 +56,7 @@ INA220::INA220(const I2CSPIDriverConfig &config, int battery_index) :
{
float fvalue = MAX_CURRENT;
_max_current = fvalue;
param_t ph = (_ch_type == PM_CH_TYPE_VBATT) ? param_find("INA220_CURRENT_BAT") : param_find("INA220_CURRENT_REG");
param_t ph = (_ch_type == PM_CH_TYPE_VBATT) ? param_find("INA220_CUR_BAT") : param_find("INA220_CUR_REG");
if (ph != PARAM_INVALID && param_get(ph, &fvalue) == PX4_OK) {
_max_current = fvalue;