From 0727f46047c75a93e4e040588c46bc0627799e4d Mon Sep 17 00:00:00 2001 From: Stanley Lio Date: Fri, 13 Mar 2015 02:09:27 -0700 Subject: [PATCH] fixed a few debug prints --- Adafruit_ADS1x15/Adafruit_ADS1x15.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Adafruit_ADS1x15/Adafruit_ADS1x15.py b/Adafruit_ADS1x15/Adafruit_ADS1x15.py index 32141f4b..b73ea6fb 100644 --- a/Adafruit_ADS1x15/Adafruit_ADS1x15.py +++ b/Adafruit_ADS1x15/Adafruit_ADS1x15.py @@ -180,12 +180,12 @@ def readADCSingleEnded(self, channel=0, pga=6144, sps=250): config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS) else: if ( (sps not in self.spsADS1115) & self.debug): - print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps + print "ADS1x15: Invalid sps specified: %d, using 250SPS" % sps config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS) # Set PGA/voltage range, defaults to +-6.144V if ( (pga not in self.pgaADS1x15) & self.debug): - print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps + print "ADS1x15: Invalid pga specified: %d, using 6144mV" % pga config |= self.pgaADS1x15.setdefault(pga, self.__ADS1015_REG_CONFIG_PGA_6_144V) self.pga = pga @@ -211,7 +211,7 @@ def readADCSingleEnded(self, channel=0, pga=6144, sps=250): # We add 0.1ms to be sure delay = 1.0/sps+0.0001 time.sleep(delay) - + # Read the conversion results result = self.i2c.readList(self.__ADS1015_REG_POINTER_CONVERT, 2) if (self.ic == self.__IC_ADS1015): @@ -263,7 +263,7 @@ def readADCDifferential(self, chP=0, chN=1, pga=6144, sps=250): config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS) else: if ( (sps not in self.spsADS1115) & self.debug): - print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps + print "ADS1x15: Invalid sps specified: %d, using 250sps" % sps config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS) # Set PGA/voltage range, defaults to +-6.144V @@ -366,12 +366,12 @@ def startContinuousConversion(self, channel=0, pga=6144, sps=250): config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS) else: if ( (sps not in self.spsADS1115) & self.debug): - print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps + print "ADS1x15: Invalid sps specified: %d, using 250SPS" % sps config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS) # Set PGA/voltage range, defaults to +-6.144V if ( (pga not in self.pgaADS1x15) & self.debug): - print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps + print "ADS1x15: Invalid pga specified: %d, using 6144mV" % pga config |= self.pgaADS1x15.setdefault(pga, self.__ADS1015_REG_CONFIG_PGA_6_144V) self.pga = pga @@ -439,12 +439,12 @@ def startContinuousDifferentialConversion(self, chP=0, chN=1, pga=6144, sps=250) config |= self.spsADS1015.setdefault(sps, self.__ADS1015_REG_CONFIG_DR_1600SPS) else: if ( (sps not in self.spsADS1115) & self.debug): - print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps + print "ADS1x15: Invalid sps specified: %d, using 250SPS" % sps config |= self.spsADS1115.setdefault(sps, self.__ADS1115_REG_CONFIG_DR_250SPS) # Set PGA/voltage range, defaults to +-6.144V if ( (pga not in self.pgaADS1x15) & self.debug): - print "ADS1x15: Invalid pga specified: %d, using 6144mV" % sps + print "ADS1x15: Invalid pga specified: %d, using 6144mV" % pga config |= self.pgaADS1x15.setdefault(pga, self.__ADS1015_REG_CONFIG_PGA_6_144V) self.pga = pga