Skip to content

Commit

Permalink
catch return from all_channels
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed Apr 17, 2023
1 parent 5772169 commit 0afda19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adafruit_as7341.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,13 @@ def channel_680nm(self) -> int:
@property
def channel_clear(self) -> int:
"""The current reading for the clear sensor"""
self._all_channels
_ = self._all_channels
return self._channel_4_data

@property
def channel_nir(self) -> int:
"""The current reading for the NIR (near-IR) sensor"""
self._all_channels
_ = self._all_channels
return self._channel_5_data

def _wait_for_data(self, timeout: float = 1.0) -> None:
Expand All @@ -465,7 +465,7 @@ def _configure_f1_f4(self) -> None:
"""Configure the sensor to read from elements F1-F4, Clear, and NIR"""
# disable SP_EN bit while making config changes
if self._low_channels_configured:
self._all_channels
_ = self._all_channels
return
self._high_channels_configured = False
self._flicker_detection_1k_configured = False
Expand All @@ -489,7 +489,7 @@ def _configure_f5_f8(self) -> None:
"""Configure the sensor to read from elements F5-F8, Clear, and NIR"""
# disable SP_EN bit while making config changes
if self._high_channels_configured:
self._all_channels
_ = self._all_channels
return

self._low_channels_configured = False
Expand Down

0 comments on commit 0afda19

Please sign in to comment.