Skip to content

Commit 290ef84

Browse files
committed
Merge pull request #6 from arenadorn/patch-1
Changed order of reading the registers in get_full_luminosity(self)
2 parents 415995c + e10e803 commit 290ef84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tsl2591/read_tsl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ def disable(self):
156156
def get_full_luminosity(self):
157157
self.enable()
158158
time.sleep(0.120*self.integration_time+1) # not sure if we need it "// Wait x ms for ADC to complete"
159-
ir = self.bus.read_word_data(
160-
self.sendor_address, COMMAND_BIT | REGISTER_CHAN1_LOW
161-
)
162159
full = self.bus.read_word_data(
163160
self.sendor_address, COMMAND_BIT | REGISTER_CHAN0_LOW
164161
)
162+
ir = self.bus.read_word_data(
163+
self.sendor_address, COMMAND_BIT | REGISTER_CHAN1_LOW
164+
)
165165
self.disable()
166166
return full, ir
167167

0 commit comments

Comments
 (0)