From c4a1c51dcbca2ac37c9564a2cd6f92f764bcce6e Mon Sep 17 00:00:00 2001 From: Arnd Date: Wed, 26 Apr 2017 16:07:03 -0400 Subject: [PATCH] Changed variable names --- INA226.cpp | 4 ++-- INA226.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/INA226.cpp b/INA226.cpp index 25f5485..d32791d 100644 --- a/INA226.cpp +++ b/INA226.cpp @@ -24,7 +24,7 @@ INA226_Class::~INA226_Class() {} // of unused class destructor // /******************************************************************************************************************* ** Method begin() does all of the initialization work ** *******************************************************************************************************************/ -void INA226_Class::begin(const uint8_t maxBusAmps, const uint32_t milliOhmR) {// Class initializer // +void INA226_Class::begin(const uint8_t maxBusAmps, const uint32_t nanoOhmR) { // Class initializer // Wire.begin(); // Start the I2C wire subsystem // for(_DeviceAddress = 1;_DeviceAddress<127;_DeviceAddress++) { // Loop for each possible address // Wire.beginTransmission(_DeviceAddress); // See if something is at address // @@ -33,7 +33,7 @@ void INA226_Class::begin(const uint8_t maxBusAmps, const uint32_t milliOhmR) {// delay(10); // Wait for INA to finish resetting // if (readWord(INA_CONFIGURATION_REGISTER)==INA_DEFAULT_CONFIGURATION) { // Yes, we've found an INA226! // _Current_LSB = (uint32_t)maxBusAmps*1000000000/32767; // Get the best possible LSB // - _Calibration = 51200000/((int64_t)_Current_LSB*milliOhmR/100000); // Compute calibration register // + _Calibration = 51200000/((int64_t)_Current_LSB*nanoOhmR/100000); // Compute calibration register // _Power_LSB = (uint32_t)25*_Current_LSB; // Fixed multiplier for INA219 // writeWord(INA_CALIBRATION_REGISTER,_Calibration); // Write the calibration value // break; // Stop searching // diff --git a/INA226.h b/INA226.h index 30ceab6..1651511 100644 --- a/INA226.h +++ b/INA226.h @@ -33,8 +33,7 @@ ** ** ** Vers. Date Developer Comments ** ** ====== ========== =================== ======================================================================== ** -** 1.0.1 2017-05-26 Arnd@SV-Zanshin.Com Changed _CurrentLSB from uint16_t to uint32_t due to overflow bug, ** -** corrected begin() parameter name from nanoOhm to milliOhm ** +** 1.0.1 2017-05-26 Arnd@SV-Zanshin.Com Changed _CurrentLSB from uint16_t to uint32_t due to overflow bug ** ** 1.0.0 2017-01-10 Arnd@SV-Zanshin.Com Fixed library file name, added constants for setMode() call ** ** 1.0.0 2017-01-09 Arnd@SV-Zanshin.Com Added reset() and setMode() calls ** ** 1.0.b2 2017-01-08 Arnd@SV-Zanshin.Com Removed INA219 code, concentrating on only the INA226 ** @@ -79,7 +78,7 @@ public: // Publicly visible methods // INA226_Class(); // Class constructor // ~INA226_Class(); // Class destructor // - void begin(const uint8_t maxBusAmps, const uint32_t milliOhmR); // Class initializer // + void begin(const uint8_t maxBusAmps, const uint32_t nanoOhmR); // Class initializer // uint16_t getBusMilliVolts(const bool waitSwitch=false); // Retrieve Bus voltage in mV // int16_t getShuntMicroVolts(const bool waitSwitch=false); // Retrieve Shunt voltage in uV // int32_t getBusMicroAmps(); // Retrieve microamps //