Adafruit_BusIO icon indicating copy to clipboard operation
Adafruit_BusIO copied to clipboard

DEBUG_SERIAL decimal address printed as hex

Open disq opened this issue 9 months ago • 1 comments

#ifdef DEBUG_SERIAL
  DEBUG_SERIAL.print(F("Address 0x"));
  DEBUG_SERIAL.print(_addr);
#endif

_addr is printed as decimal, so for example a failing LIS3DH init shows as "Address 0x24 Not detected" where it's actually 0x18 (or, just 24)

https://github.com/adafruit/Adafruit_BusIO/blob/1.16.0/Adafruit_I2CDevice.cpp#L72

disq avatar Apr 29 '24 19:04 disq