Closed hb020 closed 2 years ago
Hi. I know nothing about "push/merge," but I suspect that this issue is keeping me from editing the library. While I deeply appreciate your gentle corrections and I welcome your collaboration, I'm going to close this issue for now. In the meantime, can you please tell me more about yourself? I would like to be able to give you credit for your contributions. Thanks, Bud
TLDR : Set explicit types for calls to Wire.requestFrom, as the signature was ambiguous.
More detail:
The signatures of Wire.requestFrom that I know of are:
Specific for ESP8266 (https://github.com/esp8266/Arduino/blob/master/libraries/Wire/Wire.cpp):
Specific for ESP32 (https://github.com/espressif/arduino-esp32/blob/master/libraries/Wire/src/Wire.cpp)
Specific for ArduinoCore-avr (https://github.com/arduino/ArduinoCore-avr/blob/master/libraries/Wire/src/Wire.cpp):
Common for all three:
Calling with (int,int,bool), as originally present, is ambiguous for ESP8266 and ESP32, but not for ArduinoCore-avr. A signature that would be unambiguous is (int,int,int) or (uint8_t,uint8_t,uint8_t). So I went for (int,int,int), as that was the closest to the original code.
Frankly, (uint8_t,size_t,bool) should be the correct one, but avr does not have that as an explicit signature.
In the issue https://github.com/budryerson/TFMini-Plus-I2C/issues/12 I proposed another mapping, but that would be wrong for ArduinoCore-avr.
Not strictly related: 1.7.2 is from 2022, not 2021. I did not correct that.