kike-canaries / canairio_sensorlib

Particle sensor manager for multiple sensors: Honeywell, Plantower, Panasonic, Sensirion, etc. This is sensors layer of CanAirIO project too.
https://canair.io/docs/sensorlib.html
GNU General Public License v3.0
37 stars 12 forks source link

warning: ISO C++ worst conversion on AHT10 Library #143

Closed hpsaturn closed 2 years ago

hpsaturn commented 2 years ago

Overview

We need maybe upgrade to the new library of this autor because the old one right now is read-only repository and have this warnning. The new library is: https://github.com/enjoyneering/AHTxx

Log output

.pio/libdeps/esp32/AHT10/src/AHT10.cpp: In member function 'uint8_t AHT10::readStatusByte()':
.pio/libdeps/esp32/AHT10/src/AHT10.cpp:305:37: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
   Wire.requestFrom(_address, 1, true);           //true - send stop after transmission & release I2C bus
                                     ^
In file included from .pio/libdeps/esp32/AHT10/src/AHT10.h:50,
                 from .pio/libdeps/esp32/AHT10/src/AHT10.cpp:33:
/home/avp/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:103:13: note: candidate 1: 'uint8_t TwoWire::requestFrom(int, int, int)'
     uint8_t requestFrom(int address, int size, int sendStop);
             ^~~~~~~~~~~
/home/avp/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:99:12: note: candidate 2: 'size_t TwoWire::requestFrom(uint8_t, size_t, bool)'
     size_t requestFrom(uint8_t address, size_t len, bool stopBit);
hpsaturn commented 2 years ago

Fixed on the last PR #151