ina220 fix max current param name (#23886)

This commit is contained in:
benjinne
2024-11-04 16:00:06 -09:00
committed by GitHub
parent a41a8e8924
commit 5001aab292
+1 -1
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;