From 71d7cb66ff8debf25dfe342e941c650fe9b2c363 Mon Sep 17 00:00:00 2001 From: Alice Date: Thu, 15 Jan 2026 16:18:44 +0100 Subject: [PATCH] python setBit backwards compatible --- python/slsdet/detector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 59787b703..91c7b5a2f 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -1907,6 +1907,8 @@ class Detector(CppDetectorApi): raise ValueError("bit_position must be provided when passing int address") if not isinstance(bit_position, int): raise ValueError("bit_position must be int") + if isinstance(bitname_or_addr, int): + bitname_or_addr = RegisterAddress(bitname_or_addr) return BitAddress(bitname_or_addr, bit_position) # New usage with str or BitAddress