Skip to content

Commit 1f303ec

Browse files
committed
remove debugging prints
1 parent 341a4de commit 1f303ec

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

adafruit_opt4048.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ def __init__(self, i2c_bus, address=_OPT4048_DEFAULT_ADDR):
323323
def init(self):
324324
"""Initialize the sensor and verify the device ID"""
325325
# Check device ID
326-
print(f"id: {hex(self._device_id)}")
327326
if self._device_id != _OPT4048_CHIP_ID:
328327
raise RuntimeError("Failed to find an OPT4048 sensor - check your wiring!")
329328

@@ -593,7 +592,6 @@ def threshold_low(self):
593592
# Read the exponent and mantissa from the threshold low register
594593
exponent = self._threshold_low_exponent
595594
mantissa = self._threshold_low_mantissa
596-
print(f"exponent: {exponent} mantissa: {mantissa}")
597595
# Calculate ADC code value by applying the exponent as a bit shift
598596
# ADD 8 to the exponent as per datasheet equations 12-13
599597
return mantissa << (8 + exponent)
@@ -697,7 +695,6 @@ def all_channels(self):
697695

698696
# Combine MSB and LSB to form the 20-bit mantissa
699697
mant = (msb << 8) | lsb
700-
# print(f"ch: {ch} exp: {exp} msb: {msb} lsb: {lsb} counter: {counter} crc: {crc} mant: {mant}") # noqa: E501
701698
# Calculate CRC
702699
# Initialize CRC variables
703700
x0 = 0 # CRC bit 0

0 commit comments

Comments
 (0)