diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b9a1579..0eb7d0e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -26,7 +26,7 @@ _Please describe the tests that you ran to verify your changes. Provide instruct * Arduino version: * Arduino Hardware: * SDK: (Arduino IDE, Atmel Studio, Visual Studio, Visual Micro, etc.) -* Development sytem: (Windows, Web, Linux, etc.) +* Development system: (Windows, Web, Linux, etc.) # Checklist: diff --git a/Doxyfile b/Doxyfile index c6bed5a..671ee12 100644 --- a/Doxyfile +++ b/Doxyfile @@ -3,6 +3,7 @@ ## ## ## Date Developer Comments ## ## ========== ============== ====================================================================== ## +## 2020-07-12 SV-Zanshin Updated to version v1.0.13 ## ## 2020-06-30 SV-Zanshin Updated to version v1.0.12 ## ## 2020-06-06 SV-Zanshin Updated to version v1.0.11 ## ## 2020-05-10 SV-Zanshin Removed all comments in order to compact this file ## @@ -10,7 +11,7 @@ ###################################################################################################### DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = INA2xx -PROJECT_NUMBER = "Version 1.0.12" +PROJECT_NUMBER = "Version 1.0.13" PROJECT_BRIEF = "Arduino Library for INA2xx power measurement devices" PROJECT_LOGO = images/horizontal_narrow_small.png OUTPUT_DIRECTORY = diff --git a/keywords.txt b/keywords.txt index 9562662..92dfc91 100644 --- a/keywords.txt +++ b/keywords.txt @@ -40,5 +40,6 @@ INA_MODE_TRIGGERED_BOTH LITERAL1 INA_MODE_POWER_DOWN LITERAL1 INA_MODE_CONTINUOUS_SHUNT LITERAL1 INA_MODE_CONTINUOUS_BOTH LITERAL1 +_EEPROM_offset LITERAL1 diff --git a/library.properties b/library.properties index 05d79fc..63cb125 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=INA2xx -version=1.0.12 +version=1.0.13 author=https://github.com/SV-Zanshin maintainer=https://github.com/SV-Zanshin sentence=Read current and voltage data from multiple INA2xx devices diff --git a/src/INA.cpp b/src/INA.cpp index 04c9b5b..5724206 100644 --- a/src/INA.cpp +++ b/src/INA.cpp @@ -189,14 +189,14 @@ uint8_t INA_Class::begin(const uint16_t maxBusAmps, const uint32_t microOhmR, ** RAM available at runtime to allocate sufficient space for 32 devices. ** **********************************************************************************************/ #if defined(ESP32) || defined(ESP8266) - EEPROM.begin(512); // If ESP32 then allocate 512 Bytes - maxDevices = (_EEPROM_offset + 512) / sizeof(inaEE); // and compute number of devices -#elif defined(__STM32F1__) // Emulated EEPROM for STM32F1 - maxDevices = (_EEPROM_offset + EEPROM.maxcount()) / sizeof(inaEE); // Compute max possible -#elif defined(CORE_TEENSY) // TEENSY doesn't have EEPROM.length - maxDevices = (_EEPROM_offset + 2048) / sizeof(inaEE); // defined, so use 2Kb as value + EEPROM.begin(512 + _EEPROM_offset); // If ESP32 then allocate 512 Bytes + maxDevices = (512) / sizeof(inaEE); // and compute number of devices +#elif defined(__STM32F1__) // Emulated EEPROM for STM32F1 + maxDevices = (EEPROM.maxcount() - _EEPROM_offset) / sizeof(inaEE); // Compute max possible +#elif defined(CORE_TEENSY) // TEENSY doesn't have EEPROM.length + maxDevices = (2048 - _EEPROM_offset) / sizeof(inaEE); // defined, so use 2Kb as value #elif defined(__AVR__) - maxDevices = (_EEPROM_offset + EEPROM.length()) / sizeof(inaEE); // Compute max possible + maxDevices = (EEPROM.length() - _EEPROM_offset) / sizeof(inaEE); // Compute max possible #else maxDevices = 32; #endif diff --git a/src/INA.h b/src/INA.h index 472faae..fbd5950 100644 --- a/src/INA.h +++ b/src/INA.h @@ -77,7 +77,8 @@ * * Version | Date | Developer | Comments * ------- | ---------- | ----------- | -------- - * 1.0.12 | 2020-07-03 | SV-Zanshin | Issue #41. Added "_EEPROM_offset" variable + * 1.0.12 | 2020-07-13 | fg89o | Issue #62. Incorrect "_EEPROM_offset" computation + * 1.0.12 | 2020-07-13 | SV-Zanshin | Issue #41. Added "_EEPROM_offset" variable * 1.0.12 | 2020-07-03 | sages | Issue #60. Possible Overflow getBus(MicroAmps,MicroWatts) * 1.0.11 | 2020-06-30 | SV-Zanshin | Issue #58, changed formatting to use clang-format * 1.0.11 | 2020-06-29 | SV-Zanshin | Issue #57. "Alert..." functions should be "alert..."