Skip to content

Commit 3589162

Browse files
committed
i2c detect bugfix
The Adafruit MCP23017 class doesn't take the direct address but uses a base of `0x20`. This was missed on the detect.
1 parent 787b3ca commit 3589162

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MRSC/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ void setup() {
444444

445445
for (uint8_t c = 0; c < BOARD_COUNT; c++) {
446446
// Setup the MCP23017 & PCA9685 boards
447-
if (detect(MCP_ADDRESSES[c]) && detect(PCA_ADDRESSES[c])) {
447+
if (detect(MCP23017_ADDRESS | MCP_ADDRESSES[c]) && detect(PCA_ADDRESSES[c])) {
448448
#if __cplusplus >= 201402L
449449
boards[c] = {
450450
Switches::initialize(MCP_ADDRESSES[c]),

0 commit comments

Comments
 (0)