Skip to content

Commit 3e31097

Browse files
committed
Removed bit truncation warning
1 parent f7fd261 commit 3e31097

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

adafruit_ads1x15/ads1x15.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ def comparator_low_threshold(self, value: int) -> None:
199199
"Comparator Threshold value must be between -32768 and 32767"
200200
)
201201

202-
if (self.bits == 12) & (value & 0x000F > 0):
203-
print("4 LSBs will be truncated for ADS1015 for 12-bit value")
204-
205202
self._comparator_low_threshold = value
206203
self._write_register(_ADS1X15_POINTER_LO_THRES, self.comparator_low_threshold)
207204

@@ -216,9 +213,6 @@ def comparator_high_threshold(self, value: int) -> None:
216213
"Comparator Threshold value must be between -32768 and 32767"
217214
)
218215

219-
if (self.bits == 12) & (value & 0x000F > 0):
220-
print("4 LSBs will be truncated for ADS1015 for 12-bit value")
221-
222216
self._comparator_high_threshold = value
223217
self._write_register(_ADS1X15_POINTER_HI_THRES, self.comparator_high_threshold)
224218

0 commit comments

Comments
 (0)