device: remove extra debugging for backlight
This commit is contained in:
parent
9c4bbec5e2
commit
fbad827d57
|
@ -1132,28 +1132,13 @@ class Backlight:
|
|||
self.temp_supported = supported & 0x10
|
||||
self.perm_supported = supported & 0x20
|
||||
self.mode = (self.options >> 3) & 0x03
|
||||
if _log.isEnabledFor(_DEBUG):
|
||||
_log.debug(
|
||||
'BACKLIGHT READ %x %x %x %x %x %x %x', self.mode, self.enabled, self.options, self.level, self.dho, self.dhi,
|
||||
self.dpow
|
||||
)
|
||||
|
||||
def write(self):
|
||||
self.options = (self.options & 0x07) | (self.mode << 3)
|
||||
if _log.isEnabledFor(_DEBUG):
|
||||
_log.debug(
|
||||
'BACKLIGHT WRITE %x %x %x %x %x %x %x', self.mode, self.enabled, self.options, self.level, self.dho, self.dhi,
|
||||
self.dpow
|
||||
)
|
||||
level = self.level if self.mode == 0x3 else 0
|
||||
data_bytes = _pack('<BBBBHHH', self.enabled, self.options, 0xFF, level, self.dho, self.dhi, self.dpow)
|
||||
self.device.feature_request(FEATURE.BACKLIGHT2, 0x00) # for testing - remove later
|
||||
try: # for testing - remove later
|
||||
self.device.feature_request(FEATURE.BACKLIGHT2, 0x10, data_bytes)
|
||||
except Exception as e: # for testing - remove later
|
||||
self.device.feature_request(FEATURE.BACKLIGHT2, 0x00) # for testing - remove later
|
||||
raise e # for testing - remove later
|
||||
self.device.feature_request(FEATURE.BACKLIGHT2, 0x00) # for testing - remove later
|
||||
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue