UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.35k stars 420 forks source link

Redundant i_expected_max parameter when calibrating ina219 #589

Closed dernasherbrezon closed 5 months ago

dernasherbrezon commented 7 months ago

The issue

I noticed that ina219 calibration function has i_expected_max parameter.

esp_err_t ina219_calibrate(ina219_t *dev, float i_expected_max, float r_shunt)
{
...
}

However this parameter is only printed into the log. Is it a bug in the calibration function? Or left over from the old logic? It has quite complicated configuration in the example code through Kconfig.projbuild, which looks redundant.

Which SDK are you using?

esp-idf

Which version of SDK are you using?

master

Which build target have you used?

Component causing the issue

ina219

Anything in the logs that might be useful for us?

No response

Additional information or context

No response

Confirmation