mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 08:39:21 +01:00
Compare commits
1 Commits
developer
...
fix/setbit
| Author | SHA1 | Date | |
|---|---|---|---|
| 71d7cb66ff |
@@ -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