Skip to content

Commit 2b48d02

Browse files
SV-ZanshinSV-Zanshin
authored andcommitted
Issue #31
Removed pushing BRNG to 0-16V
1 parent 9ec04dd commit 2b48d02

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/INA.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,8 @@ void INA_Class::initDevice(const uint8_t deviceNumber)
308308
else programmableGain = 3; // default gain x8 for +- 320mV //
309309
tempRegister = 0x399F & INA219_CONFIG_PG_MASK; // Zero out the programmable gain //
310310
tempRegister |= programmableGain<<INA219_PG_FIRST_BIT; // Overwrite the new values //
311+
bitSet(tempRegister, INA219_BRNG_BIT); // set to 1 for 0-32 volts //
311312
writeWord(INA_CONFIGURATION_REGISTER,tempRegister,ina.address); // Write new value to config reg //
312-
tempBusmV = getBusMilliVolts(deviceNumber); // Get the voltage on the bus //
313-
if (tempBusmV > 20 && tempBusmV < 16000) { // If we have a voltage //
314-
bitClear(tempRegister,INA219_BRNG_BIT); // set to 0 for 0-16 volts //
315-
writeWord(INA_CONFIGURATION_REGISTER,tempRegister,ina.address); // Write new value to config reg //
316-
} // if-then set the range to 0-16V // //
317313
break; // //
318314
case INA226: // Set up INA226, INA230 or INA231 //
319315
case INA230: // //

src/INA.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
** **
3232
** Vers. Date Developer Comments **
3333
** ====== ========== ============================= ============================================================== **
34+
** 1.0.6 2018-10-19 https://github.com/Sv-Zanshin Issue #31. Use full 0-32V Range on INA219 all the time **
3435
** 1.0.6 2018-10-19 https://github.com/Sv-Zanshin Issue #30. Added TEENSY suuport & support large EEPROM **
3536
** 1.0.6 2018-10-14 https://github.com/Sv-Zanshin Added correct wire handling for ESP8266 and ESP32 **
3637
** 1.0.6 2018-10-07 https://github.com/Sv-Zanshin Optimized getBusRaw() and getShuntRaw() functions **

0 commit comments

Comments
 (0)