@@ -289,7 +289,7 @@ def __init__(self, dac_instance, cache_page, index):
289
289
@property
290
290
def normalized_value (self ):
291
291
"""The DAC value as a floating point number in the range 0.0 to 1.0."""
292
- return self .raw_value / (2 ** 12 - 1 )
292
+ return self .raw_value / (2 ** 12 - 1 )
293
293
294
294
@normalized_value .setter
295
295
def normalized_value (self , value ):
@@ -302,13 +302,13 @@ def normalized_value(self, value):
302
302
def value (self ):
303
303
"""The 16-bit scaled current value for the channel. Note that the MCP4728 is a 12-bit piece
304
304
so quantization errors will occur"""
305
- return self .normalized_value * (2 ** 16 - 1 )
305
+ return self .normalized_value * (2 ** 16 - 1 )
306
306
307
307
@value .setter
308
308
def value (self , value ):
309
- if value < 0 or value > (2 ** 16 - 1 ):
309
+ if value < 0 or value > (2 ** 16 - 1 ):
310
310
raise AttributeError (
311
- "`value` must be a 16-bit integer between 0 and %s" % (2 ** 16 - 1 )
311
+ "`value` must be a 16-bit integer between 0 and %s" % (2 ** 16 - 1 )
312
312
)
313
313
314
314
# Scale from 16-bit to 12-bit value (quantization errors will occur!).
@@ -321,9 +321,9 @@ def raw_value(self):
321
321
322
322
@raw_value .setter
323
323
def raw_value (self , value ):
324
- if value < 0 or value > (2 ** 12 - 1 ):
324
+ if value < 0 or value > (2 ** 12 - 1 ):
325
325
raise AttributeError (
326
- "`raw_value` must be a 12-bit integer between 0 and %s" % (2 ** 12 - 1 )
326
+ "`raw_value` must be a 12-bit integer between 0 and %s" % (2 ** 12 - 1 )
327
327
)
328
328
self ._raw_value = value
329
329
# disabling the protected access warning here because making it public would be
0 commit comments