From f547a745a65e50c1cb3481bfa99774122fe1ae35 Mon Sep 17 00:00:00 2001 From: SV-Zanshin Date: Wed, 17 Oct 2018 07:50:47 +0100 Subject: [PATCH] Change for Issue #30 --- src/INA.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/INA.cpp b/src/INA.cpp index e8229b8..b95027b 100644 --- a/src/INA.cpp +++ b/src/INA.cpp @@ -176,6 +176,7 @@ uint8_t INA_Class::begin(const uint8_t maxBusAmps, const uint32_t microOhmR, con uint16_t originalRegister,tempRegister; // Stores 16-bit register contents // if (_DeviceCount==0) // Enumerate devices in first call // { // // + uint8_t maxDevices = 0; // declare variable // #if defined(ESP32) || defined(ESP2866) // // EEPROM.begin(512); // If ESP32 then allocate 512 Bytes // maxDevices = 512 / sizeof(inaEE); // and compute number of devices // @@ -183,11 +184,11 @@ uint8_t INA_Class::begin(const uint8_t maxBusAmps, const uint32_t microOhmR, con Wire.begin(); // Start I2C communications // #endif // // #ifdef __STM32F1__ // Emulated EEPROM for STM32F1 // - uint8_t maxDevices = EEPROM.maxcount() / sizeof(inaEE); // Compute number devices possible // + maxDevices = EEPROM.maxcount() / sizeof(inaEE); // Compute number devices possible // #elif defined(CORE_TEENSY) // TEENSY doesn't have EEPROM.length// maxDevices = 2048 / sizeof(inaEE); // defined, so use 2Kb as value // #else // EEPROM Library V2.0 for Arduino // - uint8_t maxDevices = EEPROM.length() / sizeof(inaEE); // Compute number devices possible // + maxDevices = EEPROM.length() / sizeof(inaEE); // Compute number devices possible // #endif // // for(uint8_t deviceAddress = 0x40;deviceAddress<0x80;deviceAddress++) // Loop for each possible address // { // //