mirror of
https://github.com/cmur2/python-veml6070.git
synced 2025-06-26 12:30:19 +02:00
module: respect shutdown settings when writing command
- this fixes a serious flaw where until now this library never powered the sensor down - not noticable directly as the sensor still takes measurements but wastes power in between
This commit is contained in:
@ -64,7 +64,7 @@ class Veml6070(object):
|
||||
assembles the command byte for the current state
|
||||
"""
|
||||
cmd = (self.shutdown & 0x01) << 0 # SD
|
||||
cmd = (self.integration_time & 0x03) << 2 # IT
|
||||
cmd = cmd | (self.integration_time & 0x03) << 2 # IT
|
||||
cmd = ((cmd | 0x02) & 0x3F) # reserved bits
|
||||
return cmd
|
||||
|
||||
|
Reference in New Issue
Block a user