@@ -297,8 +297,8 @@ def roi_xy(self):
297
297
"""Returns the x and y coordinates of the sensor's region of interest"""
298
298
temp = self ._read_register (_ROI_CONFIG__USER_ROI_REQUESTED_GLOBAL_XY_SIZE )
299
299
300
- x = (int .from_bytes (temp , ' big' ) & 0x0F ) + 1
301
- y = ((int .from_bytes (temp , ' big' ) & 0xF0 ) >> 4 ) + 1
300
+ x = (int .from_bytes (temp , " big" ) & 0x0F ) + 1
301
+ y = ((int .from_bytes (temp , " big" ) & 0xF0 ) >> 4 ) + 1
302
302
303
303
return x , y
304
304
@@ -313,23 +313,21 @@ def roi_xy(self, data):
313
313
if x > 10 or y > 10 :
314
314
optical_center = 199
315
315
316
- self ._write_register (
317
- _ROI_CONFIG__USER_ROI_CENTRE_SPAD , optical_center .to_bytes (1 , 'big' )
318
- )
316
+ self ._write_register (_ROI_CONFIG__USER_ROI_CENTRE_SPAD , optical_center .to_bytes (1 , "big" ))
319
317
self ._write_register (
320
318
_ROI_CONFIG__USER_ROI_REQUESTED_GLOBAL_XY_SIZE ,
321
- ((y - 1 ) << 4 | (x - 1 )).to_bytes (1 , ' big' ),
319
+ ((y - 1 ) << 4 | (x - 1 )).to_bytes (1 , " big" ),
322
320
)
323
321
324
322
@property
325
323
def roi_center (self ):
326
324
"""Returns the center of the sensor's region of interest"""
327
325
temp = self ._read_register (_ROI_CONFIG__USER_ROI_CENTRE_SPAD )
328
- return int .from_bytes (temp ,' big' )
326
+ return int .from_bytes (temp , " big" )
329
327
330
328
@roi_center .setter
331
329
def roi_center (self , center ):
332
- self ._write_register (_ROI_CONFIG__USER_ROI_CENTRE_SPAD , center .to_bytes (1 , ' big' ))
330
+ self ._write_register (_ROI_CONFIG__USER_ROI_CENTRE_SPAD , center .to_bytes (1 , " big" ))
333
331
334
332
def _write_register (self , address , data , length = None ):
335
333
if length is None :
0 commit comments