mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-20 14:48:54 +01:00
python setBit backwards compatible (#1359)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user