Giter Club home page Giter Club logo

Comments (7)

johntaves avatar johntaves commented on May 28, 2024

I am using an ESP8266. It seems to me that the EEPROM will be used. Am I confused?

If it is being used, what prevents another library from using the same address space in the EEPROM?

from ina.

SV-Zanshin avatar SV-Zanshin commented on May 28, 2024

I will look into the first issue, but changing the functionality of the begin() call in the manner you suggest is not possible, as it would break existing code.

To address the second question - there is nothing to prevent another library or the programmer from using the same address space. The library allows the EEPROM to be relocated, but there is no mechanism to prevent any other code from accessing the same locations.

from ina.

johntaves avatar johntaves commented on May 28, 2024

I don't see the point of using the EEPROM. I just need to store the maxamps and ohms for my devices and do so whenever the user changes them. The other values that the INA lib uses are all derived at run time and thus don't need to be EEPROMed.

I modified my instance to not use the EEPROM, instead using the array. I also sized the array to my max number of devices.

I suggest that there be a version of begin that takes a pointer to a array of inaEE and max size parameter, and returns the # of devices. And add a setXXX function to set each devices' maxamps and ohms.

These changes will not affect any existing code that depends on the begin(x,y) version. Note that nobody is using the begin(x,y,z) version, because it does not work.

from ina.

johntaves avatar johntaves commented on May 28, 2024

Also the code that mods _DeviceCount back to 0 when more devices are found than there is space makes no sense (See: // start again at 0 if overflow). Change that to a simple _DeviceCount++; and it will work fine.

from ina.

fg89o avatar fg89o commented on May 28, 2024

would be a good option to release a 2.0 version with optional parameter to use EEPROM or not. I could test it with ESP32. I got a little confused about the EEPROM at the beginning too

from ina.

SV-Zanshin avatar SV-Zanshin commented on May 28, 2024

Sorry for taking so long to address this issue. I will look into making the use of EEPROM for storing the memory structure optional - but I'll open up a separate issue for that

from ina.

SV-Zanshin avatar SV-Zanshin commented on May 28, 2024

Fixed as of v1.0.13

from ina.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.