From d2f6e7f04a32b906a4f70a81d39b4d172f7e5c8e Mon Sep 17 00:00:00 2001 From: Chandra Wijaya Sentosa Date: Tue, 22 Feb 2022 09:36:03 +0000 Subject: [PATCH] Update version to 1.2.2 --- ADS1x15/ADS1x15.py | 15 ++++++--------- ADS1x15/__init__.py | 4 +++- examples/ADS_comparator.py | 2 +- examples/ADS_continuous.py | 2 +- examples/ADS_differential.py | 2 +- examples/ADS_minimum.py | 2 +- examples/ADS_read.py | 2 +- examples/ADS_read_async.py | 2 +- setup.cfg | 2 +- 9 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ADS1x15/ADS1x15.py b/ADS1x15/ADS1x15.py index 7114faa..4bb755e 100644 --- a/ADS1x15/ADS1x15.py +++ b/ADS1x15/ADS1x15.py @@ -1,9 +1,6 @@ from smbus2 import SMBus import time -# Library version -LIB_VERSION = "1.2.1" - # ADS1x15 default i2c address I2C_address = 0x48 @@ -309,7 +306,7 @@ class ADS1013(ADS1x15) : "ADS1013 class derifed from general ADS1x15 class" def __init__(self, busId: int, address: int = I2C_address) : - "Constructor with SMBus ID and I2C address input and configuration for ADS1013" + "Initialize ADS1013 with SMBus ID and I2C address configuration" self.i2c = SMBus(busId) self._address = address self._conversionDelay = 2 @@ -322,7 +319,7 @@ class ADS1014(ADS1x15) : "ADS1014 class derifed from general ADS1x15 class" def __init__(self, busId: int, address: int = I2C_address) : - "Constructor with SMBus ID and I2C address input and configuration for ADS1014" + "Initialize ADS1014 with SMBus ID and I2C address configuration" self.i2c = SMBus(busId) self._address = address self._conversionDelay = 2 @@ -335,7 +332,7 @@ class ADS1015(ADS1x15) : "ADS1015 class derifed from general ADS1x15 class" def __init__(self, busId: int, address: int = I2C_address) : - "Constructor with SMBus ID and I2C address input and configuration for ADS1015" + "Initialize ADS1015 with SMBus ID and I2C address configuration" self.i2c = SMBus(busId) self._address = address self._conversionDelay = 2 @@ -375,7 +372,7 @@ class ADS1113(ADS1x15) : "ADS1113 class derifed from general ADS1x15 class" def __init__(self, busId: int, address: int = I2C_address) : - "Constructor with SMBus ID and I2C address input and configuration for ADS1113" + "Initialize ADS1113 with SMBus ID and I2C address configuration" self.i2c = SMBus(busId) self._address = address self._conversionDelay = 8 @@ -388,7 +385,7 @@ class ADS1114(ADS1x15) : "ADS1114 class derifed from general ADS1x15 class" def __init__(self, busId: int, address: int = I2C_address) : - "Constructor with SMBus ID and I2C address input and configuration for ADS1114" + "Initialize ADS1114 with SMBus ID and I2C address configuration" self.i2c = SMBus(busId) self._address = address self._conversionDelay = 8 @@ -401,7 +398,7 @@ class ADS1115(ADS1x15) : "ADS1115 class derifed from general ADS1x15 class" def __init__(self, busId: int, address: int = I2C_address) : - "Constructor with SMBus ID and I2C address input and configuration for ADS1115" + "Initialize ADS1115 with SMBus ID and I2C address configuration" self.i2c = SMBus(busId) self._address = address self._conversionDelay = 8 diff --git a/ADS1x15/__init__.py b/ADS1x15/__init__.py index a277d5b..1f12208 100644 --- a/ADS1x15/__init__.py +++ b/ADS1x15/__init__.py @@ -1,5 +1,7 @@ # __init__.py -from .ADS1x15 import LIB_VERSION + +__version__ = "1.2.2" + from .ADS1x15 import ADS1x15 from .ADS1x15 import ADS1013 from .ADS1x15 import ADS1014 diff --git a/examples/ADS_comparator.py b/examples/ADS_comparator.py index d984fc4..8035ed7 100644 --- a/examples/ADS_comparator.py +++ b/examples/ADS_comparator.py @@ -25,7 +25,7 @@ ADS = ADS1x15.ADS1115(1, 0x48) print(os.path.basename(__file__)) -print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION)) +print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__)) # set gain to 4.096V max ADS.setGain(ADS.PGA_4_096V) diff --git a/examples/ADS_continuous.py b/examples/ADS_continuous.py index b949bd4..caeb9e3 100644 --- a/examples/ADS_continuous.py +++ b/examples/ADS_continuous.py @@ -27,7 +27,7 @@ ADS = ADS1x15.ADS1115(1, 0x48) print(os.path.basename(__file__)) -print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION)) +print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__)) ADS.setGain(ADS.PGA_4_096V) ADS.setDataRate(ADS.DR_ADS111X_128) diff --git a/examples/ADS_differential.py b/examples/ADS_differential.py index 76c3e60..c2141dd 100644 --- a/examples/ADS_differential.py +++ b/examples/ADS_differential.py @@ -33,7 +33,7 @@ ADS = ADS1x15.ADS1115(1, 0x48) print(os.path.basename(__file__)) -print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION)) +print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__)) # set gain to 4.096V max ADS.setGain(ADS.PGA_4_096V) diff --git a/examples/ADS_minimum.py b/examples/ADS_minimum.py index c8420bb..62e8d41 100644 --- a/examples/ADS_minimum.py +++ b/examples/ADS_minimum.py @@ -27,7 +27,7 @@ ADS = ADS1x15.ADS1115(1, 0x48) print(os.path.basename(__file__)) -print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION)) +print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__)) # set gain to 4.096V max ADS.setGain(ADS.PGA_4_096V) diff --git a/examples/ADS_read.py b/examples/ADS_read.py index 83202ca..aac640d 100644 --- a/examples/ADS_read.py +++ b/examples/ADS_read.py @@ -27,7 +27,7 @@ ADS = ADS1x15.ADS1115(1, 0x48) print(os.path.basename(__file__)) -print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION)) +print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__)) # set gain to 4.096V max ADS.setGain(ADS.PGA_4_096V) diff --git a/examples/ADS_read_async.py b/examples/ADS_read_async.py index 5b88cd6..bb7391e 100644 --- a/examples/ADS_read_async.py +++ b/examples/ADS_read_async.py @@ -27,7 +27,7 @@ ADS = ADS1x15.ADS1115(1, 0x48) print(os.path.basename(__file__)) -print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.LIB_VERSION)) +print("ADS1X15_LIB_VERSION: {}".format(ADS1x15.__version__)) # set gain to 4.096V max ADS.setGain(ADS.PGA_4_096V) diff --git a/setup.cfg b/setup.cfg index 9d60404..2d49f4b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ADS1x15-ADC -version = 1.2.1 +version = 1.2.2 author = Chandra Wijaya Sentosa author_email = chandra.w.sentosa@gmail.com description = Python library used for ADS1x15 analog to digital converter (ADC)