Skip to content

Commit

Permalink
Issue #31
Browse files Browse the repository at this point in the history
Removed pushing BRNG to 0-16V
  • Loading branch information
SV-Zanshin authored and SV-Zanshin committed Oct 19, 2018
1 parent 9ec04dd commit 2b48d02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/INA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,8 @@ void INA_Class::initDevice(const uint8_t deviceNumber)
else programmableGain = 3; // default gain x8 for +- 320mV //
tempRegister = 0x399F & INA219_CONFIG_PG_MASK; // Zero out the programmable gain //
tempRegister |= programmableGain<<INA219_PG_FIRST_BIT; // Overwrite the new values //
bitSet(tempRegister, INA219_BRNG_BIT); // set to 1 for 0-32 volts //
writeWord(INA_CONFIGURATION_REGISTER,tempRegister,ina.address); // Write new value to config reg //
tempBusmV = getBusMilliVolts(deviceNumber); // Get the voltage on the bus //
if (tempBusmV > 20 && tempBusmV < 16000) { // If we have a voltage //
bitClear(tempRegister,INA219_BRNG_BIT); // set to 0 for 0-16 volts //
writeWord(INA_CONFIGURATION_REGISTER,tempRegister,ina.address); // Write new value to config reg //
} // if-then set the range to 0-16V // //
break; // //
case INA226: // Set up INA226, INA230 or INA231 //
case INA230: // //
Expand Down
1 change: 1 addition & 0 deletions src/INA.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
** **
** Vers. Date Developer Comments **
** ====== ========== ============================= ============================================================== **
** 1.0.6 2018-10-19 https://github.com/Sv-Zanshin Issue #31. Use full 0-32V Range on INA219 all the time **
** 1.0.6 2018-10-19 https://github.com/Sv-Zanshin Issue #30. Added TEENSY suuport & support large EEPROM **
** 1.0.6 2018-10-14 https://github.com/Sv-Zanshin Added correct wire handling for ESP8266 and ESP32 **
** 1.0.6 2018-10-07 https://github.com/Sv-Zanshin Optimized getBusRaw() and getShuntRaw() functions **
Expand Down

0 comments on commit 2b48d02

Please sign in to comment.