From 6f4b9a1b2aaf49c40be795343dd24e1c8fbb3f81 Mon Sep 17 00:00:00 2001 From: Eclypsee <58118247+Eclypsee@users.noreply.github.com> Date: Fri, 26 Jun 2026 09:19:45 -0700 Subject: [PATCH] Allow initialization with all supported XM125 I2C addresses init() currently only accepts SFE_XM125_I2C_ADDRESS, even though the hardware supports alternate I2C addresses (0x51 and 0x53). This prevents applications from using multiple XM125 devices configured with different addresses. This change updates the address validation to accept all supported addresses. --- src/sfTk/sfDevXM125Core.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfTk/sfDevXM125Core.cpp b/src/sfTk/sfDevXM125Core.cpp index c73226b..1ad4e53 100644 --- a/src/sfTk/sfDevXM125Core.cpp +++ b/src/sfTk/sfDevXM125Core.cpp @@ -25,9 +25,9 @@ sfTkError_t sfDevXM125Core::init(sfTkII2C *theBus) return ksfTkErrBusNotInit; // Check if the provided address is valid - if (theBus->address() != SFE_XM125_I2C_ADDRESS) + if (theBus->address() != SFE_XM125_I2C_ADDRESS && theBus->address() != 0x51 && theBus->address() != 0x53){ return ksfTkErrFail; - + } // Sets communication bus _theBus = theBus;