diff --git a/examples/printVoltageAndCurrent/printVoltageAndCurrent.ino b/examples/printVoltageAndCurrent/printVoltageAndCurrent.ino index abca79b..c7e252a 100644 --- a/examples/printVoltageAndCurrent/printVoltageAndCurrent.ino +++ b/examples/printVoltageAndCurrent/printVoltageAndCurrent.ino @@ -1,7 +1,7 @@ #include -const uint16_t ina226calib = INA226_asukiaaa::calcCalibByResisterMilliOhm(2); // Max 5120 milli ohm -// const uint16_t ina226calib = INA226_asukiaaa::calcCalibByResisterMicroOhm(2000); +const uint16_t ina226calib = INA226_asukiaaa::calcCalibByResistorMilliOhm(2); // Max 5120 milli ohm +// const uint16_t ina226calib = INA226_asukiaaa::calcCalibByResistorMicroOhm(2000); INA226_asukiaaa voltCurrMeter(INA226_ASUKIAAA_ADDR_A0_GND_A1_GND, ina226calib); void setup() { diff --git a/src/INA226_asukiaaa.cpp b/src/INA226_asukiaaa.cpp index d934655..8458b3a 100644 --- a/src/INA226_asukiaaa.cpp +++ b/src/INA226_asukiaaa.cpp @@ -24,12 +24,12 @@ void INA226_asukiaaa::setWire(TwoWire* wire) { this->wire = wire; } -uint16_t INA226_asukiaaa::calcCalibByResisterMilliOhm(uint16_t resisterMilliOhm) { - return calcCalibByResisterMicroOhm((uint32_t) resisterMilliOhm * 1000); +uint16_t INA226_asukiaaa::calcCalibByResistorMilliOhm(uint16_t resistorMilliOhm) { + return calcCalibByResistorMicroOhm((uint32_t) resistorMilliOhm * 1000); } -uint16_t INA226_asukiaaa::calcCalibByResisterMicroOhm(uint32_t resisterMilliOhm) { - return (uint32_t) 5120 * 1000 / resisterMilliOhm; +uint16_t INA226_asukiaaa::calcCalibByResistorMicroOhm(uint32_t resistorMilliOhm) { + return (uint32_t) 5120 * 1000 / resistorMilliOhm; } int INA226_asukiaaa::begin() {