Skip to content

Commit 0727f46

Browse files
committed
fixed a few debug prints
1 parent a8ea1eb commit 0727f46

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Adafruit_ADS1x15/Adafruit_ADS1x15.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ def readADCSingleEnded(self, channel=0, pga=6144, sps=250):
180180
config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS)
181181
else:
182182
if ( (sps not in self.spsADS1115) & self.debug):
183-
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
183+
print "ADS1x15: Invalid sps specified: %d, using 250SPS" % sps
184184
config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS)
185185

186186
# Set PGA/voltage range, defaults to +-6.144V
187187
if ( (pga not in self.pgaADS1x15) & self.debug):
188-
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
188+
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % pga
189189
config |= self.pgaADS1x15.setdefault(pga, self.__ADS1015_REG_CONFIG_PGA_6_144V)
190190
self.pga = pga
191191

@@ -211,7 +211,7 @@ def readADCSingleEnded(self, channel=0, pga=6144, sps=250):
211211
# We add 0.1ms to be sure
212212
delay = 1.0/sps+0.0001
213213
time.sleep(delay)
214-
214+
215215
# Read the conversion results
216216
result = self.i2c.readList(self.__ADS1015_REG_POINTER_CONVERT, 2)
217217
if (self.ic == self.__IC_ADS1015):
@@ -263,7 +263,7 @@ def readADCDifferential(self, chP=0, chN=1, pga=6144, sps=250):
263263
config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS)
264264
else:
265265
if ( (sps not in self.spsADS1115) & self.debug):
266-
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
266+
print "ADS1x15: Invalid sps specified: %d, using 250sps" % sps
267267
config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS)
268268

269269
# Set PGA/voltage range, defaults to +-6.144V
@@ -366,12 +366,12 @@ def startContinuousConversion(self, channel=0, pga=6144, sps=250):
366366
config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS)
367367
else:
368368
if ( (sps not in self.spsADS1115) & self.debug):
369-
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
369+
print "ADS1x15: Invalid sps specified: %d, using 250SPS" % sps
370370
config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS)
371371

372372
# Set PGA/voltage range, defaults to +-6.144V
373373
if ( (pga not in self.pgaADS1x15) & self.debug):
374-
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
374+
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % pga
375375
config |= self.pgaADS1x15.setdefault(pga, self.__ADS1015_REG_CONFIG_PGA_6_144V)
376376
self.pga = pga
377377

@@ -439,12 +439,12 @@ def startContinuousDifferentialConversion(self, chP=0, chN=1, pga=6144, sps=250)
439439
config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS)
440440
else:
441441
if ( (sps not in self.spsADS1115) & self.debug):
442-
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
442+
print "ADS1x15: Invalid sps specified: %d, using 250SPS" % sps
443443
config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS)
444444

445445
# Set PGA/voltage range, defaults to +-6.144V
446446
if ( (pga not in self.pgaADS1x15) & self.debug):
447-
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps
447+
print "ADS1x15: Invalid pga specified: %d, using 6144mV" % pga
448448
config |= self.pgaADS1x15.setdefault(pga, self.__ADS1015_REG_CONFIG_PGA_6_144V)
449449
self.pga = pga
450450

0 commit comments

Comments
 (0)